GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: phy_common/ioipsl_getin_p_mod.F90 Lines: 20 50 40.0 %
Date: 2023-06-30 12:56:34 Branches: 8 52 15.4 %

Line Branch Exec Source
1
!
2
! $Id$
3
!
4
MODULE ioipsl_getin_p_mod
5
! To use getin in a parallel context
6
!---------------------------------------------------------------------
7
#ifdef CPP_IOIPSL
8
USE ioipsl, ONLY: getin
9
#else
10
USE ioipsl_getincom, ONLY: getin
11
#endif
12
USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
13
USE mod_phys_lmdz_omp_data, ONLY :  is_omp_root
14
USE mod_phys_lmdz_transfert_para, ONLY : bcast
15
!-
16
IMPLICIT NONE
17
!-
18
PRIVATE
19
PUBLIC :: getin_p
20
!-
21
INTERFACE getin_p
22
23
  MODULE PROCEDURE getinrs_p, getinr1d_p, getinr2d_p, &
24
 &                 getinis_p, getini1d_p, getini2d_p, &
25
 &                 getincs_p, 		              &
26
 &                 getinls_p, getinl1d_p, getinl2d_p
27
END INTERFACE
28
!-
29
CONTAINS
30
31
32
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
33
!!   Definition des getin -> bcast      !!
34
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
35
36
!! -- Les chaines de caracteres -- !!
37
38
3
  SUBROUTINE getincs_p(VarIn,VarOut)
39
    IMPLICIT NONE
40
    CHARACTER(LEN=*),INTENT(IN) :: VarIn
41
    CHARACTER(LEN=*),INTENT(INOUT) :: VarOut
42
43
!$OMP BARRIER
44

3
    IF (is_mpi_root .AND. is_omp_root) THEN
45
3
    	CALL getin(VarIn,VarOut)
46
    ENDIF
47
3
    CALL bcast(VarOut)
48
3
  END SUBROUTINE getincs_p
49
50
!! -- Les entiers -- !!
51
52
478
  SUBROUTINE getinis_p(VarIn,VarOut)
53
    IMPLICIT NONE
54
    CHARACTER(LEN=*),INTENT(IN) :: VarIn
55
    INTEGER,INTENT(INOUT) :: VarOut
56
57
!$OMP BARRIER
58

478
    IF (is_mpi_root .AND. is_omp_root) THEN
59
478
    	CALL getin(VarIn,VarOut)
60
    ENDIF
61
478
    CALL bcast(VarOut)
62
478
  END SUBROUTINE getinis_p
63
64
  SUBROUTINE getini1d_p(VarIn,VarOut)
65
    IMPLICIT NONE
66
    CHARACTER(LEN=*),INTENT(IN) :: VarIn
67
    INTEGER,INTENT(INOUT) :: VarOut(:)
68
69
!$OMP BARRIER
70
    IF (is_mpi_root .AND. is_omp_root) THEN
71
    	CALL getin(VarIn,VarOut)
72
    ENDIF
73
    CALL bcast(VarOut)
74
  END SUBROUTINE getini1d_p
75
76
  SUBROUTINE getini2d_p(VarIn,VarOut)
77
    IMPLICIT NONE
78
    CHARACTER(LEN=*),INTENT(IN) :: VarIn
79
    INTEGER,INTENT(INOUT) :: VarOut(:,:)
80
81
!$OMP BARRIER
82
    IF (is_mpi_root .AND. is_omp_root) THEN
83
    	CALL getin(VarIn,VarOut)
84
    ENDIF
85
    CALL bcast(VarOut)
86
  END SUBROUTINE getini2d_p
87
88
!! -- Les flottants -- !!
89
90
381
  SUBROUTINE getinrs_p(VarIn,VarOut)
91
    IMPLICIT NONE
92
    CHARACTER(LEN=*),INTENT(IN) :: VarIn
93
    REAL,INTENT(INOUT) :: VarOut
94
95
!$OMP BARRIER
96

381
    IF (is_mpi_root .AND. is_omp_root) THEN
97
381
    	CALL getin(VarIn,VarOut)
98
    ENDIF
99
381
    CALL bcast(VarOut)
100
381
  END SUBROUTINE getinrs_p
101
102
  SUBROUTINE getinr1d_p(VarIn,VarOut)
103
    IMPLICIT NONE
104
    CHARACTER(LEN=*),INTENT(IN) :: VarIn
105
    REAL,INTENT(INOUT) :: VarOut(:)
106
107
!$OMP BARRIER
108
    IF (is_mpi_root .AND. is_omp_root) THEN
109
    	CALL getin(VarIn,VarOut)
110
    ENDIF
111
    CALL bcast(VarOut)
112
  END SUBROUTINE getinr1d_p
113
114
  SUBROUTINE getinr2d_p(VarIn,VarOut)
115
    IMPLICIT NONE
116
    CHARACTER(LEN=*),INTENT(IN) :: VarIn
117
    REAL,INTENT(INOUT) :: VarOut(:,:)
118
119
!$OMP BARRIER
120
    IF (is_mpi_root .AND. is_omp_root) THEN
121
    	CALL getin(VarIn,VarOut)
122
    ENDIF
123
    CALL bcast(VarOut)
124
  END SUBROUTINE getinr2d_p
125
126
!! -- Les Booleens -- !!
127
128
311
  SUBROUTINE getinls_p(VarIn,VarOut)
129
    IMPLICIT NONE
130
    CHARACTER(LEN=*),INTENT(IN) :: VarIn
131
    LOGICAL,INTENT(INOUT) :: VarOut
132
133
!$OMP BARRIER
134

311
    IF (is_mpi_root .AND. is_omp_root) THEN
135
311
    	CALL getin(VarIn,VarOut)
136
    ENDIF
137
311
    CALL bcast(VarOut)
138
311
  END SUBROUTINE getinls_p
139
140
  SUBROUTINE getinl1d_p(VarIn,VarOut)
141
    IMPLICIT NONE
142
    CHARACTER(LEN=*),INTENT(IN) :: VarIn
143
    LOGICAL,INTENT(INOUT) :: VarOut(:)
144
145
!$OMP BARRIER
146
    IF (is_mpi_root .AND. is_omp_root) THEN
147
    	CALL getin(VarIn,VarOut)
148
    ENDIF
149
    CALL bcast(VarOut)
150
  END SUBROUTINE getinl1d_p
151
152
  SUBROUTINE getinl2d_p(VarIn,VarOut)
153
    IMPLICIT NONE
154
    CHARACTER(LEN=*),INTENT(IN) :: VarIn
155
    LOGICAL,INTENT(INOUT) :: VarOut(:,:)
156
157
!$OMP BARRIER
158
    IF (is_mpi_root .AND. is_omp_root) THEN
159
    	CALL getin(VarIn,VarOut)
160
    ENDIF
161
    CALL bcast(VarOut)
162
  END SUBROUTINE getinl2d_p
163
!-
164
!-----------------------------
165
!-----------------------------
166
!-----------------------------
167
168
END MODULE ioipsl_getin_p_mod
169