From 87299ba276c9fed6e81dcbcf69bcdba83f5da02a Mon Sep 17 00:00:00 2001
From: Antoine Hoffmann <antoine.hoffmann@epfl.ch>
Date: Mon, 13 Feb 2023 14:57:24 +0100
Subject: [PATCH] indication of the time for the first initial diagnostic

---
 src/control.F90 | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/control.F90 b/src/control.F90
index 9420880f..d69d991c 100644
--- a/src/control.F90
+++ b/src/control.F90
@@ -4,6 +4,7 @@ SUBROUTINE control
   use basic
   use prec_const
   IMPLICIT NONE
+  REAL(dp) :: t_init_diag_0, t_init_diag_1
 
   CALL cpu_time(start)
   !________________________________________________________________________________
@@ -41,9 +42,14 @@ SUBROUTINE control
 
   !                   1.6     Initial diagnostics
   IF (my_id .EQ. 0) WRITE(*,*) 'Initial diagnostics...'
+  CALL cpu_time(t_init_diag_0) ! Measure the time of the init diag
   CALL diagnose(0)
+  CALL cpu_time(t_init_diag_1)
   ! CALL mpi_barrier(MPI_COMM_WORLD, ierr)
-  IF (my_id .EQ. 0) WRITE(*,'(a/)') '...initial diagnostics done'
+  IF (my_id .EQ. 0) THEN
+    WRITE(*,'(a)') '...initial diagnostics done'
+    WRITE(*,'(a,F6.3,a/)') '(',t_init_diag_1-t_init_diag_0,'[s])'
+  ENDIF
 
   CALL FLUSH(stdout)
   CALL mpi_barrier(MPI_COMM_WORLD, ierr)
-- 
GitLab