-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Preparation for Transition to C6 (#78)
* Added C6 env and mk files * added ci_build_driver for c6 * Updated NEP10 CI test driver * Update NWA and NEP CI driver * add c6 gha-ci workflow * Start modifying xmls * fixed c6 GHA workflow * revert changes for workflow * fix build script in CEFI_MOM6_c6-ci.yaml * Increase NWA CI layout * Update xml for c6 * fixed diag yaml convert * Update run script and change default FRE for PPAN * turn off analysis for now * revert back platform change * Update platforms.xml * add module unload darshan-runtime * move data folders properties to platforms.xml * fre/test works on PPAN now * fre/test does not work on PP * Update CEFI_NWA12_cobalt.xml * Update CEFI_NWA12_cobalt_fms2_yaml.xml * Update CEFI_NWA12_cobalt.xml * Update CEFI_NWA12_cobalt_fms2_yaml.xml * change fre version on PPAN * FRE/test now works on PPAN * Update CEFI_NWA12_cobalt_fms2_yaml.xml FRE/test now works on PPAN
- Loading branch information
1 parent
33500c1
commit 214d998
Showing
13 changed files
with
643 additions
and
113 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
name: CEFI-MOM6_c6-ci | ||
|
||
on: | ||
# Triggers this workflow on pull request event with "CEFI_MOM6_RT_gaea_c6" label | ||
pull_request: | ||
branches: [ "main" ] | ||
types: [ labeled ] | ||
|
||
# | ||
env: | ||
TEST_DIR: ${{ github.workspace }}/${{ github.run_id }} | ||
PR_NUMBER: ${{ github.event.number }} | ||
|
||
# | ||
jobs: | ||
checkout-build: | ||
if: ${{ github.event.label.name == 'CEFI_MOM6_RT_gaea_c6' }} | ||
runs-on: self-hosted | ||
timeout-minutes: 600 | ||
strategy: | ||
max-parallel: 1 | ||
|
||
steps: | ||
- name: Checkout CEFI-regional-MOM6 | ||
uses: actions/checkout@v4 | ||
with: | ||
path: ${{ github.run_id }}/CEFI_MOM6_CHECK | ||
fetch-depth: 1 | ||
submodules: recursive | ||
|
||
- name: Build MOM6SIS2 | ||
run: | | ||
cd ${{ env.TEST_DIR }}/CEFI_MOM6_CHECK/builds | ||
jobid=$(sbatch --parsable ci_build_driver_c6.sh | awk -F';' '{print $1}' | cut -f1) | ||
# | ||
sleep 1 | ||
while :; do | ||
job_status=$(squeue -h -j "$jobid" -o "%T" 2>/dev/null) | ||
if [ -z "$job_status" ]; then | ||
echo "Job with ID $jobid is not found or completed." | ||
break | ||
else | ||
echo "Job with ID $jobid is still running." | ||
echo "Job Status: $job_status" | ||
fi | ||
sleep 60 # Adjust the sleep duration as needed | ||
done | ||
# | ||
check_file="${{ env.TEST_DIR }}/CEFI_MOM6_CHECK/builds/build/gaea-ncrc6.intel23/ocean_ice/repro/MOM6SIS2" | ||
if [ -f "$check_file" ]; then | ||
echo "PASSED: $check_file" | ||
else | ||
echo "FAILED: $check_file" | ||
exit 1 | ||
fi | ||
run-CEFI_MOM6-ci: | ||
needs: checkout-build | ||
runs-on: self-hosted | ||
strategy: | ||
max-parallel: 2 | ||
matrix: | ||
case: ["NWA12.COBALT"] #["NWA12.COBALT", "NEP10.COBALT"] | ||
steps: | ||
- name: Run Experiment ${{ matrix.case }} | ||
run: | | ||
cd ${{ env.TEST_DIR }}/CEFI_MOM6_CHECK/exps/${{ matrix.case }} | ||
jobid=$(sbatch --parsable driver.sh | awk -F';' '{print $1}' | cut -f1) | ||
# | ||
sleep 1 | ||
while :; do | ||
job_status=$(squeue -h -j "$jobid" -o "%T" 2>/dev/null) | ||
if [ -z "$job_status" ]; then | ||
echo "Job with ID $jobid is not found or completed." | ||
break | ||
else | ||
echo "Job with ID $jobid is still running." | ||
echo "Job Status: $job_status" | ||
fi | ||
sleep 60 # Adjust the sleep duration as needed | ||
done | ||
# | ||
expected_string="All restart files are identical, PASS" | ||
check_file="${{ env.TEST_DIR }}/CEFI_MOM6_CHECK/exps/${{ matrix.case }}/${{ matrix.case }}_o.$jobid" | ||
if [ -f "$check_file" ]; then | ||
if grep -qF "$expected_string" $check_file; then | ||
echo "PASSED: ${{ matrix.case }}" | ||
else | ||
echo "FAILED: ${{ matrix.case }}" | ||
exit 1 | ||
fi | ||
else | ||
echo "Can not find $check_file. STOP" | ||
exit 10 | ||
fi | ||
add-pass-label: | ||
needs: run-CEFI_MOM6-ci | ||
runs-on: self-hosted | ||
if: ${{ needs.run-CEFI_MOM6-ci.result == 'success' }} | ||
steps: | ||
- name: Add "pass_CEFI_MOM6_RT" label on success | ||
run: | | ||
TOKEN=${{ secrets.GITHUB_TOKEN }} | ||
RT_TEST_LABEL="CEFI_MOM6_RT_gaea_c6" | ||
PASS_LABEL="pass_CEFI_MOM6_RT" | ||
# Remove the "CEFI_MOM6_RT_gaea_c6" label | ||
curl -X DELETE \ | ||
-H "Authorization: Bearer $TOKEN" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
"https://api.github.com/repos/$GITHUB_REPOSITORY/issues/${{ env.PR_NUMBER }}/labels/$RT_TEST_LABEL" | ||
# Add the "pass_CEFI_MOM6_RT" label | ||
curl -X POST \ | ||
-H "Authorization: Bearer $TOKEN" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
"https://api.github.com/repos/$GITHUB_REPOSITORY/issues/${{ env.PR_NUMBER }}/labels" \ | ||
-d "{\"labels\":[\"$PASS_LABEL\"]}" | ||
clean-up: | ||
needs: add-pass-label | ||
runs-on: self-hosted | ||
strategy: | ||
max-parallel: 1 | ||
steps: | ||
- name: Clean-up | ||
run: | | ||
cd ${{ github.workspace }} | ||
rm -rf ${{ github.run_id }} |
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,65 @@ | ||
#!/bin/bash | ||
#SBATCH --nodes=1 | ||
#SBATCH --time=60 | ||
#SBATCH --job-name="MOM6SIS2_ci_build" | ||
#SBATCH --output=MOM6SIS2_ci_build_o.%j | ||
#SBATCH --error=MOM6SIS2_ci_build_e.%j | ||
#SBATCH --qos=debug | ||
#SBATCH --partition=batch | ||
#SBATCH --clusters=c6 | ||
#SBATCH --account=ira-cefi | ||
|
||
# | ||
[ -d "build" ] && rm -rf build | ||
|
||
# | ||
echo "Build MOM6SIS2-COBALT for CI testing started: " `date` | ||
|
||
# | ||
machine_name="gaea" | ||
platform="ncrc6.intel23" | ||
target="repro" | ||
flavor="fms1_mom6sis2" | ||
|
||
FMSlib_PATH="/ncrc/home2/Yi-cheng.Teng/github/FMS/2024.02_FMS1" | ||
rootdir=$(pwd) | ||
abs_rootdir=$rootdir | ||
|
||
echo $abs_rootdir | ||
|
||
#load modules | ||
source $MODULESHOME/init/bash | ||
source $rootdir/$machine_name/$platform.env | ||
. $rootdir/$machine_name/$platform.env | ||
|
||
makeflags="NETCDF=3" | ||
|
||
if [[ $target =~ "repro" ]] ; then | ||
makeflags="$makeflags REPRO=1" | ||
fi | ||
|
||
srcdir=$abs_rootdir/../src | ||
|
||
# | ||
sed -i 's/static pid_t gettid(void)/pid_t gettid(void)/g' $srcdir/FMS/affinity/affinity.c | ||
|
||
# | ||
if [[ $flavor == "fms1_mom6sis2" ]] ; then | ||
echo "build mom6sis2 with FMS1 cap" | ||
|
||
mkdir -p build/$machine_name-$platform/ocean_ice/$target | ||
pushd build/$machine_name-$platform/ocean_ice/$target | ||
rm -f path_names | ||
$srcdir/mkmf/bin/list_paths $srcdir/MOM6/{config_src/infra/FMS1,config_src/memory/dynamic_symmetric,config_src/drivers/FMS_cap,config_src/external/ODA_hooks,config_src/external/database_comms,config_src/external/drifters,config_src/external/stochastic_physics,pkg/GSW-Fortran/{modules,toolbox}/,src/{*,*/*}/} $srcdir/SIS2/{config_src/dynamic_symmetric,config_src/external/Icepack_interfaces,src} $srcdir/icebergs/src $srcdir/FMS/{coupler,include}/ $srcdir/{ocean_BGC/generic_tracers,ocean_BGC/mocsy/src}/ $srcdir/{atmos_null,ice_param,land_null,coupler/shared/,coupler/full/}/ | ||
|
||
compiler_options='-DINTERNAL_FILE_NML -DMAX_FIELDS_=600 -DNOT_SET_AFFINITY -Duse_deprecated_io -D_USE_MOM6_DIAG -D_USE_GENERIC_TRACER -DUSE_PRECISION=2 -D_USE_LEGACY_LAND_ -Duse_AM3_physics' | ||
|
||
$srcdir/mkmf/bin/mkmf -t $abs_rootdir/$machine_name/$platform.mk -o "-I${FMSlib_PATH}/shared/$target" -p MOM6SIS2 -l "-L${FMSlib_PATH}/shared/$target -lfms" -c "$compiler_options" path_names | ||
|
||
make $makeflags MOM6SIS2 | ||
|
||
fi | ||
|
||
|
||
|
||
echo "Build MOM6SIS2-COBALT for CI testing ended: " `date` |
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,11 @@ | ||
source $MODULESHOME/init/tcsh | ||
module unload cray-netcdf cray-hdf5 fre | ||
module unload PrgEnv-pgi PrgEnv-intel PrgEnv-gnu PrgEnv-cray | ||
module load PrgEnv-intel/8.5.0 | ||
module unload intel intel-classic intel-oneapi | ||
module load intel-classic/2023.2.0 | ||
module load cray-hdf5/1.12.2.11 | ||
module load cray-netcdf/4.9.0.9 | ||
module load libyaml/0.2.5 | ||
module list | ||
ftn --version |
Oops, something went wrong.