Skip to content

Commit

Permalink
Add back fv3 ctests after bug fix to fv3_modules
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelDegelia-NOAA committed Sep 3, 2024
1 parent a8bb246 commit 9a7b811
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions rrfs-test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ include(funcs.cmake)

### Define CTests here ###

# FV3-JEDI tests
set(rrfs_fv3jedi_tests)
add_to_dictionary(rrfs_fv3jedi_tests "rrfs_fv3jedi_hyb_2022052619" "fv3jedi_var.x")
add_to_dictionary(rrfs_fv3jedi_tests "rrfs_fv3jedi_letkf_2022052619" "fv3jedi_letkf.x")

# MPAS-JEDI tests
set(rrfs_mpasjedi_tests)
add_to_dictionary(rrfs_mpasjedi_tests "rrfs_mpasjedi_2024052700_Ens3Dvar" "mpasjedi_variational.x")
Expand All @@ -18,6 +23,49 @@ if (CLONE_RRFSDATA)
message(STATUS "Use test data from rrfs-test-data repository")
set (rrfs-test_data_local "${CMAKE_SOURCE_DIR}/rrfs-test-data/")
set (src_yaml "${CMAKE_SOURCE_DIR}/rrfs-test/testinput")
# It's unclear if anyone is using the local data functionality, therefore comment it out
# for now and add in if someone complains / remove if completely if not.
#elseif (DEFINED ENV{FV3_JEDI_TESTFILES})
# message(STATUS "Use test data from local directory $ENV{FV3_JEDI_TESTFILES}")
# # A bit of guesswork here, I don't know if folks using this option stored it in the same directory structure
# set (fv3-jedi_data_testinput_tier_1_local "$ENV{FV3_JEDI_TESTFILES}/fv3-jedi-data/testinput_tier_1")
if(FV3_DYCORE)

message(STATUS "MACHINE_ID is " ${MACHINE_ID})
if("${MACHINE_ID}" STREQUAL "orion")
message(STATUS "Because MACHINE_ID is orion, adding exclusive MPI option" )
set(RESTORE_MPI_ARGS ${MPI_ARGS})
set(MPI_ARGS "${MPI_ARGS} --exclusive")
endif()

get_all_keys(rrfs_fv3jedi_tests caselist)
foreach(case ${caselist})
get_from_dictionary(rrfs_fv3jedi_tests case exe)
set(casedir "${CMAKE_CURRENT_BINARY_DIR}/rundir-${case}")
set(src_casedir "${rrfs-test_data_local}/rrfs-data_fv3jedi_2022052619")
if (NOT EXISTS "${casedir}")
file(MAKE_DIRECTORY ${casedir})
endif()
file(CREATE_LINK ${src_casedir}/DataFix ${casedir}/DataFix SYMBOLIC)
file(CREATE_LINK ${src_casedir}/Data_static ${casedir}/Data_static SYMBOLIC)
file(CREATE_LINK ${src_casedir}/INPUT ${casedir}/INPUT SYMBOLIC)
file(CREATE_LINK ${src_casedir}/Data ${casedir}/Data SYMBOLIC)
file(COPY ${src_yaml}/${case}.yaml DESTINATION ${casedir} )
set(target_test ${case})
ecbuild_add_test( TARGET ${target_test}
MPI 80
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/rundir-${target_test}
ARGS ${target_test}.yaml
COMMAND ${exe} )
endforeach()

if("${MACHINE_ID}" STREQUAL "orion")
set(MPI_ARGS ${RESTORE_MPI_ARGS})
endif()


endif()

if(MPAS_DYCORE)

message(STATUS "MACHINE_ID is " ${MACHINE_ID})
Expand Down

0 comments on commit 9a7b811

Please sign in to comment.