Repository navigation
Releases
PrimalSolver 0.1.7
Command-line interface and language bindings for PrimalSolver 0.1.7.
Binaries
| platform | file |
|---|---|
| Linux x86_64 (static) | primal-0.1.7-linux-x86_64 |
| Linux aarch64 (static) | primal-0.1.7-linux-aarch64 |
| macOS arm64 | primal-0.1.7-macos-arm64 |
| Windows x86_64 | primal-0.1.7-windows-x86_64.exe |
| Windows i686 | primal-0.1.7-windows-i686.exe |
SHA256SUMS carries the checksums. The two Linux binaries are built and
attached by .github/workflows/ci.yml; the macOS and Windows ones are
cross-compiled from the same tag tree (MinGW-w64 for Windows) because the
hosted macOS runners are not available to this repository, so CI does not
execute them. The 32-bit Windows build also emits three
-Wmisleading-indentation warnings from sdp.c under that GCC; the other
targets are warning-free.
What changed since v0.1.5
- Julia package (
julia/) — the shared library now comes only from
PrimalSolver_jll: nodeps/build.jl, noPRIMAL_LIB/PRIMAL_C_SRC, no
lookups into a source checkout. A development build is selected with the
JLLWrappers preferencelibprimal_path(seejulia/README.md).
Pkg.test()now also runs the 171 programs inexamples/julia, the only
cover of the low-level API insrc/Model.jl. - CI —
.github/workflows/is published (it used to be gitignored, which
is why the repository had no CI); the newjulia.ymlrunsPkg.test()with
coverage on Julia 1.10 and 1.x, andci.ymlbuilds the C library and the
CLI on Linux. - Conic solver — the sparse KKT work: cone members absorbed into their
block, degree ordering of the pattern, fixed members solved outside the
factorization, fewer polish rounds, and the objective-accuracy fix for pure
EXP models. Benchmarks inBENCHMARKS.md.
Install
- Julia:
using Pkg; Pkg.add(["JuMP", "PrimalSolver"])(registration of
this version in the General registry follows this release). - Python:
pip install primalsolver. - CLI: download the asset for your platform above and run
primal model.mps --brief.
Known issues
primal --version in these binaries prints 0.1.4: the library carried two
version numbers — PRIMAL_getversion reported 0.1.4 while
PRIMAL_checkversion accepted only 0.1.0 — and the suite pinned both sides.
They are unified in 693534b (the version now lives once, in primal.h);
the binaries here are built from the tag tree and are left untouched.
PrimalSolver 0.1.0 — primal command line
PrimalSolver 0.1.0 — primal command line
A convex optimization solver written from scratch in portable C99 — LP, MILP,
QP, QCQP, SOCP, SDP, exponential and power cones, and mixed-integer conic
problems — with no dependencies beyond libc and libm.
This release ships the command-line front end primal: it reads a model
file, solves it and prints the solution.
Downloads
| platform | asset |
|---|---|
| macOS arm64 | primal-0.1.0-macos-arm64 |
| Linux x86_64 | primal-0.1.0-linux-x86_64 |
| Linux aarch64 | primal-0.1.0-linux-aarch64 |
| Windows x86_64 | primal-0.1.0-windows-x86_64.exe |
| Windows i686 | primal-0.1.0-windows-i686.exe |
The Linux and Windows builds are statically linked: the Linux ones carry no
glibc dependency, the Windows ones need only the UCRT (Windows 10+). macOS ships
the Apple-silicon build; on Intel macOS build from source (below).
All built from 787cd46 with -std=c99 -Wall -Wextra -pedantic -O2, zero
warnings. macOS may quarantine the downloaded file:
xattr -d com.apple.quarantine ./primal-0.1.0-macos-arm64
Usage
./primal-0.1.0-<platform> model.lp
The input file is the interface. Formats, detected automatically: CPLEX LP
(.lp), MPS (.mps), OPF (.opf), CBF (.cbf). The algorithm is chosen from
the model (LP, QP, SOCP, SDP, exponential/power, MIP), so one binary covers
every class. Options include --brief, --full (duals and slacks),
--solution-file FILE, --write FILE, --max-iter N,
--tol-pfeas/--tol-dfeas/--tol-gap V and --param NAME=VALUE; --help.
A worked input file with its expected output is in the README, and one
ready-to-run input per problem class is under examples/.
Build from source
make # builds out/primal
make test # 4910 checks, 0 failures
make run-samples
make run-examples
POSIX C99 with gcc or clang on Linux, macOS and the BSDs; on Windows use
MinGW-w64 (x86_64-w64-mingw32-gcc or i686-w64-mingw32-gcc) and link with
-pthread -static.
License
Apache-2.0.