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

Conversation

nordmoen
Copy link
Contributor

@nordmoen nordmoen commented Jun 2, 2021

When building Clang with the gcccuda toolchain (or just CUDA loaded) the offloading library might not be built due to a required dependency on elfutils, related to easybuilders/easybuild-easyconfigs#13006. This PR adds a check to see if the appropriate CUDA libomptarget library has been built.

Copy link
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this change, the use of eb --module-only is broken for Clang easyconfigs, because the default value for the custom build_targets easyconfig parameter is None (and it should stay that way):

ERROR: Traceback (most recent call last):
  File "/data/gent/400/vsc40023/easybuild_easy_installed/lib/python2.7/site-packages/easybuild_framework-4.3.5.dev0-py2.7.egg/easybuild/main.py", line 117, in build_and_install_software
    (ec_res['success'], app_log, err) = build_and_install_one(ec, init_env)
  File "/data/gent/400/vsc40023/easybuild_easy_installed/lib/python2.7/site-packages/easybuild_framework-4.3.5.dev0-py2.7.egg/easybuild/framework/easyblock.py", line 3633, in build_and_install_one
    result = app.run_all_steps(run_test_cases=run_test_cases)
  File "/data/gent/400/vsc40023/easybuild_easy_installed/lib/python2.7/site-packages/easybuild_framework-4.3.5.dev0-py2.7.egg/easybuild/framework/easyblock.py", line 3531, in run_all_steps
    self.run_step(step_name, step_methods)
  File "/data/gent/400/vsc40023/easybuild_easy_installed/lib/python2.7/site-packages/easybuild_framework-4.3.5.dev0-py2.7.egg/easybuild/framework/easyblock.py", line 3386, in run_step
    step_method(self)()
  File "/tmp/eb-561wpn5k/included-easyblocks-eyg4ijqe/easybuild/easyblocks/clang.py", line 481, in sanity_check_step
    if 'NVPTX' in self.cfg['build_targets']:
TypeError: argument of type 'NoneType' is not iterable

This is easy to fix though, by moving the logic w.r.t. build_targets into the prepare_step method, since that step is always run, also when using --module-only.

Fixed in nordmoen#1

move logic w.r.t. build_targets to prepare step in Clang easyblock
@boegel
Copy link
Member

boegel commented Jun 3, 2021

Test report by @boegel

Overview of tested easyconfigs (in order)

  • SUCCESS Clang-11.0.1-GCCcore-10.2.0.eb
  • SUCCESS Clang-11.0.1-gcccuda-2020b.eb
  • SUCCESS Clang-8.0.0-GCCcore-8.2.0-CUDA-10.1.105.eb
  • SUCCESS Clang-8.0.1-GCC-8.2.0-2.31.1-CUDA-10.1.105.eb
  • SUCCESS Clang-8.0.1-GCC-8.3.0-CUDA-10.1.243.eb
  • SUCCESS Clang-9.0.1-GCC-8.3.0-CUDA-10.1.243.eb

Build succeeded for 6 out of 6 (6 easyconfigs in total)
node2617.swalot.os - Linux centos linux 7.9.2009, x86_64, Intel(R) Xeon(R) CPU E5-2660 v3 @ 2.60GHz (haswell), Python 3.6.8
See https://gist.github.com/57027dcf464c1257474f6834ba960d9e for a full test report.

@boegel boegel changed the title Check if Clang produced CUDA offload library enhance sanity check for Clang to verify if CUDA offload library was produced Jun 3, 2021
@boegel boegel merged commit 30dcfb2 into easybuilders:develop Jun 3, 2021
@boegel boegel added enhancement and removed bug fix labels Jun 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants