Skip to content

Senh homme update bringing in Mark Taylor's split-form theta advection and tensor sponge layer. - #99

Merged
jtruesdal merged 18 commits into
stormspeedfrom
senh_homme_bump
Oct 29, 2026
Merged

jtruesdal merged 18 commits into
stormspeedfrom
senh_homme_bump

Conversation

@jtruesdal

@jtruesdal jtruesdal commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

senh: update HOMME to E3SM master; expose the tensor sponge layer

Moves senh's HOMME (E3SM submodule, sparse: preqx, share, theta-l, theta-l_kokkos) from 057df66 (Nov 2025) to E3SM master b70b675a7b (Oct 19, 2026), bringing in Mark Taylor's split-form theta advection and tensor sponge layer. Bit-for-bit at default settings on theta-l, theta-l_kokkos and threaded theta-l.

Commits

  1. 78e6c5cf HOMME → E3SM master. 25 upstream merges touch the sparse directories, including:

    • #8441 split-form theta advection; #8642 tensor sponge layer
    • #8597 tensorvisc and #8192 gradw fixes for Hommexx; #8027 CAAR race fix
    • #8013/#8392/#8630 horizontal and 3D turbulence options; #8627 fewer Fortran–C++ transfers

    cam_mods/namelist_mod.F90 is regenerated from master (still only the dead CAM-only use dyn_grid block removed).

  2. 558c3545 expose se_laplace_scaling (default 0: tensor sponge off, as before), wired like se_hypervis_scaling. Not exposed by EAM.

  3. f0829787 documentation: with se_laplace_scaling > 0, se_nu_top must be in tensor-scaled units.

  4. e6926b80 build-namelist safeguards for the tensor sponge: when se_laplace_scaling > 0 and se_nu_top is not set, use 5.0e-7 (E3SM HOMME test value; finer-grid value to be confirmed with Mark Taylor). A se_nu_top above 1.0e-2 (m²/s) stops build-namelist with an explanation. No effect at the default.

  5. 7063cd73 expose se_tom_sponge_start

Notes from review

  • New science is off by default: se_theta_advect_form stays 1 for theta-l (as in EAM), se_laplace_scaling = 0, do_3d_turbulence = .false..
  • Split form is available with no code change: set se_theta_advect_form = 2 (requires se_pgrad_correction = 0).
  • #8597 (stale tensorVisc in Hommexx) only affected EAMxx's initialization order. In senh and EAM, theta-l_kokkos prim_init2 runs dss_hvtensor (in the base prim_init2) before prim_init_elements_views copies both tensorVisc and tensorVisc_2 to C++, so senh already used the smoothed tensors. This is consistent with Kokkos being BFB.
  • Kokkos: Hommexx at master builds with CAM's Kokkos 4.5.1, the version E3SM pinned at 057df66. E3SM master now pins 5.1.0 through EKAT, which Hommexx doesn't use. Moving CAM to Kokkos 5.1 (C++20) is left as a separate decision.
  • cam_mods modules are wrappers around the HOMME modules, with no name clashes against master.

Testing (derecho, intel)

Persistent ne3pg2 FHISTC_LTso cases (h0a, h0i, cam.i), against the dec87846 reference

Case Result
theta-l BFB
theta-l_kokkos BFB
theta-l, 2 threads BFB

Builds clean (--clean atm), no circular dependencies.

Smoke tests of the new options (ne3pg2, 9 steps)

Setting theta-l theta-l_kokkos
se_laplace_scaling = 1, se_nu_top = 5e-7 completes, no NaNs, differs from default completes, no NaNs, differs from default
se_theta_advect_form = 2, se_pgrad_correction = 0 completes, no NaNs, differs from default not run

With the default se_nu_top, se_laplace_scaling > 0 aborts within a few steps (EOS bad state); hence commits 3 and 4. With commit 4, that combination is caught by build-namelist instead of at run time.

create_test against stormspeed_senh_pr4 (run on 558c3545)

