visit-build-open 27.4 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
#
hrchilds's avatar
hrchilds committed
12 13 14 15
# Modifications:
#   Brad Whitlock, Fri Dec 15 09:51:55 PDT 2006
#   Added --enable-visitmodule for some platforms.
#
16 17 18 19 20 21 22
#   Hank Childs, Mon Oct 15 09:04:12 PDT 2007
#   Add some print statements for usability.  Also make sure that 
#   /usr/bin/X11 is in the path for yana and prism.  If you are a ksh
#   user, your environment will not get sourced and xmkmf will not be
#   found, leading configure to not find the right X libraries, which 
#   will lead to a compile error.
#
hrchilds's avatar
hrchilds committed
23 24 25 26
#   Hank Childs, Wed Oct 17 14:28:48 PDT 2007
#   Add support for ksh users on sunspot.  (Default environment
#   inherited by "sh" is not enough to do a compile.)
#
hrchilds's avatar
hrchilds committed
27 28 29 30
#   Hank Childs, Wed Oct 17 16:25:14 PDT 2007
#   Add a subject line to the status e-mails.  Also workaround problem
#   with quad mailing out.
#
hrchilds's avatar
hrchilds committed
31 32 33
#   Hank Childs, Mon Oct 22 09:25:47 PDT 2007
#   More ksh sunspot fixes.
#
hrchilds's avatar
hrchilds committed
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
   kbonnell)
      emailName=bonnell2@llnl.gov
      ;; 
   brugger)
      emailName=brugger1@llnl.gov
      ;;
   childs)
      emailName=childs3@llnl.gov
      ;;
hrchilds's avatar
hrchilds committed
54 55
   mcmiller)
      emailName=miller86@llnl.gov
hrchilds's avatar
hrchilds committed
56
      ;;
hrchilds's avatar
hrchilds committed
57 58
   miller)
      emailName=miller86@llnl.gov
hrchilds's avatar
hrchilds committed
59 60 61 62 63 64 65 66 67
      ;;
   whitlocb)
      emailName=whitlock2@llnl.gov
      ;;
esac

#
# Parse the execute line, providing default values for error checking.
#
hrchilds's avatar
hrchilds committed
68
hoth=true
hrchilds's avatar
hrchilds committed
69
sunspot=true
hrchilds's avatar
hrchilds committed
70
quad=true
hrchilds's avatar
hrchilds committed
71
up=true
bonnell's avatar
bonnell committed
72
pengra=true
hrchilds's avatar
hrchilds committed
73
thunder=true
hrchilds's avatar
hrchilds committed
74
prism=true
hrchilds's avatar
hrchilds committed
75
yana=true
hrchilds's avatar
hrchilds committed
76
xchem=true
hrchilds's avatar
hrchilds committed
77
davinci=true
brugger's avatar
 
brugger committed
78
ellipse=true
hrchilds's avatar
hrchilds committed
79 80 81 82 83 84 85 86 87 88 89 90

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)
hrchilds's avatar
hrchilds committed
91
         hoth=false
hrchilds's avatar
hrchilds committed
92
         sunspot=false
hrchilds's avatar
hrchilds committed
93
         quad=false
hrchilds's avatar
hrchilds committed
94
         up=false
bonnell's avatar
bonnell committed
95
         pengra=false
hrchilds's avatar
hrchilds committed
96
         thunder=false
hrchilds's avatar
hrchilds committed
97
         prism=false
hrchilds's avatar
hrchilds committed
98
         yana=false
hrchilds's avatar
hrchilds committed
99
         xchem=false
hrchilds's avatar
hrchilds committed
100
         davinci=false
brugger's avatar
 
brugger committed
101
         ellipse=false
hrchilds's avatar
hrchilds committed
102 103
         shift
         ;;
hrchilds's avatar
hrchilds committed
104 105 106 107 108 109 110 111
      -hoth)
         hoth=false
         shift
         ;;
      +hoth)
         hoth=true
         shift
         ;;
hrchilds's avatar
hrchilds committed
112 113 114 115 116 117 118 119
      -sunspot)
         sunspot=false
         shift
         ;;
      +sunspot)
         sunspot=true
         shift
         ;;
hrchilds's avatar
hrchilds committed
120 121
      -quad)
         quad=false
hrchilds's avatar
hrchilds committed
122 123
         shift
         ;;
hrchilds's avatar
hrchilds committed
124 125
      +quad)
         quad=true
hrchilds's avatar
hrchilds committed
126 127
         shift
         ;;
hrchilds's avatar
hrchilds committed
128 129 130 131 132 133 134 135
      -up)
         up=false
         shift
         ;;
      +up)
         up=true
         shift
         ;;
bonnell's avatar
bonnell committed
136 137 138 139 140 141 142 143
      -pengra)
         pengra=false
         shift
         ;;
      +pengra)
         pengra=true
         shift
         ;;
hrchilds's avatar
hrchilds committed
144 145 146 147 148 149 150 151
      -thunder)
         thunder=false
         shift
         ;;
      +thunder)
         thunder=true
         shift
         ;;
hrchilds's avatar
hrchilds committed
152 153
      -prism)
         prism=false
hrchilds's avatar
hrchilds committed
154 155
         shift
         ;;
hrchilds's avatar
hrchilds committed
156 157
      +prism)
         prism=true
hrchilds's avatar
hrchilds committed
158 159
         shift
         ;;
hrchilds's avatar
hrchilds committed
160 161 162 163 164 165 166 167
      -yana)
         yana=false
         shift
         ;;
      +yana)
         yana=true
         shift
         ;;
hrchilds's avatar
hrchilds committed
168 169 170 171 172 173 174 175
      -xchem)
         xchem=false
         shift
         ;;
      +xchem)
         xchem=true
         shift
         ;;
hrchilds's avatar
hrchilds committed
176 177 178 179 180 181 182 183
      -davinci)
         davinci=false
         shift
         ;;
      +davinci)
         davinci=true
         shift
         ;;
