From 41b932196f94b2818cfcb15edc28b35944068a92 Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Wed, 28 Aug 2024 17:02:15 -0400 Subject: [PATCH] cuda-clang: update clang version (and ubuntu version) - update to ubuntu 22.04 - install latest cuda 11 version - manually install clang-18 to support cuda 11 --- .github/workflows/linux.yml | 21 ++++++++++++--------- cmake/modules/FindDEAL_II_KOKKOS.cmake | 4 ++++ 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 2b946af978..98f4356c3b 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -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 \ diff --git a/cmake/modules/FindDEAL_II_KOKKOS.cmake b/cmake/modules/FindDEAL_II_KOKKOS.cmake index 142edccc3b..02de0a98c1 100644 --- a/cmake/modules/FindDEAL_II_KOKKOS.cmake +++ b/cmake/modules/FindDEAL_II_KOKKOS.cmake @@ -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: # -- 2.39.5