[petsc-users] printing from some processors to a file

Randall Mackie rlmackie862 at gmail.com
Wed Nov 27 10:24:44 CST 2013


Hi Barry,

Thanks for fixing this. The workaround you suggested yesterday works
perfectly well for me at this point, and I'll look at this fix in the next
release.

Randy M.


On Tue, Nov 26, 2013 at 8:29 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:

>
>    I have fixed this in the next branch of PETSc
> https://bitbucket.org/petsc/petsc/wiki/Home
>
>    Because it changes APIs I cannot merge it into the current release
> (though it doesn’t change APIs for your code).
>
>     Thanks for reporting the problem,
>
>    Barry
> On Nov 26, 2013, at 3:45 PM, Randall Mackie <rlmackie862 at gmail.com> wrote:
>
> > I am trying to print a character string to a file from one or more
> processors in a communicator. I thought that I could do this using
> PetscViewerASCIISynchronizedPrintf, but it prints to the screen instead of
> to the file opened as a viewer. The attached simple program illustrates the
> issue. If I remove the (if rank == 1) and therefore call
> PetscViewerASCIISynchronizedPrintf from every process, it works as
> expected. If called from only 1 process, it prints to the screen. I
> thought, from the documentation, that it was not collective, but maybe I am
> not understanding it's usage.
> >
> >
> > Randy M.
> > <test.F90>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20131127/211d7cba/attachment.html>


More information about the petsc-users mailing list