brugger's avatar
 
brugger committed
184 185 186 187 188 189 190 191
      -ellipse)
         ellipse=false
         shift
         ;;
      +ellipse)
         ellipse=true
         shift
         ;;
hrchilds's avatar
hrchilds committed
192 193 194 195 196 197 198 199
      -d)
         dist=$2
         shift 2
         ;;
   esac
done

#
hrchilds's avatar
hrchilds committed
200
# Check that the distribution name was provided.
hrchilds's avatar
hrchilds committed
201 202 203
#
if [ $dist = undefined ]
then
hrchilds's avatar
hrchilds committed
204
   echo "Usage: [-none] [-<machine name>] -d <distribution>"
205 206 207 208 209 210 211 212 213 214 215 216
   echo "Valid machine names:"
   echo "    hoth (B-Div, Linux),"
   echo "    sunspot (B-Div, Solaris),"
   echo "    quad (LC, SGI),"
   echo "    up (LC, AIX),"
   echo "    pengra (LC, Linux, x86_64),"
   echo "    thunder (LC, Linux, ia64),"
   echo "    prism (LC, Linux, x86_64),"
   echo "    yana (LC, Linux, x86_64),"
   echo "    xchem (HEAF, Linux),"
   echo "    davinci (LBNL, Altix),"
   echo "    ellipse (UChicago, Linux)"
hrchilds's avatar
hrchilds committed
217 218 219 220 221 222 223 224 225 226 227 228 229
   exit
fi

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

hrchilds's avatar
hrchilds committed
230 231 232 233 234 235
#
# Build on hoth.
#
rm -f hoth
cat <<EOF > hoth
#!/bin/sh
hrchilds's avatar
hrchilds committed
236 237
if test ! -e /scratch/$user ; then
   mkdir /scratch/$user
hrchilds's avatar
hrchilds committed
238
fi
hrchilds's avatar
hrchilds committed
239 240
if test ! -e /scratch/$user/hoth ; then
   mkdir /scratch/$user/hoth
hrchilds's avatar
hrchilds committed
241
fi
hrchilds's avatar
hrchilds committed
242 243 244 245
rm -rf /scratch/$user/hoth/visitbuild
mkdir /scratch/$user/hoth/visitbuild
mv hoth_$dist.tar.gz /scratch/$user/hoth/visitbuild/$dist.tar.gz
cd /scratch/$user/hoth/visitbuild
hrchilds's avatar
hrchilds committed
246
gunzip -c $dist.tar.gz | tar xvf - > buildlog 2>&1
brugger's avatar
 
