Compiler error when Axom is built with ENABLE_CUDA=OFF, but a dependent is built with CUDA on
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 196
- Forks
- 34
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 11
Description
I have ENABLE_CUDA=ON for CAMP, Umpire, and RAJA. I set ENABLE_CUDA=OFF in Axom, as well as in several other libraries that use Axom (mainly I need to turn CUDA off in spheral since there are build issues there). However, in our application, we do set ENABLE_CUDA=ON and I get a compiler error:
include/axom/core/ArrayBase.hpp(886): error: namespace "axom" has no member "CUDA_EXEC"
I believe there were also build errors coming from Axom headers when I enabled CUDA in Axom, but disabled CUDA in a library that depends on Axom.
It looks like there is a lot of inconsistency in which macros are used for determining when CUDA should be used (AXOM_USE_UMPIRE, AXOM_USE_RAJA, AXOM_USE_CUDA, AXOM_GPUCC). Perhaps the strategy for which should be used needs to be revisited.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with include/axom/core/ArrayBase.hpp around line 886 and trace how AXOM_USE_UMPIRE, AXOM_USE_RAJA, AXOM_USE_CUDA, and AXOM_GPUCC control CUDA-related declarations. Reproduce the reported matrix with Axom built with ENABLE_CUDA=OFF and a dependent application built with CUDA enabled, then compare the inverse configuration. Done means dependent builds no longer fail because axom::CUDA_EXEC is unavailable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system, hpc
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100