--- MITgcm/tools/do_tst_2+2 2014/11/11 15:37:40 1.19 +++ MITgcm/tools/do_tst_2+2 2015/10/23 23:11:50 1.20 @@ -1,6 +1,6 @@ #! /usr/bin/env bash -# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/tools/do_tst_2+2,v 1.19 2014/11/11 15:37:40 jmc Exp $ +# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/tools/do_tst_2+2,v 1.20 2015/10/23 23:11:50 jmc Exp $ # $Name: $ usage() @@ -32,10 +32,10 @@ SCRIPT='../tools/tst_2+2' LOGFILE='tst_2+2_out.log' scrArg='All' +bldDir='build' COMMAND= mpi=0 MPI_MFILE= -#OUTDIR=`hostname | sed 's/\..*$//'` OUTDIR=`hostname -s | tr '[:upper:]' '[:lower:]'` SAVELOG=0 ADDRESS= @@ -179,7 +179,7 @@ rCommand=$COMMAND else LOC_NPROC=2 - mpi_size=$xx/build/SIZE.h.mpi + mpi_size=$xx/$bldDir/SIZE.h.mpi if test -f $mpi_size ; then px=`grep '^ & *nPx *=' $mpi_size | sed 's/^ & *nPx *= *//' | sed 's/, *$//'` py=`grep '^ & *nPy *=' $mpi_size | sed 's/^ & *nPy *= *//' | sed 's/, *$//'` @@ -204,13 +204,13 @@ for yy in $listD do if test -f $xx/$yy/$RUNOUTP ; then - if test "x$OPTFILE" = x -a -f $xx/build/Makefile ; then - comm=`grep '^# OPTFILE=' $xx/build/Makefile 2>/dev/null | head -1 | sed 's/^# //'` - echo "from '$xx/build/Makefile', extract:" > $DRESULTS/genmake_state - sed -n '/^# executed by:/,+1 p' $xx/build/Makefile >> $DRESULTS/genmake_state + if test "x$OPTFILE" = x -a -f $xx/$bldDir/Makefile ; then + comm=`grep '^# OPTFILE=' $xx/$bldDir/Makefile 2>/dev/null | head -1 | sed 's/^# //'` + echo "from '$xx/$bldDir/Makefile', extract:" > $DRESULTS/genmake_state + sed -n '/^# executed by:/,+1 p' $xx/$bldDir/Makefile >> $DRESULTS/genmake_state echo " $comm" >> $DRESULTS/genmake_state eval $comm - gmkLog=$xx/build/genmake.log + gmkLog=$xx/$bldDir/genmake.log grep '^Get compiler version using:' $gmkLog > /dev/null 2>&1 out=$? if test "x$out" = x0 ; then