[petsc-users] Redirecting petsc output

Barry Smith bsmith at petsc.dev
Wed Sep 8 10:16:27 CDT 2021


  Philip,

    There a variety of techniques. Some of the command line options take an optional viewer name where the output can be redirected. For example 

   -ts_monitor ascii:filename or -ts_view ascii:filename    see https://petsc.org/release/docs/manualpages/Viewer/PetscOptionsGetViewer.html <https://petsc.org/release/docs/manualpages/Viewer/PetscOptionsGetViewer.html> for more details

   It is also possible to change all stdout from PETSc to a different file by setting PETSC_STDOUT = fopen(...) 


   Barry


> On Sep 8, 2021, at 10:59 AM, Fackler, Philip via petsc-users <petsc-users at mcs.anl.gov> wrote:
> 
> Is there a way to customize how petsc writes information? Instead of writing to stdout (for example: 0 TS dt 0.1 time 0.), what if we want to log that message to a file other output from Xolotl? I'm assuming there are multiple ways of getting this result. What's common practice with petsc folks?
> 
> Thanks,
> 
> Philip Fackler
> Research Software Engineer, Application Engineering Group
> Advanced Computing Systems Research Section
> Computer Science and Mathematics Division
> Oak Ridge National Laboratory

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210908/25b2964c/attachment-0001.html>


More information about the petsc-users mailing list