Skip to content

ColPack: use OpenMP only when it is found - #243

Merged
sjoelund merged 1 commit into
masterfrom
colpack-openmp
Sep 24, 2026
Merged

sjoelund merged 1 commit into
masterfrom
colpack-openmp

Conversation

@sjoelund

Copy link
Copy Markdown
Member

ColPack's own CMakeLists.txt defaults COLPACK_ENABLE_OPENMP to ON and then requires OpenMP. The clang-cl cross build for Windows has no OpenMP runtime, so configuring it failed:

Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS
OpenMP_CXX_LIB_NAMES)

The vendored copy never used OpenMP, and only SMPGC is parallelised, which OpenModelica does not call. Probe for OpenMP first and enable it in ColPack only if it is there. OpenMP_RUNTIME_MSVC is set as ColPack would set it, so the cached probe is the one ColPack wants.

Assisted-by: Claude Opus 5.5

Related Issues

Purpose

Approach

ColPack's own CMakeLists.txt defaults COLPACK_ENABLE_OPENMP to ON and
then requires OpenMP. The clang-cl cross build for Windows has no OpenMP
runtime, so configuring it failed:

    Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS
    OpenMP_CXX_LIB_NAMES)

The vendored copy never used OpenMP, and only SMPGC is parallelised,
which OpenModelica does not call. Probe for OpenMP first and enable it
in ColPack only if it is there. OpenMP_RUNTIME_MSVC is set as ColPack
would set it, so the cached probe is the one ColPack wants.

Assisted-by: Claude Opus 5.5
@sjoelund
sjoelund merged commit b36ca1e into master Sep 24, 2026
5 checks passed
@sjoelund
sjoelund deleted the colpack-openmp branch September 24, 2026 06:11
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.

1 participant