<div dir="ltr">Dear Petsc --<div><br></div><div>Copied at the bottom is the behavior I get for ex5.c in snes examples/tutorials. When I do</div><div><br></div><div>$./ex5 -help |head</div><div><br></div><div>I get a "Caught signal number 13 Broken Pipe" or just a version string. Randomly, one or the other.</div><div><br></div><div>I know this has come up on petsc-users before:</div><div> <a href="http://lists.mcs.anl.gov/pipermail/petsc-users/2014-May/021848.html">http://lists.mcs.anl.gov/pipermail/petsc-users/2014-May/021848.html</a></div><div>The claim was that the SIGPIPE error is standard behavior.</div><div><br></div><div>My real issue (feature request?) is that when writing a petsc application I want a rational help system. Suppose "program.c" has options with prefix "prg_". The user doesn't know the prefix yet (I could have used "prog_" as the prefix ...) The petsc-canonical help system is (I believe)</div><div><br></div><div>./program -help |grep prg_</div><div><br></div><div>for program.c-specific options. Works great if you know to look for "prg_". My plan for my applications is to put the prefix in the first line or two of my help string, the user can discover the prefix by</div><div><br></div><div>./program -help |head</div><div><br></div><div>and then use "-help |grep -prg_" and etc.</div><div><br></div><div>So my question is: Can petsc be set up to not generate an error message when the help system is used in a correct way? (I.e. catching return codes when writing, or handling SIGPIPE differently?) Or, on the other hand, can someone suggest a better help system that irritates less?</div><div><br></div><div>Thanks!</div><div><br></div><div>Ed</div><div><br></div><div><div>~/petsc/src/snes/examples/tutorials[master*]$ ./ex5 -help |head</div><div>Bratu nonlinear PDE in 2d.</div><div>We solve the Bratu (SFI - solid fuel ignition) problem in a 2D rectangular</div><div>domain, using distributed arrays (DMDAs) to partition the parallel grid.</div><div>The command line options include:</div><div> -par <parameter>, where <parameter> indicates the problem's nonlinearity</div><div> problem SFI: <parameter> = Bratu parameter (0 <= par <= 6.81)</div><div><br></div><div> -m_par/n_par <parameter>, where <parameter> indicates an integer</div><div> that MMS3 will be evaluated with 2^m_par, 2^n_par--------------------------------------------------------------------------</div><div>Petsc Development GIT revision: v3.7.6-3453-ge45481d470 GIT Date: 2017-04-26 13:00:15 -0500</div><div>[0]PETSC ERROR: ------------------------------------------------------------------------</div><div>[0]PETSC ERROR: Caught signal number 13 Broken Pipe: Likely while reading or writing to a socket</div><div>[0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger</div><div>[0]PETSC ERROR: or see <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind">http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind</a></div><div>[0]PETSC ERROR: or try <a href="http://valgrind.org">http://valgrind.org</a> on GNU/linux and Apple Mac OS X to find memory corruption errors</div><div>[0]PETSC ERROR: likely location of problem given in stack below</div><div>[0]PETSC ERROR: --------------------- Stack Frames ------------------------------------</div><div>[0]PETSC ERROR: Note: The EXACT line numbers in the stack are not available,</div><div>[0]PETSC ERROR: INSTEAD the line number of the start of the function</div><div>[0]PETSC ERROR: is given.</div><div>[0]PETSC ERROR: [0] PetscVFPrintfDefault line 240 /home/ed/petsc/src/sys/fileio/mprint.c</div><div>[0]PETSC ERROR: [0] PetscHelpPrintfDefault line 622 /home/ed/petsc/src/sys/fileio/mprint.c</div><div>[0]PETSC ERROR: [0] PetscOptionsBegin_Private line 29 /home/ed/petsc/src/sys/objects/aoptions.c</div><div>[0]PETSC ERROR: [0] PetscObjectOptionsBegin_Private line 61 /home/ed/petsc/src/sys/objects/aoptions.c</div><div>[0]PETSC ERROR: [0] PetscDSSetFromOptions line 218 /home/ed/petsc/src/dm/dt/interface/dtds.c</div><div>[0]PETSC ERROR: [0] DMSetFromOptions line 747 /home/ed/petsc/src/dm/interface/dm.c</div><div>[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------</div><div>[0]PETSC ERROR: Signal received</div><div>[0]PETSC ERROR: See <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html">http://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble shooting.</div><div>[0]PETSC ERROR: Petsc Development GIT revision: v3.7.6-3453-ge45481d470 GIT Date: 2017-04-26 13:00:15 -0500</div><div>[0]PETSC ERROR: ./ex5 on a linux-c-dbg named bueler-leopard by ed Wed Apr 26 11:22:07 2017</div><div>[0]PETSC ERROR: Configure options --download-mpich --with-debugging=1</div><div>[0]PETSC ERROR: #1 User provided function() line 0 in unknown file</div><div>application called MPI_Abort(MPI_COMM_WORLD, 59) - process 0</div><div>[unset]: aborting job:</div><div>application called MPI_Abort(MPI_COMM_WORLD, 59) - process 0</div><div>~/petsc/src/snes/examples/tutorials[master*]$ ./ex5 -help |head</div><div>Bratu nonlinear PDE in 2d.</div><div>We solve the Bratu (SFI - solid fuel ignition) problem in a 2D rectangular</div><div>domain, using distributed arrays (DMDAs) to partition the parallel grid.</div><div>The command line options include:</div><div> -par <parameter>, where <parameter> indicates the problem's nonlinearity</div><div> problem SFI: <parameter> = Bratu parameter (0 <= par <= 6.81)</div><div><br></div><div> -m_par/n_par <parameter>, where <parameter> indicates an integer</div><div> that MMS3 will be evaluated with 2^m_par, 2^n_par--------------------------------------------------------------------------</div><div>Petsc Development GIT revision: v3.7.6-3453-ge45481d470 GIT Date: 2017-04-26 13:00:15 -0500</div><div>~/petsc/src/snes/examples/tutorials[master*]$ </div><div><br></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div>Ed Bueler<br>Dept of Math and Stat and Geophysical Institute<br>University of Alaska Fairbanks<br>Fairbanks, AK 99775-6660<br>301C Chapman<br></div></div></div>
</div></div>