]> https://gitweb.dealii.org/ - dealii.git/commitdiff
cuda-clang: update clang version (and ubuntu version) 17631/head
authorTimo Heister <timo.heister@gmail.com>
Wed, 28 Aug 2024 21:02:15 +0000 (17:02 -0400)
committerTimo Heister <timo.heister@gmail.com>
Thu, 5 Sep 2024 21:39:15 +0000 (17:39 -0400)
- update to ubuntu 22.04
- install latest cuda 11 version
- manually install clang-18 to support cuda 11

.github/workflows/linux.yml
cmake/modules/FindDEAL_II_KOKKOS.cmake

index 2b946af978e1b9738ddfe129676c6231a2737595..98f4356c3bf5e9298249cb71b717065beff04354 100644 (file)
@@ -397,7 +397,7 @@ jobs:
     # simple parallel debug build using cuda-11 and clang
 
     name: linux debug cuda-11 clang
-    runs-on: [ubuntu-20.04]
+    runs-on: [ubuntu-22.04]
 
     #
     # The following condition only runs the workflow on 'push' or if the
@@ -414,18 +414,20 @@ jobs:
     - uses: actions/checkout@v4
     - name: modules
       run: |
-        wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
-        sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
-        sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub
-        sudo add-apt-repository "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /"
+        wget https://apt.llvm.org/llvm.sh
+        chmod +x llvm.sh
+        sudo ./llvm.sh 18
+        wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin
+        sudo mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600
+        sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/3bf863cc.pub
+        sudo add-apt-repository "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/ /"
         sudo apt-get install -y software-properties-common
         sudo add-apt-repository ppa:ginggs/deal.ii-9.4.0-backports
         sudo apt-get update
         sudo apt-get install -yq --no-install-recommends \
-            cuda-toolkit-11-0 \
+            cuda-toolkit-11-8 \
             libp4est-dev \
             libopenmpi-dev \
-            llvm \
             numdiff \
             openmpi-bin \
             libboost-all-dev
@@ -433,6 +435,7 @@ jobs:
     - name: info
       run: |
         mpicc -v
+        clang++-18 -v
         cmake --version
     - uses: actions/checkout@v4
       with:
@@ -445,7 +448,7 @@ jobs:
         mkdir build
         cd build
         cmake -D BUILD_SHARED_LIBS=ON \
-              -D CMAKE_CXX_COMPILER=clang++ \
+              -D CMAKE_CXX_COMPILER=clang++-18 \
               -D CMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/../kokkos-install \
               -D Kokkos_ENABLE_CUDA=ON \
               -D Kokkos_ARCH_VOLTA70=ON \
@@ -456,7 +459,7 @@ jobs:
         mkdir build
         cd build
         cmake -D CMAKE_BUILD_TYPE=Debug \
-              -D CMAKE_CXX_COMPILER=clang++ \
+              -D CMAKE_CXX_COMPILER=clang++-18 \
               -D DEAL_II_FORCE_BUNDLED_BOOST=ON \
               -D DEAL_II_CXX_FLAGS="-std=c++17" \
               -D DEAL_II_EARLY_DEPRECATIONS=ON \
index 142edccc3b566aff615e96f3945186c16c32ef94..02de0a98c16487b1e489e02a3690ed2f0d36dd94 100644 (file)
@@ -60,6 +60,10 @@ if(Kokkos_FOUND)
     # __host__ constexpr functions in device code
     KOKKOS_CHECK(OPTIONS CUDA_LAMBDA CUDA_CONSTEXPR)
 
+    # We are using std::array in device code which calls the host-only function
+    # __glibcxx_requires_subscript when defining _GLIBCXX_ASSERTIONS 
+    list(REMOVE_ITEM DEAL_II_DEFINITIONS_DEBUG "_GLIBCXX_ASSERTIONS")
+
     # Disable a bunch of annoying warnings generated by boost, template code,
     # and in other random places:
     #

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.