Skip to content

Commit

Permalink
Merge branch 'develop' into release/MAPL-v3
Browse files Browse the repository at this point in the history
  • Loading branch information
mathomp4 committed Sep 26, 2024
2 parents 6f236ab + c60d1e5 commit 24de622
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 25 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,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
Expand Down
2 changes: 1 addition & 1 deletion Tests/ExtDataDriverGridComp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,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)
Expand Down
40 changes: 21 additions & 19 deletions Tests/ExtData_Testing_Framework/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
10 changes: 5 additions & 5 deletions Tests/ExtData_Testing_Framework/run_extdata.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 24de622

Please sign in to comment.