#!/bin/bash # #PBS -q four-twelve #PBS -N tst_gnu #PBS -l nodes=2:ppn=2 #PBS -e /home/jmc/test_ACES/output/tst_gnu.stderr #PBS -o /home/jmc/test_ACES/output/tst_gnu.stdout # $Header: /home/ubuntu/mnt/e9_copy/MITgcm/tools/example_scripts/ACESgrid/Attic/aces_test_gnu_mpi,v 1.12 2010/04/01 15:46:03 jmc Exp $ # $Name: $ if test -f /etc/profile.d/modules.sh ; then . /etc/profile.d/modules.sh fi # Note: added "ulimit -s unlimited" in file "~/.bashrc" # to pass big test (the 2 fizhi-cs-* test & adjoint tests) with MPI 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 #cd $HERE sfx='gnu' module add mpich/$sfx OPTFILE="../tools/build_options/linux_ia32_g77+mpi_aces" options='-j 2 -mpi' checkOut=1 #options="$options -nc" ; checkOut=0 #options="$options -q" ; checkOut=0 MF=$HERE"/mf_"$sfx cat $PBS_NODEFILE | sort | uniq > $MF NCPU=`wc -l $MF | awk '{print $1}'` EXE="mpirun -machinefile $MF -v -np $NCPU ./mitgcmuv" 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/??_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 # avoid hanging in fizhi-cs-32x32x40 (due to I/O problems with g77) echo ./testreport $options -of $OPTFILE -command \"$EXE\" -odir aces-$sfx \ -skd fizhi-cs-32x32x40 ./testreport $options -of $OPTFILE -command "$EXE" -odir aces-$sfx \ -skd fizhi-cs-32x32x40