Skip to content
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

Open
wants to merge 323 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
323 commits
Select commit Hold shift + click to select a range
b4662ca
rename
BradWhitlock Jul 2, 2024
2f401a7
compilation fixes
BradWhitlock Jul 2, 2024
58340e4
rename
BradWhitlock Jul 2, 2024
63a0b9a
StridedStructuredIndexing test
BradWhitlock Jul 2, 2024
e7b3e25
Create clip table in mir algorithm.
BradWhitlock Jul 3, 2024
c553f30
starting to add some matset view code to mir algorithm
BradWhitlock Jul 3, 2024
32486b7
refactoring
BradWhitlock Jul 4, 2024
911aa6c
progress adapting clipfield
BradWhitlock Jul 11, 2024
74bc4ee
Moved functions to BitUtilities
BradWhitlock Jul 12, 2024
5b82731
Added some operators to Point.
BradWhitlock Jul 12, 2024
9f3fe77
Changed some edges
BradWhitlock Jul 12, 2024
1959dd7
accumulation_traits
BradWhitlock Jul 12, 2024
bdc5833
cpp2conduit
BradWhitlock Jul 12, 2024
426d97c
blender/slicer classes
BradWhitlock Jul 12, 2024
d947251
Refactor clip table. Move CLipField out to its own.
BradWhitlock Jul 12, 2024
fe3fc56
Fix static_assert
BradWhitlock Jul 12, 2024
52d03ef
Fix compilation
BradWhitlock Jul 12, 2024
9a92055
Fixing some compilation errors
BradWhitlock Jul 13, 2024
6deefe6
Tests for bit utilities
BradWhitlock Jul 15, 2024
4d573b9
starting to add a test
BradWhitlock Jul 15, 2024
154ec49
Add mit to axom-config.cmake.in
BradWhitlock Jul 15, 2024
9b143d1
Compilation fixes
BradWhitlock Jul 16, 2024
a2fa467
Change accessing edges
BradWhitlock Jul 16, 2024
0930c1c
Fixed some coordset views. Added distance field
BradWhitlock Jul 16, 2024
fc240cb
SLIC errors
BradWhitlock Jul 16, 2024
eefee2b
Fix bit functions
BradWhitlock Jul 17, 2024
6af4fa2
Added mechanism for Conduit to allocate through Axom.
BradWhitlock Jul 17, 2024
7f0d095
Added mechanism for making Conduit allocate through Axom. Fixed a few…
BradWhitlock Jul 17, 2024
719329b
Debugging ClipField
BradWhitlock Jul 18, 2024
72d3240
Populate slice data so we can map element fields to new mesh
BradWhitlock Jul 19, 2024
7b293b0
Added ClipOptions
BradWhitlock Jul 20, 2024
a5ff0ac
More testing
BradWhitlock Jul 22, 2024
07bdecf
templated
BradWhitlock Jul 22, 2024
395c37c
Changes that let ClipField run on GPU with HIP
BradWhitlock Jul 23, 2024
24a78d5
Initial mixed topo support
BradWhitlock Jul 24, 2024
41e6a46
Try out the mixed shape view
BradWhitlock Jul 24, 2024
4ba2c84
Some cleanup/refactoring
BradWhitlock Jul 24, 2024
6ff5327
code cleanup
BradWhitlock Jul 25, 2024
721e970
Adjust 3D shapes
BradWhitlock Jul 25, 2024
6db7e4b
debugging
BradWhitlock Jul 26, 2024
39b3e33
Some refactoring to see if that helps for debugging.
BradWhitlock Jul 27, 2024
8cd51b2
wedge is bad too
BradWhitlock Jul 27, 2024
acf1ac2
Added a test for explicit coordset view
BradWhitlock Jul 29, 2024
5331c0a
Fix typo
BradWhitlock Jul 29, 2024
b46d992
Fixed a clip bug from incorrect shape traversal
BradWhitlock Jul 29, 2024
40152ce
Fixed wedge edges
BradWhitlock Jul 30, 2024
43d9c47
Fixes for wedge clip
BradWhitlock Jul 30, 2024
e8c8474
start trying to work around OMP issue
BradWhitlock Jul 30, 2024
2f39c3e
Broke ClipField::execute into methods.
BradWhitlock Jul 30, 2024
a7d9e1e
code cleanup
BradWhitlock Jul 30, 2024
dd75375
Attempts to work around OMP problems.
BradWhitlock Jul 31, 2024
41dd065
Debug prints, etc
BradWhitlock Jul 31, 2024
e817b07
Changed conduit memory allocation. Fix view usage in one place.
BradWhitlock Jul 31, 2024
18f3026
Debugging
BradWhitlock Aug 1, 2024
5634141
Fix for HIP
BradWhitlock Aug 1, 2024
3418c07
Always use wrapped scan
BradWhitlock Aug 1, 2024
f45ebb7
Disable formatting in some borrowed data tables
BradWhitlock Aug 1, 2024
5fd8a62
clang-format is the worst! clang-ugly is more like it.
BradWhitlock Aug 1, 2024
e5dd66d
Move some name generation to NamingPolicy.
BradWhitlock Aug 1, 2024
7ece514
make style
BradWhitlock Aug 1, 2024
d85270f
A test for a mixed mesh
BradWhitlock Aug 1, 2024
b3ce4e0
make style
BradWhitlock Aug 1, 2024
d9150f3
Moved methods for better linking
BradWhitlock Aug 1, 2024
7b981ce
Better VTK file saving
BradWhitlock Aug 1, 2024
c7f50f3
save/load/compare baselines
BradWhitlock Aug 1, 2024
1e73a44
make style
BradWhitlock Aug 1, 2024
1a5a120
Added tests for rectilinear clipping
BradWhitlock Aug 1, 2024
eabf434
Moved some functions into a header.
BradWhitlock Aug 2, 2024
bbfb600
More consistent naming, make some view creation functions.
BradWhitlock Aug 2, 2024
4e9b17c
make style
BradWhitlock Aug 2, 2024
23aa1f7
progress on strided structured
BradWhitlock Aug 3, 2024
817fc1d
Improvements for strided structured.
BradWhitlock Aug 6, 2024
1bf8fcd
Improved strided structure support
BradWhitlock Aug 7, 2024
21fc10d
make style
BradWhitlock Aug 7, 2024
1dd88a4
Try selecting a few zones. Remove a method from views.
BradWhitlock Aug 7, 2024
11c0135
make style
BradWhitlock Aug 7, 2024
90ab9c2
fix macro
BradWhitlock Aug 7, 2024
15fdbf5
Fix types
BradWhitlock Aug 7, 2024
a5cfcc8
fix recenter
BradWhitlock Aug 7, 2024
4d0addd
Fixes
BradWhitlock Aug 7, 2024
6a78310
Adding ClipFieldFilter
BradWhitlock Aug 7, 2024
2069e10
Cut down code size
BradWhitlock Aug 7, 2024
7c5eb91
make style
BradWhitlock Aug 7, 2024
64c6024
Combined some structured topo dispatch
BradWhitlock Aug 8, 2024
60bd3cd
make style
BradWhitlock Aug 8, 2024
5c51478
Separate out options
BradWhitlock Aug 8, 2024
b708890
Separate some code
BradWhitlock Aug 8, 2024
35616f2
make style
BradWhitlock Aug 8, 2024
0207e14
Changed how options work, separated out selected zones. Starting a MI…
BradWhitlock Aug 9, 2024
84d3514
in progress
BradWhitlock Aug 9, 2024
642a218
Fixes for a matset view
BradWhitlock Aug 9, 2024
06e3eb9
make style
BradWhitlock Aug 9, 2024
db64fac
wrote a test for NodeToZoneRelationBuilder.
BradWhitlock Aug 10, 2024
284f9e2
make style
BradWhitlock Aug 10, 2024
e143dc8
Fix for NodetoZoneRelationBuilder tests
BradWhitlock Aug 12, 2024
52ec6fe
Changed namespace
BradWhitlock Aug 12, 2024
c294717
moved some tests
BradWhitlock Aug 12, 2024
47c55bf
Added test for RecenterField
BradWhitlock Aug 12, 2024
3d12af0
make style
BradWhitlock Aug 12, 2024
087b33b
Working on a MIR algorithm
BradWhitlock Aug 13, 2024
ebe2c46
Debugging MIR
BradWhitlock Aug 13, 2024
4f8e359
MIR improvements. Started some new helper classes that can replace pa…
BradWhitlock Aug 14, 2024
09dfb43
Abstract out Intersector code from ClipField so I can template on an …
BradWhitlock Aug 14, 2024
c8d84c6
make style
BradWhitlock Aug 14, 2024
b71a743
MIR improvements
BradWhitlock Aug 14, 2024
68f9b3f
debugging
BradWhitlock Aug 15, 2024
dfff7dc
MIR checkpoint - switching machines
BradWhitlock Aug 16, 2024
b0c9a5b
progress but not quite right
BradWhitlock Aug 19, 2024
389cb1b
Better result
BradWhitlock Aug 19, 2024
c9c5ee8
code cleanup
BradWhitlock Aug 20, 2024
b0dc1a8
make style
BradWhitlock Aug 20, 2024
44e75d4
Added timers
BradWhitlock Aug 20, 2024
d645a4f
Replaced timer with annotation so it will instead use Caliper.
BradWhitlock Aug 20, 2024
61e0ec0
make style
BradWhitlock Aug 20, 2024
393fe77
Minor fixes
BradWhitlock Aug 22, 2024
189b3c3
code cleanup
BradWhitlock Aug 22, 2024
aa51d5a
I renumbered clipping table symbol values to reduce the size of a sta…
BradWhitlock Aug 23, 2024
ac4aea5
make style
BradWhitlock Aug 23, 2024
e82a13e
Added more timers, some code renaming
BradWhitlock Aug 23, 2024
4b863be
porting MeshTester.
BradWhitlock Aug 24, 2024
f29c26f
Emit edge points using endpoint ids in blend groups if close to start…
BradWhitlock Aug 27, 2024
e2ab64e
make style
BradWhitlock Aug 27, 2024
0249309
Add degenerate zone filtering. Enable multiple policies in concentric…
BradWhitlock Aug 29, 2024
da2d547
make style
BradWhitlock Aug 29, 2024
f58b7bc
More timings
BradWhitlock Aug 29, 2024
4d86bb4
Sorting
BradWhitlock Aug 29, 2024
5b74ac2
timers
BradWhitlock Aug 29, 2024
3c319fc
Change to naming policy - could be faster in 3D
BradWhitlock Aug 30, 2024
28493fa
make style
BradWhitlock Aug 30, 2024
2fbe418
Changes to unique and n2z relation builder.
BradWhitlock Sep 3, 2024
45415b2
make style
BradWhitlock Sep 3, 2024
b8d3c1c
Some speedup for serial NodeToZoneRelationBuilder.
BradWhitlock Sep 4, 2024
85b6dc4
Skip a little work with 1 blend value.
BradWhitlock Sep 5, 2024
3ee18ae
Start of algorithm change to reduce blend group count. Not enabled ri…
BradWhitlock Sep 6, 2024
1bfbd24
make style
BradWhitlock Sep 6, 2024
064588e
Adding some new components for slicing matsets and extracting zones f…
BradWhitlock Sep 10, 2024
79144cc
Added some tests
BradWhitlock Sep 10, 2024
bd8fe95
Added more tests, other improvements.
BradWhitlock Sep 11, 2024
28f3c8a
Changed ZoneListBuilder to atomics instead of requiring node to zone …
BradWhitlock Sep 11, 2024
449f16a
Added selected zones to zone list builder.
BradWhitlock Sep 11, 2024
00b5305
make style
BradWhitlock Sep 11, 2024
98fcf66
Fixed problem in ClipField
BradWhitlock Sep 12, 2024
17ec665
Reset node
BradWhitlock Sep 12, 2024
4f43bbe
Added test for selecting zones in clipfield
BradWhitlock Sep 12, 2024
5a0a8ec
Fixed some tests on HIP
BradWhitlock Sep 13, 2024
d86f2f2
Updated data
BradWhitlock Sep 13, 2024
6250b37
Broken topo merging - WIP
BradWhitlock Sep 14, 2024
d237448
Add Ninja
BradWhitlock Sep 17, 2024
c8c00c4
Progress on MergeMeshes
BradWhitlock Sep 17, 2024
6b3468b
Progress on MergeMeshes
BradWhitlock Sep 18, 2024
c1f6fba
Merge is working for coordsets/topo.
BradWhitlock Sep 19, 2024
954df19
Fixed bug in NodeArrayView.
BradWhitlock Sep 19, 2024
3b91266
Added a test
BradWhitlock Sep 19, 2024
fb7ff8b
Initial stab at merging fields.
BradWhitlock Sep 19, 2024
0cae1d2
Added material merging in MergeMeshes.
BradWhitlock Sep 20, 2024
2225bf5
Fix timers
BradWhitlock Sep 20, 2024
debe458
make style
BradWhitlock Sep 20, 2024
e52d1bd
More timings
BradWhitlock Sep 20, 2024
b6325e0
Merged develop to branch
BradWhitlock Sep 20, 2024
e25cf83
remove warning
BradWhitlock Sep 20, 2024
99596ff
Fix build
BradWhitlock Sep 20, 2024
d6ea691
Some progress on adjusting for CUDA
BradWhitlock Sep 21, 2024
0a1d705
Changed comment format
BradWhitlock Sep 21, 2024
ef1fb76
possible CUDA solution
BradWhitlock Sep 21, 2024
1a6c6df
Progress on nvcc compatibility.
BradWhitlock Sep 24, 2024
e5bc818
nvcc compatibility
BradWhitlock Sep 24, 2024
8340505
nvcc progress
BradWhitlock Sep 24, 2024
27ecc84
nvcc progress
BradWhitlock Sep 24, 2024
9409974
testing fixes
BradWhitlock Sep 25, 2024
cef6203
Added a note in the docs.
BradWhitlock Sep 25, 2024
c723789
good changes
BradWhitlock Sep 26, 2024
d9a3595
GPU porting doc
BradWhitlock Sep 26, 2024
cf8b987
Added test for MakeUnstructured
BradWhitlock Sep 26, 2024
fc5763a
Adding zone function to topology views. Removing some c++17.
BradWhitlock Sep 27, 2024
4f8e751
Added getAllocatorIDForAddress
BradWhitlock Sep 27, 2024
c216e1d
Added StackArray::data method.
BradWhitlock Sep 27, 2024
95517c9
nvcc compatibility changes
BradWhitlock Sep 28, 2024
7f19ba7
Merged develop to branch.
BradWhitlock Sep 28, 2024
32e5f5e
Removed for_all_zones.
BradWhitlock Sep 28, 2024
583b3da
Removed for_all_zones from views.
BradWhitlock Sep 28, 2024
8e7fb09
make style
BradWhitlock Sep 28, 2024
6011470
Do not default construct on host if memory was device-allocated.
BradWhitlock Sep 29, 2024
ad20d9b
nvcc compatibility
BradWhitlock Sep 29, 2024
e976930
make style
BradWhitlock Sep 29, 2024
d5bfe00
Moved some files to future and removed from build.
BradWhitlock Sep 30, 2024
048eb1b
cleanup
BradWhitlock Sep 30, 2024
d935dad
fix warning
BradWhitlock Sep 30, 2024
49725ec
New GPU porting tips
BradWhitlock Sep 30, 2024
d3282af
Removed some old tests
BradWhitlock Sep 30, 2024
a147431
Added more GPU tips
BradWhitlock Sep 30, 2024
f459f3d
Array fixes
BradWhitlock Oct 1, 2024
aae8269
Removing some if constexpr
BradWhitlock Oct 1, 2024
ab2c73f
Working on docs
BradWhitlock Oct 1, 2024
c0b9e02
Removed empty file
BradWhitlock Oct 1, 2024
90a41ab
Remove more if constexpr
BradWhitlock Oct 1, 2024
6718215
Guard RAJA better
BradWhitlock Oct 1, 2024
2271300
fieldslicer test
BradWhitlock Oct 1, 2024
40eea7e
Added some docs
BradWhitlock Oct 2, 2024
524df5f
Added doc
BradWhitlock Oct 2, 2024
8f73ed0
More doc
BradWhitlock Oct 2, 2024
5429ff4
doc edits
BradWhitlock Oct 2, 2024
cb12815
Ported mir_tutorial_simple
BradWhitlock Oct 2, 2024
fc8626e
Merged from develop.
BradWhitlock Oct 2, 2024
bbc1e46
Fix 3D equiz test
BradWhitlock Oct 3, 2024
73f1307
Added ph topo view example in docs
BradWhitlock Oct 3, 2024
fd268ae
small fix
BradWhitlock Oct 3, 2024
40660ea
Move some files
BradWhitlock Oct 3, 2024
ac04c0d
Moved reference files
BradWhitlock Oct 3, 2024
54037c3
Moved files
BradWhitlock Oct 3, 2024
d7ef289
Moved files to clipping
BradWhitlock Oct 3, 2024
7d27fed
Moved files
BradWhitlock Oct 3, 2024
9a0aa0a
Split template instantiation up in concentric_circles example
BradWhitlock Oct 3, 2024
f637473
make style
BradWhitlock Oct 3, 2024
e03b481
fix
BradWhitlock Oct 3, 2024
2f82aa3
Break up compilation into more files
BradWhitlock Oct 3, 2024
5e780a1
Split tests into more files
BradWhitlock Oct 3, 2024
9f9bbdc
Removed reference mesh generation routines from MeshTester
BradWhitlock Oct 3, 2024
e864ec1
CUDA fixes. Doc fixes.
BradWhitlock Oct 3, 2024
bdcc302
make style
BradWhitlock Oct 3, 2024
233b0fe
Small doc correction.
BradWhitlock Oct 3, 2024
83a7ec6
Fix build and warnings for no-RAJA case.
BradWhitlock Oct 3, 2024
2433ca6
Warnings. Fix some int/IndexType usage. Loosen equiz_3d tolerance a l…
BradWhitlock Oct 4, 2024
03d00d0
Code changes
BradWhitlock Oct 4, 2024
259b8df
make style on rzwhippet
BradWhitlock Oct 4, 2024
98f9c0b
Merge branch 'develop' into feature/whitlock/mir_update
BradWhitlock Oct 7, 2024
409e95b
Typos
BradWhitlock Oct 7, 2024
e894e7a
Merge branch 'feature/whitlock/mir_update' of github.com:LLNL/axom in…
BradWhitlock Oct 7, 2024
a1386ed
typos
BradWhitlock Oct 7, 2024
9bbf830
Remove TODO.txt
BradWhitlock Oct 7, 2024
204b181
Try dynamically setting parallel make -j argument.
BradWhitlock Oct 9, 2024
70b0d7d
Adjust dynamic make -j
BradWhitlock Oct 9, 2024
bdb101b
Merge branch 'develop' into feature/whitlock/mir_update
BradWhitlock Oct 9, 2024
2e5aa10
gcc, intel compatibility
BradWhitlock Oct 9, 2024
eb54313
Merge branch 'feature/whitlock/mir_update' of github.com:LLNL/axom in…
BradWhitlock Oct 9, 2024
4abba0a
Increase job time allocation for lassen and ruby.
BradWhitlock Oct 14, 2024
2c672da
Merge branch 'develop' into feature/whitlock/mir_update
BradWhitlock Oct 14, 2024
a254953
Fix comment
BradWhitlock Oct 14, 2024
125700f
Merge branch 'develop' into feature/whitlock/mir_update
BradWhitlock Oct 22, 2024
4cbcfb9
Incorporate some doc suggestions/fixes.
BradWhitlock Oct 22, 2024
ade297e
Included more doc suggestions/fixes.
BradWhitlock Oct 22, 2024
c8d7ebd
Doc fix
BradWhitlock Oct 22, 2024
bc06320
Doc change.
BradWhitlock Oct 31, 2024
d6498bf
Use popcount function and remove countBits.
BradWhitlock Oct 31, 2024
6165c35
Always add mir component.
BradWhitlock Nov 1, 2024
cc23482
Try turning off MIR in some CI builds where dependencies are not met.
BradWhitlock Nov 1, 2024
cd3a9c7
Remove explicit umpire dependency in mir.
BradWhitlock Nov 1, 2024
6e8bbf8
Change some when some using declarations are made so it should work w…
BradWhitlock Nov 1, 2024
d848ea9
Merge branch 'develop' into feature/whitlock/mir_update
BradWhitlock Nov 1, 2024
cf008dc
Updated data directory to main.
BradWhitlock Nov 4, 2024
9a0f9c2
Merged develop into branch.
BradWhitlock Nov 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitlab/build_lassen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
# Template
.src_build_on_lassen:
variables:
ALLOC_TIME: "25"
ALLOC_TIME: "35"
extends: [.src_build_script, .on_lassen, .src_workflow]
needs: []

