I seem to have encountered a bug in MPI-IO, in which
MPI_File_get_position_shared hangs when called by multiple processes in
a communicator. It can be illustrated by the following simple test case,
in which a file is simply created with C IO, and opened with MPI-IO.
(defining or undefining MY_MPI_IO_BUG on line 5 enables/disables the
bug). From the MPI2 documentation, It seems that all processes should be
able to call MPI_File_get_position_shared, but if more than one process
uses it, it fails. Setting the shared pointer helps, but this should not
be necessary, and the code still hangs (in more complete code, after
I encounter the same problem with Open MPI 1.2.6 and MPICH2 1.0.7, so
I may have misread the documentation, but I suspect a ROMIO bug.