llnl / llnl/blt

OpenMP target flags depend on CMake version

Open
#606 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

flags maintenance openmp
Dominant language
C++
Stars
296
Forks
66
Avg merge
1h 3m
Merged PRs (30d)
1

Description

In RAJA, we required CMake 3.14.5 as the min cmake version (default on LC systems). Then, we specified OpenMP compiler flags for OpenMP target offload builds using, for example for clang:

`-DOpenMP_CXX_FLAGS="-fopenmp;-fopenmp-targets=nvptx64-nvidia-cuda"`

In the last release, we bumped the min cmake version requirement to 3.20. Now, to build and link with OpenMP target offload, we need to use:

`-DBLT_OPENMP_COMPILE_FLAGS="-fopenmp;-fopenmp-targets=nvptx64-nvidia-cuda"
-DBLT_OPENMP_LINK_FLAGS="-fopenmp;-fopenmp-targets=nvptx64-nvidia-cuda"`

That is, we need to over-ride BLT logic for setting OpenMP complier and linker flags and force the flag settings to get the code to build and link. Fortunately, BLT gave us a way to do that.

Anyway, is this expected? Is there anything that can be done in BLT to simplify this cmake version dependency? Or, is there a better way we can handle this in our code?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names BLT's OpenMP flag logic and the CMake 3.14.5 versus 3.20 behavior, but no files or tests. Start by locating the BLT logic that sets OpenMP compile and link flags, then compare the two CMake versions and the documented override variables. Done means establishing whether the dependency is expected and identifying a simpler supported configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.