forked from SeisSol/SeisSol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines-seissol-template.yml
61 lines (58 loc) · 3.67 KB
/
azure-pipelines-seissol-template.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
jobs:
- ${{ each equation in parameters.equations }}:
- ${{ each precision in parameters.precisions }}:
- ${{ each build_type in parameters.build_types }}:
- job:
displayName: ${{ format('equation:{0} precision:{1} build_type:{2}', equation, precision, build_type) }}
pool:
vmImage: 'ubuntu-20.04'
steps:
- bash: |
set -euo pipefail
export IFS=$'\n\t'
export CTEST_OUTPUT_ON_FAILURE=1
whoami
pwd
ls
sudo apt-get update
sudo apt-get install gcc-8 g++-8 gfortran-8
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 100
sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-8 100
sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-8 100
gcc --version
gcov-tool --version
gcov --version
sudo apt-get install -qq openmpi-bin openmpi-common libopenmpi-dev hdf5-tools libhdf5-openmpi-103 libhdf5-openmpi-dev python3 python3-pip libmetis-dev libparmetis-dev libarmadillo-dev lcov libyaml-cpp-dev
sudo pip3 install --upgrade pip
sudo pip3 install 'numpy>=1.12.0'
git clone https://github.com/hfp/libxsmm
cd libxsmm
make generator -j $(nproc)
mkdir -p $HOME/bin
cp bin/libxsmm_gemm_generator $HOME/bin
export PATH=$HOME/bin:$PATH
cd ..
git clone --depth 1 --branch v1.0.0 https://github.com/SeisSol/easi.git
mkdir easi_build
cd easi_build
cmake -DASAGI=OFF -DIMPALAJIT=OFF -DCMAKE_INSTALL_PREFIX=$HOME ../easi
make -j $(nproc) install
cd ..
git submodule update --init
if [ "${{ equation }}" = viscoelastic2 ]; then
mechanisms=3
else
mechanisms=0
fi
mkdir -p build && cd build
CMAKE_PREFIX_PATH=~ PKG_CONFIG_PATH=~/lib/pkgconfig/ cmake -DNETCDF=OFF -DMETIS=ON -DORDER=6 -DCOMMTHREAD=ON -DASAGI=OFF -DHDF5=ON -DCMAKE_BUILD_TYPE=${{ build_type }} -DTESTING=ON -DLOG_LEVEL=warning -DLOG_LEVEL_MASTER=info -DHOST_ARCH=hsw -DPRECISION=${{ precision }} -DEQUATIONS=${{ equation }} -DNUMBER_OF_MECHANISMS=$mechanisms -DGEMM_TOOLS_LIST=LIBXSMM -DTESTING=ON -DCOVERAGE=ON ..
make -j $(nproc)
make test
if [ "${{ equation }}" = elastic -a "${{ build_type }}" = Debug -a "${{ precision }}" = double ] ; then
make SeisSol-coverage
find . -name "*.info"
coverage_file=$(readlink -e $(find . -name "*info" | head -n 1))
echo "coverage_file = $coverage_file"
bash <(curl -s https://codecov.io/bash) -f $coverage_file || echo "Codecov did not collect coverage reports"
fi