#!/bin/bash # #PBS -q four-twelve #PBS -N tst_g77 #PBS -l nodes=1:ppn=2 #PBS -e /home/jmc/test_ACES/output/tst_g77.stderr #PBS -o /home/jmc/test_ACES/output/tst_g77.stdout # $Header: /home/ubuntu/mnt/e9_copy/MITgcm/tools/example_scripts/ACESgrid/Attic/aces_test_g77_adm,v 1.1 2010/05/12 21:52:00 jmc Exp $ # $Name: $ # ACES-grid PBS-batch script for Adjoint test using g77 compiler if test -f /etc/profile.d/modules.sh ; then . /etc/profile.d/modules.sh fi umask 0022 #- to get case insensitive "ls" (and order of tested experiments) export LC_ALL="en_US.UTF-8" TST_DIR="/home/jmc/test_ACES" HERE=$TST_DIR/output sfx='g77' #module add gnu #module add netcdf/3.6.1/icc #export MPI_INC_DIR='/usr/local/pkg/mpich/mpich-intel/include/' OPTFILE="../tools/build_options/linux_ia32_g77" options='-adm' #- need this to get "staf": export PATH="$PATH:$HOME/bin" checkOut=1 #options="$options -nc" ; checkOut=0 #options="$options -q" ; checkOut=0 gcmDIR="MITgcm_$sfx" cd $TST_DIR #- check for disk space: dsp=`df . | tail -1 | awk '{print $5}' | sed 's/%$//'` if [ $dsp -gt 99 ] ; then echo 'Not enough space on this disk => do not run testreport.' df . exit fi if [ $checkOut -eq 1 ] ; then if test -d $gcmDIR/CVS ; then /bin/rm -rf $gcmDIR/verification/tr_aces-${sfx}_????????_? # ( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean ) echo "cvs update of dir $gcmDIR :" ( cd $gcmDIR ; cvs -q -d :pserver:cvsanon@mitgcm.org:/u/gcmpack update -P -d ) else echo "no dir: $gcmDIR/CVS => try a fresh check-out" checkOut=2 fi fi if [ $checkOut -eq 2 ] ; then if test -e $gcmDIR ; then rm -rf $gcmDIR fi cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co -P -d $gcmDIR MITgcm > /dev/null 2>&1 # cvs co MITgcm /usr/bin/find $gcmDIR -type d | xargs chmod g+rxs /usr/bin/find $gcmDIR -type f | xargs chmod g+r else if test -e $gcmDIR/verification ; then echo "dir $gcmDIR/verification exist" else echo "no dir $gcmDIR/verification => exit" exit fi fi cd $gcmDIR/verification echo ./testreport $options -of $OPTFILE -odir aces-$sfx ./testreport $options -of $OPTFILE -odir aces-$sfx #echo -n 'run ./testreport -clean ...' #./testreport $options -clean > /dev/null 2>&1 #echo -n ' done at: ' ; date