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
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
Operating system/version: Fedora 41
Computer hardware: amd64 architecture
Network type: local only (single rank)
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 the MPI_SEEK_END option, the seek is relative to the 6 MiB mark instead. I think the reason is that MPI_SEEK_END is running the additional step of calling mca_io_ompio_file_get_eof_offsethere. This function always returns at most the size set when creating the view, which seems to be unconditionally MCA_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 using MPI_SEEK_END and one time with MPI_SEEK_SET and getting the size of the file using MPI_File_get_size beforehand. With OpenMPI on an 8 MiB file I get this output:
file size: 8388608
position after MPI_SEEK_END: 6291452 6291452
position after MPI_SEEK_SET: 8388604 8388604
Trying the same using MPICH gives me the expected output:
file size: 8388608
position after MPI_SEEK_END: 8388604 8388604
position after MPI_SEEK_SET: 8388604 8388604
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: