From aa5137117462967408aa7466670cba829e1361ca Mon Sep 17 00:00:00 2001
From: Salvatore Filippone <salvatore.filippone@cranfield.ac.uk>
Date: Mon, 27 May 2019 12:28:36 +0100
Subject: [PATCH] New timer facilities.

---
 Changelog                     |  7 +++++++
 base/modules/Makefile         |  3 ++-
 base/modules/psb_base_mod.f90 |  1 +
 util/psb_gps_mod.f90          | 20 ++++++++++----------
 4 files changed, 20 insertions(+), 11 deletions(-)

diff --git a/Changelog b/Changelog
index 2efa54d0..62075d1a 100644
--- a/Changelog
+++ b/Changelog
@@ -1,5 +1,12 @@
 Changelog. A lot less detailed than usual, at least for past
 	history.
+2019/05/27: Fix matrix generation.	
+2019/05/20: Change checks on vectors	
+2019/05/05: Reworked linmap internals	
+2019/04/15: Improved sphalo and test programs printout	
+2019/04/09: bump version to 3.6.1
+2019/04/09: new fnd_owner_halo method
+2019/03/31: New RENUM_BLK descriptor method	
 2019/01/16: In bldext, implement ALL_TO_ALLV by hand for certain
 	compilers. 
 2018/10/10: New ICTXT argument in prec%init
diff --git a/base/modules/Makefile b/base/modules/Makefile
index c668a58f..aaf62f26 100644
--- a/base/modules/Makefile
+++ b/base/modules/Makefile
@@ -10,7 +10,7 @@ UTIL_MODS = aux/psb_string_mod.o desc/psb_desc_const_mod.o desc/psb_indx_map_mod
 	serial/psb_serial_mod.o \
 	tools/psb_cd_tools_mod.o tools/psb_i_tools_mod.o tools/psb_s_tools_mod.o  tools/psb_d_tools_mod.o\
 	tools/psb_c_tools_mod.o  tools/psb_z_tools_mod.o  tools/psb_tools_mod.o \
-	psb_penv_mod.o $(COMMINT) psb_error_impl.o \
+	psb_penv_mod.o $(COMMINT) psb_error_impl.o  psb_timers_mod.o \
 	comm/psb_base_linmap_mod.o comm/psb_linmap_mod.o \
 	comm/psb_s_linmap_mod.o comm/psb_d_linmap_mod.o comm/psb_c_linmap_mod.o comm/psb_z_linmap_mod.o \
 	comm/psb_comm_mod.o comm/psb_i_comm_mod.o comm/psb_s_comm_mod.o comm/psb_d_comm_mod.o\
@@ -152,6 +152,7 @@ psblas/psb_z_psblas_mod.o: serial/psb_z_vect_mod.o serial/psb_z_mat_mod.o
 psblas/psb_psblas_mod.o: psblas/psb_s_psblas_mod.o psblas/psb_c_psblas_mod.o  psblas/psb_d_psblas_mod.o psblas/psb_z_psblas_mod.o
 psblas/psb_s_psblas_mod.o psblas/psb_c_psblas_mod.o psblas/psb_d_psblas_mod.o psblas/psb_z_psblas_mod.o: serial/psb_mat_mod.o desc/psb_desc_mod.o
 
+psb_timers_mod.o: psb_penv_mod.o psb_const_mod.o psb_realloc_mod.o psb_error_mod.o
 
 psb_base_mod.o: $(MODULES)
 
diff --git a/base/modules/psb_base_mod.f90 b/base/modules/psb_base_mod.f90
index c042135b..5ec517e7 100644
--- a/base/modules/psb_base_mod.f90
+++ b/base/modules/psb_base_mod.f90
@@ -33,6 +33,7 @@ module psb_base_mod
   use psb_string_mod
   use psb_error_mod
   use psb_penv_mod
+  use psb_timers_mod
   use psb_check_mod
   use psb_desc_mod
   use psb_linmap_mod
diff --git a/util/psb_gps_mod.f90 b/util/psb_gps_mod.f90
index fc701ffc..5d3e285f 100644
--- a/util/psb_gps_mod.f90
+++ b/util/psb_gps_mod.f90
@@ -418,7 +418,7 @@ CONTAINS
     !-----------------------------------------------------
     SZ=SIZE(NACUM)
     IF(SZ < IDPTH) THEN
-       write(psb_out_unit,*) 'GPS_SETUP: on fly reallocation of NACUM'
+       write(psb_out_unit,*) 'GPS_SETUP: on the fly reallocation of NACUM'
        CALL REALLOC(NACUM,SZ,IDPTH) 
     END IF
     !-----------------------------------------------------
