From ba591b4e1cc0169f28682661c22667c3d5f9e4e4 Mon Sep 17 00:00:00 2001 From: Benjamin Auer Date: Thu, 26 Sep 2024 11:26:31 -0400 Subject: [PATCH] fixes #3042 --- CHANGELOG.md | 2 + Tests/ExtDataDriverGridComp.F90 | 2 +- .../ExtData_Testing_Framework/CMakeLists.txt | 40 ++++++++++--------- .../run_extdata.cmake | 10 ++--- 4 files changed, 29 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c5c4fdae965..df53e03b29fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- ExtDataDriver.x now uses ExtData2G by default + ### Fixed ### Removed diff --git a/Tests/ExtDataDriverGridComp.F90 b/Tests/ExtDataDriverGridComp.F90 index d4d11b038ed4..6d99db879902 100644 --- a/Tests/ExtDataDriverGridComp.F90 +++ b/Tests/ExtDataDriverGridComp.F90 @@ -224,7 +224,7 @@ subroutine initialize_gc(gc, import_state, export_state, clock, rc) !EOR enableTimers = ESMF_UtilStringUpperCase(enableTimers, rc = status) _VERIFY(status) - call MAPL_GetResource(maplobj,use_extdata2g,"USE_EXTDATA2G:",default=.false.,_RC) + call MAPL_GetResource(maplobj,use_extdata2g,"USE_EXTDATA2G:",default=.true.,_RC) if (enableTimers /= 'YES') then call MAPL_ProfDisable(rc = status) diff --git a/Tests/ExtData_Testing_Framework/CMakeLists.txt b/Tests/ExtData_Testing_Framework/CMakeLists.txt index afcb2b5be93f..9a8e46f8ea5b 100644 --- a/Tests/ExtData_Testing_Framework/CMakeLists.txt +++ b/Tests/ExtData_Testing_Framework/CMakeLists.txt @@ -29,62 +29,64 @@ set(QUANTIZE_TESTS "case34" ) -foreach(TEST_CASE ${TEST_CASES_1G}) +file(STRINGS "test_cases/extdata_2g_cases.txt" TEST_CASES_2G) + +foreach(TEST_CASE ${TEST_CASES_2G}) + + # Skip tests that require Quantize support if we don't have it + if (NOT NETCDF_HAS_QUANTIZE AND ${TEST_CASE} IN_LIST QUANTIZE_TESTS) + continue() + endif() + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/test_cases/${TEST_CASE}/nproc.rc) file(READ ${CMAKE_CURRENT_LIST_DIR}/test_cases/${TEST_CASE}/nproc.rc num_procs) else() set(num_procs "1") endif() add_test( - NAME "ExtData1G_${TEST_CASE}" + NAME "ExtData2G_${TEST_CASE}" COMMAND ${CMAKE_COMMAND} -DTEST_CASE=${TEST_CASE} -DMPIEXEC_EXECUTABLE=${MPIEXEC_EXECUTABLE} -DMPIEXEC_NUMPROC_FLAG=${MPIEXEC_NUMPROC_FLAG} -DMY_BINARY_DIR=${CMAKE_BINARY_DIR}/bin -DMPIEXEC_PREFLAGS=${MPIEXEC_PREFLAGS} - -DIS_EXTDATA2G=NO + -DIS_EXTDATA2G=YES -P ${CMAKE_CURRENT_SOURCE_DIR}/run_extdata.cmake ) if (${num_procs} GREATER ${cutoff}) - set_tests_properties ("ExtData1G_${TEST_CASE}" PROPERTIES LABELS "EXTDATA1G_BIG_TESTS") + set_tests_properties ("ExtData2G_${TEST_CASE}" PROPERTIES LABELS "EXTDATA2G_BIG_TESTS") elseif (${TEST_CASE} IN_LIST SLOW_TESTS) - set_tests_properties ("ExtData1G_${TEST_CASE}" PROPERTIES LABELS "EXTDATA1G_SLOW_TESTS") + set_tests_properties ("ExtData2G_${TEST_CASE}" PROPERTIES LABELS "EXTDATA2G_SLOW_TESTS") else() - set_tests_properties ("ExtData1G_${TEST_CASE}" PROPERTIES LABELS "EXTDATA1G_SMALL_TESTS") + set_tests_properties ("ExtData2G_${TEST_CASE}" PROPERTIES LABELS "EXTDATA2G_SMALL_TESTS;ESSENTIAL") endif() endforeach() -file(STRINGS "test_cases/extdata_2g_cases.txt" TEST_CASES_2G) - -foreach(TEST_CASE ${TEST_CASES_2G}) - - # Skip tests that require Quantize support if we don't have it - if (NOT NETCDF_HAS_QUANTIZE AND ${TEST_CASE} IN_LIST QUANTIZE_TESTS) - continue() - endif() +file(STRINGS "test_cases/extdata_1g_cases.txt" TEST_CASES_1G) +foreach(TEST_CASE ${TEST_CASES_1G}) if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/test_cases/${TEST_CASE}/nproc.rc) file(READ ${CMAKE_CURRENT_LIST_DIR}/test_cases/${TEST_CASE}/nproc.rc num_procs) else() set(num_procs "1") endif() add_test( - NAME "ExtData2G_${TEST_CASE}" + NAME "ExtData1G_${TEST_CASE}" COMMAND ${CMAKE_COMMAND} -DTEST_CASE=${TEST_CASE} -DMPIEXEC_EXECUTABLE=${MPIEXEC_EXECUTABLE} -DMPIEXEC_NUMPROC_FLAG=${MPIEXEC_NUMPROC_FLAG} -DMY_BINARY_DIR=${CMAKE_BINARY_DIR}/bin -DMPIEXEC_PREFLAGS=${MPIEXEC_PREFLAGS} - -DIS_EXTDATA2G=YES + -DIS_EXTDATA2G=NO -P ${CMAKE_CURRENT_SOURCE_DIR}/run_extdata.cmake ) if (${num_procs} GREATER ${cutoff}) - set_tests_properties ("ExtData2G_${TEST_CASE}" PROPERTIES LABELS "EXTDATA2G_BIG_TESTS") + set_tests_properties ("ExtData1G_${TEST_CASE}" PROPERTIES LABELS "EXTDATA1G_BIG_TESTS") elseif (${TEST_CASE} IN_LIST SLOW_TESTS) - set_tests_properties ("ExtData2G_${TEST_CASE}" PROPERTIES LABELS "EXTDATA2G_SLOW_TESTS") + set_tests_properties ("ExtData1G_${TEST_CASE}" PROPERTIES LABELS "EXTDATA1G_SLOW_TESTS") else() - set_tests_properties ("ExtData2G_${TEST_CASE}" PROPERTIES LABELS "EXTDATA2G_SMALL_TESTS;ESSENTIAL") + set_tests_properties ("ExtData1G_${TEST_CASE}" PROPERTIES LABELS "EXTDATA1G_SMALL_TESTS") endif() endforeach() diff --git a/Tests/ExtData_Testing_Framework/run_extdata.cmake b/Tests/ExtData_Testing_Framework/run_extdata.cmake index e5b8af69d042..ccdd4d003c49 100644 --- a/Tests/ExtData_Testing_Framework/run_extdata.cmake +++ b/Tests/ExtData_Testing_Framework/run_extdata.cmake @@ -10,14 +10,14 @@ macro(run_case CASE) else() set(num_procs "1") endif() - if (${IS_EXTDATA2G} STREQUAL "YES") - file(APPEND "${tempdir}/CAP1.rc" "USE_EXTDATA2G: .true.") - file(APPEND "${tempdir}/CAP2.rc" "USE_EXTDATA2G: .true.") + if (${IS_EXTDATA2G} STREQUAL "NO") + file(APPEND "${tempdir}/CAP1.rc" "USE_EXTDATA2G: .false.") + file(APPEND "${tempdir}/CAP2.rc" "USE_EXTDATA2G: .false.") if (EXISTS "${tempdir}/CAP3.rc") - file(APPEND "${tempdir}/CAP3.rc" "USE_EXTDATA2G: .true.") + file(APPEND "${tempdir}/CAP3.rc" "USE_EXTDATA2G: .false.") endif() if (EXISTS "${tempdir}/CAP4.rc") - file(APPEND "${tempdir}/CAP4.rc" "USE_EXTDATA2G: .true.") + file(APPEND "${tempdir}/CAP4.rc" "USE_EXTDATA2G: .false.") endif() endif() execute_process(