-
Notifications
You must be signed in to change notification settings - Fork 15
executable file
·148 lines (133 loc) · 5.67 KB
/
test.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
name: Run Github CI tests.
on: [push, pull_request]
jobs:
test:
name: Build and test
runs-on: ubuntu-latest
strategy:
matrix:
compiler:
- gcc
test: [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies
run: |
export BLUE="\033[34;1m"
mkdir -p installDir
printf "${BLUE} YL; Installing gcc-9 via apt\n"
sudo apt-get update
sudo apt-get install build-essential software-properties-common -y
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt-get update
sudo apt-get install gcc-9 g++-9 -y
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-9
export CXX="g++-9"
export CC="gcc-9"
printf "${BLUE} YL; Done installing gcc-9 via apt\n"
printf "${BLUE} YL; Installing gfortran via apt\n"
sudo apt-get install gfortran-9 -y
sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-9 60
printf "${BLUE} YL; Done installing gfortran via apt\n"
printf "${BLUE} YL; Installing openmpi\n"
sudo apt-get install openmpi-bin libopenmpi-dev
printf "${BLUE} YL; Done installing openmpi\n"
printf "${BLUE} YL; Installing dos2unixfrom apt\n"
sudo apt-get install dos2unix
printf "${BLUE} YL; Done installing dos2unixfrom apt\n"
printf "${BLUE} YL; Installing BLASfrom apt\n"
sudo apt-get install libblas-dev
export BLAS_LIB=/usr/lib/x86_64-linux-gnu/libblas.so
printf "${BLUE} YL; Done installing BLASfrom apt\n"
printf "${BLUE} YL; Installing LAPACKfrom apt\n"
sudo apt-get install liblapack-dev
export LAPACK_LIB=/usr/lib/x86_64-linux-gnu/liblapack.so
printf "${BLUE} YL; Done installing LAPACKfrom apt\n"
printf "${BLUE} YL; Installing ScaLAPACK from source\n"
cd $GITHUB_WORKSPACE/installDir
wget http://www.netlib.org/scalapack/scalapack-2.1.0.tgz
tar -xf scalapack-2.1.0.tgz
cd scalapack-2.1.0
rm -rf build
mkdir -p build
cd build
cmake .. \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_C_COMPILER=mpicc \
-DCMAKE_Fortran_COMPILER=mpif90 \
-DCMAKE_INSTALL_PREFIX=./install \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-DCMAKE_Fortran_FLAGS="-fopenmp" \
-DBLAS_LIBRARIES="$BLAS_LIB" \
-DLAPACK_LIBRARIES="$LAPACK_LIB"
make
make install
export SCALAPACK_LIB="$GITHUB_WORKSPACE/installDir/scalapack-2.1.0/build/install/lib/libscalapack.so"
printf "${BLUE} YL; Done installing ScaLAPACK from source\n"
printf "${BLUE} YL; Installing arpack from source\n"
cd $GITHUB_WORKSPACE/installDir
git clone https://github.com/opencollab/arpack-ng.git
cd arpack-ng
rm -rf build
mkdir -p build
cd build
cmake .. \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_C_COMPILER=mpicc \
-DCMAKE_CXX_COMPILER=mpic++ \
-DCMAKE_Fortran_COMPILER=mpif90 \
-DCMAKE_INSTALL_PREFIX=. \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-DCMAKE_Fortran_FLAGS="-fopenmp" \
-DTPL_BLAS_LIBRARIES="$BLAS_LIB" \
-DTPL_LAPACK_LIBRARIES="$LAPACK_LIB" \
-DMPI=ON \
-DEXAMPLES=ON \
-DCOVERALLS=ON
make
export ARPACK_LIB="$GITHUB_WORKSPACE/installDir/arpack-ng/build/lib/libarpack.so;$GITHUB_WORKSPACE/installDir/arpack-ng/build/lib/libparpack.so"
printf "${BLUE} YL; Done installing arpack from source\n"
- name: Install package
run: |
export BLUE="\033[34;1m"
export BLAS_LIB=/usr/lib/x86_64-linux-gnu/libblas.so
export LAPACK_LIB=/usr/lib/x86_64-linux-gnu/liblapack.so
export SCALAPACK_LIB="$GITHUB_WORKSPACE/installDir/scalapack-2.1.0/build/install/lib/libscalapack.so"
export ARPACK_LIB="$GITHUB_WORKSPACE/installDir/arpack-ng/build/lib/libarpack.so;$GITHUB_WORKSPACE/installDir/arpack-ng/build/lib/libparpack.so"
printf "${BLUE} YL; Installing ButterflyPACK from source\n"
cd $GITHUB_WORKSPACE
rm -rf build
mkdir -p build
cd build
export CRAYPE_LINK_TYPE=dynamic
rm -rf CMakeCache.txt
rm -rf DartConfiguration.tcl
rm -rf CTestTestfile.cmake
rm -rf cmake_install.cmake
rm -rf CMakeFiles
cmake .. \
-DCMAKE_CXX_FLAGS="-fopenmp" \
-Denable_blaslib=OFF \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_C_COMPILER=mpicc \
-DCMAKE_CXX_COMPILER=mpic++ \
-DCMAKE_Fortran_COMPILER=mpif90 \
-DCMAKE_INSTALL_PREFIX=. \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-DCMAKE_Fortran_FLAGS="-fopenmp" \
-DTPL_BLAS_LIBRARIES="$BLAS_LIB" \
-DTPL_LAPACK_LIBRARIES="$LAPACK_LIB" \
-DTPL_SCALAPACK_LIBRARIES="$SCALAPACK_LIB" \
-DTPL_ARPACK_LIBRARIES="$ARPACK_LIB"
make
make install
printf "${BLUE} YL; Done installing ButterflyPACK from source\n"
- name: Test
run: |
cd $GITHUB_WORKSPACE
export TEST_NUMBER=${{ matrix.test }}
sh ./.ci_tests.sh