Skip to content

Commit

Permalink
Add new hybrid MPI + OpenMP test program
Browse files Browse the repository at this point in the history
* Add a new test program for hybrid MPI + OpenMP settings
* test-thread program added to 'make test'

Signed-off-by: Guillaume Mercier <[email protected]>
  • Loading branch information
GuillaumeMercier authored Aug 22, 2022
1 parent a5db775 commit c7279d5
Show file tree
Hide file tree
Showing 3 changed files with 402 additions and 3 deletions.
28 changes: 28 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ add_executable(
test-hwloc.c
)

add_test(
threads
test-threads
)

if (OPENMP_FOUND)
target_link_libraries(
test-hwloc
Expand Down Expand Up @@ -144,6 +149,21 @@ if(MPI_FOUND)
test-mpi-getdev
quo-vadis-mpi
)
################" HYBRID TESTS #####################
####################################################
if(OPENMP_FOUND)
add_executable(
test-mpi-threads
test-mpi-threads.c
)

target_link_libraries(
test-mpi-threads
quo-vadis
quo-vadis-mpi
OpenMP::OpenMP_C
)
endif()
endif()

if (OPENMP_FOUND)
Expand Down Expand Up @@ -270,10 +290,18 @@ set_target_properties(
test-mpi-scopes
PROPERTIES LINKER_LANGUAGE C
)

if (OPENMP_FOUND)
set_target_properties(
test-mpi-threads
PROPERTIES LINKER_LANGUAGE C
)
endif()
endif()

# Set test timeout
set_tests_properties(
threads
hwloc
rmi
scopes
Expand Down
Loading

0 comments on commit c7279d5

Please sign in to comment.