Skip to content

Add Derecho build documentation and build script#765

Draft
dwfncar wants to merge 12 commits intomainfrom
build_derecho
Draft

Add Derecho build documentation and build script#765
dwfncar wants to merge 12 commits intomainfrom
build_derecho

Conversation

@dwfncar
Copy link
Contributor

@dwfncar dwfncar commented Jan 30, 2026

Summary

  • Add machine-specific build documentation and a one-step build script for NCAR Derecho (machines/derecho/)
  • Enable the Fortran interface (MUSICA_BUILD_FORTRAN_INTERFACE=ON) and CARMA in the documented build
  • Fix a CMake install error by removing the yaml-cpp target from the install export list in src/packaging/CMakeLists.txt (it was not a valid export target)
  • Link to the new Derecho build guide from the top-level README.md

Changes

File What
machines/derecho/BUILD.md Step-by-step build instructions for Derecho (modules, cmake, build, test, install)
machines/derecho/build.sh Automated build script that handles module loading through install
src/packaging/CMakeLists.txt Remove yaml-cpp from the CMake install export list
README.md Add link to Derecho build docs

Test plan

  • Run machines/derecho/build.sh /glade/work/$USER/packages on Derecho and verify all 7 tests pass
  • Verify make install completes without the previous yaml-cpp export error
  • Confirm the installed package is consumable via find_package(musica)

dwfncar and others added 7 commits January 30, 2026 11:47
Remove yaml-cpp from install targets in packaging CMakeLists since it is
a transitive dependency of mechanism_configuration and not a top-level
target. Add DERECHO_BUILD.md with step-by-step build and test notes for
MUSICA with MICM and TUV-x on NCAR Derecho. Reference it from README.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Rename build doc, update README reference, remove CMakeLists fix note,
and replace hardcoded install path with generic $USER-based example.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace module listing with explicit module load commands from the
Derecho environment setup.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Switch module environment to ncarenv/25.10 + gcc/14.3.0 to support
C++20 <format> header required by mechanism_configuration. Add
openblas/0.3.30 for BLAS/LAPACK and enable CARMA alongside MICM and
TUV-x. All 7 tests pass.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add build_derecho.sh to automate the full build workflow (modules,
cmake, build, test, install) with install prefix and parallel jobs
as arguments. Update BUILD_DERECHO.md with quick-start section
referencing the script and enable MUSICA_BUILD_FORTRAN_INTERFACE.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Reorganize machine-specific build script and docs into
machines/<machine>/ layout to support multiple HPC systems.
Build directory now drops into machines/derecho/build/.
Update README.md link accordingly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions
Copy link
Contributor

📄 Documentation for this branch is available at: https://ncar.github.io/musica/branch/build_derecho/

@codecov-commenter
Copy link

codecov-commenter commented Jan 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.51%. Comparing base (7cf369f) to head (f677121).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #765   +/-   ##
=======================================
  Coverage   71.51%   71.51%           
=======================================
  Files         115      115           
  Lines        8739     8739           
=======================================
  Hits         6250     6250           
  Misses       2489     2489           
Flag Coverage Δ
cpp_fortran 65.87% <ø> (ø)
javascript 92.56% <ø> (ø)
python 73.31% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

dwfncar and others added 5 commits January 30, 2026 13:24
When mechanism_configuration is included in musica_Exports, its public
dependency yaml-cpp must also be resolvable. Conditionally add yaml-cpp
to the export set when it was fetched via FetchContent, and always call
find_dependency(yaml-cpp) in the config template for consumers.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When yaml-cpp is fetched via FetchContent it is already included in
the musica_Exports export set, so consumers do not need to locate it
separately.  Only call find_dependency(yaml-cpp) in the config file
when yaml-cpp was found as a system package and not bundled.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Lmod's module shell function internally runs commands that return
non-zero, causing set -e to silently kill the script before reaching
the build steps. Move strict mode after module loading and add tool
verification as a safety net.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Conda environments can provide a shared libyaml-cpp.so via
find_package, preventing FetchContent from building a static
library. Add CMAKE_DISABLE_FIND_PACKAGE_yaml-cpp=ON to force
a source build, and YAML_CPP_INSTALL=ON so make install places
libyaml-cpp.a in the install prefix for downstream consumers.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants