Repository navigation
Conversation
Proteus (proteustoolkit.org): PDE/multiphysics toolkit built around PETSc for parallel linear/nonlinear solves. This first pass deliberately omits Chrono (rigid-body/FSI coupling) and SCOREC/PUMI (parallel mesh adaptation) support: both are optional at the proteus code level, and neither has an upstream Spack package yet (pychrono in particular would be a separate, nontrivial packaging effort). Sources from cekees/proteus's torino_narwhal branch rather than erdc/proteus's tagged releases: the Chrono/SCOREC-optional support this "no chrono" package design depends on (the PROTEUS_SKIP_PUMI_CHRONO env var, and a try/except around an otherwise-unconditional Chrono config-file lookup) hasn't been released upstream yet. Revisit tracking erdc/proteus tags once that support lands there. Depends on two other fixes proposed alongside this PR (not yet merged): xtensor-python@0.28.0 (this branch/PR) and xtensor's xsimd upper bound for 0.26.0:0.27 (this branch/PR) -- xtensor-python was previously stuck at 0.23.1, and xtensor's own xsimd constraint was too permissive for the 0.26/0.27 line. Built and verified working end-to-end (spack install + import proteus + petsc4py Comm.init()) against a from-scratch toolchain, including building openmpi/petsc/etc. from source rather than relying on any external MPI.
setup.py gated MeshAdaptPUMI.MeshAdapt and mbd.CouplingFSI behind one PROTEUS_SKIP_PUMI_CHRONO switch. Chrono stays skipped unconditionally (pychrono has no upstream Spack package), but PUMI does have one now (`pumi`), so the new `scorec` variant (default off) depends on pumi+zoltan+shared, zoltan+parmetis~fortran, and parmetis, points SCOREC_DIR/ZOLTAN_DIR/PARMETIS_DIR at them, and applies split-pumi-chrono-skip.patch to split the single skip switch into independent PROTEUS_SKIP_PUMI/PROTEUS_SKIP_CHRONO ones so PUMI can be enabled while Chrono stays off. pumi needs +shared explicitly: it defaults to static libs without -fPIC, which can't link into MeshAdaptPUMI.MeshAdapt (a shared Python extension). zoltan needs ~fortran: its Fortran interface is unused here and its shared lib leaves unresolved libgfortran symbols on this toolchain when built with +fortran. Verified end to end: py-proteus+scorec builds and proteus.MeshAdaptPUMI.MeshAdapt imports and resolves its shared libraries correctly at runtime. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MraeTXJFpMRZJUdYthLxyg
…_narwhal cekees/proteus@torino_narwhal now natively splits PROTEUS_SKIP_PUMI_CHRONO into independent PROTEUS_SKIP_PUMI/PROTEUS_SKIP_CHRONO switches (pushed directly to that branch), so the Spack-side patch is redundant -- and would otherwise break the next fetch, since its "before" context (the single combined switch) no longer exists in the source. Verified py-proteus+scorec builds against the new commit with no patch and MeshAdaptPUMI.MeshAdapt still imports correctly. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MraeTXJFpMRZJUdYthLxyg
Comments were written narrating the investigation (what was tried, what was validated when, "this session"); condense each down to the non-obvious fact a maintainer actually needs -- the constraint or workaround itself, not the story behind finding it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MraeTXJFpMRZJUdYthLxyg
…brary triangle 1.6's own upstream makefile hardcodes CSWITCHES with -DLINUX unconditionally, regardless of the actual build platform. triangle.c only consults that macro (alongside the mutually-exclusive -DCPU86) to twiddle the legacy x87 FPU's precision-control register on old x86 hardware -- irrelevant on Apple Silicon and unnecessary on modern x86_64 -- but the macro also gates an unconditional #include <fpu_control.h>, a glibc/Linux- only header that doesn't exist on macOS. Building with the stock makefile there failed outright with "fatal error: 'fpu_control.h' file not found". Override CSWITCHES on Darwin to drop -DLINUX; Linux builds are unaffected. Also: this package previously only installed the CLI executables (triangle, showme), nothing a dependent could compile/link against. Consumers like proteus link directly against triangle's C API (a single object file built from triangle.c with -DTRILIBRARY, per the upstream makefile's own "trilibrary" target) rather than shelling out to the CLI. Without an installed header+library, proteus's own build failed with "fatal error: 'triangle.h' file not found". Build and install both, matching what proteus's config/default.py expects: $TRIANGLE_DIR/include/ triangle.h and $TRIANGLE_DIR/lib/libtri.a. Confirmed via a real `spack install py-proteus` build.
Two related but distinct macOS linking bugs, both only visible once a
consumer actually tries to load the built library:
1. The %gcc branch appends a bare -lgfortran with no matching -L. This
silently works when gfortran is a system/Homebrew package (its runtime
lib sits on a default linker search path) but fails against Spack's own
from-source-built GCC, whose runtime libs live in their own package
prefix: "ld: library 'gfortran' not found". Fixed by asking the Fortran
compiler itself where its own libgfortran lives
(`gfortran -print-file-name=libgfortran.dylib`) rather than guessing a
layout, so this works regardless of the actual gcc package Spack picked.
2. This package fakes a shared library via a compiler-as-archiver trick
(`--with-ar="$(CXX) -shared $(LDFLAGS) -o"`, since Zoltan's own build
system only ever knows how to archive into a .a) and then renames the
resulting file from .a to .dylib in solib_install(). The rename is
file-system only -- it doesn't touch the dylib's own embedded
LC_ID_DYLIB, which clang baked in as the literal, path-less string
"libzoltan.a" (the link command's own -o argument) since no explicit
-install_name was ever passed. Any consumer linked against this library
afterward (pumi's libapf_zoltan.dylib, confirmed via a real
`spack install py-proteus+scorec` build) captures that bogus self-
reference as *its own* dependency, and fails to dlopen ("Library not
loaded: libzoltan.a") however correct its own rpath otherwise is. Fixed
by correcting the dylib's self-declared ID via `install_name_tool -id`
right after the rename, to match what it now actually is.
…est git override SuperLU's fill-reducing ordering calls METIS_NodeND, but metis was previously only pulled in transitively via parmetis, and only when +scorec. Spack only wires up the rpath/link-path for a package's *direct* depends_on()s, so the base (~scorec) build's superluWrappers extension failed at import time with "symbol not found in flat namespace '_METIS_NodeND'" (confirmed via a real `spack install py-proteus` build). The actual fix for the missing link flags lives in proteus's own setup.py (config/default.py + setup.py, torino_narwhal branch) -- this package now just needs to depend on metis directly and export METIS_DIR unconditionally so proteus's build can find it, matching the existing per-dependency *_DIR pattern already used here for superlu/triangle/etc.
…ll paths
The --download-proteus/HPC and pip paths both configure PETSc with
--download-hypre --download-superlu_dist; this Spack recipe's plain
depends_on("petsc+mpi") left both disabled by default, silently narrowing
which of proteus's solver code paths actually get exercised rather than
producing an obvious failure.
Confirmed via two full pytest runs against a real `spack install
py-proteus+scorec` build: ~hypre~superlu-dist showed 35 failed/387 passed
(mostly AMG-based tests -- test_operator_shells, test_stokesDC_TH_2D,
test_bochev_pressure_stabilization, the amg_* cases in
test_nse_RANS2P_step -- plus a few needing a parallel direct solver);
rebuilding with +hypre+superlu-dist brought that down to 17 failed/405
passed, closing every one of the AMG/operator-shell failures. The
remaining 17 (vs. the 6 known pre-existing failures other paths show) look
like real numerical differences from this Spack build's specific
hypre@3.1.0/superlu-dist@9.2.1 versions rather than a missing capability,
and haven't been chased further.
…X11 paths pumi: mds/apfMDS.cc's getFaceIdInRegion()/getEdgeIdInFace() helpers read the "_vert_id" mesh tag (created as an 8-byte long via createLongTag) with getIntTag() into a 4-byte int -- SCOREC's generic tag storage does an unconditional memcpy(dest, storage, tag->bytes) with no type/size check, so every call is an 8-byte-into-4-byte stack buffer overflow. Confirmed via gdb on aarch64 (petsc/download-proteus-support session): crashes every PUMI-mesh-generation test through reconstructFromProteus2 -> derive2DMdlFromManifold. Already fixed for PETSc's own --download-scorec via scorec.py in the gitlab.com/cekees/petsc download-proteus-support fork; this is the Spack-side equivalent so py-proteus+scorec gets the same fix, since Spack's pumi recipe clones pristine upstream SCOREC/core independently. Also replaces the silent "return 12; // Should give segmentation fault" fallback with an explicit assertion. triangle: showme's build hardcoded CSWITCHES to a legacy -I/usr/X11R6/include path that doesn't exist when X11 comes from Spack's own libx11 dependency -- the generic build system used here doesn't auto-inject dependency include/lib paths the way Autotools/CMakePackage do. Wire spec["libx11"]/spec["xproto"] prefixes into CSWITCHES explicitly instead (Xlib.h #includes X11/X.h, which comes from xproto, only pulled in transitively before this fix -- add a direct build dep on it too), and apply on every platform rather than only Darwin, keeping -DLINUX on Linux where it belongs.
|
@cekees. I just wanted to test how Copilot review does on this PR. If it asks for change, check carefully, don't apply blindly, it might hallucinate still :) |
There was a problem hiding this comment.
Pull request overview
Adds a new Spack py-proteus package (tracking Proteus’ torino_narwhal branch) and includes supporting packaging fixes to enable successful builds on more toolchains/platforms (notably Darwin) and to provide required linkable artifacts for downstream consumers.
Changes:
- Add a new
py-proteusPython package with a+scorecvariant and extensive dependency/env wiring for Proteus’ build system. - Update
triangleto handle Darwin builds and install a linkabletriangle.h+libtri.afor consumers. - Update
zoltanto improve shared-library linking on macOS toolchains (libgfortran discovery and dylib install-name fixups).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| repos/spack_repo/builtin/packages/zoltan/package.py | Improve macOS/shared-library robustness (libgfortran search path + dylib install_name). |
| repos/spack_repo/builtin/packages/triangle/package.py | Add Darwin-specific build flag handling and install triangle headers/library for link-time consumers. |
| repos/spack_repo/builtin/packages/py_proteus/package.py | New Proteus Python package with variants, dependencies, and environment configuration for builds. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
| # TEMPORARY: carried on this branch pending an upstream fix; drop it | ||
| # once spack/spack-packages takes the change. | ||
| for target in ("libs", "netlib", "shared"): | ||
| make("-s", target, *self.make_defs) |
There was a problem hiding this comment.
I'd like to summarize the discussion in #6278
- In January, to work around build races, and to work around tests not building in some cases, we split the build into libs, netlib and shared with openblas: skip tests during build #2936
- That was in force until April, when openblas: use default make target #4569 removed the workaround for the build races and the test issues in openblas: skip tests during build #2936 in favour of a faster parallel build that also doesn't run ar multiple times.
- While setting CROSS=1 would not run the tests, it would still build them, but as it was said, building and running the tests should best be part of the run_tests phase when requesed.
I also think I saw some sporadic build errors in GitLab CI that could have been caused by the parallel build races, and CROSS=1 would not fix them.
The parallel build race mentioned was
"ar: libopenblas-r0.3.34.a: error reading zlatm5.o: file truncated"
If libopenblas-r0.3.34.a is build by "libs", then libs could be built first and then "netlib" and "shared" chould be built in parallel.
The preferred fix would be to fix the build races, but that might take some time.
However, as the focus should be on successful builds, with build speed only a goal as long as successful builds are guaranteed, I'd be inclined to approve this revert to #2936, which was known to work.
My gripe is that this change to openblas would not belone to a PR that says "py-proteus: New package" in the title. Two gripes here:
- Reverting commit causing a build issue of openblas would not appear to be part of a commit adding a new package. These are two orthogonal issues and should have been submitted separately for more clarity and a more focussed review.
- This want me to say that I'm also not sure about the other changes in this PR: Are some of them likewise not required for the new package?
I understand that wanting to "getting things done" lents itself to submit all of the work done and needed for a reliable build across all tested platforms is a logical thing to do, but this PR changes 7 recipes that do not appear to be closely related to each other, so I must say that I don't like that from the viewpoint of somebody who's asked to assist in the merge of such PRs.
|
@bernhardkaindl could we go ahead and re-enable checks despite #6116 not yet being merged? The changes on it are small and shouldn't affect this PR. I've verified the spack package inpendently against the platforms I have access to and would like to wrap this up. |
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved critical dependency and SuperLU configuration issues, along with additional moderate build issues, remain.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (5)
repos/spack_repo/builtin/packages/openblas/package.py:677
- The OpenBLAS
sharedtarget itself haslibsandnetlibas prerequisites, and those goals are phony. Since this loop already invokeslibsandnetlib, the third invocation rebuilds/rearchives both targets in a new make process, roughly doubling the library build work for every spec. Keep the targets serialized without invoking a phony-prerequisite target again (or otherwise make the shared step reuse the completed prerequisites).
for target in ("libs", "netlib", "shared"):
make("-s", target, *self.make_defs)
repos/spack_repo/builtin/packages/py_proteus/package.py:100
- Eigen installs its headers under
include/eigen3, not directly underinclude(seeeigen/package.py:108and:147), and Proteus's setup includes thateigen3subdirectory for its extensions. Adding onlyprefix.includetoCPATHtherefore leaves#include <Eigen/...>unresolved; addprefix.include.eigen3for this dependency.
for dep in ("eigen", "xtensor", "xtensor-python", "xtl"):
env.prepend_path("CPATH", self.spec[dep].prefix.include)
repos/spack_repo/builtin/packages/py_proteus/package.py:58
- This dependency is unconditional even though
parmetisis only consumed below when+pumi(and the Proteus PUMI extension is skipped for~pumi). As a result,spack install py-proteus~pumistill concretizes and builds the expensive ParMETIS stack, defeating the optional PUMI variant. Make this dependency conditional on+pumi.
depends_on("parmetis")
repos/spack_repo/builtin/packages/py_proteus/package.py:73
- The fallback returned here does not handle the standard external Debian/Ubuntu MPICH layout (
<prefix>/include/<multiarch>/mpich/mpi.h). For such an MPI prefix, neitherlib/*/mpichloop matches and the fallback makes Proteus look for<prefix>/include/mpi.h, so a valid external MPI installation fails during compilation. Detect this include layout (or pass the discovered include directory through the build configuration) before falling back tompi_prefix.
for candidate in glob.glob(os.path.join(mpi_prefix, "lib", "*", "mpich")):
if os.path.isfile(os.path.join(candidate, "include", "mpi.h")):
return candidate
for candidate in glob.glob(os.path.join(mpi_prefix, "lib", "*", "openmpi")):
if os.path.isfile(os.path.join(candidate, "include", "mpi.h")):
repos/spack_repo/builtin/packages/zoltan/package.py:127
config_ldflagsalready contains-lgfortranabove, so appending this-Loption leaves the library search path after the-llookup. On systems where GCC's Fortran runtime directory is not a default linker path—the case this change is meant to handle—configure can still fail to findlibgfortran. Insert the directory before-lgfortran(or otherwise place-Lbefore the library option).
config_ldflags.append("-L" + os.path.dirname(gfortran_lib))
- Files reviewed: 7/7 changed files
- Comments generated: 2
- Review effort level: Lite
| env.set("HDF5_DIR", self.spec["hdf5"].prefix) | ||
| env.set("BLAS_DIR", self.spec["openblas"].prefix) | ||
| env.set("LAPACK_DIR", self.spec["openblas"].prefix) | ||
| env.set("SUPERLU_DIR", self.spec["superlu"].prefix) |
There was a problem hiding this comment.
@cekees, as this refers to headers and libraries, it looks like this comment would be related to a potential build issue. but the build worked, so I'm not sure if this is an real issue. Please add a comment here and set it to resolved if you say that this comment does not apply.
There was a problem hiding this comment.
Yes, in this current build configuration in proteus, it is setting the superlu include to the PETSc include dir and the lib dir to sys.exec_prefix/lib, ignoring SUPERLU_DIR. I'd rather fix the next proteus patch release, however, than drop the env.set here, meaning we should just leave this as is.
For a PETSc configured with --download-superlu, which is how proteus is most often built but deliberately not how spack builds it, the 1.9.0 proteus release is correct. For spack, petsc+superlu links spack's own superlu and doesn't vendor the headers (petsc-3.25.4-/include/slu_ddefs.h is absent), but the build succeeds anyway because depends_on("superlu") is direct and the compiler wrapper injects -I/-L implicitly: no -I...superlu appears in the build log, yet SuperLU_timer_ is linked into superluWrappers.so. The env var is the explicit statement of something that currently works through a side effect. Pointing SUPERLU_DIR at an arbitrary superlu is the behaviour we want to keep in proteus (and the spack recipe).
It's a future one-line change on proteus — get_flags(package) already reads _DIR. For example proteus/config/thunder.py:23 uses it as get_flags('superlu'). It used to be this way for other specific HPC machines that have been retired. It's just that default.py doesn't call it.
I filed it as erdc/proteus#1283 (with the dead lib64 assignment on line 299), keeping the current behaviour as the fallback when SUPERLU_DIR is unset. Put differently, once the upstream change applies, the recipe here will be correct, but it should also currently work anyway, it's just misleading until I repair proteus to honor SUPERLU_DIR.
bernhardkaindl
left a comment
There was a problem hiding this comment.
@cekees some questions found during review.
| # Chrono compiles C as well as C++ (e.g. chrono_thirdparty/libstl/stlfile.c), | ||
| # so both must be declared -- omitting "c" fails at cmake time with | ||
| # "[spack cc]: Error: SPACK_CC_* variables not set". |
There was a problem hiding this comment.
| # Chrono compiles C as well as C++ (e.g. chrono_thirdparty/libstl/stlfile.c), | |
| # so both must be declared -- omitting "c" fails at cmake time with | |
| # "[spack cc]: Error: SPACK_CC_* variables not set". |
Based on looking at other PRs, it looks like a comment only Claude Code would add,
but we usually do not explain that C/C++ packages need the C/C++ compilers, it's a given.
| with open(header) as f: | ||
| if "#include <type_traits>" in f.read(): | ||
| return | ||
| filter_file(r"^#include <cstdio>$", "#include <cstdio>\n#include <type_traits>", header) |
There was a problem hiding this comment.
| with open(header) as f: | |
| if "#include <type_traits>" in f.read(): | |
| return | |
| filter_file(r"^#include <cstdio>$", "#include <cstdio>\n#include <type_traits>", header) | |
| filter_file(r"^#include <cstdio>$", "#include <cstdio>\n#include <type_traits>", header) |
The worst that can happen is that type_traits is included twice, but its header guard should make that a non-issue.
|
|
||
| depends_on("c", type="build") | ||
| depends_on("cxx", type="build") | ||
| depends_on("fortran", type="build") # remove in future not a direct proteus dep |
There was a problem hiding this comment.
| depends_on("fortran", type="build") # remove in future not a direct proteus dep |
Remove it now if Proteus does not need a fortran compiler.
| depends_on("fortran", type="build") # remove in future not a direct proteus dep | ||
| depends_on("python@3.9:", type=("build", "run")) | ||
| depends_on("py-setuptools@61:", type="build") | ||
| depends_on("py-cython@3:", type="build") |
There was a problem hiding this comment.
| depends_on("py-cython@3:", type="build") | |
| depends_on("py-cython@3", type="build") |
In https://github.com/erdc/proteus/blob/1.9.0/pyproject.toml#L2 it says Cython >=3.0,<4:
requires = ["setuptools>=61.0","cython>=3.0,<4","pybind11>=2.11,<3","numpy>=1.25,<3","mpi4py"]| depends_on("py-setuptools@61:", type="build") | ||
| depends_on("py-cython@3:", type="build") | ||
| depends_on("py-pybind11@2.11:2", type="build") # xtensor@0.27.1 *= overload issue | ||
| depends_on("py-numpy@1.25:", type=("build", "run")) |
There was a problem hiding this comment.
| depends_on("py-numpy@1.25:", type=("build", "run")) | |
| depends_on("py-numpy@1.25:2", type=("build", "run")) |
In https://github.com/erdc/proteus/blob/1.9.0/pyproject.toml#L2 it says "numpy>=1.25,<3"
requires = ["setuptools>=61.0","cython>=3.0,<4","pybind11>=2.11,<3","numpy>=1.25,<3","mpi4py"]| depends_on("metis") # through several dependencies | ||
| depends_on("superlu") | ||
| depends_on("triangle") # shells out but has linked in past | ||
| depends_on("tetgen") # shells out |
There was a problem hiding this comment.
| depends_on("tetgen") # shells out | |
| depends_on("tetgen", type="run") |
Same question.
| depends_on("superlu") | ||
| depends_on("triangle") # shells out but has linked in past | ||
| depends_on("tetgen") # shells out | ||
| depends_on("gmsh~fltk~med") # shells out to the gmsh, no fltk/med needed |
There was a problem hiding this comment.
| depends_on("gmsh~fltk~med") # shells out to the gmsh, no fltk/med needed | |
| depends_on("gmsh~fltk~med", type="run") |
Same question.
| depends_on("triangle") # shells out but has linked in past | ||
| depends_on("tetgen") # shells out | ||
| depends_on("gmsh~fltk~med") # shells out to the gmsh, no fltk/med needed | ||
| depends_on("ncurses") # Fenton waves as text gui, generally not used |
There was a problem hiding this comment.
| depends_on("ncurses") # Fenton waves as text gui, generally not used |
The comment is unclear to me. Is Ncurses directly used or not?
The search does not show me a place, only yml files specifying some build environments?
https://github.com/search?q=repo%3Aerdc%2Fproteus+ncurses&type=code
| depends_on("pumi@4.2.1:+zoltan+shared", when="+pumi") # <4.2.1 requires patch | ||
| depends_on("zoltan+parmetis~fortran", when="+pumi") | ||
| depends_on("parmetis") | ||
| depends_on("eigen@3.4") # xtensor dep |
There was a problem hiding this comment.
| depends_on("eigen@3.4") # xtensor dep |
There should be no need to specify all indirect dependencies, that's the job of the concetizer. My test build on Linux without depends_on("eigen@3.4") was successful.
| version("1.6", sha256="1766327add038495fa3499e9b7cc642179229750f7201b94f8e1b7bee76f8480") | ||
|
|
||
| depends_on("libx11", type="link") | ||
| depends_on("libx11", type=("build", "link")) |
There was a problem hiding this comment.
| depends_on("libx11", type=("build", "link")) | |
| depends_on("libx11") |
Build and Link are the default types, so the agument can be optimized out, AFAIK.
|
@cekees CI checks have passed for the last push, but several questions are open after more review, so I've enabled draft status to not run CI for every small change until all questions are resolved. Feel free to click the "Ready for review" button after all questions are answered and the PR is ready for another GitLab CI run and should be ready for merge. |
pumi: reverted to develop. The versions added here (4.1.0, 4.2.1) duplicate spack#6116 exactly, same commits, and cwsmith asked that proteus depend on 4.2.1 rather than carry patches for older versions. NOTE: develop's pumi tops out at 2.2.9, so depends_on("pumi@4.2.1:") cannot concretize until spack#6116 merges. py-proteus, from bernhardkaindl's review: - drop depends_on("fortran"): setup.py references no fortran/f2py; the .f files are standalone scripts under scripts/, not built by the package - py-cython@3 and py-numpy@1.25:2, matching pyproject.toml's own "cython>=3.0,<4" and "numpy>=1.25,<3" - drop mpi (implied by the +mpi variants), metis (via parmetis/pumi/petsc) and their env vars - triangle, tetgen and gmsh become type="run": setup.py links none of them, and they are invoked from 21, 4 and 3 python modules respectively - drop ncurses: "curses" appears nowhere in the proteus sources, only in conda environment files - drop eigen: no proteus source includes an Eigen header. Removed from the CPATH loop as well -- nothing else in the DAG provides eigen, so leaving self.spec["eigen"] there would raise KeyError py-proteus, from the Copilot review (both verified against proteus 1.9.0): - add py-future: proteus/richards/{ADR,Richards}.py and proteus/m_comp_co2/m_comp_co2.py use `from builtins ...` and `from past.utils ...`, and the Python builder installs with --no-deps py-scipy is kept deliberately: it is in setup.py's install_requires and is imported by proteus/AnalysisTools.py and proteus/mprans/BoundaryConditions.py. pyproject.toml's [build-system] requires lists build-time requirements only, which is why scipy does not appear there. chrono: drop the comment explaining that a C/C++ package needs C/C++ compilers, and simplify the ChClassFactory.h guard to a bare filter_file -- the header's own include guard makes a duplicate include harmless. triangle: depends_on("libx11") -- build and link are the default types. openblas: reword the comment, which described the change as carried on a branch pending an upstream fix; this is that upstream fix. Points at spack#6278 instead. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
scipy is absent from pyproject.toml's [build-system] requires and is never imported by setup.py; it appears only in install_requires and is used at runtime by proteus/AnalysisTools.py and proteus/mprans/BoundaryConditions.py. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
I think all we're waiting on to move out of draft mode for #6116 to be merged into develop and then one more merge of develop into this branch. |
Only proteus/richards/ADR.py imports past.utils, and that module cannot be imported regardless: its compiled companion proteus.richards.cADR is never built by setup.py. `from builtins ...` is Python 3 stdlib. The old_div uses are removed upstream (cekees/proteus#41, spack#42). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Just a note: |
Review and dependency summary:
Proteus (proteustoolkit.org): PDE/multiphysics toolkit built around PETSc for parallel linear/nonlinear solves.
This first pass deliberately omittted Chrono (rigid-body/FSI coupling) and SCOREC/PUMI (parallel mesh adaptation) support: both are optional at the proteus code level. Now PUMI has an upstream package with a PR that will work for this package. Chrono has a new package added to this PR.
Sources from cekees/proteus's main branch rather than erdc/proteus's tagged releases: the Chrono/SCOREC-optional support this "no chrono" package design depends on (the PROTEUS_SKIP_PUMI_CHRONO or PROTEUS_SKIP_PUMI and PROTEUS_SKIP_CHRONO env vars, and a try/except around an otherwise-unconditional Chrono config-file lookup) hasn't been released upstream yet. Revisit tracking erdc/proteus tags once that support lands there.
Built and verified working end-to-end (spack install + import proteus + petsc4py Comm.init()) against a from-scratch toolchain, including building openmpi/petsc/etc. from source rather than relying on any external MPI.
Obsolete comment (those fixes have been merged):