Hi,
simple script:
<hansl>
set verbose off
function void foo (void)
printf "Value from node %d: %d\n", $mpirank, $mpirank+1
mpisend($mpirank+1, 0)
end function
mpi --send-functions
# Call function
foo()
# Collect results
if ($mpirank == 0)
scalar Sum = 0
loop for i=0..$mpisize-1 --quiet
Sum += mpirecv(i)
endloop
printf "\nSum of received values: %d\n", Sum
endif
end mpi
</hansl>
Above code runs on Linux with either OpenMPI or MPICH, but crashes on
Windows with MS-MPI. The error code is: "DEADLOCK: attempting to send a
message to the local process without a prior matching receiv".
The problem is with sending an object (here: scalar) from root proces to
itself. When we give 2 conditions:
1. we call foo() if $mpirank !=0,
2. we receive from all nodes except root,
the code works.
The question is if this is an isse related with MS-MPI or this is gretl
specific?
Regards,
Marcin
--
Marcin Błażejowski