Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

Update for f5 migration #5

Merged
merged 2 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 16 additions & 12 deletions ci/create_run_xml_from_template.bash
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ for mod in $submodules ; do
done
popd

#define env
export DEV=/gpfs/f5/cefi/scratch
export SCRATCH=/gpfs/f5/cefi/scratch

echo "Current date: " $CURRENT_DATE
echo "DEV: " $DEV
echo "SCRATCH: " $SCRATCH
echo "MOM6 tag: " $hash_MOM6
echo "ocean_BGC tag: " $hash_ocean_BGC
echo "SIS2 tag: " $hash_SIS2
Expand Down Expand Up @@ -54,7 +60,7 @@ cat ocean_ice_cobalt_experiments.template.xml | sed -e "s/<FMS_GIT_HASH>/$hash_F


# -- clean up work folders or runs from previos runs
workflow_directory="/lustre/f2/dev/Yi-cheng.Teng/github/cefi_NWA12_regression_${CURRENT_DATE}"
workflow_directory="$DEV/$USER/github/cefi_NWA12_regression_${CURRENT_DATE}"
# Check if the directory exists
if [ -d "$workflow_directory" ]; then
# If it exists, remove it
Expand All @@ -66,12 +72,10 @@ fi

# Now compile mom6-sis2-cobalt
module use -a /ncrc/home2/fms/local/modulefiles
module load fre/bronx-20
module use -a /ncrc/home2/fms/local/modulefiles
module load fre/bronx-20
module load fre/bronx-21
echo "run fremake and submit compile job"
fremake -f -F -x ocean_ice_cobalt_experiments.xml -p ncrc5.intel22 -t repro MOM6_SIS2_GENERIC_4P_compile_symm
jobid=$(sbatch --parsable /lustre/f2/dev/Yi-cheng.Teng/github/cefi_NWA12_regression_${CURRENT_DATE}/MOM6_SIS2_GENERIC_4P_compile_symm/ncrc5.intel22-repro/exec/compile_MOM6_SIS2_GENERIC_4P_compile_symm.csh | awk -F';' '{print $1}' | cut -f1)
jobid=$(sbatch --parsable ${DEV}/${USER}/github/cefi_NWA12_regression_${CURRENT_DATE}/MOM6_SIS2_GENERIC_4P_compile_symm/ncrc5.intel22-repro/exec/compile_MOM6_SIS2_GENERIC_4P_compile_symm.csh | awk -F';' '{print $1}' | cut -f1)
echo "Submitted Slurm job with ID: $jobid"

# Check the status of the job in a loop
Expand All @@ -94,20 +98,20 @@ done


# check if fms_MOM6_SIS2_GENERIC_4P_compile_symm.x create successfully or not
executable_file="/lustre/f2/dev/Yi-cheng.Teng/github/cefi_NWA12_regression_${CURRENT_DATE}/MOM6_SIS2_GENERIC_4P_compile_symm/ncrc5.intel22-repro/exec/fms_MOM6_SIS2_GENERIC_4P_compile_symm.x"
executable_file="${DEV}/${USER}/github/cefi_NWA12_regression_${CURRENT_DATE}/MOM6_SIS2_GENERIC_4P_compile_symm/ncrc5.intel22-repro/exec/fms_MOM6_SIS2_GENERIC_4P_compile_symm.x"
if [ -f "$executable_file" ]; then
echo "Executable file created successfully: $executable_file"
# Rest of your script...
else
echo "Executable file not created within the specified duration."
echo "Please check /lustre/f2/dev/Yi-cheng.Teng/github/cefi_NWA12_regression_${CURRENT_DATE}/MOM6_SIS2_GENERIC_4P_compile_symm/ncrc5.intel22-repro/exec/compile_MOM6_SIS2_GENERIC_4P_compile_symm.csh.o$jobid"
echo "Please check ${DEV}/${USER}/github/cefi_NWA12_regression_${CURRENT_DATE}/MOM6_SIS2_GENERIC_4P_compile_symm/ncrc5.intel22-repro/exec/compile_MOM6_SIS2_GENERIC_4P_compile_symm.csh.o$jobid"
exit 1
fi

# run frerun and submit a RT test for NWA12-RT case
echo "run frerun and submit a NWA12-RT case"
frerun --notransfer -o -x ocean_ice_cobalt_experiments.xml -p ncrc5.intel22 -q debug -r NWA12_RT -t repro NWA12_COBALT_V1
rt_jobid=$(sbatch --parsable /lustre/f2/dev/Yi-cheng.Teng/github/cefi_NWA12_regression_${CURRENT_DATE}/NWA12_COBALT_V1/ncrc5.intel22-repro/scripts/run/NWA12_COBALT_V1_1x0m2d_1646x1o | awk -F';' '{print $1}' | cut -f1)
rt_jobid=$(sbatch --parsable ${DEV}/${USER}/github/cefi_NWA12_regression_${CURRENT_DATE}/NWA12_COBALT_V1/ncrc5.intel22-repro/scripts/run/NWA12_COBALT_V1_1x0m2d_1646x1o | awk -F';' '{print $1}' | cut -f1)
echo "Submitted RT job with ID: $rt_jobid"

