On 1/27/07, <b class="gmail_sendername">Aron Ahmadia</b> <<a href="mailto:aja2111@columbia.edu">aja2111@columbia.edu</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Sounds like a documentation bug to me, are you referring to this?<br><a href="http://www-unix.mcs.anl.gov/petsc/petsc-2/snapshots/petsc-current/docs/manualpages/DA/DARestoreGlobalVector.html#DARestoreGlobalVector">http://www-unix.mcs.anl.gov/petsc/petsc-2/snapshots/petsc-current/docs/manualpages/DA/DARestoreGlobalVector.html#DARestoreGlobalVector
</a><br><br>Perhaps I'm misunderstanding how Get/Restore are being used. I'll let<br>one of the developers chime in on this when they've got a moment.</blockquote><div><br>This is a cut&paste error from GetLocalVector().
<br> <br> Matt <br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">~A<br><br>On 1/27/07, Brian Grierson <<a href="mailto:bag2107@columbia.edu">
bag2107@columbia.edu</a>> wrote:<br>> Another quick question. PETSc online help says DAGetGlobal/DARestoreGlobal<br>> is a Seq vector operation, while<br>> DACreateGlobal/VecDesroy is parallel.<br>><br>> I don't understand how you could create a global vector in a Seq manner on a
<br>> DA???<br>><br>><br>><br>> Brian A. Grierson<br>><br>><br>><br>><br>> Department of Applied Physics<br>><br>> Columbia University<br>><br>> Mobile: 646.259.1038<br>><br>> Work: 212-854-4839
<br>><br>> <a href="mailto:bag2107@columbia.edu">bag2107@columbia.edu</a><br>><br>> <a href="mailto:bgrierson21@gmail.com">bgrierson21@gmail.com</a><br>><br>> <a href="http://www.columbia.edu/~bag2107/http://www.apam.columbia.edu/ctx/ctx.html">
http://www.columbia.edu/~bag2107/http://www.apam.columbia.edu/ctx/ctx.html</a><br>><br>><br>> On Jan 27, 2007, at 6:41 PM, Aron Ahmadia wrote:<br>><br>> Hi Brian,<br>><br>> I took a quick peek at the source for DAGetGlobalVector in the current
<br>> release:<br>><br>> "<br>> for (i=0; i<DA_MAX_WORK_VECTORS; i++) {<br>> if (da->globalin[i]) {<br>> *g = da->globalin[i];<br>> da->globalin[i] = PETSC_NULL;
<br>> goto alldone;<br>> }<br>> }<br>> ierr = DACreateGlobalVector(da,g);CHKERRQ(ierr);<br>><br>> alldone:<br>> for (i=0; i<DA_MAX_WORK_VECTORS; i++) {<br>> if (!da->globalout[i]) {
<br>> da->globalout[i] = *g;<br>> break;<br>> }<br>> "<br>><br>> The two appear to be very similar, with this exception. Get/Restore<br>> work with one copy of the DA's global vector, but will make a copy if
<br>> one has already been checked out or none exist.<br>><br>> DACreateGlobalVector will always make a copy of the global vector,<br>> regardless of the circumstances. I think you're better off using Get
<br>> and Restore (less data copying) unless you'd like to work with<br>> multiple copies for some reason.<br>><br>> ~A<br>><br>> On 1/27/07, Brian Grierson <<a href="mailto:bag2107@columbia.edu">
bag2107@columbia.edu</a>> wrote:<br>><br>> Could you please tell me the difference between<br>><br>> DACreateGlobalVector / VecDestroy<br>> and<br>> DAGetGlobalVector / DARestoreGlobalVector<br>><br>
><br>><br>><br>><br>><br>><br>><br>><br>><br>><br>> Brian A. Grierson<br>><br>><br>><br>><br>> Department of Applied Physics<br>><br>> Columbia University<br>><br>> Mobile:
646.259.1038<br>><br>> Work: 212-854-4839<br>><br>> <a href="mailto:bag2107@columbia.edu">bag2107@columbia.edu</a><br>><br>> <a href="mailto:bgrierson21@gmail.com">bgrierson21@gmail.com</a><br>><br>
> <a href="http://www.columbia.edu/~bag2107/http://www.apam.columbia.edu/ctx/ctx.html">http://www.columbia.edu/~bag2107/http://www.apam.columbia.edu/ctx/ctx.html</a><br>><br>><br>><br>><br><br></blockquote>
</div><br><br clear="all"><br>-- <br>One trouble is that despite this system, anyone who reads journals widely<br>and critically is forced to realize that there are scarcely any bars to eventual<br>publication. There seems to be no study too fragmented, no hypothesis too
<br>trivial, no literature citation too biased or too egotistical, no design too<br>warped, no methodology too bungled, no presentation of results too<br>inaccurate, too obscure, and too contradictory, no analysis too self-serving,
<br>no argument too circular, no conclusions too trifling or too unjustified, and<br>no grammar and syntax too offensive for a paper to end up in print. -- Drummond Rennie