From: Arnaud Giersch Date: Tue, 23 Oct 2012 08:46:10 +0000 (+0200) Subject: Cosmetics: rewrite usage() in smpirun.in. X-Git-Tag: v3_8~24^2~3 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/c32f48acb5120587118bc6770ba907b9288611f9 Cosmetics: rewrite usage() in smpirun.in. Remove duplicates, use a "here document" instead of a series of echo's. --- diff --git a/src/smpi/smpirun.in b/src/smpi/smpirun.in index ef6b063108..9145e70b52 100755 --- a/src/smpi/smpirun.in +++ b/src/smpi/smpirun.in @@ -19,23 +19,25 @@ SIMOPTS="--cfg=maxmin/precision:1e-9 --cfg=network/model:SMPI --cfg=network/TCP_ #usage to print the way this script should be called function usage () { - echo "usage:" - echo "$0 [-keep-temps]" - echo " [-np ] -platform -hostfile [-map] program [program-options]" - echo " [-keep-temps] # don't remove the generated files after execution" - echo " [-map] # display the machine on which each process rank is mapped" - echo " [-np ] # use that amount of processes from the hostfile." - echo " # By default, all processes of the hostfile are used." - echo " [-trace] # activate tracing" - echo " [-trace-comment ]# put a comment on the top of the trace file" - echo " [-trace-comment-file ] # put file contents on the top of the trace file as comment" - echo " [-trace-grouped] # group MPI processes by location" - echo " [-trace-resource] # trace resource utilization" - echo " [-trace-triva] # generate configuration for Triva's GraphView" - echo " [-trace-file ] # name of the tracefile (simgrid_smpi.trace)" - echo "or (deprecated usage):" - echo "$0 [-keep-temps] [-np ] [-bandwidth ] [-latency ] program [program-options]" - echo +cat < -hostfile program [program-options] +Options: + -keep-temps # don't remove the generated files after execution + -map # display the machine on which each process rank is mapped + -np # use that amount of processes from the hostfile. + # By default, all processes of the hostfile are used. + -trace # activate tracing + -trace-comment # put a comment on the top of the trace file + -trace-comment-file # put file contents on the top of the trace file as comment + -trace-grouped # group MPI processes by location + -trace-resource # trace resource utilization + -trace-triva # generate configuration for Triva's GraphView + -trace-file # name of the tracefile (simgrid_smpi.trace) + +or (deprecated usage): + $0 [-keep-temps] [-np ] [-bandwidth ] [-latency ] program [program-options] + +EOF } #check if we have at least one parameter