forked from bjornwallner/ProQDock
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompileF
executable file
·71 lines (55 loc) · 2.17 KB
/
compileF
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
#!/bin/bash -x
upath=`echo ${0/compileF/}`
path=`readlink -f $upath`
echo $path
#cp $path/EXEC/resGbur.f.install $path/EXEC/resGbur.f
#sed "s%INSTALL_PATH%$path%" $path/EXEC/resGbur.f.install > $path/EXEC/resGbur.f
#sed "s%INSTALL_PATH%$path%" $path/EXEC/contpref20CB.f.install > $path/EXEC/contpref20CB.f
fortcomp=$1
if [ "$#" == "0" ]; then
echo "Fortran90 compiler not specified"
echo "Default fortran 90 compiler: ifort"
fortcomp=ifort
fi
chmod +x $path/ProQDock
#chs=`which $fortcomp`
#echo $chs
#if [[ $chs == *"$fortcomp"* ]]; then
if hash $fortcomp 2>/dev/null; then
echo "$fortcomp FOUND"
else
echo "$fortcomp NOT FOUND to be installed"
exit;
fi
rm -f $path/EXEC/*.exe
$fortcomp $path/EXEC/globuleN.f -o $path/EXEC/glbN.exe &> compile.log
$fortcomp $path/EXEC/metsph.f -o $path/EXEC/msph.exe &>> compile.log
$fortcomp $path/EXEC/intcont6.f -o $path/EXEC/intcont6.exe &>> compile.log
$fortcomp $path/EXEC/accall.f -o $path/EXEC/accall.exe &>> compile.log
$fortcomp $path/EXEC/delasa.f -o $path/EXEC/delasa.exe &>> compile.log
$fortcomp $path/EXEC/hdist.f -o $path/EXEC/hdist.exe &>> compile.log
$fortcomp $path/EXEC/buryasa.f -o $path/EXEC/buryasa.exe &>> compile.log
$fortcomp $path/EXEC/intcont.f -o $path/EXEC/intcont.exe &>> compile.log
$fortcomp $path/EXEC/fetchintsurf.f -o $path/EXEC/fetchds.exe &>> compile.log
$fortcomp $path/EXEC/corrcoefPsplw.f -o $path/EXEC/ccpsw.exe &>> compile.log
$fortcomp $path/EXEC/metcoord.f -o $path/EXEC/mcoord.exe &>> compile.log
$fortcomp $path/EXEC/contpref20CB.f -o $path/EXEC/contpref20CB.exe &>> compile.log
gfortran $path/EXEC/linkdenN.f -o $path/MAINEXEC/ldN.exe &>> compile.log
$fortcomp $path/EXEC/resGbur.f -o $path/EXEC/rGb.exe &>> compile.log
$fortcomp $path/EXEC/intf2surf.f -o $path/EXEC/isurf.exe &>> compile.log
$fortcomp $path/EXEC/dsl.f -o $path/EXEC/dsl.exe &>> compile.log
Nfort=`ls $path/EXEC/*.f | wc -l`
#Nfort=`echo ${Nfort}-1 | bc -l`
echo $Nfort
Nexec1=`ls $path/EXEC/*.exe | wc -l`
Nexec2=`ls $path/MAINEXEC/*.exe | wc -l`
Nexec=`echo $Nexec1+$Nexec2 | bc -l`
echo $Nexec
if [ "$Nexec" == "$Nfort" ] && [ -e "$path/MAINEXEC/ldN.exe" ];
then
echo "Compilation Successful"
fi
echo "Compiling EDTsurf"
cd EDTSurf
make
cd ..