-
Notifications
You must be signed in to change notification settings - Fork 38
Cron test script #128
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
Cron test script #128
Conversation
edwardhartnett
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
|
Ready for review now. I tested it out on Hera over the weekend. I fixed some odds and ends, added the UFS tests, and added a nicely formatted email with the results. I'll install it across our machines this week. It will be installed in a public |
aerorahul
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some suggestions for modularizing
|
How about this? I factored out the testing into its own script, and created another script |
aerorahul
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this much better.
One suggestion is to also turn on set -x. It produces a lot of output, but is worth it for debugging.
Do however set +x around any module commands.
|
I removed the if-block and fixed the typo. I added a special return code I enabled I don't want to get an email everyday with all that output. It's available in the logs. |
|
Done |
aerorahul
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great.
Thanks for setting this up.
| @@ -0,0 +1,76 @@ | |||
| #!/bin/bash -l | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed you are using -l so that $MODULESHOME/init/bash is sourced because that is the case on HPC's.
When a sudo executes this script, there will be no login shell.
My recommendation is to remove -l and do a source $MODULESHOME/init/sh wherever modules are being loaded/used/etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll try it out, but I don't think $MODULESHOME will even be set. You'll have to source the absolute directory like /apps/contrib/lmod/lmod/init/bash which is a pain to set for each machine.
…n on HPC systems There are several scripts: setup-cron.sh, build-hpc-stack.sh, test-applications.sh, and test-ufs.sh Configure variables in setup-cron.sh and then have cron run that. When run the setup-cron.sh will build hpc-stack and then run tests from downstream applications like the ufs-weather-model. An email will be sent with the results and logs will be saved the the log directory for more information.
setup_cron.shsets variables and is the entry point of cron. It then downloads hpc-stack and runsbuild-and-test.shwith the options given bysetup-cron.sh.Then,
build-and-test.shbuilds the develop branch hpc-stack (along with the debug version of ESMF), and then it checks out the ufs-weather-model and runs the regression test.A hash is saved after each build so that it is only re-built when there are changes.
A nicely formatted email is sent out with the results of the test, for example:
Fixes #81