From 306f8e954dc3301929f15ebeff1d508ed6d37dff Mon Sep 17 00:00:00 2001 From: Joe Wallwork Date: Tue, 10 Dec 2024 10:48:44 +0000 Subject: [PATCH] Revert minor changes --- core/src/StructureFactory.cpp | 5 +- core/src/include/ParaGridIO.hpp | 2 +- core/test/CMakeLists.txt | 81 +++++++++---------- core/test/ParaGrid_test.cpp | 7 +- core/test/XiosReadWrite_test.cpp | 2 +- .../ERA5Atmosphere.cpp | 2 +- .../OceanBoundaryModule/TOPAZOcean.cpp | 4 +- 7 files changed, 51 insertions(+), 52 deletions(-) diff --git a/core/src/StructureFactory.cpp b/core/src/StructureFactory.cpp index f41b95441..fb893e796 100644 --- a/core/src/StructureFactory.cpp +++ b/core/src/StructureFactory.cpp @@ -1,7 +1,7 @@ /*! * @file StructureFactory.cpp * - * @date 10 Dec 2024 + * @date Jan 18, 2022 * @author Tim Spain * @author Kacper Kornet */ @@ -12,9 +12,10 @@ #include "include/IStructure.hpp" #include "include/NextsimModule.hpp" -#include "include/ParaGridIO.hpp" #include "include/RectGridIO.hpp" +#include "include/ParaGridIO.hpp" + #include #include #include diff --git a/core/src/include/ParaGridIO.hpp b/core/src/include/ParaGridIO.hpp index 89fc4ec02..34e803b24 100644 --- a/core/src/include/ParaGridIO.hpp +++ b/core/src/include/ParaGridIO.hpp @@ -1,7 +1,7 @@ /*! * @file ParaGridIO.hpp * - * @date 10 Dec 2024 + * @date Oct 24, 2022 * @author Tim Spain */ diff --git a/core/test/CMakeLists.txt b/core/test/CMakeLists.txt index e43f5199e..ed8e02992 100644 --- a/core/test/CMakeLists.txt +++ b/core/test/CMakeLists.txt @@ -38,6 +38,39 @@ if(ENABLE_MPI) DEPENDS partition_metadata_3.nc partition_metadata_2.nc ) + add_executable(testRectGrid_MPI3 "RectGrid_test.cpp" "MainMPI.cpp") + target_compile_definitions( + testRectGrid_MPI3 + PRIVATE TEST_FILES_DIR=\"${CMAKE_CURRENT_BINARY_DIR}\" + ) + target_include_directories( + testRectGrid_MPI3 + PRIVATE ${MODEL_INCLUDE_DIR} "${ModulesRoot}/StructureModule" + ) + target_link_libraries(testRectGrid_MPI3 PRIVATE nextsimlib doctest::doctest) + + add_executable(testParaGrid_MPI2 "ParaGrid_test.cpp" "MainMPI.cpp") + target_compile_definitions( + testParaGrid_MPI2 + PRIVATE + USE_MPI + TEST_FILES_DIR=\"${CMAKE_CURRENT_BINARY_DIR}\" + TEST_FILE_SOURCE=\"${CMAKE_CURRENT_SOURCE_DIR}\" + ) + target_include_directories( + testParaGrid_MPI2 + PRIVATE ${MODEL_INCLUDE_DIR} "${ModulesRoot}/StructureModule" + ) + target_link_libraries(testParaGrid_MPI2 PRIVATE nextsimlib doctest::doctest) + + add_executable(testConfigOutput_MPI2 "ConfigOutput_test.cpp" "MainMPI.cpp") + target_compile_definitions( + testConfigOutput_MPI2 + PRIVATE USE_MPI TEST_FILES_DIR=\"${CMAKE_CURRENT_BINARY_DIR}\" + ) + target_include_directories(testConfigOutput_MPI2 PRIVATE ${MODEL_INCLUDE_DIR}) + target_link_libraries(testConfigOutput_MPI2 PRIVATE nextsimlib doctest::doctest) + if(ENABLE_XIOS) file( CREATE_LINK @@ -56,13 +89,12 @@ if(ENABLE_MPI) "${xios_EXTERNS}/blitz/" "${xios_EXTERNS}/rapidxml/include" ) - set(MODEL_INCLUDE_DIR "${MODEL_INCLUDE_DIR}" "${XIOS_INCLUDE_LIST}") add_executable(testXiosCalendar_MPI2 "XiosCalendar_test.cpp" "MainMPI.cpp") target_compile_definitions(testXiosCalendar_MPI2 PRIVATE USE_XIOS) target_include_directories( testXiosCalendar_MPI2 - PRIVATE "${MODEL_INCLUDE_DIR}" "${ModulesRoot}/StructureModule" + PRIVATE "${MODEL_INCLUDE_DIR}" "${XIOS_INCLUDE_LIST}" "${ModulesRoot}/StructureModule" ) target_link_libraries(testXiosCalendar_MPI2 PRIVATE nextsimlib doctest::doctest) @@ -70,7 +102,7 @@ if(ENABLE_MPI) target_compile_definitions(testXiosAxis_MPI2 PRIVATE USE_XIOS) target_include_directories( testXiosAxis_MPI2 - PRIVATE "${MODEL_INCLUDE_DIR}" "${ModulesRoot}/StructureModule" + PRIVATE "${MODEL_INCLUDE_DIR}" "${XIOS_INCLUDE_LIST}" "${ModulesRoot}/StructureModule" ) target_link_libraries(testXiosAxis_MPI2 PRIVATE nextsimlib doctest::doctest) @@ -78,7 +110,7 @@ if(ENABLE_MPI) target_compile_definitions(testXiosDomain_MPI2 PRIVATE USE_XIOS) target_include_directories( testXiosDomain_MPI2 - PRIVATE "${MODEL_INCLUDE_DIR}" "${ModulesRoot}/StructureModule" + PRIVATE "${MODEL_INCLUDE_DIR}" "${XIOS_INCLUDE_LIST}" "${ModulesRoot}/StructureModule" ) target_link_libraries(testXiosDomain_MPI2 PRIVATE nextsimlib doctest::doctest) @@ -86,7 +118,7 @@ if(ENABLE_MPI) target_compile_definitions(testXiosGrid_MPI2 PRIVATE USE_XIOS) target_include_directories( testXiosGrid_MPI2 - PRIVATE "${MODEL_INCLUDE_DIR}" "${ModulesRoot}/StructureModule" + PRIVATE "${MODEL_INCLUDE_DIR}" "${XIOS_INCLUDE_LIST}" "${ModulesRoot}/StructureModule" ) target_link_libraries(testXiosGrid_MPI2 PRIVATE nextsimlib doctest::doctest) @@ -94,7 +126,7 @@ if(ENABLE_MPI) target_compile_definitions(testXiosField_MPI2 PRIVATE USE_XIOS) target_include_directories( testXiosField_MPI2 - PRIVATE "${MODEL_INCLUDE_DIR}" "${ModulesRoot}/StructureModule" + PRIVATE "${MODEL_INCLUDE_DIR}" "${XIOS_INCLUDE_LIST}" "${ModulesRoot}/StructureModule" ) target_link_libraries(testXiosField_MPI2 PRIVATE nextsimlib doctest::doctest) @@ -102,7 +134,7 @@ if(ENABLE_MPI) target_compile_definitions(testXiosFile_MPI2 PRIVATE USE_XIOS) target_include_directories( testXiosFile_MPI2 - PRIVATE "${MODEL_INCLUDE_DIR}" "${ModulesRoot}/StructureModule" + PRIVATE "${MODEL_INCLUDE_DIR}" "${XIOS_INCLUDE_LIST}" "${ModulesRoot}/StructureModule" ) target_link_libraries(testXiosFile_MPI2 PRIVATE nextsimlib doctest::doctest) @@ -110,43 +142,10 @@ if(ENABLE_MPI) target_compile_definitions(testXiosReadWrite_MPI2 PRIVATE USE_XIOS) target_include_directories( testXiosReadWrite_MPI2 - PRIVATE "${MODEL_INCLUDE_DIR}" "${ModulesRoot}/StructureModule" + PRIVATE "${MODEL_INCLUDE_DIR}" "${XIOS_INCLUDE_LIST}" "${ModulesRoot}/StructureModule" ) target_link_libraries(testXiosReadWrite_MPI2 PRIVATE nextsimlib doctest::doctest) endif() - - add_executable(testRectGrid_MPI3 "RectGrid_test.cpp" "MainMPI.cpp") - target_compile_definitions( - testRectGrid_MPI3 - PRIVATE TEST_FILES_DIR=\"${CMAKE_CURRENT_BINARY_DIR}\" - ) - target_include_directories( - testRectGrid_MPI3 - PRIVATE ${MODEL_INCLUDE_DIR} "${ModulesRoot}/StructureModule" - ) - target_link_libraries(testRectGrid_MPI3 PRIVATE nextsimlib doctest::doctest) - - add_executable(testParaGrid_MPI2 "ParaGrid_test.cpp" "MainMPI.cpp") - target_compile_definitions( - testParaGrid_MPI2 - PRIVATE - USE_MPI - TEST_FILES_DIR=\"${CMAKE_CURRENT_BINARY_DIR}\" - TEST_FILE_SOURCE=\"${CMAKE_CURRENT_SOURCE_DIR}\" - ) - target_include_directories( - testParaGrid_MPI2 - PRIVATE ${MODEL_INCLUDE_DIR} "${ModulesRoot}/StructureModule" - ) - target_link_libraries(testParaGrid_MPI2 PRIVATE nextsimlib doctest::doctest) - - add_executable(testConfigOutput_MPI2 "ConfigOutput_test.cpp" "MainMPI.cpp") - target_compile_definitions( - testConfigOutput_MPI2 - PRIVATE USE_MPI TEST_FILES_DIR=\"${CMAKE_CURRENT_BINARY_DIR}\" - ) - target_include_directories(testConfigOutput_MPI2 PRIVATE ${MODEL_INCLUDE_DIR}) - target_link_libraries(testConfigOutput_MPI2 PRIVATE nextsimlib doctest::doctest) else() add_executable(testRectGrid "RectGrid_test.cpp") target_compile_definitions(testRectGrid PRIVATE TEST_FILES_DIR=\"${CMAKE_CURRENT_BINARY_DIR}\") diff --git a/core/test/ParaGrid_test.cpp b/core/test/ParaGrid_test.cpp index 8f47d76f9..f4e41e0c1 100644 --- a/core/test/ParaGrid_test.cpp +++ b/core/test/ParaGrid_test.cpp @@ -1,7 +1,7 @@ /*! * @file ParaGrid_test.cpp * - * @date 10 Dec 2024 + * @date 24 Sep 2024 * @author Tim Spain */ @@ -9,7 +9,6 @@ #include #ifdef USE_MPI #include -#undef INFO #else #define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN #include @@ -17,11 +16,11 @@ #include "include/Configurator.hpp" #include "include/ConfiguredModule.hpp" -#include "include/IStructure.hpp" #include "include/NZLevels.hpp" -#include "include/NextsimModule.hpp" #include "include/ParaGridIO.hpp" #include "include/ParametricGrid.hpp" +#include "include/IStructure.hpp" +#include "include/NextsimModule.hpp" #include "include/gridNames.hpp" #include diff --git a/core/test/XiosReadWrite_test.cpp b/core/test/XiosReadWrite_test.cpp index 05be6c985..aaab7da45 100644 --- a/core/test/XiosReadWrite_test.cpp +++ b/core/test/XiosReadWrite_test.cpp @@ -1,7 +1,7 @@ /*! * @file XiosReadWrite_test.cpp * @author Joe Wallwork - * @date 10 Dec 2024 + * @date 19 Nov 2024 * @brief Tests for XIOS write method * @details * This test is designed to test the read and write methods of the C++ diff --git a/physics/src/modules/AtmosphereBoundaryModule/ERA5Atmosphere.cpp b/physics/src/modules/AtmosphereBoundaryModule/ERA5Atmosphere.cpp index d6acd250a..75ee026f7 100644 --- a/physics/src/modules/AtmosphereBoundaryModule/ERA5Atmosphere.cpp +++ b/physics/src/modules/AtmosphereBoundaryModule/ERA5Atmosphere.cpp @@ -1,7 +1,7 @@ /*! * @file ERA5Atmosphere.cpp * - * @date 10 Dec 2024 + * @date 24 Sep 2024 * @author Tim Spain */ diff --git a/physics/src/modules/OceanBoundaryModule/TOPAZOcean.cpp b/physics/src/modules/OceanBoundaryModule/TOPAZOcean.cpp index bb871da3c..70eb86bae 100644 --- a/physics/src/modules/OceanBoundaryModule/TOPAZOcean.cpp +++ b/physics/src/modules/OceanBoundaryModule/TOPAZOcean.cpp @@ -1,15 +1,15 @@ /*! * @file TOPAZOcean.cpp * - * @date 10 Dec 2024 + * @date 24 Sep 2024 * @author Tim Spain */ #include "include/TOPAZOcean.hpp" #include "include/Finalizer.hpp" -#include "include/IFreezingPoint.hpp" #include "include/IIceOceanHeatFlux.hpp" +#include "include/IFreezingPoint.hpp" #include "include/NextsimModule.hpp" #include "include/ParaGridIO.hpp" #include "include/constants.hpp"