Compilation Tests for ARW (#2115)
TYPE: enhancement
KEYWORDS: testing, compilation
SOURCE: internal
DESCRIPTION OF CHANGES:
Problem:
The testing frameworks (github actions nor Jenkins) don't run a wide
array of compilation tests per compiler family commonly available.
Solution:
Use the github actions / hpc-workflows testing framework to run serial,
sm, dm, and dm+sm for GNU, Intel Classic & OneAPI, and PGI/nvhpc on
Derecho. Tests will run collectively in one node in parallel to maximize
core hour allocations.
TESTS CONDUCTED:
1. Tests can be run locally on Derecho by using the .ci/hpc-workflows
runner.py to launch all tests as separate jobs, but this is inefficient
and not exactly as the tests run. To emulate the tests as done in the
github actions workflow use the additional `args` set in the respective
testSet of .github/workflows/.ci.yml and provide alternate directories
from which to compile. This can be facilitated via :
* clone WRF branch that features these changes into `<dir>`
* list names of tests you want space-delimited in variable, e.g. `export
tests="make-gnu-serial make-gnu-dm"`
* create copy test dirs with something like `printf "%s\n" $tests |
xargs -i -P 4 cp -Rp <dir> {}`
* Create alt dirs run locations from test definitions. In this case one
directory up from each, this can be done with `export altDirs=$( printf
"../%s/.ci " $tests )` (note the extra space!)
* launch tests using runner and join args along with `-alt $altDirs`
* Final command should look like
```
<dir>/.ci/hpc-workflows/.ci/runner.py <dir>/.ci/wrf_compilation_tests-make.json -t $tests -a <account> -p <num parallel> -tp 1 -j='{"node_select":{"-l ":{"select":1}}}' -jn <job name> -alt $altDirs
```