#! /bin/sh
# sh script for running various tests of abinis and abinip
# Actually run different instances of the Run script.
# See the latter script for more information.

# Copyright (C) 2002-2005 ABINIT group (XG,LSi)
# This file is distributed under the terms of the
# GNU General Public License, see ~ABINIT/Infos/copyright
# or http://www.gnu.org/copyleft/gpl.txt .
# For the initials of contributors, see ~ABINIT/Infos/contributors .
#
# Usage under sh-shell:
# ( Runall machine_name [ seq | seqpar ] ) >& log_file  
#
# For example :
# (Runall ibm_pcpm seq) >& log_file    
#
# The list of allowed machine names is mentioned in the Run script

#*****************************************************************************

set -v

if test X$2 = X
then
  echo 'Two arguments must be provided giving machine name and mode '
  echo '( Runall machine_name [ seq | seqpar ] ] >& log_file )'
  exit 1
fi

if test X$2 = Xseq
then
  rm -fr ,runlog* 
  (./Run $1 A 0) 2>&1 1> ,runlogA
  (./Run $1 B 0) 2>&1 1> ,runlogB
  (./Run $1 C 0) 2>&1 1> ,runlogC
  (./Run $1 D 0) 2>&1 1> ,runlogD
  (./Run $1 E 0) 2>&1 1> ,runlogE
  (./Run $1 F 0) 2>&1 1> ,runlogF
  (./Run $1 G 0) 2>&1 1> ,runlogG
  (./Run $1 H 0) 2>&1 1> ,runlogH
  (./Run $1 I 0) 2>&1 1> ,runlogI
  (./Run $1 J 0) 2>&1 1> ,runlogJ

  (./RunTC $1) 2>&1 1> ,runlog9
fi

if test X$2 = Xseqpar
then
  rm -fr runlog*
  (./Run $1 A) 2>&1 1> ,runlogA
  (./Run $1 B) 2>&1 1> ,runlogB
  (./Run $1 C) 2>&1 1> ,runlogC
  (./Run $1 D) 2>&1 1> ,runlogD
  (./Run $1 E) 2>&1 1> ,runlogE
  (./Run $1 F) 2>&1 1> ,runlogF
  (./Run $1 G) 2>&1 1> ,runlogG
  (./Run $1 H) 2>&1 1> ,runlogH
  (./Run $1 I) 2>&1 1> ,runlogI
  (./Run $1 J) 2>&1 1> ,runlogJ

  (./RunTC $1) 2>&1 1> ,runlog9
fi

# ***************************************************************************
