我在openMPI 1.6上安装了mpi4py 1.3。像helloworld.py这样简单的mpi4py演示正在运行。在我的代码中,我调用MPI.Comm.Allreduce(MPI.IN_PLACE, obj)
,其中obj是一个numpy数组。
这会导致错误消息:
ValueError:message:无法猜测计数,数据类型范围0(lb:0,ub:0)“在message_simple中
关于我做错了什么的线索?
完整追溯:
Traceback (most recent call last):
File "ptycho_508.py", line 124, in <module>
p = ptycho.ptycho_DM(p, numit=numit_DM, subpix=False)
File "/afs/psi.ch/project/cxs/users/braun_p/epd/lib/python2.7/site-packages/ptycho/core_object_modes.py", line 1357, in ptycho_DM comm.Allreduce(MPI.IN_PLACE, obj)
File "Comm.pyx", line 544, in mpi4py.MPI.Comm.Allreduce (src/mpi4py.MPI.c:63736)
File "message.pxi", line 579, in mpi4py.MPI._p_msg_cco.for_allreduce (src/mpi4py.MPI.c:23465)
File "message.pxi", line 532, in mpi4py.MPI._p_msg_cco.for_cro_recv (src/mpi4py.MPI.c:23068)
File "message.pxi", line 144, in mpi4py.MPI.message_simple (src/mpi4py.MPI.c:19614)
ValueError: message: cannot guess count, datatype extent 0 (lb:0, ub:0)
message_simple in <http://mpi4py.googlecode.com/svn/trunk/src/MPI/message.pxi> is failing