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

Jed Brown jedbrown at mcs.anl.gov
Sat May 25 08:14:03 CDT 2013


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.



More information about the petsc-dev mailing list