Test BASELINE Restart / thread compare NLCOMP
ERP_Ln9.ne3pg2_ne3pg2_mt232.FHISTC_LTso theta-l PASS PASS differs: new se_laplace_scaling
ERP_Ln9.ne3pg2_ne3pg2_mt232.FHISTC_LTso theta-l_kokkos PASS PASS differs (same)
PET_Ln9_P24x2.ne3pg2_ne3pg2_mt232.FHISTC_LTso theta-l PASS PASS (COMPARE_base_single_thread) differs (same)
ERP_Ln27.ne16_g17.FKESSLER theta-l PASS PASS differs (same)
ERP_Ln27.ne16_g17.FKESSLER theta-l_kokkos PASS PASS differs (same)
ERP_Ln9.ne30_ne30_mg17.F2000climo (se dycore) PASS PASS PASS

New baselines generated: stormspeed_senh_pr5.

Commits 3–4 change only bld/ (namelist definition text and tensor-sponge logic). Checked with preview_namelists: the default case's namelist is unchanged; se_laplace_scaling = 1 alone gives se_nu_top = 5.0e-7; se_laplace_scaling = 1 with se_nu_top = 2.5e5 stops with the error.

GitHub CI

PASS

Copilot AI balanced review requested due to automatic review settings October 20, 2026 06:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@jtruesdal jtruesdal added the ready_for_ci This PR is ready for CI tests on CIRRUS cloud label Oct 20, 2026
@jtruesdal

Copy link
Copy Markdown
Collaborator Author

@mt5555 This PR updates senh's HOMME to E3SM master to allow access to the tensor sponge layer. Its currently off by default. When it's turned on and se_nu_top isn't set, build-namelist will use a default nu_top = 5e-7 (lifted from a HOMME regression test). This value ran with my toy resolution case. Does this value carry across resolutions or do you have some recommendation on default values?

The user can also set se_tom_sponge_start (default 0, keeping the existing profile). Are there default values you’d recommend to use with the tensor sponge for our high res stormspeed runs”

Copilot AI balanced review requested due to automatic review settings October 20, 2026 15:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

…d ChangeLog_stormspeed

- Update ccs_config to ccs_config_cesm1.0.91_nh.03 (jtruesdal/ccs_config_cesm):
  machines/izumi/gnu_izumi.cmake restores the unconditional
  -fallow-argument-mismatch -fallow-invalid-boz (non-Kokkos GNU builds on izumi
  failed on BOZ literals); machines/cmake_macros/nag.cmake sets MPICXX/SCXX so
  NAG builds that need C++ (Kokkos for theta-l) have a C++ compiler.
- Add doc/ChangeLog_stormspeed: StormSPEED tag history (cam6_4_211_ss.NN).
…pdate

- Update ccs_config to ccs_config_cesm1.0.91_nh.04 (jtruesdal/ccs_config_cesm):
  machines/izumi/intel_izumi.cmake adds -heap-arrays 64.  Izumi Intel runs
  segfaulted in routines with large automatic arrays (e.g. RRTMG) placed on the
  stack (#103).
- doc/ChangeLog_stormspeed: ss.01 entry updated; ss.00 entry expanded (CAM changes
  beyond cam6_4_211, forked externals, derecho and izumi status).
New composable testmods: outfrq9s_thetal_hy, outfrq9s_thetal_kokkos_hy (se_theta_hydrostatic_mode=.true., se_tstep_type=2), outfrq9s_thetal{,_kokkos}_rstunstruct (se_write_restart_unstruct=.true.), outfrq9s_thetal_interp (GLL interpolated output), outfrq9s_preqx (CAM_TARGET=preqx).

New testlist entries (37 tests, 122 machine/compiler instances): aux_cam_e3sm (tier-1 BFB gate for theta-l and theta-l_kokkos: SMS_D NH and hydrostatic, ERS, ERP, PEM, PET, ERI_D on ne3pg3 FHISTC_LTso; ERS ne16pg3; SMS_D FKESSLER ne16; SMS_D/ERS QPC6 GLL ne3; ne30 F2000climo ERS/ERP and FHISTC_MTso SMS on derecho intel), aux_cam_e3sm_perf (PFS timing), aux_cam_preqx, aux_cam_e3sm_unify (tests that require the unified SE interface: unstructured restart, interpolated output). Test definitions only; no source changes.
se_tstep_type=2 is not a theta-l timestepper (Fortran: bad choice of tstep_type; Kokkos: unsupported time_step_type). 5 (explicit KG5) is the non-IMEX scheme both Fortran and Kokkos theta-l implement. PET_Ln9 removed for theta-l_kokkos: CAM refuses threads for that target (dyn_readnl: set NTHRDS_ATM=1). theta-l PET kept.
ERI .ref2 (hybrid) runs failed in CTSM restFileMod (finidat year-consistency check for transient compsets). The existing CAM ERI tests use the outfrq3s_eri testmod, which sets check_finidat_year_consistency=.false. in user_nl_clm. New testmods outfrq3s_eri_thetal and outfrq3s_eri_thetal_kokkos include outfrq3s_eri and set CAM_TARGET; the two E3SM-dycore ERI_D_Ln18 tests now use them.
…a_hydrostatic_mode)

