forked from ECP-WarpX/WarpX
-
Notifications
You must be signed in to change notification settings - Fork 3
174 lines (157 loc) · 6.61 KB
/
ubuntu.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
name: Ubuntu build
on: [push, pull_request]
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.0.2 SP [Linux]
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: install dependencies
run: |
.github/workflows/dependencies/nvcc11.sh
export CEI_SUDO="sudo"
cmake-easyinstall --prefix=/usr/local git+https://github.com/openPMD/openPMD-api.git -DopenPMD_USE_PYTHON=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF
- name: build WarpX
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_sp \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DWarpX_COMPUTE=CUDA \
-DAMReX_CUDA_ARCH=6.0 \
-DWarpX_OPENPMD=ON \
-DWarpX_openpmd_internal=OFF \
-DWarpX_PRECISION=SINGLE \
-DWarpX_PSATD=ON \
-DAMReX_CUDA_ERROR_CAPTURE_THIS=ON
cmake --build build_sp -j 2
python3 -m pip install --upgrade pip setuptools wheel
PYWARPX_LIB_DIR=$PWD/build_sp/lib python3 -m pip wheel Python/
# Ref.: https://github.com/rscohn2/oneapi-ci
# intel-basekit intel-hpckit are too large in size
build_icc:
name: oneAPI ICC SP&DP [Linux]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: install dependencies
run: |
export DEBIAN_FRONTEND=noninteractive
sudo apt-get -qqq update
sudo apt-get install -y wget build-essential pkg-config cmake ca-certificates gnupg
sudo wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt-get update
sudo apt-get install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
set +e
source /opt/intel/oneapi/setvars.sh
set -e
sudo curl -L -o /usr/local/bin/cmake-easyinstall https://git.io/JvLxY
sudo chmod a+x /usr/local/bin/cmake-easyinstall
export CEI_SUDO="sudo"
CXX=$(which icpc) CC=$(which icc) cmake-easyinstall --prefix=/usr/local git+https://github.com/openPMD/openPMD-api.git -DopenPMD_USE_PYTHON=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF
- name: build WarpX
run: |
set +e
source /opt/intel/oneapi/setvars.sh
set -e
export CXX=$(which icpc)
export CC=$(which icc)
cmake -S . -B build_dp -DCMAKE_VERBOSE_MAKEFILE=ON -DWarpX_MPI=OFF -DWarpX_OPENPMD=ON -DWarpX_openpmd_internal=OFF
cmake --build build_dp -j 2
cmake -S . -B build_sp -DCMAKE_VERBOSE_MAKEFILE=ON -DWarpX_MPI=OFF -DWarpX_OPENPMD=ON -DWarpX_openpmd_internal=OFF -DWarpX_PRECISION=SINGLE
cmake --build build_sp -j 2
python3 -m pip install --upgrade pip setuptools wheel
PYWARPX_LIB_DIR=$PWD/build_sp/lib python3 -m pip wheel Python/
build_icpx:
name: oneAPI ICX SP [Linux]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: install dependencies
shell: bash
run: |
.github/workflows/dependencies/dpcpp.sh
- name: build WarpX
shell: bash
run: |
set +e
source /opt/intel/oneapi/setvars.sh
set -e
export CXX=$(which icpx)
export CC=$(which icx)
cmake -S . -B build_sp \
-DCMAKE_C_COMPILER_ID="Clang" \
-DCMAKE_C_COMPILER_VERSION=12.0 \
-DCMAKE_C_STANDARD_COMPUTED_DEFAULT="11" \
-DCMAKE_CXX_COMPILER_ID="Clang" \
-DCMAKE_CXX_COMPILER_VERSION=12.0 \
-DCMAKE_CXX_STANDARD_COMPUTED_DEFAULT="14" \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DWarpX_MPI=OFF \
-DWarpX_OPENPMD=ON \
-DWarpX_PRECISION=SINGLE
cmake --build build_sp -j 2
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade setuptools wheel
PYWARPX_LIB_DIR=$PWD/build_sp/lib python3 -m pip wheel Python/
# note: setting the CXX compiler ID is a work-around for
# the 2021.1 DPC++ release / CMake 3.19.0-3.19.1
# https://gitlab.kitware.com/cmake/cmake/-/issues/21551#note_869580
build_dpcc:
name: oneAPI DPC++ SP [Linux]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: install dependencies
shell: bash
run: |
.github/workflows/dependencies/dpcpp.sh
- name: build WarpX
shell: bash
run: |
set +e
source /opt/intel/oneapi/setvars.sh
set -e
export CXX=$(which dpcpp)
export CC=$(which clang)
cmake -S . -B build_sp \
-DCMAKE_CXX_COMPILER_ID="Clang" \
-DCMAKE_CXX_COMPILER_VERSION=12.0 \
-DCMAKE_CXX_STANDARD_COMPUTED_DEFAULT="17" \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DWarpX_COMPUTE=SYCL \
-DWarpX_MPI=OFF \
-DWarpX_OPENPMD=ON \
-DWarpX_PRECISION=SINGLE
cmake --build build_sp -j 2
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade setuptools wheel
PYWARPX_LIB_DIR=$PWD/build_sp/lib python3 -m pip wheel Python/
# note: setting the CXX compiler ID is a work-around for
# the 2021.1 DPC++ release / CMake 3.19.0-3.19.1
# https://gitlab.kitware.com/cmake/cmake/-/issues/21551#note_869580
build_hip:
name: HIP SP [Linux]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: install dependencies
shell: bash
run: .github/workflows/dependencies/hip.sh
- name: build WarpX
shell: bash
run: |
source /etc/profile.d/rocm.sh
hipcc --version
export CXX=$(which hipcc)
export CC=$(which hipcc)
cmake -S . -B build_sp -DCMAKE_VERBOSE_MAKEFILE=ON -DWarpX_MPI=ON -DWarpX_COMPUTE=HIP -DAMReX_AMD_ARCH=gfx900 -DWarpX_OPENPMD=ON -DWarpX_PRECISION=SINGLE
cmake --build build_sp -j 2
PYWARPX_LIB_DIR=$PWD/build_sp/lib python3 -m pip wheel Python/