RAJA: OpenMP target code does not compile

Summary

I cannot complete a build of RAJA with any compiler of interest (to me).

Compilers Tested

$ gcc-7 --version
gcc-7 (GCC) 7.1.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ icc --version
icc (ICC) 18.0.1 20171018
Copyright (C) 1985-2017 Intel Corporation.  All rights reserved.

$ clang-4.0 --version
clang version 4.0.0 (tags/RELEASE_400/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/llvm/4.0.0/bin

Errors

GCC

/home/jrhammon/Work/DOE/LLNL/RAJA/test/unit/omp-target/test-reductions.cpp: In member function ‘virtual void gtest_case_ReductionCorrectnessTestTargetOMP_::ReduceSum<gtest_TypeParam_>::TestBody()’:
/home/jrhammon/Work/DOE/LLNL/RAJA/test/unit/omp-target/test-reductions.cpp:143:9: error: ‘#pragma omp target data’ must contain at least one ‘map’ clause
 #pragma omp target data use_device_ptr(array)

Details: gcc.log

Intel

[ 76%] Building CXX object test/unit/omp-target/CMakeFiles/test-omp-target-reductions.exe.dir/test-reductions.cpp.o
/home/jrhammon/Work/DOE/LLNL/RAJA/include/RAJA/policy/openmp/target_forall.hpp(67): error: variable "body" used in this "omp target" region is not bitwise copyable
      schedule(static, 1) map(to : body)

Details: intel.log

Clang

/home/jrhammon/Work/DOE/LLNL/RAJA/test/unit/omp-target/test-reductions.cpp:143:9: error: expected at least one map clause for '#pragma omp target data'
#pragma omp target data use_device_ptr(array)

Details: clang.log

About this issue

  • Original URL
  • State: open
  • Created 7 years ago
  • Comments: 32 (28 by maintainers)

Most upvoted comments

sigh this is what happens when I don’t get sleep. I’ll look into it in a bit, thanks!

Sent from my iPhone

On Nov 3, 2019, at 3:14 PM, Jeff Hammond notifications@github.com wrote:

Would you mind filing an issue for it on github?

Can you be more specific? This is a GitHub issue. Do you mean filing an issue against GCC? They don’t use GitHub but I can file issues in their Bugzilla or whatever it is.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/LLNL/RAJA/issues/372?email_source=notifications&email_token=AAFBFNKT7CFKPA666FGRIX3QR3TGNA5CNFSM4EG4VKW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEC5U74A#issuecomment-549146608, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAFBFNK5FTKRGWVH77OJOILQR3TGNANCNFSM4EG4VKWQ.

Update: It compiles with Clang HEAD, but not GCC HEAD, although I didn’t dig into the latter yet. The only issue with Clang HEAD is that libomptarget.so was not linked automatically, which I assume is user/toolchain error.