Submodule Tribol included in default build - #1633
Conversation
|
should we update tribol in this pr as well? |
Yea i will update this branch. |
b3ee4ae to
5126142
Compare
57e5bae to
164360a
Compare
…y default, still allow Tribol to be separate when given TRIBOL_DIR
…fem, always create a mfem target instead of exporting it
772bc64 to
da2d9dc
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates Smith’s build and packaging to include Tribol as part of the default (Smith-only) build workflow, adds a toggle to disable Tribol entirely, and refactors several third-party (TPL) integration paths (MFEM/ARPACK/Tribol) to simplify downstream consumption and improve robustness.
Changes:
- Make Tribol a default-build submodule with a new
SMITH_ENABLE_TRIBOLoption to disable Tribol support when desired. - Refactor CMake third-party setup/import logic (MFEM + ARPACK + Tribol) and unify the TPL list in one place.
- Update Spack recipes, host-configs, CI config, docs, and call sites to match the new build and Tribol API behavior.
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/smith/physics/contact/contact_interaction.cpp | Updates Tribol call sites to new MFEM-facing Tribol API. |
| src/docs/sphinx/build_guide/build_smith.rst | Documents new SMITH_ENABLE_TRIBOL CMake option. |
| skills/building/SKILL.md | Updates build workflow guidance to reflect new default submodule set. |
| scripts/spack/spack_repo/smith/packages/tribol/package.py | Bumps Tribol Spack version/commit. |
| scripts/spack/spack_repo/smith/packages/smith/package.py | Adjusts Smith Spack variant semantics for external Tribol usage. |
| scripts/spack/configs/versions.yaml | Updates required Tribol version to match bump. |
| host-configs/tuolumne-toss_4_x86_64_ib_cray-llvm-amdgpu@6.4.2_hip.cmake | Removes external TRIBOL_DIR setting in favor of default-included Tribol behavior. |
| host-configs/rzwhippet-toss_4_x86_64_ib-llvm@19.1.3.cmake | Removes external TRIBOL_DIR setting in favor of default-included Tribol behavior. |
| host-configs/rzwhippet-toss_4_x86_64_ib-gcc@13.3.1.cmake | Removes external TRIBOL_DIR setting in favor of default-included Tribol behavior. |
| host-configs/rzadams-toss_4_x86_64_ib_cray-llvm-amdgpu@6.4.2_hip.cmake | Removes external TRIBOL_DIR setting in favor of default-included Tribol behavior. |
| host-configs/other/firion-macos_sonoma_aarch64-llvm@19.1.7.cmake | Removes external TRIBOL_DIR setting in favor of default-included Tribol behavior. |
| host-configs/docker/llvm@19.1.1.cmake | Removes external TRIBOL_DIR setting in favor of default-included Tribol behavior. |
| host-configs/docker/gcc@14.2.0.cmake | Removes external TRIBOL_DIR setting in favor of default-included Tribol behavior. |
| host-configs/dane-toss_4_x86_64_ib-llvm@19.1.3.cmake | Removes external TRIBOL_DIR setting in favor of default-included Tribol behavior. |
| host-configs/dane-toss_4_x86_64_ib-gcc@13.3.1.cmake | Removes external TRIBOL_DIR setting in favor of default-included Tribol behavior. |
| examples/contact/ironing_2D.cpp | Updates example mesh builder call to new helper name. |
| CMakeLists.txt | Removes workaround Axom include injection in codevelop install/export path. |
| cmake/thirdparty/SetupSmithThirdParty.cmake | Reworks submodule vs prebuilt Tribol selection, improves include-dir sanitization, and centralizes TPL list. |
| cmake/thirdparty/FindMFEM.cmake | Improves MFEM feature detection and MFEM link interface handling (MPI/OpenMP/Tribol flags). |
| cmake/thirdparty/FindARPACK.cmake | Adds imported target creation for ARPACK for easier downstream linkage. |
| cmake/SmithConfigHeader.cmake | Uses centralized SMITH TPL list to generate SMITH_USE_* variables. |
| cmake/SmithBasics.cmake | Adds SMITH_ENABLE_TRIBOL option definition. |
| cmake/smith-config.cmake.in | Updates installed package config logic (ARPACK target, MFEM target recreation, conditional Tribol targets). |
| .gitlab/build_toss4.yml | Updates CI job to disable Tribol via SMITH_ENABLE_TRIBOL=OFF. |
Suppressed comments (2)
cmake/smith-config.cmake.in:178
- This find_dependency call has a duplicated REQUIRED keyword, which will cause a CMake argument parsing error when SMITH_USE_ENZYME is ON.
find_dependency(Enzyme REQUIRED REQUIRED NO_DEFAULT_PATH PATHS "${ENZYME_DIR}")
cmake/smith-config.cmake.in:161
- blt_import_library is being given "@MFEM_LIBRARIES@" via DEPENDS_ON, but those are raw library paths/flags (not CMake targets). Use the LIBRARIES argument to ensure correct linking and consistency with FindMFEM.cmake.
blt_import_library(NAME mfem
INCLUDES "@MFEM_INCLUDE_DIRS@"
TREAT_INCLUDES_AS_SYSTEM ON
DEPENDS_ON "@MFEM_LIBRARIES@")
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| # Submodule Third Party Libraries | ||
| # | ||
| # These are included in the regular build of Smith due to the close and | ||
| # tied development cycles. |
| add_subdirectory("${CONTINUATION_SOURCE_DIR}" ${CMAKE_BINARY_DIR}/ContinuationSolvers) | ||
| # mfem brings in slepc but doesn't include required arpack, add it | ||
| if(ARPACK_FOUND) | ||
| target_link_libraries(mfem INTERFACE arpack) |
|
|
||
| endif() | ||
|
|
||
| # This is a full list of possible TPLs in Smith and is used in multiple locations |
There was a problem hiding this comment.
might be worth moving this to the top of the file and explaining where its being used
| set(UMPIRE_DIR "${TPL_ROOT}/umpire-2025.12.0-zz6fwo4ec7wgiabtpvzjkab3reoj4qzk" CACHE PATH "") | ||
|
|
||
| set(TRIBOL_DIR "${TPL_ROOT}/tribol-0.1.0.27-chz6xomld64xnob5kh4yk3tkkq5gnroy" CACHE PATH "") | ||
| # Tribol not built |
There was a problem hiding this comment.
so from now on, will we be not testing tribol as part of the TPL builds? i guess its further motivation for me to add TPL build test in tribol CI.
There was a problem hiding this comment.
Correct. Unless we want to build it then turn off the TRIBOL_DIR variable in our host-configs...
ead4485 to
5608acd
Compare
5608acd to
5b2c859
Compare
Gonna be honest... this PR got away from me but here is a list of things that were needed and got cleaned up in what was supposed to be easy:
TRIBOL_DIRto a pre-built Tribol)SMITH_ENABLE_TRIBOLto turn off Tribol entirely, which defaults toONmfemtarget and changed it to recreating the target as an imported library downstream this simplifies the CMake export set