Open jeffhammond opened 3 years ago
Hey @jeffhammond - setting -D on your Cmake line will only set that as a CMake option. Camp is looking for a compiler macro define. Can you try adding -DENABLE_TARGET_OPENMP
to CMAKE_CXX_FLAGS
?
I just hard-coded it in the header, which is equivalent to the flags suggestion, and that works, but I wonder how RAJA OpenMP Target ever worked, unless everyone who uses it knows that CMake doesn't propagate this token.
@jeffhammond actually, the RAJA OpenMP Target back-end is mostly for cussing at compilers and amusement purposes. Please no wagering.... :smile:
Just seeing this thread now, sorry about this . . . I added that check to prevent OpenMP Target from being built on machines without GPUs. We did not have the #if defined(ENABLE_TARGET_OPENMP)
check before, and CAMP would attempt to build omp-target if the compiler was capable.
Hi @jeffhammond, does the latest camp/main (https://github.com/LLNL/camp) solve this problem for you? We put some recent changes into the Camp repo which hopefully have taken care of this, and you're welcome to try it out.
I must be stupid, because I set
-DENABLE_TARGET_OPENMP=On
or-DENABLE_TARGET_OPENMP=1
and CAMP does not set it. I'd like some sort of diagnostic here, rather than just having the build fail and having to print-debug the preprocessor.my pathetic attempts to debug this