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

CUDA 10.0 compiler can't figure out templates of nlohmann::json #626

Open
nadrino opened this issue Sep 23, 2024 · 2 comments
Open

CUDA 10.0 compiler can't figure out templates of nlohmann::json #626

nadrino opened this issue Sep 23, 2024 · 2 comments
Labels
bug ❌ Something isn't working

Comments

@nadrino
Copy link
Collaborator

nadrino commented Sep 23, 2024

While trying to compile GUNDAM on L4T Ubuntu 18.04 (https://wiki.switchroot.org/wiki/linux/l4t-ubuntu-bionic-installation-guide) with the GPU fonctionalities, nvcc was not able to parse some template functions of the nlohmann::json requested by some ROOT classes:

to be copy-pasted (waiting for the log)

Here is the version of nvcc:

ablanche@ablanche-laptop:~/Documents/work/build/gundam$ /usr/local/cuda/bin/nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Mon_Mar_11_22:13:24_CDT_2019
Cuda compilation tools, release 10.0, V10.0.326

And the CMake command line:

cmake \
  -D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_DIR/gundam  \
  -D CMAKE_BUILD_TYPE=Release \
  -D WITH_CUDA_LIB=ON \
  -D CMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc \
  -D CMAKE_CUDA_ARCHITECTURES=native \
  $REPO_DIR/gundam/.

Apparently devs from the JSON lib have gave up supporting this version of CUDA as this is related to a compiler bug: nlohmann/json-ci#8

Unless we find a workaround for this, I suggest to require a minimum version for CUDA (apparently v11 should be fine?).

@nadrino nadrino added the bug ❌ Something isn't working label Sep 23, 2024
@nadrino
Copy link
Collaborator Author

nadrino commented Sep 27, 2024

There might be a solution for this: in princple the CacheManager lib don't need ROOT at all. The compiler still request it from the headers that are coming for some of the #include.

Some of the dials might require ROOT, like TSpline3 for instance, but it could be useful to see if we could externalize the conversion from ROOT types to GPU-friendly types

@nadrino
Copy link
Collaborator Author

nadrino commented Sep 27, 2024

In order to get rid of ROOT headers in sublying dependencies, we would need to clean the headers from ROOT includes and only use them in the .cpp files (which are not seen by the CUDA compiler)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug ❌ Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant