V3FIT
second0.f
1  SUBROUTINE second0(stime)
2  USE stel_kinds
3  USE mpi_inc
4  IMPLICIT NONE
5 
6 !----------------------------------------------
7 ! D u m m y A r g u m e n t s
8 !-----------------------------------------------
9  REAL(rprec), INTENT(out) :: stime
10  INTEGER :: cnt, cnt_rate
11 !-----------------------------------------------
12 #if defined(MPI_OPT)
13  INTEGER :: lMPIInit, MPI_ERR
14  CALL mpi_initialized(lmpiinit, mpi_err)
15  IF (lmpiinit .NE. 0) THEN
16  stime=mpi_wtime()
17  RETURN
18  END IF
19 #endif
20  CALL system_clock(count=cnt, count_rate=cnt_rate)
21  IF (cnt_rate .ne. 0) THEN
22  stime = real(cnt, rprec)/cnt_rate
23  ELSE
24  stime = 0
25  END IF
26  END SUBROUTINE second0
mpi_inc
Umbrella module avoid multiple inlcudes of the mpif.h header.
Definition: mpi_inc.f:11