Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-10209

ROOT 6.18/00 does not compile with CUDA available in C++17 mode

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 6.18/00
    • Fix Version/s: 6.22/00, 6.20/06
    • Component/s: Build System
    • Labels:
      None
    • Environment:

      x86_64-ubuntu1804-gcc7-opt

      Description

      I was trying to build the freshly released 6.18/00 version on my laptop just now. And came across the following:

      [bash][thor]:build > cmake -Dcxx17=ON -Dall=ON -DXROOTD_ROOT_DIR=/home/krasznaa/Software/XRootD/4.9.1/x86_64-ubuntu1804-gcc7-opt -DTBB_ROOT_DIR=/home/krasznaa/Software/TBB/2019_U5/x86_64-ubuntu1804-gcc7-opt -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/home/krasznaa/Software/ROOT/6.18.0/x86_64-ubuntu1804-gcc7-opt ../root-6.18.00/
      -- The C compiler identification is GNU 7.4.0
      -- The CXX compiler identification is GNU 7.4.0
      -- Check for working C compiler: /usr/bin/cc
      -- Check for working C compiler: /usr/bin/cc -- works
      ...
      -- VecGeom not found. Ensure that the installation of VecGeom is in the CMAKE_PREFIX_PATH
      --               example: CMAKE_PREFIX_PATH=<VecGeom_install_path>/lib/CMake/VecGeom
      --               For the time being switching OFF 'vecgeom' option
      CMake Error at cmake/modules/SearchInstalledSoftware.cmake:1333 (message):
        CUDA not supported with C++17
      Call Stack (most recent call first):
        CMakeLists.txt:159 (include)
       
       
      -- Configuring incomplete, errors occurred!
      See also "/home/krasznaa/Development/root/build/CMakeFiles/CMakeOutput.log".
      See also "/home/krasznaa/Development/root/build/CMakeFiles/CMakeError.log".
      

      So... what?!? What does the CPU code's C++ standard have to do with ROOT's ability to compile CUDA code? CMAKE_CXX_STANDARD actually has little impact on the C++ standard used by nvcc in the build. If you want to specify the C++ standard that CUDA should use, you need to set CMAKE_CUDA_STANDARD. Which can conveniently be set to 14, while CMAKE_CXX_STANDARD is set to 17. That's how I've been building all of my code recently.

      For now I'll just turn off the CUDA code of ROOT for my build. But this build configuration silliness should really be fixed...

      Best,
      Attila

        Attachments

          Activity

            People

            • Assignee:
              moneta Lorenzo Moneta
              Reporter:
              akraszna Attila Krasznahorkay
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Actual Start: