Skip to content

Commit

Permalink
CI: CUDA 9.1 & 11.0 (#1653)
Browse files Browse the repository at this point in the history
Add a recent CUDA 11 release for cutting-edge coverage, too.
  • Loading branch information
ax3l authored Dec 19, 2020
1 parent 25d06e8 commit 875ebff
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 16 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/dependencies/dependencies_nvcc11.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/usr/bin/env bash
#
# Copyright 2020 Axel Huebl
#
# License: BSD-3-Clause-LBNL

# search recursive inside a folder if a file contains tabs
#
# @result 0 if no files are found, else 1
#

set -eu -o pipefail

sudo apt-get -qqq update
sudo apt-get install -y \
build-essential \
ca-certificates \
cmake \
g++ \
gfortran \
gnupg \
libopenmpi-dev \
openmpi-bin \
pkg-config \
wget

sudo wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
sudo apt-key add 7fa2af80.pub
echo "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 /" \
| sudo tee /etc/apt/sources.list.d/cuda.list
sudo apt-get update
sudo apt-get install -y \
cuda-command-line-tools-11-2 \
cuda-compiler-11-2 \
cuda-cupti-dev-11-2 \
cuda-minimal-build-11-2 \
cuda-nvml-dev-11-2 \
cuda-nvtx-11-2 \
libcurand-dev-11-2
sudo ln -s cuda-11.2 /usr/local/cuda

61 changes: 45 additions & 16 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
# Build and install libamrex as AMReX CMake project
library:
name: [email protected] C++17 Release [lib]
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
env: {CXXFLAGS: "-Werror -Wshadow -Woverloaded-virtual -Wunreachable-code -fno-operator-names"}
steps:
- uses: actions/checkout@v2
Expand All @@ -29,7 +29,7 @@ jobs:
library_clang:
name: [email protected] C++14 SP NOMPI Debug [lib]
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
env: {CXXFLAGS: "-Werror -Wshadow -Woverloaded-virtual -Wextra-semi -Wunreachable-code -fno-operator-names"}
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
# Build libamrex and all tutorials
tutorials:
name: [email protected] C++14 [tutorials]
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
env: {CXXFLAGS: "-Werror -Wshadow -Woverloaded-virtual -Wunreachable-code -fno-operator-names"}
steps:
- uses: actions/checkout@v2
Expand All @@ -81,7 +81,7 @@ jobs:
# Build libamrex and all tutorials
tutorials_cxx20:
name: [email protected] C++20 OMP [tutorials]
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
env: {CXXFLAGS: "-Werror -Wno-error=deprecated-declarations -Wshadow -Woverloaded-virtual -Wunreachable-code -fno-operator-names"}
steps:
- uses: actions/checkout@v2
Expand All @@ -106,7 +106,7 @@ jobs:
# Build libamrex and all tutorials w/o MPI
tutorials-nonmpi:
name: [email protected] C++14 NOMPI [tutorials]
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
env: {CXXFLAGS: "-Werror -Wshadow -Woverloaded-virtual -Wunreachable-code -fno-operator-names"}
steps:
- uses: actions/checkout@v2
Expand All @@ -127,7 +127,7 @@ jobs:
# Build libamrex and all tutorials
tutorials-nofortran:
name: [email protected] C++11 w/o Fortran [tutorials]
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
env: {CXXFLAGS: "-Werror -Wshadow -Woverloaded-virtual -Wunreachable-code -fno-operator-names"}
steps:
- uses: actions/checkout@v2
Expand All @@ -146,15 +146,15 @@ jobs:
-DCMAKE_CXX_STANDARD=11
make -j 2
# Build libamrex and all tutorials with CUDA
tutorials-cuda:
# Build libamrex and all tutorials with CUDA 9.1 (oldest supported)
tutorials-cuda9:
name: [email protected] [email protected] C++11 Release [tutorials]
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
env: {CXXFLAGS: "-fno-operator-names"}
steps:
- uses: actions/checkout@v2
- name: Dependencies
run: .github/workflows/dependencies/dependencies_nvcc.sh
run: .github/workflows/dependencies/dependencies_nvcc9.sh
- name: Build & Install
run: |
mkdir build
Expand All @@ -171,6 +171,35 @@ jobs:
-DAMReX_CUDA_ARCH=6.0
make -j 2
# Build libamrex and all tutorials with CUDA 11.0.2 (recent supported)
tutorials-cuda11:
name: [email protected] [email protected] C++14 Release [tutorials]
runs-on: ubuntu-20.04
env: {CXXFLAGS: "-fno-operator-names"}
steps:
- uses: actions/checkout@v2
- name: Dependencies
run: .github/workflows/dependencies/dependencies_nvcc11.sh
- name: Build & Install
run: |
export PATH=/usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH}
export LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64:/usr/local/cuda/lib64:${LD_LIBRARY_PATH}
which nvcc || echo "nvcc not in PATH!"
cmake -S . -B build \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DAMReX_BUILD_TUTORIALS=ON \
-DAMReX_PARTICLES=ON \
-DAMReX_GPU_BACKEND=CUDA \
-DCMAKE_C_COMPILER=$(which gcc) \
-DCMAKE_CXX_COMPILER=$(which g++) \
-DCMAKE_CUDA_HOST_COMPILER=$(which g++) \
-DCMAKE_Fortran_COMPILER=$(which gfortran) \
-DCMAKE_CUDA_STANDARD=14 \
-DCMAKE_CXX_STANDARD=14 \
-DAMReX_CUDA_ARCH=8.0
cmake --build build -j 2
tutorials-dpcpp:
name: DPCPP [email protected] C++17 [tutorials]
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -230,7 +259,7 @@ jobs:
# Build 1D libamrex with configure
configure-1d:
name: [email protected] Release [configure 1D]
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Dependencies
Expand All @@ -244,7 +273,7 @@ jobs:
# Build 2D libamrex with configure
configure-2d:
name: [email protected] NOMPI Release [configure 2D]
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Dependencies
Expand All @@ -258,7 +287,7 @@ jobs:
# Build 3D libamrex with configure
configure-3d:
name: [email protected] Release [configure 3D]
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Dependencies
Expand All @@ -272,7 +301,7 @@ jobs:
# Build 3D libamrex debug omp build with configure
configure-3d-omp-debug:
name: [email protected] OMP Debug [configure 3D]
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Dependencies
Expand All @@ -286,7 +315,7 @@ jobs:
# Build Tools/Plotfile
plotfile-tools:
name: GNU Plotfile Tools [tools]
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Dependencies
Expand All @@ -299,7 +328,7 @@ jobs:
# Build libamrex and run all tests
tests:
name: [email protected] C++14 [tests]
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
env: {CXXFLAGS: "-Werror -Wshadow -Woverloaded-virtual -Wunreachable-code -fno-operator-names"}
steps:
- uses: actions/checkout@v2
Expand Down

0 comments on commit 875ebff

Please sign in to comment.