/[escript]/trunk/run-escript.in
ViewVC logotype

Diff of /trunk/run-escript.in

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

revision 4993 by sshaw, Thu Jun 5 03:04:56 2014 UTC revision 5148 by caltinay, Mon Sep 15 01:25:23 2014 UTC
# Line 22  CURDIR=$(pwd) Line 22  CURDIR=$(pwd)
22  #Environment vars which control operations:  #Environment vars which control operations:
23  # ESCRIPT_NUM_NODES, ESCRIPT_NUM_PROCS, ESCRIPT_NUM_THREADS, ESCRIPT_HOSTFILE, ESCRIPT_CREATESTDFILES  # ESCRIPT_NUM_NODES, ESCRIPT_NUM_PROCS, ESCRIPT_NUM_THREADS, ESCRIPT_HOSTFILE, ESCRIPT_CREATESTDFILES
24    
25    #set up thread binding if unset
26    if [ "$OMP_PROC_BIND" = "" ]; then
27        #Force OpenMP binding for Intel (and GCC, though GCC is on by default)
28        export OMP_PROC_BIND=true
29    fi
30    if [ "$KMP_AFFINITY" = "" ]; then
31        #Set the style of binding (overrides OMP_PROC_BIND in many cases)
32        export KMP_AFFINITY=verbose,compact
33    fi
34    
35  HOSTFILE=/tmp/escript.$USER.$$  HOSTFILE=/tmp/escript.$USER.$$
36  HOSTFILE2=/tmp/escript2.$USER.$$  HOSTFILE2=/tmp/escript2.$USER.$$
37    
# Line 465  then Line 475  then
475        HOST_LIST=$(sort -u "$HOSTFILE" | awk 'BEGIN{S=""}{if (S == "") { S = $0 } else {S = S "," $0}}END{print S}')        HOST_LIST=$(sort -u "$HOSTFILE" | awk 'BEGIN{S=""}{if (S == "") { S = $0 } else {S = S "," $0}}END{print S}')
476        CMD="mpirun --gmca mpi_warn_on_fork 0 -x ${EXPORT_ENV} --bynode --bind-to-none --host $HOST_LIST -np $TOTPROC $EXEC_CMD"        CMD="mpirun --gmca mpi_warn_on_fork 0 -x ${EXPORT_ENV} --bynode --bind-to-none --host $HOST_LIST -np $TOTPROC $EXEC_CMD"
477     else     else
478        CMD="mpirun --gmca mpi_warn_on_fork 0 -x ${EXPORT_ENV} --cpus-per-rank $ESCRIPT_NUM_THREADS -np $TOTPROC $EXEC_CMD"        CMD="mpirun --gmca mpi_warn_on_fork 0 -x ${EXPORT_ENV} --cpus-per-rank $ESCRIPT_NUM_THREADS --bind-to-core -np $TOTPROC $EXEC_CMD"
479     fi     fi
480     if [ ! -z $ESCRIPT_VERBOSE ]; then echo "MPI command is \"$CMD\"."; fi     if [ ! -z $ESCRIPT_VERBOSE ]; then echo "MPI command is \"$CMD\"."; fi
481     $CMD     $CMD

Legend:
Removed from v.4993  
changed lines
  Added in v.5148

  ViewVC Help
Powered by ViewVC 1.1.26