diff --git a/ci/create_run_xml_from_template.bash b/ci/create_run_xml_from_template.bash index 939366d..3fa1eae 100755 --- a/ci/create_run_xml_from_template.bash +++ b/ci/create_run_xml_from_template.bash @@ -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 @@ -54,7 +60,7 @@ cat ocean_ice_cobalt_experiments.template.xml | sed -e "s//$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 @@ -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 @@ -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 @@ -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 @@ -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} diff --git a/ci/ocean_ice_cobalt_experiments.template.xml b/ci/ocean_ice_cobalt_experiments.template.xml index 145765e..78ae463 100644 --- a/ci/ocean_ice_cobalt_experiments.template.xml +++ b/ci/ocean_ice_cobalt_experiments.template.xml @@ -6,7 +6,9 @@ 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 @@ -14,7 +16,7 @@ frecheck -I NWA12_COBALT_V1_1x0m2d_1646x1o,ocean_ice_cobalt_experiments.xml -x - + @@ -48,7 +50,7 @@ frecheck -I NWA12_COBALT_V1_1x0m2d_1646x1o,ocean_ice_cobalt_experiments.xml -x - +