Feature/auto fetch deps#128
Draft
marjohma wants to merge 18 commits into
Draft
Conversation
- Add cmake/FetchHDF5.cmake: downloads and builds HDF5 1.14.x from source when not found on the system (serial, with Fortran and HL) - Centralize HDF5 in cmake/Dependencies.cmake, remove duplicate find_package(HDF5) from KIM and QL-Balance CMakeLists - Makefile: detect Ninja, fall back to Unix Makefiles with warning - Remove MPI from requirements (not used by KAMEL) - Update README dependency sections Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
SuperLU was never used at runtime — sparse_solve_method is hardcoded to 3 (SuiteSparse). Remove: - SuperLU C source files (c_fortran_dgssv.c, c_fortran_zgssv.c) - SuperLU subroutine definitions from sparse_mod.f90 - find_package(SuperLU) from KIM CMakeLists - FindSuperLU.cmake module - SuperLU from README optional dependencies Method=1 branches replaced with error stop for safety. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Support building without Homebrew by trying standard CMake discovery first (PATH, CMAKE_PREFIX_PATH, user variables) before falling back to Homebrew. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…t from parent Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Apple Clang (found on PATH) lacks OpenMP support, so search Homebrew LLVM first, then fall back to PATH for Nix/manual installs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
flang -fopenmp links against libomp but cannot find it without an explicit -L path. Locate libomp before find_package(OpenMP) so the test compile can link. Cascade: user-provided LIBOMP_PREFIX, then standard library paths (Nix, manual), then Homebrew fallback. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Homebrew HDF5 is built with ENABLE_PARALLEL=ON, which requires MPI. Since KAMEL does not use MPI, detect this and build HDF5 from source. Also remove pre-project HDF5 detection that caused enable_language warnings. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Explicitly prefer gfortran over flang since the project uses gfortran-specific flags (-fbacktrace, -fcheck=all, etc.). On macOS, find OpenBLAS for BLAS/LAPACK since flang cannot use -framework Accelerate. Also skip MPI-enabled system HDF5. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The KiLCA Doxygen documentation is not maintained. Remove the FATAL_ERROR that blocked builds without Doxygen installed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Provides a devShell with all build dependencies (compilers, OpenBLAS, HDF5, GSL, NetCDF, libomp, etc.) and a package derivation. Uses the same HDF5 merge workaround as libneo to fix Nix store path issues. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add flake.nix with devShell providing all build dependencies - Detect Nix environment (NIX_CC/IN_NIX_SHELL) and skip Homebrew compiler detection to avoid toolchain conflicts - FetchGSL: try system GSL before building from source - Add gmp, mpfr, suitesparse to Nix dependencies - Fix HDF5 merged derivation to include mod/shared symlink Known issue: Nix on macOS has C++ header ordering conflicts between libcxx and the macOS SDK that need stdenv-level fixes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Document the layered dependency discovery, Nix flake support, and platform-specific build requirements. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
HDF5 1.14.6 source build fails with LLVM clang 21 (FLT16_MAX). Instead of always skipping parallel-enabled system HDF5, check if MPI is available first. If MPI is found, use the system HDF5. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
Changes by area
Build system (CMakeLists.txt)
CMake modules (cmake/)
Subprojects
Nix
Docs
Test plan