You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For performing 'FOF' parallel, I want to load all coordinates of 1820**3 particles if comm.rank == 0. And then scatter these coordinates to other ranks. My code snippet is shown below
However, after typed mpiexec -n 8 ipython filename.py, it returned to me the Overflow Error.
---------------------------------------------------------------------------
OverflowError Traceback (most recent call last)
~/test_01.py in <module>
23 ddm_coord = None
24
---> 25 dm_coord = ScatterArray(ddm_coord, comm=comm, root=0)
26
27 print("rank:", comm.rank, "Shape of dm_coord", dm_coord.shape)
/opt/miniconda3/envs/nbodykit-env/lib/python3.8/site-packages/nbodykit/utils.py in ScatterArray(data, comm, root, counts)
339 # do the scatter
340 comm.Barrier()
--> 341 comm.Scatterv([data, (counts, offsets), dt], [recvbuffer, dt])
342 dt.Free()
343 return recvbuffer
mpi4py/MPI/Comm.pyx in mpi4py.MPI.Comm.Scatterv()
mpi4py/MPI/msgbuffer.pxi in mpi4py.MPI._p_msg_cco.for_scatter()
mpi4py/MPI/msgbuffer.pxi in mpi4py.MPI._p_msg_cco.for_cco_send()
mpi4py/MPI/msgbuffer.pxi in mpi4py.MPI.message_vector()
mpi4py/MPI/asarray.pxi in mpi4py.MPI.chkarray()
mpi4py/MPI/asarray.pxi in mpi4py.MPI.getarray()
OverflowError: value too large to convert to int
Can you help me fix this issue?
The text was updated successfully, but these errors were encountered:
WangYun1995
changed the title
"Overflow Error: value to large to convert to int" When I used "ScatterArray()" to scatter large numpy arrays
"Overflow Error: value to large too convert to int" When I used "ScatterArray()" to scatter large numpy arrays
Feb 28, 2021
WangYun1995
changed the title
"Overflow Error: value to large too convert to int" When I used "ScatterArray()" to scatter large numpy arrays
"Overflow Error: value too large to convert to int" When I used "ScatterArray()" to scatter large numpy arrays
Feb 28, 2021
1820 ** 3 is a lot of particles. mpi4py has an internal limit of 2^32 or 2^31 for an array's length. I think you are running against that.
In general for reading a large file, I recommend directly reading the data to the rank where you'd them to be, rather than read-then-scatter. This way we avoid the bottleneck on the root rank.
Hi, @rainwoodman
For performing 'FOF' parallel, I want to load all coordinates of 1820**3 particles if
comm.rank == 0
. And then scatter these coordinates to other ranks. My code snippet is shown belowHowever, after typed
mpiexec -n 8 ipython filename.py
, it returned to me the Overflow Error.Can you help me fix this issue?
The text was updated successfully, but these errors were encountered: