Skip to content

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

Merged
jeanbez merged 1 commit into
wave-b-cmakefrom
wave-b-e3sm
Jun 3, 2026
Merged

E3SM wrapper: parallel build, out of source, install, gated gcc flags#156
jeanbez merged 1 commit into
wave-b-cmakefrom
wave-b-e3sm

Conversation

@jeanbez

@jeanbez jeanbez commented Apr 22, 2026

Copy link
Copy Markdown
Member

Summary

Upstream E3SM-IO is autotools-only (no upstream CMakeLists.txt) so we keep the ExternalProject_Add wrapper, but address four long-standing issues.

Stacked on #155 (wave-b-cmake).

What changes

# Before After Why
1 BUILD_COMMAND make -j 1 BUILD_COMMAND $(MAKE) Forwards the outer Make jobserver into the E3SM build. CI runs make -j 2; until now every matrix job serialised the ~30+ TU E3SM tree.
2 BUILD_IN_SOURCE 1 BUILD_IN_SOURCE 0 + explicit BINARY_DIR Keeps objects, Makefiles, config.log out of the e3sm/ submodule worktree. (autoreconf still writes configure / Makefile.in into the source tree — autotools limitation, not fixable from our side.)
3 Unconditional CFLAGS=-fno-var-tracking-assignments CXXFLAGS=… Gated on CMAKE_C_COMPILER_ID STREQUAL "GNU" That flag is a gcc-only debug-info-slowdown workaround; Clang warns or ignores it.
4 No install rule install(PROGRAMS \${CMAKE_BINARY_DIR}/h5bench_e3sm DESTINATION bin) The INSTALL_COMMAND only copied the binary into the CMake build dir; cmake --install / make install previously left the E3SM binary behind. CI tests happened to run from the build dir so the gap was masked.

@jeanbez jeanbez self-assigned this Apr 22, 2026
@jeanbez jeanbez added this to the v.1.7 milestone Apr 22, 2026
@jeanbez jeanbez added the enhancement New feature or request label Apr 22, 2026
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 requested a review from Lurgypai May 6, 2026 16:11

@Lurgypai Lurgypai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Changes look correct, compiles and runs

@jeanbez
jeanbez marked this pull request as ready for review May 15, 2026 01:35
@jeanbez
jeanbez merged commit 83695ea into wave-b-cmake Jun 3, 2026
13 checks passed
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants