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

Rob Latham robl at mcs.anl.gov
Wed Mar 20 10:01:20 CDT 2013


On Tue, Mar 19, 2013 at 03:49:09AM +0700, Muhammad Zulfikar Handana wrote:
> 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.

In general, with one process doing i/o the file system can cache the
heck out of requests.  When a second process comes along, the caching
needs to be disabled or invalidated, causing a "performance crash"
that only recovers at much higher levels of parallelism.

Let's look specifically at your code, though:

  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);

- Are you writing a large amount of data or a small amount of data here? 
- What file system are you using?


-- 
Rob Latham
Mathematics and Computer Science Division
Argonne National Lab, IL USA



More information about the discuss mailing list