The restart writer only defines and writes W and PHINH when not in hydrostatic mode, but
read_restart_dynamics, read_elem and read_unstruct looked for and read them
unconditionally, so every hydrostatic theta-l restart aborted with
"read_restart_dynamics: cannot find W". As in E3SM/EAM, skip the lookups and reads in
hydrostatic mode and zero w_i and phinh_i (not prognostic; phinh_i is rediagnosed).
Found by the new ERS_Ln9 ...cam-outfrq9s_thetal_hy and _kokkos_hy tests.
HOMME C++ (ComposeTransportImpl, KokkosKernels SIMD templates) does not compile with
nvc++ on derecho. Fortran theta-l nvhpc tests are kept.
On izumi (MVAPICH2) the model's MPI_Win_shared_query returns size 0 and no
address to every non-leader rank, so node-shared tables (soil_erod, phys_prop,
mo_jlong, tracer_data) were null on 23 of 24 ranks.  init_comms now probes a
small window; if any rank cannot see it (or cam_shmem_force_private is set),
every rank becomes its own node (node_size 1, all leaders, leader_comm = all
ranks), so callers hold private copies and answers are unchanged.  The atm log
reports the probe result (PASSED/FAILED) and whether shared or private memory
is used.  New namelist cam_shmem_nl/cam_shmem_force_private (default .false.,
not written to atm_in by default); cam_shmem_init now runs after read_namelist.
…d source

From ESCOMP/CAM PR ESCOMP#1643 (commit 0b0bd23, fix_shared_read_and_carry):
- the in-memory carry-forward of a time record also requires the same file
  name, since PIO file handles can be reused across files;
- the node-shared source field is read on masterproc only and broadcast to
  the node leaders over cam_shmem_leader_comm (was: every leader read it).
SHM (SystemTestsCompareTwo, one build): run one with default cam_shmem
settings, run two with cam_shmem_force_private = .true.; history must be
identical.  Where the shared-window probe passes (derecho) this proves the
shared tables match private memory; where it fails (izumi) it exercises the
fallback.  Tests in aux_cam:
  SHM_D_Ln9.ne3pg3_ne3pg3_mt232.FHISTC_LTso.cam-outfrq9s  (phys_prop, soil_erod, tracer_data)
  SHM_D_Ln3.f10_f10_mg37.QPMOZ.cam-outfrq3s_chemproc     (mo_jlong)
aux_cam_e3sm (gate): derecho intel runs the full theta-l/theta-l_kokkos set
(SMS_D, ERS, ERP, PEM, PET, ERI_D, ne16pg3, QPC6 GLL, FKESSLER, ne30);
derecho gnu runs SMS_D/ERS core (NH and hydrostatic), FKESSLER and QPC6 SMS_D;
izumi gnu runs the SMS_D/ERS core.
Removed from theta-l testing until their blockers are fixed (issues filed):
  derecho nvhpc - HOMME C++ (Kokkos) does not build with nvc++; Fortran ERP
                  not reproducible across layout/threads (under investigation)
  izumi nag     - E3SM HOMME sort_mod.F90 declaration order (upstream)
  izumi intel   - COMPOSE segfault (under investigation)
