[petsc-dev] -log_view not working when setting using PetscOptionsSetValue( )

Angus, Justin Ray angus1 at llnl.gov
Wed Aug 21 12:14:37 CDT 2024


Hello,

I’ve been able to successfully use -log_view in a cpp code using PETSc when setting it through a .petscrc file. I get lots of information about the SNES and KS solvers at the end of my simulation as expected.

However, if I instead try to turn on log_view from inside my cpp code, using something like

PetscInitialize(&a_argc,&a_argv,(char*)0,help);
PetscOptionsSetValue( NULL, "-log_view" , NULL );
PetscFinalize();

Then I get the following message at the end of my simulation

[5]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
[5]PETSC ERROR: Object is in wrong state
[5]PETSC ERROR: A PetscLogHandler of type default has not been started.
[5]PETSC ERROR: See https://urldefense.us/v3/__https://petsc.org/release/faq/__;!!G_uCfscf7eWS!ZOx9FLrofB1s1oTVLL6psn-36zBbHH9WiAgg1Arjda5O4RvYo1Na8aJgC4P_Ractdr7HCa0C-aPq9oVsiUcnlQ$  for trouble shooting.


What am I doing wrong here?

Thank you.

-Justin


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20240821/60295836/attachment.html>


More information about the petsc-dev mailing list