Skip to content

Submodule Tribol included in default build - #1633

Open
white238 wants to merge 32 commits into
developfrom
task/white238/submodule_tribol
Open

Submodule Tribol included in default build#1633
white238 wants to merge 32 commits into
developfrom
task/white238/submodule_tribol

Conversation

@white238

@white238 white238 commented Jul 15, 2026

Copy link
Copy Markdown
Member

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:

  • Swapped Tribol to be a submodule in the default build to assist quick development cycle (can still be provided with setting TRIBOL_DIR to a pre-built Tribol)
  • Added new cmake option SMITH_ENABLE_TRIBOL to turn off Tribol entirely, which defaults to ON
  • Improved importing of CMake targets (arpack and mfem)
  • Fixed long-standing issue where Axom lost it's includes in codevelop build (we were stripping non-existent includes which mistakenly stripped directories guarded by generator expressions)
  • Unified TPL list to one place
  • Stopped exporting the mfem target and changed it to recreating the target as an imported library downstream this simplifies the CMake export set
  • Updated Tribol calls to new API
  • Improved building skill to not force updating submodules (my bad)
  • Bumped Tribol (includes @ebchin 's fix and multiple build error/warning improvements)

@chapman39

Copy link
Copy Markdown
Collaborator

should we update tribol in this pr as well?

@white238

Copy link
Copy Markdown
Member Author

should we update tribol in this pr as well?

Yea i will update this branch.

@ebchin
ebchin force-pushed the task/white238/submodule_tribol branch from b3ee4ae to 5126142 Compare August 3, 2026 21:51
@white238
white238 force-pushed the task/white238/submodule_tribol branch from 57e5bae to 164360a Compare August 17, 2026 20:58
@white238
white238 requested review from btalamini, chapman39, ebchin and tupek2 and a lite review from Copilot August 21, 2026 00:02
@white238 white238 changed the title WIP: Submodule Tribol included in default build Submodule Tribol included in default build Aug 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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_TRIBOL option 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.

Comment thread cmake/thirdparty/SetupSmithThirdParty.cmake
Comment thread cmake/thirdparty/FindARPACK.cmake Outdated
Comment thread host-configs/docker/gcc@14.2.0.cmake
Comment thread cmake/smith-config.cmake.in Outdated
Comment thread cmake/thirdparty/FindMFEM.cmake
Comment thread cmake/thirdparty/FindMFEM.cmake
# Submodule Third Party Libraries
#
# These are included in the regular build of Smith due to the close and
# tied development cycles.

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.

👍

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)

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.

thats a lot cleaner


endif()

# This is a full list of possible TPLs in Smith and is used in multiple locations

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.

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

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.

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Correct. Unless we want to build it then turn off the TRIBOL_DIR variable in our host-configs...

@chapman39 chapman39 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.

thanks chris!!

@ebchin ebchin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

😍

@white238
white238 force-pushed the task/white238/submodule_tribol branch from ead4485 to 5608acd Compare August 25, 2026 16:00
@white238
white238 force-pushed the task/white238/submodule_tribol branch from 5608acd to 5b2c859 Compare August 25, 2026 17:24
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.

5 participants