E3SM wrapper: parallel build, out of source, install, gated gcc flags - #156
Merged
Conversation
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.
Lurgypai
reviewed
May 14, 2026
Lurgypai
left a comment
Collaborator
There was a problem hiding this comment.
Changes look correct, compiles and runs
jeanbez
marked this pull request as ready for review
May 15, 2026 01:35
2 tasks
jeanbez
added a commit
that referenced
this pull request
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
added a commit
that referenced
this pull request
Jun 29, 2026
…#156) (#162) 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upstream E3SM-IO is autotools-only (no upstream
CMakeLists.txt) so we keep theExternalProject_Addwrapper, but address four long-standing issues.Stacked on #155 (wave-b-cmake).
What changes
BUILD_COMMAND make -j 1BUILD_COMMAND $(MAKE)make -j 2; until now every matrix job serialised the ~30+ TU E3SM tree.BUILD_IN_SOURCE 1BUILD_IN_SOURCE 0+ explicitBINARY_DIRconfig.logout of thee3sm/submodule worktree. (autoreconfstill writesconfigure/Makefile.ininto the source tree — autotools limitation, not fixable from our side.)CFLAGS=-fno-var-tracking-assignments CXXFLAGS=…CMAKE_C_COMPILER_ID STREQUAL "GNU"install(PROGRAMS \${CMAKE_BINARY_DIR}/h5bench_e3sm DESTINATION bin)INSTALL_COMMANDonly copied the binary into the CMake build dir;cmake --install/make installpreviously left the E3SM binary behind. CI tests happened to run from the build dir so the gap was masked.