From bca0faf8869eeb48e63385f29a3eab1aae885ef5 Mon Sep 17 00:00:00 2001 From: George Gayno Date: Fri, 16 Apr 2021 19:35:02 +0000 Subject: [PATCH] Convert search util test to mpi. Fixes #279. --- tests/chgres_cube/CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/chgres_cube/CMakeLists.txt b/tests/chgres_cube/CMakeLists.txt index ad34362b0..53ec10879 100644 --- a/tests/chgres_cube/CMakeLists.txt +++ b/tests/chgres_cube/CMakeLists.txt @@ -80,7 +80,6 @@ add_mpi_test(ftst_program_setup add_executable(ftst_search_util "${CMAKE_SOURCE_DIR}/sorc/chgres_cube.fd/search_util.F90" ftst_search_util.F90) -add_test(NAME ftst_search_util COMMAND ftst_search_util) target_link_libraries( ftst_search_util esmf @@ -88,3 +87,10 @@ target_link_libraries( if(OpenMP_Fortran_FOUND) target_link_libraries(ftst_search_util OpenMP::OpenMP_Fortran) endif() + +# Cause test to be run with MPI. The search routine was +# written to work on a single task. So set NUMPROCS to 1. +add_mpi_test(ftst_search_util + EXECUTABLE ${CMAKE_CURRENT_BINARY_DIR}/ftst_search_util + NUMPROCS 1 + TIMEOUT 60)