[MPICH] MPI_File_write_all or read_all doubts

Luiz Mendes luizmendesw at gmail.com
Mon Jan 29 07:40:50 CST 2007


Hi all,

I read about MPI_File_read_all and write correpondant, and the text says
this operation perform reads using all processes defined in a certain group.

Well i have saw this operation is slower than file_read non collective
version. Is it right?

If i define 3 processes during mpirun, if i put this operation
MPI_File_read_all in algorithm, this one will be executed 3 times, 3 times
all processes will read all file?

Or it will read once a time? I recorded the time, and it shows three
diferent times, then i think it have executed 3 times.
The part of code is below

    MPI_File_open(MPI_COMM_WORLD, "Wtupi.dat", MPI_MODE_RDONLY,
MPI_INFO_NULL, &fh2);
    MPI_File_set_view(fh2, 0, MPI_INT, MPI_INT, "native",MPI_INFO_NULL);
    start=MPI_Wtime();
    MPI_File_read_all(fh2, buf2, 900000, MPI_INT, MPI_STATUS_IGNORE);
    tempo=MPI_Wtime()-start;
    printf("\nTime spent for read operation %f",tempo);
    }

Thanks
Luiz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20070129/5ea2f35a/attachment.htm>


More information about the mpich-discuss mailing list