-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathArcOn_install
executable file
·269 lines (176 loc) · 7.41 KB
/
ArcOn_install
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
#! /bin/bash
#Set the architecture to make on
Machine=Stampede
if [ $Machine = Stampede ] ; then
echo "Building for Stampede Supercomputer"
# First make sure that the ArcOn bashrc has been sourced to add the necessary modules (see below as well)
# This script must be run using 'source ArcOn_install.sh' if you wish to set global directories:
module load boost cmake git valgrind hdf5 netcdf intel petsc #metis
export CC=mpicc
export CXX=mpicxx
export FC=mpif90
export ArcOn_DIR=`pwd`
# First, we will unpack the parallel adaptive mesh refinement forest (a.k.a. 'p4est') for parallel decomposition
sh p4est-setup.sh p4est-0.3.4.2.tar.gz $ArcOn_DIR/p4est
cd $ArcOn_DIR
# Let's build petsc now, and remember also to add these (PETSC_DIR, PETSC_ARCH, and LD_LIBRARY_PATH) to your bashrc or .bashrc_local for initialization
# tar xzfv petsc-3.6.3.tar.gz
# export PETSC_DIR=$ArcOn_DIR/petsc-3.6.3
# export PETSC_ARCH=intel-13.0.2.146-MVAPICH2-1.9a2-cxx-opt
# cd $PETSC_DIR
# ./configure --with-shared-libraries --with-debugging=false \
# --COPTFLAGS='-O3' --CXXOPTFLAGS='-O3' --FOPTFLAGS='-O3' \
# --with-mpi-compilers=1 --with-mpi-dir=/opt/apps/intel13/mvapich2/1.9 \
# --with-scalar-type=real --with-dynamic-loading=0 \
# --with-shared-libraries=1 --with-spai=1 --download-spai --with-hypre=1 \
# --download-hypre --with-mumps=1 --download-mumps --with-scalapack=1 \
# --download-scalapack --with-blacs=1 --download-blacs --with-spooles=1 \
# --download-spooles --with-superlu=1 --download-superlu \
# --with-superlu_dist=1 --download-superlu_dist --with-parmetis=1 \
# --download-parmetis --with-metis=1 --download-metis \
# --with-blas-lapack-dir=/opt/apps/intel/13/composer_xe_2013.2.146/mkl/lib/intel64 \
# #--with-batch
# make clean
# make all
# make test
# cd ..
# chmod -R g+rwX $PETSC_DIR
# export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ArcOn_DIR/petsc-3.6.3/intel-13.0.2.146-MVAPICH2-1.9a2-cxx-opt/lib
#Got to here 5/22
# We can use a bundled deal.ii
# tar xzfv deal.II.tar.gz
#tar xzfv deal.II-8.0.0.tar.gz
# tar xzfv deal.II-7.3.0.tar.gz
# or just checkout the newest svn
#git clone https://github.com/dealii/dealii.git
#svn checkout https://svn.dealii.org/trunk/deal.II
tar xzfv dealii-8.3.0.tar.gz
mkdir build
cd build
cmake ../dealii-8.3.0 -DP4EST_DIR=$ArcOn_DIR/p4est -DPETSC-DIR=$TACC_PETSC_DIR -DCMAKE_INSTALL_PREFIX=$ArcOn_DIR/trigger -DDEAL_II_WITH_THREADS=OFF -DDEAL_II_WITH_BOOST=ON -DBOOST_DIR=$TACC_BOOST_DIR
#cmake ../dealii -DP4EST_DIR=$ArcOn_DIR/p4est -DPETSC-DIR=$PETSC_DIR -DCMAKE_INSTALL_PREFIX=$ArcOn_DIR/trigger -DDEAL_II_WITH_THREADS=OFF
#-DDEAL_II_WITH_METIS=ON --DMETIS_DIR=$PETSC_DIR
#-DDEAL_II_WITH_HDF5=ON -DDEAL_II_WITH_NETCDF=ON
# make install
chmod -R g+rwX .
#make install
make -j16 install
#make -j16 setup_tests
#ctest -j16
cd ..
#source .bashrc_local
fi
if [ $Machine = linux ] ; then
echo "Building for debian-based linux systems"
export CC=mpicc
export CXX=mpicxx
export FC=mpif90
export ArcOn_DIR=`pwd`
# First, we will unpack the parallel adaptive mesh refinement forest (a.k.a. 'p4est') for parallel decomposition
bash p4est-setup.sh p4est-0.3.4.2.tar.gz $ArcOn_DIR/p4est
cd $ArcOn_DIR
# Let's build petsc now, and remember also to add these (PETSC_DIR, PETSC_ARCH, and LD_LIBRARY_PATH) to your bashrc or .bashrc_local for initialization
tar xzfv petsc-3.4.4.tar.gz
export PETSC_DIR=$ArcOn_DIR/petsc-3.4.4
export PETSC_ARCH=gcc-MPICH2-cxx-opt
#export PETSC_ARCH=intel-13.0.2.146-MVAPICH2-1.9a2-cxx-opt
cd $PETSC_DIR
./configure --with-shared-libraries --with-debugging=false \
--COPTFLAGS='-O3' --CXXOPTFLAGS='-O3' --FOPTFLAGS='-O3' \
--with-clanguage=C++ --with-shared-libraries \
--with-mumps=true --download-mumps=1 \
--with-metis=true --download-metis=1 \
--with-parmetis=true --download-parmetis=1 \
--with-superlu=true --download-superlu=1 \
--with-blacs=true --download-blacs=1 \
--with-scalapack=true --download-scalapack=1 \
--with-hypre=true --download-hypre=1 \
--with-f-blas-lapack --download-f-blas-lapack
make clean
make all
make test
cd ..
chmod -R g+rwX $PETSC_DIR
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ArcOn_DIR/petsc-3.4.4/$PETSC_ARCH/lib
#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ArcOn_DIR/petsc-3.4.4/intel-13.0.2.146-MVAPICH2-1.9a2-cxx-opt/lib
# We can use a bundled deal.ii
# tar xzfv deal.II.tar.gz
#tar xzfv deal.II-8.0.0.tar.gz
# tar xzfv deal.II-7.3.0.tar.gz
# or just checkout the newest svn
git clone https://github.com/dealii/dealii.git
#svn checkout https://svn.dealii.org/trunk/deal.II
mkdir build
cd build
cmake ../dealii -DP4EST_DIR=$ArcOn_DIR/p4est -DPETSC-DIR=$PETSC_DIR -DCMAKE_INSTALL_PREFIX=$ArcOn_DIR/trigger -DDEAL_II_WITH_THREADS=OFF -DDEAL_II_WITH_BOOST=ON -DBOOST_DIR=$TACC_BOOST_DIR
#cmake ../dealii -DP4EST_DIR=$ArcOn_DIR/p4est -DPETSC-DIR=$PETSC_DIR -DCMAKE_INSTALL_PREFIX=$ArcOn_DIR/trigger -DDEAL_II_WITH_THREADS=OFF
#-DDEAL_II_WITH_METIS=ON --DMETIS_DIR=$PETSC_DIR
#-DDEAL_II_WITH_HDF5=ON -DDEAL_II_WITH_NETCDF=ON
# make install
chmod -R g+rwX .
make install
#make -j16 install
#make -j16 setup_tests
#ctest -j16
cd ..
fi
if [ $Machine = Mac ] ; then
echo "Building for OS X"
export CC=mpicc
export CXX=mpicxx
export FC=mpif90
export ArcOn_DIR=`pwd`
# First, we will unpack the parallel adaptive mesh refinement forest (a.k.a. 'p4est') for parallel decomposition
bash p4est-setup.sh p4est-0.3.4.2.tar.gz $ArcOn_DIR/p4est
cd $ArcOn_DIR
# Let's build petsc now, and remember also to add these (PETSC_DIR, PETSC_ARCH, and LD_LIBRARY_PATH) to your bashrc or .bashrc_local for initialization
tar xzfv petsc-3.4.4.tar.gz
export PETSC_DIR=$ArcOn_DIR/petsc-3.4.4
export PETSC_ARCH=clang-openmp-cxx-opt
#CMAKE_CXX_COMPILER=clang++
#export PETSC_ARCH=intel-13.0.2.146-MVAPICH2-1.9a2-cxx-opt
cd $PETSC_DIR
./configure --with-shared-libraries --with-debugging=false \
--COPTFLAGS='-O3' --CXXOPTFLAGS='-O3' --FOPTFLAGS='-O3' \
CC=$CC CXX=$CXX FC=$FC \
--with-clanguage=C++ --with-shared-libraries \
--with-mumps=true --download-mumps=1 \
--with-metis=true --download-metis=1 \
--with-parmetis=true --download-parmetis=1 \
--with-superlu=true --download-superlu=1 \
--with-blacs=true --download-blacs=1 \
--with-scalapack=true --download-scalapack=1 \
--with-hypre=true --download-hypre=1 \
--with-f-blas-lapack --download-f-blas-lapack=1
make clean
make all
make test
cd ..
chmod -R g+rwX $PETSC_DIR
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ArcOn_DIR/petsc-3.4.4/$PETSC_ARCH/lib
#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ArcOn_DIR/petsc-3.4.4/intel-13.0.2.146-MVAPICH2-1.9a2-cxx-opt/lib
# We can use a bundled deal.ii
# tar xzfv deal.II.tar.gz
#tar xzfv deal.II-8.0.0.tar.gz
# tar xzfv deal.II-7.3.0.tar.gz
# or just checkout the newest svn
git clone https://github.com/dealii/dealii.git
git checkout bc3070ea2409af65bb870a98b303b135fc121c8c
#06cc91dc0df1c3acc02f9c90ca781b14ff8012a8
#svn checkout https://svn.dealii.org/trunk/deal.II
mkdir build
cd build
#export BOOST_DIR=/usr/local/Cellar/boost/1.57.0
cmake ../dealii -DP4EST_DIR=$ArcOn_DIR/p4est -DPETSC-DIR=$PETSC_DIR/ -DCMAKE_INSTALL_PREFIX=$ArcOn_DIR/trigger -DDEAL_II_WITH_THREADS=OFF -DDEAL_II_WITH_PETSC=ON -DDEAL_II_WITH_CXX11=OFF
#-DDEAL_II_WITH_BOOST=ON -DBOOST_DIR=$BOOST_DIR
#cmake ../dealii -DP4EST_DIR=$ArcOn_DIR/p4est -DPETSC-DIR=$PETSC_DIR -DCMAKE_INSTALL_PREFIX=$ArcOn_DIR/trigger -DDEAL_II_WITH_THREADS=OFF
#-DDEAL_II_WITH_METIS=ON --DMETIS_DIR=$PETSC_DIR
#-DDEAL_II_WITH_HDF5=ON -DDEAL_II_WITH_NETCDF=ON
# make install
chmod -R g+rwX .
make -j8 install
#make -j16 install
#make -j16 setup_tests
#ctest -j16
cd ..
fi