From: Martin Quinson Date: Tue, 7 Feb 2017 10:24:09 +0000 (+0100) Subject: smpirun: gracefuly handle the case where the user forgets to give a program to execute X-Git-Tag: v3_15~472 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/b209fd002b9ef31307f6f604254ad84a6628d5b0 smpirun: gracefuly handle the case where the user forgets to give a program to execute --- diff --git a/src/smpi/smpirun.in b/src/smpi/smpirun.in index 9e5689e5c1..28ae8b0829 100755 --- a/src/smpi/smpirun.in +++ b/src/smpi/smpirun.in @@ -241,6 +241,13 @@ while true; do esac done +# check if we still have at least one parameter beyond options +if [ $# -eq 0 ] +then + usage + exit +fi + if [ -n "$WRAPPER" ]; then EXEC="$WRAPPER $1" else