/[escript]/branches/4.0fordebian/run-escript.in
ViewVC logotype

Diff of /branches/4.0fordebian/run-escript.in

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

revision 2806 by caltinay, Fri Dec 4 06:46:13 2009 UTC revision 2866 by gross, Fri Jan 22 05:38:56 2010 UTC
# Line 343  else Line 343  else
343             EXEC_CMD="$PYTHON_CMD $@"             EXEC_CMD="$PYTHON_CMD $@"
344          fi          fi
345      else      else
346          EXEC_CMD="$PYTHON_MPI $@"      if [ ! -z $DOINTERACTIVE ]
347            then
348               EXEC_CMD="$PYTHON_MPI -i $@"
349            else
350               EXEC_CMD="$PYTHON_MPI $@"
351            fi
352      fi      fi
353  fi  fi
354  if [ ! -z $ESCRIPT_VERBOSE ]; then echo "Command to be executed is \"$EXEC_CMD\"."; fi  if [ ! -z $ESCRIPT_VERBOSE ]; then echo "Command to be executed is \"$EXEC_CMD\"."; fi
# Line 396  then Line 401  then
401        else        else
402            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
403        fi        fi
404       else
405          mpdboot -n 1 -r ssh
406          if [ $? -ne 0 ]
407          then
408             echo "mpdboot failed."
409             exit 1
410          else
411              if [ ! -z $ESCRIPT_VERBOSE ]; then echo "mpdboot was started."; fi
412          fi
413     fi     fi
414     CMD="mpiexec -perhost $ESCRIPT_NUM_PROCS -envall -n $TOTPROC $EXEC_CMD"     CMD="mpiexec -perhost $ESCRIPT_NUM_PROCS -envall -n $TOTPROC $EXEC_CMD"
415     if [ ! -z $ESCRIPT_VERBOSE ]; then echo "MPI command is \"$CMD\"."; fi     if [ ! -z $ESCRIPT_VERBOSE ]; then echo "MPI command is \"$CMD\"."; fi
416     $CMD     $CMD
417     EXIT_CODE=$?     EXIT_CODE=$?
418     if [ ! -z $HOSTFILE ]     mpdallexit
419     then     if [ ! -z $ESCRIPT_VERBOSE ]; then echo "mpdallexit executed."; fi
        mpdallexit  
        if [ ! -z $ESCRIPT_VERBOSE ]; then echo "mpdallexit executed."; fi  
    fi  
420  #=============== SGI's MPIMPT ===================================  #=============== SGI's MPIMPT ===================================
421  elif [ "$MPI_FLAVOUR" = "MPT" ]  elif [ "$MPI_FLAVOUR" = "MPT" ]
422  then  then
# Line 414  then Line 425  then
425     if [ ! -z $HOSTFILE ]     if [ ! -z $HOSTFILE ]
426     then     then
427        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`
428        CMD="mpirun $HOST_LIST $ESCRIPT_NUM_PROCS $EXEC_CMD"        CMD="mpirun $HOST_LIST -np $ESCRIPT_NUM_PROCS $EXEC_CMD"
429     else     else
430        CMD="mpirun -np $TOTPROC $EXEC_CMD"        CMD="mpirun -np $TOTPROC $EXEC_CMD"
431     fi     fi
# Line 448  then Line 459  then
459           else           else
460               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
461           fi           fi
462       else
463          mpdboot -n 1 -r ssh
464          if [ $? -ne 0 ]
465          then
466             echo "mpdboot failed."
467             exit 1
468          else
469              if [ ! -z $ESCRIPT_VERBOSE ]; then echo "mpdboot was started."; fi
470          fi
471     fi     fi
472     CMD="mpiexec -genvlist $EXPORT_ENV -np $TOTPROC $EXEC_CMD"     CMD="mpiexec -genvlist $EXPORT_ENV -np $TOTPROC $EXEC_CMD"
473     if [ ! -z $ESCRIPT_VERBOSE ]; then echo "MPI command is \"$CMD\"."; fi     if [ ! -z $ESCRIPT_VERBOSE ]; then echo "MPI command is \"$CMD\"."; fi
474     $CMD     $CMD
475     EXIT_CODE=$?     EXIT_CODE=$?
476     if [ ! -z $HOSTFILE ]     mpdallexit
477     then     if [ ! -z $ESCRIPT_VERBOSE ]; then echo "mpdallexit executed."; fi
        mpdallexit  
        if [ ! -z $ESCRIPT_VERBOSE ]; then echo "mpdallexit executed."; fi  
    fi  
478  else  else
479     echo "unknown MPI flavour '$MPI_FLAVOUR'."     echo "unknown MPI flavour '$MPI_FLAVOUR'."
480  fi  fi

Legend:
Removed from v.2806  
changed lines
  Added in v.2866

  ViewVC Help
Powered by ViewVC 1.1.26