-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial MIR component #1438
base: develop
Are you sure you want to change the base?
Initial MIR component #1438
Changes from 250 commits
b4662ca
2f401a7
58340e4
63a0b9a
e7b3e25
c553f30
32486b7
911aa6c
74bc4ee
5b82731
9f3fe77
1959dd7
bdc5833
426d97c
d947251
fe3fc56
52d03ef
9a92055
6deefe6
4d573b9
154ec49
9b143d1
a2fa467
0930c1c
fc240cb
eefee2b
6af4fa2
7f0d095
719329b
72d3240
7b293b0
a5ff0ac
07bdecf
395c37c
24a78d5
41e6a46
4ba2c84
6ff5327
721e970
6db7e4b
39b3e33
8cd51b2
acf1ac2
5331c0a
b46d992
40152ce
43d9c47
e8c8474
2f39c3e
a7d9e1e
dd75375
41dd065
e817b07
18f3026
5634141
3418c07
f45ebb7
5fd8a62
e5dd66d
7ece514
d85270f
b3ce4e0
d9150f3
7b981ce
c7f50f3
1e73a44
1a5a120
eabf434
bbfb600
4e9b17c
23aa1f7
817fc1d
1bf8fcd
21fc10d
1dd88a4
11c0135
90ab9c2
15fdbf5
a5cfcc8
4d0addd
6a78310
2069e10
7c5eb91
64c6024
60bd3cd
5c51478
b708890
35616f2
0207e14
84d3514
642a218
06e3eb9
db64fac
284f9e2
e143dc8
52ec6fe
c294717
47c55bf
3d12af0
087b33b
ebe2c46
4f8e359
09dfb43
c8d84c6
b71a743
68f9b3f
dfff7dc
b0c9a5b
389cb1b
c9c5ee8
b0dc1a8
44e75d4
d645a4f
61e0ec0
393fe77
189b3c3
aa51d5a
ac4aea5
e82a13e
4b863be
f29c26f
e2ab64e
0249309
da2d547
f58b7bc
4d86bb4
5b74ac2
3c319fc
28493fa
2fbe418
45415b2
b8d3c1c
85b6dc4
3ee18ae
1bfbd24
064588e
79144cc
bd8fe95
28f3c8a
449f16a
00b5305
98fcf66
17ec665
4f43bbe
5a0a8ec
d86f2f2
6250b37
d237448
c8c00c4
6b3468b
c1f6fba
954df19
3b91266
fb7ff8b
0cae1d2
2225bf5
debe458
e52d1bd
b6325e0
e25cf83
99596ff
d6ea691
0a1d705
ef1fb76
1a6c6df
e5bc818
8340505
27ecc84
9409974
cef6203
c723789
d9a3595
cf8b987
fc5763a
4f8e751
c216e1d
95517c9
7f19ba7
32e5f5e
583b3da
8e7fb09
6011470
ad20d9b
e976930
d5bfe00
048eb1b
d935dad
49725ec
d3282af
a147431
f459f3d
aae8269
ab2c73f
c0b9e02
90a41ab
6718215
2271300
40eea7e
524df5f
8f73ed0
5429ff4
cb12815
fc8626e
bbc1e46
73f1307
fd268ae
40660ea
ac04c0d
54037c3
d7ef289
7d27fed
9a0aa0a
f637473
e03b481
2f82aa3
5e780a1
9f9bbdc
e864ec1
bdcc302
233b0fe
83a7ec6
2433ca6
03d00d0
259b8df
98f9c0b
409e95b
e894e7a
a1386ed
9bbf830
204b181
70b0d7d
bdb101b
2e5aa10
eb54313
4abba0a
2c672da
a254953
125700f
4cbcfb9
ade297e
c8d7ebd
bc06320
d6498bf
6165c35
cc23482
cd3a9c7
6e8bbf8
d848ea9
cf008dc
9a0f9c2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @BradWhitlock -- Will there be an There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. I added a few YAML files for some CI test results. I made a PR for the test baselines. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,6 +38,15 @@ axom_add_component(COMPONENT_NAME klee DEFAULT_STATE ${AXOM_ENABLE_ALL_COMPONE | |
axom_add_component(COMPONENT_NAME quest DEFAULT_STATE ${AXOM_ENABLE_ALL_COMPONENTS}) | ||
axom_add_component(COMPONENT_NAME multimat DEFAULT_STATE ${AXOM_ENABLE_ALL_COMPONENTS}) | ||
|
||
# Add MIR if the prerequisites are found. | ||
if(RAJA_FOUND AND UMPIRE_FOUND AND CONDUIT_FOUND) | ||
axom_add_component(COMPONENT_NAME mir | ||
DEFAULT_STATE ${AXOM_ENABLE_ALL_COMPONENTS}) | ||
else() | ||
message(STATUS "Axom Component MIR turned off due to missing RAJA, UMPIRE, or Conduit.") | ||
set(AXOM_ENABLE_MIR OFF CACHE BOOL "") | ||
endif() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is different than how we handle missing deps in other components. E.g. It might be a good idea to revisit that choice, but I think we should be consistent across the components. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @kennyweiss - I am making a change to add mir always via axom_add_component. It does fail during configuration when requirements such as RAJA or Conduit are not present. That's what we want. Unfortunately, that makes host-configs such as [email protected] fail to build Axom. That feels like a step backwards. In cases like that, I'm planning to add an explicit There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oops. That host-config is just something I have locally. If there is a versioned host-config that lacks MIR required libraries, the plan is to add There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I ended up adding MIR always (in the style of other components) and then adjusted a few CI builds so they pass -DAXOM_ENABLE_MIR:BOOL=OFF if they lack the required tpls. |
||
|
||
install(TARGETS ${AXOM_COMPONENTS_ENABLED} | ||
EXPORT axom-targets | ||
DESTINATION lib) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,8 @@ | |
#include "axom/core/Macros.hpp" // for axom macros | ||
#include "axom/core/Types.hpp" // for axom types | ||
|
||
#include <iostream> | ||
|
||
namespace axom | ||
{ | ||
/*! | ||
|
@@ -27,6 +29,14 @@ namespace axom | |
template <typename T, int N> | ||
struct StackArray | ||
{ | ||
using value_type = T; | ||
|
||
/*! | ||
* \brief Return size of the array. | ||
*/ | ||
AXOM_HOST_DEVICE | ||
constexpr static int size() { return N; } | ||
|
||
/*! | ||
* \brief Accessor, returns a reference to the value at the given index. | ||
* | ||
|
@@ -55,6 +65,9 @@ struct StackArray | |
AXOM_HOST_DEVICE | ||
constexpr operator const T*() const noexcept { return &m_data[0]; } | ||
|
||
AXOM_HOST_DEVICE T* data() noexcept { return &m_data[0]; } | ||
AXOM_HOST_DEVICE const T* data() const noexcept { return &m_data[0]; } | ||
Comment on lines
+68
to
+69
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since these have the same return type/value as Should the |
||
|
||
/// @} | ||
|
||
/*! | ||
|
@@ -135,6 +148,28 @@ AXOM_HOST_DEVICE bool operator<(const StackArray<T, N>& lhs, | |
return false; | ||
} | ||
|
||
/** | ||
* \brief Print the StackArray to a stream. | ||
* \param os The stream to use. | ||
* \param obj The StackArray to print. | ||
* \return The input stream. | ||
*/ | ||
template <typename T, int N> | ||
std::ostream& operator<<(std::ostream& os, const StackArray<T, N>& obj) | ||
{ | ||
os << "("; | ||
for(int i = 0; i < N; i++) | ||
{ | ||
if(i > 0) | ||
{ | ||
os << ", "; | ||
} | ||
os << obj.m_data[i]; | ||
} | ||
os << ")"; | ||
return os; | ||
} | ||
|
||
} /* namespace axom */ | ||
|
||
#endif /* AXOM_STACKARRAY_HPP_ */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