diff --git a/.github/workflows/clang-tidy.yml b/.github/workflows/clang-tidy.yml index 673ebbef88..eb094c9a8b 100644 --- a/.github/workflows/clang-tidy.yml +++ b/.github/workflows/clang-tidy.yml @@ -25,7 +25,7 @@ jobs: - name: Install dependencies run: | - .github/workflows/dependencies_clang-tidy-apt-llvm.sh 19 + .github/workflows/dependencies/dependencies_clang-tidy-apt-llvm.sh 19 - name: Compile flame_wave run: | diff --git a/.github/workflows/dependencies_clang-tidy-apt-llvm.sh b/.github/workflows/dependencies/dependencies_clang-tidy-apt-llvm.sh similarity index 100% rename from .github/workflows/dependencies_clang-tidy-apt-llvm.sh rename to .github/workflows/dependencies/dependencies_clang-tidy-apt-llvm.sh diff --git a/.github/workflows/dependencies_hip.sh b/.github/workflows/dependencies/dependencies_hip.sh similarity index 96% rename from .github/workflows/dependencies_hip.sh rename to .github/workflows/dependencies/dependencies_hip.sh index ab5185ce0a..527379e7e8 100755 --- a/.github/workflows/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..8f6ac3ead4 --- /dev/null +++ b/.github/workflows/dependencies/dependencies_nvcc.sh @@ -0,0 +1,42 @@ +#!/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 \ + libcublas-dev-$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/gpu_action.yml b/.github/workflows/gpu_action.yml index 3c6af431e1..b09bccd11d 100644 --- a/.github/workflows/gpu_action.yml +++ b/.github/workflows/gpu_action.yml @@ -29,14 +29,7 @@ jobs: sudo apt-get -qq -y install curl cmake jq clang g++>=9.3.0 - name: Install CUDA - # from https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=20.04&target_type=deb_network - run: | - wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin - sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600 - sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub - sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /" - sudo apt-get update - sudo apt-get -y install cuda-toolkit-11-8 + run: .github/workflows/dependencies/dependencies_nvcc.sh 11.8 - name: Install hypre run: | diff --git a/.github/workflows/hip.yml b/.github/workflows/hip.yml index 1bd1aa4b3e..c688bf43b2 100644 --- a/.github/workflows/hip.yml +++ b/.github/workflows/hip.yml @@ -24,7 +24,7 @@ jobs: cd ../.. - name: Dependencies - run: .github/workflows/dependencies_hip.sh + run: .github/workflows/dependencies/dependencies_hip.sh - name: compile flame_wave run: | diff --git a/Docs/source/radiation.rst b/Docs/source/radiation.rst index 6587219d74..3bc033a45c 100644 --- a/Docs/source/radiation.rst +++ b/Docs/source/radiation.rst @@ -126,7 +126,7 @@ frequency, and :math:`m`, :math:`n` and :math:`p` are constants. For the gray so :: - Opacity_dir := rad_power_law + OPACITY_DIR := rad_power_law in your GNUmakefile. See ยง \ `3.3.1 <#sec:opacpars>`__ for instructions on how to configure the parameters used for this opacity setup. If you would prefer a different diff --git a/Exec/radiation_tests/Rad2Tshock/GNUmakefile b/Exec/radiation_tests/Rad2Tshock/GNUmakefile index fbaac6067e..d307b537ca 100644 --- a/Exec/radiation_tests/Rad2Tshock/GNUmakefile +++ b/Exec/radiation_tests/Rad2Tshock/GNUmakefile @@ -17,7 +17,7 @@ EOS_DIR := gamma_law NETWORK_DIR := general_null NETWORK_INPUTS := gammalaw.net -Opacity_dir := rad_power_law +OPACITY_DIR := rad_power_law PROBLEM_DIR ?= ./ diff --git a/Exec/radiation_tests/RadBlastWave/GNUmakefile b/Exec/radiation_tests/RadBlastWave/GNUmakefile index 2bf3943d68..47fc9234fe 100644 --- a/Exec/radiation_tests/RadBlastWave/GNUmakefile +++ b/Exec/radiation_tests/RadBlastWave/GNUmakefile @@ -15,7 +15,7 @@ EOS_DIR := gamma_law NETWORK_DIR := general_null NETWORK_INPUTS := gammalaw.net -Opacity_dir := rad_power_law +OPACITY_DIR := rad_power_law PROBLEM_DIR ?= ./ diff --git a/Exec/radiation_tests/RadBreakout/GNUmakefile b/Exec/radiation_tests/RadBreakout/GNUmakefile index 8307c6e975..d2622d680a 100644 --- a/Exec/radiation_tests/RadBreakout/GNUmakefile +++ b/Exec/radiation_tests/RadBreakout/GNUmakefile @@ -18,7 +18,7 @@ CASTRO_HOME ?= ../../.. EOS_DIR = breakout NETWORK_DIR := general_null NETWORK_INPUTS = breakout.net -Opacity_dir = breakout +OPACITY_DIR = breakout PROBLEM_DIR ?= ./ diff --git a/Exec/radiation_tests/RadFront/GNUmakefile b/Exec/radiation_tests/RadFront/GNUmakefile index 39d31d11cf..9d232781ba 100644 --- a/Exec/radiation_tests/RadFront/GNUmakefile +++ b/Exec/radiation_tests/RadFront/GNUmakefile @@ -17,7 +17,7 @@ EOS_DIR := gamma_law NETWORK_DIR := general_null NETWORK_INPUTS := gammalaw.net -Opacity_dir := rad_power_law +OPACITY_DIR := rad_power_law PROBLEM_DIR ?= ./ diff --git a/Exec/radiation_tests/RadShestakovBolstad/GNUmakefile b/Exec/radiation_tests/RadShestakovBolstad/GNUmakefile index 12d08ee8ea..ac2b5876c0 100644 --- a/Exec/radiation_tests/RadShestakovBolstad/GNUmakefile +++ b/Exec/radiation_tests/RadShestakovBolstad/GNUmakefile @@ -17,7 +17,7 @@ EOS_DIR := rad_power_law NETWORK_DIR := general_null NETWORK_INPUTS := gammalaw.net -Opacity_dir := rad_power_law +OPACITY_DIR := rad_power_law # number of radiation groups - this needs to correspond to radiation.nGroups in # the inputs file diff --git a/Exec/radiation_tests/RadSourceTest/GNUmakefile b/Exec/radiation_tests/RadSourceTest/GNUmakefile index 19d094f067..e55278b5cd 100644 --- a/Exec/radiation_tests/RadSourceTest/GNUmakefile +++ b/Exec/radiation_tests/RadSourceTest/GNUmakefile @@ -20,7 +20,7 @@ EOS_DIR := rad_power_law NETWORK_DIR := general_null NETWORK_INPUTS := gammalaw.net -Opacity_dir := rad_power_law +OPACITY_DIR := rad_power_law # use radiation interpbndry RAD_INTERP = TRUE diff --git a/Exec/radiation_tests/RadSphere/GNUmakefile b/Exec/radiation_tests/RadSphere/GNUmakefile index f057ad3ecf..e61be921c0 100644 --- a/Exec/radiation_tests/RadSphere/GNUmakefile +++ b/Exec/radiation_tests/RadSphere/GNUmakefile @@ -17,7 +17,7 @@ EOS_DIR := rad_power_law NETWORK_DIR := general_null NETWORK_INPUTS := gammalaw.net -Opacity_dir := rad_power_law +OPACITY_DIR := rad_power_law # number of radiation groups - this needs to correspond to radiation.nGroups in # the inputs file diff --git a/Exec/radiation_tests/RadSuOlson/GNUmakefile b/Exec/radiation_tests/RadSuOlson/GNUmakefile index 43c503b9c5..993717dbef 100644 --- a/Exec/radiation_tests/RadSuOlson/GNUmakefile +++ b/Exec/radiation_tests/RadSuOlson/GNUmakefile @@ -16,7 +16,7 @@ EOS_DIR := rad_power_law NETWORK_DIR := general_null NETWORK_INPUTS := gammalaw.net -Opacity_dir := rad_power_law +OPACITY_DIR := rad_power_law PROBLEM_DIR ?= ./ diff --git a/Exec/radiation_tests/RadSuOlsonMG/GNUmakefile b/Exec/radiation_tests/RadSuOlsonMG/GNUmakefile index 84bb1ad7bd..de11e671e4 100644 --- a/Exec/radiation_tests/RadSuOlsonMG/GNUmakefile +++ b/Exec/radiation_tests/RadSuOlsonMG/GNUmakefile @@ -17,7 +17,7 @@ EOS_DIR := rad_power_law NETWORK_DIR := general_null NETWORK_INPUTS := gammalaw.net -Opacity_dir := rad_power_law +OPACITY_DIR := rad_power_law NGROUPS := 2 diff --git a/Exec/radiation_tests/RadThermalWave/GNUmakefile b/Exec/radiation_tests/RadThermalWave/GNUmakefile index 39d31d11cf..9d232781ba 100644 --- a/Exec/radiation_tests/RadThermalWave/GNUmakefile +++ b/Exec/radiation_tests/RadThermalWave/GNUmakefile @@ -17,7 +17,7 @@ EOS_DIR := gamma_law NETWORK_DIR := general_null NETWORK_INPUTS := gammalaw.net -Opacity_dir := rad_power_law +OPACITY_DIR := rad_power_law PROBLEM_DIR ?= ./ diff --git a/Exec/science/bwp-rad/GNUmakefile b/Exec/science/bwp-rad/GNUmakefile index a97474626d..eeec42e093 100644 --- a/Exec/science/bwp-rad/GNUmakefile +++ b/Exec/science/bwp-rad/GNUmakefile @@ -29,7 +29,7 @@ NETWORK_DIR := general_null NETWORK_INPUTS := H_He.net # power-law opacity -Opacity_dir := rad_power_law +OPACITY_DIR := rad_power_law PROBLEM_DIR ?= ./ diff --git a/Exec/science/planet/GNUmakefile b/Exec/science/planet/GNUmakefile index d61a5223be..769260a58e 100644 --- a/Exec/science/planet/GNUmakefile +++ b/Exec/science/planet/GNUmakefile @@ -33,7 +33,7 @@ NETWORK_DIR := general_null NETWORK_INPUTS := ./taeho.net # power-law opacity -Opacity_dir := rad_power_law +OPACITY_DIR := rad_power_law PROBLEM_DIR ?= ./