Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .github/workflows/dependencies/dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
#!/usr/bin/env bash
#
# Copyright 2020 The AMReX Community
# Copyright 2020-2022 The AMReX Community
#
# License: BSD-3-Clause-LBNL
# Authors: Axel Huebl

set -eu -o pipefail

# `man apt.conf`:
# Number of retries to perform. If this is non-zero APT will retry
# failed files the given number of times.
echo 'Acquire::Retries "3";' | sudo tee /etc/apt/apt.conf.d/80-retries

sudo apt-get update

sudo apt-get install -y --no-install-recommends\
build-essential \
libfftw3-dev \
g++ gfortran \
libopenmpi-dev \
openmpi-bin \
python3 \
python3-pip

python3 -m pip install -U pip
python3 -m pip install -U build packaging setuptools wheel
openmpi-bin
21 changes: 21 additions & 0 deletions .github/workflows/dependencies/dependencies_clang.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash
#
# Copyright 2020-2022 The AMReX Community
#
# License: BSD-3-Clause-LBNL
# Authors: Axel Huebl

set -eu -o pipefail

# `man apt.conf`:
# Number of retries to perform. If this is non-zero APT will retry
# failed files the given number of times.
echo 'Acquire::Retries "3";' | sudo tee /etc/apt/apt.conf.d/80-retries

sudo apt-get update

sudo apt-get install -y --no-install-recommends \
build-essential \
libfftw3-dev \
gfortran \
clang-$1
19 changes: 0 additions & 19 deletions .github/workflows/dependencies/dependencies_clang6.sh

This file was deleted.

39 changes: 33 additions & 6 deletions .github/workflows/dependencies/dependencies_dpcpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@

set -eu -o pipefail

# `man apt.conf`:
# Number of retries to perform. If this is non-zero APT will retry
# failed files the given number of times.
echo 'Acquire::Retries "3";' | sudo tee /etc/apt/apt.conf.d/80-retries

# Ref.: https://github.com/rscohn2/oneapi-ci
# intel-basekit intel-hpckit are too large in size

Expand All @@ -19,9 +24,31 @@ echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt

sudo apt-get update

sudo apt-get install -y --no-install-recommends \
build-essential \
intel-oneapi-compiler-dpcpp-cpp intel-oneapi-mkl-devel \
g++ gfortran \
libopenmpi-dev \
openmpi-bin
# try apt install up to five times, to avoid connection splits
status=1
for itry in {1..5}
do
sudo apt-get install -y --no-install-recommends \
build-essential \
intel-oneapi-compiler-dpcpp-cpp \
intel-oneapi-compiler-fortran \
intel-oneapi-mkl-devel \
intel-oneapi-mpi-devel \
&& { sudo apt-get clean; status=0; break; } \
|| { sleep 10; }
done
if [[ ${status} -ne 0 ]]; then exit 1; fi

source /etc/os-release
ver="${VERSION_ID//\"/}"
if [ "$ver" == "22.04" ]; then exit 0; fi

status=1
for itry in {1..5}
do
sudo apt-get install -y --no-install-recommends \
intel-ocloc \
libigc-dev \
&& { sudo apt-get clean; status=0; break; } \
|| { sleep 10; }
done
22 changes: 0 additions & 22 deletions .github/workflows/dependencies/dependencies_gcc10.sh

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/dependencies/dependencies_nofortran.sh

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/dependencies/dependencies_nvcc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ sudo apt-get install -y \
wget

VERSION_DOTTED=${1-12.0} && VERSION_DASHED=$(sed 's/\./-/' <<< $VERSION_DOTTED)
curl -O https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-keyring_1.0-1_all.deb
curl -O https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb
sudo dpkg -i cuda-keyring_1.0-1_all.deb
sudo apt-get update
sudo apt-get install -y \
Expand Down
46 changes: 0 additions & 46 deletions .github/workflows/id_most_recent_comment_on_PR.sh

This file was deleted.

50 changes: 17 additions & 33 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:

# Build all tutorials
tutorials_build:
name: GNU@7.5 C++14 [tutorials]
name: GNU [tutorials]
runs-on: ubuntu-24.04
env: {CXXFLAGS: "-Werror -Wshadow -Woverloaded-virtual -Wunreachable-code -fno-operator-names"}
steps:
Expand Down Expand Up @@ -35,14 +35,14 @@ jobs:
python main.py

# Build all tutorials
tutorials_cxx20:
name: GNU@10.3 C++20 OMP [tutorials]
tutorials_omp:
name: GNU OMP [tutorials]
runs-on: ubuntu-24.04
env: {CXXFLAGS: "-Werror -Wno-error=deprecated-declarations -Wshadow -Woverloaded-virtual -Wunreachable-code -fno-operator-names"}
steps:
- uses: actions/checkout@v4
- name: Dependencies
run: .github/workflows/dependencies/dependencies_gcc10.sh
run: .github/workflows/dependencies/dependencies.sh
- name: Build & Install
run: |
cd ExampleCodes
Expand All @@ -55,11 +55,7 @@ jobs:
-DAMReX_FORTRAN=ON \
-DAMReX_FORTRAN_INTERFACES=ON \
-DAMReX_EB=ON \
-DTUTORIAL_PYTHON=ON \
-DCMAKE_CXX_STANDARD=20 \
-DCMAKE_C_COMPILER=$(which gcc-10) \
-DCMAKE_CXX_COMPILER=$(which g++-10) \
-DCMAKE_Fortran_COMPILER=$(which mpif90)
-DTUTORIAL_PYTHON=ON
cmake --build build -j 2
cmake --build build -j 2 --target pyamrex_pip_install
- name: Run Python
Expand All @@ -70,13 +66,13 @@ jobs:
python main.py

