forked from SeisSol/SeisSol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitlab-cpu-pipeline.yml
123 lines (119 loc) · 4.91 KB
/
gitlab-cpu-pipeline.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
stages:
- pre_build
- build
- test
- performance_eval
ci_builder_pre:
stage: pre_build
tags:
- ci_testing_cc
variables:
GIT_STRATEGY: clone
before_script:
- git branch -vva
- echo $commit_author_name
script:
- echo "checking availability of ci_testing_cc"
- git --version
- git submodule set-url submodules/xdmfwriter https://github.com/TUM-I5/XdmfWriter.git
- git submodule set-url submodules/cxxtest https://github.com/CxxTest/cxxtest.git
- git submodule set-url submodules/utils https://github.com/TUM-I5/utils.git
- git submodule set-url submodules/async https://github.com/TUM-I5/ASYNC.git
- git submodule set-url submodules/scons-tools https://github.com/TUM-I5/scons-tools.git
- git submodule set-url submodules/PUML https://github.com/TUM-I5/PUML2.git
- git submodule set-url submodules/yateto https://github.com/SeisSol/yateto.git
- git submodule set-url submodules/Device https://github.com/SeisSol/Device.git
- git submodule --quiet update --init --recursive
- wget -q https://syncandshare.lrz.de/dl/fiJNAokgbe2vNU66Ru17DAjT/netcdf-4.6.1.tar.gz
- wget -q -O libxsmm-1.17.zip https://github.com/libxsmm/libxsmm/archive/refs/tags/1.17.zip
- sudo apt-get install -qq --yes gcc-8 g++-8 gfortran-8 pkg-config cmake cmake-data
- 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 apt-get install -qq --yes unzip openmpi-bin openmpi-common libopenmpi-dev hdf5-tools libhdf5-openmpi-dev python3 python3-pip libmetis-dev libparmetis-dev cxxtest libarmadillo-dev libyaml-cpp-dev
- gfortran --version
- pip3 install --upgrade pip
- pip3 install 'numpy>=1.12.0'
- pip3 install lxml
- pip3 install setuptools
- pip3 install sphinx
- pip3 install sphinx_rtd_theme
- tar -xzf netcdf-4.6.1.tar.gz
- cd netcdf-4.6.1 && CC=h5pcc ./configure --prefix=/usr --enable-shared=no --disable-dap && make && sudo make install && cd ..
- unzip libxsmm-1.17.zip
- cd libxsmm-1.17 && make generator && sudo cp bin/libxsmm_gemm_generator /usr/bin && 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 ../easi &&
sudo make -j $(nproc) install && cd ..
- wget https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz
- tar -xf eigen-3.4.0.tar.gz
- mkdir eigen3_build && cd eigen3_build && cmake ../eigen-3.4.0 && sudo make install && cd ..
ci_builder_build:
stage: build
tags:
- ci_testing_cc
needs:
- job: ci_builder_pre
before_script:
- cat .git/config
parallel:
matrix:
- precision: double
- precision: single
script:
- echo "now building"
- echo $CI_REGISTRY $CI_REGISTRY_IMAGE $CI_REGISTRY_USER
- git submodule update --init --recursive
- cmake --version
- set -euo pipefail
- export IFS=$'\n\t'
- export CTEST_OUTPUT_ON_FAILURE=1
- equation=elastic
- mechanisms=0
- for build_type in Release ;
do for equation in elastic ;
do dirname="build_${equation}_${precision}_${build_type}";
echo "mkdir $dirname";
if [ "$equation" = viscoelastic2 ]; then mechanisms=3; else mechanisms=0; fi;
mkdir -p $dirname && cd $dirname ;
pwd;
CMAKE_PREFIX_PATH=~ ;
cmake ..
-DNETCDF=OFF
-DMETIS=ON
-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 .. ;
make -j $(nproc);
cd .. ;
done;
done;
artifacts:
paths:
- build_*
ci_builder_test:
stage: test
tags:
- ci_testing_cc
allow_failure: true
needs:
- job: ci_builder_build
parallel:
matrix:
- DIR: build_elastic_double_Release
- DIR: build_elastic_single_Release
script:
- echo "testing"
- pwd
- ls
- cd $DIR
- make test