/[escript]/trunk/run-escript.in
ViewVC logotype

Diff of /trunk/run-escript.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/bin/run-escript revision 4973 by sshaw, Wed May 28 06:02:38 2014 UTC trunk/run-escript.in revision 5267 by caltinay, Mon Nov 17 06:48:27 2014 UTC
# Line 1  Line 1 
1  #!/usr/bin/env sh  #!/usr/bin/env sh
2    
3  # Escript/Finley wrapper for python  ##############################################################################
4  # Sets LD_LIBRARY_PATH and PYTHONPATH and then runs either python or the MPI launcher  #
5    # Copyright (c) 2003-2014 by University of Queensland
6    # http://www.uq.edu.au
7    #
8    # Primary Business: Queensland, Australia
9    # Licensed under the Open Software License version 3.0
10    # http://www.opensource.org/licenses/osl-3.0.php
11    #
12    # Development until 2012 by Earth Systems Science Computational Center (ESSCC)
13    # Development 2012-2013 by School of Earth Sciences
14    # Development from 2014 by Centre for Geoscience Computing (GeoComp)
15    #
16    ##############################################################################
17    
18    # Escript wrapper for python
19    # Sets LD_LIBRARY_PATH and PYTHONPATH and then runs either python or the MPI
20    # launcher.
21    
22  #Extra paths can be configured about a page further down  # Extra paths can be configured about a page further down
23  #Search for EXTRA_PATH=""  # Search for EXTRA_PATH=""
24    
25  #set to 1 if performing this is a standalone build and ../../pkg contains the relevant tools  # set to 1 if this is a standalone build and ../../pkg contains the relevant
26    # tools
27  STANDALONE=0  STANDALONE=0
28    
29  #set to 1 if this is part of a packaged build (.deb) and files will be installed in standard locations  # set to 1 if this is part of a packaged build (.deb) and files will be
30  #rather than everything in a single directory  # installed in standard locations rather than everything in a single directory
31  #Do not use this together with $STANDALONE  # Do not use this together with STANDALONE
32  STDLOCATION=0  STDLOCATION=0
33    
34  #Now we find the location of this script  # Now we find the location of this script
35  #Note that this location should be absolute but does not need to be unique  # Note that this location should be absolute but does not need to be unique
36  scriptdir=""  scriptdir=""
37  CURDIR=$(pwd)  CURDIR=$(pwd)
38    
39  #Environment vars which control operations:  # Environment vars which control operations:
40  # ESCRIPT_NUM_NODES, ESCRIPT_NUM_PROCS, ESCRIPT_NUM_THREADS, ESCRIPT_HOSTFILE, ESCRIPT_CREATESTDFILES  # ESCRIPT_NUM_NODES, ESCRIPT_NUM_PROCS, ESCRIPT_NUM_THREADS, ESCRIPT_HOSTFILE, ESCRIPT_CREATESTDFILES
41    
42  HOSTFILE=/tmp/escript.$USER.$$  HOSTFILE=/tmp/escript.$USER.$$
43  HOSTFILE2=/tmp/escript2.$USER.$$  
44    die () {
45        echo "Error: $@" 1>&2
46        exit 1
47    }
48    
49  #Begin finding ESCRIPT_ROOT  #Begin finding ESCRIPT_ROOT
50  if [ $STDLOCATION -ne 0 ]  if [ $STDLOCATION -ne 0 ]
# Line 43  else Line 64  else
64        tscriptdir=$(which $0)        tscriptdir=$(which $0)
65        if [ $? -ne 0 ]        if [ $? -ne 0 ]
66        then        then
67            echo "Error! Unable to determine script directory. Exiting."            die "Unable to determine script directory!"
           exit 1  
