#!/bin/csh # 'gamesscygwin' from Ernst Schumacher, 03-09-2010 # This script compiles Gamess-US # on a 32 bit machine under Cygwin # Gfortran, Lapack BLAS libraries cd /home/$USER if ( -e /home/$USER/gamess ) then echo I rename the existing Gamess directory echo to gamess_old mkdir gamess_old mv gamess/* gamess_old endif # get gamess if ((! -e gamess-current.tar.gz ) && (! -e gamess-current.tar.Z )) then echo Please get a gamess source archive from echo http://www.msg.ameslab.gov/GAMESS/dist.menu.html echo put it in this directory and restart gamesscygwin exit endif # unpack the archive into your home directory if ( -e gamess.current.tar.Z ) then zcat gamess-current.tar.Z | tar xvf - else tar xzvf gamess-current.tar.gz endif # clear echo Building and running the current version of Gamess echo as 32-bit Linux version in echo /home/$USER on `uname -s` using echo gamesscygwin script version 2010-09-03 echo with gcc-gfortran v.4.3.2 or higher echo TINKER, VB2000, NEO not enabled echo " " cd ~/gamess # modify Mike's scripts as necessary: # prepare for linux version and get rid of "mike" foreach module ( comp compall lked runall ) mv $module $module.junk sed -e "s/TARGET=ibm64/TARGET=linux32/" \ -e "s/\/u1\/mike/~/" $module.junk > $module rm -f $module.junk end # use gfortran v. 4.3.2 or higher on `uname -m` foreach module ( comp lked ddi/compddi ) mv $module $module.junk sed "s/set FORTRAN=g77/set FORTRAN=gfortran/" $module.junk > $module rm -f $module.junk end mv rungms rungms.junk sed -e "s/set SCR=\/scr\/...../set SCR=\/tmp/" \ -e "s/~mike/~/g" \ -e 's/($NCPUS == 1)/($NCPUS <= 4)/' \ -e 's/HOSTLIST=(`hostname`)/HOSTLIST=(`hostname`:cpus=$NCPUS)/' \ -e "s/Linux) set GMSPATH=\/cu\/mike\/gamess/CYGWIN_NT-5.1) set GMSPATH=~\/gamess/" \ rungms.junk > rungms rm -f rungms.junk mv runall runall.junk sed -e "s/\& exam/\& logs\/exam/" runall.junk > runall rm -f runall.junk cd ddi mv compddi compddi.junk sed -e "s/TARGET = ibm64/TARGET=linux32/" \ -e "s/set SYSV = true/set SYSV = false/" compddi.junk > compddi rm -f compddi.junk chmod a+x compddi # create actvte.x in tools cd ../tools sed "s/^*UNX/ /g" actvte.code > actvte.f gfortran -o actvte.x actvte.f cd checktst mv checktst checktst.junk sed -e "15,21d" \ -e "s/set LOGPATH=./set EXAMPATH=~\/gamess\/logs/" checktst.junk > checktst rm -f checktst.junk chmod a+x checktst cd ../.. chmod a+x comp compall lked rungms runall date +"%D %T" # all scripts modified, begin compilations cd ddi echo building ddikick.x # compile ddikick.x, new, without SystemV support/multinode ./compddi >& compddi.log if ( -e ddikick.x ) then echo ......... success else echo ......... failed: look into ddi/compddi.log exit endif mv ddikick.x .. cd .. # compile and link gamess.00.x echo building gamess.00.x ./compall >& compall.log ./lked gamess 00 >& lked.log if ( -e gamess.00.x) then echo ......... success else echo ......... failed: look into compall.log and lked.log exit endif date +"%D %T" echo " " cd .. # prepare for running the tests if (! -e ~/scr ) then mkdir ~/scr else rm -f ~/scr/* endif if ( -e ~/gamess/logs ) then mv ~/gamess/logs ~/gamess/logs_old endif mkdir ~/gamess/logs cd ~/gamess echo running tests ./runall echo finished date +"%D %T" echo " " cd ~/gamess/tools/checktst ./checktst > ~/gamess/checktst.log cd ~/gamess less checktst.log exit