<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<div><span style="font-size: small; text-align: left; font-family: 'Times New Roman'; ">Hi all,</span></div>
<div><span style="font-size: small; text-align: left; font-family: 'Times New Roman'; "><br>
</span></div>
<div><span style="font-size: small; text-align: left; font-family: 'Times New Roman'; ">please see the following codes first,</span></div>
<div><span style="font-size: small; text-align: left; font-family: 'Times New Roman'; "><br>
</span></div>
<div><span style="font-size: small; text-align: left; font-family: 'Times New Roman'; ">  mpi_start[]</span><span style="font-size: small; text-align: left; font-family: 'Times New Roman'; "> = ..</span><span style="font-size: small; text-align: left; font-family: 'Times New Roman'; ">;</span></div>
<div>
<p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;
direction:ltr;unicode-bidi:embed;mso-line-break-override:none;word-break:normal;
punctuation-wrap:hanging">
<font size="2"><span style="font-family: 'Times New Roman'; ">  </span><span style="font-family: 'Times New Roman'; ">mpi_count[]</span><span style="font-family: 'Times New Roman'; "> = ..</span><span style="font-family: 'Times New Roman'; ">;</span></font></p>
<p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;
direction:ltr;unicode-bidi:embed;mso-line-break-override:none;word-break:normal;
punctuation-wrap:hanging">
<span style="font-size: small; font-family: 'Times New Roman'; ">  ncmpi_get_vara_float_all();</span></p>
<p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;
direction:ltr;unicode-bidi:embed;mso-line-break-override:none;word-break:normal;
punctuation-wrap:hanging">
<span style="font-size: small; font-family: 'Times New Roman'; "><br>
</span></p>
<p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;
direction:ltr;unicode-bidi:embed;mso-line-break-override:none;word-break:normal;
punctuation-wrap:hanging">
<font face="'Times New Roman'" size="2">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.</font></p>
<p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;
direction:ltr;unicode-bidi:embed;mso-line-break-override:none;word-break:normal;
punctuation-wrap:hanging">
<font face="'Times New Roman'" size="2"><br>
</font></p>
<p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;
direction:ltr;unicode-bidi:embed;mso-line-break-override:none;word-break:normal;
punctuation-wrap:hanging">
<font face="'Times New Roman'" size="2">What if I write the code in the following way,</font></p>
<p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;
direction:ltr;unicode-bidi:embed;mso-line-break-override:none;word-break:normal;
punctuation-wrap:hanging">
<font face="'Times New Roman'" size="2"><br>
</font></p>
<p style="margin-top:0pt;margin-bottom:0pt;margin-left:0in;text-align:left;
direction:ltr;unicode-bidi:embed;mso-line-break-override:none;word-break:normal;
punctuation-wrap:hanging">
<font face="'Times New Roman'" size="2"></p>
<p style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 0in; direction: ltr; unicode-bidi: embed; word-break: normal; ">
    loop_start=(int)(NREC/nprocs)*rank;</p>
<p style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 0in; direction: ltr; unicode-bidi: embed; word-break: normal; ">
    loop_length=(int)(NREC/nprocs);</p>
<p style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 0in; direction: ltr; unicode-bidi: embed; word-break: normal; ">
    /*parallel access datasets*/</p>
<p style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 0in; direction: ltr; unicode-bidi: embed; word-break: normal; ">
    for(rec = loop_start;rec <loop_start+loop_length; rec++)</p>
<p style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 0in; direction: ltr; unicode-bidi: embed; word-break: normal; ">
    {</p>
<p style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 0in; direction: ltr; unicode-bidi: embed; word-break: normal; ">
      for(lon = 0; lon < NLON; lon++){</p>
<p style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 0in; direction: ltr; unicode-bidi: embed; word-break: normal; ">
      mpi_start[0] = rec;</p>
<p style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 0in; direction: ltr; unicode-bidi: embed; word-break: normal; ">
      mpi_start[2] = lon;</p>
<p style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 0in; direction: ltr; unicode-bidi: embed; word-break: normal; ">
      ret = ncmpi_get_vara_float_all()</p>
<p style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 0in; direction: ltr; unicode-bidi: embed; word-break: normal; ">
...</p>
<p style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 0in; direction: ltr; unicode-bidi: embed; word-break: normal; ">
<br>
</p>
<p style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 0in; direction: ltr; unicode-bidi: embed; word-break: normal; ">
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.</p>
<p style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 0in; direction: ltr; unicode-bidi: embed; word-break: normal; ">
<br>
</p>
<p style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 0in; direction: ltr; unicode-bidi: embed; word-break: normal; ">
In other word, can all the 10 processes cooperate with each other to do collective I/O anymore in this example?</p>
<p style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 0in; direction: ltr; unicode-bidi: embed; word-break: normal; ">
<br>
</p>
<p style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 0in; direction: ltr; unicode-bidi: embed; word-break: normal; ">
If there is something wrong in my understanding, please point it out, thanks in advance.</p>
<p style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 0in; direction: ltr; unicode-bidi: embed; word-break: normal; ">
<br>
</p>
<p style="margin-top: 0pt; margin-bottom: 0pt; margin-left: 0in; direction: ltr; unicode-bidi: embed; word-break: normal; ">
Jialin</p>
</font>
<p></p>
<!--EndFragment--></div>
</div>
</body>
</html>