#!/bin/csh -f #TEST-PROGRAM sander #TEST-DESCRIP TO_BE_DEtermined #TEST-PURPOSE regression, basic #TEST-STATE undocumented ../../check_TeraChem.x if( $status > 0) then exit(0) endif set sander = "../../../bin/sander" if( $?TESTsander ) then set sander = $TESTsander endif set can_do_mpi=0 if( `echo $sander | grep "MPI"` != '') then echo 'Using MPI version of sander' set can_do_mpi=1 endif set mpi=0 if( ! $?DO_PARALLEL ) then set DO_PARALLEL=' ' echo "Running test using file-based exchange (DO_PARALLEL not set)" echo "Parallelism treated within TeraChem" else if( $can_do_mpi == 1 ) then echo "Running test using MPI data exchange (DO_PARALLEL is set)" echo "Parallelism treated within TeraChem" set mpi=1 set numprocs = `$DO_PARALLEL ../../numprocs` if ( $numprocs > 1 ) then echo "This test requires >> mpirun -np 1 <<" echo "You specified >> mpirun -np $numprocs <<" exit 0 endif else echo "Can not do an MPI run using serial version of sander." echo "Unset DO_PARALLEL to perform serial test" exit(1) endif endif cat > mdin < tc_job.dat & endif touch dummy $DO_PARALLEL $sander -O -p nma-spcfw-15.prmtop -c nma-spcfw-15.restrt -o $output -r $restrt < dummy || goto error grep -v 'mpi' $output | grep -v 'ngpus' | grep -v 'gpuids' | grep -v 'root_number' | grep -v 'executable' > $output.tmp mv $output.tmp $output # We do this due to rounding errors when reading from a file in the file-based # data exchange vs receiving the data through MPI ../../dacdif -a 0.0003 $output.save $output ../../dacdif -a 0.0003 $restrt.save $restrt /bin/rm -f mdin mdinfo mdcrd dummy inpfile.xyz ptchrg.xyz startfile tc_job.* old.tc* /bin/rm -r scr exit(0) error: echo " ${0}: Program error" exit(1)