<div dir="ltr">Dear PETSc users,<div><br></div><div>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.</div><div>So for my second snes I wrote </div><div><br></div><div>





<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;color:rgb(208,59,255)">call</span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures"> </span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(94,52,255)">SNESCreate</span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">(MPI_COMM_SELF,snes,ierr)</span></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">





</span></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;color:rgb(94,52,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;color:rgb(208,59,255)">call</span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"> </span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures">SNESSetOptionsPrefix</span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">(snes,</span><span class="gmail-s4" style="font-variant-ligatures:no-common-ligatures;color:rgb(175,55,130)">'green_'</span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">,ierr)</span></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;color:rgb(94,52,255)"><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">





</span></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;color:rgb(94,52,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;color:rgb(208,59,255)">call</span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"> </span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures">SNESSetFromOptions</span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">(snes,ierr)</span></p></div><div><br></div><div>etc.</div><div><br></div><div>Then when launching the program I wanted to monitor that snes so I launched it with the option <span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-family:Menlo;font-size:18px">-green_snes_monitor </span>instead of <span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-family:Menlo;font-size:18px">-snes_monitor</span>. But I keep getting the message</div><div><br></div><div>





<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">WARNING! There are options you set that were not used!</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">WARNING! could be spelling mistake, etc!</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:18px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">Option left: name:-green_snes_monitor (no value)</span></p></div><div><br></div><div>What do I miss here?</div><div><br></div><div>Best regards</div><div><br></div><div>Timothée NICOLAS</div>











</div>