I'm trying to compile an HPC application (LULESH) with offloading to a
This is the application:
I compiled it with success with GCC and XLC.
I can compile and run codes that offload to the GPU with clang for
So, going into the details of the issue.
I try to compile with the following line:
mpic++ -v -o lulesh2.0 lulesh.cc lulesh-comm.cc lulesh-viz.cc
lulesh-util.cc lulesh-init.cc -O0 -fopenmp=libomp
-fopenmp-targets=nvptx64-nvidia-cuda -DUSE_MPI=1 -lstdc++
When compiling with clang I get the following error:
"clang-7: error: nvlink command failed with exit code 255 (use -v to see
make: *** [lulesh2.0] Error 255"
This error is caused because 'nvlink' gets several Undefined references
to different functions (GCC and XLC don't encounter this problem)
The output generated when compiling with clang (due to its size, only the relevant text is attached, let me know if you need the full output)
clang information (with MPI wrapper):
$ mpic++ -v
clang version 7.0.0 (tags/RELEASE_700/final)
Thread model: posix
Found candidate GCC installation:
Selected GCC installation:
Candidate multilib: .;@m64
Selected multilib: .;@m64
Found CUDA installation: /usr/local/cuda-9.2, version 9.2
Also, using openmpi 3.0.0
Hopefully somebody has an idea on what's going on here.
If you need any more information to find the issue, let me know.
clang.output (46.9 KB)