Skip to content

macOS: ViennaPS PyPI wheel bundles `ibomp.dylib, causing OpenMP runtime conflict #167

@tobre1

Description

@tobre1

On macOS, importing the PyPI version of ViennaPS fails with the following error:

OMP: Error #15: Initializing libomp.dylib, but found libomp.dylib already initialized.
OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program.

The PyPI macOS wheel currently includes its own copy of libomp.dylib.
Since many macOS users also have OpenMP installed via Homebrew (/opt/homebrew/opt/libomp/lib/libomp.dylib), two OpenMP runtimes are loaded, leading to a segmentation fault.

ViennaPS should dynamically link to the system libomp.dylib and not package its own copy in the PyPI wheel.

Workaround:
Build ViennaPS locally from source, which links against the system OpenMP library and avoids this issue:

brew install libomp
git clone https://github.com/ViennaTools/ViennaPS.git
cd ViennaPS
pip install .

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions