Sounds like a documentation bug to me, are you referring to this? http://www-unix.mcs.anl.gov/petsc/petsc-2/snapshots/petsc-current/docs/manualpages/DA/DARestoreGlobalVector.html#DARestoreGlobalVector
Perhaps I'm misunderstanding how Get/Restore are being used. I'll let one of the developers chime in on this when they've got a moment. ~A On 1/27/07, Brian Grierson <bag2107 at columbia.edu> wrote: > Another quick question. PETSc online help says DAGetGlobal/DARestoreGlobal > is a Seq vector operation, while > DACreateGlobal/VecDesroy is parallel. > > I don't understand how you could create a global vector in a Seq manner on a > DA??? > > > > Brian A. Grierson > > > > > Department of Applied Physics > > Columbia University > > Mobile: 646.259.1038 > > Work: 212-854-4839 > > bag2107 at columbia.edu > > bgrierson21 at gmail.com > > http://www.columbia.edu/~bag2107/http://www.apam.columbia.edu/ctx/ctx.html > > > On Jan 27, 2007, at 6:41 PM, Aron Ahmadia wrote: > > Hi Brian, > > I took a quick peek at the source for DAGetGlobalVector in the current > release: > > " > for (i=0; i<DA_MAX_WORK_VECTORS; i++) { > if (da->globalin[i]) { > *g = da->globalin[i]; > da->globalin[i] = PETSC_NULL; > goto alldone; > } > } > ierr = DACreateGlobalVector(da,g);CHKERRQ(ierr); > > alldone: > for (i=0; i<DA_MAX_WORK_VECTORS; i++) { > if (!da->globalout[i]) { > da->globalout[i] = *g; > break; > } > " > > The two appear to be very similar, with this exception. Get/Restore > work with one copy of the DA's global vector, but will make a copy if > one has already been checked out or none exist. > > DACreateGlobalVector will always make a copy of the global vector, > regardless of the circumstances. I think you're better off using Get > and Restore (less data copying) unless you'd like to work with > multiple copies for some reason. > > ~A > > On 1/27/07, Brian Grierson <bag2107 at columbia.edu> wrote: > > Could you please tell me the difference between > > DACreateGlobalVector / VecDestroy > and > DAGetGlobalVector / DARestoreGlobalVector > > > > > > > > > > > > Brian A. Grierson > > > > > Department of Applied Physics > > Columbia University > > Mobile: 646.259.1038 > > Work: 212-854-4839 > > bag2107 at columbia.edu > > bgrierson21 at gmail.com > > http://www.columbia.edu/~bag2107/http://www.apam.columbia.edu/ctx/ctx.html > > > >
