I am trying to use mpi.gather in boost.mpi for python as shown below.
import mpi
print(mpi.rank)
mpi.gather(value=True, root=0)
When I run the program with the following command,
mpiexec -n 3 python mpi_test.py
the output is
2
1
0
(The order of the numbers might change.)
However, when I set value
argument in mpi.gather to something other than boolean type, it gets stuck.
Do you have any idea of why this is happening?
I use mpich2(version 3.0.4), boost 1.61.0 and python 3.5.1. Thanks in advance.
UPDATE: The code which does not work is as shown below:
import mpi
print(mpi.rank)
mpi.gather(value='!', root=0)
I ran the above program with mpirun -n 3 python mpi_test.py
,
and got the following result (and again, the order of the numbers might be different),
2
1
The program should also output 0 but it got stuck. I tried several numbers of processes to use, but it always gets stuck with the root rank remained unprinted.
It seems that the program ends only when value
is set to False
or True
.