Skip to content

Update SuiteSparse to v7.12.2 (submodule + upstream CMake)#218

Draft
SVAGEN26 wants to merge 3 commits into
OpenModelica:masterfrom
SVAGEN26:issue-15595-suitesparse-v7
Draft

Update SuiteSparse to v7.12.2 (submodule + upstream CMake)#218
SVAGEN26 wants to merge 3 commits into
OpenModelica:masterfrom
SVAGEN26:issue-15595-suitesparse-v7

Conversation

@SVAGEN26

Copy link
Copy Markdown

Summary

Replaces the vendored SuiteSparse-5.8.1/ directory and its hand-written 268-line wrapper CMakeLists.txt with a git submodule pinned to DrTimothyAldenDavis/SuiteSparse release tag v7.12.2. All special handling moves to the parent OMCompiler/3rdParty/CMakeLists.txt and delegates to upstream SuiteSparse CMake via SUITESPARSE_ENABLE_PROJECTS.

Root cause / motivation

Refs OpenModelica/OpenModelica#15595. SuiteSparse 5.8.1 (2020) is well behind upstream; v6+ moved to per-subpackage CMake and v7 changed several APIs and headers. The existing wrapper does not survive the version bump.

Change details

  • Submodule SuiteSparse pinned to v7.12.2.
  • Enabled subset: suitesparse_config;amd;colamd;btf;klu;umfpack.
  • BUILD_STATIC_LIBS=ON, BUILD_SHARED_LIBS=OFF.
  • KLU_USE_CHOLMOD=OFF, UMFPACK_USE_CHOLMOD=OFF (OMC does not use CHOLMOD).
  • Disabled: OpenMP, CUDA, Fortran, demos, strict mode.
  • New static target names aliased to existing omc::3rd::suitesparse::* namespace.
  • Sundials integration variables (KLU_LIBRARY, AMD_LIBRARY, etc.) repointed at the static targets so Sundials 5.4 picks them up.

Tested

  • Full Debug build of omc on Linux passes.
  • SimulationRuntime ctest unit tests: 13/13 green.

Scope

Per AnHeuermann's direction on #15595, Linux CI is the bar; Windows regressions and Makefile prettiness are explicitly deferred. The OMC runtime header fix (drop obsolete umfpack_get_numeric.h include) lives in the matching OpenModelica/OpenModelica PR.

Companion PR on the main repository will be linked here.

JKRT and others added 2 commits June 22, 2026 11:49
Remove the hand-written 268-line wrapper CMakeLists.txt and the entire
in-tree SuiteSparse-5.8.1 copy. Add DrTimothyAldenDavis/SuiteSparse as a
git submodule pinned to release tag v7.12.2.

All special handling (target aliasing, KLU_LIBRARY, SUITESPARSECONFIG_LIBRARY,
include directories) will move to OMCompiler/3rdParty/CMakeLists.txt in the
main repository as part of the matching PR.

Refs OpenModelica/OpenModelica#15595

Co-Authored-By: JKRT_CLAUDE <247156613+SVAGEN26@users.noreply.github.com>
Delegate the SuiteSparse build to the upstream top-level CMakeLists by
setting SUITESPARSE_ENABLE_PROJECTS to the subset OMC actually consumes
(suitesparse_config, amd, colamd, btf, klu, umfpack) and disabling
optional features (OpenMP, CUDA, Fortran, demos, CHOLMOD in KLU and
UMFPACK).

Static targets exported by v7 are SuiteSparseConfig_static, AMD_static,
COLAMD_static, BTF_static, KLU_static and UMFPACK_static. Alias them to
the existing omc::3rd::suitesparse::* names and set KLU_LIBRARY etc. to
the static target names so Sundials 5.4 picks them up.

Linux build of the full omc plus the SimulationRuntime ctest unit tests
both green.

Refs OpenModelica/OpenModelica#15595

Co-Authored-By: JKRT_CLAUDE <247156613+SVAGEN26@users.noreply.github.com>
@SVAGEN26 SVAGEN26 force-pushed the issue-15595-suitesparse-v7 branch from 535f583 to cc1873e Compare June 22, 2026 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants