Skip to content

E3SM wrapper: parallel build, out of source, install, gated gcc flags - #162

Merged
jeanbez merged 1 commit into
developfrom
redo-e3sm-wrapper
Jun 29, 2026
Merged

E3SM wrapper: parallel build, out of source, install, gated gcc flags#162
jeanbez merged 1 commit into
developfrom
redo-e3sm-wrapper

Conversation

@jeanbez

@jeanbez jeanbez commented Jun 25, 2026

Copy link
Copy Markdown
Member

Re-applies the content of #156, which was squash-merged into the now-deleted wave-b-cmake branch and did not propagate to develop.

Summary

  • Drops BUILD_COMMAND make -j 1 in favour of $(MAKE) so the outer Make jobserver forwards -jN into the E3SM-IO build.
  • Switches to BUILD_IN_SOURCE 0 with an explicit BINARY_DIR, keeping e3sm/ clean of object files and Makefiles (autoreconf still writes back into the source tree, an autotools limitation).
  • Gates CFLAGS=-fno-var-tracking-assignments on CMAKE_C_COMPILER_ID STREQUAL "GNU" so Clang does not warn or ignore it.
  • Adds install(PROGRAMS ${CMAKE_BINARY_DIR}/h5bench_e3sm DESTINATION bin) so cmake --install actually ships the binary.

Test plan

  • Configure with -DH5BENCH_E3SM=ON and confirm the build still succeeds.
  • Run cmake --install and confirm h5bench_e3sm ends up in the install bin/.

Recovery PR. Original squash commit: 83695ea. The E3SM block conflicted with develop's older version, resolved by taking the updated wrapper.

@jeanbez
jeanbez marked this pull request as ready for review June 29, 2026 00:10
@jeanbez jeanbez self-assigned this Jun 29, 2026
@jeanbez jeanbez added bug Something isn't working enhancement New feature or request labels Jun 29, 2026
@jeanbez jeanbez added this to the v.1.7 milestone Jun 29, 2026
…#156)

Wave B item 10. E3SM-IO upstream is autotools-only, so we keep the
ExternalProject_Add wrapper, but clean up four long-standing issues:

1. Drop BUILD_COMMAND "make -j 1". Replace with BUILD_COMMAND $(MAKE)
   so the outer make's jobserver forwards -jN into the E3SM build. CI
   invokes the outer build with `make -j 2`; until now every job on the
   matrix was serialising the ~30+ TU E3SM tree.

2. BUILD_IN_SOURCE 0 + explicit BINARY_DIR. Keeps object files,
   Makefiles, config.log, etc. out of the submodule worktree.
   autoreconf still writes configure / Makefile.in into the source tree
   - that's an autotools limitation, not something we can fix in CMake.

3. Only pass CFLAGS=-fno-var-tracking-assignments (and the matching
   CXXFLAGS) when CMAKE_C_COMPILER_ID is GNU. That flag is a gcc-only
   debug-info-slowdown workaround; Clang warns or ignores it.

4. Add install(PROGRAMS ${CMAKE_BINARY_DIR}/h5bench_e3sm DESTINATION
   bin). Previously the INSTALL_COMMAND only copied the binary into
   the CMake build dir; `cmake --install` (or `make install`) left the
   E3SM binary behind. CI tests happen to run from the build dir so
   they masked this gap.

Pinning the e3sm submodule to a specific upstream tag is the separate
item 12 and covers all four submodules together.

Verified locally (CMake 4.3.1, clang) that configure still succeeds
and the baseline + exerciser + metadata targets build unchanged; the
generated h5bench_e3sm build step now uses
  cmake -Dmake=$(MAKE) -P h5bench_e3sm-build-Release.cmake
so the jobserver handoff is literal-$(MAKE)-as-expected.
@jeanbez
jeanbez force-pushed the redo-e3sm-wrapper branch from 51d0cf3 to eb855d4 Compare June 29, 2026 00:20
@jeanbez
jeanbez merged commit 83dd3a6 into develop Jun 29, 2026
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant