From afe0d3fe8363865b8dbd4db6d9224bf88ee52c36 Mon Sep 17 00:00:00 2001 From: Grzegorz Kowal Date: Fri, 3 Dec 2021 10:54:17 -0300 Subject: [PATCH] MPITOOLS: Stop compiler complaining if MPI is off. Signed-off-by: Grzegorz Kowal --- sources/mpitools.F90 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sources/mpitools.F90 b/sources/mpitools.F90 index fa3cfd5..81c0b14 100644 --- a/sources/mpitools.F90 +++ b/sources/mpitools.F90 @@ -60,11 +60,11 @@ module mpitools module procedure exchange_arrays_diff module procedure exchange_arrays_same end interface -#endif /* MPI */ ! timer indices ! integer, save :: imi, imc +#endif /* MPI */ ! MPI global variables ! @@ -131,9 +131,9 @@ module mpitools integer :: ierror integer(kind=4), dimension(:), allocatable :: procs -#endif /* MPI */ character(len=*), parameter :: loc = 'MPITOOLS::initialize_mpitools()' +#endif /* MPI */ !------------------------------------------------------------------------------- ! @@ -275,9 +275,9 @@ module mpitools #ifdef MPI integer :: ierror -#endif /* MPI */ character(len=*), parameter :: loc = 'MPITOOLS::finalize_mpitools()' +#endif /* MPI */ !------------------------------------------------------------------------------- ! @@ -332,7 +332,9 @@ module mpitools ! !------------------------------------------------------------------------------- ! +#ifdef MPI call start_timer(imc) +#endif /* MPI */ check_status = flag @@ -342,9 +344,9 @@ module mpitools if (ierror /= MPI_SUCCESS) & call print_message(loc, "MPI_Allreduce of logical buffer failed!") -#endif /* MPI */ call stop_timer(imc) +#endif /* MPI */ !------------------------------------------------------------------------------- !