Scippy

SCIP

Solving Constraint Integer Programs

interrupt.h File Reference

Detailed Description

methods for catching the user CTRL-C interrupt

Author
Tobias Achterberg

Definition in file interrupt.h.

#include "scip/def.h"
#include "scip/type_retcode.h"
#include "scip/type_interrupt.h"

Go to the source code of this file.

Functions

SCIP_RETCODE SCIPinterruptCreate (SCIP_INTERRUPT **interrupt)
 
void SCIPinterruptFree (SCIP_INTERRUPT **interrupt)
 
void SCIPinterruptCapture (SCIP_INTERRUPT *interrupt)
 
void SCIPinterruptRelease (SCIP_INTERRUPT *interrupt)
 
SCIP_Bool SCIPinterrupted (void)
 
SCIP_Bool SCIPterminated (void)
 
void SCIPtryTerminate (void)
 
void SCIPresetInterrupted (void)
 

Function Documentation

◆ SCIPinterruptCreate()

SCIP_RETCODE SCIPinterruptCreate ( SCIP_INTERRUPT **  interrupt)

creates a CTRL-C interrupt data

Parameters
interruptpointer to store the CTRL-C interrupt data

Definition at line 79 of file interrupt.c.

References BMSallocMemory, NULL, SCIP_ALLOC, and SCIP_OKAY.

Referenced by doScipCreate().

◆ SCIPinterruptFree()

void SCIPinterruptFree ( SCIP_INTERRUPT **  interrupt)

frees a CTRL-C interrupt data

Parameters
interruptpointer to the CTRL-C interrupt data

Definition at line 92 of file interrupt.c.

References BMSfreeMemory, and NULL.

Referenced by SCIPfree().

◆ SCIPinterruptCapture()

void SCIPinterruptCapture ( SCIP_INTERRUPT interrupt)

captures the CTRL-C interrupt to call the SCIP's own interrupt handler

Parameters
interruptCTRL-C interrupt data

Definition at line 102 of file interrupt.c.

References interruptHandler(), ninterrupts, nterms, NULL, SCIP_Interrupt::nuses, and SCIP_Interrupt::oldsigaction.

Referenced by SCIPpresolve(), and SCIPsolve().

◆ SCIPinterruptRelease()

void SCIPinterruptRelease ( SCIP_INTERRUPT interrupt)

releases the CTRL-C interrupt and restores the old interrupt handler

Parameters
interruptCTRL-C interrupt data

Definition at line 132 of file interrupt.c.

References NULL, SCIP_Interrupt::nuses, and SCIP_Interrupt::oldsigaction.

Referenced by SCIPpresolve(), and SCIPsolve().

◆ SCIPinterrupted()

SCIP_Bool SCIPinterrupted ( void  )

returns whether the user interrupted by pressing CTRL-C

Definition at line 151 of file interrupt.c.

References ninterrupts.

Referenced by SCIPpressedCtrlC(), SCIPsetModifiedDefaultSettingsIpopt(), and SCIPsolveIsStopped().

◆ SCIPterminated()

SCIP_Bool SCIPterminated ( void  )

returns whether the process has received a SIGTERM

returns whether a process termination signal was received

Definition at line 159 of file interrupt.c.

References nterms.

Referenced by SCIPsolveIsStopped().

◆ SCIPtryTerminate()

void SCIPtryTerminate ( void  )

send a termination signal to the process so that SCIP tries to terminate as soon as possible

Definition at line 167 of file interrupt.c.

References nterms.

Referenced by handleSigterm().

◆ SCIPresetInterrupted()

void SCIPresetInterrupted ( void  )

resets the number of interrupts to 0

Definition at line 175 of file interrupt.c.

References ninterrupts, and nterms.

Referenced by SCIPsolveIsStopped().