-
Notifications
You must be signed in to change notification settings - Fork 885
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
issues with a very large derived data type #4829
Comments
Despite the error, the data is correctly transferred (i.e. the printed result looks correct). The warning is generated in the vader BTL, in the put and get functions where for very large datatypes the return os process_vm_writev (or readv) is truncated down to a ssize_t. |
@bosilca i double checked that and
So even if this is only a warning and the data is correct, this is yet suboptimal. I will make a PR shortly to address that. |
Thanks Heiko Bauke for the bug report. Refs. open-mpi#4829 Signed-off-by: Gilles Gouaillardet <[email protected]>
@ggouaillardet while I agree that these functions can return less than the total amount requested, in the case of a partial transfer. However, according to the corresponding Linux manpage partial transfers strictly apply at the granularity of iovec elements, in other words it is forbidden to perform a partial transfer that splits a single iovec element. Your proposed fix is not correct. The real fix would acknowledge whatever was transmitted over CMA, and will continue with the remaining data by other means. |
Important note : According to the man page "On success, process_vm_readv() returns the number of bytes read and process_vm_writev() returns the number of bytes written. This return value may be less than the total number of requested bytes, if a partial read/write occurred. (Partial transfers apply at the granularity of iovec elements. These system calls won't perform a partial transfer that splits a single iovec element.)" So since we use a single iovec element, the returned size should either be 0 or size, and the do loop should not be needed here. We tried on various Linux kernels with size > 2 GB, and surprisingly, the returned value is always 0x7ffff000 (fwiw, it happens to be the size of the larger number of pages that fits a signed 32 bits integer). We do not know whether this is a bug from the kernel, the libc or even the man page, but for the time being, we do as is process_vm_readv() could return any value. Thanks Heiko Bauke for the bug report. Refs. open-mpi#4829 Signed-off-by: Gilles Gouaillardet <[email protected]>
…te}v Important note : According to the man page "On success, process_vm_readv() returns the number of bytes read and process_vm_writev() returns the number of bytes written. This return value may be less than the total number of requested bytes, if a partial read/write occurred. (Partial transfers apply at the granularity of iovec elements. These system calls won't perform a partial transfer that splits a single iovec element.)" So since we use a single iovec element, the returned size should either be 0 or size, and the do loop should not be needed here. We tried on various Linux kernels with size > 2 GB, and surprisingly, the returned value is always 0x7ffff000 (fwiw, it happens to be the size of the larger number of pages that fits a signed 32 bits integer). We do not know whether this is a bug from the kernel, the libc or even the man page, but for the time being, we do as is process_vm_readv() could return any value. Thanks Heiko Bauke for the bug report. Refs. open-mpi#4829 Signed-off-by: Gilles Gouaillardet <[email protected]>
…te}v Important note : According to the man page "On success, process_vm_readv() returns the number of bytes read and process_vm_writev() returns the number of bytes written. This return value may be less than the total number of requested bytes, if a partial read/write occurred. (Partial transfers apply at the granularity of iovec elements. These system calls won't perform a partial transfer that splits a single iovec element.)" So since we use a single iovec element, the returned size should either be 0 or size, and the do loop should not be needed here. We tried on various Linux kernels with size > 2 GB, and surprisingly, the returned value is always 0x7ffff000 (fwiw, it happens to be the size of the larger number of pages that fits a signed 32 bits integer). We do not know whether this is a bug from the kernel, the libc or even the man page, but for the time being, we do as is process_vm_readv() could return any value. Thanks Heiko Bauke for the bug report. Refs. open-mpi#4829 Signed-off-by: Gilles Gouaillardet <[email protected]> (cherry picked from commit open-mpi/ompi@9fedf28)
…te}v Important note : According to the man page "On success, process_vm_readv() returns the number of bytes read and process_vm_writev() returns the number of bytes written. This return value may be less than the total number of requested bytes, if a partial read/write occurred. (Partial transfers apply at the granularity of iovec elements. These system calls won't perform a partial transfer that splits a single iovec element.)" So since we use a single iovec element, the returned size should either be 0 or size, and the do loop should not be needed here. We tried on various Linux kernels with size > 2 GB, and surprisingly, the returned value is always 0x7ffff000 (fwiw, it happens to be the size of the larger number of pages that fits a signed 32 bits integer). We do not know whether this is a bug from the kernel, the libc or even the man page, but for the time being, we do as is process_vm_readv() could return any value. Thanks Heiko Bauke for the bug report. Refs. open-mpi#4829 Signed-off-by: Gilles Gouaillardet <[email protected]> (cherry picked from commit open-mpi/ompi@9fedf28)
…te}v Important note : According to the man page "On success, process_vm_readv() returns the number of bytes read and process_vm_writev() returns the number of bytes written. This return value may be less than the total number of requested bytes, if a partial read/write occurred. (Partial transfers apply at the granularity of iovec elements. These system calls won't perform a partial transfer that splits a single iovec element.)" So since we use a single iovec element, the returned size should either be 0 or size, and the do loop should not be needed here. We tried on various Linux kernels with size > 2 GB, and surprisingly, the returned value is always 0x7ffff000 (fwiw, it happens to be the size of the larger number of pages that fits a signed 32 bits integer). We do not know whether this is a bug from the kernel, the libc or even the man page, but for the time being, we do as is process_vm_readv() could return any value. Thanks Heiko Bauke for the bug report. Refs. open-mpi#4829 Signed-off-by: Gilles Gouaillardet <[email protected]> (cherry picked from commit open-mpi/ompi@9fedf28)
The test passes for me with no issue now with master:
It looks like all PR's have been merged as well. Closing. |
Using OpenMPI 2.1.1 as distributed by Ubuntu 17.10 x86_64 I get the following error message when dealing with a very large derived data type:
Read 2147479552, expected 2147483748, errno = 38
Below, I attached a small program to reproduce the issue. I build a derived vector-like data type with possibly more than
INT_MAX
elements usingMPI_Type_struct
.The text was updated successfully, but these errors were encountered: