-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
176 lines (143 loc) · 4 KB
/
Makefile
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
default : GITM
include Makefile.def
ABDIR = srcSphereAB
EIEDIR = ${EMPIRICALIEDIR}
EUADIR = ${EMPIRICALUADIR}
IODIR = ${DATAREADINDICESDIR}
MAINDIR = src
GLDIR = srcGlow
PLANET=earth
src/ModSize.f90:
cp src/ModSize.f90.orig src/ModSize.f90
INSTALLFILES = src/Makefile.DEPEND \
src/Makefile.RULES \
srcInterface/Makefile.DEPEND
install: src/ModSize.f90
touch ${INSTALLFILES}
cd src; make DYNAMIC
#
# General Housekeeping
#
NOMPI:
@echo "will make NOMPI"
@echo ${NOMPIDIR}
@cd ${NOMPIDIR}; make LIB
GITM:
@cd ${SHAREDIR}; make LIB
@cd $(ABDIR); make LIB
@cd $(EIEDIR); make LIB
@cd ${EUADIR}; make LIB
@cd $(IODIR); make LIB
@cd $(GLDIR); make LIB
@cd $(MAINDIR); make GITM
POST:
@cd $(MAINDIR); make POST
GITM2 = ${DIR}/UA/GITM2
LIB:
cd $(ABDIR) ; make LIB
cd $(GLDIR) ; make LIBPREV=${GITM2}/${ABDIR}/libSphere.a LIBADD
cd $(MAINDIR) ; make LIBPREV=${GITM2}/${GLDIR}/libUPTOGL.a libGITM.a
cd srcInterface ; make LIBPREV=${GITM2}/${MAINDIR}/libUA.a LIB
nompirun:
make GITM
cd ${RUNDIR}; ./GITM.exe
clean:
@touch ${INSTALLFILES}
@cd $(ABDIR); make clean
@cd $(MAINDIR); make clean
@cd $(GLDIR); make clean
@cd srcInterface;make clean
@(if [ -d share ]; then cd share; make clean; fi);
@(if [ -d util ]; then cd util; make clean; fi);
distclean:
./Config.pl -uninstall
allclean:
@touch ${INSTALLFILES}
@cd $(ABDIR); make clean
@cd $(MAINDIR); make distclean
@cd srcInterface;make distclean
rm -f *~ srcData/UAM.in
#
# Create run directories
#
rundir:
mkdir -p ${RUNDIR}/UA
@(cd ${RUNDIR}; \
if [ ! -e "EIE/README" ]; then \
ln -s ${EMPIRICALIEDIR}/data EIE;\
fi;)
cd ${RUNDIR}; rm -f ./PostGITM.exe ; ln -s ${BINDIR}/PostProcess.exe ./PostGITM.exe
cd ${RUNDIR}/UA; \
mkdir restartOUT data DataIn; \
ln -s restartOUT restartIN; \
ln -s ${BINDIR}/pGITM .; \
ln -s ${UADIR}/srcData/* DataIn; rm -f DataIn/CVS; \
ln -s ${UADIR}/data/* DataIn; rm -f DataIn/CVS
@(if [ "$(STANDALONE)" != "NO" ]; then \
cd ${RUNDIR} ; \
ln -s ${BINDIR}/GITM.exe . ; \
cp UA/DataIn/UAM.in . ; \
touch core ; chmod 444 core ; \
ln -s UA/* .; \
fi);
TESTDIR = run_test
MPIRUN = mpirun -np 2
test:
echo "GITM2 is not tested nightly" > notest.diff
test_ignored:
-@(make test_earth)
-@(make test_mars)
ls -l *.diff
test_earth:
@echo "test_earth_compile..." > test_earth.diff
make test_earth_compile
@echo "test_earth_rundir..." >> test_earth.diff
make test_earth_rundir
@echo "test_earth_run..." >> test_earth.diff
make test_earth_run
@echo "test_earth_check..." >> test_earth.diff
make test_earth_check
test_earth_compile:
./Config.pl -Earth
./Config.pl -g=9,9,50,4
make GITM
test_earth_rundir:
rm -rf ${TESTDIR}
make rundir RUNDIR=${TESTDIR} STANDALONE=YES UADIR=`pwd`
cd ${TESTDIR}; cp UA/DataIn/UAM.in.test.noAPEX UAM.in
test_earth_run:
cd ${TESTDIR}; ${MPIRUN} ./GITM.exe > runlog
test_earth_check:
-(${SCRIPTDIR}/DiffNum.pl -b -r=1e-5 \
${TESTDIR}/UA/data/log00000002.dat \
srcData/log00000002.dat.noAPEX >& test_earth.diff)
ls -l test_earth.diff
test_mars:
@echo "test_mars_compile..." > test_mars.diff
make test_mars_compile
@echo "test_mars_rundir..." >> test_mars.diff
make test_mars_rundir
@echo "test_mars_run..." >> test_mars.diff
make test_mars_run
@echo "test_mars_check..." >> test_mars.diff
make test_mars_check
test_mars_compile:
./Config.pl -Mars
./Config.pl -g=1,1,90,1
make GITM
test_mars_rundir:
rm -rf ${TESTDIR}
make rundir RUNDIR=${TESTDIR} STANDALONE=YES UADIR=`pwd`
cd ${TESTDIR}; cp UA/DataIn/UAM.in.Mars UAM.in
test_mars_run:
cd ${TESTDIR}; ${MPIRUN} ./GITM.exe > runlog
test_mars_check:
-(${SCRIPTDIR}/DiffNum.pl -b -r=1e-5 \
${TESTDIR}/UA/data/log00000002.dat \
srcData/log00000002.dat.Mars >& test_mars.diff)
ls -l test_mars.diff
dist:
make distclean
tar cvzf gitm_`date "+%y%m%d"`.tgz Makefile* Config.pl get_info.pl \
share util src srcData srcDoc srcGlow srcIDL srcInterface \
srcPython srcMake srcSphereAB srcUser Copyright