Skip to content

Commit

Permalink
Use amrex's scripts to install cuda, hip, gcc, and mac dependencies (#…
Browse files Browse the repository at this point in the history
…1372)

Co-authored-by: Ann Almgren <[email protected]>
  • Loading branch information
WeiqunZhang and asalmgren authored Jan 10, 2024
1 parent 41a5483 commit 60668b2
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 103 deletions.
16 changes: 4 additions & 12 deletions .github/workflows/cuda-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
Expand All @@ -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 \
Expand Down
16 changes: 0 additions & 16 deletions .github/workflows/dependencies/dependencies.sh

This file was deleted.

58 changes: 0 additions & 58 deletions .github/workflows/dependencies/dependencies_hip.sh

This file was deleted.

14 changes: 0 additions & 14 deletions .github/workflows/dependencies/dependencies_mac.sh

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down

0 comments on commit 60668b2

Please sign in to comment.