Build the bundled modern fortran-lang/minpack source with PRIK and validate all 22 public procedures against direct linear-algebra identities and deterministic nonlinear problems.
No f2py comparison wrapper is required, and the inventory has no unsupported or skipped procedures.
Install GNU Fortran. On Ubuntu:
sudo apt-get update
sudo apt-get install --yes gfortranInstall the pinned numerical tools:
python3 -m pip install "numpy==2.5.1" pytestRun the remaining commands from the PRIK repository root.
Build the extension and run the complete test suite:
source examples/minpack/build_all.sh
python3 -m pytest -q examples/minpack/testsUse source so the build directory exported by build_all.sh remains on
PYTHONPATH for pytest.
PRIK reads and compiles the checked-in minpack.f90 public module together
with its generated bridge. Each source is compiled once and no alternative
wrapper is created.
export EXAMPLE_WORKSPACE="$PWD"
export MINPACK_BUILD_ROOT="$(mktemp -d)"
mkdir -p "$MINPACK_BUILD_ROOT/prik/generated"
cd "$MINPACK_BUILD_ROOT/prik"
python3 -m prik "$EXAMPLE_WORKSPACE/examples/minpack/native/minpack.f90" \
--out prik_reference_minpack \
--out-dir "$MINPACK_BUILD_ROOT/prik/generated" \
--compiler "$(command -v gfortran)" \
--jobs 8 \
--wrapper-fortran-flags="-O0 -g0" \
--wrapper-c-flags="-O0 -g0"After the quick-start build, run one family or routine:
python3 -m pytest -q examples/minpack/tests/test_solvers.py
python3 -m pytest -q \
examples/minpack/tests/test_solvers.py::test_hybrd1The suite covers all 22 public diagnostics, finite-difference helpers, hybrid solvers, Levenberg-Marquardt solvers, factorizations, and rank-one updates. Solver tests check residuals and statuses against known systems; helper tests use nontrivial algebraic invariants. Tests also verify callback counts, caller-array writebacks, and Fortran-order matrices.
The public routine list stays in sync with the generated exports, and every public procedure is exercised.
native/minpack.f90 matches upstream src/minpack.f90
at
fortran-lang/minpack commit c0b5aea9fcd2b83865af921a7a7e881904f8d3c2.
See the upstream repository, API documentation, and license before
redistributing the bundled native source.