Building and Using LLVM/Clang 7.0 with OpenMP Offloading to NVIDIA GPUs

Jonas,
I’m re-reading your instructions and now am wondering what env vars related to CUDA Toolkit installations are required when building Clang?

I’m having a hard time in the last couples of days matching the Clang building env and runtime env.

Thanks,
Itaru.

Jonas,

If addressing me, please include my email address to make sure it ends
up in my inbox. Otherwise messages sent only to the mailing lists get
filtered into folders that I may read / scroll over from time to time.

I’m re-reading your instructions and now am wondering what env vars related to CUDA Toolkit installations are required when building Clang?

None that I'm aware of, at least I didn't set any in addition to those
by our 'module'. IIRC Clang detects CUDA installations by looking for
the first 'ptxas' in PATH. Unless that changed, make sure that clang -v
prints the right installation and you should be good.

Jonas

Jonas,
Could you tell me how the module file is written, removing
system-specific information, but
leaving relevant for the CUDA Toolkit installation? The path to binary
needs to be in PATH,
and libraries in LD_LIBRARY_PATH I suppose, but not sure if there
needs to be other than that.

Jonas,
Could you tell me how the module file is written, removing
system-specific information, but
leaving relevant for the CUDA Toolkit installation? The path to binary
needs to be in PATH,
and libraries in LD_LIBRARY_PATH I suppose, but not sure if there
needs to be other than that.

Yes, that should be the relevant ones (plus maybe CPATH, but CMake
should add the include directory itself) - as I said nothing special.
The other variables are not actually required, but are set for user
convenience like CUDA_ROOT.

This is what "module show" lists for our cuda/10 module:

prepend-path PATH /usr/local/sw/cuda/10.2.89/bin :
prepend-path PATH /usr/local/sw/cuda/10.2.89/computeprof/bin :
prepend-path PATH /usr/local/sw/cuda/10.2.89/nvvm/bin :
prepend-path CPATH /usr/local/sw/cuda/10.2.89/include :
prepend-path LD_LIBRARY_PATH
/usr/local/sw/cuda/10.2.89/lib64:/usr/local/sw/cuda/10.2.89/lib64/lib64 :
prepend-path LD_LIBRARY_PATH /usr/local/sw/cuda/10.2.89/computeprof/bin :
prepend-path LD_LIBRARY_PATH /usr/local/sw/cuda/10.2.89/nvvm/lib64 :
prepend-path LD_LIBRARY_PATH /usr/local/sw/cuda/10.2.89/extras/CUPTI/lib64 :
prepend-path LIBRARY_PATH /usr/local/sw/cuda/10.2.89/nvvm/libdevice :
prepend-path MANPATH /usr/local/sw/cuda/10.2.89/doc/man :

Hope this helps,

Joachim