Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Printing of unbalanced arrays can result in an error #617

Closed
coquelin77 opened this issue Jul 2, 2020 · 0 comments · Fixed by #618
Closed

Printing of unbalanced arrays can result in an error #617

coquelin77 opened this issue Jul 2, 2020 · 0 comments · Fixed by #618
Assignees

Comments

@coquelin77
Copy link
Member

Description
see title

To Reproduce

a = ht.arange(3 * 4, split=0).reshape((3, 2, 2))
print(a[0])
[1,0]<stderr>:Traceback (most recent call last):
[1,0]<stderr>:  File "local_test.py", line 327, in <module>
[1,0]<stderr>:    print(a[0])
[1,0]<stderr>:  File "/Users/c.comito/HAF/heat/heat/core/dndarray.py", line 3357, in __str__
[1,0]<stderr>:    return printing.__str__(self)
[1,0]<stderr>:  File "/Users/c.comito/HAF/heat/heat/core/printing.py", line 74, in __str__
[1,0]<stderr>:    tensor_string = _tensor_str(dndarray, __INDENT + 1)
[1,0]<stderr>:  File "/Users/c.comito/HAF/heat/heat/core/printing.py", line 172, in _tensor_str
[1,0]<stderr>:    torch_data = _torch_data(dndarray, summarize)
[1,0]<stderr>:  File "/Users/c.comito/HAF/heat/heat/core/printing.py", line 99, in _torch_data
[1,0]<stderr>:    data = dndarray.copy().resplit_(None)._DNDarray__array
[1,0]<stderr>:  File "/Users/c.comito/HAF/heat/heat/core/dndarray.py", line 2692, in resplit_
[1,0]<stderr>:    self.comm.Allgatherv(self.__array, (gathered, counts, displs), recv_axis=self.split)
[1,0]<stderr>:  File "/Users/c.comito/HAF/heat/heat/core/communication.py", line 674, in Allgatherv
[1,0]<stderr>:    self.handle.Allgatherv, sendbuf, recvbuf, recv_axis
[1,0]<stderr>:  File "/Users/c.comito/HAF/heat/heat/core/communication.py", line 642, in __allgather_like
[1,0]<stderr>:    exit_code = func(mpi_sendbuf, mpi_recvbuf, **kwargs)
[1,0]<stderr>:  File "mpi4py/MPI/Comm.pyx", line 652, in mpi4py.MPI.Comm.Allgatherv
[1,0]<stderr>:mpi4py.MPI.Exception: MPI_ERR_TRUNCATE: message truncated

Expected behavior
Print should happen without an error

Version Info
current master (as of 2.7.20)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant