[petsc-dev] synchronized printing, singletons, and jumbled GAMG/BJacobi output

Matthew Knepley knepley at gmail.com
Sat May 25 08:18:53 CDT 2013


On Sat, May 25, 2013 at 8:14 AM, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> Matthew Knepley <knepley at gmail.com> writes:
>
> >> 2. Buffer and then synchronize on PetscViewerRestoreSingleton.  This
> >>    requires adding PetscViewerASCIISynchronizedVPrintf so that normal
> >>    PetscViewerASCIIPrintf on the singleton viewer will write to a
> >>    string.
> >>
> >
> > I would rather replace the writes with SynchronizedPrintf()s. Why change
> the
> > semantics?
>
>     PetscViewerGetSingleton(v,&s);
>     PetscViewerASCIISynchronizedPrintf(s,"This is supposed to be
> synchronous on 'v', not 's'\n");
>     KSPView(subksp,s);
>     PetscViewerRestoreSingleton(v,&s);
>
> The true problem is with calling KSPView, but I think the Printf is also
> misleading.
>

Okay, I thought as the docs stand today, this is misleading. If we declare
that Singletons are
for synchronized printing, then that is fine.

   Matt

-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130525/4168c1c8/attachment.html>


More information about the petsc-dev mailing list