[petsc-dev] Fortran interface for PetscViewerASCIISynchronizedAllow

Barry Smith bsmith at mcs.anl.gov
Thu Dec 10 22:09:10 CST 2015

> On Dec 10, 2015, at 10:04 PM, Adrian Croucher <a.croucher at auckland.ac.nz> wrote:
> On 11/12/15 16:55, Barry Smith wrote:
>>   If you are using the PetscViewerASCII routines then you should use PetscViewerFlush(viewer,ierr) and not
>> the PetscSynchronizedFlush()
> Sorry, I shouldn't have mixed up the two questions- I guess they weren't really that related!
> This one was about using PetscSynchronizedFlush() in conjunction with PetscSynchronizedPrintf(), for output to stdout - nothing to do with the PetscViewerASCII routines.
> (Unless you can somehow use the PetscViewerASCII routines for synchronized output to stdout instead?)

   Yes, this is what I recommend. The PetscSynchronizedPrintf() routines are older, lower level routines which have equivalent versions that use the viewer PetscViewerASCII...() Since the C FILE * object doesn't exist in Fortran things like PetscSynchronizedFlush() are problematic. But everything should be clean and clear with the PetscViewerASCII..() routines.

  Let me know if you have any trouble with them


> - Adrian
> -- 
> Dr Adrian Croucher
> Senior Research Fellow
> Department of Engineering Science
> University of Auckland, New Zealand
> email: a.croucher at auckland.ac.nz
> tel: +64 (0)9 923 84611

More information about the petsc-dev mailing list