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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5148 - (show annotations)
Mon Sep 15 01:25:23 2014 UTC (4 years, 7 months ago) by caltinay
Original Path: trunk/bin/run-escript
File size: 17332 byte(s)
Merging ripley diagonal storage + CUDA support into trunk.
Options file version has been incremented due to new options
'cuda' and 'nvccflags'.

1 #!/usr/bin/env sh
2
3 # Escript/Finley wrapper for python
4 # Sets LD_LIBRARY_PATH and PYTHONPATH and then runs either python or the MPI launcher
5
6 #Extra paths can be configured about a page further down
7 #Search for EXTRA_PATH=""
8
9 #set to 1 if performing this is a standalone build and ../../pkg contains the relevant tools
10 STANDALONE=0
11
12 #set to 1 if this is part of a packaged build (.deb) and files will be installed in standard locations
13 #rather than everything in a single directory
14 #Do not use this together with $STANDALONE
15 STDLOCATION=0
16
17 #Now we find the location of this script
18 #Note that this location should be absolute but does not need to be unique
19 scriptdir=""
20 CURDIR=$(pwd)
21
22 #Environment vars which control operations:
23 # 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.$$
36 HOSTFILE2=/tmp/escript2.$USER.$$
37
38 #Begin finding ESCRIPT_ROOT
39 if [ $STDLOCATION -ne 0 ]
40 then
41 ESCRIPT_ROOT=/usr/lib/python-escript
42 else
43 # We don't know the escript root so we need to work it out from the invocation
44 # Need to match if the name contains /
45 if $(echo $0|grep -q /)
46 then
47 # We are not using the PATH to find the script
48 cd "$(dirname $0)"
49 scriptdir=$(pwd)
50 cd "$CURDIR"
51 else
52 # name does not contain / therefore we are using
53 tscriptdir=$(which $0)
54 if [ $? -ne 0 ]
55 then
56 echo "Error! Unable to determine script directory. Exiting."
57 exit 1
58 fi
59 scriptdir=$(dirname $tscriptdir)
60 fi
61
62 cd "$scriptdir/.."
63 ESCRIPT_ROOT=$(pwd)
64 cd ..
65 ESCRIPT_PARENT=$(pwd)
66 cd "$CURDIR"
67
68 fi
69 ##### End finding ESCRIPT_ROOT ########
70
71 PYTHON_MPI_NULL="$ESCRIPT_ROOT/lib/pythonMPI"
72 PYTHON_MPI_REDIRECT="$ESCRIPT_ROOT/lib/pythonMPIredirect"
73 PYTHON_CMD=python
74
75 # if possible please express paths relative to $ESCRIPT_ROOT unless
76 # they are in an unrelated location
77
78 EXTRA_DYLD_LIBRARY_PATH=""
79 EXTRA_PATH=$ESCRIPT_ROOT/bin
80 EXTRA_PYTHONPATH=$ESCRIPT_ROOT
81
82 if [ $STDLOCATION -eq 1 ]
83 then
84 EXTRA_LD_LIBRARY_PATH=/usr/lib/python-escript
85 else
86 EXTRA_LD_LIBRARY_PATH=$ESCRIPT_ROOT/lib
87 fi
88
89
90 if [ $STANDALONE -eq 1 ]
91 then
92 EXTRA_PATH=$ESCRIPT_PARENT/pkg/python/bin:$ESCRIPT_PARENT/pkg/scons/bin:$EXTRA_PATH
93 EXTRA_LD_LIBRARY_PATH=$ESCRIPT_PARENT/pkg/boost/lib:$ESCRIPT_PARENT/pkg/netcdf/lib/:$EXTRA_LD_LIBRARY_PATH
94 EXTRA_LD_LIBRARY_PATH=$EXTRA_LD_LIBRARY_PATH
95 EXTRA_LD_LIBRARY_PATH=$ESCRIPT_PARENT/pkg/python/lib:$EXTRA_LD_LIBRARY_PATH
96 EXTRA_PYTHONPATH=$ESCRIPT_PARENT/pkg/numpy/lib/python2.6/site-packages:$ESCRIPT_PARENT/pkg/matplotlib/lib/python2.6/site-packages:$EXTRA_PYTHONPATH
97 fi
98
99
100 BUILDINFO_FILE="$ESCRIPT_ROOT/lib/buildvars"
101 if [ "$STDLOCATION" = "1" ]
102 then
103 BUILDINFO_FILE=/usr/lib/python-escript/buildvars
104 fi
105 if [ ! -r "$BUILDINFO_FILE" ]; then
106 if [ "$1" = "-e" ]; then
107 echo "export LD_LIBRARY_PATH=$EXTRA_LD_LIBRARY_PATH:\$LD_LIBRARY_PATH"
108 echo "export PYTHONPATH=$EXTRA_PYTHONPATH:\$PYTHONPATH"
109 echo "export PATH=$EXTRA_PATH:\$PATH"
110 if [ "$(uname)" = "Darwin" ]
111 then
112 echo "export DYLD_LIBRARY_PATH=$EXTRA_DYLD_LIBRARY_PATH:$EXTRA_LD_LIBRARY_PATH:\$DYLD_LIBRARY_PATH"
113 fi
114 exit 0
115 fi
116 echo "Error! Unable to read escript build information. Exiting."
117 exit 1
118 fi
119
120 get_buildvar () {
121 echo $(grep "^$1=" "$BUILDINFO_FILE" |cut -d= -f2)
122 }
123
124 #
125 # Add VisIt paths if required
126 #
127 WITH_VISIT=$(get_buildvar visit)
128 if [ "$WITH_VISIT" = "1" ]; then
129 VISIT_BIN=$(which visit 2>/dev/null)
130 if [ $? -eq 0 ]; then
131 VISIT_PY_PATH=$($VISIT_BIN -env | grep LIBPATH | cut -d= -f2)
132 EXTRA_PYTHONPATH=$EXTRA_PYTHONPATH:$VISIT_PY_PATH
133 EXTRA_LD_LIBRARY_PATH=$EXTRA_LD_LIBRARY_PATH:$VISIT_PY_PATH
134 elif [ ! -z $ESCRIPT_VERBOSE ]; then
135 echo "VisIt module enabled but VisIt not in path!"
136 fi
137 fi
138
139 HELP_TEXT="
140 Usage: run-escript [options] script.py [arguments...]
141 -n nn number of nodes to use
142 -p np number of MPI processes to spawn per node
143 -t nt number of OpenMP threads to use
144 -f file name of MPI hostfile
145 -c print compile information for escript and exit
146 -V print escript version and exit
147 -i interactive mode
148 -b do not invoke python (run non-python programs)
149 -e print export statements for environment and exit
150 -o redirect output from MPI to files
151 -v print diagnostics
152 -x run in new xterm instance
153 -m tool run with valgrind {tool=m[emcheck]/c[allgrind]}
154 script.py Your python script
155 arguments... The optional command-line arguments to your script
156 "
157
158 if [ "$1" = "--help" ]; then
159 echo "$HELP_TEXT"
160 exit 0
161 fi
162 #==============================================================================
163
164 # Parse the command-line options
165 while getopts 'bn:p:t:f:echim:oVvx' option
166 do
167 case "$option" in
168 "b") DO_BINARY=y
169 ;;
170 "m") DO_VALGRIND=$OPTARG
171 ;;
172 "n") ESCRIPT_NUM_NODES=$OPTARG
173 ;;
174 "p") ESCRIPT_NUM_PROCS=$OPTARG
175 ;;
176 "t") ESCRIPT_NUM_THREADS=$OPTARG
177 ;;
178 "f") ESCRIPT_HOSTFILE=$OPTARG
179 ;;
180 "c") cat "$BUILDINFO_FILE"
181 exit 0
182 ;;
183 "V") echo "escript-development(build "$(get_buildvar svn_revision)")"
184 exit 0
185 ;;
186 "h") echo "$HELP_TEXT"
187 exit 0
188 ;;
189 "i") DO_INTERACTIVE=y
190 ;;
191 "e") echo "export LD_LIBRARY_PATH=$EXTRA_LD_LIBRARY_PATH:\$LD_LIBRARY_PATH"
192 echo "export PYTHONPATH=$EXTRA_PYTHONPATH:\$PYTHONPATH"
193 echo "export PATH=$EXTRA_PATH:\$PATH"
194 if [ "$(uname)" = "Darwin" ]
195 then
196 echo "export DYLD_LIBRARY_PATH=$EXTRA_DYLD_LIBRARY_PATH:$EXTRA_LD_LIBRARY_PATH:\$DYLD_LIBRARY_PATH"
197 fi
198 exit 0
199 ;;
200 "o") ESCRIPT_CREATESTDFILES=y
201 ;;
202 "v") ESCRIPT_VERBOSE=y
203 ;;
204 "x") DO_XTERM=y
205 ;;
206 ?) echo "$HELP_TEXT"
207 exit 1
208 ;;
209 esac
210 done
211 shift $(($OPTIND - 1))
212 #==============================================
213 #
214 # Read MPI_FLAVOUR and WITH_OPENMP from the buildvars
215 #
216 MPI_FLAVOUR=$(get_buildvar mpi)
217 WITH_OPENMP=$(get_buildvar openmp)
218
219 if [ ! -z $ESCRIPT_VERBOSE ]; then
220 echo "MPI flavour is $MPI_FLAVOUR."
221 if [ "$WITH_OPENMP" = "1" ]; then echo "OpenMP enabled."; fi
222 fi
223
224 #
225 # extend path variables
226 #
227 export PATH=$EXTRA_PATH:$PATH
228 export LD_LIBRARY_PATH=$EXTRA_LD_LIBRARY_PATH:$LD_LIBRARY_PATH
229 export PYTHONPATH=$EXTRA_PYTHONPATH:$PYTHONPATH
230 EXPORT_ENV="PATH,LD_LIBRARY_PATH,PYTHONPATH"
231 if [ "$(uname)" = "Darwin" ]
232 then
233 export DYLD_LIBRARY_PATH=$EXTRA_DYLD_LIBRARY_PATH:$EXTRA_LD_LIBRARY_PATH:$DYLD_LIBRARY_PATH
234 EXPORT_ENV="$EXPORT_ENV,DYLD_LIBRARY_PATH"
235 fi
236 if [ ! -z $ESCRIPT_VERBOSE ]
237 then
238 echo "PATH = $PATH "
239 echo "LD_LIBRARY_PATH = $LD_LIBRARY_PATH "
240 echo "PYTHONPATH = $PYTHONPATH "
241 if [ ! -z $DYLD_LIBRARY_PATH ]; then echo "DYLD_LIBRARY_PATH = $DYLD_LIBRARY_PATH "; fi
242 fi
243 #==============================================
244 #
245 # Ensure the variables have sensible values
246 #
247 if [ "$MPI_FLAVOUR" = "none" ]
248 then
249 if [ ! -z "$ESCRIPT_NUM_NODES" ]; then
250 if [ $ESCRIPT_NUM_NODES -gt 1 ]; then
251 echo "Warning: MPI disabled but number of nodes set. Option ignored."
252 fi
253 fi
254 if [ ! -z "$ESCRIPT_NUM_PROCS" ]; then
255 if [ $ESCRIPT_NUM_PROCS -gt 1 ]; then
256 echo "Warning: MPI disabled but number of processors per node set. Option ignored."
257 fi
258 fi
259 if [ ! -z "$ESCRIPT_HOSTFILE" ]
260 then
261 echo "Warning: MPI disabled but host file is given. Option ignored."
262 fi
263 ESCRIPT_NUM_NODES=1
264 ESCRIPT_NUM_PROCS=1
265 else
266 # use the PBS_NODEFILE if not otherwise specified
267 if [ ! -z "$PBS_NODEFILE" ] && [ -z "$ESCRIPT_HOSTFILE" ]
268 then
269 ESCRIPT_HOSTFILE=$PBS_NODEFILE
270 fi
271
272 if [ ! -z "$ESCRIPT_HOSTFILE" ]
273 then
274 if [ -f "$ESCRIPT_HOSTFILE" ]
275 then
276 cat "$ESCRIPT_HOSTFILE" | sort -u > $HOSTFILE
277 NUM_HOSTS=$(cat "$HOSTFILE" | wc -l)
278 if [ ! -z $ESCRIPT_NUM_NODES ]
279 then
280 if [ $NUM_HOSTS -ne $ESCRIPT_NUM_NODES ]
281 then
282 echo "number of hosts selected in the host file $ESCRIPT_HOSTFILE needs to match the requested number of nodes $ESCRIPT_NUM_NODES."
283 exit 1
284 fi
285 else
286 ESCRIPT_NUM_NODES=$NUM_HOSTS
287 fi
288 else
289 echo "cannot find hostfile $ESCRIPT_HOSTFILE."
290 exit 1
291 fi
292 else
293 HOSTFILE=''
294 fi
295
296 if [ -z $ESCRIPT_NUM_NODES ]
297 then
298 ESCRIPT_NUM_NODES=1
299 fi
300
301 if [ -z $ESCRIPT_NUM_PROCS ]
302 then
303 ESCRIPT_NUM_PROCS=1
304 fi
305
306 if [ ! -z $ESCRIPT_VERBOSE ]
307 then
308 echo "ESCRIPT_NUM_NODES = $ESCRIPT_NUM_NODES "
309 echo "ESCRIPT_NUM_PROCS = $ESCRIPT_NUM_PROCS "
310 fi
311 fi
312
313 if [ "$WITH_OPENMP" = "1" ]
314 then
315 if [ -z $ESCRIPT_NUM_THREADS ]
316 then
317 ESCRIPT_NUM_THREADS=$OMP_NUM_THREADS
318 if [ -z $ESCRIPT_NUM_THREADS ]
319 then
320 ESCRIPT_NUM_THREADS=1
321 fi
322 fi
323 if [ ! -z $ESCRIPT_VERBOSE ]
324 then
325 echo "ESCRIPT_NUM_THREADS is $ESCRIPT_NUM_THREADS."
326 fi
327 else
328 if [ ! -z $ESCRIPT_NUM_THREADS ] && [ $ESCRIPT_NUM_THREADS != 1 ]
329 then
330 echo "Warning: OpenMP is disabled but number of threads requested is $ESCRIPT_NUM_THREADS!=1. Running without threads."
331 fi
332 ESCRIPT_NUM_THREADS=1
333 fi
334 #
335 # Now we compute total number of Processes
336 #
337 TOTPROC=$((ESCRIPT_NUM_NODES * ESCRIPT_NUM_PROCS))
338 if [ $? -ne 0 ] #Some compute error
339 then #This could happen if the args were not a number
340 echo "expression of total number of processors = $ESCRIPT_NUM_NODES * $ESCRIPT_NUM_PROCS is not numerical."
341 exit 1
342 fi
343
344 #
345 # Test to ensure people aren't trying to combine interactive and multi-process
346 #
347 if ([ ! -z $DO_INTERACTIVE ] || [ $# -eq 0 ]) && ([ $TOTPROC -gt 1 ])
348 then
349 echo "Interactive mode cannot be used with more than one process"
350 exit 1
351 fi
352
353 if [ $TOTPROC -gt 1 ]
354 then
355 if [ "$ESCRIPT_CREATESTDFILES" = "y" ]
356 then
357 PYTHON_MPI=$PYTHON_MPI_REDIRECT
358 else
359 PYTHON_MPI=$PYTHON_MPI_NULL
360 fi
361 else
362 PYTHON_MPI=$PYTHON_MPI_NULL
363 fi
364 #==============================================================================
365 # Must have at least one command-line arg: the python script
366 if [ $# -eq 0 ]
367 then
368 if [ ! -z $DO_BINARY ]
369 then
370 echo "No program to run was specified. Exiting."
371 exit 1
372 else
373 DO_INTERACTIVE=y
374 fi
375 fi
376
377 #==============================================================================
378
379 if [ ! -z $DO_XTERM ]
380 then
381 EXEC_CMD="xterm -e"
382 else
383 EXEC_CMD=""
384 fi
385
386 if [ ! -z "$DO_VALGRIND" ]
387 then
388 VALGRIND_BIN=$(which valgrind 2>/dev/null)
389 if [ $? -eq 0 ]; then
390 LOGDIR=$ESCRIPT_ROOT/valgrind_logs
391 [ -d $LOGDIR ] || mkdir $LOGDIR
392 VG_TOOL=$(echo $DO_VALGRIND | awk '{ s=substr($0,1,1);print s;}')
393 if [ $VG_TOOL = "c" ];
394 then
395 # run callgrind
396 LOGFILE=${LOGDIR}/callgrind.%p.xml
397 VALGRIND="valgrind --tool=callgrind --callgrind-out-file=$LOGFILE"
398 EXEC_CMD="$EXEC_CMD $VALGRIND"
399 else
400 # run memcheck by default
401 LAST_N=$(ls -1 $LOGDIR|grep "^memcheck"|tail -1|cut -d. -f2)
402 NEW_N=$(printf "%04d" $((LAST_N + 1)))
403 LOGFILE=${LOGDIR}/memcheck.${NEW_N}.xml
404 VALGRIND="valgrind --tool=memcheck --xml=yes --show-reachable=yes --error-limit=no --gen-suppressions=all --suppressions=$ESCRIPT_ROOT/scripts/escript.supp --leak-check=full --xml-file=$LOGFILE"
405 EXEC_CMD="$EXEC_CMD $VALGRIND"
406 fi
407 else
408 echo "Execution with valgrind requested but valgrind not in path!"
409 exit 1
410 fi
411 fi
412
413 if [ ! -z $DO_BINARY ]
414 then
415 EXEC_CMD="$EXEC_CMD $@"
416 else
417 # Check to see if the python version we were compiled with matches the
418 # one of PYTHON_CMD.
419 compfull=$(get_buildvar python_version)
420 compversion=$(echo $compfull | cut -d. -f1,2)
421 compmajor=$(echo $compfull | cut -d. -f1)
422 if [ "$PYTHON_CMD" = "python" ] # if people have customised the command they
423 then # might not want us changing it
424 if [ "$compmajor" = "3" ]
425 then
426 PYTHON_CMD=python3
427 fi
428 fi
429 intversion=$($PYTHON_CMD -c 'from __future__ import print_function;import sys;print("%d.%d"%(sys.version_info[0], sys.version_info[1]))')
430 if [ "$compversion" != "$intversion" ]
431 then
432 echo "Python versions do not match. Escript was compiled for "$compversion"."
433 echo "Current version of Python appears to be "$intversion"."
434 exit 1
435 fi
436 if [ "$MPI_FLAVOUR" = "none" ]
437 then
438 if [ ! -z $DO_INTERACTIVE ]
439 then
440 EXEC_CMD="$EXEC_CMD $PYTHON_CMD -i $@"
441 else
442 EXEC_CMD="$EXEC_CMD $PYTHON_CMD $@"
443 fi
444 else
445 if [ ! -z $DO_INTERACTIVE ]
446 then
447 EXEC_CMD="$EXEC_CMD $PYTHON_MPI -i $@"
448 else
449 EXEC_CMD="$EXEC_CMD $PYTHON_MPI $@"
450 fi
451 fi
452 fi
453 if [ ! -z $ESCRIPT_VERBOSE ]; then echo "Command to be executed is \"$EXEC_CMD\"."; fi
454 #==============================================================================
455 #
456 # now we start to spawn things:
457 #
458 if [ "$WITH_OPENMP" = "1" ]
459 then
460 export OMP_NUM_THREADS=$ESCRIPT_NUM_THREADS
461 EXPORT_ENV="$EXPORT_ENV,OMP_NUM_THREADS"
462 fi
463 EXIT_CODE=1
464 #=============== no MPI ===================================
465 if [ "$MPI_FLAVOUR" = "none" ]
466 then
467 $EXEC_CMD
468 EXIT_CODE=$?
469 #=============== OpenMPI ===================================
470 elif [ "$MPI_FLAVOUR" = "OPENMPI" ]
471 then
472 EXPORT_ENV=$(echo $EXPORT_ENV|sed -e 's/,/ -x /g')
473 if [ ! -z "$HOSTFILE" ]
474 then
475 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"
477 else
478 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
480 if [ ! -z $ESCRIPT_VERBOSE ]; then echo "MPI command is \"$CMD\"."; fi
481 $CMD
482 EXIT_CODE=$?
483
484 #=============== Intel MPI ===================================
485 elif [ "$MPI_FLAVOUR" = "INTELMPI" ]
486 then
487
488 if [ "$WITH_OPENMP" = "1" ]
489 then
490 export I_MPI_PIN_DOMAIN=omp
491 EXPORT_ENV="$EXPORT_ENV,I_MPI_PIN_DOMAIN"
492 fi
493
494 if [ ! -z "$HOSTFILE" ]
495 then
496 CMD="mpirun -hostfile $HOSTFILE -n $TOTPROC -ppn $ESCRIPT_NUM_PROCS $EXEC_CMD"
497 else
498 if [ ! -z $ESCRIPT_VERBOSE ]; then echo "Empty hostfile, running on single node"; fi
499 CMD="mpirun -n 1 -ppn $ESCRIPT_NUM_PROCS $EXEC_CMD"
500 fi
501 if [ ! -z $ESCRIPT_VERBOSE ]; then echo "MPI command is \"$CMD\"."; fi
502 $CMD
503 EXIT_CODE=$?
504 #=============== SGI's MPIMPT ===================================
505 elif [ "$MPI_FLAVOUR" = "MPT" ]
506 then
507 export MPI_NUM_MEMORY_REGIONS=0
508 EXPORT_ENV="$EXPORT_ENV,MPI_NUM_MEMORY_REGIONS"
509 if [ ! -z "$HOSTFILE" ]
510 then
511 HOST_LIST=$(awk 'BEGIN{S=""}{if (S == "") { S = $0 } else {S = S "," $0}}END{print S}' "$HOSTFILE")
512 CMD="mpirun $HOST_LIST -np $ESCRIPT_NUM_PROCS $EXEC_CMD"
513 else
514 CMD="mpirun -np $TOTPROC $EXEC_CMD"
515 fi
516 if [ ! -z $ESCRIPT_VERBOSE ]; then echo "MPI command is \"$CMD\"."; fi
517 $CMD
518 EXIT_CODE=$?
519 #=============== MPICH ===================================
520 elif [ "$MPI_FLAVOUR" = "MPICH" ]
521 then
522 if [ ! -z "$HOSTFILE" ]
523 then
524 touch "$HOSTFILE2"
525 for i in $(seq $ESCRIPT_NUM_PROCS); do cat "$HOSTFILE" >> "$HOSTFILE2"; done
526 CMD="mpirun -machinefile \"$HOSTFILE2\" -np $TOTPROC $EXEC_CMD"
527 else
528 CMD="mpirun -np $TOTPROC $EXEC_CMD"
529 fi
530 if [ ! -z $ESCRIPT_VERBOSE ]; then echo "MPI command is \"$CMD\"."; fi
531 $CMD
532 EXIT_CODE=$?
533 #=============== MPICH2 ===================================
534 elif [ "$MPI_FLAVOUR" = "MPICH2" ]
535 then
536 if [ ! -z "$HOSTFILE" ]
537 then
538 mpdboot -n $ESCRIPT_NUM_NODES -r ssh -f "$HOSTFILE"
539 if [ $? -ne 0 ]
540 then
541 echo "mpdboot with host file $ESCRIPT_HOSTFILE for $ESCRIPT_NUM_NODES nodes failed."
542 exit 1
543 else
544 if [ ! -z $ESCRIPT_VERBOSE ]; then echo "mpdboot was started with host file $HOSTFILE for $ESCRIPT_NUM_NODES nodes."; fi
545 fi
546 else
547 mpdboot -n 1 -r ssh
548 if [ $? -ne 0 ]
549 then
550 echo "mpdboot failed."
551 exit 1
552 else
553 if [ ! -z $ESCRIPT_VERBOSE ]; then echo "mpdboot was started."; fi
554 fi
555 fi
556 CMD="mpiexec -genvlist $EXPORT_ENV -np $TOTPROC $EXEC_CMD"
557 if [ ! -z $ESCRIPT_VERBOSE ]; then echo "MPI command is \"$CMD\"."; fi
558 $CMD
559 EXIT_CODE=$?
560 mpdallexit
561 if [ ! -z $ESCRIPT_VERBOSE ]; then echo "mpdallexit executed."; fi
562 else
563 echo "unknown MPI flavour '$MPI_FLAVOUR'."
564 fi
565
566 if [ ! -z "$DO_VALGRIND" ]; then
567 echo "Valgrind log file written to ${LOGFILE}"
568 fi
569
570 exit $EXIT_CODE
571

Properties

Name Value
svn:executable *
svn:mergeinfo /branches/3.4/bin/run-escript:4453-4490 /branches/diaplayground/bin/run-escript:4940-5147 /branches/lapack2681/bin/escript:2682-2741 /branches/pasowrap/bin/run-escript:3661-3674 /branches/py3_attempt2/bin/run-escript:3871-3891 /branches/release3.4/bin/run-escript:4452 /branches/restext/bin/escript:2610-2624 /branches/ripleygmg_from_3668/bin/run-escript:3669-3791 /branches/stage3.0/bin/escript:2569-2590 /branches/symbolic_from_3470/bin/run-escript:3471-3974 /branches/symbolic_from_3470/ripley/test/python/bin/run-escript:3517-3974 /release/3.0/bin/escript:2591-2601 /trunk/ripley/test/python/bin/run-escript:3480-3515

  ViewVC Help
Powered by ViewVC 1.1.26