Skip to content

Commit a33567d

Browse files
authored
Use ubuntu-24.04 instead of 20.04 in CIs (#156)
Ubuntu-20.04 is no longer supported in GitHub Actions.
1 parent 07b9cea commit a33567d

File tree

5 files changed

+70
-111
lines changed

5 files changed

+70
-111
lines changed

.github/workflows/dependencies/dependencies_hip.sh

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,16 @@ sudo apt-key add rocm.gpg.key
3333

3434
source /etc/os-release # set UBUNTU_CODENAME: focal or jammy or ...
3535

36-
echo "deb [arch=amd64] https://repo.radeon.com/rocm/apt/${1-latest} ${UBUNTU_CODENAME} main" \
36+
VERSION=${1-6.3.2}
37+
38+
echo "deb [arch=amd64] https://repo.radeon.com/rocm/apt/${VERSION} ${UBUNTU_CODENAME} main" \
3739
| sudo tee /etc/apt/sources.list.d/rocm.list
3840
echo 'export PATH=/opt/rocm/llvm/bin:/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/rocm/opencl/bin:$PATH' \
3941
| sudo tee -a /etc/profile.d/rocm.sh
4042

4143
# we should not need to export HIP_PATH=/opt/rocm/hip with those installs
4244

45+
sudo apt-get clean
4346
sudo apt-get update
4447

4548
# Ref.: https://rocmdocs.amd.com/en/latest/Installation_Guide/Installation-Guide.html#installing-development-packages-for-cross-compilation
@@ -49,26 +52,25 @@ sudo apt-get update
4952
sudo apt-get install -y --no-install-recommends \
5053
build-essential \
5154
gfortran \
52-
hiprand-dev \
5355
libnuma-dev \
5456
libopenmpi-dev \
5557
openmpi-bin \
56-
rocm-dev \
57-
roctracer-dev \
58-
rocprofiler-dev \
59-
rocrand-dev \
60-
rocprim-dev \
61-
rocsparse-dev
58+
rocm-dev${VERSION} \
59+
roctracer-dev${VERSION} \
60+
rocprofiler-dev${VERSION} \
61+
rocrand-dev${VERSION} \
62+
rocfft-dev${VERSION} \
63+
rocprim-dev${VERSION} \
64+
rocsparse-dev${VERSION}
65+
66+
# hiprand-dev is a new package that does not exist in old versions
67+
sudo apt-get install -y --no-install-recommends hiprand-dev${VERSION} || true
6268

6369
# activate
6470
#
6571
source /etc/profile.d/rocm.sh
6672
hipcc --version
73+
hipconfig --full
6774
which clang
6875
which clang++
69-
70-
# cmake-easyinstall
71-
#
72-
sudo curl -L -o /usr/local/bin/cmake-easyinstall https://git.io/JvLxY
73-
sudo chmod a+x /usr/local/bin/cmake-easyinstall
74-
export CEI_SUDO="sudo"
76+
which flang
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright 2020-2022 Axel Huebl
4+
#
5+
# License: BSD-3-Clause-LBNL
6+
7+
set -eu -o pipefail
8+
9+
# `man apt.conf`:
10+
# Number of retries to perform. If this is non-zero APT will retry
11+
# failed files the given number of times.
12+
echo 'Acquire::Retries "3";' | sudo tee /etc/apt/apt.conf.d/80-retries
13+
14+
sudo apt-get -qqq update
15+
sudo apt-get install -y \
16+
build-essential \
17+
ca-certificates \
18+
cmake \
19+
g++ \
20+
gfortran \
21+
gnupg \
22+
libopenmpi-dev \
23+
openmpi-bin \
24+
pkg-config \
25+
wget
26+
27+
VERSION_DOTTED=${1-12.0} && VERSION_DASHED=$(sed 's/\./-/' <<< $VERSION_DOTTED)
28+
curl -O https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-keyring_1.0-1_all.deb
29+
sudo dpkg -i cuda-keyring_1.0-1_all.deb
30+
sudo apt-get update
31+
sudo apt-get install -y \
32+
cuda-command-line-tools-$VERSION_DASHED \
33+
cuda-compiler-$VERSION_DASHED \
34+
cuda-cupti-dev-$VERSION_DASHED \
35+
cuda-minimal-build-$VERSION_DASHED \
36+
cuda-nvml-dev-$VERSION_DASHED \
37+
cuda-nvtx-$VERSION_DASHED \
38+
libcufft-dev-$VERSION_DASHED \
39+
libcurand-dev-$VERSION_DASHED \
40+
libcusparse-dev-$VERSION_DASHED
41+
42+
sudo apt-get install -y --no-install-recommends libnvjitlink-dev-$VERSION_DASHED || true
43+
44+
sudo ln -s cuda-$VERSION_DOTTED /usr/local/cuda

.github/workflows/dependencies/dependencies_nvcc10.sh

Lines changed: 0 additions & 42 deletions
This file was deleted.

.github/workflows/dependencies/dependencies_nvcc11.sh

Lines changed: 0 additions & 45 deletions
This file was deleted.

.github/workflows/linux.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
# Build all tutorials
88
tutorials_build:
99
name: [email protected] C++14 [tutorials]
10-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-24.04
1111
env: {CXXFLAGS: "-Werror -Wshadow -Woverloaded-virtual -Wunreachable-code -fno-operator-names"}
1212
steps:
1313
- uses: actions/checkout@v4
@@ -37,7 +37,7 @@ jobs:
3737
# Build all tutorials
3838
tutorials_cxx20:
3939
name: [email protected] C++20 OMP [tutorials]
40-
runs-on: ubuntu-20.04
40+
runs-on: ubuntu-24.04
4141
env: {CXXFLAGS: "-Werror -Wno-error=deprecated-declarations -Wshadow -Woverloaded-virtual -Wunreachable-code -fno-operator-names"}
4242
steps:
4343
- uses: actions/checkout@v4
@@ -71,7 +71,7 @@ jobs:
7171
7272
tutorials_clang:
7373
name: [email protected] C++14 SP Particles DP Mesh Debug [tutorials]
74-
runs-on: ubuntu-20.04
74+
runs-on: ubuntu-24.04
7575
env: {CXXFLAGS: "-Werror -Wshadow -Woverloaded-virtual -Wextra-semi -Wunreachable-code -fno-operator-names"}
7676
steps:
7777
- uses: actions/checkout@v4
@@ -108,7 +108,7 @@ jobs:
108108
# Build all tutorials w/o MPI
109109
tutorials-nonmpi:
110110
name: [email protected] C++14 NOMPI [tutorials]
111-
runs-on: ubuntu-20.04
111+
runs-on: ubuntu-24.04
112112
env: {CXXFLAGS: "-Werror -Wshadow -Woverloaded-virtual -Wunreachable-code -fno-operator-names"}
113113
steps:
114114
- uses: actions/checkout@v4
@@ -139,7 +139,7 @@ jobs:
139139
# Build all tutorials
140140
tutorials-nofortran:
141141
name: [email protected] C++14 w/o Fortran [tutorials]
142-
runs-on: ubuntu-20.04
142+
runs-on: ubuntu-24.04
143143
env: {CXXFLAGS: "-Werror -Wshadow -Woverloaded-virtual -Wunreachable-code -fno-operator-names"}
144144
steps:
145145
- uses: actions/checkout@v4
@@ -168,12 +168,12 @@ jobs:
168168
# Build all tutorials with CUDA 11.0.2 (recent supported)
169169
tutorials-cuda11:
170170
name: [email protected] [email protected] C++17 Release [tutorials]
171-
runs-on: ubuntu-20.04
171+
runs-on: ubuntu-24.04
172172
env: {CXXFLAGS: "-fno-operator-names"}
173173
steps:
174174
- uses: actions/checkout@v4
175175
- name: Dependencies
176-
run: .github/workflows/dependencies/dependencies_nvcc11.sh
176+
run: .github/workflows/dependencies/dependencies_nvcc.sh 12.6
177177
- name: Build & Install
178178
run: |
179179
export PATH=/usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH}
@@ -202,7 +202,7 @@ jobs:
202202
203203
tutorials-dpcpp:
204204
name: DPCPP [email protected] C++17 [tutorials]
205-
runs-on: ubuntu-20.04
205+
runs-on: ubuntu-24.04
206206
env: {CXXFLAGS: "-fno-operator-names"}
207207
steps:
208208
- uses: actions/checkout@v4
@@ -235,7 +235,7 @@ jobs:
235235

236236
tutorials-hip:
237237
name: HIP ROCm [email protected] C++17 [tutorials]
238-
runs-on: ubuntu-20.04
238+
runs-on: ubuntu-24.04
239239
# Have to have -Wno-deprecated-declarations due to deprecated atomicAddNoRet
240240
# Have to have -Wno-gnu-zero-variadic-macro-arguments to avoid
241241
# amrex/Src/Base/AMReX_GpuLaunchGlobal.H:15:5: error: must specify at least one argument for '...' parameter of variadic macro [-Werror,-Wgnu-zero-variadic-macro-arguments]
@@ -259,7 +259,7 @@ jobs:
259259
which clang++
260260
cmake --version
261261
262-
# "mpic++ --showme" forgets open-pal in Ubuntu 20.04 + OpenMPI 4.0.3
262+
# "mpic++ --showme" forgets open-pal in Ubuntu 24.04 + OpenMPI 4.0.3
263263
# https://bugs.launchpad.net/ubuntu/+source/openmpi/+bug/1941786
264264
# https://github.com/open-mpi/ompi/issues/9317
265265
export LDFLAGS="-lopen-pal"

0 commit comments

Comments
 (0)