Repository navigation
Build ColPack without OpenMP by default - #245
Merged
Merged
Conversation
OpenMP only parallelises SMPGC, which OpenModelica does not use. With it, libSimulationRuntimeC.so links the compiler's OpenMP runtime, and simulation executables link against that without -fopenmp. On Alpine 3.24, clang 22 emits __kmpc_dispatch_deinit, which the packaged libomp 18 lacks, so every simulation failed to link. COLPACK_ENABLE_OPENMP=ON still enables it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With COLPACK_ENABLE_OPENMP=OFF, SMPGC failed to compile on macOS, where Apple clang has no omp.h. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AnHeuermann
force-pushed
the
colpack-no-openmp
branch
from
September 24, 2026 13:54
799178c to
fd4ca18
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Fixes the Alpine sanity check of OpenModelica (seen in OpenModelica/OpenModelica#16864). Every simulation executable failed to link:
Cause
Since b36ca1e, ColPack is built with OpenMP whenever it is found.
SimulationRuntimeClinks ColPack publicly, solibSimulationRuntimeC.solinks the OpenMP runtime, and generated simulation code links against it without-fopenmp. On Alpine 3.24,clangis clang 22, butopenmp-devis libomp 18.1.8. Since LLVM 19, clang emits__kmpc_dispatch_deinit, which libomp 18 does not have.Approach
OpenMP only parallelises ColPack's SMPGC, which OpenModelica does not use.
COLPACK_ENABLE_OPENMPnow defaults to OFF.-DCOLPACK_ENABLE_OPENMP=ONstill enables it.Built locally (gcc, Linux) with
COLPACK_ENABLE_OPENMP=OFF:libSimulationRuntimeC.sono longer depends on libgomp/libomp and has no undefinedomp_*,__kmpc_*orGOMP_*symbols.Existing build directories keep a cached
COLPACK_ENABLE_OPENMP=ONfrom b36ca1e until it is reset.🤖 Generated with Claude Code