<div dir="ltr">John Peterson sent me an email (Thanks!)<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Regarding our past discussion on PETSc signal handlers, there was a recent thread on petsc-users: </blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><a href="https://lists.mcs.anl.gov/pipermail/petsc-users/2020-June/041215.html" target="_blank">https://lists.mcs.anl.gov/pipermail/petsc-users/2020-June/041215.html</a><br>I think this poster's question may be related to signal handlers rather than error handlers as Satish replied... unfortunately I am not subscribed to petsc-users so I am not able to reply directly, but it may be useful to point out the open MR on this topic:<br><a href="https://gitlab.com/petsc/petsc/-/merge_requests/2745" target="_blank">https://gitlab.com/petsc/petsc/-/merge_requests/2745</a></blockquote><div><br></div><br><div>I think we should approve this MR as it exactly addresses the Steve's problem.  PetscXxxxErrorHandler handles errors, not signals, such as SIGTERM.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jun 4, 2020 at 2:32 PM Satish Balay via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I don't completely understand the issue here. How is sequential run different than parallel run?<br>
<br>
In both cases - a PetscErrorHandler is likely getting invoked. One can change this behavior with:<br>
<br>
<a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscPushErrorHandler.html" rel="noreferrer" target="_blank">https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscPushErrorHandler.html</a><br>
<br>
And there are a few default error handlers to choose<br>
<br>
<br>
PETSC_EXTERN PetscErrorCode PetscTraceBackErrorHandler(MPI_Comm,int,const char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);<br>
PETSC_EXTERN PetscErrorCode PetscIgnoreErrorHandler(MPI_Comm,int,const char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);<br>
PETSC_EXTERN PetscErrorCode PetscEmacsClientErrorHandler(MPI_Comm,int,const char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);<br>
PETSC_EXTERN PetscErrorCode PetscMPIAbortErrorHandler(MPI_Comm,int,const char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);<br>
PETSC_EXTERN PetscErrorCode PetscAbortErrorHandler(MPI_Comm,int,const char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);<br>
PETSC_EXTERN PetscErrorCode PetscAttachDebuggerErrorHandler(MPI_Comm,int,const char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);<br>
PETSC_EXTERN PetscErrorCode PetscReturnErrorHandler(MPI_Comm,int,const char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);<br>
<br>
Some of the are accessible via command line option. for ex: -on_error_abort or -on_error_mpiabort<br>
<br>
Or perhaps you want to completely disable error handler with: -no_signal_handler<br>
<br>
cc: petsc-users<br>
<br>
Satish<br>
<br>
On Thu, 4 Jun 2020, Hudson, Stephen Tobias P wrote:<br>
<br>
> Satish,<br>
> <br>
> We are having issues caused by MPI_abort getting called when we try to terminate a sub-process running petsc4py. Ideally we would always use a serial build of petsc/petsc4py in this mode, but many users will have a parallel build. We need to be able to send a terminate signal that just kills the process.<br>
> <br>
> Is there a way to turn off the mpi_abort?<br>
> <br>
> Thanks,<br>
> <br>
> Steve<br>
> <br>
> <br>
<br>
</blockquote></div>