From 6cb82114b85fefbfd6167b2117274ea3dccdeb3a Mon Sep 17 00:00:00 2001 From: Grzegorz Kowal Date: Fri, 3 Dec 2021 10:43:07 -0300 Subject: [PATCH] AMUN, SYSTEM: Stop compiler complaining if SIGNALS is off. Signed-off-by: Grzegorz Kowal --- sources/amun.F90 | 5 ++++- sources/system.F90 | 12 ++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/sources/amun.F90 b/sources/amun.F90 index 20dfd84..245ef0f 100644 --- a/sources/amun.F90 +++ b/sources/amun.F90 @@ -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 diff --git a/sources/system.F90 b/sources/system.F90 index 23b863f..793bc66 100644 --- a/sources/system.F90 +++ b/sources/system.F90 @@ -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