-
Notifications
You must be signed in to change notification settings - Fork 15
59 lines (51 loc) · 1.75 KB
/
hip.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Copyright 2021-2022
#
# This file is part of HiPACE++.
#
# Authors: Axel Huebl
# License: BSD-3-Clause-LBNL
name: 🐧 HIP
on: [push, pull_request]
jobs:
build_hip:
name: HIP SP
runs-on: ubuntu-20.04
# -Werror
env: {CXXFLAGS: "-Wno-deprecated-declarations -Wno-error=pass-failed"}
steps:
- uses: actions/checkout@v2
- name: install dependencies
shell: bash
run: .github/workflows/setup/hip.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-hip-clang-${{ hashFiles('.github/workflows/hip.yml') }}-${{ hashFiles('cmake/dependencies/AMReX.cmake') }}-${{ github.event.repository.pushed_at }}
restore-keys: |
ccache-hip-clang-${{ hashFiles('.github/workflows/hip.yml') }}-
ccache-hip-clang-
- name: build HiPACE
shell: bash
run: |
source /etc/profile.d/rocm.sh
hipcc --version
which clang
which clang++
export CXX=$(which clang++)
export CC=$(which clang)
# "mpic++ --showme" forgets open-pal in Ubuntu 20.04 + OpenMPI 4.0.3
# https://bugs.launchpad.net/ubuntu/+source/openmpi/+bug/1941786
# https://github.com/open-mpi/ompi/issues/9317
export LDFLAGS="-lopen-pal"
cmake -S . -B build_sp \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DAMReX_AMD_ARCH=gfx900 \
-DHiPACE_COMPUTE=HIP \
-DHiPACE_MPI=ON \
-DHiPACE_PRECISION=SINGLE
cmake --build build_sp -j 2