/[escript]/branches/py3_attempt2/bin/run-escript
ViewVC logotype

Diff of /branches/py3_attempt2/bin/run-escript

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

revision 2865 by gross, Fri Jan 22 03:19:32 2010 UTC revision 2867 by gross, Fri Jan 22 06:28:02 2010 UTC
# Line 315  then Line 315  then
315      exit 1      exit 1
316    fi    fi
317  fi  fi
318    if [ -z $@ ]
319    then
320       if [ ! -z $DOBINARY ]
321       then
322           echo "Program must be given."
323           exit 1
324       else
325          DOINTERACTIVE="yes"
326       fi
327    fi
328    
329  #=========================================================================================================  #=========================================================================================================
330  if [ ! -z $DOBINARY ]  if [ ! -z $DOBINARY ]
# Line 401  then Line 411  then
411        else        else
412            if [ ! -z $ESCRIPT_VERBOSE ]; then echo "mpdboot was started with host file $ESCRIPT_HOSTFILE for $ESCRIPT_NUM_NODES nodes."; fi            if [ ! -z $ESCRIPT_VERBOSE ]; then echo "mpdboot was started with host file $ESCRIPT_HOSTFILE for $ESCRIPT_NUM_NODES nodes."; fi
413        fi        fi
414       else
415          mpdboot -n 1 -r ssh
416          if [ $? -ne 0 ]
417          then
418             echo "mpdboot failed."
419             exit 1
420          else
421              if [ ! -z $ESCRIPT_VERBOSE ]; then echo "mpdboot was started."; fi
422          fi
423     fi     fi
424     CMD="mpiexec -perhost $ESCRIPT_NUM_PROCS -envall -n $TOTPROC $EXEC_CMD"     CMD="mpiexec -perhost $ESCRIPT_NUM_PROCS -envall -n $TOTPROC $EXEC_CMD"
425     if [ ! -z $ESCRIPT_VERBOSE ]; then echo "MPI command is \"$CMD\"."; fi     if [ ! -z $ESCRIPT_VERBOSE ]; then echo "MPI command is \"$CMD\"."; fi
426     $CMD     $CMD
427     EXIT_CODE=$?     EXIT_CODE=$?
428     if [ ! -z $HOSTFILE ]     mpdallexit
429     then     if [ ! -z $ESCRIPT_VERBOSE ]; then echo "mpdallexit executed."; fi
        mpdallexit  
        if [ ! -z $ESCRIPT_VERBOSE ]; then echo "mpdallexit executed."; fi  
    fi  
430  #=============== SGI's MPIMPT ===================================  #=============== SGI's MPIMPT ===================================
431  elif [ "$MPI_FLAVOUR" = "MPT" ]  elif [ "$MPI_FLAVOUR" = "MPT" ]
432  then  then
# Line 419  then Line 435  then
435     if [ ! -z $HOSTFILE ]     if [ ! -z $HOSTFILE ]
436     then     then
437        HOST_LIST=`awk 'BEGIN{S=""}{if (S == "") { S = $0 } else {S = S "," $0}}END{print S}' $HOSTFILE`        HOST_LIST=`awk 'BEGIN{S=""}{if (S == "") { S = $0 } else {S = S "," $0}}END{print S}' $HOSTFILE`
438        CMD="mpirun $HOST_LIST $ESCRIPT_NUM_PROCS $EXEC_CMD"        CMD="mpirun $HOST_LIST -np $ESCRIPT_NUM_PROCS $EXEC_CMD"
439     else     else
440        CMD="mpirun -np $TOTPROC $EXEC_CMD"        CMD="mpirun -np $TOTPROC $EXEC_CMD"
441     fi     fi
# Line 453  then Line 469  then
469           else           else
470               if [ ! -z $ESCRIPT_VERBOSE ]; then echo "mpdboot was started with host file $ESCRIPT_HOSTFILE for $ESCRIPT_NUM_NODES nodes."; fi               if [ ! -z $ESCRIPT_VERBOSE ]; then echo "mpdboot was started with host file $ESCRIPT_HOSTFILE for $ESCRIPT_NUM_NODES nodes."; fi
471           fi           fi
472       else
473          mpdboot -n 1 -r ssh
474          if [ $? -ne 0 ]
475          then
476             echo "mpdboot failed."
477             exit 1
478          else
479              if [ ! -z $ESCRIPT_VERBOSE ]; then echo "mpdboot was started."; fi
480          fi
481     fi     fi
482     CMD="mpiexec -genvlist $EXPORT_ENV -np $TOTPROC $EXEC_CMD"     CMD="mpiexec -genvlist $EXPORT_ENV -np $TOTPROC $EXEC_CMD"
483     if [ ! -z $ESCRIPT_VERBOSE ]; then echo "MPI command is \"$CMD\"."; fi     if [ ! -z $ESCRIPT_VERBOSE ]; then echo "MPI command is \"$CMD\"."; fi
484     $CMD     $CMD
485     EXIT_CODE=$?     EXIT_CODE=$?
486     if [ ! -z $HOSTFILE ]     mpdallexit
487     then     if [ ! -z $ESCRIPT_VERBOSE ]; then echo "mpdallexit executed."; fi
        mpdallexit  
        if [ ! -z $ESCRIPT_VERBOSE ]; then echo "mpdallexit executed."; fi  
    fi  
488  else  else
489     echo "unknown MPI flavour '$MPI_FLAVOUR'."     echo "unknown MPI flavour '$MPI_FLAVOUR'."
490  fi  fi

Legend:
Removed from v.2865  
changed lines
  Added in v.2867

  ViewVC Help
Powered by ViewVC 1.1.26