Skip to content

Commit

Permalink
Add/update config files for Gaea and check existence before sourcing …
Browse files Browse the repository at this point in the history
…config files in generate_workflows.sh (#3286)

This PR adds, renames, and updates values in
ci/platforms/config.gaeac5/6 to allow generate_workflows.sh to pick up
on a default `HPC_ACCOUNT` and removes `STMP` from those files to
prevent issues with the setup scripts.

Related to #3261 

---------

Co-authored-by: Rahul Mahajan <[email protected]>
  • Loading branch information
DavidHuber-NOAA and aerorahul authored Feb 4, 2025
1 parent 8321fcb commit 4cc4d43
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
1 change: 0 additions & 1 deletion ci/platforms/config.gaea → ci/platforms/config.gaeac5
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

export GFS_CI_ROOT=/gpfs/f5/epic/proj-shared/global/GFS_CI_ROOT
export ICSDIR_ROOT=/gpfs/f5/epic/proj-shared/global/glopara/data/ICSDIR
export STMP="/gpfs/f5/epic/scratch/${USER}"
export HPC_ACCOUNT=ufs-ard
export max_concurrent_cases=5
export max_concurrent_pr=4
7 changes: 7 additions & 0 deletions ci/platforms/config.gaeac6
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/bash

export GFS_CI_ROOT=/gpfs/f6/drsa-precip3/scratch/${USER}/GFS_CI_ROOT
export ICSDIR_ROOT=/gpfs/f6/bil-fire8/world-shared/global/glopara/data/ICSDIR
export HPC_ACCOUNT=drsa-precip3
export max_concurrent_cases=5
export max_concurrent_pr=4
20 changes: 16 additions & 4 deletions workflow/generate_workflows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,15 @@ rm -f stdout
[[ "${_debug}" == "true" ]] && set -x
set -u
machine=${MACHINE_ID}
. "${HOMEgfs}/ci/platforms/config.${machine}"
platform_config="${HOMEgfs}/ci/platforms/config.${machine}"
if [[ -f "${platform_config}" ]]; then
. "${HOMEgfs}/ci/platforms/config.${machine}"
else
if [[ "${_set_account}" == "false" ]] ; then
echo "ERROR Unknown HPC account! Please use the -A option to specify."
exit 11
fi
fi

# If _yaml_dir is not set, set it to $HOMEgfs/ci/cases/pr
if [[ -z ${_yaml_dir} ]]; then
Expand Down Expand Up @@ -446,8 +454,12 @@ EOM
done

# Update the account if specified
[[ "${_set_account}" == true ]] && export HPC_ACCOUNT=${_hpc_account} && \
[[ "${_verbose}" == true ]] && printf "Setting HPC account to %s\n\n" "${HPC_ACCOUNT}"
if [[ "${_set_account}" == true ]] ; then
export HPC_ACCOUNT=${_hpc_account}
if [[ "${_verbose}" == true ]]; then
printf "Setting HPC account to %s\n\n" "${HPC_ACCOUNT}"
fi
fi

# Create the experiments
rm -f "tests.cron" "${_verbose_flag}"
Expand All @@ -470,7 +482,7 @@ for _case in "${_yaml_list[@]}"; do
fi
echo "${_message}"
rm -f stdout stderr
exit 11
exit 12
fi
rm -f stdout stderr
fi
Expand Down

0 comments on commit 4cc4d43

Please sign in to comment.