#!/bin/sh set -vx pwd echo $PATH export PATH="${PATH}:/usr/local/bin" # Checkout, build, test, and benchmark Amber periodically # using the at batch queue. # Log files are created, eg, # bench.out.2003-09-29, test.out.2003-09-29, build.out.2003-09-29 # # Modify these variables for your platform: # config, base, scratch, cvspath, CVSROOT, CVS_RSH: # $config - the arguments to Amber's configure. # $parallel - the arguments to Amber's configure. # $base/$archive - the location for the storage of the build, test, # and benchmark logs. ## Unused: $base/$bin - the location of this script. # $scratch - the location for temporary storage of the Amber CVS tree. # $cvspath - the location of the cvs command. # $CVSROOT - the location of the cvs repository. # $CVS_RSH - the cvs remote connection protocol. # # initialize # config=gnu parallel=mpi base=$HOME if [ ! -d $base ]; then mkdir $base; fi scratch=/tmp amber=amber archive=$base/amber/qa/`hostname` if [ ! -d $base/amber ]; then mkdir $base/amber; fi if [ ! -d $base/amber/qa ]; then mkdir $base/amber/qa; fi if [ ! -d $archive ]; then mkdir $archive; fi export AMBERHOME=$scratch/$amber bench_output=$AMBERHOME/bench.out build_output=$AMBERHOME/build.out search_tag='@@' test_output=$AMBERHOME/test.out export PATH="${AMBERHOME}/bin:${PATH}" export AMBERBUILDFLAGS='' echo "AMBERBUILDFLAGS = $AMBERBUILDFLAGS" export MKL_HOME='' echo "MKL_HOME = $MKL_HOME" module unload mpi module load mvapich2-1.5-gnu export MPI_HOME=$MPICH_HOME echo "MPI_HOME = $MPI_HOME" # # build # cd $scratch # remove previous night's test. rm -rf $amber git clone gitosis@git.ambermd.org:amber.git amber cd $amber git checkout master chmod -R go-rwx * echo $search_tag # AmberTools cd $AMBERHOME/AmberTools/src which g++ g++ -v ./configure $config echo "AMBERBUILDFLAGS = $AMBERBUILDFLAGS" 1> $build_output 2>&1 make -e -i install 1>> $build_output 2>&1 # Amber cd $AMBERHOME/src make -e -i serial 1>> $build_output 2>&1 # not temporarily stop parallel testing if [ ! -z $parallel ]; then #if [ 2 -eq 3 -a ! -z $parallel ]; then cd $AMBERHOME/AmberTools/src make -e -i clean 1> /dev/null 2>&1 ./configure -$parallel $config cd $AMBERHOME/src make -e -i clean 1> /dev/null 2>&1 make -e -i parallel 1>> $build_output 2>&1 cd $AMBERHOME/AmberTools/src make -e -i parallel 1>> $build_output 2>&1 fi # cat $build_output | mail -s "$0 build output" $USER grep Error $build_output cp -p $build_output $archive/$build_output.`date +%Y-%m-%d` # # test # typeset +x DO_PARALLEL typeset +x TESTgibbs typeset +x TESTptraj typeset +x TESTsander typeset +x TESTsanderLES cd $AMBERHOME/AmberTools/test/ echo "AMBERBUILDFLAGS = $AMBERBUILDFLAGS" 1> $test_output 2>&1 make -i test 1>> $test_output 2>&1 make -i check 1>> $test_output make -i clean 1> /dev/null 2>&1 cd $AMBERHOME/test/ make -i test 1>> $test_output 2>&1 make -i check 1>> $test_output make -i clean 1> /dev/null 2>&1 # not temporarily stop parallel testing if [ ! -z $parallel ]; then #if [ 2 -eq 3 -a ! -z $parallel ]; then #export PATH="${MPI_HOME}/bin:${PATH}" echo ".Begin parallel testing" 1>> $test_output 2>&1 export DO_PARALLEL="mpiexec " cd $AMBERHOME/test/ make -i test.parallel 1>> $test_output 2>&1 make -i check 1>> $test_output cd $AMBERHOME/AmberTools/test/ make -i test.parallel 1>> $test_output 2>&1 make -i check 1>> $test_output fi # cat $test_output | mail -s "$0 test output" $USER echo; grep -E '^\.|error' $test_output | grep -v 'Ewald error estimate:' cp -p $test_output $archive/$test_output.`date +%Y-%m-%d` exit # # benchmark # cd ../benchmarks/ echo "AMBERBUILDFLAGS = $AMBERBUILDFLAGS" 1> ../$bench_output 2>&1 if [ ! -z $parallel ]; then export TESTsander=../../bin/sander.MPI fi make -i bench.sander 1>> ../$bench_output 2>&1 make -i check 1>> ../$bench_output make -i summary 1>> ../$bench_output # cat ../$bench_output | mail -s "$0 bench output" $USER echo; grep -E 'Total time|^FAILURE' ../$bench_output cp -p ../$bench_output $archive/$bench_output.`date +%Y-%m-%d` # # terminate # sleep 40000 if [ ! -z $parallel ]; then lamhalt -v fi #at -m -f $base/bin/nightly_test 1am tomorrow #at -m -f $AMBERHOME/test/nightly_test 1am tomorrow cd .. cd .. echo $search_tag # this may be causing cvs locks when files are renamed. # and remove the previous night's directory at the start. #cvs -Q release -d $amber << EOF exit