-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcompileall
executable file
·94 lines (94 loc) · 2.94 KB
/
compileall
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
#!/usr/bin/ksh
#
# Note, if ksh is not available, you can use
# another shell like zsh
#
##################################################
##################################################
# This script will compile all executable programs
# that are required by the FMM based tomographic
# inversion routine. Additional programs for
# plotting, generating synthetic data etc. are
# also compiled. See accompanying documentation
# for further details
##################################################
##################################################
#
# YOU MUST SPECIFY A FORTRAN 90 COMPILER!!!!
# Compiler options can be included at this stage
# if deemed necessary by the user.
#
##################################################
F90=ifort
##################################################
# NOTE: Compilation of the code "fm3d", which
# solves the forward problem of data prediction, is
# also carried out by this script. However, you
# must ensure that the Makefile in the subdirectory
# "fmcode" points to an appropriate Fotran 90
# compiler. In addition, "fm3d" makes use of external
# traveltime tables to compute teleseismic
# traveltimes to the edge of the model region.
# These tables are computed by a separate program
# in the subdirectory "fmcode/aktimes". Edit the
# Makefile in this directory so that it points to
# an appropriate Fortran compiler.
##################################################
#
# Enter the directory called "source" and compile
# all programs.
#
##################################################
cd source
$F90 -o arraygen arraygen.f90
$F90 -o frechgen frechgen.f90
$F90 -o gmtslice gmtslice.f90
$F90 -o grid3dg grid3dg.f90
$F90 -o invert3d invert3d.f90
$F90 -o moddata moddata.f90
$F90 -o obsdata obsdata.f90
$F90 -o residuals residuals.f90
$F90 -o synthdata synthdata.f90
##################################################
#
# Move all executables to directory ../bin
#
##################################################
mv arraygen frechgen gmtslice ../bin
mv grid3dg invert3d moddata ../bin
mv obsdata residuals synthdata ../bin
##################################################
#
# Enter subdirectory "fmcode", compile
# "fm3d", and move it to ../bin directory. Copy
# input file to ../sources/inputfiles
#
##################################################
cd ../fmcode
make fm3d
make clean
mv fm3d ../bin
cp mode_set.in ../source/inputfiles
##################################################
#
# Enter subdirectory "aktimes" and compile programs
# for generating traveltime tables
#
##################################################
cd aktimes
make all
make clean
chmod u+x remodl setbrn
./remodl > /dev/null
./setbrn > /dev/null
##################################################
#
# Copy output binary traveltime tables to
# ../../source/inputfiles
#
##################################################
cp ak135.tbl ak135.hed ../../source/inputfiles
##################################################
cd ../..
echo " "
echo "Compilation complete"