[petsc-users] Writing Out Name of Options File

Matthew Knepley knepley at gmail.com
Fri Nov 13 19:45:06 CST 2020


On Fri, Nov 13, 2020 at 12:06 PM David Scott <d.scott at epcc.ed.ac.uk> wrote:

> Hello,
>
> I am specifying an options file on the command line with '-options_file
> <file_name>'. I would like the program to write out <file_name> to
> stdout. Is there a simple way to do this?
>
> I thought that I would be able interrogate the options database to
> obtain the file name but, whilst the file is definitely being read, the
> name '-options_file' does not appear in the database.
>

This is true. We use "options_file" (and "prefix_push"/"prefix_pop") as
preprocessor
directives in our source, which is the options string, so they do not
appear in the
token string, but instead modify it.

Looking at the code, you can give several -options_file arguments if you
wish, just
like #include, to put more options in the stream. I guess we could store
them all.
Any chance you would consider contributing this?

  Thanks,

     Matt


> I am using PETSc 3.13.3 from Fortran.
>
> Regards,
>
> David
>
> The University of Edinburgh is a charitable body, registered in Scotland,
> with registration number SC005336.
>


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20201113/d03a9bf9/attachment.html>


More information about the petsc-users mailing list