From: Arnaud Giersch Date: Tue, 12 Nov 2013 21:10:40 +0000 (+0100) Subject: Use more conventional loop constructs. X-Git-Tag: v3_11_beta~333 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/281c82411d0384fef85a37c39dc940ec2255f271 Use more conventional loop constructs. --- 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} <