I have the application options prefixed so I can grep for them, as Mark
suggested. But, we were looking for ways to only display the application
options with “-help” without using grep.
But are you sure you want to do this? Even -ksp_monitor etc will
no longer produce help messages which users may want.
Hmm..for the power grid application users, they don’t really care much about
the solver details so not displaying -xxx_monitor would be fine. But, as
developers we’d like to know what the solver is doing so we’d definitely want
them to be displayed. I’ll try your suggestions.
Thank you for your suggestions - Mark, Jacob, and Barry.
Thanks,
Shri
Another possibility, perhaps the easiest, would be to just create a different
help option name for the application and not fiddle with changing the behavior
of “-help”.
From: Barry Smith <[email protected]>
Date: Monday, January 11, 2021 at 7:13 PM
To: "Abhyankar, Shrirang G" <[email protected]>
Cc: PETSc Users <[email protected]>, "Mancinelli, Asher J"
<[email protected]>
Subject: Re: [petsc-users] Not displaying petsc options with -help
Check twice before you click! This email originated from outside PNNL.
Change the value of PetscHelpPrintf() to do nothing before PetscInitialize()
and then change it PetscHelpPrintfDefault() just around your options.
I have fixed up the manual page in
https://gitlab.com/petsc/petsc/-/merge_requests/3553<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.com%2Fpetsc%2Fpetsc%2F-%2Fmerge_requests%2F3553&data=04%7C01%7Cshrirang.abhyankar%40pnnl.gov%7C50d75f1799204cbf6fce08d8b6975353%7Cd6faa5f90ae240338c0130048a38deeb%7C0%7C0%7C637460108349074754%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=nXt%2FtxzhVwk4g4FOADUNL%2FuLJkKpuQHiu%2B71vSbUytM%3D&reserved=0>
But are you sure you want to do this? Even -ksp_monitor etc will no longer
produce help messages which users may want.
Barry
On Jan 11, 2021, at 4:52 PM, Abhyankar, Shrirang G via petsc-users
<[email protected]<mailto:[email protected]>> wrote:
I have an application where I set a bunch of application-specific options in
PetscOptionsBegin/End and it uses the default PetscOptions database. When
running the application with “-help” option all the application and PETSc
options get displayed. Is there a way to suppress displaying PETSc options, but
only display the application options.
Thanks,
Shri