Skip to content

Commit 2c829dd

Browse files
committed
use Resource_Lock instead of Run_Serial to run in parallel better
1 parent 5086776 commit 2c829dd

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

coarray/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ add_executable(coarray_hello helloworld.f90)
3737
target_link_libraries(coarray_hello PRIVATE Coarray::Coarray)
3838
add_test(NAME coarray:Hello
3939
COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} $<TARGET_FILE:coarray_hello>)
40-
set_tests_properties(coarray:Hello PROPERTIES RUN_SERIAL TRUE)
40+
set_tests_properties(coarray:Hello PROPERTIES RESOURCE_LOCK cpu_mpi)
4141

4242

4343
add_executable(coarray_pi pi.f90)
4444
target_link_libraries(coarray_pi PRIVATE Coarray::Coarray)
4545
add_test(NAME coarray:pi_sum
4646
COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} $<TARGET_FILE:coarray_pi>)
47-
set_tests_properties(coarray:pi_sum PROPERTIES RUN_SERIAL TRUE)
47+
set_tests_properties(coarray:pi_sum PROPERTIES RESOURCE_LOCK cpu_mpi)

mpi/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ target_link_libraries(mpi_hello MPI::MPI_Fortran)
2121
add_test(NAME mpi:hello
2222
COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS}
2323
${MPIEXEC_PREFLAGS} $<TARGET_FILE:mpi_hello> ${MPIEXEC_POSTFLAGS})
24-
set_tests_properties(mpi:hello PROPERTIES RUN_SERIAL true)
24+
set_tests_properties(mpi:hello PROPERTIES RESOURCE_LOCK cpu_mpi)
2525

2626
add_executable(mpi_pass thread_pass.f90)
2727
target_link_libraries(mpi_pass MPI::MPI_Fortran)
@@ -30,5 +30,5 @@ if(MPIEXEC_MAX_NUMPROCS GREATER_EQUAL 2)
3030
add_test(NAME mpi:pass
3131
COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS}
3232
${MPIEXEC_PREFLAGS} $<TARGET_FILE:mpi_pass> ${MPIEXEC_POSTFLAGS})
33-
set_tests_properties(mpi:pass PROPERTIES RUN_SERIAL true)
33+
set_tests_properties(mpi:pass PROPERTIES RESOURCE_LOCK cpu_mpi)
3434
endif()

openmp/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,3 @@ endif()
2323
add_executable(timeprec timeprec.f90)
2424
target_link_libraries(timeprec PRIVATE OpenMP::OpenMP_Fortran)
2525
add_test(NAME "OpenMP:TimeMeasure" COMMAND timeprec)
26-
set_tests_properties(OpenMP:TimeMeasure PROPERTIES RUN_SERIAL true)

0 commit comments

Comments
 (0)