Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion scripts/spack/configs/versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ packages:
- spec: "@2.26.0"
mfem:
require:
- spec: "@4.8.0.1"
- spec: "@4.9.0"
petsc:
require:
- spec: "@3.21.6"
Expand Down
45 changes: 45 additions & 0 deletions src/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,51 @@ foreach( test ${tribol_tests} )

endforeach()

#------------------------------------------------------------------------------
# Add MPI tests
#------------------------------------------------------------------------------
if ( TRIBOL_USE_MPI )

set( mpi_tests
tribol_par_sparse_mat.cpp
)

set(mpi_test_depends tribol gtest)

foreach( test ${mpi_tests} )

get_filename_component( test_name ${test} NAME_WE )

blt_add_executable(
NAME ${test_name}_test
SOURCES ${test}
OUTPUT_DIR ${TEST_OUTPUT_DIRECTORY}
DEPENDS_ON ${mpi_test_depends} ${tribol_device_depends}
FOLDER tribol/tests )

blt_add_test( NAME ${test_name}
COMMAND ${test_name}_test
NUM_MPI_TASKS 2 )

if (ENABLE_CUDA)
set_target_properties(${test_name}_test PROPERTIES CUDA_SEPARABLE_COMPILATION On)
endif()

if (ENABLE_HIP)
target_compile_options(${test_name}_test PRIVATE -fgpu-rdc)
target_compile_options(${test_name}_test PRIVATE
$<$<CONFIG:Debug>:
-ggdb
>
)
target_link_options(${test_name}_test PRIVATE -fgpu-rdc)
target_link_options(${test_name}_test PRIVATE --hip-link)
endif()

endforeach()

endif()

#------------------------------------------------------------------------------
# Add redecomp tests
#------------------------------------------------------------------------------
Expand Down
Loading
Loading