summaryrefslogtreecommitdiff
path: root/math/mcsim/patches/patch-ae
blob: 8aa82a6ce2611db06a28474ecd5add3a692abd72 (plain)
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
$NetBSD: patch-ae,v 1.1.1.1 2000/11/26 23:02:41 jtb Exp $

--- sim/Test_mcsim.orig	Fri Nov 14 15:45:56 1997
+++ sim/Test_mcsim
@@ -1,147 +1,147 @@
 # Run diagnostic tests on several features of the program.
 # results are compared to prepared files.
-one:	
-	@echo
-	@echo ----------
-	@echo
-	@echo '* Testing MCSim: this could take a few minutes.'
-	@echo '* Creating logfile mcsim.log'
-	@touch mcsim.log
-	@date >> mcsim.log
-#
-	@echo
-	@echo ----------
-	@echo
-	@echo Testing with the tetrachloroethylene model
-	@mod perc.model
-	@gcc -I . -Wall -ansi -c model.c -o model.o  > /dev/null
-	@gcc -o mcsim *.o -lm
-	@echo
+#one:	
+	echo
+	echo ----------
+	echo
+	echo '* Testing MCSim: this could take a few minutes.'
+	echo '* Creating logfile mcsim.log'
+	touch mcsim.log
+	date >> mcsim.log
+#
+	echo
+	echo ----------
+	echo
+	echo Testing with the tetrachloroethylene model
+	../mod/mod perc.model
+	cc -I . -Wall -ansi -c model.c -o model.o  > /dev/null
+	cc -o mcsim *.o -lm
+	echo
 #
 # perc.lsodes.in    
-	@echo Testing Lsodes with perc.lsodes.in ...
-	@chmod -w perc.lsodes.in perc.lsodes.out 
-	@mcsim perc.lsodes.in sim.out >> mcsim.log
-	@(diff sim.out perc.lsodes.out > .tmp) && echo '-PASSED-'
+	echo Testing Lsodes with perc.lsodes.in ...
+	chmod -w perc.lsodes.in perc.lsodes.out 
+	./mcsim perc.lsodes.in sim.out >> mcsim.log
+	(diff sim.out perc.lsodes.out > .tmp) && echo '-PASSED-'
 #
 # perc.ndoses.in
-	@echo Testing NDoses with perc.ndoses.in ...
-	@chmod -w perc.ndoses.in perc.ndoses.out 
-	@mcsim perc.ndoses.in sim.out >> mcsim.log
-	@(diff sim.out perc.ndoses.out > .tmp) && echo '-PASSED-'
+	echo Testing NDoses with perc.ndoses.in ...
+	chmod -w perc.ndoses.in perc.ndoses.out 
+	./mcsim perc.ndoses.in sim.out >> mcsim.log
+	(diff sim.out perc.ndoses.out > .tmp) && echo '-PASSED-'
 #
 # perc.mtc.in
-	@echo Testing Monte Carlo with perc.mtc.in ...
-	@chmod -w perc.mtc.in perc.mtc.out 
-	@mcsim perc.mtc.in sim.out >> mcsim.log
-	@(diff sim.out perc.mtc.out > .tmp) && echo '-PASSED-'
+	echo Testing Monte Carlo with perc.mtc.in ...
+	chmod -w perc.mtc.in perc.mtc.out 
+	./mcsim perc.mtc.in sim.out >> mcsim.log
+	(diff sim.out perc.mtc.out > .tmp) && echo '-PASSED-'
 #
 # perc.setpoint.in
-	@echo Testing Set Point run with perc.setpoint.in ...
-	@chmod -w perc.setpoint.dat perc.setpoint.in perc.setpoint.out 
-	@mcsim perc.setpoint.in sim.out >> mcsim.log
-	@(diff sim.out perc.setpoint.out > .tmp) && echo '-PASSED-'
-#
-	@echo
-	@echo ----------
-	@echo
-	@echo Testing with the 1 compartment model
-	@mod 1cpt.model
-	@gcc -I . -Wall -ansi -c model.c -o model.o  > /dev/null
-	@gcc -o mcsim *.o -lm
-	@echo
+	echo Testing Set Point run with perc.setpoint.in ...
+	chmod -w perc.setpoint.dat perc.setpoint.in perc.setpoint.out 
+	./mcsim perc.setpoint.in sim.out >> mcsim.log
+	(diff sim.out perc.setpoint.out > .tmp) && echo '-PASSED-'
+#
+	echo
+	echo ----------
+	echo
+	echo Testing with the 1 compartment model
+	../mod/mod 1cpt.model
+	cc -I . -Wall -ansi -c model.c -o model.o  > /dev/null
+	cc -o mcsim *.o -lm
+	echo
 #
 # 1cpt_no_noise.in
