-
Couldn't load subscription status.
- Fork 29
Closed
Description
Hi all,
swmm-python fails to compile in M1 Macs. It seems to be an openmp issue. Digging more into it, I've discovered that llvm does not yet fully support openmp (see seq-lang/seq#248 (comment)). The same issue seems to persist with gcc as well.
I found two ways to address this issue:
- Compile with
set(CMAKE_OSX_ARCHITECTURES "x86_64") - Disable openmp in CmakeLists
Though 1 works, it would need x86_64 python installed. For now I think 2 might be the best option. We would just have to update cmakelists file.
# If wheel build on Apple fetch and build OpenMP Library
if (APPLE AND (NOT CMAKE_OSX_ARCHITECTURES STREQUAL "arm64"))
include(./extern/openmp.cmake)
else()
find_package(OpenMP
OPTIONAL_COMPONENTS
C
)
endif()I'll keep looking for a way to support openmp on m1 Macs. For now, I am able to compile swmm-python and run pyswmm without openmp.
Metadata
Metadata
Assignees
Labels
No labels
