From 8cf157b24a07d3e714392518f5efc3c2e417d396 Mon Sep 17 00:00:00 2001 From: Joe Wallwork Date: Tue, 13 Jan 2026 16:43:03 +0000 Subject: [PATCH] Change ReadDiagnostic test to use 3 ranks --- core/test/CMakeLists.txt | 12 ++++++------ core/test/XiosReadDiagnostic_test.cpp | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core/test/CMakeLists.txt b/core/test/CMakeLists.txt index 8fc98d746..b37b2cd03 100644 --- a/core/test/CMakeLists.txt +++ b/core/test/CMakeLists.txt @@ -233,21 +233,21 @@ if(ENABLE_MPI) ) target_link_libraries(testXiosReadForcing_MPI2 PRIVATE nextsimlib doctest::doctest) - add_executable(testXiosReadDiagnostic_MPI2 "XiosReadDiagnostic_test.cpp" "MainMPI.cpp") - target_compile_definitions(testXiosReadDiagnostic_MPI2 + add_executable(testXiosReadDiagnostic_MPI3 "XiosReadDiagnostic_test.cpp" "MainMPI.cpp") + target_compile_definitions(testXiosReadDiagnostic_MPI3 PRIVATE USE_XIOS TEST_FILES_DIR=\"${CMAKE_CURRENT_BINARY_DIR}\" ) target_include_directories( - testXiosReadDiagnostic_MPI2 + testXiosReadDiagnostic_MPI3 PRIVATE ${PHYSICS_INCLUDE_DIRS} "${MODEL_INCLUDE_DIR}" "${XIOS_INCLUDE_LIST}" "${ModulesRoot}/StructureModule" ) - target_link_libraries(testXiosReadDiagnostic_MPI2 PRIVATE nextsimlib doctest::doctest) + target_link_libraries(testXiosReadDiagnostic_MPI3 PRIVATE nextsimlib doctest::doctest) add_executable(testXiosReadRestart_MPI2 "XiosReadRestart_test.cpp" "MainMPI.cpp") target_compile_definitions(testXiosReadRestart_MPI2 @@ -302,7 +302,7 @@ if(ENABLE_MPI) testXiosAxis_MPI3 testXiosField_MPI3 testXiosReadForcing_MPI2 - testXiosReadDiagnostic_MPI2 + testXiosReadDiagnostic_MPI3 testXiosReadRestart_MPI2 testXiosWriteDiagnostic_MPI2 testXiosWriteRestart_MPI2 @@ -312,7 +312,7 @@ if(ENABLE_MPI) # Ensure XiosWrite_test are run before XiosRead_test set_tests_properties(testXiosReadRestart_MPI2 PROPERTIES DEPENDS testXiosWriteRestart_MPI2) - set_tests_properties(testXiosReadDiagnostic_MPI2 + set_tests_properties(testXiosReadDiagnostic_MPI3 PROPERTIES DEPENDS testXiosWriteDiagnostic_MPI2) else() add_executable(testHaloExchangeCB_MPI3 diff --git a/core/test/XiosReadDiagnostic_test.cpp b/core/test/XiosReadDiagnostic_test.cpp index 7c4658d86..d3a0e4116 100644 --- a/core/test/XiosReadDiagnostic_test.cpp +++ b/core/test/XiosReadDiagnostic_test.cpp @@ -34,7 +34,7 @@ namespace Nextsim { * 2. Test the file writing functionality via `writeDiagnosticTime` in the sense of checking that * time-averaging is applied. */ -MPI_TEST_CASE("TestXiosReadDiagnostic", 2) +MPI_TEST_CASE("TestXiosReadDiagnostic", 3) { std::stringstream config; config << "[model]" << std::endl; @@ -43,7 +43,7 @@ MPI_TEST_CASE("TestXiosReadDiagnostic", 2) config << "time_step = P0-0T01:30:00" << std::endl; config << "init_file = " << diagnosticFilename << std::endl; config << "restart_period = P0-0T03:00:00" << std::endl; - config << "partition_file = xios_test_partition_metadata_2.nc" << std::endl; + config << "partition_file = xios_test_partition_metadata_3.nc" << std::endl; config << "[XiosInput]" << std::endl; config << "field_names = " << hsnowName << std::endl; config << "period = P0-0T03:00:00" << std::endl;