68        fi        fi
69        scriptdir=$(dirname $tscriptdir)        scriptdir=$(dirname $tscriptdir)
70    fi    fi
# Line 103  if [ ! -r "$BUILDINFO_FILE" ]; then Line 123  if [ ! -r "$BUILDINFO_FILE" ]; then
123          fi          fi
124          exit 0          exit 0
125      fi      fi
126      echo "Error! Unable to read escript build information. Exiting."      die "Unable to read escript build information!"
     exit 1  
127  fi  fi
128    
129  get_buildvar () {  get_buildvar () {
130      echo $(grep "^$1=" "$BUILDINFO_FILE" |cut -d= -f2)      echo $(grep "^$1=" "$BUILDINFO_FILE" |cut -d= -f2)
131  }  }
132    
 #  
 #   Add VisIt paths if required  
 #  
 WITH_VISIT=$(get_buildvar visit)  
 if [ "$WITH_VISIT" = "1" ]; then  
     VISIT_BIN=$(which visit 2>/dev/null)  
     if [ $? -eq 0 ]; then  
         VISIT_PY_PATH=$($VISIT_BIN -env | grep LIBPATH | cut -d= -f2)  
         EXTRA_PYTHONPATH=$EXTRA_PYTHONPATH:$VISIT_PY_PATH  
         EXTRA_LD_LIBRARY_PATH=$EXTRA_LD_LIBRARY_PATH:$VISIT_PY_PATH  
     elif [ ! -z $ESCRIPT_VERBOSE ]; then  
         echo "VisIt module enabled but VisIt not in path!"  
     fi  
 fi  
   
133  HELP_TEXT="  HELP_TEXT="
134  Usage: run-escript [options] script.py [arguments...]  Usage: run-escript [options] script.py [arguments...]
135      -n nn       number of nodes to use      -n nn       number of nodes to use
# Line 140  Usage: run-escript [options] script.py [ Line 144  Usage: run-escript [options] script.py [
144      -o      redirect output from MPI to files      -o      redirect output from MPI to files
145      -v      print diagnostics      -v      print diagnostics
146      -x      run in new xterm instance      -x      run in new xterm instance
147      -m tool     run with valgrind {tool=m[emcheck]/c[allgrind]}      -m tool     run with valgrind {tool=m[emcheck]/c[allgrind]/[cac]h[egrind]}
148      script.py   Your python script      script.py   Your python script
149      arguments...    The optional command-line arguments to your script      arguments...    The optional command-line arguments to your script
150  "  "
# Line 199  do Line 203  do
203      esac      esac
204  done  done
205  shift $(($OPTIND - 1))  shift $(($OPTIND - 1))
206    
207    vlog () {
208        if [ ! -z $ESCRIPT_VERBOSE ]; then
209            echo "$@"
210        fi
211    }
212    
213  #==============================================  #==============================================
214  #  #
215  #   Read MPI_FLAVOUR and WITH_OPENMP from the buildvars  #   Read MPI_FLAVOUR and WITH_OPENMP from the buildvars
# Line 206  shift $(($OPTIND - 1)) Line 217  shift $(($OPTIND - 1))
217  MPI_FLAVOUR=$(get_buildvar mpi)  MPI_FLAVOUR=$(get_buildvar mpi)
218  WITH_OPENMP=$(get_buildvar openmp)  WITH_OPENMP=$(get_buildvar openmp)
219    
220  if [ ! -z $ESCRIPT_VERBOSE ]; then  vlog "MPI flavour is $MPI_FLAVOUR."
221      echo "MPI flavour is $MPI_FLAVOUR."  if [ "$WITH_OPENMP" = "1" ]; then
222      if [ "$WITH_OPENMP" = "1" ]; then echo "OpenMP enabled."; fi      vlog "OpenMP enabled."
223    else
224        vlog "OpenMP disabled."
225    fi
226    
227    #
228    #   Add VisIt paths if required
229    #
230    WITH_VISIT=$(get_buildvar visit)
231    if [ "$WITH_VISIT" = "1" ]; then
232        VISIT_BIN=$(which visit 2>/dev/null)
233        if [ $? -eq 0 ]; then
234            VISIT_PY_PATH=$($VISIT_BIN -env | grep LIBPATH | cut -d= -f2)
235            EXTRA_PYTHONPATH=$EXTRA_PYTHONPATH:$VISIT_PY_PATH
236            EXTRA_LD_LIBRARY_PATH=$EXTRA_LD_LIBRARY_PATH:$VISIT_PY_PATH
237        else
238            vlog "Warning: VisIt module enabled but VisIt not in path!"
239        fi
240  fi  fi
241    
242  #  #
# Line 223  then Line 251  then
251      export DYLD_LIBRARY_PATH=$EXTRA_DYLD_LIBRARY_PATH:$EXTRA_LD_LIBRARY_PATH:$DYLD_LIBRARY_PATH      export DYLD_LIBRARY_PATH=$EXTRA_DYLD_LIBRARY_PATH:$EXTRA_LD_LIBRARY_PATH:$DYLD_LIBRARY_PATH
252      EXPORT_ENV="$EXPORT_ENV,DYLD_LIBRARY_PATH"      EXPORT_ENV="$EXPORT_ENV,DYLD_LIBRARY_PATH"
253  fi  fi
254  if [ ! -z $ESCRIPT_VERBOSE ]  vlog "PATH = $PATH
255  then  LD_LIBRARY_PATH = $LD_LIBRARY_PATH
256      echo "PATH = $PATH "  PYTHONPATH = $PYTHONPATH"
257      echo "LD_LIBRARY_PATH = $LD_LIBRARY_PATH "  if [ ! -z $DYLD_LIBRARY_PATH ]; then
258      echo "PYTHONPATH = $PYTHONPATH "      vlog "DYLD_LIBRARY_PATH = $DYLD_LIBRARY_PATH"
     if [ ! -z $DYLD_LIBRARY_PATH ]; then echo "DYLD_LIBRARY_PATH = $DYLD_LIBRARY_PATH "; fi  
