Allow compilation when OpenMP is unavailable
See original GitHub issueIs your feature request related to a problem? Please describe.
I’m trying to get started with dace on a mac where the default compiler doesn’t support OpenMP. Poking around I saw that a single threaded schedule is supported, but I couldn’t figure out how to make use of it, given a dace.program
instance.
Describe the solution you’d like
A workaround for when OpenMP support, i.e. prog.compile(without_omp=True)
or longer if necessary. It would be ideal though to fall back automatically if CMake says it can’t find OpenMP.
Describe alternatives you’ve considered Installing GCC via brew but I’m not sure how to tell dace to use GCC instead of clang on Mac. I considered running in Docker but not enough time to set it all up.
Additional context Devs on Mac will run into this issue, so some at least a workaround if not a solution would be nice.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top GitHub Comments
You just pass a string. Assuming the compiler executable is in the PATH, you only need the name. For example, see the first lines of a sample config file below. You are interested in the last line:
As you noted, it is possible to change the schedule of the Maps to be sequential. It might be useful to have an API method to automate this. However, CMake will probably still try to find OpenMP, so I don’t think that this is a real solution to the issue.
Regarding selecting GCC, you should be able to do something like
CXX=g++ python dace_program.py
, which should tell to CMAKE to use g++.I would also try to add OpenMP support to clang. This link might help.