Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Parent documents (Physics, GEOSgcm_GridComp, fixture) are linked from the header
the solar band exports built in loops) is added in `SetServices`.
- Code owners are in `.github/CODEOWNERS`: the radiation team, and the CMake team for
`CMakeLists.txt` files.
- Error handling in code you write or touch uses the MAPL3 macros (`@MAPL/include/MAPL_ErrLog.h`): `_RC` on calls, `_STAT` on `allocate`, `_ASSERT(cond, msg)` with a message, and `_RETURN(_SUCCESS)` at every successful exit. Convert `RC=STATUS`/`VERIFY_`/`ASSERT_`/`RETURN_` in any routine you change. `_RC` expands to two statements (`rc=status);_VERIFY(status`), so it cannot end a one-line `if`; use a block `if`. Do not add decorative `!----` separator lines.

## Build and test

Expand Down
15 changes: 15 additions & 0 deletions regression/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,21 @@ If a case's data directory is missing, `run_case.cmake` prints
"Regression data not found ... skipping" and the test **passes without
running**.

## Run time

Measured 2026-11-09 with `ctest -L REGRESSION` (ifx Debug, 6 PEs, `logging.yaml` in place). Times are per-rank means from the MAPL profiler output in the test log.

| Case | Test | Run | RRTMGP | Other |
|---|---|---|---|---|
| `irrad-sa` | 8.2 s | 5.3 s | 5.25 s (LW) | checkpoint writes 0.2 s |
| `solar-sa` | 8.4 s | 5.9 s | 5.46 s (SW) | `BALANCE` 0.24 s |
| `radiation` | 17.3 s | 11.7 s | 4.8 s (LW) + 5.4 s (SW) | COSP 0.5 s |
| `satsim-sa` | 3.5 s | 0.7 s | none | COSP 0.6 s |

Unlike the Moist cases, these are dominated by the radiation computation, not by MAPL: MAPL initialize is about 1-1.5 s per case, and the rest of each test (`mpiexec`, startup, `nccmp`) about 2 s. `radiation` is roughly `irrad-sa` plus `solar-sa` plus COSP; nothing runs twice.

A single RRTMGP call takes ~5 s on ~144 columns per rank, with the reduced g-point tables (`rrtmgp-gas-lw-g128.nc`, `rrtmgp-gas-sw-g112.nc`), because RRTMGP is built with the full Debug flags (`-O0 -check all -init=snan,arrays -fpe0 -fno-inline-functions -nolib-inline`; `RRTMGP_cmake/CMakeFiles/RRTMGP.dir/flags.make` in the build). This is inferred: the profiler timers stop at `RRTMGP`, and which kernels or checks cost most has not been profiled. Possible speedups: build the RRTMGP target with `-check none` but keep `-O0` (expected zero-diff, to be verified against the baselines), or with optimization (changes answers, so all four baselines would have to be regenerated).

## Running

```
Expand Down
35 changes: 35 additions & 0 deletions regression/irrad-sa/logging.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
schema_version: 1

# MAPL's default logging writes every rank's warnings to warnings_and_errors.log
# under an MPI lock. Without a field dictionary in the run directory, MAPL warns
# once per variable spec per rank, and the lock serializes the ranks (about 6 s
# of a 17 s Moist case). This config logs to the console only and sets the MAPL
# logger to ERROR; MAPL.profiler keeps the timing tables on rank 0.

formatters:
basic:
class: Formatter
format: '%(name)a15~: %(message)a'

handlers:
console:
class: streamhandler
formatter: basic
unit: OUTPUT_UNIT
level: DEBUG

root:
handlers: [console]
level: WARNING
root_level: INFO

loggers:
MAPL:
level: ERROR
root_level: ERROR

MAPL.profiler:
handlers: [console]
propagate: FALSE
level: WARNING
root_level: INFO
1 change: 1 addition & 0 deletions regression/irrad-sa/mapl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ esmf:
logAppendFlag: false

app_petcount: 6
pflogger: logging.yaml
35 changes: 35 additions & 0 deletions regression/radiation/logging.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
schema_version: 1

# MAPL's default logging writes every rank's warnings to warnings_and_errors.log
# under an MPI lock. Without a field dictionary in the run directory, MAPL warns
# once per variable spec per rank, and the lock serializes the ranks (about 6 s
# of a 17 s Moist case). This config logs to the console only and sets the MAPL
# logger to ERROR; MAPL.profiler keeps the timing tables on rank 0.

formatters:
basic:
class: Formatter
format: '%(name)a15~: %(message)a'

handlers:
console:
class: streamhandler
formatter: basic
unit: OUTPUT_UNIT
level: DEBUG

root:
handlers: [console]
level: WARNING
root_level: INFO

loggers:
MAPL:
level: ERROR
root_level: ERROR

MAPL.profiler:
handlers: [console]
propagate: FALSE
level: WARNING
root_level: INFO
1 change: 1 addition & 0 deletions regression/radiation/mapl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ esmf:
logAppendFlag: false

app_petcount: 6
pflogger: logging.yaml
35 changes: 35 additions & 0 deletions regression/satsim-sa/logging.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
schema_version: 1

# MAPL's default logging writes every rank's warnings to warnings_and_errors.log
# under an MPI lock. Without a field dictionary in the run directory, MAPL warns
# once per variable spec per rank, and the lock serializes the ranks (about 6 s
# of a 17 s Moist case). This config logs to the console only and sets the MAPL
# logger to ERROR; MAPL.profiler keeps the timing tables on rank 0.

formatters:
basic:
class: Formatter
format: '%(name)a15~: %(message)a'

handlers:
console:
class: streamhandler
formatter: basic
unit: OUTPUT_UNIT
level: DEBUG

root:
handlers: [console]
level: WARNING
root_level: INFO

loggers:
MAPL:
level: ERROR
root_level: ERROR

MAPL.profiler:
handlers: [console]
propagate: FALSE
level: WARNING
root_level: INFO
1 change: 1 addition & 0 deletions regression/satsim-sa/mapl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ esmf:
logAppendFlag: false

app_petcount: 6
pflogger: logging.yaml
35 changes: 35 additions & 0 deletions regression/solar-sa/logging.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
schema_version: 1

# MAPL's default logging writes every rank's warnings to warnings_and_errors.log
# under an MPI lock. Without a field dictionary in the run directory, MAPL warns
# once per variable spec per rank, and the lock serializes the ranks (about 6 s
# of a 17 s Moist case). This config logs to the console only and sets the MAPL
# logger to ERROR; MAPL.profiler keeps the timing tables on rank 0.

formatters:
basic:
class: Formatter
format: '%(name)a15~: %(message)a'

handlers:
console:
class: streamhandler
formatter: basic
unit: OUTPUT_UNIT
level: DEBUG

root:
handlers: [console]
level: WARNING
root_level: INFO

loggers:
MAPL:
level: ERROR
root_level: ERROR

MAPL.profiler:
handlers: [console]
propagate: FALSE
level: WARNING
root_level: INFO
1 change: 1 addition & 0 deletions regression/solar-sa/mapl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ esmf:
logAppendFlag: false

app_petcount: 6
pflogger: logging.yaml
Loading