On Wed, 27 Jun 2018, Marcin Błażejowski wrote:
Hi,
simple script:
<hansl>
set verbose off
#
mpi --send-functions --np=$sysinfo.mpimax/2
scalar mpisize = $mpisize
loop for i=0..mpisize --quiet
if $mpirank == i
printf("I'm node no. %d in loop 1\n", $mpirank)
endif
endloop
loop for i=0..$mpisize --quiet
if $mpirank == i
printf("I'm node no. %d in loop 1\n", $mpirank)
endif
endloop
end mpi
</hansl>
Why the first loop works and the second one does not?
Hmm, this is not MPI-specific. The loop limit "$mpisize" is falling
into a crack between the name of a scalar variable (like your
"mpisize") and an expression to be evaluated (as in, for example,
"1*$mpisize", which would also work). I need to think a little about
the best fix for this.
Allin