forked from robhuls/calculix_build
-
Notifications
You must be signed in to change notification settings - Fork 1
/
install
executable file
·89 lines (82 loc) · 2.65 KB
/
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
#!/bin/sh
# You must run this in ~/build_calculix (hard coded in the ARPACK patch)
# You will need gcc-fortran, cpio, freeglut, glu
export PROGSDIR=$HOME/calculix
export PATH=$PROGSDIR/bin:$PATH
export LD_LIBRARY_PATH=$PROGSDIR/lib:$LD_LIBRARY_PATH
export INCLUDE=$PROGSDIR/include:$INCLUDE
export LDFLAGS="-L$PROGSDIR/lib"
export CPPFLAGS="-I$PROGSDIR/include"
export MY_LIB=$PROGSDIR/lib
export MY_INCLUDE=$PROGSDIR/include
export HOME_BUILD=$PWD
mkdir -p $PROGSDIR
mkdir -p $PROGSDIR/bin
mkdir -p $PROGSDIR/lib
mkdir -p $PROGSDIR/doc
mkdir -p $PROGSDIR/include
# Spooles as solver for CCX
wget -c --tries=1000000 http://www.netlib.org/linalg/spooles/spooles.2.2.tgz
mkdir SPOOLES.2.2
cp spooles.2.2.tgz SPOOLES.2.2
cd SPOOLES.2.2
tar xzf spooles.2.2.tgz
patch ./Tree/src/makeGlobalLib ../SPOOLES_makeGlobalLib.patch # Fix drawTree
patch Make.inc ../SPOOLES_Make.inc.patch # Fix c compiler location
make lib > ../spooles_make.txt 2> ../spooles_error.txt
cp spooles.a $PROGSDIR/lib
mkdir $PROGSDIR/include/spooles
find . -name '*.h' | cpio -updm $PROGSDIR/include/spooles
cd MT/src
make > ../../../spoolesMT_make.txt 2> ../../../spoolesMT_error.txt
cp spoolesMT.a $PROGSDIR/lib
cd ..
mkdir $PROGSDIR/include/spooles/MT
cp spoolesMT.h $PROGSDIR/include/spooles/MT
cd ../..
rm SPOOLES.2.2 -Rf
rm spooles.2.2.tgz
# Install ARPACK to support CalculiX
echo 'Building ARPACK'
wget -c --tries=1000000 http://www.caam.rice.edu/software/ARPACK/SRC/arpack96.tar.gz
wget -c --tries=1000000 http://www.caam.rice.edu/software/ARPACK/SRC/patch.tar.gz
tar xzf arpack96.tar.gz
tar xzf patch.tar.gz
cd ARPACK
patch ARmake.inc ../ARPACK_ARmake.inc.patch
patch UTIL/second.f ../ARPACK_second.f.patch
make lib > ../ARPACK_make.txt 2> ../ARPACK_error.txt
cp libarpack_linux.a $PROGSDIR/lib
cd ..
rm ARPACK -rf
rm arpack96.tar.gz
rm patch.tar.gz
# CGX from CalculiX
echo 'Installing CGX'
wget -c --tries=1000000 http://www.dhondt.de/cgx_2.11.all.tar.bz2
wget -c --tries=1000000 http://www.dhondt.de/cgx_2.11.pdf
tar xjf cgx_2.11.all.tar.bz2
cd CalculiX/cgx_2.11/src
make > ../../../cgx_make.txt 2> ../../../cgx_error.txt
cp cgx $PROGSDIR/bin
cd ../../..
cp cgx_2.11.pdf $PROGSDIR/doc/
rm CalculiX -Rf
rm cgx_2.11.all.tar.bz2
rm cgx_2.11.pdf
# CCX 2.11 with pardiso and spooles
echo 'Installing CCX 2.11'
wget -c --tries=1000000 http://www.dhondt.de/ccx_2.11.pdf
wget -c --tries=1000000 http://www.dhondt.de/ccx_2.11.src.tar.bz2
tar xjf ccx_2.11.src.tar.bz2
cd CalculiX/ccx_2.11
cd src
cp ../../../ccx_Makefile Makefile
make > ../../../ccx_make.txt 2> ../../../ccx_error.txt
cp ccx_2.11 $PROGSDIR/bin
cp LOGBOOK $PROGSDIR/doc
cd ../../..
cp ccx_2.11.pdf $PROGSDIR/doc
rm CalculiX -Rf
rm ccx_2.11.pdf
rm ccx_2.11.src.tar.bz2