forked from devsim/devsim
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_centos_8.sh
More file actions
executable file
·60 lines (43 loc) · 2.13 KB
/
build_centos_8.sh
File metadata and controls
executable file
·60 lines (43 loc) · 2.13 KB
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
#!/bin/bash
set -e
# Centos Specific
#https://fedoraproject.org/wiki/EPEL
#yum install -y git bison flex
#yum install -y centos-release-scl
#yum install -y devtoolset-8-gcc devtoolset-8-gcc-c++ devtoolset-8-libquadmath-devel devtoolset-8-gcc-gfortran
export CMAKE="cmake"
export CMAKE_CXX_FLAGS=""
export CC="/usr/bin/gcc"
export CXX="/usr/bin/g++"
export F77="/usr/bin/gfortran"
#minimal conda environments to prevent linking against the wrong libraries
cd ${HOME}
conda create -y --name python3_devsim_build python=3 mkl mkl-devel mkl-include boost cmake
source activate python3_devsim_build
export PYTHON3_BIN=python
export PYTHON3_INCLUDE=$(python -c "from sysconfig import get_paths as gp; print(gp()['include'])")
export PYTHON3_ARCHIVE=""
#download boost library
#(cd ${HOME}/devsim/external && curl -O -L https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.gz)
#(cd ${HOME}/devsim/external && tar xzf boost_1_66_0.tar.gz)
# this script assumes git clone and submodule initialization has been done
cd devsim
# SuperLU
#(cd external && curl -O http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_4.3.tar.gz && tar xzf superlu_4.3.tar.gz)
(cd external && tar xzf superlu_4.3.tar.gz)
# SYMDIFF build
(cd external/symdiff && bash ../symdiff_centos.sh && cd linux_x86_64_release && make -j2);
# CGNSLIB build
####(cd external && curl -L -O https://github.com/CGNS/CGNS/archive/v3.1.4.tar.gz && tar xzf v3.1.4.tar.gz)
####(cd external && mkdir -p CGNS-3.1.4/build && cd CGNS-3.1.4/build && cmake3 -DCMAKE_C_COMPILER=/opt/rh/devtoolset-8/root/usr/bin/gcc -DBUILD_CGNSTOOLS=OFF -DCMAKE_INSTALL_PREFIX=$PWD/../../cgnslib .. && make -j2 && make install)
# SUPERLU build
(cd external/SuperLU_4.3 && sh ../superlu_centos6.sh)
# quad precision getrf
(cd external/getrf && bash setup_centos6.sh && cd build && make -j2)
# start devsim build
bash scripts/setup_centos_6.sh
# overcome bad libstdc++ in anaconda directory
mkdir -p linux_x86_64_release/linklibs
for i in libmkl_rt.so libz.a libsqlite3*; do cp -f ${CONDA_PREFIX}/lib/$i linux_x86_64_release/linklibs/; done
(cd linux_x86_64_release && make -j2)
(cd dist && bash package_linux.sh ${1})