run_para [SRC] [CPP] [JOB] [SCAN]
TOOLS / SCRIPTS



   1 | #!/bin/sh
   2 | 
   3 | source $DOMHOME/HOSTS/$DOM_HOSTTYPE/run_para.inc
   4 | 
   5 | echo " PRISSMA $DOM_VERSION"
   6 | #
   7 | # Detect number of processes
   8 | #
   9 | if [ $# -eq 0 ]
  10 | then
  11 |   NP=1
  12 | else
  13 |   NP=$1
  14 | fi
  15 | 
  16 | # Path definitions
  17 | #
  18 | 
  19 | LOCALDIR=`pwd`
  20 | CHOICESD=$DOMHOME/WORK/INPUT
  21 | PARADIR=$DOMHOME/SOURCES
  22 | 
  23 | #
  24 | # Detect if all files are ready for run
  25 | #
  26 | 
  27 | ECHOICES=0
  28 | DORUN=1
  29 | 
  30 | if [ -f 'prissma.choices' ]
  31 | then
  32 |   ECHOICES=1
  33 | fi
  34 | 
  35 | if [ $ECHOICES -eq 1 ]
  36 | then
  37 |   echo " Choices file found"
  38 | else
  39 |   if [ -f 'domasium.choices' ]
  40 |   then
  41 | 	echo " -- Old domasium.choices file"
  42 |     mv -v domasium.choices prissma.choices
  43 |     DORUN=1
  44 |   else
  45 |     cp $CHOICESD/prissma.choices .
  46 |     echo " -- No prissma.choices file found, copying default file."
  47 |     echo "    Fill the choices file and run again run_para"
  48 |     DORUN=0
  49 |   fi
  50 | fi
  51 | 
  52 | if [ $DORUN -eq 1 ]
  53 | then
  54 |   make -f $PARADIR/Makefile all
  55 |   $MPITOOL -n $NP $DOMHOME/HOSTS/$DOM_HOSTTYPE/mpiprissma_$DOM_VERSION.e_$DOM_HOSTTYPE
  56 | fi
  57 |