-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
23 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,32 @@ | ||
set_property(DIRECTORY PROPERTY LABELS "scalapack;unit") | ||
|
||
add_executable(test_blacs blacs_helloworld.f90) | ||
target_link_libraries(test_blacs PRIVATE blacs MPI::MPI_Fortran) | ||
add_test(NAME scalapack_blacs | ||
COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} 2 $<TARGET_FILE:test_blacs> | ||
) | ||
add_executable(scalapack_blacs blacs_helloworld.f90) | ||
target_link_libraries(scalapack_blacs PRIVATE blacs MPI::MPI_Fortran) | ||
add_test(NAME scalapack_blacs COMMAND scalapack_blacs) | ||
set_property(TEST scalapack_blacs PROPERTY LABELS blacs) | ||
|
||
if(BUILD_DOUBLE) | ||
add_executable(test_scalapack_d test_scalapack_d.f90) | ||
target_link_libraries(test_scalapack_d PRIVATE SCALAPACK::SCALAPACK) | ||
add_executable(scalapack_real64 test_scalapack_d.f90) | ||
target_link_libraries(scalapack_real64 PRIVATE SCALAPACK::SCALAPACK) | ||
|
||
add_test(NAME scalapack_real64 | ||
COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} 2 $<TARGET_FILE:test_scalapack_d> | ||
) | ||
add_test(NAME scalapack_real64 COMMAND scalapack_real64) | ||
endif() | ||
|
||
cmake_host_system_information(RESULT Ncpu QUERY NUMBER_OF_PHYSICAL_CORES) | ||
if(Ncpu LESS 2) | ||
set(less2 true) | ||
endif() | ||
message(STATUS "Number of physical cores: ${Ncpu}") | ||
|
||
|
||
get_property(test_names DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY TESTS) | ||
|
||
set_property(TEST ${test_names} PROPERTY TIMEOUT 15) | ||
set_property(TEST ${test_names} PROPERTY PROCESSORS 2) | ||
set_property(TEST ${test_names} PROPERTY DISABLED $<BOOL:${less2}>) | ||
set(_p ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${Ncpu}) | ||
|
||
foreach(t IN LISTS test_names) | ||
|
||
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.29) | ||
set_property(TARGET ${t} PROPERTY TEST_LAUNCHER ${_p}) | ||
else() | ||
set_property(TARGET ${t} PROPERTY CROSSCOMPILING_EMULATOR ${_p}) | ||
endif() | ||
|
||
set_property(TEST ${t} PROPERTY PROCESSORS ${Ncpu}) | ||
endforeach() | ||
|
||
set_tests_properties(${test_names} PROPERTIES TIMEOUT 15) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters