AMUN, SYSTEM: Stop compiler complaining if SIGNALS is off.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
Grzegorz Kowal 2021-12-03 10:43:07 -03:00
parent 34d551e9a6
commit 6cb82114b8
2 changed files with 14 additions and 3 deletions

View File

@ -43,7 +43,10 @@ program amun
use random , only : initialize_random, finalize_random
use system , only : initialize_system, finalize_system
use system , only : print_system_info, prepare_system, evolve_system
use system , only : quit, nsteps, nwork
use system , only : nsteps, nwork
#ifdef SIGNALS
use system , only : quit
#endif /* SIGNALS */
use timers , only : initialize_timers, finalize_timers
use timers , only : start_timer, stop_timer, set_timer, get_timer
use timers , only : get_timer_total, timer_enabled, timer_description

View File

@ -38,9 +38,11 @@ module system
!
logical, save :: resumed = .false.
#ifdef SIGNALS
! the flag indicating that the system evolution should be interrupted
!
integer, save :: quit = 0
#endif /* SIGNALS */
! the number of resumed run
!
@ -77,7 +79,10 @@ module system
public :: initialize_system, finalize_system, prepare_system, evolve_system
public :: print_system_info
public :: resumed, name, nrun, eqsys, eos, ncells, nghosts, maxlev, nsteps
public :: bdims, dbnds, rngtype, tsav, nwork, quit
public :: bdims, dbnds, rngtype, tsav, nwork
#ifdef SIGNALS
public :: quit
#endif /* SIGNALS */
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
!
@ -499,7 +504,10 @@ module system
if (check_status(status /= 0)) return
proceed = (nsteps <= nmax) .and. (time < tmax) .and. &
(thrs <= trun) .and. .not. check_status(quit /= 0)
(thrs <= trun)
#ifdef SIGNALS
proceed = proceed .and. .not. check_status(quit /= 0)
#endif /* SIGNALS */
if (verbose) then