[petsc-users] PetscPrintf

Matthew Knepley knepley at gmail.com
Tue Dec 13 10:24:37 CST 2011


On Tue, Dec 13, 2011 at 10:19 AM, Xiangdong Liang <xdliang at gmail.com> wrote:

> On Tue, Dec 13, 2011 at 11:14 AM, Matthew Knepley <knepley at gmail.com>
> wrote:
> > On Tue, Dec 13, 2011 at 10:13 AM, Xiangdong Liang <xdliang at gmail.com>
> wrote:
> >>
> >> Hello everyone,
> >>
> >> I am using PetscPrintf(PETSC_COMM_WORLD,.....) to print out some
> >> information. When I run the program on multiple processors, some of
> >> these calls are printed out multiple times, while other calls are
> >> printed out once. Should it be printed only once if I use
> >> PETSC_COMM_WORLD? Thanks.
> >
> >
> > The print is executed only on rank 0 of the communicator provided.
>
> I agree. This implies that the message can be printed out at most
> once. Do you have any hints why I saw the message printed out multiple
> times? Thanks.
>

Maybe

1) You have a bug in your code

2) You ran with the wrong mpiexec, so it just ran 2 copies

  Matt


> Xiangdong
>
>
> >
> >    Matt
> >
> >>
> >>
> >> Xiangdong
> >>
> >> PS. I am using petsc-dev. My code works fine on real petsc-3.1-p8. I
> >> just switched to complex petsc-dev and see this problem.
> >
> >
> >
> >
> > --
> > 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
>



-- 
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-users/attachments/20111213/05d30efe/attachment.htm>


More information about the petsc-users mailing list