Skip to content

cmake build and CI testing (#67) #1

cmake build and CI testing (#67)

cmake build and CI testing (#67) #1

Workflow file for this run

name: CMAKE GNU MPI+CUDA CI
on:
push:
branches: [ "master", "dev" ]
paths-ignore:
- LICENSE.md
- README.md
pull_request:
branches: [ "master", "dev" ]
jobs:
build_and_test:
runs-on: ubuntu-20.04
strategy:
matrix:
cuda_pkg: [11-0]
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: Check out code
uses: actions/checkout@v3
- name: Install MPI
run: |
sudo apt update
sudo apt install -y mpich
which mpicc
which mpicxx
- 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 \
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}}
- name: Clean up
run: |
rm -rf ${{runner.workspace}}/Quicksilver/build
mkdir ${{runner.workspace}}/Quicksilver/build
- name: Make the code
run: |
cd ${{runner.workspace}}/Quicksilver/build
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}}/lib64:/usr/local/cuda-${{matrix.cuda_ver}}/lib:${LD_LIBRARY_PATH}
cmake .. -DCMAKE_CUDA_COMPILER=nvcc -DENABLE_MPI=ON -DENABLE_OMP=OFF -DENABLE_CUDA=ON -DCUDA_ARCH=70
make -j16
# - name: Run smoke test
# run: |
# export LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64:/usr/local/cuda-${{matrix.cuda_ver}}/lib64:/usr/local/cuda-${{matrix.cuda_ver}}/lib:${LD_LIBRARY_PATH}
# mpirun -n 1 ${{runner.workspace}}/Quicksilver/src/qs