@@ -165,6 +165,9 @@ cmake = ">=3.31,<4"
165165make = " >=4.4,<5"
166166mpi4py = " >=4,<5"
167167
168+ [feature .amr .activation ]
169+ scripts = [" petsc-custom/activate-petsc-arch.sh" ]
170+
168171[feature .amr .activation .env ]
169172PETSC_DIR = " $PIXI_PROJECT_ROOT/petsc-custom/petsc"
170173
@@ -173,16 +176,10 @@ openmpi = ">=5.0,<6"
173176hdf5 = { version = " >=1.14,<2" , build = " *openmpi*" }
174177h5py = { version = " >=3.12,<4" , build = " *openmpi*" }
175178
176- [feature .amr .target .osx-arm64 .activation .env ]
177- PETSC_ARCH = " petsc-4-uw-openmpi"
178-
179179[feature .amr .target .linux-64 .dependencies ]
180180hdf5 = { version = " >=1.14,<2" , build = " *mpich*" }
181181h5py = { version = " >=3.12,<4" , build = " *mpich*" }
182182
183- [feature .amr .target .linux-64 .activation .env ]
184- PETSC_ARCH = " petsc-4-uw-mpich"
185-
186183[feature .amr .tasks ]
187184petsc-local-build = { cmd = " ./build-petsc.sh" , cwd = " petsc-custom" }
188185petsc-local-clean = { cmd = " ./build-petsc.sh clean" , cwd = " petsc-custom" }
@@ -202,9 +199,11 @@ mpi4py = ">=4,<5"
202199hdf5 = { version = " >=1.14,<2" , build = " *mpich*" }
203200h5py = { version = " >=3.12,<4" , build = " *mpich*" }
204201
202+ [feature .amr-mpich .activation ]
203+ scripts = [" petsc-custom/activate-petsc-arch.sh" ]
204+
205205[feature .amr-mpich .activation .env ]
206206PETSC_DIR = " $PIXI_PROJECT_ROOT/petsc-custom/petsc"
207- PETSC_ARCH = " petsc-4-uw-mpich"
208207
209208[feature .amr-mpich .tasks ]
210209petsc-local-build = { cmd = " ./build-petsc.sh" , cwd = " petsc-custom" }
@@ -221,9 +220,11 @@ mpi4py = ">=4,<5"
221220hdf5 = { version = " >=1.14,<2" , build = " *openmpi*" }
222221h5py = { version = " >=3.12,<4" , build = " *openmpi*" }
223222
223+ [feature .amr-openmpi .activation ]
224+ scripts = [" petsc-custom/activate-petsc-arch.sh" ]
225+
224226[feature .amr-openmpi .activation .env ]
225227PETSC_DIR = " $PIXI_PROJECT_ROOT/petsc-custom/petsc"
226- PETSC_ARCH = " petsc-4-uw-openmpi"
227228
228229[feature .amr-openmpi .tasks ]
229230petsc-local-build = { cmd = " ./build-petsc.sh" , cwd = " petsc-custom" }
@@ -236,19 +237,26 @@ petsc-local-clean = { cmd = "./build-petsc.sh clean", cwd = "petsc-custom" }
236237# Uses the same conda deps as amr but points to a separate PETSC_ARCH
237238# so the optimised build is untouched.
238239#
239- # Setup:
240+ # PETSC_ARCH is set dynamically by petsc-custom/activate-petsc-arch.sh
241+ # and resolves to: petsc-<ver>-uw-<mpi>-debug
242+ # where <ver> comes from petsc-custom/.petsc-version and <mpi> follows
243+ # the platform default (openmpi on macOS, mpich on Linux).
244+ #
245+ # Setup (inside a pixi shell -e amr-debug, so $PETSC_ARCH is already set):
240246# cd petsc-custom/petsc
241247# pixi run -e amr-debug python3 ./configure \
242- # --with-petsc-arch=petsc-4-uw-openmpi-debug --with-debugging=1 \
248+ # --with-petsc-arch="$PETSC_ARCH" --with-debugging=1 \
243249# --with-mpi-dir="$CONDA_PREFIX" --with-hdf5=0 \
244250# --download-mpich=0 --download-openmpi=0 --download-mpi4py=0 \
245251# --with-petsc4py=0 --with-x=0 --with-pragmatic=0 --with-slepc=0 \
246252# "--COPTFLAGS=-g -O0" "--CXXOPTFLAGS=-g -O0" "--FOPTFLAGS=-g -O0"
247- # make PETSC_DIR=$(pwd) PETSC_ARCH=petsc-4-uw-openmpi-debug all
253+ # make PETSC_DIR=$(pwd) PETSC_ARCH="$PETSC_ARCH" all
254+
255+ [feature .amr-debug .activation ]
256+ scripts = [" petsc-custom/activate-petsc-arch.sh" ]
248257
249258[feature .amr-debug .activation .env ]
250259PETSC_DIR = " $PIXI_PROJECT_ROOT/petsc-custom/petsc"
251- PETSC_ARCH = " petsc-4-uw-openmpi-debug"
252260
253261# ============================================
254262# HPC CLUSTER FEATURE
0 commit comments