From: Arnaud Giersch Date: Tue, 12 Nov 2013 21:10:40 +0000 (+0100) Subject: Use more conventional loop constructs. X-Git-Tag: v3_10~38 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/71eae760201a70a3990038cd3c3ad4de09062c68 Use more conventional loop constructs. (cherry picked from commit 281c82411d0384fef85a37c39dc940ec2255f271) --- diff --git a/src/smpi/smpirun.in b/src/smpi/smpirun.in index 2f38ee63da..bc97526332 100755 --- a/src/smpi/smpirun.in +++ b/src/smpi/smpirun.in @@ -235,20 +235,26 @@ if [ -z "${PLATFORM}" ]; then PLATFORMHEAD -for i in $(echo "for (i=${NUMPROCS};i>0;i--) i"|bc); do +i=${NUMPROCS} +while [ $i -gt 0 ]; do echo " " >> ${PLATFORMTMP} echo " " >> ${PLATFORMTMP} echo " " >> ${PLATFORMTMP} + i=$((i - 1)) done -for i in $(echo "for (i=${NUMPROCS};i>0;i--) i"|bc); do - for j in $(echo "for (i=${NUMPROCS};i>0;i--) i"|bc); do +i=${NUMPROCS} +while [ $i -gt 0 ]; do + j=${NUMPROCS} + while [ $j -gt 0 ]; do if [ $i -eq $j ]; then echo " " >> ${PLATFORMTMP} else echo " " >> ${PLATFORMTMP} fi + j=$((j - 1)) done + i=$((i - 1)) done cat >> ${PLATFORMTMP} <