easybuilders / easybuild-easyblocks

Collection of easyblocks that implement support for building and installing software with EasyBuild.
https://easybuild.io
GNU General Public License v2.0
105 stars 285 forks source link

Additional options required for Clang and GPU offloading #1990

Open ocaisa opened 4 years ago

ocaisa commented 4 years ago

I just noticied that the JSC easyconfigs set a number of additional options for Clang 9.0.0:

configopts = '-DCLANG_OPENMP_NVPTX_DEFAULT_ARCH=sm_37'
configopts += ' -DLIBOMPTARGET_NVPTX_COMPUTE_CAPABILITIES=35,37'
configopts += ' -DCLANG_DEFAULT_STD_CXX=cxx14'
stage3_configopts = '-DLIBOMPTARGET_NVPTX_ENABLE_BCLIB=1'
stage3_configopts += ' -DLIBOMPTARGET_NVPTX_CUDA_COMPILER=%(builddir)s/llvm.obj.2/bin/clang'
stage3_configopts += ' -DLIBOMPTARGET_NVPTX_BC_LINKER=%(builddir)s/llvm.obj.2//bin/llvm-link'

The OMP related stuff in stage 3 looks like it may have some importance, any more info @damianam ?

damianam commented 4 years ago

That's to enable OpenMP offloading to GPUs. Without it clang will be compiled, but when using OpenMP offload it won't really work. bc files will be missing and therefore clang won't be able to generate code for GPUs. I did that long time ago, I don't remember all the details, but that's the general idea.

boegel commented 2 years ago

Is this still relevant after the recent updates to the Clang easyblock (see #2229 + follow-up PRs)?