259  fi  fi
260    
261  #==============================================  #==============================================
262  #  #
263  #  Ensure the variables have sensible values  #  Ensure the variables have sensible values
# Line 263  else Line 291  else
291      then      then
292          if [ -f "$ESCRIPT_HOSTFILE" ]          if [ -f "$ESCRIPT_HOSTFILE" ]
293          then          then
294              cat "$ESCRIPT_HOSTFILE" | sort -u > $HOSTFILE              sort -u "${ESCRIPT_HOSTFILE}" > $HOSTFILE
295              NUM_HOSTS=$(cat "$HOSTFILE" | wc -l)              HOSTLIST=$(awk 'BEGIN{S=""}{if (S == "") { S = $0 } else {S = S "," $0}}END{print S}' "$HOSTFILE")
296    
297                NUM_HOSTS=$(wc -l "$HOSTFILE")
298              if [ ! -z $ESCRIPT_NUM_NODES ]              if [ ! -z $ESCRIPT_NUM_NODES ]
299              then              then
300                  if [ $NUM_HOSTS -ne $ESCRIPT_NUM_NODES ]                  if [ $NUM_HOSTS -ne $ESCRIPT_NUM_NODES ]
301                  then                  then
302                      echo "number of hosts selected in the host file $ESCRIPT_HOSTFILE needs to match the requested number of nodes $ESCRIPT_NUM_NODES."                      die "Number of hosts selected in the host file $ESCRIPT_HOSTFILE needs to match the requested number of nodes $ESCRIPT_NUM_NODES!"
                     exit 1  
303                  fi                  fi
304               else               else
305                  ESCRIPT_NUM_NODES=$NUM_HOSTS                  ESCRIPT_NUM_NODES=$NUM_HOSTS
306               fi               fi
307          else          else
308             echo "cannot find hostfile $ESCRIPT_HOSTFILE."             die "Cannot find hostfile $ESCRIPT_HOSTFILE!"
            exit 1  
