-
Notifications
You must be signed in to change notification settings - Fork 902
MPI_SEEK_END is limited to 6 MiB #12952
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
Comments
@tukss thank you for the bug report, I will take a look at it, but it might be a few days until I get to it. |
@edgargabriel Thanks. Your PR fixes the problem for me. |
edgargabriel
added a commit
to edgargabriel/ompi
that referenced
this issue
Jan 8, 2025
fix the file_seek calculations when using SEEK_END. Thanks @tukss for reporting the issue. Fixes open-mpi#12952 Signed-off-by: Edgar Gabriel <[email protected]> (cherry picked from commit d82d905)
edgargabriel
added a commit
to edgargabriel/ompi
that referenced
this issue
Jan 8, 2025
fix the file_seek calculations when using SEEK_END. Thanks @tukss for reporting the issue. Fixes open-mpi#12952 Signed-off-by: Edgar Gabriel <[email protected]> (cherry picked from commit d82d905)
This was referenced Jan 8, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you for taking the time to submit an issue!
Background information
What version of Open MPI are you using? (e.g., v4.1.6, v5.0.1, git branch name and hash, etc.)
v5.0.5
Describe how Open MPI was installed (e.g., from a source/distribution tarball, from a git clone, from an operating system distribution package, etc.)
It was built with spack on Fedora 41 (GCC 14.2.1).
If you are building/installing from a git clone, please copy-n-paste the output from
git submodule status
.N/A
Please describe the system on which you are running
Details of the problem
When I open a file larger than 6 MiB using MPI-IO and try to seek relative to its end with
MPI_File_seek
and theMPI_SEEK_END
option, the seek is relative to the 6 MiB mark instead. I think the reason is thatMPI_SEEK_END
is running the additional step of callingmca_io_ompio_file_get_eof_offset
here. This function always returns at most the size set when creating the view, which seems to be unconditionallyMCA_IO_DEFAULT_FILE_VIEW_SIZE
(equal to 6 MiB).It looks like the problematic behavior was introduced in #6867, which was fixing issue #6858, also related to
MPI_SEEK_END
.I have a small Fortran test problem triggering the behavior. Just put any file larger than 6 MiB under the name
testfile
and run the program. I am seeking to 4 bytes before the end of the file, one time usingMPI_SEEK_END
and one time withMPI_SEEK_SET
and getting the size of the file usingMPI_File_get_size
beforehand. With OpenMPI on an 8 MiB file I get this output:Trying the same using MPICH gives me the expected output:
Reproduer:
The text was updated successfully, but these errors were encountered: