diff --git a/PRIVATE b/PRIVATE index 3561f74a5..df33ba9a1 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit 3561f74a5852c32e2c3da4dc48090b517cfa8e90 +Subproject commit df33ba9a1360439c5c18a241a1e439dab0cdcafd diff --git a/src/C_routines.c b/src/C_routines.c index a25fde688..37364543d 100644 --- a/src/C_routines.c +++ b/src/C_routines.c @@ -58,8 +58,8 @@ void getusername_c(char username[], int *stat){ } -void signalterm_c(void (*handler)(int)){ - signal(SIGTERM, handler); +void signalint_c(void (*handler)(int)){ + signal(SIGINT, handler); } void signalusr1_c(void (*handler)(int)){ diff --git a/src/grid/DAMASK_grid.f90 b/src/grid/DAMASK_grid.f90 index 835e18b34..824d867c5 100644 --- a/src/grid/DAMASK_grid.f90 +++ b/src/grid/DAMASK_grid.f90 @@ -471,7 +471,7 @@ program DAMASK_grid call materialpoint_restartWrite endif if (signal) call signals_setSIGUSR2(.false.) - call MPI_Allreduce(signals_SIGTERM,signal,1_MPI_INTEGER_KIND,MPI_LOGICAL,MPI_LOR,MPI_COMM_WORLD,err_MPI) + call MPI_Allreduce(signals_SIGINT,signal,1_MPI_INTEGER_KIND,MPI_LOGICAL,MPI_LOR,MPI_COMM_WORLD,err_MPI) if (err_MPI /= 0_MPI_INTEGER_KIND) error stop 'MPI error' if (signal) exit loadCaseLooping endif skipping diff --git a/src/signals.f90 b/src/signals.f90 index a3eac8025..7db101f94 100644 --- a/src/signals.f90 +++ b/src/signals.f90 @@ -10,13 +10,13 @@ module signals private logical, volatile, public, protected :: & - signals_SIGTERM = .false., & !< termination signal + signals_SIGINT = .false., & !< interrupt signal signals_SIGUSR1 = .false., & !< 1. user-defined signal signals_SIGUSR2 = .false. !< 2. user-defined signal public :: & signals_init, & - signals_setSIGTERM, & + signals_setSIGINT, & signals_setSIGUSR1, & signals_setSIGUSR2 @@ -28,7 +28,7 @@ contains !-------------------------------------------------------------------------------------------------- subroutine signals_init() - call signalterm_c(c_funloc(catchSIGTERM)) + call signalint_c(c_funloc(catchSIGINT)) call signalusr1_c(c_funloc(catchSIGUSR1)) call signalusr2_c(c_funloc(catchSIGUSR2)) @@ -36,18 +36,18 @@ end subroutine signals_init !-------------------------------------------------------------------------------------------------- -!> @brief Set global variable signals_SIGTERM to .true. +!> @brief Set global variable signals_SIGINT to .true. !> @details This function can be registered to catch signals send to the executable. !-------------------------------------------------------------------------------------------------- -subroutine catchSIGTERM(signal) bind(C) +subroutine catchSIGINT(signal) bind(C) integer(C_INT), value :: signal print'(a,i0)', ' received signal ',signal - call signals_setSIGTERM(.true.) + call signals_setSIGINT(.true.) -end subroutine catchSIGTERM +end subroutine catchSIGINT !-------------------------------------------------------------------------------------------------- @@ -81,17 +81,17 @@ end subroutine catchSIGUSR2 !-------------------------------------------------------------------------------------------------- -!> @brief Set global variable signals_SIGTERM. +!> @brief Set global variable signals_SIGINT. !-------------------------------------------------------------------------------------------------- -subroutine signals_setSIGTERM(state) +subroutine signals_setSIGINT(state) logical, intent(in) :: state - signals_SIGTERM = state - print*, 'set SIGTERM to',state + signals_SIGINT = state + print*, 'set SIGINT to',state -end subroutine signals_setSIGTERM +end subroutine signals_setSIGINT !-------------------------------------------------------------------------------------------------- diff --git a/src/system_routines.f90 b/src/system_routines.f90 index e0adf9dc0..2af1e12a9 100644 --- a/src/system_routines.f90 +++ b/src/system_routines.f90 @@ -15,7 +15,7 @@ module system_routines getCWD, & getHostName, & getUserName, & - signalterm_C, & + signalint_C, & signalusr1_C, & signalusr2_C, & f_c_string, & @@ -55,11 +55,11 @@ module system_routines integer(C_INT), intent(out) :: stat end subroutine getUserName_C - subroutine signalterm_C(handler) bind(C) + subroutine signalint_C(handler) bind(C) use, intrinsic :: ISO_C_Binding, only: C_FUNPTR type(C_FUNPTR), intent(in), value :: handler - end subroutine signalterm_C + end subroutine signalint_C subroutine signalusr1_C(handler) bind(C) use, intrinsic :: ISO_C_Binding, only: C_FUNPTR