I am asking what is the difference between the current and previous installation of clang/llvm on JLSE. Can anybody help answering?
When I loaded llvm/release-13.0.1, I see "cuda/11.0.2 " is automatically loaded. But when I "module unload cuda/11.0.2", then module llvm/release-13.0.1 is also unloaded automatically.
The cuda module is a dependency of the llvm module and unloading cuda unloads llvm
The reason why I am concerned this is because, when I recompiled my sycl code, I got clang++ linking error "...ld: /soft/restricted/CNDA/sdk/2022.01.30.001/oneapi/mkl/20220311/mkl/lib/intel64/libmkl_sycl.so: undefined reference to `clCreateProgramWithIL". This
is an error related to runtime system conflicts. For the same code, previously there was no linking error with clang++.
The cuda module doesn't add any path at linking. To
understand why the link failure, you will need to extract the exact linking command line and debug the issue.The mkl_sycl.so looks for an OpenCL runtime,
the "undefined reference" error indicates an incompatible one is being used. You may add -v to clang++ to figure out which one is being picked up and why.
This is why I am asking if any big change of clang compiler/llvm module on JLSE.
There is no change in llvm modules. All the llvm modules at /soft/modulefiles/llvm loads a CUDA module. If you succeeded in the past, it must be a different clang/llvm installation.
Ye
From: Jiang, Wei <wjiang@alcf.anl.gov>
Sent: Thursday, June 2, 2022 12:34 PM
To: Luo, Ye <yeluo@anl.gov>; ecp-aurora-sdk-discuss@lists.jlse.anl.gov <ecp-aurora-sdk-discuss@lists.jlse.anl.gov>
Subject: Re: clang compiler & LLVM module load
When I loaded llvm/release-13.0.1, I see "cuda/11.0.2 " is automatically loaded. But when I "module unload cuda/11.0.2", then module llvm/release-13.0.1 is also unloaded automatically.
The reason why I am concerned this is because, when I recompiled my sycl code, I got clang++ linking error "...ld: /soft/restricted/CNDA/sdk/2022.01.30.001/oneapi/mkl/20220311/mkl/lib/intel64/libmkl_sycl.so: undefined reference to `clCreateProgramWithIL". This
is an error related to runtime system conflicts. For the same code, previously there was no linking error with clang++. This is why I am asking if any big change of clang compiler/llvm module on JLSE.
From: Luo, Ye <yeluo@anl.gov>
Sent: Thursday, June 2, 2022 11:00 AM
To: ecp-aurora-sdk-discuss@lists.jlse.anl.gov <ecp-aurora-sdk-discuss@lists.jlse.anl.gov>; Jiang, Wei <wjiang@alcf.anl.gov>
Subject: Re: clang compiler & LLVM module load
Hi Wei,
Hi, I notice on JLSE the clang compiler is put into llvm module recently, and loading llvm module requires cuda dependency and
therefore essentially linking cudarts.lib.
The red part is not true. Users remain responsible to control the linking.
Does it mean the clang compiler is set as a compiler "default" for CUDA rts?
Clang is compiler. cudarts.libs are just libraries. libraries have no idea about the compiler. So nothing as "default".
In short, even if the llvm module loads cuda module, clang doesn't actively engage CUDA toolchain unless being explicitly requested for example when -fopenmp-targets=nvptx64 or compiling cu source code.
Ye