Skip to content

Enable to initialize spatial/temporal/angular chirped laser + CI test #2244

Enable to initialize spatial/temporal/angular chirped laser + CI test

Enable to initialize spatial/temporal/angular chirped laser + CI test #2244

Workflow file for this run

# Copyright 2022
#
# This file is part of HiPACE++.
#
# Authors: Axel Huebl
# License: BSD-3-Clause-LBNL
name: 🐧 CUDA
on: [push, pull_request]
concurrency:
group: ${{ github.ref }}-${{ github.head_ref }}-cuda
cancel-in-progress: true
jobs:
# Ref.:
# https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/ubuntu18.04/10.1/base/Dockerfile
# https://github.com/ComputationalRadiationPhysics/picongpu/blob/0.5.0/share/picongpu/dockerfiles/ubuntu-1604/Dockerfile
# https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/
build_nvcc:
name: NVCC 11.8 SP
runs-on: ubuntu-20.04
if: github.event.pull_request.draft == false
env:
CXXFLAGS: "-Werror"
steps:
- uses: actions/checkout@v2
- name: install dependencies
run: |
.github/workflows/setup/nvcc11.sh
- name: CCache Cache
uses: actions/cache@v2
# - once stored under a key, they become immutable (even if local cache path content changes)
# - for a refresh the key has to change, e.g., hash of a tracked file in the key
with:
path: |
~/.ccache
~/.cache/ccache
key: ccache-cuda-nvcc-${{ hashFiles('.github/workflows/cuda.yml') }}-${{ hashFiles('cmake/dependencies/AMReX.cmake') }}-${{ github.event.repository.pushed_at }}
restore-keys: |
ccache-cuda-nvcc-${{ hashFiles('.github/workflows/cuda.yml') }}-
ccache-cuda-nvcc-
- name: Build & Install
run: |
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 -S . -B build \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DAMReX_CUDA_ARCH=6.0 \
-DHiPACE_COMPUTE=CUDA \
-DHiPACE_PRECISION=SINGLE \
-DAMReX_CUDA_ERROR_CROSS_EXECUTION_SPACE_CALL=ON \
-DAMReX_CUDA_ERROR_CAPTURE_THIS=ON
cmake --build build -j 2
# NVHPC is currently very slow (43min), so we don't test it yet
# build_nvhpc21-9-nvcc:
# name: [email protected] NVCC/NVC++ Release [tests]
# runs-on: ubuntu-20.04
# if: github.event.pull_request.draft == false
# steps:
# - uses: actions/checkout@v2
# - name: Dependencies
# run: .github/workflows/setup/nvhpc.sh
# - name: Build & Install
# run: |
# source /etc/profile.d/modules.sh
# module load /opt/nvidia/hpc_sdk/modulefiles/nvhpc/21.9
# which nvcc || echo "nvcc not in PATH!"
# which nvc++ || echo "nvc++ not in PATH!"
# which nvc || echo "nvc not in PATH!"
# nvcc --version
# nvc++ --version
# nvc --version
# cmake --version
#
# export CC=$(which nvc)
# export CXX=$(which nvc++)
# export CUDACXX=$(which nvcc)
# export CUDAHOSTCXX=${CXX}
#
# cmake -S . -B build \
# -DCMAKE_VERBOSE_MAKEFILE=ON \
# -DHiPACE_COMPUTE=CUDA \
# -DAMReX_CUDA_ARCH=8.0 \
# -DAMReX_CUDA_ERROR_CROSS_EXECUTION_SPACE_CALL=ON \
# -DAMReX_CUDA_ERROR_CAPTURE_THIS=ON
# cmake --build build -j 2