visit-build-open 10 KB
Newer Older
hrchilds's avatar
hrchilds committed
1
2
3
4
5
6
7
8
9
#!/bin/sh
#-----------------------------------------------------------------------
#
# VISIT-BUILD-OPEN - Build the visit distributions on the open network.
#
# Author: Eric Brugger
# Date:   October 27, 2000
#
# Usage:
hrchilds's avatar
hrchilds committed
10
#    visit-build-open -d <distribution>
hrchilds's avatar
hrchilds committed
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
#
#-----------------------------------------------------------------------

test=no

user=`whoami`

#
# Set the user e-mail address.
#
emailName=brugger1@llnl.gov
case $user in
   ahern)
      emailName=ahern1@llnl.gov
      ;;
   kbonnell)
      emailName=bonnell2@llnl.gov
      ;; 
   brugger)
      emailName=brugger1@llnl.gov
      ;;
   childs)
      emailName=childs3@llnl.gov
      ;;
   jennings)
      emailName=jennings4@llnl.gov
      ;;
   meredith)
      emailName=meredith6@llnl.gov
      ;;
   murguia)
      emailName=murguia1@llnl.gov
      ;;
   whitlocb)
      emailName=whitlock2@llnl.gov
      ;;
esac

#
# Parse the execute line, providing default values for error checking.
#
kickit=true
sunspot=true
hrchilds's avatar
hrchilds committed
54
hyper=false
hrchilds's avatar
hrchilds committed
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
gps=true
riptide=true
frost=true

dist=undefined

#
# The loop is executed once for each symbol on the execute line.  This means
# that $1 may be blank for later executions of the loop if any "shift 2"
# commands are executed.  The variable abc is not used in the loop.  
#
for abc
do
   case $1 in
      -none)
         kickit=false
         sunspot=false
         hyper=false
         gps=false
         riptide=false
         frost=false
         shift
         ;;
      -kickit)
         kickit=false
         shift
         ;;
      +kickit)
         kickit=true
         shift
         ;;
      -sunspot)
         sunspot=false
         shift
         ;;
      +sunspot)
         sunspot=true
         shift
         ;;
      -hyper)
         hyper=false
         shift
         ;;
      +hyper)
         hyper=true
         shift
         ;;
      -gps)
         gps=false
         shift
         ;;
      +gps)
         gps=true
         shift
         ;;
      -riptide)
         riptide=false
         shift
         ;;
      +riptide)
         riptide=true
         shift
         ;;
      -frost)
         frost=false
         shift
         ;;
      +frost)
         frost=true
         shift
         ;;
      -d)
         dist=$2
         shift 2
         ;;
   esac
done

#
hrchilds's avatar
hrchilds committed
134
# Check that the distribution name was provided.
hrchilds's avatar
hrchilds committed
135
136
137
#
if [ $dist = undefined ]
then
hrchilds's avatar
hrchilds committed
138
   echo "Usage: [-none] [-<machine name>] -d <distribution>"
hrchilds's avatar
hrchilds committed
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
   exit
fi

#
# Check that the distribution exists.
#
distfile=$dist.tar.gz
if [ ! -f $distfile ]
then
   echo "Distribution file doesn't exist."
   exit
fi

#
# Build on kickit.
#
rm -f kickit
cat <<EOF > kickit
#!/bin/sh
if test ! -e /var/tmp/$user ; then
   mkdir /var/tmp/$user
fi
if test ! -e /var/tmp/$user/kickit ; then
   mkdir /var/tmp/$user/kickit
