<div dir="ltr">Hi,<div><br></div><div>I am taking a slightly different path in the development, so I'll answer later when I come back to that point.</div><div>Thanks for your help so far<br><br>Cheers</div><div><br></div><div>Timothée</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le jeu. 16 janv. 2020 à 15:38, Smith, Barry F. <<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
> On Jan 16, 2020, at 3:18 AM, Timothée Nicolas <<a href="mailto:timothee.nicolas@gmail.com" target="_blank">timothee.nicolas@gmail.com</a>> wrote:<br>
> <br>
> Actually, for the main solver it works. I'm thinking, could it be due to the fact that the second SNES instance is defined in a routine that is called somewhere inside the FormFunction of the main SNES? We are improving our boundary condition, which becomes quite complex, and we have a small problem to solve, so I'm trying to handle it with a SNES. So the two SNES are nested, in a sense.<br>
<br>
This should be fine. We do this.<br>
<br>
Are you sure the inner SNES is actually being called? <br>
<br>
Run with -help | grep green does it print a help message for your green options?<br>
<br>
Barry<br>
<br>
> <br>
> Timothée<br>
> <br>
> Le mer. 15 janv. 2020 à 23:24, Timothée Nicolas <<a href="mailto:timothee.nicolas@gmail.com" target="_blank">timothee.nicolas@gmail.com</a>> a écrit :<br>
> I can actually use some command line arguments. My line arguments actually read<br>
> <br>
> -snes_mf -green_snes_monitor<br>
> <br>
> and the first -snes_mf argument (for the main solver snes) is correctly taken into account.<br>
> I will try what Barry suggested, I'll tell you if I find the reason.<br>
> <br>
> Best regards, thanks for your comments<br>
> <br>
> Timothée<br>
> <br>
> Le mer. 15 janv. 2020 à 18:56, Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> a écrit :<br>
> I think that Mark is suggesting that no command line arguments are getting in.<br>
> <br>
> Timothee,<br>
> <br>
> Can you use any command line arguments?<br>
> <br>
> Thanks,<br>
> <br>
> Matt<br>
> <br>
> On Wed, Jan 15, 2020 at 12:04 PM Smith, Barry F. via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>> wrote:<br>
> <br>
> Should still work. Run in the debugger and put a break point in snessetoptionsprefix_ and see what it is trying to do<br>
> <br>
> Barry<br>
> <br>
> <br>
> > On Jan 15, 2020, at 8:58 AM, Timothée Nicolas <<a href="mailto:timothee.nicolas@gmail.com" target="_blank">timothee.nicolas@gmail.com</a>> wrote:<br>
> > <br>
> > Hi, thanks for your answer,<br>
> > <br>
> > I'm using Petsc version 3.10.4<br>
> > <br>
> > Timothée<br>
> > <br>
> > Le mer. 15 janv. 2020 à 14:59, Mark Adams <<a href="mailto:mfadams@lbl.gov" target="_blank">mfadams@lbl.gov</a>> a écrit :<br>
> > I'm guessing a Fortran issue. What version of PETSc are you using?<br>
> > <br>
> > On Wed, Jan 15, 2020 at 8:36 AM Timothée Nicolas <<a href="mailto:timothee.nicolas@gmail.com" target="_blank">timothee.nicolas@gmail.com</a>> wrote:<br>
> > Dear PETSc users,<br>
> > <br>
> > I am confused by the usage of SNESSetOptionsPrefix. I understand this is required if you have for example different SNES in your program and want to set different options for them.<br>
> > So for my second snes I wrote <br>
> > <br>
> > call SNESCreate(MPI_COMM_SELF,snes,ierr)<br>
> > call SNESSetOptionsPrefix(snes,'green_',ierr)<br>
> > call SNESSetFromOptions(snes,ierr)<br>
> > <br>
> > etc.<br>
> > <br>
> > Then when launching the program I wanted to monitor that snes so I launched it with the option -green_snes_monitor instead of -snes_monitor. But I keep getting the message<br>
> > <br>
> > WARNING! There are options you set that were not used!<br>
> > WARNING! could be spelling mistake, etc!<br>
> > Option left: name:-green_snes_monitor (no value)<br>
> > <br>
> > What do I miss here?<br>
> > <br>
> > Best regards<br>
> > <br>
> > Timothée NICOLAS<br>
> <br>
> <br>
> <br>
> -- <br>
> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
> -- Norbert Wiener<br>
> <br>
> <a href="https://www.cse.buffalo.edu/~knepley/" rel="noreferrer" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br>
<br>
</blockquote></div>