Skip to content

Support detached Gadi Pixi environments in PETSc builds - #516

Open
gthyagi wants to merge 1 commit into
underworldcode:developmentfrom
gthyagi:codex/gadi-detached-pixi-petsc-build
Open

Support detached Gadi Pixi environments in PETSc builds#516
gthyagi wants to merge 1 commit into
underworldcode:developmentfrom
gthyagi:codex/gadi-detached-pixi-petsc-build

Conversation

@gthyagi

@gthyagi gthyagi commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • accept detached Pixi hpc environments by validating the active environment name, project root, Conda prefix, and Python executable instead of requiring a hard-coded .pixi/envs/hpc path
  • prioritize the Pixi C++ runtime during Gadi PETSc and petsc4py builds for NumPy 2 compatibility
  • derive Gadi build concurrency from PBS_NCPUS, with a safe login-shell fallback, instead of hard-coding 40 jobs
  • modernize executable lookup and PETSc architecture diagnostics

This is a focused cherry-pick of c42b9b39 from feature/mantle-convection-benchmarks; no mantle-convection implementation commits are included.

Validation

  • bash -n petsc-custom/build-petsc.sh
  • git diff --check upstream/development...HEAD
  • mocked Gadi activation accepts a detached hpc prefix with the correct project root
  • mocked Gadi activation rejects a mismatched Pixi project root
  • mocked Gadi activation rejects a non-numeric PBS_NCPUS
  • confirmed on Gadi with a detached environment under /scratch: NumPy 2.4.6, OpenMPI 4.1.7, PETSc 3.25.4, parallel h5py, and editable UW3 import successfully

Replace the hard-coded .pixi environment path test with validation of the active hpc environment, project root, Conda prefix, and Python executable so detached environments on scratch are accepted safely.

Prioritize the Pixi C++ runtime during Gadi configure and petsc4py builds for NumPy 2 compatibility, derive build concurrency from PBS_NCPUS instead of oversubscribing with 40 jobs, and update versioned PETSc architecture diagnostics.

Also replace legacy which calls and resolve ShellCheck declaration warnings.
@gthyagi
gthyagi requested a review from lmoresi as a code owner August 9, 2026 17:18
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.

1 participant