diff --git a/.github/workflows/cuda.yml b/.github/workflows/cuda.yml index fab16b93fe..0e8b2aea54 100644 --- a/.github/workflows/cuda.yml +++ b/.github/workflows/cuda.yml @@ -26,7 +26,7 @@ jobs: cd ../.. - name: Dependencies - run: .github/workflows/dependencies/dependencies_nvcc11.sh + run: .github/workflows/dependencies/dependencies_nvcc.sh 11.7 - name: compile test_react (aprox13) run: | diff --git a/.github/workflows/dependencies/dependencies_hip.sh b/.github/workflows/dependencies/dependencies_hip.sh index ab5185ce0a..527379e7e8 100755 --- a/.github/workflows/dependencies/dependencies_hip.sh +++ b/.github/workflows/dependencies/dependencies_hip.sh @@ -40,6 +40,7 @@ echo 'export PATH=/opt/rocm/llvm/bin:/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/r # we should not need to export HIP_PATH=/opt/rocm/hip with those installs +sudo apt-get clean sudo apt-get update # Ref.: https://rocmdocs.amd.com/en/latest/Installation_Guide/Installation-Guide.html#installing-development-packages-for-cross-compilation @@ -56,7 +57,9 @@ sudo apt-get install -y --no-install-recommends \ roctracer-dev \ rocprofiler-dev \ rocrand-dev \ - rocprim-dev + rocfft-dev \ + rocprim-dev \ + rocsparse-dev # hiprand-dev is a new package that does not exist in old versions sudo apt-get install -y --no-install-recommends hiprand-dev || true diff --git a/.github/workflows/dependencies/dependencies_nvcc.sh b/.github/workflows/dependencies/dependencies_nvcc.sh new file mode 100755 index 0000000000..14bae699d7 --- /dev/null +++ b/.github/workflows/dependencies/dependencies_nvcc.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +# +# Copyright 2020-2022 Axel Huebl +# +# License: BSD-3-Clause-LBNL + +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 -qqq update +sudo apt-get install -y \ + build-essential \ + ca-certificates \ + cmake \ + g++ \ + gfortran \ + gnupg \ + libopenmpi-dev \ + openmpi-bin \ + pkg-config \ + 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 +sudo dpkg -i cuda-keyring_1.0-1_all.deb +sudo apt-get update +sudo apt-get install -y \ + cuda-command-line-tools-$VERSION_DASHED \ + cuda-compiler-$VERSION_DASHED \ + cuda-cupti-dev-$VERSION_DASHED \ + cuda-minimal-build-$VERSION_DASHED \ + cuda-nvml-dev-$VERSION_DASHED \ + cuda-nvtx-$VERSION_DASHED \ + libcufft-dev-$VERSION_DASHED \ + libcurand-dev-$VERSION_DASHED \ + libcusparse-dev-$VERSION_DASHED +sudo ln -s cuda-$VERSION_DOTTED /usr/local/cuda diff --git a/.github/workflows/dependencies/dependencies_nvcc11.sh b/.github/workflows/dependencies/dependencies_nvcc11.sh deleted file mode 100755 index 143cb0b98f..0000000000 --- a/.github/workflows/dependencies/dependencies_nvcc11.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright 2020 Axel Huebl -# -# License: BSD-3-Clause-LBNL - -set -eu -o pipefail - -sudo apt-get -qqq update -sudo apt-get install -y \ - build-essential \ - ca-certificates \ - cmake \ - g++ \ - gnupg \ - libopenmpi-dev \ - openmpi-bin \ - pkg-config \ - wget - -sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/3bf863cc.pub -echo "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/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-7 \ - cuda-compiler-11-7 \ - cuda-cupti-dev-11-7 \ - cuda-minimal-build-11-7 \ - cuda-nvml-dev-11-7 \ - cuda-nvtx-11-7 \ - libcurand-dev-11-7 -sudo ln -s cuda-11.7 /usr/local/cuda - diff --git a/Make.Microphysics_extern b/Make.Microphysics_extern index 60327aebc5..17f45478ca 100644 --- a/Make.Microphysics_extern +++ b/Make.Microphysics_extern @@ -126,14 +126,18 @@ ifeq ($(USE_CONDUCTIVITY),TRUE) EXTERN_CORE += $(CONDUCTIVITY_PATH) endif +# backwards compatibility -- remove after 25.01 +ifdef Opacity_dir + OPACITY_DIR=$(Opacity_dir) +endif ifeq ($(USE_RAD), TRUE) - ifeq ($(Opacity_dir), null) + ifeq ($(OPACITY_DIR), null) $(error The null opacity directory has been removed, please update to rad_power_law) endif EXTERN_CORE += $(MICROPHYSICS_HOME)/opacity - OPAC_PATH := $(MICROPHYSICS_HOME)/opacity/$(Opacity_dir) + OPAC_PATH := $(MICROPHYSICS_HOME)/opacity/$(OPACITY_DIR) EXTERN_CORE += $(OPAC_PATH) endif