[mpich-discuss] MPI_File_sync and MPI_File_set_size

Wei-keng Liao wkliao at ece.northwestern.edu
Wed Dec 9 01:35:58 CST 2009


In ROMIO, when the hint romio_no_indep_rw is set to true,
only the IO aggregators open/read/write/close the file.

In MPI_File_sync, ADIOI_TEST_DEFERRED() is called before
ADIO_Flush(), to check if the file is opened, which forces
all non-aggregators to open the file. I think it is not
necessary. A simple check for open status can fix this, eg.
   if ( (fh)->is_open ) ADIO_Flush(fh, &error_code);

Also, the similar issue happens for MPI_File_set_size().
The current implementation lets aggregator 0 to call
ftruncate() and then broadcast the result to all processes.
It is also not necessary to call ADIOI_TEST_DEFERRED().
The fix is simply remove the call.

Wei-keng



More information about the mpich-discuss mailing list