# Check the status of the job in a loop
Expand All @@ -131,12 +135,12 @@ done
# sleep for another 180s
sleep 180
# check if restart create successfully or not
check_file="/lustre/f2/scratch/Yi-cheng.Teng/github/cefi_NWA12_regression_${CURRENT_DATE}/NWA12_COBALT_V1/ncrc5.intel22-repro/archive/1x0m2d_1646x1o/restart/19930103.tar.ok"
check_file="${DEV}/${USER}/github/cefi_NWA12_regression_${CURRENT_DATE}/NWA12_COBALT_V1/ncrc5.intel22-repro/archive/1x0m2d_1646x1o/restart/19930103.tar.ok"
if [ -f "$check_file" ]; then
echo "restart files exist successfully: $check_file"
else
echo "NWA12 RT is not done within the specified duration."
echo "Please check /lustre/f2/scratch/Yi-cheng.Teng/github/cefi_NWA12_regression_${CURRENT_DATE}/NWA12_COBALT_V1/ncrc5.intel22-repro/stdout/run/NWA12_COBALT_V1_1x0m2d_1646x1o.o$rt_jobid"
echo "Please check ${DEV}/${USER}/github/cefi_NWA12_regression_${CURRENT_DATE}/NWA12_COBALT_V1/ncrc5.intel22-repro/stdout/run/NWA12_COBALT_V1_1x0m2d_1646x1o.o$rt_jobid"
exit 10
fi

Expand All @@ -157,5 +161,5 @@ else
fi

# Final clean-up
rm -rf /lustre/f2/scratch/Yi-cheng.Teng/work/github/cefi_NWA12_regression_${CURRENT_DATE}
rm -rf /lustre/f2/dev/Yi-cheng.Teng/github/cefi_NWA12_regression_${CURRENT_DATE}
rm -rf ${DEV}/${USER}/work/github/cefi_NWA12_regression_${CURRENT_DATE}
#rm -rf ${DEV}/${USER}/github/cefi_NWA12_regression_${CURRENT_DATE}
8 changes: 5 additions & 3 deletions ci/ocean_ice_cobalt_experiments.template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@ This xml consists of ocean-ice-cobalt examples with regional MOM6.

On Gaea:
module use -a /ncrc/home2/fms/local/modulefiles
module load fre/bronx-20
module load fre/bronx-21
export DEV=/gpfs/f5/cefi/scratch
export SCRATCH=/gpfs/f5/cefi/scratch
fremake -f -F -s -x ocean_ice_cobalt_experiments.xml -p ncrc5.intel22 -t repro MOM6_SIS2_GENERIC_4P_compile_symm
frerun -o -x ocean_ice_cobalt_experiments.xml -p ncrc5.intel22 -q debug -r NWA12_RT -t repro NWA12_COBALT_V1
frecheck -I NWA12_COBALT_V1_1x0m2d_1646x1o,ocean_ice_cobalt_experiments.xml -x ocean_ice_cobalt_experiments.xml -p ncrc5.intel22 -r NWA12_RT -t repro NWA12_COBALT_V1
-->

<experimentSuite rtsVersion="4" xmlns:xi="http://www.w3.org/2001/XInclude">

<property name="FRE_VERSION" value="bronx-20"/> <!-- fre version to be used -->
<property name="FRE_VERSION" value="bronx-21"/> <!-- fre version to be used -->

<property name="RELEASE" value="2022.04"/> <!-- git tag for general component source code-->
<property name="FMS_TAG" value="$(RELEASE)"/> <!-- git tag for shared source code -->
Expand Down Expand Up @@ -48,7 +50,7 @@ frecheck -I NWA12_COBALT_V1_1x0m2d_1646x1o,ocean_ice_cobalt_experiments.xml -x
<property name="AWG_INPUT_HOME_GAEA" value=""/>
<property name="AWG_INPUT_HOME_GFDL" value=""/>
<property name="append_to_setup_csh" value="set fyear=`echo $baseDate | cut -c1-4`"/>
<property name="ACR" value="/lustre/f2/dev/Yi-cheng.Teng/github/ci_data"/>
<property name="ACR" value="/gpfs/f5/cefi/proj-shared/github/ci_data"/>
<property name="reference_tag" value="NWA12_COBALT_v1_1x0m2d_1646x1o"/>

<!-- HPC platforms -->
Expand Down
Loading