New category aux_cam_e3sm_canary: SMS_D_Ln9 ne3pg3 FHISTC_LTso theta-l on derecho
nvhpc, to notice when NVHPC works again.  aux_cam_e3sm_unify moves from izumi gnu
to derecho gnu.  The pre-existing FKESSLER ERS_Ln27/ERP_Ln27 theta-l tests keep
aux_cam on derecho intel and izumi gnu only.
Moves the senh/dycore submodule (sparse: preqx, share, theta-l, theta-l_kokkos) across 25 E3SM merges touching those directories, including Mark Taylor split-form theta advection (#8441), tensor sponge (#8642), tensorvisc and gradw fixes for Hommexx (#8597, #8192), the CAAR race fix (#8027), horizontal/3D turbulence options (#8013, #8392, #8630), and Fortran-C++ transfer reductions (#8627). New options default to previous behavior (theta_advect_form=0, laplace_scaling=0, do_3d_turbulence=.false.). Regenerated cam_mods/namelist_mod.F90 from master (still only the dead CAM-only use dyn_grid block removed). Hommexx at master builds with CAM libraries/kokkos 4.5.1 (E3SM master pins 5.1.0). Builds (clean atm; no circular dependencies); BFB vs ref_dec87846 on ne3pg2 theta-l, theta-l_kokkos and theta-l with 2 threads.
New senh dyn_se_inparm option wired like se_hypervis_scaling (namelist definition, namelist_defaults_senh 0.0 for theta-l and preqx, build-namelist senh list, dyn_readnl declaration/namelist/default/bcast/assignment). 0 keeps the constant-coefficient sponge Laplacian; a positive value selects the tensor Laplacian from E3SM HOMME PR #8642 (Mark Taylor). Not exposed by EAM. Builds (clean atm; no circular dependencies); BFB vs ref_dec87846 (ne3pg2 theta-l, theta-l_kokkos).
…units

Documentation only. With se_laplace_scaling > 0, se_nu_top is a tensor-scaled coefficient (E3SM HOMME tests: laplace_scaling = 1, nu_top = 5e-7 to 8e-7); with the default se_nu_top the run aborts in HOMME EOS checks within a few steps. Smoke tests on ne3pg2 (theta-l and theta-l_kokkos with se_laplace_scaling = 1, se_nu_top = 5e-7; theta-l with se_theta_advect_form = 2): all complete without NaNs and differ from the default as expected.
…2/s values

When se_laplace_scaling > 0 (tensor sponge) and se_nu_top is not set, use 5.0e-7 (E3SM HOMME tests, low resolution; value for finer grids to be confirmed with Mark Taylor). If se_nu_top > 1.0e-2 it is a constant-coefficient value in m^2/s and build-namelist stops with an explanation, instead of the run aborting in HOMME EOS checks. No effect at the default se_laplace_scaling = 0 (tensor sponge stays off). Verified with preview_namelists: default case unchanged (se_laplace_scaling = 0, se_nu_top = 2.5e5); se_laplace_scaling = 1 alone gives se_nu_top = 5.0e-7; se_laplace_scaling = 1 with se_nu_top = 2.5e5 stops with the error.
New senh dyn_se_inparm option wired like se_laplace_scaling (namelist definition, namelist_defaults_senh 0.0 for theta-l and preqx, build-namelist senh list, dyn_readnl declaration/namelist/default/bcast/assignment). 0 keeps HOMME standard sponge profile (follows the model-top pressure); a positive value starts the sponge at that pressure. Applies to both the constant-coefficient and tensor sponge; E3SM HOMME tests use 15-30 hPa with the tensor sponge. Builds (clean atm; no circular dependencies); BFB vs ref_dec87846 (ne3pg2 theta-l, theta-l_kokkos).
Copilot AI balanced review requested due to automatic review settings October 28, 2026 21:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

jtruesdal added a commit that referenced this pull request Oct 29, 2026
E3SM-dycore regression tests and the bugs they found (cam6_4_211_ss.02)
Review summary (prepared with Claude; every change dry-run in a sandbox clone before applying; merge simulated against stormspeed and clean)

Scope: E3SM-dycore regression tests plus the problems they exposed. 11 commits: tests and testmods, hydrostatic restart fix, cam_shmem probe and fallback, tracer_data fix (from ESCOMP/CAM ESCOMP#1643), new SHM system test, platform reorganization, ChangeLog.

Code changes reviewed:

senh/restart_dynamics.F90: hydrostatic restarts no longer read W/PHINH (not written in hydrostatic mode); w_i/phinh_i zeroed, as in E3SM. NH path unchanged.
cam_shmem_mod.F90: one collective 64-byte window probe at init; if any rank can’t see the leader’s window (or cam_shmem_force_private), every rank becomes its own node, so callers keep working unchanged with private copies. cam_shmem_init moved after read_namelist. New namelist variable defined but not written to atm_in (no namelist changes for existing tests).
tracer_data.F90: identical to ESCOMP/CAM ESCOMP#1643’s version (+30/−4).

Testing:

Derecho gate aux_cam_e3sm: Intel 33/33, GNU 16/16 PASS.
SHM (shared vs private must be BFB): Derecho 3/3 and Izumi 4/4 PASS; logs confirm both modes. Probe PASSES with Derecho MPICH and Izumi GNU MVAPICH2, FAILS with Izumi Intel/NAG MVAPICH2 (#106), where the fallback gives identical answers.
Hydrostatic restart: ERS theta-l and theta-l_kokkos, Intel and GNU: 4/4 PASS (previously “cannot find W”).
Izumi aux_cam GNU and NAG vs cam6_4_211: answers BFB, so the tracer_data change altered no answers; NAG full physics runs on Izumi for the first time.
Derecho aux_cam Intel/NVHPC vs ss.00: in progress at merge; results to be recorded with the next tag.

Known issues (none on a gate platform): #110 (Izumi GNU 12.4 optimized ERS NaNs in HOMME diagnostics after restart; debug passes), #107 (Izumi Intel optimized FoX/CDEPS startup crash), #101 (NVHPC decomposition reproducibility, canary only).

Answers: no changes (SHM BFB, restart-only fix, Izumi aux_cam BFB).

Merge: “Create a merge commit”; #99 (ss.03) is built on this branch.
Copilot AI balanced review requested due to automatic review settings October 29, 2026 05:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@jtruesdal
jtruesdal merged commit 939d53f into stormspeed Oct 29, 2026
3 of 12 checks passed
@jtruesdal
jtruesdal deleted the senh_homme_bump branch October 29, 2026 05:10
@jtruesdal

Copy link
Copy Markdown
Collaborator Author

Review summary (prepared with Claude; changes dry-run in a sandbox clone; rebase onto PR 1 verified by identical patch-ids; merge sequence #109 → #99 simulated and clean)

Scope: HOMME update 057df66 → E3SM master b70b675a7b (Mark Taylor’s split-form theta advection; tensor sponge-layer Laplacian, E3SM PR #8642), plus two new namelist options and the ss.03 ChangeLog entry. 6 commits, 8 files.

Changes reviewed:

se_laplace_scaling (default 0: constant-coefficient sponge as before; > 0: tensor sponge, with se_nu_top in tensor-scaled units).
se_tom_sponge_start (hPa, default 0: HOMME’s standard profile; > 0 sets where the top sponge begins).
build-namelist guard: with the tensor sponge, se_nu_top defaults to 5.0e-7, and values > 1.0e-2 (m²/s) stop with an error, preventing a silent ~10¹² viscosity error.
Read and broadcast in namelist_mod.F90/dyn_comp.F90; definitions and defaults for theta-l and preqx.

Testing (Derecho, vs the ss.02 gate baselines stormspeed_2647799a_e3sm_*):

GNU aux_cam_e3sm: 16/16 BFB.
Intel aux_cam_e3sm: 30/33 BFB; the remaining 3 ne30 tests were in progress at merge.
Namelist: only the two new variables, in every test; se_nu_top unchanged.
CAM’s other aux_cam tests don’t use HOMME code and weren’t rerun. GitHub CI: CIRRUS runners offline at merge.

Answers: none changed with default settings (BFB); the new options change answers only when set.

Merge: “Create a merge commit”. Baselines: stormspeed_d3d38547_e3sm_intel/_gnu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready_for_ci This PR is ready for CI tests on CIRRUS cloud

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants