-
Notifications
You must be signed in to change notification settings - Fork 54
(PLATFORM-1077) Adding CI/CD capabilities and Unit Tests + Add if(allocated) checks to avoid segfaults #82 #76
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 44 commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
a1b8d1f
test
kbooker79 75c2ff8
platform-1077, adding initial CI/CD for Jenkins
kbooker79 a6ba2a0
Removing typo.
kbooker79 ac9750c
Fixing other typo
kbooker79 22bcb97
Adding unit tests script
kbooker79 5705b9b
Adding label removal
kbooker79 0cf35af
Adding auth token from Jenkins.
kbooker79 697fdba
Checking env variables
kbooker79 2831d28
Troubleshooting
kbooker79 ba0d045
More troubleshooting
kbooker79 fd3b29a
Updating
kbooker79 3d62c00
Updating
kbooker79 43f20e1
Updating
kbooker79 967efff
Updating to use CHANGE_URL rather than GIT_URL
kbooker79 00d1289
Updating to use token for testing repo.
kbooker79 da3280c
Updating
kbooker79 bef267e
Updating auth
kbooker79 4e7af4c
PLATFORM-1077, removing pendatic comment file.
kbooker79 2c1b31d
Merge branch 'NOAA-PSL:master' into platform-1077
kbooker79 9c95c32
Update Jenkinsfile
zach1221 35c32c0
Update stochastic_physics.F90 fix do_sppt logic
zach1221 9f235a4
Create input.nml
zach1221 0de7a90
Update run_standalone.sh input-data and account
zach1221 ebb4758
Update standalone_stochy.F90 add new spp parameters and allocation
zach1221 7160eb4
Update Jenkinsfile
zach1221 b762de9
Update Jenkinsfile
zach1221 539923f
Update Jenkinsfile
zach1221 3f328d1
Update Jenkinsfile
zach1221 72fbbd9
Merge branch 'NOAA-PSL:master' into platform-1077
zach1221 3d4ee1c
Update input.nml enable SPP
zach1221 3849844
Update input.nml
zach1221 3e6b455
Update input.nml update n_var_spp
zach1221 c7bb765
Update modules.orion.intel
zach1221 e152b97
update all
zach1221 5501137
add unit test changes
zach1221 e98071d
Update Jenkinsfile
zach1221 c31399e
Update Jenkinsfile
zach1221 3d9ae23
Update Jenkinsfile
zach1221 889fb6f
Update Jenkinsfile
zach1221 2cc8b93
update input.nml for spp pert
jkbk2004 bd0cf1e
Update modules.orion.intel remove test
zach1221 4b8ba03
Update Jenkinsfile remove set -e
zach1221 206ce48
Merge pull request #4 from kbooker79/Unit_test-Updates
zach1221 a3cd531
Update developers_guide.rst unit test readme section
zach1221 236f836
Update Jenkinsfile remove aws account#
zach1221 00845cc
Update stochastic_physics.F90
jkbk2004 4859bfe
Add if(allocated(*_wts)) checks to filling weights in run_stochastic_…
NickSzapiro-NOAA b0c1ef0
Merge branch 'NOAA-PSL:master' into platform-1077
jkbk2004 4bb9df9
Separate pert_epbl and do_ocnsppt logic in run_stochastic_physics_ocn…
NickSzapiro-NOAA b5cec8b
Merge remote-tracking branch 'upstream/fix_alloc_wts' into platform-1077
jkbk2004 00fb16d
cleaned up a bin file: not needed
jkbk2004 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,59 @@ | ||
| pipeline { | ||
| agent none | ||
| environment { | ||
| GITHUB_TOKEN = credentials('GithubJenkinsNew') | ||
| AWS_ACCOUNT_ID = 211527314271 | ||
| } | ||
| stages { | ||
| stage('Run Unit Tests') { | ||
| agent { | ||
| label 'hera' | ||
| } | ||
| steps { | ||
| script { | ||
| cleanWs() | ||
| checkout scm | ||
| sh ''' | ||
| cd unit_tests | ||
| echo "Running Unit Tests on ${NODE_NAME}" | ||
| ./compile_standalone.hera_gnu | ||
| cp -r /scratch2/NAGAPE/epic/UFS-WM_RT/NEMSfv3gfs/input-data-20221101/FV3_input_data/INPUT INPUT | ||
| srun --label -A epic -n 24 standalone_stochy.x | ||
| mkdir stochy_out | ||
| mv workg* stochy_out | ||
| cd stochy_out/ | ||
| ls | ||
| ''' | ||
| } | ||
| } | ||
| } | ||
| } | ||
| post { | ||
| always { | ||
| node('built-in') { | ||
| sh ''' | ||
| GIT_OWNER=$(echo $CHANGE_URL | cut -d '/' -f4) | ||
| GIT_REPO_NAME=$(echo $CHANGE_URL | cut -d '/' -f5 | cut -d '.' -f1) | ||
| echo "Testing successfully completed...removing label(s)" | ||
| curl --silent -X DELETE -H "Accept: application/vnd.github.v3+json" -H "Authorization: Bearer ${GITHUB_TOKEN}" https://api.github.com/repos/${GIT_OWNER}/${GIT_REPO_NAME}/issues/${CHANGE_ID}/labels -d '{"labels":["run-unit-tests"]}' | ||
| ''' | ||
| } | ||
| } | ||
| success { | ||
| node('built-in') { | ||
| echo 'This will run only if successful.' | ||
| sh ''' | ||
| aws sns publish --topic-arn "arn:aws:sns:us-east-1:${AWS_ACCOUNT_ID}:Jenkins-CICD-Notifications" --region us-east-1 --message '{"version":"1.0","source":"custom","content":{"description":":sunny: Jenkins build *'"$JOB_NAME"' '"$BUILD_NUMBER"'* with *PR-'"$CHANGE_ID"'* *succeeded*"}}' | ||
| ''' | ||
| } | ||
| } | ||
| failure { | ||
| node('built-in') { | ||
| echo 'This will run only if the run was marked as unstable.' | ||
| sh ''' | ||
| aws sns publish --topic-arn "arn:aws:sns:us-east-1:${AWS_ACCOUNT_ID}:Jenkins-CICD-Notifications" --region us-east-1 --message '{"version":"1.0","source":"custom","content":{"description":":warning: Jenkins build *'"$JOB_NAME"' '"$BUILD_NUMBER"'* with *PR-'"$CHANGE_ID"'* *failed!*"}}' | ||
| ''' | ||
| } | ||
| } | ||
| } | ||
| } | ||
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
Binary file not shown.
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
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
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,101 @@ | ||
| &amip_interp_nml | ||
| interp_oi_sst = .true. | ||
| use_ncep_sst = .true. | ||
| use_ncep_ice = .false. | ||
| no_anom_sst = .false. | ||
| data_set = 'reynolds_oi', | ||
| date_out_of_range = 'climo', | ||
| / | ||
|
|
||
| &atmos_model_nml | ||
| blocksize = 32 | ||
| chksum_debug = .false. | ||
| dycore_only = .false. | ||
| fhout = 1 | ||
| fhmax = 800 | ||
| fhmaxhf = -1 | ||
| ccpp_suite = 'FV3_GFS_v15p2_coupled' | ||
| / | ||
|
|
||
| &diag_manager_nml | ||
| prepend_date = .F. | ||
| / | ||
|
|
||
| &fms_io_nml | ||
| checksum_required = .false. | ||
| max_files_r = 100, | ||
| max_files_w = 100, | ||
| / | ||
|
|
||
| &fms_nml | ||
| clock_grain = 'ROUTINE', | ||
| domains_stack_size = 40000000, | ||
| print_memory_usage = .false. | ||
| / | ||
|
|
||
| &fv_grid_nml | ||
| grid_file = 'INPUT/grid_spec.nc' | ||
| / | ||
|
|
||
| &fv_core_nml | ||
| layout = 1,4 | ||
| io_layout = 1,1 | ||
| npx = 97, | ||
| npy = 97, | ||
| ntiles = 6, | ||
| grid_type = -1 | ||
|
|
||
| / | ||
|
|
||
| &gfs_physics_nml | ||
| do_spp = .true. | ||
| do_sppt = .true. | ||
| do_shum = .true. | ||
| do_skeb = .true. | ||
| lndp_type = 2 | ||
| n_var_lndp = 2 | ||
| n_var_spp = 5 | ||
|
|
||
| / | ||
|
|
||
| &nam_sppperts | ||
| iseed_spp = 4,4,4,4,4 | ||
| spp_lscale = 250000.0,250000.0,250000.0,250000.0,250000.0 | ||
| spp_prt_list = 0.2,0.2,0.75,0.2,0.2 | ||
| spp_sigtop1 = 0.1,0.1,0.1,0.1,0.1 | ||
| spp_sigtop2 = 0.025,0.025,0.025,0.025,0.025 | ||
| spp_stddev_cutoff = 1.5,1.5,2.5,1.5,1.5 | ||
| spp_tau = 21600.0,21600.0,21600.0,21600.0,21600.0 | ||
| spp_var_list = 'pbl','sfc','mp','rad','gwd' | ||
| / | ||
|
|
||
| &nam_stochy | ||
| SKEBNORM=1, | ||
| SKEB_NPASS=30, | ||
| SKEB_VDOF=5, | ||
| SKEB=0.5, | ||
| SKEB_TAU=2.16E4, | ||
| SKEB_LSCALE=1000.E3, | ||
| SHUM=0.01, | ||
| SHUM_TAU=21600, | ||
| SHUM_LSCALE=500000, | ||
| SPPT=0.8,0.4,0.1 | ||
| SPPT_TAU=21600,86400,216000 | ||
| SPPT_LSCALE=500000,1000000,2000000 | ||
| SPPT_LOGIT=.TRUE., | ||
| SPPT_SFCLIMIT=.TRUE., | ||
| ISEED_SHUM=1, | ||
| ISEED_SKEB=2, | ||
| ISEED_SPPT=3, | ||
| STOCHINI=.false. | ||
|
|
||
| / | ||
| &nam_sfcperts | ||
| lndp_type=2 | ||
| lndp_var_list='vgf','smc' | ||
| lndp_prt_list=1.0,0.5 | ||
| iseed_lndp=4,5 | ||
| lndp_tau= 86400, | ||
| lndp_lscale = 250000, | ||
| lndp_model_type = 1 | ||
| / |
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
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
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.