brugger committed
247
cd $dist/src
hrchilds's avatar
hrchilds committed
248 249
ver=\`cat VERSION\`
ver2=\`echo \$ver | tr "." "_"\`
brugger's avatar
 
brugger committed
250 251 252 253 254
env CXXFLAGS=-O2 ./configure --enable-parallel --enable-viewer-mesa-stub --enable-visitmodule >> ../../buildlog 2>&1
make -j 4 >> ../../buildlog 2>&1
clearcase_bin/visit-bin-dist >> ../../buildlog 2>&1
mv visit\$ver2.linux.tar.gz ../..
cd ../..
hrchilds's avatar
hrchilds committed
255 256 257 258 259 260
rm -f resultlog
echo "        build of visit on hoth"         > resultlog 2>&1
echo "       ------------------------"        >> resultlog 2>&1
echo ""                                       >> resultlog 2>&1
ls -l                                         >> resultlog 2>&1
echo ""                                       >> resultlog 2>&1
brugger's avatar
 
brugger committed
261 262 263
echo "number of database plugins = "\`ls $dist/src/plugins/databases/libI* | wc -l\` >> resultlog 2>&1
echo "number of operator plugins = "\`ls $dist/src/plugins/operators/libI* | wc -l\` >> resultlog 2>&1
echo "number of plot plugins = "\`ls $dist/src/plugins/plots/libI* | wc -l\` >> resultlog 2>&1
hrchilds's avatar
hrchilds committed
264 265
echo ""                                       >> resultlog 2>&1
echo "The database plugins:"                  >> resultlog 2>&1
brugger's avatar
 
brugger committed
266
ls $dist/src/plugins/databases/libI* | sed "s/$dist\/src\/plugins\/databases\/libI//" | sed "s/Database.so//" >> resultlog 2>&1
hrchilds's avatar
hrchilds committed
267
mail  -s "VisIt build ($dist): hoth" $emailName < resultlog
hrchilds's avatar
hrchilds committed
268 269 270 271 272 273
EOF

if [ $hoth = true ]
then
   if [ $test = no ]
   then
274
      echo "Building on hoth"
hrchilds's avatar
hrchilds committed
275 276 277 278 279 280
      scp hoth hoth:hoth_buildit
      scp $dist.tar.gz hoth:hoth_$dist.tar.gz
      ssh hoth "chmod 750 hoth_buildit;./hoth_buildit" &
   fi
fi

hrchilds's avatar
hrchilds committed
281 282 283 284 285 286
#
# Build on sunspot.
#
rm -f sunspot
cat <<EOF > sunspot
#!/bin/sh
hrchilds's avatar
hrchilds committed
287

hrchilds's avatar
hrchilds committed
288
PATH=/usr/local/bin:/usr/ccs/bin:\$PATH
hrchilds's avatar
hrchilds committed
289 290 291
export PATH
LD_LIBRARY_PATH=/usr/local/lib:\$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
hrchilds's avatar
hrchilds committed
292 293 294 295 296 297 298 299 300 301 302
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
brugger's avatar
 
brugger committed
303
cd $dist/src
hrchilds's avatar
hrchilds committed
304 305
ver=\`cat VERSION\`
ver2=\`echo \$ver | tr "." "_"\`
brugger's avatar
 
brugger committed
306
env CXXFLAGS=-O2 ./configure --enable-visitmodule >> ../../buildlog 2>&1
hrchilds's avatar
hrchilds committed
307 308 309
cd databases/Fluent
sed "s/\\\$(CXXFLAGSORIG)/-D_LARGEFILE64_SOURCE -Wall -Wno-sign-compare -Wno-deprecated/" Makefile > Makefile+;rm Makefile;mv Makefile+ Makefile
cd ../..
brugger's avatar
 
brugger committed
310 311 312 313
make -j 4 >> ../../buildlog 2>&1
clearcase_bin/visit-bin-dist >> ../../buildlog 2>&1
mv visit\$ver2.sunos5.tar.gz ../..
cd ../..
hrchilds's avatar
hrchilds committed
314
rm -f resultlog
hrchilds's avatar
hrchilds committed
315 316 317 318
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
319
echo ""                                       >> resultlog 2>&1
brugger's avatar
 
brugger committed
320 321 322
echo "number of database plugins = "\`ls $dist/src/plugins/databases/libI* | wc -l\` >> resultlog 2>&1
echo "number of operator plugins = "\`ls $dist/src/plugins/operators/libI* | wc -l\` >> resultlog 2>&1
echo "number of plot plugins = "\`ls $dist/src/plugins/plots/libI* | wc -l\` >> resultlog 2>&1
hrchilds's avatar
hrchilds committed
323 324
echo ""                                       >> resultlog 2>&1
echo "The database plugins:"                  >> resultlog 2>&1
brugger's avatar
 
brugger committed
325
ls $dist/src/plugins/databases/libI* | sed "s/$dist\/src\/plugins\/databases\/libI//" | sed "s/Database.so//" >> resultlog 2>&1
brugger's avatar
 
brugger committed
326 327 328 329 330 331
# sunspot can't handle a subject, so send mail through kickit
cp resultlog \$HOME/sunspot_resultlog
ssh kickit "cat sunspot_resultlog | /bin/mail  -s \"VisIt build ($dist): sunspot\" $emailName"
# give kickit time to mail it before removing the log
sleep 10
rm \$HOME/sunspot_resultlog
hrchilds's avatar
hrchilds committed
332 333 334 335 336 337
EOF

if [ $sunspot = true ]
then
   if [ $test = no ]
   then
338
      echo "Building on sunspot"
hrchilds's avatar
hrchilds committed
339 340 341 342 343 344 345
      scp sunspot sunspot:sunspot_buildit
      scp $dist.tar.gz sunspot:sunspot_$dist.tar.gz
      ssh sunspot "chmod 750 sunspot_buildit;./sunspot_buildit" &
   fi
fi

#
hrchilds's avatar
hrchilds committed
346
# Build on quad.
hrchilds's avatar
hrchilds committed
347
#
hrchilds's avatar
hrchilds committed
348 349
rm -f quad
cat <<EOF > quad
hrchilds's avatar
hrchilds committed
350
#!/bin/sh
hrchilds's avatar
hrchilds committed
351 352
if test ! -d /usr/tmp/$user ; then
   mkdir /usr/tmp/$user
hrchilds's avatar
hrchilds committed
353
fi
hrchilds's avatar
hrchilds committed
354 355
if test ! -d /usr/tmp/$user/quad ; then
   mkdir /usr/tmp/$user/quad
hrchilds's avatar
hrchilds committed
356
fi
hrchilds's avatar
hrchilds committed
357 358 359 360
rm -rf /usr/tmp/$user/quad/visitbuild
mkdir /usr/tmp/$user/quad/visitbuild
mv quad_$dist.tar.gz /usr/tmp/$user/quad/visitbuild/$dist.tar.gz
cd /usr/tmp/$user/quad/visitbuild
hrchilds's avatar
hrchilds committed
361
gunzip -c $dist.tar.gz | tar xvf - > buildlog 2>&1
brugger's avatar
 
brugger committed
362
cd $dist/src
hrchilds's avatar
hrchilds committed
363 364
ver=\`cat VERSION\`
ver2=\`echo \$ver | tr "." "_"\`
brugger's avatar
 
brugger committed
365 366 367 368 369
env CXXFLAGS=-O2 MAKE=gmake ./configure --enable-parallel --enable-visitmodule >> ../../buildlog 2>&1
gmake -j 4 >> ../../buildlog 2>&1
clearcase_bin/visit-bin-dist -make gmake >> ../../buildlog 2>&1
mv visit\$ver2.irix6.tar.gz ../..
cd ../..
hrchilds's avatar
hrchilds committed
370
rm -f resultlog
hrchilds's avatar
hrchilds committed
371 372
echo "        build of visit on quad"         > resultlog 2>&1
echo "       ------------------------"        >> resultlog 2>&1
hrchilds's avatar
hrchilds committed
373 374
echo ""                                       >> resultlog 2>&1
ls -l                                         >> resultlog 2>&1
hrchilds's avatar
hrchilds committed
375
echo ""                                       >> resultlog 2>&1
brugger's avatar
 
brugger committed
376 377 378
echo "number of database plugins = "\`ls $dist/src/plugins/databases/libI* | wc -l\` >> resultlog 2>&1
echo "number of operator plugins = "\`ls $dist/src/plugins/operators/libI* | wc -l\` >> resultlog 2>&1
echo "number of plot plugins = "\`ls $dist/src/plugins/plots/libI* | wc -l\` >> resultlog 2>&1
hrchilds's avatar
hrchilds committed
379 380
echo ""                                       >> resultlog 2>&1
echo "The database plugins:"                  >> resultlog 2>&1
brugger's avatar
 
brugger committed
381
ls $dist/src/plugins/databases/libI* | sed "s/$dist\/src\/plugins\/databases\/libI//" | sed "s/Database.so//" >> resultlog 2>&1
hrchilds's avatar
hrchilds committed
382
# quad can't mail out, so send mail through thunder
brugger's avatar
 
brugger committed
383 384
cp resultlog \$HOME/quad_resultlog
ssh thunder2 "cat quad_resultlog | /bin/mail  -s \"VisIt build ($dist): quad\" $emailName"
hrchilds's avatar
hrchilds committed
385 386
# give thunder time to mail it before removing the log
sleep 10
brugger's avatar
 
brugger committed
387
rm \$HOME/quad_resultlog
hrchilds's avatar
hrchilds committed
388 389
EOF

hrchilds's avatar
hrchilds committed
390
if [ $quad = true ]
hrchilds's avatar
hrchilds committed
391 392 393
then
   if [ $test = no ]
   then
394
      echo "Building on quad"
hrchilds's avatar
hrchilds committed
395 396 397
      scp quad quad:quad_buildit
      scp $dist.tar.gz quad:quad_$dist.tar.gz
      ssh quad "chmod 750 quad_buildit;./quad_buildit" &
hrchilds's avatar
hrchilds committed
398 399 400
   fi
fi

hrchilds's avatar
hrchilds committed
401 402 403 404 405 406
#
# Build on up, both serial and parallel versions.
#
rm -f up
cat <<EOF > up
#!/bin/sh
hrchilds's avatar
hrchilds committed
407
PATH=/usr/local/bin:\$PATH
hrchilds's avatar
hrchilds committed
408 409 410 411 412 413 414 415 416 417 418
if test ! -d /p/gup1/$user ; then
   mkdir /p/gup1/$user
fi
if test ! -d /p/gup1/$user/up ; then
   mkdir /p/gup1/$user/up
fi
rm -rf /p/gup1/$user/up/visitbuild
mkdir /p/gup1/$user/up/visitbuild
mv up_$dist.tar.gz /p/gup1/$user/up/visitbuild/$dist.tar.gz
cd /p/gup1/$user/up/visitbuild
gunzip -c $dist.tar.gz | tar xvf - > buildlog 2>&1
hrchilds's avatar
hrchilds committed
419
mv $dist ${dist}_32
brugger's avatar
 
brugger committed
420
cd ${dist}_32/src
hrchilds's avatar
hrchilds committed
421 422
ver=\`cat VERSION\`
ver2=\`echo \$ver | tr "." "_"\`
hrchilds's avatar
hrchilds committed
423 424
OBJECT_MODE=32
export OBJECT_MODE
brugger's avatar
 
brugger committed
425 426 427 428 429
env CXXFLAGS=-O2 MAKE=gmake ./configure --with-config=config-site/up041_32.conf >> ../../buildlog 2>&1
gmake -j 4 >> ../../buildlog 2>&1
clearcase_bin/visit-bin-dist -make gmake >> ../../buildlog 2>&1
mv visit\$ver2.aix.tar.gz ../..
cd ../..
hrchilds's avatar
hrchilds committed
430
gunzip -c $dist.tar.gz | tar xvf - >> buildlog 2>&1
brugger's avatar
 
brugger committed
431
cd $dist/src
hrchilds's avatar
hrchilds committed
432 433
OBJECT_MODE=64
export OBJECT_MODE
brugger's avatar
 
brugger committed
434 435 436 437 438
env CXXFLAGS=-O2 MAKE=gmake ./configure --enable-parallel >> ../../buildlog 2>&1
gmake -j 4 >> ../../buildlog 2>&1
clearcase_bin/visit-bin-dist -make gmake >> ../../buildlog 2>&1
mv visit\$ver2.aix64.tar.gz ../..
cd ../..
hrchilds's avatar
hrchilds committed
439 440 441 442 443
echo "        build of visit on up"           > resultlog 2>&1
echo "       ----------------------"          >> resultlog 2>&1
echo ""                                       >> resultlog 2>&1
ls -l                                         >> resultlog 2>&1
echo ""                                       >> resultlog 2>&1
hrchilds's avatar
hrchilds committed
444
echo "            32 bit build"               >> resultlog 2>&1
hrchilds's avatar
hrchilds committed
445
echo ""                                       >> resultlog 2>&1
brugger's avatar
 
brugger committed
446 447 448
echo "number of database plugins = "\`ls ${dist}_32/src/plugins/databases/libI* | wc -l\` >> resultlog 2>&1
echo "number of operator plugins = "\`ls ${dist}_32/src/plugins/operators/libI* | wc -l\` >> resultlog 2>&1
echo "number of plot plugins = "\`ls ${dist}_32/src/plugins/plots/libI* | wc -l\` >> resultlog 2>&1
hrchilds's avatar
hrchilds committed
449 450
echo ""                                       >> resultlog 2>&1
echo "The database plugins:"                  >> resultlog 2>&1
brugger's avatar
 
brugger committed
451
ls ${dist}_32/src/plugins/databases/libI* | sed "s/${dist}_32\/src\/plugins\/databases\/libI//" | sed "s/Database.so//" >> resultlog 2>&1
hrchilds's avatar
hrchilds committed
452
echo ""                                       >> resultlog 2>&1
hrchilds's avatar
hrchilds committed
453
echo "            64 bit build"               >> resultlog 2>&1
hrchilds's avatar
hrchilds committed
454
echo ""                                       >> resultlog 2>&1
brugger's avatar
 
brugger committed
455 456 457
echo "number of database plugins = "\`ls $dist/src/plugins/databases/libI* | wc -l\` >> resultlog 2>&1
echo "number of operator plugins = "\`ls $dist/src/plugins/operators/libI* | wc -l\` >> resultlog 2>&1
echo "number of plot plugins = "\`ls $dist/src/plugins/plots/libI* | wc -l\` >> resultlog 2>&1
hrchilds's avatar
hrchilds committed
458 459
echo ""                                       >> resultlog 2>&1
echo "The database plugins:"                  >> resultlog 2>&1
brugger's avatar
 
brugger committed
460
ls $dist/src/plugins/databases/libI* | sed "s/$dist\/src\/plugins\/databases\/libI//" | sed "s/Database.so//" >> resultlog 2>&1
hrchilds's avatar
hrchilds committed
461
mail  -s "VisIt build ($dist): up" $emailName < resultlog
hrchilds's avatar
hrchilds committed
462 463
EOF

hrchilds's avatar
hrchilds committed
464
if [ $up = true ]
hrchilds's avatar
hrchilds committed
465 466 467
then
   if [ $test = no ]
   then
468
      echo "Building on up"
hrchilds's avatar
hrchilds committed
469 470 471
      scp up up:up_buildit
      scp $dist.tar.gz up:up_$dist.tar.gz
      ssh up "chmod 750 up_buildit;./up_buildit" &
hrchilds's avatar
hrchilds committed
472 473 474
   fi
fi

bonnell's avatar
bonnell committed
475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491
#
# Build on pengra.
#
rm -f pengra
cat <<EOF > pengra
#!/bin/sh
if test ! -d /usr/tmp/$user ; then
   mkdir /usr/tmp/$user
fi
if test ! -d /usr/tmp/$user/pengra ; then
   mkdir /usr/tmp/$user/pengra
fi
rm -rf /usr/tmp/$user/pengra/visitbuild
mkdir /usr/tmp/$user/pengra/visitbuild
mv pengra_$dist.tar.gz /usr/tmp/$user/pengra/visitbuild/$dist.tar.gz
cd /usr/tmp/$user/pengra/visitbuild
gunzip -c $dist.tar.gz | tar xvf - > buildlog 2>&1
brugger's avatar
 
brugger committed
492
cd $dist/src
bonnell's avatar
bonnell committed
493 494
ver=\`cat VERSION\`
ver2=\`echo \$ver | tr "." "_"\`
brugger's avatar
 
brugger committed
495 496 497 498 499
env CXXFLAGS=-O2 ./configure --enable-parallel >> ../../buildlog 2>&1
make -j 3 >> ../../buildlog 2>&1
clearcase_bin/visit-bin-dist >> ../../buildlog 2>&1
mv visit\$ver2.linux.tar.gz ../..
cd ../..
bonnell's avatar
bonnell committed
500 501 502 503 504 505
rm -f resultlog
echo "        build of visit on pengra"       > resultlog 2>&1
echo "       --------------------------"      >> resultlog 2>&1
echo ""                                       >> resultlog 2>&1
ls -l                                         >> resultlog 2>&1
echo ""                                       >> resultlog 2>&1
brugger's avatar
 
brugger committed
506 507 508
echo "number of database plugins = "\`ls $dist/src/plugins/databases/libI* | wc -l\` >> resultlog 2>&1
echo "number of operator plugins = "\`ls $dist/src/plugins/operators/libI* | wc -l\` >> resultlog 2>&1
echo "number of plot plugins = "\`ls $dist/src/plugins/plots/libI* | wc -l\` >> resultlog 2>&1
bonnell's avatar
bonnell committed
509 510
echo ""                                       >> resultlog 2>&1
echo "The database plugins:"                  >> resultlog 2>&1
brugger's avatar
 
brugger committed
511
ls $dist/src/plugins/databases/libI* | sed "s/$dist\/src\/plugins\/databases\/libI//" | sed "s/Database.so//" >> resultlog 2>&1
hrchilds's avatar
hrchilds committed
512
mail  -s "VisIt build ($dist): pengra" $emailName < resultlog
bonnell's avatar
bonnell committed
513 514 515 516 517 518
EOF

if [ $pengra = true ]
then
   if [ $test = no ]
   then
519
      echo "Building on pengra"
bonnell's avatar
bonnell committed
520 521 522 523 524 525
      scp pengra pengra1:pengra_buildit
      scp $dist.tar.gz pengra1:pengra_$dist.tar.gz
      ssh pengra1 "chmod 750 pengra_buildit;./pengra_buildit" &
   fi
fi

hrchilds's avatar
hrchilds committed
526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542
#
# Build on thunder.
#
rm -f thunder
cat <<EOF > thunder
#!/bin/sh
if test ! -d /usr/tmp/$user ; then
   mkdir /usr/tmp/$user
fi
if test ! -d /usr/tmp/$user/thunder ; then
   mkdir /usr/tmp/$user/thunder
fi
rm -rf /usr/tmp/$user/thunder/visitbuild
mkdir /usr/tmp/$user/thunder/visitbuild
mv thunder_$dist.tar.gz /usr/tmp/$user/thunder/visitbuild/$dist.tar.gz
cd /usr/tmp/$user/thunder/visitbuild
gunzip -c $dist.tar.gz | tar xvf - > buildlog 2>&1
brugger's avatar
 
brugger committed
543
cd $dist/src
hrchilds's avatar
hrchilds committed
544 545
ver=\`cat VERSION\`
ver2=\`echo \$ver | tr "." "_"\`
brugger's avatar
 
brugger committed
546 547 548 549 550
env CXXFLAGS=-O2 ./configure --enable-parallel --enable-visitmodule >> ../../buildlog 2>&1
make -j 3 >> ../../buildlog 2>&1
clearcase_bin/visit-bin-dist >> ../../buildlog 2>&1
mv visit\$ver2.linux-ia64.tar.gz ../..
cd ../..
hrchilds's avatar
hrchilds committed
551 552 553 554 555 556
rm -f resultlog
echo "        build of visit on thunder"      > resultlog 2>&1
echo "       ---------------------------"     >> resultlog 2>&1
echo ""                                       >> resultlog 2>&1
ls -l                                         >> resultlog 2>&1
echo ""                                       >> resultlog 2>&1
brugger's avatar
 
brugger committed
557 558 559
echo "number of database plugins = "\`ls $dist/src/plugins/databases/libI* | wc -l\` >> resultlog 2>&1
echo "number of operator plugins = "\`ls $dist/src/plugins/operators/libI* | wc -l\` >> resultlog 2>&1
echo "number of plot plugins = "\`ls $dist/src/plugins/plots/libI* | wc -l\` >> resultlog 2>&1
hrchilds's avatar
hrchilds committed
560 561
echo ""                                       >> resultlog 2>&1
echo "The database plugins:"                  >> resultlog 2>&1
brugger's avatar
 
brugger committed
562
ls $dist/src/plugins/databases/libI* | sed "s/$dist\/src\/plugins\/databases\/libI//" | sed "s/Database.so//" >> resultlog 2>&1
hrchilds's avatar
hrchilds committed
563
mail  -s "VisIt build ($dist): thunder" $emailName < resultlog
hrchilds's avatar
hrchilds committed
564 565 566 567 568 569
EOF

if [ $thunder = true ]
then
   if [ $test = no ]
   then
570
      echo "Building on thunder"
hrchilds's avatar
hrchilds committed
571 572 573 574 575 576
      scp thunder thunder2:thunder_buildit
      scp $dist.tar.gz thunder2:thunder_$dist.tar.gz
      ssh thunder2 "chmod 750 thunder_buildit;./thunder_buildit" &
   fi
fi

hrchilds's avatar
hrchilds committed
577
#
hrchilds's avatar
hrchilds committed
578
# Build on prism.
hrchilds's avatar
hrchilds committed
579
#
hrchilds's avatar
hrchilds committed
580 581
rm -f prism
cat <<EOF > prism
hrchilds's avatar
hrchilds committed
582 583 584 585
#!/bin/sh
if test ! -d /usr/tmp/$user ; then
   mkdir /usr/tmp/$user
fi
hrchilds's avatar
hrchilds committed
586 587
if test ! -d /usr/tmp/$user/prism ; then
   mkdir /usr/tmp/$user/prism
hrchilds's avatar
hrchilds committed
588
fi
hrchilds's avatar
hrchilds committed
589 590 591 592
rm -rf /usr/tmp/$user/prism/visitbuild
mkdir /usr/tmp/$user/prism/visitbuild
mv prism_$dist.tar.gz /usr/tmp/$user/prism/visitbuild/$dist.tar.gz
cd /usr/tmp/$user/prism/visitbuild
hrchilds's avatar
hrchilds committed
593
gunzip -c $dist.tar.gz | tar xvf - > buildlog 2>&1
brugger's avatar
 
brugger committed
594
cd $dist/src
hrchilds's avatar
hrchilds committed
595 596
ver=\`cat VERSION\`
ver2=\`echo \$ver | tr "." "_"\`
hrchilds's avatar
hrchilds committed
597
export PATH=\$PATH:/usr/bin/X11
brugger's avatar
 
brugger committed
598 599 600 601 602
env CXXFLAGS=-O2 ./configure --enable-parallel --enable-visitmodule >> ../../buildlog 2>&1
make -j 3 >> ../../buildlog 2>&1
clearcase_bin/visit-bin-dist -switch ib >> ../../buildlog 2>&1
mv visit\$ver2.linux-x86_64-ib.tar.gz ../..
cd ../..
hrchilds's avatar
hrchilds committed
603
rm -f resultlog
hrchilds's avatar
hrchilds committed
604 605
echo "        build of visit on prism"        > resultlog 2>&1
echo "       -------------------------"       >> resultlog 2>&1
hrchilds's avatar
hrchilds committed
606 607 608
echo ""                                       >> resultlog 2>&1
ls -l                                         >> resultlog 2>&1
echo ""                                       >> resultlog 2>&1
brugger's avatar
 
brugger committed
609 610 611
echo "number of database plugins = "\`ls $dist/src/plugins/databases/libI* | wc -l\` >> resultlog 2>&1
echo "number of operator plugins = "\`ls $dist/src/plugins/operators/libI* | wc -l\` >> resultlog 2>&1
echo "number of plot plugins = "\`ls $dist/src/plugins/plots/libI* | wc -l\` >> resultlog 2>&1
hrchilds's avatar
hrchilds committed
612 613
echo ""                                       >> resultlog 2>&1
echo "The database plugins:"                  >> resultlog 2>&1
brugger's avatar
 
brugger committed
614
ls $dist/src/plugins/databases/libI* | sed "s/$dist\/src\/plugins\/databases\/libI//" | sed "s/Database.so//" >> resultlog 2>&1
hrchilds's avatar
hrchilds committed
615
mail  -s "VisIt build ($dist): prism" $emailName < resultlog
hrchilds's avatar
hrchilds committed
616 617
EOF

hrchilds's avatar
hrchilds committed
618
if [ $prism = true ]
hrchilds's avatar
hrchilds committed
619 620 621
then
   if [ $test = no ]
   then
622
      echo "Building on prism"
hrchilds's avatar
hrchilds committed
623 624 625
      scp prism prism0:prism_buildit
      scp $dist.tar.gz prism0:prism_$dist.tar.gz
      ssh prism0 "chmod 750 prism_buildit;./prism_buildit" &
hrchilds's avatar
hrchilds committed
626 627 628
   fi
fi

hrchilds's avatar
hrchilds committed
629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645
#
# Build on yana.
#
rm -f yana
cat <<EOF > yana
#!/bin/sh
if test ! -d /usr/tmp/$user ; then
   mkdir /usr/tmp/$user
fi
if test ! -d /usr/tmp/$user/yana ; then
   mkdir /usr/tmp/$user/yana
fi
rm -rf /usr/tmp/$user/yana/visitbuild
mkdir /usr/tmp/$user/yana/visitbuild
mv yana_$dist.tar.gz /usr/tmp/$user/yana/visitbuild/$dist.tar.gz
cd /usr/tmp/$user/yana/visitbuild
gunzip -c $dist.tar.gz | tar xvf - > buildlog 2>&1
brugger's avatar
 
brugger committed
646
cd $dist/src
hrchilds's avatar
hrchilds committed
647 648
ver=\`cat VERSION\`
ver2=\`echo \$ver | tr "." "_"\`
hrchilds's avatar
hrchilds committed
649
export PATH=\$PATH:/usr/bin/X11
brugger's avatar
 
brugger committed
650 651 652 653 654
env CXXFLAGS=-O2 ./configure --enable-parallel --enable-visitmodule >> ../../buildlog 2>&1
make -j 6 >> ../../buildlog 2>&1
clearcase_bin/visit-bin-dist >> ../../buildlog 2>&1
mv visit\$ver2.linux-x86_64.tar.gz ../..
cd ../..
hrchilds's avatar
hrchilds committed
655 656 657 658 659 660
rm -f resultlog
echo "        build of visit on yana"         > resultlog 2>&1
echo "       ------------------------"        >> resultlog 2>&1
echo ""                                       >> resultlog 2>&1
ls -l                                         >> resultlog 2>&1
echo ""                                       >> resultlog 2>&1
brugger's avatar
 
brugger committed
661 662 663
echo "number of database plugins = "\`ls $dist/src/plugins/databases/libI* | wc -l\` >> resultlog 2>&1
echo "number of operator plugins = "\`ls $dist/src/plugins/operators/libI* | wc -l\` >> resultlog 2>&1
echo "number of plot plugins = "\`ls $dist/src/plugins/plots/libI* | wc -l\` >> resultlog 2>&1
hrchilds's avatar
hrchilds committed
664 665
echo ""                                       >> resultlog 2>&1
echo "The database plugins:"                  >> resultlog 2>&1
brugger's avatar
 
brugger committed
666
ls $dist/src/plugins/databases/libI* | sed "s/$dist\/src\/plugins\/databases\/libI//" | sed "s/Database.so//" >> resultlog 2>&1
hrchilds's avatar
hrchilds committed
667
mail  -s "VisIt build ($dist): yana" $emailName < resultlog
hrchilds's avatar
hrchilds committed
668 669 670 671 672 673
EOF

if [ $yana = true ]
then
   if [ $test = no ]
   then
674
      echo "Building on yana"
hrchilds's avatar
hrchilds committed
675 676 677 678 679 680
      scp yana yana3:yana_buildit
      scp $dist.tar.gz yana3:yana_$dist.tar.gz
      ssh yana3 "chmod 750 yana_buildit;./yana_buildit" &
   fi
fi

hrchilds's avatar
hrchilds committed
681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701
#
# Build on xchem.
#
rm -f xchem
cat <<EOF > xchem
#!/bin/sh
PATH=/usr/X11R6/bin:\$PATH
if test ! -d tmp ; then
   mkdir tmp
fi
if test ! -d tmp/$user ; then
   mkdir tmp/$user
fi
if test ! -d tmp/$user/xchem ; then
   mkdir tmp/$user/xchem
fi
rm -rf tmp/$user/xchem/visitbuild
mkdir tmp/$user/xchem/visitbuild
mv xchem_$dist.tar.gz tmp/$user/xchem/visitbuild/$dist.tar.gz
cd tmp/$user/xchem/visitbuild
gunzip -c $dist.tar.gz | tar xvf - > buildlog 2>&1
brugger's avatar
 
brugger committed
702
cd $dist/src
hrchilds's avatar
hrchilds committed
703 704
ver=\`cat VERSION\`
ver2=\`echo \$ver | tr "." "_"\`
brugger's avatar
 
brugger committed
705 706 707 708 709
env CXXFLAGS=-O2 ./configure --enable-parallel --enable-visitmodule >> ../../buildlog 2>&1
make -j 3 >> ../../buildlog 2>&1
clearcase_bin/visit-bin-dist >> ../../buildlog 2>&1
mv visit\$ver2.linux-x86_64.tar.gz ../..
cd ../..
hrchilds's avatar
hrchilds committed
710 711 712 713 714 715
rm -f resultlog
echo "        build of visit on xchem"        > resultlog 2>&1
echo "       -------------------------"       >> resultlog 2>&1
echo ""                                       >> resultlog 2>&1
ls -l                                         >> resultlog 2>&1
echo ""                                       >> resultlog 2>&1
brugger's avatar
 
brugger committed
716 717 718
echo "number of database plugins = "\`ls $dist/src/plugins/databases/libI* | wc -l\` >> resultlog 2>&1
echo "number of operator plugins = "\`ls $dist/src/plugins/operators/libI* | wc -l\` >> resultlog 2>&1
echo "number of plot plugins = "\`ls $dist/src/plugins/plots/libI* | wc -l\` >> resultlog 2>&1
hrchilds's avatar
hrchilds committed
719 720
echo ""                                       >> resultlog 2>&1
echo "The database plugins:"                  >> resultlog 2>&1
brugger's avatar
 
brugger committed
721
ls $dist/src/plugins/databases/libI* | sed "s/$dist\/src\/plugins\/databases\/libI//" | sed "s/Database.so//" >> resultlog 2>&1
hrchilds's avatar
hrchilds committed
722
mail  -s "VisIt build ($dist): xchem" $emailName < resultlog
hrchilds's avatar
hrchilds committed
723 724 725 726 727 728
EOF

if [ $xchem = true ]
then
   if [ $test = no ]
   then
729
      echo "Building on xchem"
hrchilds's avatar
hrchilds committed
730 731 732 733 734 735
      scp xchem xchem:xchem_buildit
      scp $dist.tar.gz xchem:xchem_$dist.tar.gz
      ssh xchem "chmod 750 xchem_buildit;./xchem_buildit" &
   fi
fi

hrchilds's avatar
hrchilds committed
736 737 738 739 740 741
#
# Build on davinci.
#
rm -f davinci
cat <<EOF > davinci
#!/bin/sh
hrchilds's avatar
hrchilds committed
742 743 744 745 746 747 748 749 750 751 752 753 754
if test ! -d tmp ; then
   mkdir tmp
fi
if test ! -d tmp/$user ; then
   mkdir tmp/$user
fi
if test ! -d tmp/$user/davinci; then
   mkdir tmp/$user/davinci
fi
rm -rf tmp/$user/davinci/visitbuild
mkdir tmp/$user/davinci/visitbuild
mv davinci_$dist.tar.gz tmp/$user/davinci/visitbuild/$dist.tar.gz
cd tmp/$user/davinci/visitbuild
hrchilds's avatar
hrchilds committed
755
gunzip -c $dist.tar.gz | tar xvf - > buildlog 2>&1
brugger's avatar
 
brugger committed
756
cd $dist/src
hrchilds's avatar
hrchilds committed
757 758
ver=\`cat VERSION\`
ver2=\`echo \$ver | tr "." "_"\`
brugger's avatar
 
brugger committed
759 760 761 762 763
env CXXFLAGS=-O2 ./configure --enable-parallel >> ../../buildlog 2>&1
make -j 4 >> ../../buildlog 2>&1
clearcase_bin/visit-bin-dist >> ../../buildlog 2>&1
mv visit\$ver2.linux-ia64.tar.gz ../..
cd ../..
hrchilds's avatar
hrchilds committed
764 765 766 767 768 769
rm -f resultlog
echo "        build of visit on davinci"      > resultlog 2>&1
echo "       ---------------------------"     >> resultlog 2>&1
echo ""                                       >> resultlog 2>&1
ls -l                                         >> resultlog 2>&1
echo ""                                       >> resultlog 2>&1
brugger's avatar
 
brugger committed
770 771 772
echo "number of database plugins = "\`ls $dist/src/plugins/databases/libI* | wc -l\` >> resultlog 2>&1
echo "number of operator plugins = "\`ls $dist/src/plugins/operators/libI* | wc -l\` >> resultlog 2>&1
echo "number of plot plugins = "\`ls $dist/src/plugins/plots/libI* | wc -l\` >> resultlog 2>&1
hrchilds's avatar
hrchilds committed
773 774
echo ""                                       >> resultlog 2>&1
echo "The database plugins:"                  >> resultlog 2>&1
brugger's avatar
 
brugger committed
775
ls $dist/src/plugins/databases/libI* | sed "s/$dist\/src\/plugins\/databases\/libI//" | sed "s/Database.so//" >> resultlog 2>&1
hrchilds's avatar
hrchilds committed
776
mail  -s "VisIt build ($dist): davinci" $emailName < resultlog
hrchilds's avatar
hrchilds committed
777 778 779 780 781 782
EOF

if [ $davinci = true ]
then
   if [ $test = no ]
   then
783
      echo "Building on davinci"
hrchilds's avatar
hrchilds committed
784 785 786 787 788 789
      scp davinci davinci.nersc.gov:davinci_buildit
      scp $dist.tar.gz davinci.nersc.gov:davinci_$dist.tar.gz
      ssh davinci.nersc.gov "chmod 750 davinci_buildit;./davinci_buildit" &
   fi
fi

brugger's avatar
 
brugger committed
790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829
#
# Build on ellipse.
#
rm -f ellipse
cat <<EOF > ellipse
#!/bin/sh
if test ! -d tmp ; then
   mkdir tmp
fi
if test ! -d tmp/$user ; then
   mkdir tmp/$user
fi
if test ! -d tmp/$user/ellipse; then
   mkdir tmp/$user/ellipse
fi
rm -rf tmp/$user/ellipse/visitbuild
mkdir tmp/$user/ellipse/visitbuild
mv ellipse_$dist.tar.gz tmp/$user/ellipse/visitbuild/$dist.tar.gz
cd tmp/$user/ellipse/visitbuild
gunzip -c $dist.tar.gz | tar xvf - > buildlog 2>&1
cd $dist/src
ver=\`cat VERSION\`
ver2=\`echo \$ver | tr "." "_"\`
env CXXFLAGS=-O2 ./configure --enable-parallel >> ../../buildlog 2>&1
make -j 2 >> ../../buildlog 2>&1
clearcase_bin/visit-bin-dist >> ../../buildlog 2>&1
mv visit\$ver2.linux.tar.gz ../..
cd ../..
rm -f resultlog
echo "        build of visit on ellipse"      > resultlog 2>&1
echo "       ---------------------------"     >> resultlog 2>&1
echo ""                                       >> resultlog 2>&1
ls -l                                         >> resultlog 2>&1
echo ""                                       >> resultlog 2>&1
echo "number of database plugins = "\`ls $dist/src/plugins/databases/libI* | wc -l\` >> resultlog 2>&1
echo "number of operator plugins = "\`ls $dist/src/plugins/operators/libI* | wc -l\` >> resultlog 2>&1
echo "number of plot plugins = "\`ls $dist/src/plugins/plots/libI* | wc -l\` >> resultlog 2>&1
echo ""                                       >> resultlog 2>&1
echo "The database plugins:"                  >> resultlog 2>&1
ls $dist/src/plugins/databases/libI* | sed "s/$dist\/src\/plugins\/databases\/libI//" | sed "s/Database.so//" >> resultlog 2>&1
hrchilds's avatar
hrchilds committed
830
mail  -s "VisIt build ($dist): ellipse" $emailName < resultlog
brugger's avatar
 
brugger committed
831 832 833 834 835 836
EOF

if [ $ellipse = true ]
then
   if [ $test = no ]
   then
837
      echo "Building on ellipse"
brugger's avatar
 
brugger committed
838 839 840 841 842 843
      scp ellipse ellipse.uchicago.edu:ellipse_buildit
      scp $dist.tar.gz ellipse.uchicago.edu:ellipse_$dist.tar.gz
      ssh ellipse.uchicago.edu "chmod 750 ellipse_buildit;./ellipse_buildit" &
   fi
fi

hrchilds's avatar
hrchilds committed
844 845 846 847 848
#
# Clean up.
#
if [ $test = no ]
then
brugger's avatar
 
brugger committed
849
   rm -f hoth sunspot quad up pengra thunder prism yana xchem davinci ellipse
hrchilds's avatar
hrchilds committed
850
fi