Hi,
I've observed what I think is buggy behavior in MPI_File_seek() when trying to
seek to the end of the file using MPI_SEEK_END. Here is a code snippet showing
a work-around that works, and the original code that does not work:
MPI_Offset mpiOffset;
#if defined THIS_WORKS
MPI_File_get_size(fileHandle, &mpiOffset);
MPI_File_seek(fileHandle, mpiOffset, MPI_SEEK_SET);
#else // This doesn't work:
mpiOffset = 0;
MPI_File_seek(fileHandle, mpiOffset, MPI_SEEK_END);
#endif
The "doesn't work" code sets the file position to exactly 0x400000 even though
the file size is larger than that. A sample program that demonstrates the
behavior is at
https://gist.github.com/davetaflin/8841e22ad9cd7584249e613cadd3ea2f
Shall I submit a bug report for this?
Dave