/[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 3193 by gross, Tue Sep 21 06:56:44 2010 UTC revision 3259 by jfenwick, Mon Oct 11 01:48:14 2010 UTC
# Line 65  if [ ! -r $BUILDINFO_FILE ]; then Line 65  if [ ! -r $BUILDINFO_FILE ]; then
65  fi  fi
66    
67  function get_buildvar {  function get_buildvar {
68      echo `grep $1 $BUILDINFO_FILE |cut -d= -f2`      echo `grep "^$1=" $BUILDINFO_FILE |cut -d= -f2`
69  }  }
70    
71  PYTHON_MPI_NULL="$ESCRIPT_ROOT/lib/pythonMPI"  PYTHON_MPI_NULL="$ESCRIPT_ROOT/lib/pythonMPI"
# Line 92  fi Line 92  fi
92  #  #
93  #   Add VisIt paths if required  #   Add VisIt paths if required
94  #  #
95  WITH_VISIT=`get_buildvar usevisit`  WITH_VISIT=`get_buildvar visit`
96  if [ "$WITH_VISIT" = "y" ]; then  if [ "$WITH_VISIT" = "1" ]; then
97      VISIT_BIN=`which visit`      VISIT_BIN=`which visit`
98      if [ $? -eq 0 ]; then      if [ $? -eq 0 ]; then
99          VISIT_PY_PATH=`$VISIT_BIN -env | grep LIBPATH | cut -d= -f2`          VISIT_PY_PATH=`$VISIT_BIN -env | grep LIBPATH | cut -d= -f2`
# Line 183  shift `expr $OPTIND - 1` Line 183  shift `expr $OPTIND - 1`
183  #  #
184  #   Read MPI_FLAVOUR and WITH_OPENMP from the buildvars  #   Read MPI_FLAVOUR and WITH_OPENMP from the buildvars
185  #  #
186  MPI_FLAVOUR=`get_buildvar mpi_flavour`  MPI_FLAVOUR=`get_buildvar mpi`
187  WITH_OPENMP=`get_buildvar useopenmp`  WITH_OPENMP=`get_buildvar openmp`
188    
189  if [ ! -z $ESCRIPT_VERBOSE ]; then  if [ ! -z $ESCRIPT_VERBOSE ]; then
190      echo "MPI flavour is $MPI_FLAVOUR."      echo "MPI flavour is $MPI_FLAVOUR."
191      if [ "$WITH_OPENMP" = "y" ]; then echo "OpenMP enabled."; fi      if [ "$WITH_OPENMP" = "1" ]; then echo "OpenMP enabled."; fi
192  fi  fi
193    
194  #  #
# Line 278  else Line 278  else
278      fi      fi
279  fi  fi
280    
281  if [ "$WITH_OPENMP" = "y" ]  if [ "$WITH_OPENMP" = "1" ]
282  then  then
283     if [ -z $ESCRIPT_NUM_THREADS ]     if [ -z $ESCRIPT_NUM_THREADS ]
284     then     then
# Line 349  then Line 349  then
349  else  else
350      # 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
351      # one of PYTHON_CMD.      # one of PYTHON_CMD.
352      compversion=`get_buildvar python`      compversion=`get_buildvar python_version`
353      intversion=`$PYTHON_CMD -c 'import sys;print "%d.%d.%d"%(sys.version_info[0], sys.version_info[1], sys.version_info[2])'`      intversion=`$PYTHON_CMD -c 'import sys;print "%d.%d.%d"%(sys.version_info[0], sys.version_info[1], sys.version_info[2])'`
354      if [ "$compversion" != "$intversion" ]      if [ "$compversion" != "$intversion" ]
355      then      then
# Line 379  if [ ! -z $ESCRIPT_VERBOSE ]; then echo Line 379  if [ ! -z $ESCRIPT_VERBOSE ]; then echo
379  #  #
380  #   now we start to spwan things:  #   now we start to spwan things:
381  #  #
382  if [ "$WITH_OPENMP" = "y" ]  if [ "$WITH_OPENMP" = "1" ]
383  then  then
384     export OMP_NUM_THREADS=$ESCRIPT_NUM_THREADS     export OMP_NUM_THREADS=$ESCRIPT_NUM_THREADS
385     EXPORT_ENV="$EXPORT_ENV,OMP_NUM_THREADS"     EXPORT_ENV="$EXPORT_ENV,OMP_NUM_THREADS"
# Line 408  then Line 408  then
408  elif [ "$MPI_FLAVOUR" = "INTELMPI" ]  elif [ "$MPI_FLAVOUR" = "INTELMPI" ]
409  then  then
410    
411     if [ "$WITH_OPENMP" = "y" ]     if [ "$WITH_OPENMP" = "1" ]
412     then     then
413         export I_MPI_PIN_DOMAIN=omp         export I_MPI_PIN_DOMAIN=omp
414         EXPORT_ENV="$EXPORT_ENV, I_MPI_PIN_DOMAIN"         EXPORT_ENV="$EXPORT_ENV, I_MPI_PIN_DOMAIN"

Legend:
Removed from v.3193  
changed lines
  Added in v.3259

  ViewVC Help
Powered by ViewVC 1.1.26