Skip to content

Comments

fix[cartesian]: MacOS & OpenMP: skip the multithreading#2491

Open
FlorianDeconinck wants to merge 3 commits intoGridTools:mainfrom
FlorianDeconinck:fix/macos_apple_clang_openmp_deactivate
Open

fix[cartesian]: MacOS & OpenMP: skip the multithreading#2491
FlorianDeconinck wants to merge 3 commits intoGridTools:mainfrom
FlorianDeconinck:fix/macos_apple_clang_openmp_deactivate

Conversation

@FlorianDeconinck
Copy link
Contributor

Description

This PR deactivate OpenMP when detecting MacOS (Darwin) as the OS.

The reason are simple apple-clang don't ship with openmp by default and the way to acquire it is requires brew or other workaround we won't expect out of our users.

In detail the PR:

  • strips includes and omp_get_max_threads from codegen on the glue code of stencil DaCe backends when all the computes are sequential (non MacOS related),
  • put an option in the StencilBuilder to centralize deactivation of OpenMP and turn it off when detecting Darwin (+ warning),
  • makes all maps sequential as part of the OIR -> TreeIR process based on the above option,
  • strips openmp flags from the command line based on the above option.

Requirements

  • All fixes and/or new features come with corresponding tests.

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