[mpich-discuss] Re : MPI I/O vs Sequential I/O

Muhammad Zulfikar Handana zulfikarhandana at gmail.com
Wed Mar 20 18:13:35 CDT 2013


exactly how big the files are great for use on a comparison of MPI I / O?

thank a lot for your attention

handana

fwrite() does buffered I/O, which will perform better for small writes. A
better comparison would be to use write(), which is what MPI-IO uses
internally.

Rajeev

On Mar 18, 2013, at 3:49 PM, Muhammad Zulfikar Handana wrote:

> hello, i have some questions about MPI-I/O.
>
> 1) when i trying execute my program using MPI-I/O. why when iam execute
> with 1 proses, execute time more good than when iam execute with 2 proses.
> am i wrong? this is my source code.
>        MPI_File_open (MPI_COMM_WORLD, file_akhir, MPI_MODE_CREATE |
> MPI_MODE_WRONLY, MPI_INFO_NULL, &hasil);
>         int jumlah1 = (((block-1)*16)+pad);
>            int  jumlah = jumlah1 / size;
>
>
>               MPI_File_set_view(hasil, rank * jumlah *
> sizeof(char),MPI_CHAR, MPI_CHAR, "native", MPI_INFO_NULL);
>               MPI_File_write (hasil, output, jumlah1, MPI_CHAR,
> MPI_STATUS_IGNORE);
>
>         MPI_File_close(&hasil);
>
> 2) and after that i have compared that source using MPI - I/O and with
> sequential I/O, apparently, sequential i / o is better than the parallel i
> / o. how it could be happen? this is my sequential source.
> if (rank==0) {
>
>         hasil = fopen (file_akhir, "wb");
>         int test = (((block-1)*16)+pad);
>           fwrite (output, sizeof(char), test, hasil );
>        fclose (hasil);
>      }
>
> thanks a lot for your attention
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20130321/bbfe2fe8/attachment.html>


More information about the discuss mailing list