tutorials_clang:
name: Clang@6.0 C++14 SP Particles DP Mesh Debug [tutorials]
name: Clang SP Particles DP Mesh Debug [tutorials]
runs-on: ubuntu-24.04
env: {CXXFLAGS: "-Werror -Wshadow -Woverloaded-virtual -Wextra-semi -Wunreachable-code -fno-operator-names"}
steps:
- uses: actions/checkout@v4
- name: Dependencies
run: .github/workflows/dependencies/dependencies_clang6.sh
run: .github/workflows/dependencies/dependencies_clang.sh 18
- name: Build & Install
run: |
cd ExampleCodes
Expand All @@ -92,7 +88,6 @@ jobs:
-DAMReX_PRECISION=DOUBLE \
-DAMReX_PARTICLES_PRECISION=SINGLE \
-DTUTORIAL_PYTHON=ON \
-DCMAKE_CXX_STANDARD=14 \
-DCMAKE_C_COMPILER=$(which clang) \
-DCMAKE_CXX_COMPILER=$(which clang++) \
-DCMAKE_Fortran_COMPILER=$(which gfortran)
Expand All @@ -107,7 +102,7 @@ jobs:

# Build all tutorials w/o MPI
tutorials-nonmpi:
name: GNU@7.5 C++14 NOMPI [tutorials]
name: GNU NOMPI [tutorials]
runs-on: ubuntu-24.04
env: {CXXFLAGS: "-Werror -Wshadow -Woverloaded-virtual -Wunreachable-code -fno-operator-names"}
steps:
Expand Down Expand Up @@ -138,13 +133,13 @@ jobs:

# Build all tutorials
tutorials-nofortran:
name: GNU@7.5 C++14 w/o Fortran [tutorials]
name: GNU w/o Fortran [tutorials]
runs-on: ubuntu-24.04
env: {CXXFLAGS: "-Werror -Wshadow -Woverloaded-virtual -Wunreachable-code -fno-operator-names"}
steps:
- uses: actions/checkout@v4
- name: Dependencies
run: .github/workflows/dependencies/dependencies_nofortran.sh
run: .github/workflows/dependencies/dependencies.sh
- name: Build & Install
run: |
cd ExampleCodes
Expand All @@ -165,9 +160,9 @@ jobs:
cd ../HeatEquation/Source/
python main.py

# Build all tutorials with CUDA 11.0.2 (recent supported)
tutorials-cuda11:
name: CUDA@11.2 GNU@9.3.0 C++17 Release [tutorials]
# Build all tutorials with CUDA
tutorials-cuda:
name: CUDA Release [tutorials]
runs-on: ubuntu-24.04
env: {CXXFLAGS: "-fno-operator-names"}
steps:
Expand All @@ -192,16 +187,14 @@ jobs:
-DCMAKE_CXX_COMPILER=$(which g++) \
-DCMAKE_CUDA_HOST_COMPILER=$(which g++) \
-DCMAKE_Fortran_COMPILER=$(which gfortran) \
-DCMAKE_CUDA_STANDARD=17 \
-DCMAKE_CXX_STANDARD=17 \
-DAMReX_CUDA_ARCH=8.0 \
-DAMReX_CUDA_ERROR_CROSS_EXECUTION_SPACE_CALL=ON \
-DAMReX_CUDA_ERROR_CAPTURE_THIS=ON

cmake --build build -j 2

tutorials-dpcpp:
name: DPCPP GFortran@7.5 C++17 [tutorials]
name: DPCPP [tutorials]
runs-on: ubuntu-24.04
env: {CXXFLAGS: "-fno-operator-names"}
steps:
Expand All @@ -215,26 +208,18 @@ jobs:
set -e
cd ExampleCodes
cmake -S . -B build \
-DCMAKE_CXX_COMPILER_ID="Clang" \
-DCMAKE_CXX_COMPILER_VERSION=12.0 \
-DCMAKE_CXX_STANDARD_COMPUTED_DEFAULT="17" \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DAMReX_LINEAR_SOLVERS=ON \
-DAMReX_FORTRAN=ON \
-DAMReX_FORTRAN_INTERFACES=ON \
-DAMReX_EB=ON \
-DAMReX_PARTICLES=ON \
-DAMReX_GPU_BACKEND=SYCL \
-DCMAKE_C_COMPILER=$(which icx) \
-DCMAKE_CXX_COMPILER=$(which icpx) \
-DCMAKE_Fortran_COMPILER=$(which gfortran)
-DCMAKE_Fortran_COMPILER=$(which ifx)
cmake --build build --parallel 2
# note: setting the CXX compiler ID is a work-around for
# the 2021.1 DPC++ release / CMake 3.19.0-3.19.1
# https://gitlab.kitware.com/cmake/cmake/-/issues/21551#note_869580

tutorials-hip:
name: HIP ROCm GFortran@9.3 C++17 [tutorials]
name: HIP ROCm GFortran [tutorials]
runs-on: ubuntu-24.04
# Have to have -Wno-deprecated-declarations due to deprecated atomicAddNoRet
# Have to have -Wno-gnu-zero-variadic-macro-arguments to avoid
Expand Down Expand Up @@ -275,7 +260,6 @@ jobs:
-DAMReX_GPU_BACKEND=HIP \
-DAMReX_AMD_ARCH=gfx908 \
-DCMAKE_C_COMPILER=$(which clang) \
-DCMAKE_CXX_COMPILER=$(which clang++) \
-DCMAKE_CXX_STANDARD=17
-DCMAKE_CXX_COMPILER=$(which clang++)
cmake --build build_nofortran -j 2

Loading
Loading