Jed, I totally understand your answer ! I was just wondering if a relevant 
option (at the command line) could do the trick.
Barry, I'll try to give a try to your suggestion.

Thanks,

Franck

----- Mail original -----
> De: "Barry Smith" <bsm...@mcs.anl.gov>
> À: "Franck Houssen" <franck.hous...@inria.fr>
> Cc: "petsc-dev" <petsc-dev@mcs.anl.gov>
> Envoyé: Mardi 1 Août 2017 20:09:29
> Objet: Re: [petsc-dev] How to get ordered (readable) dumps when using 
> ksp_view with several prefixed solvers (1
> solver per MPI proc) ?
> 
> 
> > On Aug 1, 2017, at 7:10 AM, Franck Houssen <franck.hous...@inria.fr> wrote:
> > 
> > How to get ordered (readable) dumps when using ksp_view with several
> > prefixed solvers (1 solver per MPI proc) ?
> > 
> > Say I have 2 procs. Each proc has a local solver prefixed "s". When I add
> > -s_ksp_view to the command line, logs of both (local s) solvers from both
> > procs are mixed in the standard output: makes things difficult to
> > understand !
> > 
> > Is there an option to force synchronized dumps in this case (sort of
> > PetscSynchronizedPrintf for ksp_view) ?
> > Or each proc needs to dump logs to a file with PetscViewerASCIIOpen for
> > instance ?
> 
>    If you are willing to add something to your code you can use
> 
> PetscViewerGetSubViewer()
> KSPView()
> PetscViewerRestoreSubViewer()
> 
> if the ksp is sequential you could use something like
> 
> PetscViewer sviewer;
> PetscViewerGetSubViewer(PETSC_VIEWER_STDOUT_WORLD,PETSC_COMM_SELF,&sviewer)
> KSPView(ksp,sviewer)
> PetscViewerRestoreSubViewer(PETSC_VIEWER_STDOUT_WORLD,PETSC_COMM_SELF,&sviewer)
> PetscViewerFlush(PETSC_VIEWER_STDOUT_WORLD);
> 
> 
> > 
> > Franck
> 
> 

Reply via email to