/[escript]/branches/inv2jf/run-escript.in
ViewVC logotype

Diff of /branches/inv2jf/run-escript.in

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

revision 3891 by caltinay, Thu Mar 1 07:25:03 2012 UTC revision 3892 by jfenwick, Tue Apr 10 08:57:23 2012 UTC
# Line 362  then Line 362  then
362  else  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`      compfull=`get_buildvar python_version`
366      intversion=`$PYTHON_CMD -c 'import sys;print "%d.%d"%(sys.version_info[0], sys.version_info[1])'`      compversion=`echo $compfull | cut -d. -f1,2`
367        compmajor=`echo $compfull | cut -d. -f1`
368        if [ "$PYTHON_CMD" = "python" ] # if people have customised the command they
369        then                                # might not want us changing it
370            if [ "$compmajor" = "3" ]
371            then
372                PYTHON_CMD=python3
373            fi
374        fi
375        intversion=`$PYTHON_CMD -c 'from __future__ import print_function;import sys;print("%d.%d"%(sys.version_info[0], sys.version_info[1]))'`
376      if [ "$compversion" != "$intversion" ]      if [ "$compversion" != "$intversion" ]
377      then      then
378          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 418  then
418     if [ ! -z $HOSTFILE ]     if [ ! -z $HOSTFILE ]
419     then     then
420        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`
421        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"
422     else     else
423        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"
424     fi     fi
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

Legend:
Removed from v.3891  
changed lines
  Added in v.3892

  ViewVC Help
Powered by ViewVC 1.1.26