.full_build_on_lassen:
variables:
ALLOC_TIME: "45"
ALLOC_TIME: "60"
extends: [.full_build_script, .on_lassen, .full_workflow]
needs: []

Expand Down
4 changes: 2 additions & 2 deletions .gitlab/build_ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
# Template
.src_build_on_ruby:
variables:
ALLOC_TIME: "30"
ALLOC_TIME: "40"
extends: [.src_build_script, .on_ruby, .src_workflow]
needs: []

.full_build_on_ruby:
variables:
ALLOC_TIME: "60"
ALLOC_TIME: "70"
extends: [.full_build_script, .on_ruby, .full_workflow]
needs: []

Expand Down
7 changes: 7 additions & 0 deletions config-build.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ def parse_arguments():
help="Create an eclipse project file.",
)

parser.add_argument(
"-n", "--ninja", action="store_true", help="Create a Ninja project."
)

parser.add_argument(
"-x", "--xcode", action="store_true", help="Create an xcode project."
)
Expand Down Expand Up @@ -270,6 +274,9 @@ def create_cmake_command_line(
if args.eclipse:
cmakeline += ' -G "Eclipse CDT4 - Unix Makefiles"'

if args.ninja:
cmakeline += ' -G "Ninja"'

Comment on lines +277 to +279
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

if args.xcode:
cmakeline += ' -G "Xcode"'

Expand Down
2 changes: 1 addition & 1 deletion data
Copy link
Member

@kennyweiss kennyweiss Oct 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BradWhitlock -- Will there be an axom_data PR associated with this PR?

Copy link
Member Author

@BradWhitlock BradWhitlock Oct 31, 2024

Choose a reason for hiding this comment

The 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.

9 changes: 6 additions & 3 deletions scripts/azure-pipelines/linux-build_and_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,21 @@ export BUILD_TYPE=${BUILD_TYPE:-Debug}


if [[ "$DO_BUILD" == "yes" ]] ; then
echo "~~~~~~ FIND NUMPROCS ~~~~~~~~"
NUMPROCS=`python3 -c "import os; print(f'{os.cpu_count()}')"`
NUM_BUILD_PROCS=`python3 -c "import os; print(f'{max(2, os.cpu_count() * 8 // 10)}')"`
echo "~~~~~~ RUNNING CMAKE ~~~~~~~~"
or_die python3 ./config-build.py -hc /home/axom/axom/host-configs/docker/${HOST_CONFIG}.cmake -bt ${BUILD_TYPE} -DENABLE_GTEST_DEATH_TESTS=ON ${CMAKE_EXTRA_FLAGS}
or_die cd build-$HOST_CONFIG-${BUILD_TYPE,,}
echo "~~~~~~ BUILDING ~~~~~~~~"
if [[ ${CMAKE_EXTRA_FLAGS} == *COVERAGE* ]] ; then
or_die make -j 8
or_die make -j $NUM_BUILD_PROCS
else
or_die make -j 8 VERBOSE=1
or_die make -j $NUM_BUILD_PROCS VERBOSE=1
fi
if [[ "${DO_TEST}" == "yes" ]] ; then
echo "~~~~~~ RUNNING TESTS ~~~~~~~~"
make CTEST_OUTPUT_ON_FAILURE=1 test ARGS='-T Test -VV -j8'
make CTEST_OUTPUT_ON_FAILURE=1 test ARGS='-T Test -VV -j$NUM_BUILD_PROCS'
fi
if [[ "${DO_MEMCHECK}" == "yes" ]] ; then
echo "~~~~~~ RUNNING MEMCHECK ~~~~~~~~"
Expand Down
9 changes: 9 additions & 0 deletions src/axom/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Copy link
Member

Choose a reason for hiding this comment

The 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. sidre has a hard dependency on conduit (and inlet and klee depend on sidre), but we don't enforce this at the add_component level.

It might be a good idea to revisit that choice, but I think we should be consistent across the components.

Copy link
Member Author

Choose a reason for hiding this comment

The 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 set(AXOM_ENABLE_MIR FALSE CACHE BOOL "") so these host-configs continue to work. Any objections?

Copy link
Member Author

Choose a reason for hiding this comment

The 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 set(AXOM_ENABLE_MIR FALSE CACHE BOOL "").

Copy link
Member Author

Choose a reason for hiding this comment

The 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)
Expand Down
1 change: 1 addition & 0 deletions src/axom/config.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
#cmakedefine AXOM_USE_KLEE
#cmakedefine AXOM_USE_LUMBERJACK
#cmakedefine AXOM_USE_MINT
#cmakedefine AXOM_USE_MIR
#cmakedefine AXOM_USE_PRIMAL
#cmakedefine AXOM_USE_QUEST
#cmakedefine AXOM_USE_SIDRE
Expand Down
4 changes: 2 additions & 2 deletions src/axom/core/ArrayView.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class ArrayView : public ArrayBase<T, DIM, ArrayView<T, DIM, SPACE>>
typename... Args,
typename Enable = typename std::enable_if<
sizeof...(Args) == DIM && detail::all_types_are_integral<Args...>::value>::type>
ArrayView(T* data, Args... args);
AXOM_HOST_DEVICE ArrayView(T* data, Args... args);

