Repository navigation
Disable floating point contractions on GPU architectures - #586
andrewdnolan wants to merge 2 commits into
Conversation
Also disabling fuse, multiply, add optimazation explicity where needed.
Testing,
|
|
@andrewdnolan, I'll also try to point you to a Polaris branch you can use for testing, together with deployment instructions. A lot is piling up because we're badly out of sync with E3SM! |
|
@andrewdnolan, you can test on Aurora with the Polaris branch xylar/polaris:update-to-mache-5.0.0 and a Spack deployment I built for This writes The baseline can't come from Polaris's Then submit the job script in each work directory. For CTests, Posted by Claude Code on @xylar's behalf. The testing, analysis and wording above are AI-authored; please check them accordingly. |
|
Thanks @xylar! I'll give this a go on Monday and report back. |
|
Nevermind, Aurora testing will have to wait until maintenance completes tomorrow afternoon. |
|
@mwarusz I'd like hear your thoughts on how to proceed here. During an Omega developer meeting a few weeks ago, when this PR first went up, I recall you expressing reservations about the approach here and it's performance implications. Unfortunately, I haven't had the time to get back to this. But this is definitely needed before the merge of the Omega fork back into E3SM. We are wondering if you are open to letting this go in as is (subject to sufficient testing)? We can open an issue to follow up on whether all floating contractions need to be disabled, or there's some subset that still allow for ERS/PEM tests to pass. Another thing to follow up on is: understanding why EAMxx can get BFB reproducibility without disabling floating point contractions. |
mwarusz
left a comment
There was a problem hiding this comment.
I am fine with merging this PR and revisiting this issue later. I am approving, but could you:
- create a GitHub issue about this
- add a CMake option
OMEGA_DISABLE_FP_CONTRACT, defaulting toON, and add these flags conditionally based on its value
|
Yes! Can do for both of those. The cmake option is a good call, these are really only needed in coupled mode. |
Put the flags that disable floating point contraction on CUDA, HIP and SYCL behind a CMake option, OMEGA_DISABLE_FP_CONTRACT, which defaults to ON. Building with -DOMEGA_DISABLE_FP_CONTRACT=OFF leaves contraction to the compiler, as before, for comparing performance.
grnydawn
left a comment
There was a problem hiding this comment.
Approve. The change is correct, it is needed for coupled runs on pm-gpu, and the flags cost little. It does not make ERS and PEM pass everywhere, though; details below.
I've added the OMEGA_DISABLE_FP_CONTRACT option Maciej asked for to this branch as 63fc21e. It defaults to ON, which gives exactly the flags of the first commit; -DOMEGA_DISABLE_FP_CONTRACT=OFF leaves contraction to the compiler.
Tested with ERS_Ld5_Vmct.T62_oQU240.COMEGA-IAF: this PR's two commits on develop (ede8e22014; also 23b13afac5 on pm-gpu), and this PR's first commit, 533e57a, on its own base on pm-gpu.
| Machine (compiler) | Code | ERS without this PR | ERS with this PR | Cost of this PR |
|---|---|---|---|---|
pm-gpu (gnugpu) |
this PR's base 73469eb9ed |
FAIL, 2 of 2 | PASS, 3 of 3 | – |
pm-gpu (gnugpu) |
develop ede8e22014, 23b13afac5 |
FAIL, 6 of 6 | FAIL, 5 of 6 | ~1% OCN run time |
Frontier (craycray-mphipcc) |
develop ede8e22014 |
PASS | PASS | within run-to-run noise |
Aurora (intelgpu) |
develop ede8e22014 |
FAIL | FAIL | within run-to-run noise |
Chrysalis (intel, CPU) |
develop ede8e22014 |
PASS | PASS | none (no flags on CPU) |
What works:
- On pm-gpu the flags fix ERS at this PR's base: 0 of 2 without them, 3 of 3 with them.
- The option works.
ON, the default, gives the flags toOmegaLib,ocnand every CTest;OFFis bit for bit with develop in Polarisomega_pron pm-gpu. CPU builds get no flags. - CTests pass on pm-gpu and Chrysalis, and every Polaris
omega_prtask runs.
Follow-ups, not blockers for this PR:
- pm-gpu at current develop: ERS still fails 5 of 6 with this PR. A second cause came in with the 20 merges after this PR's base (
73469eb9ed..ede8e22014). It is not KPP (ERS fails with KPP switched off too), and not the METIS/ParMETIS views (#622). It needs its own issue. - Aurora: Omega in E3SM does not repeat itself run to run, on develop too (a rerun differs in 45 coupler fields). PEM cannot pass there, and ERS fails with or without this PR.
- PEM fails on every machine tested, from #512 (#626), so it cannot yet show whether this PR helps.
- pm-gpu run-to-run variation: every coupled build, with or without the flags, gives slightly different answers when rerun, though standalone Omega in Polaris repeats itself. It does not fail ERS on its own, but it is a defect.
- Frontier: ERS passes without the flags, so the HIP flags are not shown to be needed there.
Not tested: CTests and Polaris on Frontier and Aurora.
Disable floating point contractions. Also disabling fuse, multiply, add optimizations explicitly where needed.
Without these flags we were seeing
ERSandPEMtests fail theCOMPAREstep withaurora_oneapi-ifxgpuandpmgpu_gnugpu. Interesting, theCOMPAREfailures were not for all GPU machine,frontier_craycray-mphipccwas passed (see here). I believe that is explained by the compiler defaults forhipccversus CUDA'snvcc.Resolves #564
Checklist
Linting
Building
Testing
aurora, oneapi-ifx, mpich
chrysalis, oneapi-ifx, openmpi
frontier, craygnu, mpich
frontier, craygnu-mphipcc, mpich
pm-cpu, gnu, mpich
pm-gpu, gnugpu, mpich
Provide relevant details in a comment to the PR titled
Testingwith the following:have been run on and indicate that are all passing.
has passed, using the Polaris
e3sm_submodules/Omegabaseline-pfor both the baseline (Polarise3sm_submodules/Omega) and the PR build