-
Notifications
You must be signed in to change notification settings - Fork 18
Add CI tests on NCAR's CIRRUS cloud service #470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,93 @@ | ||
| name: Build and run CAM-SIMA on CIRRUS | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - development | ||
| pull_request: | ||
| branches: | ||
| - development | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| build-and-run-on-CIRRUS: | ||
| name: Run ${{ matrix.image }} on ${{ matrix.runner }} | ||
| permissions: | ||
| contents: read | ||
| env: | ||
| TMP_DIR: tmp | ||
| TMP_OUTPUT: case_output.log | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| test_type: [ SMS_Ln2 ] | ||
| compset: [ FPHYStest ] | ||
| res: [ ne3pg3_ne3pg3_mg37 ] | ||
| test_config: [ outfrq_rrtmgp_cirrus_gpu ] | ||
| image: [ ubuntu24.04_nvhpc25.7_openmpi5.0.8_cuda12.9:e9f55f1 ] | ||
| include: | ||
| - image: ubuntu24.04_nvhpc25.7_openmpi5.0.8_cuda12.9:e9f55f1 | ||
| runner: gha-runner-gpu-camsima | ||
| compiler: nvhpc | ||
| runs-on: ${{ matrix.runner }} | ||
| environment: CI-tests-on-CIRRUS | ||
| container: | ||
| image: hub.k8s.ucar.edu/cam-sima/${{ matrix.image }} | ||
| options: ${{ matrix.runner == 'gha-runner-gpu-camsima' && '--gpus all' }} | ||
| env: | ||
| NVIDIA_DRIVER_CAPABILITIES: compute,utility | ||
| credentials: | ||
| username: ${{ secrets.hub_user || 'dummy-user' }} | ||
| password: ${{ secrets.hub_password || 'dummy-password' }} | ||
| defaults: | ||
| run: | ||
| shell: bash | ||
| steps: | ||
| - name: Checkout push code | ||
| uses: actions/checkout@v4 | ||
kuanchihwang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| - name: Set up some git configurations | ||
| run: | | ||
| git config --global user.email "example_user@example.com" | ||
| git config --global user.name "example_user" | ||
|
|
||
| - name: Checkout individual components | ||
| run: | | ||
| ./bin/git-fleximod -C ${GITHUB_WORKSPACE} update | ||
kuanchihwang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| - name: Build and run ${{ matrix.test_type }} test of ${{ matrix.compset }} at ${{ matrix.res }} resolution | ||
| run: | | ||
| export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PIO/lib:$NETCDF_FORTRAN_PATH/lib:$NETCDF_C_PATH/lib:$LAPACK/lib:$LAPACK/lib64:$PNETCDF/lib | ||
kuanchihwang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| if [ "${{ matrix.runner }}" == "gha-runner-gpu-camsima" ]; then | ||
kuanchihwang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CUDA_ROOT/lib64:$CUDA_ROOT/lib64/stubs | ||
| fi | ||
| cd cime/scripts | ||
| ./create_test ${{ matrix.test_type }}.${{ matrix.res }}.${{ matrix.compset }}.cirrus_${{ matrix.compiler }}.cam-${{ matrix.test_config }} --output-root /$TMP_DIR/ci_test --no-batch 2>&1 | tee "$TMP_OUTPUT" | ||
|
|
||
| - name: Check the test PASS/FAIL status | ||
| if: always() | ||
| run: | | ||
| cd /$TMP_DIR/ci_test | ||
| STATUS_OUTPUT=$(./cs.status.*) | ||
| echo "$STATUS_OUTPUT" | ||
| OVERALL_STATUS=$(echo "$STATUS_OUTPUT" | grep -oP 'Overall:\s*\K\w+') | ||
| if [ "$OVERALL_STATUS" == "PASS" ]; then | ||
| echo "Test passed" | ||
| else | ||
| echo "Test FAILED (Overall status: ${OVERALL_STATUS:-not found})" | ||
| exit 911 | ||
kuanchihwang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| fi | ||
|
|
||
| - name: Upload logs to GitHub artifacts when the CI test fails | ||
| if: failure() | ||
| uses: actions/upload-artifact@v4 | ||
kuanchihwang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| with: | ||
| name: logs.${{ matrix.test_type }}.${{ matrix.compset }}.${{ matrix.compiler }}.${{ matrix.runner }} | ||
| path: | | ||
| /$TMP_DIR/ci_test/${{ matrix.test_type }}.${{ matrix.res }}.${{ matrix.compset }}.cirrus_${{ matrix.compiler }}.cam-${{ matrix.test_config }}.*/cesm.log* | ||
| /$TMP_DIR/ci_test/${{ matrix.test_type }}.${{ matrix.res }}.${{ matrix.compset }}.cirrus_${{ matrix.compiler }}.cam-${{ matrix.test_config }}.*/atm.log* | ||
| retention-days: 7 | ||
This file contains hidden or 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
Submodule ccs_config
updated
5 files
| +10 −1 | machines/Depends.intel | |
| +8 −0 | machines/cmake_macros/nvhpc.cmake | |
| +39 −74 | machines/derecho/config_machines.xml | |
| +7 −1 | machines/derecho/intel_derecho.cmake | |
| +8 −0 | modelgrid_aliases_nuopc.xml |
13 changes: 13 additions & 0 deletions
13
cime_config/testdefs/testmods_dirs/cam/outfrq_rrtmgp_cirrus_gpu/shell_commands
This file contains hidden or 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,13 @@ | ||
| ./xmlchange NTASKS=4 | ||
| ./xmlchange NTHRDS=1 | ||
| ./xmlchange ROOTPE='0' | ||
| ./xmlchange ROF_NCPL=`./xmlquery --value ATM_NCPL` | ||
| ./xmlchange GLC_NCPL=`./xmlquery --value ATM_NCPL` | ||
kuanchihwang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ./xmlchange TIMER_DETAIL='6' | ||
| ./xmlchange TIMER_LEVEL='999' | ||
| ./xmlchange GPU_TYPE=a10 | ||
| ./xmlchange OPENACC_GPU_OFFLOAD=TRUE | ||
| ./xmlchange OVERSUBSCRIBE_GPU=TRUE | ||
| ./xmlchange NGPUS_PER_NODE=1 | ||
| ./xmlchange CAM_CONFIG_OPTS="--dyn none --physics-suites rrtmgp" | ||
| ./xmlchange RUN_STARTDATE=1979-01-01 | ||
25 changes: 25 additions & 0 deletions
25
cime_config/testdefs/testmods_dirs/cam/outfrq_rrtmgp_cirrus_gpu/user_nl_cam
This file contains hidden or 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,25 @@ | ||
| ! these are CPU FHISTC_LTso snapshots | ||
| ncdata = '/glade/sima_baselines/cam_sima_test_snapshots/cam_ne3pg3_fhistc_ltso_rrtmgp_derecho_gnu_before_c20251013.nc' | ||
| ncdata_check = '/glade/sima_baselines/cam_sima_test_snapshots/cam_ne3pg3_fhistc_ltso_rrtmgp_derecho_gnu_after_c20251013.nc' | ||
|
|
||
| ! tolerances for testing (currently have high tolerance due to CPU snapshots) | ||
| ncdata_check_err = .true. | ||
| min_difference = 1e-08 | ||
|
|
||
| ! vertical levels in snapshot | ||
| pver = 58 | ||
|
|
||
| ! Do radiation on every timestep we're testing | ||
| irad_always=3 | ||
|
|
||
| ! diagnostic output | ||
| hist_output_frequency;h1: 1*nsteps | ||
| hist_precision;h1: REAL64 | ||
| hist_add_inst_fields;h1: HR | ||
| ! Cloud output | ||
| hist_add_inst_fields;h1: TOT_CLD_VISTAU,TOT_ICLD_VISTAU,ICE_ICLD_VISTAU,LIQ_ICLD_VISTAU | ||
| ! Longwave diagnostic output | ||
| hist_add_inst_fields;h1: QRL,QRLC,FLNT,FLNTC,FLUT,FLUTC,LWCF,FLN200,FLN200C,FLNR,FLNS,FLNSC,FLDS,FLDSC,FUL,FDL,FULC,FDLC | ||
| ! Shortwave diagnostic fields | ||
| hist_add_inst_fields;h1: SOLIN,QRS,QRSC,FSNT,FSNTC,FSNTOA,FSNTOAC,SWCF,FSUTOA,FSN200,FSN200C,FSNR,SOLL,SOLS,SOLLD,SOLSD | ||
| hist_add_inst_fields;h1: FSNS,FSNSC,FSDS,FSDSC,FUS,FDS,FUSC,FDSC |
5 changes: 5 additions & 0 deletions
5
cime_config/testdefs/testmods_dirs/cam/outfrq_rrtmgp_cirrus_gpu/user_nl_cpl
This file contains hidden or 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,5 @@ | ||
| ! Set fixed orbital parameters | ||
| orb_mode='fixed_parameters' | ||
| orb_eccen = 0. | ||
| orb_obliq = 0. | ||
| orb_mvelp = 0. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.