/*!
* \brief Generic constructor for an ArrayView of arbitrary dimension with external data
Expand Down Expand Up @@ -232,7 +232,7 @@ using MCArrayView = ArrayView<T, 2>;
//------------------------------------------------------------------------------
template <typename T, int DIM, MemorySpace SPACE>
template <typename... Args, typename Enable>
ArrayView<T, DIM, SPACE>::ArrayView(T* data, Args... args)
AXOM_HOST_DEVICE ArrayView<T, DIM, SPACE>::ArrayView(T* data, Args... args)
: ArrayView(data,
StackArray<IndexType, DIM> {{static_cast<IndexType>(args)...}})
{
Expand Down
2 changes: 2 additions & 0 deletions src/axom/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ set(core_headers
utilities/CommandLineUtilities.hpp
utilities/FileUtilities.hpp
utilities/RAII.hpp
utilities/Sorting.hpp
utilities/StringUtilities.hpp
utilities/System.hpp
utilities/Timer.hpp
Expand Down Expand Up @@ -73,6 +74,7 @@ set(core_headers
execution/for_all.hpp
execution/nested_for_exec.hpp
execution/runtime_policy.hpp
execution/scans.hpp
execution/synchronize.hpp

execution/internal/seq_exec.hpp
Expand Down
35 changes: 35 additions & 0 deletions src/axom/core/StackArray.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#include "axom/core/Macros.hpp" // for axom macros
#include "axom/core/Types.hpp" // for axom types

#include <iostream>

namespace axom
{
/*!
Expand All @@ -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.
*
Expand Down Expand Up @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since these have the same return type/value as operator T*, I assume they're necessary for consistency w/ an expected interface

Should the const overload be marked as constexpr?


/// @}

/*!
Expand Down Expand Up @@ -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_ */
58 changes: 47 additions & 11 deletions src/axom/core/StaticArray.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ namespace axom
* \accelerated
* \class StaticArray
*
* \brief Provides a wrapper for a StackArray with an additional size member.
* \brief This class extends StackArray with some std::vector-like convenience methods.
*
*
* \tparam T the type of the values to hold.
* \tparam N the number of values in the array.
Expand All @@ -25,14 +26,27 @@ namespace axom
* execution.
*/
template <typename T, int N>
struct StaticArray : public StackArray<T, N>
class StaticArray : public StackArray<T, N>
{
public:
/*!
* \brief Returns the capacity of the static array
*
* \return The capacity of the static array
*/
AXOM_HOST_DEVICE
constexpr axom::IndexType capacity() const
{
return static_cast<axom::IndexType>(N);
}

/*!
* \brief Returns the size of the static array
*
* \return The size of the static array
*/
AXOM_HOST_DEVICE int size() const { return m_size; }
AXOM_HOST_DEVICE
axom::IndexType size() const { return m_size; }

/*!
* \brief Pushes an object to the back of the static array
Expand All @@ -45,29 +59,51 @@ struct StaticArray : public StackArray<T, N>
* \note If the static array is full, push_back
* will not modify the static array.
*/
AXOM_HOST_DEVICE void push_back(const T& obj)
AXOM_HOST_DEVICE
void push_back(const T &obj)
{
assert(m_size < N);
if(m_size < N)
assert(m_size < capacity());
if(m_size < capacity())
{
StackArray<T, N>::m_data[m_size++] = obj;
}
}

/*!
* \brief Pops the last element off the list.
*/
AXOM_HOST_DEVICE
void pop_back() { m_size = (m_size > 0) ? (m_size - 1) : 0; }

/*!
* \brief Clears the data from the static array
*/
AXOM_HOST_DEVICE void clear()
AXOM_HOST_DEVICE
void clear() { m_size = 0; }

/**
* \brief Determines whether the container is empty.
* \return True if empty, false otherwise.
*/
AXOM_HOST_DEVICE
bool empty() const { return m_size == 0; }

/*!
* \brief Fills the container with the supplied value.
*
* \param fill_value The fill value.
*/
AXOM_HOST_DEVICE
void fill(const T &fill_value)
{
for(T& datum : StackArray<T, N>::m_data)
for(T &datum : StackArray<T, N>::m_data)
{
datum = T();
datum = fill_value;
}
m_size = 0;
}

private:
int m_size {0};
axom::IndexType m_size {0};
};

} /* namespace axom */
Expand Down
Loading