Repository navigation
GitHub Actions CI: CPU build tests for GNU, Intel OneAPI, and NVHPC - #1524
cenamiller wants to merge 5 commits into
Conversation
|
Depending on what science changes have been merged into develop at the same time, we shouldn't expect the ect to pass until I generate a new summary file. But let's see! |
|
@cenamiller Thanks for this new PR! |
|
@cenamiller @abishekg7 Following up on the comments from PR #1469 (which this PR replaces), I agree with most of them, and I'm fine with addressing some of them (e.g., adding build tests for the Is it the case as of now that all of the tests will run with every push to a PR branch? |
It is now a pared down set of tests, but yes, they will be triggered with every push to a PR branch. |
|
Hi, yes, agreed with Abishek. I've been thinking about this. It may be nice to have the "runs on every push to a PR" branch feature for a bit, because it makes it easier to trigger tests on old PRs, with just a push. Otherwise, contributors would need to close/reopen the PR in order to trigger tests. But once we've run them on some old PRs, we can very easily turn that trigger off. And anyway, if the tests make it to the default branch, you'll be able to manually dispatch tests when you think it's appropriate and we won't be so beholden to an automatic trigger. |
|
@cenamiller @abishekg7 What do you all think about (1) removing the ECT tests from this PR, and (2) adding build tests for the |
|
@mgduda Yes, we can do that! It won't take very long to set up, but I don't have those tests ready as stand-alones. I can submit them before lunch tomorrow though. Would you like them to run on the same triggers as these? And which compilers for each? The options for 'just build' would be GNU, Intel OneAPI, NVHPC (for CPU) and NVHPC+OpenACC. And for sides we have PIO/SMIOL and MPICH/OpenMPI. |
In the interest of keeping everything as simple as possible for now, would it be reasonable to add an extra step to the build workflows to compile the |
|
I think keeping the existing build matrix and triggers, and just adding the build of |
Adding a build of the |
Build the atmosphere and init_atmosphere cores in NCAR hpcdev containers on GitHub-hosted runners, atmosphere first, in one source tree. Each run saves compiler and library versions, the build command, and build logs. Runs on PRs against develop and on push to master.
2268943 to
96b9518
Compare
|
Squashed to a single commit and rebased onto the current |
|
|
||
| # Set up I/O configuration | ||
| if [ "${{ inputs.use-pio }}" = "true" ]; then | ||
| export PIO_ROOT=${PIO_ROOT:-/container/pio} |
There was a problem hiding this comment.
I think this should be PIO, not PIO_ROOT. According to the MPAS Makefile
There was a problem hiding this comment.
Thank you, good catch! That was a hold-over from the way the container named the PIO library path. Fixed in 917b43, and testing using SMIOL or PIO passed
| echo "::error::${PRINT_ENV} not found" | ||
| exit 1 | ||
| fi | ||
| export COMPILER_FAMILY MAKE_TARGET ARCH CLEAN_CMD MAKE_CMD |
There was a problem hiding this comment.
Claude suggested this issue. I haven't double checked it myself.
make-flags gets split on spaces. ${MAKE_CMD} and ${CLEAN_CMD} run unquoted. A value like FFLAGS_OPT="-O2 -g" reaches make as two broken words, and any * or ? gets expanded as a filename pattern. Building the command as a bash array would fix it.
There was a problem hiding this comment.
Thanks, agreed. I've removed the make-flags input from this PR for now, because we aren't really using it yet. The only extra flags left are the compiler defaults in ci-config.env. I’ll add the make-flags back with proper quoting when a build needs it. Removed in bc87306.
| build-timeout: | ||
| description: 'Build timeout in minutes' | ||
| required: false | ||
| default: '20' |
There was a problem hiding this comment.
Could this be bumped up a bit? As we're building two CORES now?
| export USE_PIO2=true | ||
| else | ||
| unset PIO | ||
| export USE_PIO2=false |
There was a problem hiding this comment.
USE_PIO2 just needs to be unset I think
|
I'm adding a bunch of tasks as issues (to my fork) that can be addressed in the second iteration of the CI. Feel free to ignore them for now. |
Got it. I'm fine with leaving the order as is for now. |
| # Disable MPI Fortran 2008 bindings (not supported by MPICH | ||
| # builds in current containers). | ||
| NVHPC_EXTRA_MAKE_FLAGS="MPAS_MPI_F08=0" | ||
| ONEAPI_EXTRA_MAKE_FLAGS="MPAS_MPI_F08=0" |
There was a problem hiding this comment.
It might be worth checking whether these are actually required.
| # ── Makefile target mapping ─────────────────────── | ||
| # MAKE_TARGET_{compiler} → MPAS Makefile target name. | ||
|
|
||
| MAKE_TARGET_gcc=gfortran |
There was a problem hiding this comment.
Let's change gfortran to gnu.
| description: 'Floating-point precision (single, double)' | ||
| required: false | ||
| type: string | ||
| default: 'double' |
There was a problem hiding this comment.
Until we enable the ECT tests, maybe we could switch to single precision for now.
Replaces #1469 (closed prematurely).
Adds initial GitHub Actions CI for MPAS-A: build tests for the
atmosphereandinit_atmospherecores with GNU, Intel OneAPI, andNVHPC compilers and MPICH on CPU. This is a subset of the testing
developed on the NCAR/MPAS-Model-CI fork.
Each workflow:
atmosphere, theninit_atmospherein the same source tree(skipped if
atmospherefails), in NCARhpcdevcontainers onGitHub-hosted runners. Single precision and SMIOL are the defaults.
develop(or when someone pushes a newcommit to an open PR) and on push to
master.run summary, and uploads the build logs as an artifact
(
build-logs-<sha>-<compiler>-<mpi>-<io>-<precision>, kept 7 days).More tests and build options are available on the NCAR/MPAS-Model-CI
fork and can follow in future PRs.
Files:
.github/ci-config.env: container images and make targets.github/actions/build-mpas/: builds an MPAS core(
print-build-env.shprints versions and the build command).github/actions/resolve-container/: resolves the container image.github/workflows/_build-compiler.yml: reusable build workflow.github/workflows/build-{gcc,intel,nvhpc}-mpich.yml: 3 callersDeveloped in
NCAR/MPAS-Model-CI. Claude assistance.