-	@echo Testing Lsodes non random output with 1cpt_no_noise.in ...
-	@chmod -w 1cpt_no_noise.in 1cpt_no_noise.out
-	@mcsim 1cpt_no_noise.in sim.out >> mcsim.log
-	@(diff sim.out 1cpt_no_noise.out > .tmp) && echo '-PASSED-'
+	echo Testing Lsodes non random output with 1cpt_no_noise.in ...
+	chmod -w 1cpt_no_noise.in 1cpt_no_noise.out
+	./mcsim 1cpt_no_noise.in sim.out >> mcsim.log
+	(diff sim.out 1cpt_no_noise.out > .tmp) && echo '-PASSED-'
 #
 # 1cpt_w._noise.in
-	@echo Testing Lsodes randomized output with 1cpt_w._noise.in ...
-	@chmod -w 1cpt_w._noise.in 1cpt_w._noise.out
-	@mcsim 1cpt_w._noise.in sim.out >> mcsim.log
-	@(diff sim.out 1cpt_w._noise.out > .tmp) && echo '-PASSED-'
+	echo Testing Lsodes randomized output with 1cpt_w._noise.in ...
+	chmod -w 1cpt_w._noise.in 1cpt_w._noise.out
+	./mcsim 1cpt_w._noise.in sim.out >> mcsim.log
+	(diff sim.out 1cpt_w._noise.out > .tmp) && echo '-PASSED-'
 #
 # 1cpt.MCMC1.in
-	@echo Testing MCMC set uncertainties with 1cpt.MCMC1.in ...
-	@chmod -w 1cpt.MCMC1.in 1cpt.MCMC1.out
-	@mcsim 1cpt.MCMC1.in sim.out >> mcsim.log
-	@(diff sim.out 1cpt.MCMC1.out > .tmp) && echo '-PASSED-'
+	echo Testing MCMC set uncertainties with 1cpt.MCMC1.in ...
+	chmod -w 1cpt.MCMC1.in 1cpt.MCMC1.out
+	./mcsim 1cpt.MCMC1.in sim.out >> mcsim.log
+	(diff sim.out 1cpt.MCMC1.out > .tmp) && echo '-PASSED-'
 #
 # 1cpt.MCMC2.in
-	@echo Testing MCMC estimated uncertainties with 1cpt.MCMC2.in ...
-	@chmod -w 1cpt.MCMC2.in 1cpt.MCMC2.out
-	@mcsim 1cpt.MCMC2.in sim.out >> mcsim.log
-	@(diff sim.out 1cpt.MCMC2.out > .tmp) && echo '-PASSED-'
+	echo Testing MCMC estimated uncertainties with 1cpt.MCMC2.in ...
+	chmod -w 1cpt.MCMC2.in 1cpt.MCMC2.out
+	./mcsim 1cpt.MCMC2.in sim.out >> mcsim.log
+	(diff sim.out 1cpt.MCMC2.out > .tmp) && echo '-PASSED-'
 #
 # 1cpt.MCMC3.in
-	@echo Testing MCMC print every 2 iterations with 1cpt.MCMC3.in ...
-	@chmod -w 1cpt.MCMC3.in 1cpt.MCMC3.out
-	@mcsim 1cpt.MCMC3.in sim.out >> mcsim.log
-	@(diff sim.out 1cpt.MCMC3.out > .tmp) && echo '-PASSED-'
+	echo Testing MCMC print every 2 iterations with 1cpt.MCMC3.in ...
+	chmod -w 1cpt.MCMC3.in 1cpt.MCMC3.out
+	./mcsim 1cpt.MCMC3.in sim.out >> mcsim.log
+	(diff sim.out 1cpt.MCMC3.out > .tmp) && echo '-PASSED-'
 #
 # 1cpt.MCMC4.in
-	@echo Testing MCMC estimated bounds on F with 1cpt.MCMC4.in ...
-	@chmod -w 1cpt.MCMC4.in 1cpt.MCMC4.out
-	@mcsim 1cpt.MCMC4.in sim.out >> mcsim.log
-	@(diff sim.out 1cpt.MCMC4.out > .tmp) && echo '-PASSED-'
+	echo Testing MCMC estimated bounds on F with 1cpt.MCMC4.in ...
+	chmod -w 1cpt.MCMC4.in 1cpt.MCMC4.out
+	./mcsim 1cpt.MCMC4.in sim.out >> mcsim.log
+	(diff sim.out 1cpt.MCMC4.out > .tmp) && echo '-PASSED-'
 #
 # 1cpt.MCMC5.in