@@ -502,12 +502,12 @@ CONTAINS
        !-----------------------------------------------------
        SZ=SIZE(NHIGH)
        IF(SZ < IDPTH) THEN
-          write(psb_out_unit,*) 'GPS_PIKLVL: on fly reallocation of NHIGH'
+          write(psb_out_unit,*) 'GPS_PIKLVL: on the fly reallocation of NHIGH'
           CALL REALLOC(NHIGH,SZ,IDPTH) 
        END IF
        SZ=SIZE(NLOW)
        IF(SZ < IDPTH) THEN
-          write(psb_out_unit,*) 'GPS_PIKLVL: on fly reallocation of NLOW'
+          write(psb_out_unit,*) 'GPS_PIKLVL: on the fly reallocation of NLOW'
           CALL REALLOC(NLOW,SZ,IDPTH) 
        END IF
        !-----------------------------------------------------
@@ -656,7 +656,7 @@ CONTAINS
     SZ1=SIZE(STKC)
     SZ2=XC+XA
     IF(SZ1 < SZ2) THEN
-       write(psb_out_unit,*) 'GPS_NUMBER - Check #1: on fly reallocation of STKC'
+       write(psb_out_unit,*) 'GPS_NUMBER - Check #1: on the fly reallocation of STKC'
        CALL REALLOC(NACUM,SZ1,SZ2)
        STKC => NACUM
     END IF
@@ -668,7 +668,7 @@ CONTAINS
     SZ1=SIZE(STKC)
     SZ2=XC
     IF(SZ1 < SZ2) THEN
-       write(psb_out_unit,*) 'GPS_NUMBER - Check #2: on fly reallocation of STKC'
+       write(psb_out_unit,*) 'GPS_NUMBER - Check #2: on the fly reallocation of STKC'
        SZ2=SZ2+INIT
        CALL REALLOC(NACUM,SZ1,SZ2)
        STKC => NACUM
@@ -681,7 +681,7 @@ CONTAINS
     SZ1=SIZE(STKD)
     SZ2=XD+XB
     IF(SZ1 < SZ2) THEN
-       write(psb_out_unit,*) 'GPS_NUMBER - Check #3: on fly reallocation of STKD'
+       write(psb_out_unit,*) 'GPS_NUMBER - Check #3: on the fly reallocation of STKD'
        CALL REALLOC(AUX,SZ1,SZ2)
        STKD => AUX
     END IF
@@ -693,7 +693,7 @@ CONTAINS
     SZ1=SIZE(STKD)
     SZ2=XD
     IF(SZ1 < SZ2) THEN
-       write(psb_out_unit,*) 'GPS_NUMBER - Check #4: on fly reallocation of STKD'
+       write(psb_out_unit,*) 'GPS_NUMBER - Check #4: on the fly reallocation of STKD'
        SZ2=SZ2+INIT
        CALL REALLOC(AUX,SZ1,SZ2)
        STKD => AUX
@@ -722,7 +722,7 @@ CONTAINS
     SZ1=SIZE(STKC)
     SZ2=XC
     IF(SZ1 < SZ2) THEN
-       write(psb_out_unit,*) 'GPS_NUMBER - Check #5: on fly reallocation of STKC'
+       write(psb_out_unit,*) 'GPS_NUMBER - Check #5: on the fly reallocation of STKC'
        SZ2=SZ2+INIT
        CALL REALLOC(NACUM,SZ1,SZ2)
        STKC => NACUM
@@ -737,7 +737,7 @@ CONTAINS
     SZ1=SIZE(STKC)
     SZ2=XD
     IF(SZ1 < SZ2) THEN
-       write(psb_out_unit,*) 'GPS_NUMBER - Check #6: on fly reallocation of STKC'
+       write(psb_out_unit,*) 'GPS_NUMBER - Check #6: on the fly reallocation of STKC'
        SZ2=SZ2+INIT
        CALL REALLOC(NACUM,SZ1,SZ2)
        STKC => NACUM
@@ -760,7 +760,7 @@ CONTAINS
   ! ---------------------------------------------------------
   SUBROUTINE REALLOC(VET,SZ1,SZ2)
     use psb_base_mod  
-    ! PERFORM ON FLY REALLOCATION OF POINTER VET INCREASING
+    ! PERFORM ON THE FLY REALLOCATION OF POINTER VET INCREASING
     ! ITS SIZE FROM SZ1 TO SZ2
     IMPLICIT NONE
     integer(psb_ipk_),allocatable  :: VET(:)