forked from NOAA-EMC/global-workflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removed scripts used for getting system defaults and added top level …
…CMakeLists.txt to use PROJECT_SOURCE_DIR for HOMEgfs in templiting bash wrapper sripts
- Loading branch information
Terry McGuinness
committed
Jan 10, 2025
1 parent
53b13e3
commit 4ee8d81
Showing
11 changed files
with
109 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# ------------------------------------------------------------------------- # | ||
# Global Workflow | ||
# ------------------------------------------------------------------------- # | ||
|
||
# Check for minimum cmake requirement | ||
cmake_minimum_required( VERSION 3.20 FATAL_ERROR ) | ||
|
||
project(global_workflow VERSION 1.0.0) | ||
|
||
include(GNUInstallDirs) | ||
enable_testing() | ||
|
||
# Build type. | ||
if(NOT CMAKE_BUILD_TYPE MATCHES "^(Debug|Release|RelWithDebInfo|MinSizeRel)$") | ||
message(STATUS "Setting build type to 'Release' as none was specified.") | ||
set(CMAKE_BUILD_TYPE | ||
"Release" | ||
CACHE STRING "Choose the type of build." FORCE) | ||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" | ||
"MinSizeRel" "RelWithDebInfo") | ||
endif() | ||
|
||
# Build global-workflow source codes | ||
# add_subdirectory(sorc) | ||
|
||
# Setup tests | ||
add_subdirectory(ctests) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
if (NOT DEFINED HOMEgfs) | ||
set(HOMEgfs ${PROJECT_SOURCE_DIR}) | ||
endif() | ||
|
||
if (DEFINED ENV{RUNTESTS} AND NOT DEFINED RUNTESTS) | ||
set(RUNTESTS $ENV{RUNTESTS} CACHE FILEPATH "Path to global-workflow RUNTESTS directory") | ||
else() | ||
set(RUNTESTS ${CMAKE_CURRENT_BINARY_DIR}/RUNTESTS) | ||
endif() | ||
|
||
if (DEFINED ENV{HPC_ACCOUNT} AND NOT DEFINED HPC_ACCOUNT) | ||
set(HPC_ACCOUNT $ENV{HPC_ACCOUNT} CACHE STRING "Local location of glowbal-workflow initialconditions") | ||
endif() | ||
|
||
if (NOT DEFINED HPC_ACCOUNT) | ||
message(FATAL_ERROR "HPC_ACCOUNT must be set") | ||
return() | ||
endif() | ||
|
||
if (DEFINED ENV{ISCDIR_ROOT} AND NOT DEFINED ICSDIR_ROOT) | ||
set(ICSDIR_ROOT $ENV{HPC_ACCOUNT} CACHE STRING "Local path to global-workflow initialconditions") | ||
endif() | ||
if(NOT DEFINED ICSDIR_ROOT) | ||
message(FATAL_ERROR "ICSDIR_ROOT must be set") | ||
return() | ||
endif() | ||
|
||
message(STATUS "MACHINE_ID: '${MACHINE_ID}'") | ||
message(STATUS "gw: global-workflow baselines will be used from: '${HOMEgfs}'") | ||
message(STATUS "gw: global-workflow tests will be run at: '${RUNTESTS}'") | ||
message(STATUS "gw: global-workflow tests will use the allocation: '${HPC_ACCOUNT}'") | ||
message(STATUS "gw: global-workflow tests will use ICSDIR_ROOT: '${ICSDIR_ROOT}'") | ||
|
||
# Prepare test scripts | ||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/setup.sh.in | ||
${CMAKE_CURRENT_BINARY_DIR}/scripts/setup.sh @ONLY) | ||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/stage.sh.in | ||
${CMAKE_CURRENT_BINARY_DIR}/scripts/stage.sh @ONLY) | ||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/execute.sh.in | ||
${CMAKE_CURRENT_BINARY_DIR}/scripts/execute.sh @ONLY) | ||
|
||
function(AddJJOBTest) | ||
|
||
set(prefix ARG) | ||
set(novals NOTRAPFPE NOVALGRIND) | ||
set(singlevals CASE JOB) | ||
set(multivals TEST_DEPENDS) | ||
|
||
cmake_parse_arguments(${prefix} | ||
"${novals}" "${singlevals}" "${multivals}" | ||
${ARGN}) | ||
|
||
set(TEST_NAME ${ARG_CASE}_${ARG_JOB}) | ||
set(CASE_PATH ${HOMEgfs}/ci/cases/pr) | ||
set(CASE_YAML ${CASE_PATH}/${ARG_CASE}.yaml) | ||
|
||
add_test(NAME test_${TEST_NAME}_setup | ||
COMMAND ./setup.sh ${TEST_NAME} ${CASE_YAML} | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/scripts) | ||
set_tests_properties(test_${TEST_NAME}_setup PROPERTIES LABELS "${ARG_CASE};${ARG_JOB}") | ||
|
||
add_test(NAME test_${TEST_NAME}_stage | ||
COMMAND ./stage.sh ${TEST_NAME} | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/scripts) | ||
set_tests_properties(test_${TEST_NAME}_stage PROPERTIES DEPENDS test_${TEST_NAME}_setup LABELS "${ARG_CASE};${ARG_JOB}") | ||
|
||
add_test(NAME test_${TEST_NAME}_execute | ||
COMMAND ./execute.sh ${TEST_NAME} ${ARG_JOB} | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/scripts) | ||
set_tests_properties(test_${TEST_NAME}_execute PROPERTIES DEPENDS test_${TEST_NAME}_stage LABELS "${ARG_CASE};${ARG_JOB}") | ||
|
||
add_test(NAME test_${TEST_NAME}_validate | ||
COMMAND bash -c "${GW_BASELINE_DIR}/ci/ctests/scripts/validate.sh ${TEST_NAME}") | ||
set_tests_properties(test_${TEST_NAME}_validate PROPERTIES DEPENDS test_${TEST_NAME}_execute LABELS "${ARG_CASE};${ARG_JOB}") | ||
endfunction() | ||
|
||
AddJJOBTest( | ||
CASE "C48_ATM" | ||
JOB "gfs_fcst_seg0" | ||
) |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Submodule gsi_enkf.fd
deleted from
27c03e
Submodule gsi_utils.fd
deleted from
f71601