[petsc-dev] Stokes flow code PETSC

Jed Brown jedbrown at mcs.anl.gov
Mon Sep 12 02:38:34 CDT 2011


On Mon, Sep 12, 2011 at 06:43, Jie Chen <jiechen at mcs.anl.gov> wrote:

> Jed, I guess there is something wrong with the command line parser. Try the
> following command line:
>
> $ mpiexec.hydra -n 32 -f ~/hostfile-vierzack12 ./ex42 -mx 80 -da_view
> -log_summary -levels 4 -options_file ex42-mgfs2.opts -write_pvts 0
> -write_binary ex42.data | tee ex42-np32-mx80.log  2>&1
>

> If in your options file -levels is set to 4, then change the number in the
> command line to something else.
>

Aha, this is actually by design and the reason I specifically put the
-options_file part first on the command line. This way those options are
overridden by the command line options that come later. This is generally
the way options work: if an option is given more than once, the last
occurrence is the one that gets used by the application. I think this is
usually what the user wants.

Look at the log file after the program is executed. You will see that the
> -levels option in the command line does not work. On the other hand, if you
> issue the command line as you did previously:
>
> $ mpiexec.hydra -n 32 -f ~/hostfile-vierzack12 ./ex42 -options_file
> ex42-mgfs2.opts -write_pvts 0 -write_binary ex42.data -da_view -mx 80
> -levels 4 -log_summary | tee ex42-np32-mx80.log  2>&1
>
> the -levels options was indeed effective.
>

Great, I'm glad it's working now.


> Please fix the parser.
>

Does anyone have a case for always parsing _all_ -options_file arguments
before inserting the rest of the command line into the options database?
This would have avoided this confusing situation you have run into, but I'm
not convinced it's actually more consistent.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20110912/f27318c5/attachment.html>


More information about the petsc-dev mailing list