<div>Hi, <br></div><div>Thank you for your suggestion. I will take it into account.</div><div>Since changing this structure in my "massive" code may take too much time,</div><div>I would like to know that how "row" is calculated in 3D, independently from processor numbers.</div>
<div><br></div><div>Regards,</div><div>Ilyas</div><br><div class="gmail_quote">2011/4/18 Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Mon, Apr 18, 2011 at 8:34 AM, ilyas ilyas <span dir="ltr"><<a href="mailto:ilyascfd@gmail.com" target="_blank">ilyascfd@gmail.com</a>></span> wrote:<br></div><div class="gmail_quote"><div class="im">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>Hi,<br></div><div><br></div><div>In ex14f.F in KSP, "row" variable is calculated either</div></blockquote><div><br></div></div><div>These are very old. I suggest you use the FormFunctionLocal() approach in ex5f.F which</div>
<div>does not calculate global row numbers when using a DA.</div><div><br></div><div> Matt</div><div class="im"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>349: do 30 j=ys,ys+ym-1<br>
350: ...</div><div>351: do 40 i=xs,xs+xm-1<br>
352: row = i - gxs + (j - gys)*gxm + 1<br></div><div><br></div><div>or</div><div><br></div><div>442: do 50 j=ys,ys+ym-1<br>443: ...<br>444: row = (j - gys)*gxm + xs - gxs<br>445: do 60 i=xs,xs+xm-1<br>
446: row = row + 1<br></div><div><br></div><div>How can I calculate "row" in 3D ? </div><div><br></div><div>I tried this;</div><div><br></div><div>do k=zs,zs+zm-1<br> do j=ys,ys+ym-1<br> do i=xs,xs+xm-1<br>
<br>                  row = i - gxs + (j - gys)*gxm + (k - gzs)*gxm*gym + 1<br><br></div><div>It does not work for certain number of processors.</div><div><br></div><div><br></div><div>Thanks,</div><div><br></div><font color="#888888"><div>
Ilyas</div>
</font></blockquote></div></div><font color="#888888"><br><br clear="all"><br>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<br>
</font></blockquote></div><br>