Repository navigation
Redirecting libmesh and PETSc stdout/stderr #3040
|
Hi, I am having trouble redirecting libmesh and PETSc stdout/stderr. I tried this kind of construction: But KSP messages from PETSc (from -ksp_monitor) are not forwarded. Any idea? Shouldn't petsc messages be forwarded to libMesh::out and ::err? Thanks, |
Replies: 2 comments
|
To redirect libmesh output, you should pass |
|
As a solution, one may consider a mini-wrapper script where shell redirection " > " to a certain file is performed. If one wants this filename, or these filenames, to match with the libmesh ones, Basically, it is a bit of "externalization" from the program out to a script, but perhaps redirection in the end Giorgio |
To redirect libmesh output, you should pass
--keep-cout --redirect-outputon the command line. This will write all output to files called "log.processor.N" by default, where N is the processor rank. Regarding PETSc output, I don't believe this will be affected by our redirecting ofstd::coutbecause their print statements are (at some level) based around using Cprintfstatements.