[mpich-discuss] MPI I/O vs Sequential I/O
Muhammad Zulfikar Handana
zulfikarhandana at gmail.com
Mon Mar 18 15:49:09 CDT 2013
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/20130319/a2b6c65d/attachment.html>
More information about the discuss
mailing list