/[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

trunk/bin/run-escript revision 3853 by caltinay, Thu Mar 1 07:25:03 2012 UTC branches/py3_attempt2/bin/run-escript revision 3871 by jfenwick, Thu Mar 15 07:06:51 2012 UTC
# Line 62  fi Line 62  fi
62    
63  PYTHON_MPI_NULL="$ESCRIPT_ROOT/lib/pythonMPI"  PYTHON_MPI_NULL="$ESCRIPT_ROOT/lib/pythonMPI"
64  PYTHON_MPI_REDIRECT="$ESCRIPT_ROOT/lib/pythonMPIredirect"  PYTHON_MPI_REDIRECT="$ESCRIPT_ROOT/lib/pythonMPIredirect"
65  PYTHON_CMD=python  PYTHON_CMD=python3
66    
67  # if possible please express paths relative to $ESCRIPT_ROOT unless  # if possible please express paths relative to $ESCRIPT_ROOT unless
68  # they are in an unrelated location  # they are in an unrelated location
# Line 363  else Line 363  else
363      # Check to see if the python version we were compiled with matches the      # Check to see if the python version we were compiled with matches the
364      # one of PYTHON_CMD.      # one of PYTHON_CMD.
365      compversion=`get_buildvar python_version | cut -d. -f1,2`      compversion=`get_buildvar python_version | cut -d. -f1,2`
366      intversion=`$PYTHON_CMD -c 'import sys;print "%d.%d"%(sys.version_info[0], sys.version_info[1])'`  
367        intversion=`$PYTHON_CMD -c 'from __future__ import print_function;import sys;print("%d.%d"%(sys.version_info[0], sys.version_info[1]))'`
368      if [ "$compversion" != "$intversion" ]      if [ "$compversion" != "$intversion" ]
369      then      then
370          echo "Python versions do not match. Escript was compiled for "$compversion"."          echo "Python versions do not match. Escript was compiled for "$compversion"."
# Line 409  then Line 410  then
410     if [ ! -z $HOSTFILE ]     if [ ! -z $HOSTFILE ]
411     then     then
412        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`
413        CMD="mpirun --gmca mpi_warn_on_fork 0 -x ${EXPORT_ENV//,/ -x } --bynode -np $TOTPROC --bind-to-socket --cpus-per-rank $ESCRIPT_NUM_THREADS --host $HOST_LIST $EXEC_CMD"        CMD="mpirun --gmca mpi_warn_on_fork 0 -x ${EXPORT_ENV//,/ -x } --bynode -np $TOTPROC --host $HOST_LIST $EXEC_CMD"
414     else     else
415        CMD="mpirun --gmca mpi_warn_on_fork 0 -x ${EXPORT_ENV//,/ -x } --cpus-per-rank $ESCRIPT_NUM_THREADS -np $TOTPROC $EXEC_CMD"        CMD="mpirun --gmca mpi_warn_on_fork 0 -x ${EXPORT_ENV//,/ -x } -np $TOTPROC $EXEC_CMD"
416     fi     fi
417     if [ ! -z $ESCRIPT_VERBOSE ]; then echo "MPI command is \"$CMD\"."; fi     if [ ! -z $ESCRIPT_VERBOSE ]; then echo "MPI command is \"$CMD\"."; fi
418     $CMD     $CMD

Legend:
Removed from v.3853  
changed lines
  Added in v.3871

  ViewVC Help
Powered by ViewVC 1.1.26