-
Notifications
You must be signed in to change notification settings - Fork 2
/
install_ngsolve_serial
executable file
·83 lines (71 loc) · 2.01 KB
/
install_ngsolve_serial
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
#!/bin/bash
# This script installs Netgen/Ngsolve for serial processing
# assuming that Python3 and Cmake3 are already installed
if [[ $CLUSTER = "GAIA" ]]
then
module load intel-18.0
module load gcc-9.2.0
else
module load intel
if [[ -n $USECLANG ]]
then
module load clang-11.1.0
else
module load gcc-9.2.0
fi
fi
export BASEDIR=$HOME/NGserial
export BUILDDIR=$BASEDIR/build
export SRCDIR=$BASEDIR/ngsolve
if [[ -d $BASEDIR ]]
then
rm -rf $BASEDIR
fi
mkdir $BASEDIR
cd $BASEDIR && git clone https://github.com/NGSolve/ngsolve.git ngsolve
cd $SRCDIR
git submodule update --init --recursive
mkdir -p $BUILDDIR
cd $BUILDDIR
if [[ $CLUSTER = "GAIA" ]]
then
cmake \
-DCMAKE_INSTALL_PREFIX=$BASEDIR \
-DMKL_ROOT=/vol/apps/compilers/intel/2018/compilers_and_libraries_2018.1.163/linux/mkl \
-DUSE_MKL=ON \
-DUSE_UMFPACK=ON \
-DCMAKE_BUILD_TYPE=Release \
$BASEDIR/ngsolve
else
if [[ -n $USECLANG ]]
then
# verbose option
# export CXXFLAGS="-v --gcc-toolchain=/vol/apps/gcc/gcc-9.2.0"
export CXXFLAGS="--gcc-toolchain=/vol/apps/gcc/gcc-9.2.0"
cmake \
-DCMAKE_INSTALL_PREFIX:PATH=$BASEDIR \
-DMKL_ROOT:PATH=/opt/intel/mkl \
-DUSE_MKL:BOOL=ON \
-DUSE_UMFPACK:BOOL=ON \
-DCMAKE_C_COMPILER:FILEPATH=$(which clang) \
-DCMAKE_CXX_COMPILER:FILEPATH=$(which clang++) \
$BASEDIR/ngsolve
else
# verbose option
# export CXXFLAGS="-v"
cmake \
-DCMAKE_INSTALL_PREFIX=$BASEDIR \
-DMKL_ROOT=/opt/intel/mkl \
-DUSE_MKL=ON \
-DUSE_UMFPACK=ON \
-DCMAKE_BUILD_TYPE=Release \
$BASEDIR/ngsolve
fi
fi
# TODO: Get Pardiso working (at least on Coeus) and make sure MKL is working
# -DUSE_PARDISO=ON \
# Couldn't find Pardiso on Gaia
# Why is Pardiso not found on Coeus now? CMake ignoring MKL_ROOT?
# Note: seg faults are possible with both PARDISO and UMFPACK ON
make -j20
make install