-	@echo Testing MCMC model-computed SDs with 1cpt.MCMC5.in ...
-	@chmod -w 1cpt.MCMC5.in 1cpt.MCMC5.out
-	@mcsim 1cpt.MCMC5.in sim.out >> mcsim.log
-	@(diff sim.out 1cpt.MCMC5.out > .tmp) && echo '-PASSED-'
-#
-	@echo
-	@echo ----------
-	@echo
-	@echo Testing with the linear model
-	@mod linear.model
-	@gcc -I . -Wall -ansi -c model.c -o model.o  > /dev/null
-	@gcc -o mcsim *.o -lm
-	@echo
+	echo Testing MCMC model-computed SDs with 1cpt.MCMC5.in ...
+	chmod -w 1cpt.MCMC5.in 1cpt.MCMC5.out
+	./mcsim 1cpt.MCMC5.in sim.out >> mcsim.log
+	(diff sim.out 1cpt.MCMC5.out > .tmp) && echo '-PASSED-'
+#
+	echo
+	echo ----------
+	echo
+	echo Testing with the linear model
+	../mod/mod linear.model
+	cc -I . -Wall -ansi -c model.c -o model.o  > /dev/null
+	cc -o mcsim *.o -lm
+	echo
 #
 # linear.in
-	@echo Testing Lsodes with linear.in ...
-	@chmod -w linear.in linear.out 
-	@mcsim linear.in sim.out >> mcsim.log
-	@(diff sim.out linear.out > .tmp) && echo '-PASSED-'
+	echo Testing Lsodes with linear.in ...
+	chmod -w linear.in linear.out 
+	./mcsim linear.in sim.out >> mcsim.log
+	(diff sim.out linear.out > .tmp) && echo '-PASSED-'
 #
 # linear.MCMC1.in
-	@echo Testing MCMC 1 experiment with linear.MCMC1.in ...
-	@chmod -w linear.MCMC1.in linear.MCMC1.out 
-	@mcsim linear.MCMC1.in sim.out >> mcsim.log
-	@(diff sim.out linear.MCMC1.out > .tmp) && echo '-PASSED-'
+	echo Testing MCMC 1 experiment with linear.MCMC1.in ...
+	chmod -w linear.MCMC1.in linear.MCMC1.out 
+	./mcsim linear.MCMC1.in sim.out >> mcsim.log
+	(diff sim.out linear.MCMC1.out > .tmp) && echo '-PASSED-'
 #
 # linear.MCMC2.in
-	@echo Testing MCMC 1 repeated experiment with linear.MCMC2.in ...
-	@chmod -w linear.MCMC2.in linear.MCMC2.out 
-	@mcsim linear.MCMC2.in sim.out >> mcsim.log
-	@(diff sim.out linear.MCMC2.out > .tmp) && echo '-PASSED-'
+	echo Testing MCMC 1 repeated experiment with linear.MCMC2.in ...
+	chmod -w linear.MCMC2.in linear.MCMC2.out 
+	./mcsim linear.MCMC2.in sim.out >> mcsim.log
+	(diff sim.out linear.MCMC2.out > .tmp) && echo '-PASSED-'
 #
 # linear.H.MCMC1.in
-	@echo Testing MCMC hierarchical linear model, 10 exps with \
+	echo Testing MCMC hierarchical linear model, 10 exps with \
          linear.H.MCMC1.in ...
-	@chmod -w linear.H.MCMC1.in linear.H.MCMC1.out 
-	@mcsim linear.H.MCMC1.in sim.out >> mcsim.log
-	@(diff sim.out linear.H.MCMC1.out > .tmp) && echo '-PASSED-'
+	chmod -w linear.H.MCMC1.in linear.H.MCMC1.out 
+	./mcsim linear.H.MCMC1.in sim.out >> mcsim.log
+	(diff sim.out linear.H.MCMC1.out > .tmp) && echo '-PASSED-'
 #
 # linear.H.MCMC2.in
-	@echo Testing MCMC hierarchical linear model, B1.1 set with \
+	echo Testing MCMC hierarchical linear model, B1.1 set with \
          linear.H.MCMC2.in
-	@chmod -w linear.H.MCMC2.in linear.H.MCMC2.out 
-	@mcsim linear.H.MCMC2.in sim.out >> mcsim.log
-	@(diff sim.out linear.H.MCMC2.out > .tmp) && echo '-PASSED-'
+	chmod -w linear.H.MCMC2.in linear.H.MCMC2.out 
+	./mcsim linear.H.MCMC2.in sim.out >> mcsim.log
+	(diff sim.out linear.H.MCMC2.out > .tmp) && echo '-PASSED-'
 #
 # linear.H.MCMC3.in
-	@echo Testing MCMC hierarchical model, restart file with \
+	echo Testing MCMC hierarchical model, restart file with \
          linear.H.MCMC3.in
-	@chmod -w linear.H.MCMC3.in linear.H.MCMC3.out 
-	@mcsim linear.H.MCMC3.in sim.out >> mcsim.log
-	@(diff sim.out linear.H.MCMC3.out > .tmp) && echo '-PASSED-'
-#
-	@echo
-	@echo Hourra!
-	@echo MCSim passed all tests.
+	chmod -w linear.H.MCMC3.in linear.H.MCMC3.out 
+	./mcsim linear.H.MCMC3.in sim.out >> mcsim.log
+	(diff sim.out linear.H.MCMC3.out > .tmp) && echo '-PASSED-'
+#
+	echo
+	echo Hourra!
+	echo MCSim passed all tests.