[petsc-users] Terminating a process running petsc via petsc4py without mpi_abort

Junchao Zhang junchao.zhang at gmail.com
Thu Jun 4 15:41:09 CDT 2020


John Peterson sent me an email (Thanks!)


> Regarding our past discussion on PETSc signal handlers, there was a recent
> thread on petsc-users:

https://lists.mcs.anl.gov/pipermail/petsc-users/2020-June/041215.html
> 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:
> https://gitlab.com/petsc/petsc/-/merge_requests/2745



I think we should approve this MR as it exactly addresses the Steve's
problem.  PetscXxxxErrorHandler handles errors, not signals, such as
SIGTERM.


On Thu, Jun 4, 2020 at 2:32 PM Satish Balay via petsc-users <
petsc-users at mcs.anl.gov> wrote:

> I don't completely understand the issue here. How is sequential run
> different than parallel run?
>
> In both cases - a PetscErrorHandler is likely getting invoked. One can
> change this behavior with:
>
>
> https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscPushErrorHandler.html
>
> And there are a few default error handlers to choose
>
>
> PETSC_EXTERN PetscErrorCode PetscTraceBackErrorHandler(MPI_Comm,int,const
> char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
> PETSC_EXTERN PetscErrorCode PetscIgnoreErrorHandler(MPI_Comm,int,const
> char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
> PETSC_EXTERN PetscErrorCode
> PetscEmacsClientErrorHandler(MPI_Comm,int,const char*,const
> char*,PetscErrorCode,PetscErrorType,const char*,void*);
> PETSC_EXTERN PetscErrorCode PetscMPIAbortErrorHandler(MPI_Comm,int,const
> char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
> PETSC_EXTERN PetscErrorCode PetscAbortErrorHandler(MPI_Comm,int,const
> char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
> PETSC_EXTERN PetscErrorCode
> PetscAttachDebuggerErrorHandler(MPI_Comm,int,const char*,const
> char*,PetscErrorCode,PetscErrorType,const char*,void*);
> PETSC_EXTERN PetscErrorCode PetscReturnErrorHandler(MPI_Comm,int,const
> char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*);
>
> Some of the are accessible via command line option. for ex:
> -on_error_abort or -on_error_mpiabort
>
> Or perhaps you want to completely disable error handler with:
> -no_signal_handler
>
> cc: petsc-users
>
> Satish
>
> On Thu, 4 Jun 2020, Hudson, Stephen Tobias P wrote:
>
> > Satish,
> >
> > 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.
> >
> > Is there a way to turn off the mpi_abort?
> >
> > Thanks,
> >
> > Steve
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200604/50b297f2/attachment-0001.html>


More information about the petsc-users mailing list