309          fi          fi
310      else      else
311          HOSTFILE=''          echo "localhost" > $HOSTFILE
312            HOSTLIST="localhost"
313      fi      fi
314    
315      if [ -z $ESCRIPT_NUM_NODES ]      if [ -z $ESCRIPT_NUM_NODES ]
# Line 293  else Line 322  else
322          ESCRIPT_NUM_PROCS=1          ESCRIPT_NUM_PROCS=1
323      fi      fi
324    
325      if [ ! -z $ESCRIPT_VERBOSE ]      vlog "ESCRIPT_NUM_NODES = $ESCRIPT_NUM_NODES\nESCRIPT_NUM_PROCS = $ESCRIPT_NUM_PROCS"
     then  
         echo "ESCRIPT_NUM_NODES = $ESCRIPT_NUM_NODES "  
         echo "ESCRIPT_NUM_PROCS = $ESCRIPT_NUM_PROCS "  
     fi  
326  fi  fi
327    
328  if [ "$WITH_OPENMP" = "1" ]  if [ "$WITH_OPENMP" = "1" ]
329  then  then
330     if [ -z $ESCRIPT_NUM_THREADS ]      if [ -z $ESCRIPT_NUM_THREADS ]
331     then      then
332          ESCRIPT_NUM_THREADS=$OMP_NUM_THREADS          ESCRIPT_NUM_THREADS=$OMP_NUM_THREADS
333          if [ -z $ESCRIPT_NUM_THREADS ]          if [ -z $ESCRIPT_NUM_THREADS ]
334          then          then
335             ESCRIPT_NUM_THREADS=1              ESCRIPT_NUM_THREADS=1
336          fi          fi
337     fi      fi
338     if [ ! -z $ESCRIPT_VERBOSE ]      vlog "ESCRIPT_NUM_THREADS = $ESCRIPT_NUM_THREADS"
    then  
         echo "ESCRIPT_NUM_THREADS is $ESCRIPT_NUM_THREADS."  
    fi  
