Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance sanity check for Clang to verify if CUDA offload library was produced #2454

Merged
merged 4 commits into from
Jun 3, 2021
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions easybuild/easyblocks/c/clang.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,23 @@ def sanity_check_step(self):
if LooseVersion(self.version) >= LooseVersion('3.8'):
custom_paths['files'].extend(["lib/libomp.%s" % shlib_ext, "lib/clang/%s/include/omp.h" % self.version])

if 'NVPTX' in self.cfg['build_targets']:
arch = get_cpu_architecture()
# Check architecture explicitly since Clang uses potentially
# different names
if arch == X86_64:
arch = 'x86_64'
elif arch == POWER:
arch = 'ppc64'
boegel marked this conversation as resolved.
Show resolved Hide resolved
elif arch == AARCH64:
arch = 'aarch64'
else:
print_warning("Unknown CPU architecture (%s) for OpenMP offloading!" % arch)
custom_paths['files'].extend(["lib/libomptarget.%s" % shlib_ext,
"lib/libomptarget-nvptx.a",
"lib/libomptarget.rtl.cuda.%s" % shlib_ext,
"lib/libomptarget.rtl.%s.%s" % (arch, shlib_ext)])

custom_commands = ['clang --help', 'clang++ --help', 'llvm-config --cxxflags']
super(EB_Clang, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands)

Expand Down