fi
rm -rf /var/tmp/$user/kickit/visitbuild
mkdir /var/tmp/$user/kickit/visitbuild
mv kickit_$dist.tar.gz /var/tmp/$user/kickit/visitbuild/$dist.tar.gz
cd /var/tmp/$user/kickit/visitbuild
gunzip -c $dist.tar.gz | tar xvf - > buildlog 2>&1
cd $dist
hrchilds's avatar
hrchilds committed
170
171
ver=\`cat VERSION\`
ver2=\`echo \$ver | tr "." "_"\`
hrchilds's avatar
hrchilds committed
172
173
env CXXFLAGS=-O2 ./configure >> ../buildlog 2>&1
make -j 4 >> ../buildlog 2>&1
hrchilds's avatar
hrchilds committed
174
175
clearcase_bin/visit-bin-dist >> ../buildlog 2>&1
mv visit\$ver2.linux.tar.gz ..
hrchilds's avatar
hrchilds committed
176
177
178
179
180
make distclean >> ../buildlog 2>&1
env CXXFLAGS="-O2 -DFAKE_EXCEPTIONS" ./configure >> ../buildlog 2>&1
make -j 4 >> ../buildlog 2>&1
clearcase_bin/visit-bin-dist >> ../buildlog 2>&1
mv visit\$ver2.linux.tar.gz ../visit\$ver2.linux_suse.tar.gz
hrchilds's avatar
hrchilds committed
181
182
cd ..
rm -f resultlog
hrchilds's avatar
hrchilds committed
183
184
185
186
echo "        build of visit on kickit"       > resultlog 2>&1
echo "       --------------------------"      >> resultlog 2>&1
echo ""                                       >> resultlog 2>&1
ls -l                                         >> resultlog 2>&1
hrchilds's avatar
hrchilds committed
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
mail $emailName < resultlog
EOF

if [ $kickit = true ]
then
   if [ $test = no ]
   then
      scp kickit kickit:kickit_buildit
      scp $dist.tar.gz kickit:kickit_$dist.tar.gz
      ssh kickit "chmod 750 kickit_buildit;./kickit_buildit" &
   fi
fi

#
# Build on sunspot.
#
rm -f sunspot
cat <<EOF > sunspot
#!/bin/sh
if test ! -d /export/scratch/$user ; then
   mkdir /export/scratch/$user
fi
if test ! -d /export/scratch/$user/sunspot ; then
   mkdir /export/scratch/$user/sunspot
fi
rm -rf /export/scratch/$user/sunspot/visitbuild
mkdir /export/scratch/$user/sunspot/visitbuild
mv sunspot_$dist.tar.gz /export/scratch/$user/sunspot/visitbuild/$dist.tar.gz
cd /export/scratch/$user/sunspot/visitbuild
gunzip -c $dist.tar.gz | tar xvf - > buildlog 2>&1
cd $dist
hrchilds's avatar
hrchilds committed
218
219
ver=\`cat VERSION\`
ver2=\`echo \$ver | tr "." "_"\`
hrchilds's avatar
hrchilds committed
220
221
env CXXFLAGS=-O2 ./configure >> ../buildlog 2>&1
make -j 4 >> ../buildlog 2>&1
hrchilds's avatar
hrchilds committed
222
223
clearcase_bin/visit-bin-dist >> ../buildlog 2>&1
mv visit\$ver2.sunos5.tar.gz ..
hrchilds's avatar
hrchilds committed
224
225
cd ..
rm -f resultlog
hrchilds's avatar
hrchilds committed
226
227
228
229
echo "        build of visit on sunspot"      > resultlog 2>&1
echo "       ---------------------------"     >> resultlog 2>&1
echo ""                                       >> resultlog 2>&1
ls -l                                         >> resultlog 2>&1
hrchilds's avatar
hrchilds committed
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
260
mail $emailName < resultlog
EOF

if [ $sunspot = true ]
then
   if [ $test = no ]
   then
      scp sunspot sunspot:sunspot_buildit
      scp $dist.tar.gz sunspot:sunspot_$dist.tar.gz
      ssh sunspot "chmod 750 sunspot_buildit;./sunspot_buildit" &
   fi
fi

#
# Build on hyper.
#
rm -f hyper
cat <<EOF > hyper
#!/bin/sh
if test ! -d /scratch1/$user ; then
   mkdir /scratch1/$user
fi
if test ! -d /scratch1/$user/hyper ; then
   mkdir /scratch1/$user/hyper
fi
rm -rf /scratch1/$user/hyper/visitbuild
mkdir /scratch1/$user/hyper/visitbuild
mv hyper_$dist.tar.gz /scratch1/$user/hyper/visitbuild/$dist.tar.gz
cd /scratch1/$user/hyper/visitbuild
gunzip -c $dist.tar.gz | tar xvf - > buildlog 2>&1
cd $dist
hrchilds's avatar
hrchilds committed
261
262
ver=\`cat VERSION\`
ver2=\`echo \$ver | tr "." "_"\`
hrchilds's avatar
hrchilds committed
263
264
env CXXFLAGS=-O2 ./configure >> ../buildlog 2>&1
env PARALLEL=4 make -P >> ../buildlog 2>&1
hrchilds's avatar
hrchilds committed
265
266
clearcase_bin/visit-bin-dist >> ../buildlog 2>&1
mv visit\$ver2.irix6.tar.gz ..
hrchilds's avatar
hrchilds committed
267
268
cd ..
rm -f resultlog
hrchilds's avatar
hrchilds committed
269
270
271
272
echo "        build of visit on hyper"        > resultlog 2>&1
echo "       -------------------------"       >> resultlog 2>&1
echo ""                                       >> resultlog 2>&1
ls -l                                         >> resultlog 2>&1
hrchilds's avatar
hrchilds committed
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
mail $emailName < resultlog
EOF

if [ $hyper = true ]
then
   if [ $test = no ]
   then
      scp hyper hyper:hyper_buildit
      scp $dist.tar.gz hyper:hyper_$dist.tar.gz
      ssh hyper "chmod 750 hyper_buildit;./hyper_buildit" &
   fi
fi

#
# Build on gps.
#
rm -f gps
cat <<EOF > gps
#!/bin/sh
hrchilds's avatar
hrchilds committed
292
293
if test ! -e /nfs/tmp3/$user ; then
   mkdir /nfs/tmp3/$user
hrchilds's avatar
hrchilds committed
294
fi
hrchilds's avatar
hrchilds committed
295
296
if test ! -e /nfs/tmp3/$user/gps; then
   mkdir /nfs/tmp3/$user/gps
hrchilds's avatar
hrchilds committed
297
fi
hrchilds's avatar
hrchilds committed
298
299
300
301
rm -rf /nfs/tmp3/$user/gps/visitbuild
mkdir /nfs/tmp3/$user/gps/visitbuild
mv gps_$dist.tar.gz /nfs/tmp3/$user/gps/visitbuild/$dist.tar.gz
cd /nfs/tmp3/$user/gps/visitbuild
hrchilds's avatar
hrchilds committed
302
303
gunzip -c $dist.tar.gz | tar xvf - > buildlog 2>&1
cd $dist
hrchilds's avatar
hrchilds committed
304
305
306
307
308
309
ver=\`cat VERSION\`
ver2=\`echo \$ver | tr "." "_"\`
env CXXFLAGS=-O2 MAKE=gmake ./configure --enable-parallel >> ../buildlog 2>&1
gmake -j 3 >> ../buildlog 2>&1
clearcase_bin/visit-bin-dist >> ../buildlog 2>&1
mv visit\$ver2.osf1.tar.gz ..
hrchilds's avatar
hrchilds committed
310
311
cd ..
rm -f resultlog
hrchilds's avatar
hrchilds committed
312
313
314
315
echo "        build of visit on gps"          > resultlog 2>&1
echo "       -----------------------"         >> resultlog 2>&1
echo ""                                       >> resultlog 2>&1
ls -l                                         >> resultlog 2>&1
hrchilds's avatar
hrchilds committed
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
mail $emailName < resultlog
EOF

if [ $gps = true ]
then
   if [ $test = no ]
   then
      scp gps gps15:gps_buildit
      scp $dist.tar.gz gps15:gps_$dist.tar.gz
      ssh gps15 "chmod 750 gps_buildit;./gps_buildit" &
   fi
fi

#
# Build on riptide, both serial and parallel versions.
#
rm -f riptide
cat <<EOF > riptide
#!/bin/sh
hrchilds's avatar
hrchilds committed
335
336
if test ! -e /fc/tmp0/fcdata/$user ; then
   mkdir /fc/tmp0/fcdata/$user
hrchilds's avatar
hrchilds committed
337
fi
hrchilds's avatar
hrchilds committed
338
339
if test ! -e /fc/tmp0/fcdata/$user/riptide ; then
   mkdir /fc/tmp0/fcdata/$user/riptide
hrchilds's avatar
hrchilds committed
340
fi
hrchilds's avatar
hrchilds committed
341
342
343
344
rm -rf /fc/tmp0/fcdata/$user/riptide/visitbuild
mkdir /fc/tmp0/fcdata/$user/riptide/visitbuild
mv riptide_$dist.tar.gz /fc/tmp0/fcdata/$user/riptide/visitbuild/$dist.tar.gz
cd /fc/tmp0/fcdata/$user/riptide/visitbuild
hrchilds's avatar
hrchilds committed
345
346
gunzip -c $dist.tar.gz | tar xvf - > buildlog 2>&1
cd $dist
hrchilds's avatar
hrchilds committed
347
348
ver=\`cat VERSION\`
ver2=\`echo \$ver | tr "." "_"\`
hrchilds's avatar
hrchilds committed
349
350
env CXXFLAGS=-O2 ./configure --enable-parallel >> ../buildlog 2>&1
env PARALLEL=8 make -P >> ../buildlog 2>&1
hrchilds's avatar
hrchilds committed
351
352
clearcase_bin/visit-bin-dist >> ../buildlog 2>&1
mv visit\$ver2.irix6.tar.gz ..
hrchilds's avatar
hrchilds committed
353
354
cd ..
rm -f resultlog
hrchilds's avatar
hrchilds committed
355
356
357
358
echo "        build of visit on riptide"      > resultlog 2>&1
echo "       ---------------------------"     >> resultlog 2>&1
echo ""                                       >> resultlog 2>&1
ls -l                                         >> resultlog 2>&1
hrchilds's avatar
hrchilds committed
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
mail $emailName < resultlog
EOF

if [ $riptide = true ]
then
   if [ $test = no ]
   then
      scp riptide riptide:riptide_buildit
      scp $dist.tar.gz riptide:riptide_$dist.tar.gz
      ssh riptide "chmod 750 riptide_buildit;./riptide_buildit" &
   fi
fi

#
# Build on frost, both serial and parallel versions.
#
rm -f frost
cat <<EOF > frost
#!/bin/sh
hrchilds's avatar
hrchilds committed
378
379
if test ! -e /p/gf1/$user ; then
   mkdir /p/gf1/$user
hrchilds's avatar
hrchilds committed
380
fi
hrchilds's avatar
hrchilds committed
381
382
if test ! -e /p/gf1/$user/frost ; then
   mkdir /p/gf1/$user/frost
hrchilds's avatar
hrchilds committed
383
fi
hrchilds's avatar
hrchilds committed
384
385
386
387
rm -rf /p/gf1/$user/frost/visitbuild
mkdir /p/gf1/$user/frost/visitbuild
mv frost_$dist.tar.gz /p/gf1/$user/frost/visitbuild/$dist.tar.gz
cd /p/gf1/$user/frost/visitbuild
hrchilds's avatar
hrchilds committed
388
389
gunzip -c $dist.tar.gz | tar xvf - > buildlog 2>&1
cd $dist
hrchilds's avatar
hrchilds committed
390
391
ver=\`cat VERSION\`
ver2=\`echo \$ver | tr "." "_"\`
hrchilds's avatar
hrchilds committed
392
393
env CXXFLAGS=-O2 MAKE=gmake ./configure --enable-parallel >> ../buildlog 2>&1
gmake -j 6 >> ../buildlog 2>&1
hrchilds's avatar
hrchilds committed
394
395
clearcase_bin/visit-bin-dist >> ../buildlog 2>&1
mv visit\$ver2.aix.tar.gz ..
hrchilds's avatar
hrchilds committed
396
397
cd ..
rm -f resultlog
hrchilds's avatar
hrchilds committed
398
399
400
401
echo "        build of visit on frost"        > resultlog 2>&1
echo "       -------------------------"       >> resultlog 2>&1
echo ""                                       >> resultlog 2>&1
ls -l                                         >> resultlog 2>&1
hrchilds's avatar
hrchilds committed
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
mail $emailName < resultlog
EOF

if [ $frost = true ]
then
   if [ $test = no ]
   then
      scp frost frost:frost_buildit
      scp $dist.tar.gz frost:frost_$dist.tar.gz
      ssh frost "chmod 750 frost_buildit;./frost_buildit" &
   fi
fi

#
# Clean up.
#
if [ $test = no ]
then
   rm -f kickit sunspot hyper gps riptide frost
fi