how the collective io take effects?

Liu, Jaln jaln.liu at ttu.edu
Mon Nov 26 01:02:58 CST 2012


Hi all,

please see the following codes first,

  mpi_start[] = ..;

  mpi_count[] = ..;

  ncmpi_get_vara_float_all();


I can see the collective i/o is performed in the *_all function, which means all processes will call this function to do the i/o.


What if I write the code in the following way,


    loop_start=(int)(NREC/nprocs)*rank;

    loop_length=(int)(NREC/nprocs);

    /*parallel access datasets*/

    for(rec = loop_start;rec <loop_start+loop_length; rec++)

    {

      for(lon = 0; lon < NLON; lon++){

      mpi_start[0] = rec;

      mpi_start[2] = lon;

      ret = ncmpi_get_vara_float_all()

...


In the above codes, the outer loop is decomposed, then how the collective i/o will take effect in this case, if I specify mpirun -np 10 here.


In other word, can all the 10 processes cooperate with each other to do collective I/O anymore in this example?


If there is something wrong in my understanding, please point it out, thanks in advance.


Jialin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/parallel-netcdf/attachments/20121126/79788bec/attachment.html>


More information about the parallel-netcdf mailing list