Alex,

  If you are ok with plan text you can also put all your "command line 
arguments" in a text file (using # for comment lines) like

-ksp_rtol 1.e-3
# very tight tolerance for SNES
-snes_rtol 1.e-12

and provide the file to PETSc via 

the command line argument :-) -options_file filename

a file with a standard name petscrc in the running directory or

PetscOptionsInsertFile() 
https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscOptionsInsertFile.html
 
<https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscOptionsInsertFile.html>

Barry


> On Aug 20, 2020, at 11:44 PM, Alex Fleeter <luis.satur...@gmail.com> wrote:
> 
> Thanks, we will try that. I have never used YAML before.
> 
> Anyway, we feel using command line arguments is a bit old fashioned. It can 
> be quite desirable to set parameters from a human-readable file.
> 
> On Thu, Aug 20, 2020 at 9:38 PM Jed Brown <j...@jedbrown.org 
> <mailto:j...@jedbrown.org>> wrote:
> You can read from a YAML file with -options_file_yaml file.yaml or via
> 
> https://www.mcs.anl.gov/petsc/petsc-master/docs/manualpages/Sys/PetscOptionsInsertFileYAML.html
>  
> <https://www.mcs.anl.gov/petsc/petsc-master/docs/manualpages/Sys/PetscOptionsInsertFileYAML.html>
> 
> Would this work for you or do you really want XML?
> 
> Alex Fleeter <luis.satur...@gmail.com <mailto:luis.satur...@gmail.com>> 
> writes:
> 
> > Hi:
> >
> > Does PETSc have or plan to enable reading arguments from an XML file?
> > Something like the Teuchos package in Trilinos.
> >
> > Thanks,
> >
> > AF

Reply via email to