On Tue, Nov 7, 2017 at 7:47 AM, Gard Spreemann <[email protected]> wrote:
> On Tuesday 7 November 2017 07:35:36 CET Mark Adams wrote: > > PETSc's signal handler is for segvs, etc. I don't know the details but I > > don't think we care about external signals. > Its a little more nuanced than that. We specifically ignore USR1 and USR2 https://bitbucket.org/petsc/petsc/src/17bd883d72f40a596f2d89b5afda5a233b621464/src/sys/error/signal.c?at=master&fileviewer=file-view-default#signal.c-239 > I see. I'll sketch what I'm trying to achieve in case someone can > think of another approach. > > I have some long-running SLEPc eigenvalue computations, and I'd like > to have SLURM signal my program that its time limit is drawing > near. In that case, my problem would set a flag and before the next > iteration of the SLEPc eigenvalue solver it would give up and save the > eigenvalues it has so far managed to obtain. > > The only workaround I can think of would be to let my program keep > track of its time limit on its own and check it at each iteration. > > There is no intention for PETSc to have handling of user-defined > signals? > I would use SIGHUP. Matt > > Thanks. > > -- Gard > > > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ <http://www.caam.rice.edu/~mk51/>
