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

WIP: Add support for NVIDIA nvc++ compiler #17000

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

cgleggett
Copy link

@cgleggett cgleggett commented Nov 20, 2024

This Pull request:

Adds support for NVIDIA's nvc++ compiler

Fixes #16975

Changes or fixes:

  • check if at least ver 24.11 of nvc++ compiler is being used
  • when building cling, nvc++ uses a different syntax than gcc to extract the system include header locations. Instead of -xc++ -E -v, and then a bunch of sed parsing, it uses the -drygccinc flag to produce a colon separated list of paths.

This allows clean compilation on ARM (NVIDIA Grace) CPUs.

Copy link

Test Results

    18 files      18 suites   4d 15h 23m 21s ⏱️
 2 683 tests  2 683 ✅ 0 💤 0 ❌
46 430 runs  46 430 ✅ 0 💤 0 ❌

Results for commit f41386a.

Copy link
Member

@vgvassilev vgvassilev left a comment

Choose a reason for hiding this comment

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

Have you tried to run the test suite for ROOT with this pull request and nvcc? My worry is that we have to execute cuda code in the interpreter through clang and some changes in the interpreter's cmake files seem to go towards getting the nvcc runtime somehow in cling.

@@ -9,7 +9,14 @@
#---------------------------------------------------------------------------------------------------

if(NOT CMAKE_CXX_COMPILER_ID MATCHES "(Apple|)Clang|GNU|Intel|MSVC")
Copy link
Member

Choose a reason for hiding this comment

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

Don't we need a check here for NVHPC too?

Copy link
Member

Choose a reason for hiding this comment

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

As far as I understand this condition filters out supported compilers. As NVHPC is only partially supported, it must enter this condition - note the NOT in front.

@vgvassilev vgvassilev requested a review from hahnjo November 22, 2024 09:00
@hahnjo
Copy link
Member

hahnjo commented Nov 22, 2024

@cgleggett so this means the most recent nvc++ is "fixed enough" to build a working LLVM and ROOT? So all dictionaries build and basic operation works, ie running some of the basic tutorials?

@cgleggett
Copy link
Author

what is the recommended way to test a build? I was able to do I/O and read/write root files, but that obviously doesn't cover everything.

@pcanal
Copy link
Member

pcanal commented Nov 22, 2024

If you would like to run the full test suite, you can configure with:

cmake -Droottest="ON" -Dtesting="ON" .

and run ctest -j something (it takes a while :) ).

You can also start without the -Droottest=ON to get the "unit" test and tutorials to run.

@cgleggett cgleggett changed the title Add support for NVIDIA nvc++ compiler WIP: Add support for NVIDIA nvc++ compiler Dec 4, 2024
@cgleggett
Copy link
Author

building the tests have revealed a few more issues with support for flags in nvc++. WIPing until these are addressed.

@hahnjo hahnjo marked this pull request as draft December 5, 2024 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow compilation with NVIDIA nvc++
4 participants