MATLAB interface and rebuilt toolbox for SCS 3.3.1. The scs submodule is pinned to the final core release commit cc244ebc4bff620e2e228e99a4e2e24ab12f9e3b.
Installation and compatibility
Download SCS.mltbx below and open it in MATLAB. The toolbox includes Windows x86-64, Linux x86-64, Intel Mac, and Apple Silicon Mac binaries. Windows/Linux/Intel Mac builds retain the MATLAB R2022b baseline; native Apple Silicon MATLAB requires R2023b or newer.
Linux requires glibc 2.31 or newer. Older systems can build from source. The packaged binaries are serial; supported OpenMP builds remain available from source.
After installing, run scs_version in MATLAB and check that it reports 3.3.1. Reinitialize any solver workspaces rather than carrying live workspace handles across a toolbox/MEX upgrade.
Native Mac support and Linux ABI (#43, #44)
- Ship both Apple Silicon (
mexmaca64) and Intel Mac (mexmaci64) binaries. Toolbox metadata now correctly advertises Mac support, rather than disabling the platform despite claiming Apple Silicon compatibility. - Build Linux MEX files on a pinned Ubuntu 22.04 runner and reject imports newer than
GLIBC_2.31before packaging. The runner version and supported runtime baseline are separate choices. - Document how to review the baseline when changing supported Linux distributions, MATLAB versions, or build runners. The ABI check should be retained; raising the minimum runtime is a deliberate compatibility change, not a reason to remove the check.
SCS 3.3 settings (#45, #50)
The MATLAB parser now forwards adaptive_diag_scale, acceleration_type_1, acceleration_regularization, and acceleration_relaxation. Users can disable adaptive diagonal scaling or select and tune AA explicitly; these settings are no longer silently ignored.
A finite negative regularization value pins its absolute magnitude. It does not apply a negative regularization shift. The release regression covers positive and negative values with default, QDLDL, and indirect solvers and requires a solved result.
MEX argument and output safety (#46, #48)
- Require sparse, real, double
A/Pwith dimensions matching the problem. Validate dense real-doubleb/cusing their complete vector lengths, including row vectors. - Validate cone dimensions and paired spectral arrays before native copies: dimensions must be finite, integral, representable, and have compatible lengths. Box bounds retain valid one-sided infinities while malformed/NaN bounds are rejected.
- Accept logical scalar settings such as
verbose=truesafely. Reject fractional or overflowing integer settings rather than silently narrowing them. - Validate workspace update vector lengths and types before copying. An empty update vector still means leave that vector unchanged.
- Validate warm-start inputs while preserving the documented fallback behavior for unsuitable starts.
- Respect the number of requested outputs, avoid constructing unused result copies where possible, and reject unsupported argument/output counts with usage errors instead of writing outside MATLAB's output frame.
These checks turn malformed inputs that could previously crash MATLAB or silently truncate data into explicit errors; they do not expand the supported problem classes.
Independent reusable workspaces (#47)
Each initialized workspace now has its own opaque handle. Creating another workspace with the same backend no longer silently replaces the first. Invalid, finished, and stale handles are rejected; cleanup and MEX lifetime are managed for the registered workspaces.
The public workflow remains:
work = scs_init(data, cone, settings);
[x, y, s, info] = scs_solve(work);
scs_update(work, b_new, []); % keep c unchanged
[x, y, s, info] = scs_solve(work);
scs_finish(work);Workspace updates reuse the existing factorization when only b/c change. Treat the handle as opaque, finish it when done, and do not save it for reuse in a different MATLAB session.
Optional GPU backend (#49)
The optional GPU implementation is now the cuDSS direct solver, replacing the GPU indirect path. Its build uses 32-bit indices as required by the supported cuDSS interface, includes the necessary CUDA libraries, and handles runtime library paths explicitly. CI checks compilation, linking, dependency resolution, and MEX loading, including install paths containing spaces.
The toolbox does not ship GPU binaries. A source build and compatible CUDA/cuDSS installation are required; Linux is the documented practical target. Hosted CI has no GPU, so compile/load coverage is not a GPU numerical-solve validation.
Release validation
The build matrix tests serial MEX binaries on all four shipped platforms, with additional OpenMP coverage on Linux and Apple Silicon. The assembled toolbox is then installed and smoke-tested on Linux, Windows, Apple Silicon, and Intel Mac, checking the actual installed MEX paths and successful solves. The submodule/version PR also exercises the new regularization contract against the final 3.3.1 core.
The release process waits for both PR and merged-branch CI before tagging, and the tag workflow rebuilds and tests the packaged artifact before attaching SCS.mltbx. MATLAB numerical validation is performed in CI, not claimed from the local development machine.
Published artifact verification
The production toolbox workflow passed, including installed-toolbox tests and release upload. The downloaded SCS.mltbx was independently checked for version 3.3.1, enabled Linux/Mac/Windows platform metadata, and all 20 expected MEX files (five modules on four platforms).
SCS.mltbx SHA-256: a2eea33f6120ecbe7cd85fe865e4d0f7e7937a9d3c152bbf4fba21c22e2fe764.
What's Changed
- Fix native Apple Silicon toolbox packaging by @bodono in #43
- Target glibc 2.31+ for Linux MEX releases by @bodono in #44
- Expose SCS 3.3 settings in the MATLAB binding by @bodono in #45
- Validate MEX inputs before native copies by @bodono in #46
- Support multiple independent MATLAB workspaces per backend by @bodono in #47
- Validate MATLAB workspace update vectors before native copies by @bodono in #48
- Replace the GPU indirect backend with the cuDSS direct solver by @bodono in #49
- Bump to 3.3.1 and update the SCS core submodule by @bodono in #50
Full Changelog: 3.3.0...3.3.1