diff --git a/.github/workflows/cuda-ci.yml b/.github/workflows/cuda-ci.yml index ea9b0df02..aa9a9f153 100644 --- a/.github/workflows/cuda-ci.yml +++ b/.github/workflows/cuda-ci.yml @@ -25,7 +25,6 @@ jobs: include: - cuda_ver: "11.0" cuda_pkg: 11-0 - cuda_extra: libcurand-dev-11-0 cuda-cupti-dev-11-0 libcusolver-dev-11-0 libcublas-dev-11-0 libcusparse-dev-11-0 steps: - name: Cancel previous runs uses: styfle/cancel-workflow-action@0.6.0 @@ -35,19 +34,12 @@ jobs: with: submodules: true - name: Prepare CUDA environment - run: | - export DEBIAN_FRONTEND=noninteractive - sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub - sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu2004/x86_64/7fa2af80.pub - echo "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 /" | sudo tee /etc/apt/sources.list.d/cuda.list - echo "deb https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu2004/x86_64 /" | sudo tee /etc/apt/sources.list.d/nvidia-ml.list - sudo apt-get update - sudo apt-get install -y --no-install-recommends \ - libopenmpi-dev cuda-command-line-tools-${{matrix.cuda_pkg}} cuda-compiler-${{matrix.cuda_pkg}} cuda-minimal-build-${{matrix.cuda_pkg}} cuda-nvml-dev-${{matrix.cuda_pkg}} cuda-nvtx-${{matrix.cuda_pkg}} ${{matrix.cuda_extra}} + run: Submodules/AMReX/.github/workflows/dependencies/dependencies_nvcc.sh ${{matrix.cuda_ver}} - name: Configure and build run: | - export PATH=/usr/local/nvidia/bin:/usr/local/cuda-${{matrix.cuda_ver}}/bin:${PATH} - export LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64:/usr/local/cuda-${{matrix.cuda_ver}}/lib:${LD_LIBRARY_PATH} + 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 -Bbuild-${{matrix.cuda_pkg}} \ -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \ -DAMReX_CUDA_ERROR_CROSS_EXECUTION_SPACE_CALL=ON \ diff --git a/.github/workflows/dependencies/dependencies.sh b/.github/workflows/dependencies/dependencies.sh deleted file mode 100755 index 8fea96d48..000000000 --- a/.github/workflows/dependencies/dependencies.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright 2020 The AMReX Community -# -# License: BSD-3-Clause-LBNL -# Authors: Axel Huebl - -set -eu -o pipefail - -sudo apt-get update - -sudo apt-get install -y --no-install-recommends\ - build-essential \ - g++ \ - libopenmpi-dev \ - openmpi-bin diff --git a/.github/workflows/dependencies/dependencies_hip.sh b/.github/workflows/dependencies/dependencies_hip.sh deleted file mode 100755 index 4fb2c87fc..000000000 --- a/.github/workflows/dependencies/dependencies_hip.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright 2020 The AMReX Community -# -# License: BSD-3-Clause-LBNL -# Authors: Axel Huebl - -# search recursive inside a folder if a file contains tabs -# -# @result 0 if no files are found, else 1 -# - -set -eu -o pipefail - -# Ref.: https://rocmdocs.amd.com/en/latest/Installation_Guide/Installation-Guide.html#ubuntu -wget -q -O - https://repo.radeon.com/rocm/rocm.gpg.key \ - | sudo apt-key add - -echo 'deb [arch=amd64] https://repo.radeon.com/rocm/apt/debian/ ubuntu main' \ - | sudo tee /etc/apt/sources.list.d/rocm.list - -echo 'export PATH=/opt/rocm/llvm/bin:/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/rocm/opencl/bin:$PATH' \ - | sudo tee -a /etc/profile.d/rocm.sh -# we should not need to export HIP_PATH=/opt/rocm/hip with those installs - -sudo apt-get update - -# Ref.: https://rocmdocs.amd.com/en/latest/Installation_Guide/Installation-Guide.html#installing-development-packages-for-cross-compilation -# meta-package: rocm-dkms -# OpenCL: rocm-opencl -# other: rocm-dev rocm-utils -sudo apt-get install -y --no-install-recommends \ - build-essential \ - gfortran \ - libnuma-dev \ - libopenmpi-dev \ - openmpi-bin \ - rocm-dev \ - roctracer-dev \ - rocprofiler-dev \ - rocrand-dev \ - rocprim-dev \ - rocfft \ - rocprim \ - rocrand \ - hiprand-dev - -# activate -# -source /etc/profile.d/rocm.sh -hipcc --version -which clang -which clang++ - -# cmake-easyinstall -# -sudo curl -L -o /usr/local/bin/cmake-easyinstall https://git.io/JvLxY -sudo chmod a+x /usr/local/bin/cmake-easyinstall -export CEI_SUDO="sudo" diff --git a/.github/workflows/dependencies/dependencies_mac.sh b/.github/workflows/dependencies/dependencies_mac.sh deleted file mode 100755 index 95f5786b1..000000000 --- a/.github/workflows/dependencies/dependencies_mac.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright 2020 The AMReX Community -# -# License: BSD-3-Clause-LBNL -# Authors: Axel Huebl - -set -eu -o pipefail - -brew update -brew install gfortran || true -brew install libomp || true -brew install open-mpi || true -brew install ccache || true diff --git a/.github/workflows/gcc.yml b/.github/workflows/gcc.yml index f149d99b3..6fad6e536 100644 --- a/.github/workflows/gcc.yml +++ b/.github/workflows/gcc.yml @@ -17,7 +17,7 @@ jobs: submodules: true - name: Install Dependencies - run: .github/workflows/dependencies/dependencies.sh + run: Submodules/AMReX/.github/workflows/dependencies/dependencies.sh - name: Configure Project and Generate Build System run: | diff --git a/.github/workflows/hip.yml b/.github/workflows/hip.yml index 8addaf8cb..918d0f1e4 100644 --- a/.github/workflows/hip.yml +++ b/.github/workflows/hip.yml @@ -40,7 +40,7 @@ jobs: submodules: true - name: Dependencies - run: .github/workflows/dependencies/dependencies_hip.sh + run: Submodules/AMReX/.github/workflows/dependencies/dependencies_hip.sh - name: Build & Install run: | diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 92acd4d6c..548621c4f 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -17,7 +17,7 @@ jobs: submodules: true - name: Install Dependencies - run: .github/workflows/dependencies/dependencies_mac.sh + run: Submodules/AMReX/.github/workflows/dependencies/dependencies_mac.sh - name: Configure Project and Generate Build System run: |