[MPICH] MPI_File_write_all or read_all doubts

Rajeev Thakur thakur at mcs.anl.gov
Mon Jan 29 16:37:17 CST 2007


It means that the user must call the function from all processes. The
implementation may implement it by having each process read a distinct
portion of the data and send it to other processes.
 
Rajeev


  _____  

From: owner-mpich-discuss at mcs.anl.gov
[mailto:owner-mpich-discuss at mcs.anl.gov] On Behalf Of Luiz Mendes
Sent: Monday, January 29, 2007 7:41 AM
To: mpich-discuss
Subject: [MPICH] MPI_File_write_all or read_all doubts


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/7162f7c9/attachment.htm>


More information about the mpich-discuss mailing list