339  else  else
340     if [ ! -z $ESCRIPT_NUM_THREADS ] && [ $ESCRIPT_NUM_THREADS != 1 ]      if [ ! -z $ESCRIPT_NUM_THREADS ] && [ $ESCRIPT_NUM_THREADS != 1 ]
341     then      then
342         echo "Warning: OpenMP is disabled but number of threads requested is $ESCRIPT_NUM_THREADS!=1. Running without threads."         echo "Warning: OpenMP is disabled but number of threads requested is $ESCRIPT_NUM_THREADS!=1. Option ignored."
343     fi      fi
344     ESCRIPT_NUM_THREADS=1      ESCRIPT_NUM_THREADS=1
345  fi  fi
346    
347  #  #
348  # Now we compute total number of Processes  # Now we compute total number of Processes
349  #  #
350  TOTPROC=$((ESCRIPT_NUM_NODES * ESCRIPT_NUM_PROCS))  TOTPROC=$((ESCRIPT_NUM_NODES * ESCRIPT_NUM_PROCS))
351  if [ $? -ne 0 ]     #Some compute error  if [ $? -ne 0 ] #Some compute error
352  then            #This could happen if the args were not a number  then            #This could happen if the args were not a number
353      echo "expression of total number of processors = $ESCRIPT_NUM_NODES * $ESCRIPT_NUM_PROCS is not numerical."      die "Expression of total number of processors = $ESCRIPT_NUM_NODES * $ESCRIPT_NUM_PROCS is not numerical!"
354      exit 1  fi
355    
356    # set up thread binding if unset
357    if [ "$OMP_PROC_BIND" = "" ]; then
358        #Force OpenMP binding for Intel (and GCC, though GCC is on by default)
359        export OMP_PROC_BIND=true
360    fi
361    if [ "$KMP_AFFINITY" = "" ]; then
362        #Set the style of binding (overrides OMP_PROC_BIND in many cases)
363        export KMP_AFFINITY=verbose,compact
364  fi  fi
365    
366  #  #
# Line 336  fi Line 368  fi
368  #  #
369  if ([ ! -z $DO_INTERACTIVE ] || [ $# -eq 0 ]) && ([ $TOTPROC -gt 1 ])  if ([ ! -z $DO_INTERACTIVE ] || [ $# -eq 0 ]) && ([ $TOTPROC -gt 1 ])
370  then  then
371      echo "Interactive mode cannot be used with more than one process"      die "Interactive mode cannot be used with more than one process!"
     exit 1  
372  fi  fi
373    
374  if [ $TOTPROC -gt 1 ]  if [ $TOTPROC -gt 1 ]
# Line 357  if [ $# -eq 0 ] Line 388  if [ $# -eq 0 ]
388  then  then
389      if [ ! -z $DO_BINARY ]      if [ ! -z $DO_BINARY ]
390      then      then
391          echo "No program to run was specified. Exiting."          die "No program to run was specified!"
         exit 1  
392      else      else
393          DO_INTERACTIVE=y          DO_INTERACTIVE=y
394      fi      fi
# Line 386  then Line 416  then
416              LOGFILE=${LOGDIR}/callgrind.%p.xml              LOGFILE=${LOGDIR}/callgrind.%p.xml
417              VALGRIND="valgrind --tool=callgrind --callgrind-out-file=$LOGFILE"              VALGRIND="valgrind --tool=callgrind --callgrind-out-file=$LOGFILE"
418              EXEC_CMD="$EXEC_CMD $VALGRIND"              EXEC_CMD="$EXEC_CMD $VALGRIND"
419            elif [ $VG_TOOL = "h" ];
420            then
421                # run cachegrind
422                LOGFILE=${LOGDIR}/cachegrind.%p.xml
423                VALGRIND="valgrind --tool=cachegrind --cachegrind-out-file=$LOGFILE"
424                EXEC_CMD="$EXEC_CMD $VALGRIND"
425          else          else
426              # run memcheck by default              # run memcheck by default
427              LAST_N=$(ls -1 $LOGDIR|grep "^memcheck"|tail -1|cut -d. -f2)              LAST_N=$(ls -1 $LOGDIR|grep "^memcheck"|tail -1|cut -d. -f2)
# Line 395  then Line 431  then
431              EXEC_CMD="$EXEC_CMD $VALGRIND"              EXEC_CMD="$EXEC_CMD $VALGRIND"
432          fi          fi
433      else      else
434          echo "Execution with valgrind requested but valgrind not in path!"          die "Execution with valgrind requested but valgrind not in path!"
         exit 1  
435      fi      fi
436  fi  fi
437    
# Line 419  else Line 454  else
454      intversion=$($PYTHON_CMD -c 'from __future__ import print_function;import sys;print("%d.%d"%(sys.version_info[0], sys.version_info[1]))')      intversion=$($PYTHON_CMD -c 'from __future__ import print_function;import sys;print("%d.%d"%(sys.version_info[0], sys.version_info[1]))')
455      if [ "$compversion" != "$intversion" ]      if [ "$compversion" != "$intversion" ]
456      then      then
457          echo "Python versions do not match. Escript was compiled for "$compversion"."          die "Python versions do not match. Escript was compiled for '$compversion'.
458          echo "Current version of Python appears to be "$intversion"."  Current version of Python appears to be '$intversion'."
         exit 1  
459      fi      fi
460      if [ "$MPI_FLAVOUR" = "none" ]      if [ "$MPI_FLAVOUR" = "none" ]
461      then      then
# Line 440  else Line 474  else
474          fi          fi
475      fi      fi
476  fi  fi
477  if [ ! -z $ESCRIPT_VERBOSE ]; then echo "Command to be executed is \"$EXEC_CMD\"."; fi  vlog "Command to be executed is \"$EXEC_CMD\""
478  #==============================================================================  #==============================================================================
479  #  #
480  #   now we start to spawn things:  #   now we start to spawn things:
# Line 450  then Line 484  then
484     export OMP_NUM_THREADS=$ESCRIPT_NUM_THREADS     export OMP_NUM_THREADS=$ESCRIPT_NUM_THREADS
485     EXPORT_ENV="$EXPORT_ENV,OMP_NUM_THREADS"     EXPORT_ENV="$EXPORT_ENV,OMP_NUM_THREADS"
486  fi  fi
487  EXIT_CODE=1  
488  #=============== no MPI ===================================  vlog "Pre-launch command: \"@@PRELAUNCH\""
489  if [ "$MPI_FLAVOUR" = "none" ]  @@PRELAUNCH
490  then  vlog "Launch command: \"@@LAUNCH\""
491     $EXEC_CMD  @@LAUNCH
492     EXIT_CODE=$?  EXIT_CODE=$?
493  #=============== OpenMPI ===================================  vlog "Post-launch command: \"@@POSTLAUNCH\""
494  elif [ "$MPI_FLAVOUR" = "OPENMPI" ]  @@POSTLAUNCH
 then  
    EXPORT_ENV=$(echo $EXPORT_ENV|sed -e 's/,/ -x /g')  
    if [ ! -z "$HOSTFILE" ]  
    then  
       HOST_LIST=$(sort -u "$HOSTFILE" | awk 'BEGIN{S=""}{if (S == "") { S = $0 } else {S = S "," $0}}END{print S}')  
       CMD="mpirun --gmca mpi_warn_on_fork 0 -x ${EXPORT_ENV} --bynode --bind-to-none --host $HOST_LIST -np $TOTPROC $EXEC_CMD"  
    else  
       CMD="mpirun --gmca mpi_warn_on_fork 0 -x ${EXPORT_ENV} --cpus-per-rank $ESCRIPT_NUM_THREADS -np $TOTPROC $EXEC_CMD"  
    fi  
    if [ ! -z $ESCRIPT_VERBOSE ]; then echo "MPI command is \"$CMD\"."; fi  
    $CMD  
    EXIT_CODE=$?  
   
 #=============== Intel MPI ===================================  
 elif [ "$MPI_FLAVOUR" = "INTELMPI" ]  
 then  
   
    if [ "$WITH_OPENMP" = "1" ]  
    then  
        export I_MPI_PIN_DOMAIN=omp  
        EXPORT_ENV="$EXPORT_ENV,I_MPI_PIN_DOMAIN"  
    fi  
   
    if [ ! -z "$HOSTFILE" ]  
    then  
       mpdboot -n $ESCRIPT_NUM_NODES -r ssh -f "$HOSTFILE"  
       if [ $? -ne 0 ]  
       then  
          echo "mpdboot with host file $HOSTFILE for $ESCRIPT_NUM_NODES nodes failed."  
          exit 1  
       else  
           if [ ! -z $ESCRIPT_VERBOSE ]; then echo "mpdboot was started with host file $HOSTFILE for $ESCRIPT_NUM_NODES nodes."; fi  
       fi  
    else  
       mpdboot -n 1 -r ssh  
       if [ $? -ne 0 ]  
       then  
          echo "mpdboot failed."  
          exit 1  
       else  
           if [ ! -z $ESCRIPT_VERBOSE ]; then echo "mpdboot was started."; fi  
       fi  
    fi  
    CMD="mpiexec -perhost $ESCRIPT_NUM_PROCS -envall -n $TOTPROC $EXEC_CMD"  
    if [ ! -z $ESCRIPT_VERBOSE ]; then echo "MPI command is \"$CMD\"."; fi  
    $CMD  
    EXIT_CODE=$?  
    mpdallexit  
    if [ ! -z $ESCRIPT_VERBOSE ]; then echo "mpdallexit executed."; fi  
 #=============== SGI's MPIMPT ===================================  
 elif [ "$MPI_FLAVOUR" = "MPT" ]  
 then  
    export MPI_NUM_MEMORY_REGIONS=0  
    EXPORT_ENV="$EXPORT_ENV,MPI_NUM_MEMORY_REGIONS"  
    if [ ! -z "$HOSTFILE" ]  
    then  
       HOST_LIST=$(awk 'BEGIN{S=""}{if (S == "") { S = $0 } else {S = S "," $0}}END{print S}' "$HOSTFILE")  
       CMD="mpirun $HOST_LIST -np $ESCRIPT_NUM_PROCS $EXEC_CMD"  
    else  
       CMD="mpirun -np $TOTPROC $EXEC_CMD"  
    fi  
    if [ ! -z $ESCRIPT_VERBOSE ]; then echo "MPI command is \"$CMD\"."; fi  
    $CMD  
    EXIT_CODE=$?  
 #=============== MPICH ===================================  
 elif [ "$MPI_FLAVOUR" = "MPICH" ]  
 then  
    if [ ! -z "$HOSTFILE" ]  
    then  
       touch "$HOSTFILE2"  
       for i in $(seq $ESCRIPT_NUM_PROCS); do cat "$HOSTFILE" >> "$HOSTFILE2"; done  
       CMD="mpirun -machinefile \"$HOSTFILE2\" -np $TOTPROC $EXEC_CMD"  
    else  
       CMD="mpirun -np $TOTPROC $EXEC_CMD"  
    fi  
    if [ ! -z $ESCRIPT_VERBOSE ]; then echo "MPI command is \"$CMD\"."; fi  
    $CMD  
    EXIT_CODE=$?  
 #=============== MPICH2 ===================================  
 elif [ "$MPI_FLAVOUR" = "MPICH2" ]  
 then  
    if [ ! -z "$HOSTFILE" ]  
    then  
          mpdboot -n $ESCRIPT_NUM_NODES -r ssh -f "$HOSTFILE"  
          if [ $? -ne 0 ]  
          then  
             echo "mpdboot with host file $HOSTFILE for $ESCRIPT_NUM_NODES nodes failed."  
             exit 1  
          else  
              if [ ! -z $ESCRIPT_VERBOSE ]; then echo "mpdboot was started with host file $HOSTFILE for $ESCRIPT_NUM_NODES nodes."; fi  
          fi  
    else  
       mpdboot -n 1 -r ssh  
       if [ $? -ne 0 ]  
       then  
          echo "mpdboot failed."  
          exit 1  
       else  
           if [ ! -z $ESCRIPT_VERBOSE ]; then echo "mpdboot was started."; fi  
       fi  
    fi  
    CMD="mpiexec -genvlist $EXPORT_ENV -np $TOTPROC $EXEC_CMD"  
    if [ ! -z $ESCRIPT_VERBOSE ]; then echo "MPI command is \"$CMD\"."; fi  
    $CMD  
    EXIT_CODE=$?  
    mpdallexit  
    if [ ! -z $ESCRIPT_VERBOSE ]; then echo "mpdallexit executed."; fi  
 else  
    echo "unknown MPI flavour '$MPI_FLAVOUR'."  
 fi  
495    
496  if [ ! -z "$DO_VALGRIND" ]; then  if [ ! -z "$DO_VALGRIND" ]; then
497     echo "Valgrind log file written to ${LOGFILE}"     echo "Valgrind log file written to ${LOGFILE}"
498  fi  fi
499    
500    rm -f $HOSTFILE
501    
502  exit $EXIT_CODE  exit $EXIT_CODE
503    

Legend:
Removed from v.4973  
changed lines
  Added in v.5267

  ViewVC Help
Powered by ViewVC 1.1.26