Skip to content

Commit 07f5571

Browse files
Remove use of nbdirsmax in src
1 parent 854e682 commit 07f5571

542 files changed

Lines changed: 7538 additions & 8637 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

BLAS/include/DIFFSIZES.f90

Lines changed: 162 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,121 @@ MODULE DIFFSIZES
22
IMPLICIT NONE
33
INTEGER, PARAMETER :: nbdirsmax = 4
44
! ISIZE* are module variables (set via set_ISIZE*(), read via get_ISIZE*() or use directly after check)
5-
INTEGER, SAVE :: isize1ofx = -1, isize1ofy = -1, isize2ofa = -1
5+
INTEGER, SAVE :: isize1ofap = -1, isize1ofcx = -1, isize1ofcy = -1, isize1ofdx = -1, isize1ofdy = -1, isize1ofsx = -1, &
6+
& isize1ofsy = -1, isize1ofx = -1, isize1ofy = -1, isize1ofzx = -1, isize1ofzy = -1, isize2ofa = -1, isize2ofb = -1
67
CONTAINS
8+
SUBROUTINE set_ISIZE1OFAp(val)
9+
INTEGER, INTENT(IN) :: val
10+
isize1ofap = val
11+
END SUBROUTINE set_ISIZE1OFAp
12+
13+
INTEGER FUNCTION get_ISIZE1OFAp()
14+
get_ISIZE1OFAp = isize1ofap
15+
END FUNCTION get_ISIZE1OFAp
16+
17+
SUBROUTINE check_ISIZE1OFAp_initialized()
18+
IF (isize1ofap < 0) THEN
19+
WRITE(*,'(A)') 'Error: isize1ofap not set. Call set_ISIZE1OFAp before differentiated routine.'
20+
STOP 1
21+
END IF
22+
END SUBROUTINE check_ISIZE1OFAp_initialized
23+
24+
SUBROUTINE set_ISIZE1OFCx(val)
25+
INTEGER, INTENT(IN) :: val
26+
isize1ofcx = val
27+
END SUBROUTINE set_ISIZE1OFCx
28+
29+
INTEGER FUNCTION get_ISIZE1OFCx()
30+
get_ISIZE1OFCx = isize1ofcx
31+
END FUNCTION get_ISIZE1OFCx
32+
33+
SUBROUTINE check_ISIZE1OFCx_initialized()
34+
IF (isize1ofcx < 0) THEN
35+
WRITE(*,'(A)') 'Error: isize1ofcx not set. Call set_ISIZE1OFCx before differentiated routine.'
36+
STOP 1
37+
END IF
38+
END SUBROUTINE check_ISIZE1OFCx_initialized
39+
40+
SUBROUTINE set_ISIZE1OFCy(val)
41+
INTEGER, INTENT(IN) :: val
42+
isize1ofcy = val
43+
END SUBROUTINE set_ISIZE1OFCy
44+
45+
INTEGER FUNCTION get_ISIZE1OFCy()
46+
get_ISIZE1OFCy = isize1ofcy
47+
END FUNCTION get_ISIZE1OFCy
48+
49+
SUBROUTINE check_ISIZE1OFCy_initialized()
50+
IF (isize1ofcy < 0) THEN
51+
WRITE(*,'(A)') 'Error: isize1ofcy not set. Call set_ISIZE1OFCy before differentiated routine.'
52+
STOP 1
53+
END IF
54+
END SUBROUTINE check_ISIZE1OFCy_initialized
55+
56+
SUBROUTINE set_ISIZE1OFDx(val)
57+
INTEGER, INTENT(IN) :: val
58+
isize1ofdx = val
59+
END SUBROUTINE set_ISIZE1OFDx
60+
61+
INTEGER FUNCTION get_ISIZE1OFDx()
62+
get_ISIZE1OFDx = isize1ofdx
63+
END FUNCTION get_ISIZE1OFDx
64+
65+
SUBROUTINE check_ISIZE1OFDx_initialized()
66+
IF (isize1ofdx < 0) THEN
67+
WRITE(*,'(A)') 'Error: isize1ofdx not set. Call set_ISIZE1OFDx before differentiated routine.'
68+
STOP 1
69+
END IF
70+
END SUBROUTINE check_ISIZE1OFDx_initialized
71+
72+
SUBROUTINE set_ISIZE1OFDy(val)
73+
INTEGER, INTENT(IN) :: val
74+
isize1ofdy = val
75+
END SUBROUTINE set_ISIZE1OFDy
76+
77+
INTEGER FUNCTION get_ISIZE1OFDy()
78+
get_ISIZE1OFDy = isize1ofdy
79+
END FUNCTION get_ISIZE1OFDy
80+
81+
SUBROUTINE check_ISIZE1OFDy_initialized()
82+
IF (isize1ofdy < 0) THEN
83+
WRITE(*,'(A)') 'Error: isize1ofdy not set. Call set_ISIZE1OFDy before differentiated routine.'
84+
STOP 1
85+
END IF
86+
END SUBROUTINE check_ISIZE1OFDy_initialized
87+
88+
SUBROUTINE set_ISIZE1OFSx(val)
89+
INTEGER, INTENT(IN) :: val
90+
isize1ofsx = val
91+
END SUBROUTINE set_ISIZE1OFSx
92+
93+
INTEGER FUNCTION get_ISIZE1OFSx()
94+
get_ISIZE1OFSx = isize1ofsx
95+
END FUNCTION get_ISIZE1OFSx
96+
97+
SUBROUTINE check_ISIZE1OFSx_initialized()
98+
IF (isize1ofsx < 0) THEN
99+
WRITE(*,'(A)') 'Error: isize1ofsx not set. Call set_ISIZE1OFSx before differentiated routine.'
100+
STOP 1
101+
END IF
102+
END SUBROUTINE check_ISIZE1OFSx_initialized
103+
104+
SUBROUTINE set_ISIZE1OFSy(val)
105+
INTEGER, INTENT(IN) :: val
106+
isize1ofsy = val
107+
END SUBROUTINE set_ISIZE1OFSy
108+
109+
INTEGER FUNCTION get_ISIZE1OFSy()
110+
get_ISIZE1OFSy = isize1ofsy
111+
END FUNCTION get_ISIZE1OFSy
112+
113+
SUBROUTINE check_ISIZE1OFSy_initialized()
114+
IF (isize1ofsy < 0) THEN
115+
WRITE(*,'(A)') 'Error: isize1ofsy not set. Call set_ISIZE1OFSy before differentiated routine.'
116+
STOP 1
117+
END IF
118+
END SUBROUTINE check_ISIZE1OFSy_initialized
119+
7120
SUBROUTINE set_ISIZE1OFX(val)
8121
INTEGER, INTENT(IN) :: val
9122
isize1ofx = val
@@ -36,6 +149,38 @@ SUBROUTINE check_ISIZE1OFY_initialized()
36149
END IF
37150
END SUBROUTINE check_ISIZE1OFY_initialized
38151

152+
SUBROUTINE set_ISIZE1OFZx(val)
153+
INTEGER, INTENT(IN) :: val
154+
isize1ofzx = val
155+
END SUBROUTINE set_ISIZE1OFZx
156+
157+
INTEGER FUNCTION get_ISIZE1OFZx()
158+
get_ISIZE1OFZx = isize1ofzx
159+
END FUNCTION get_ISIZE1OFZx
160+
161+
SUBROUTINE check_ISIZE1OFZx_initialized()
162+
IF (isize1ofzx < 0) THEN
163+
WRITE(*,'(A)') 'Error: isize1ofzx not set. Call set_ISIZE1OFZx before differentiated routine.'
164+
STOP 1
165+
END IF
166+
END SUBROUTINE check_ISIZE1OFZx_initialized
167+
168+
SUBROUTINE set_ISIZE1OFZy(val)
169+
INTEGER, INTENT(IN) :: val
170+
isize1ofzy = val
171+
END SUBROUTINE set_ISIZE1OFZy
172+
173+
INTEGER FUNCTION get_ISIZE1OFZy()
174+
get_ISIZE1OFZy = isize1ofzy
175+
END FUNCTION get_ISIZE1OFZy
176+
177+
SUBROUTINE check_ISIZE1OFZy_initialized()
178+
IF (isize1ofzy < 0) THEN
179+
WRITE(*,'(A)') 'Error: isize1ofzy not set. Call set_ISIZE1OFZy before differentiated routine.'
180+
STOP 1
181+
END IF
182+
END SUBROUTINE check_ISIZE1OFZy_initialized
183+
39184
SUBROUTINE set_ISIZE2OFA(val)
40185
INTEGER, INTENT(IN) :: val
41186
isize2ofa = val
@@ -52,4 +197,20 @@ SUBROUTINE check_ISIZE2OFA_initialized()
52197
END IF
53198
END SUBROUTINE check_ISIZE2OFA_initialized
54199

200+
SUBROUTINE set_ISIZE2OFB(val)
201+
INTEGER, INTENT(IN) :: val
202+
isize2ofb = val
203+
END SUBROUTINE set_ISIZE2OFB
204+
205+
INTEGER FUNCTION get_ISIZE2OFB()
206+
get_ISIZE2OFB = isize2ofb
207+
END FUNCTION get_ISIZE2OFB
208+
209+
SUBROUTINE check_ISIZE2OFB_initialized()
210+
IF (isize2ofb < 0) THEN
211+
WRITE(*,'(A)') 'Error: isize2ofb not set. Call set_ISIZE2OFB before differentiated routine.'
212+
STOP 1
213+
END IF
214+
END SUBROUTINE check_ISIZE2OFB_initialized
215+
55216
END MODULE DIFFSIZES

BLAS/src/DIFFSIZES_access.f90

Lines changed: 59 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,27 @@
22
! Used when many ISIZE vars would exceed F77 line limit in COMMON.
33
MODULE diffsizes_access
44
IMPLICIT NONE
5-
INTEGER, SAVE :: ISIZE1OFAp_global, ISIZE1OFCx_global, ISIZE1OFCy_global, ISIZE1OFDx_global, &
6-
ISIZE1OFDy_global, ISIZE1OFSx_global, ISIZE1OFSy_global, ISIZE1OFX_global, ISIZE1OFY_global, &
7-
ISIZE1OFZx_global, ISIZE1OFZy_global, ISIZE2OFA_global, ISIZE2OFB_global
5+
INTEGER, SAVE :: ISIZE1OFAp_global, ISIZE1OFCx_global, ISIZE1OFCy_global, ISIZE1OFDx_global, ISIZE1OFDy_global, &
6+
ISIZE1OFSx_global, ISIZE1OFSy_global, ISIZE1OFX_global, ISIZE1OFY_global, ISIZE1OFZx_global, ISIZE1OFZy_global, &
7+
ISIZE2OFA_global, ISIZE2OFB_global
88
! Initialize to invalid so we can detect "not set"
9-
DATA ISIZE1OFAp_global /-1/, ISIZE1OFCx_global /-1/, ISIZE1OFCy_global /-1/, ISIZE1OFDx_global /-1/, &
10-
ISIZE1OFDy_global /-1/, ISIZE1OFSx_global /-1/, ISIZE1OFSy_global /-1/, ISIZE1OFX_global /-1/, &
11-
ISIZE1OFY_global /-1/, ISIZE1OFZx_global /-1/, ISIZE1OFZy_global /-1/, ISIZE2OFA_global /-1/, &
12-
ISIZE2OFB_global /-1/
9+
DATA ISIZE1OFAp_global /-1/, ISIZE1OFCx_global /-1/, ISIZE1OFCy_global /-1/, ISIZE1OFDx_global /-1/, &
10+
ISIZE1OFDy_global /-1/, ISIZE1OFSx_global /-1/, ISIZE1OFSy_global /-1/, ISIZE1OFX_global /-1/, ISIZE1OFY_global /-1/, &
11+
ISIZE1OFZx_global /-1/, ISIZE1OFZy_global /-1/, ISIZE2OFA_global /-1/, ISIZE2OFB_global /-1/
1312
CONTAINS
1413

1514
SUBROUTINE set_ISIZE1OFAp(val)
1615
INTEGER, INTENT(IN) :: val
1716
ISIZE1OFAp_global = val
1817
END SUBROUTINE
18+
1919
INTEGER FUNCTION get_ISIZE1OFAp()
2020
get_ISIZE1OFAp = ISIZE1OFAp_global
2121
END FUNCTION
22+
2223
SUBROUTINE check_ISIZE1OFAp_initialized()
2324
IF (ISIZE1OFAp_global < 0) THEN
24-
WRITE(*,'(A)') 'Error: ISIZE1OFAp_global not set.'
25+
WRITE(*,'(A)') 'Error: ISIZE1OFAp_global not set. Call set_ISIZE1OFAp before differentiated routine.'
2526
STOP 1
2627
END IF
2728
END SUBROUTINE
@@ -30,12 +31,14 @@ SUBROUTINE set_ISIZE1OFCx(val)
3031
INTEGER, INTENT(IN) :: val
3132
ISIZE1OFCx_global = val
3233
END SUBROUTINE
34+
3335
INTEGER FUNCTION get_ISIZE1OFCx()
3436
get_ISIZE1OFCx = ISIZE1OFCx_global
3537
END FUNCTION
38+
3639
SUBROUTINE check_ISIZE1OFCx_initialized()
3740
IF (ISIZE1OFCx_global < 0) THEN
38-
WRITE(*,'(A)') 'Error: ISIZE1OFCx_global not set.'
41+
WRITE(*,'(A)') 'Error: ISIZE1OFCx_global not set. Call set_ISIZE1OFCx before differentiated routine.'
3942
STOP 1
4043
END IF
4144
END SUBROUTINE
@@ -44,12 +47,14 @@ SUBROUTINE set_ISIZE1OFCy(val)
4447
INTEGER, INTENT(IN) :: val
4548
ISIZE1OFCy_global = val
4649
END SUBROUTINE
50+
4751
INTEGER FUNCTION get_ISIZE1OFCy()
4852
get_ISIZE1OFCy = ISIZE1OFCy_global
4953
END FUNCTION
54+
5055
SUBROUTINE check_ISIZE1OFCy_initialized()
5156
IF (ISIZE1OFCy_global < 0) THEN
52-
WRITE(*,'(A)') 'Error: ISIZE1OFCy_global not set.'
57+
WRITE(*,'(A)') 'Error: ISIZE1OFCy_global not set. Call set_ISIZE1OFCy before differentiated routine.'
5358
STOP 1
5459
END IF
5560
END SUBROUTINE
@@ -58,12 +63,14 @@ SUBROUTINE set_ISIZE1OFDx(val)
5863
INTEGER, INTENT(IN) :: val
5964
ISIZE1OFDx_global = val
6065
END SUBROUTINE
66+
6167
INTEGER FUNCTION get_ISIZE1OFDx()
6268
get_ISIZE1OFDx = ISIZE1OFDx_global
6369
END FUNCTION
70+
6471
SUBROUTINE check_ISIZE1OFDx_initialized()
6572
IF (ISIZE1OFDx_global < 0) THEN
66-
WRITE(*,'(A)') 'Error: ISIZE1OFDx_global not set.'
73+
WRITE(*,'(A)') 'Error: ISIZE1OFDx_global not set. Call set_ISIZE1OFDx before differentiated routine.'
6774
STOP 1
6875
END IF
6976
END SUBROUTINE
@@ -72,12 +79,14 @@ SUBROUTINE set_ISIZE1OFDy(val)
7279
INTEGER, INTENT(IN) :: val
7380
ISIZE1OFDy_global = val
7481
END SUBROUTINE
82+
7583
INTEGER FUNCTION get_ISIZE1OFDy()
7684
get_ISIZE1OFDy = ISIZE1OFDy_global
7785
END FUNCTION
86+
7887
SUBROUTINE check_ISIZE1OFDy_initialized()
7988
IF (ISIZE1OFDy_global < 0) THEN
80-
WRITE(*,'(A)') 'Error: ISIZE1OFDy_global not set.'
89+
WRITE(*,'(A)') 'Error: ISIZE1OFDy_global not set. Call set_ISIZE1OFDy before differentiated routine.'
8190
STOP 1
8291
END IF
8392
END SUBROUTINE
@@ -86,12 +95,14 @@ SUBROUTINE set_ISIZE1OFSx(val)
8695
INTEGER, INTENT(IN) :: val
8796
ISIZE1OFSx_global = val
8897
END SUBROUTINE
98+
8999
INTEGER FUNCTION get_ISIZE1OFSx()
90100
get_ISIZE1OFSx = ISIZE1OFSx_global
91101
END FUNCTION
102+
92103
SUBROUTINE check_ISIZE1OFSx_initialized()
93104
IF (ISIZE1OFSx_global < 0) THEN
94-
WRITE(*,'(A)') 'Error: ISIZE1OFSx_global not set.'
105+
WRITE(*,'(A)') 'Error: ISIZE1OFSx_global not set. Call set_ISIZE1OFSx before differentiated routine.'
95106
STOP 1
96107
END IF
97108
END SUBROUTINE
@@ -100,45 +111,18 @@ SUBROUTINE set_ISIZE1OFSy(val)
100111
INTEGER, INTENT(IN) :: val
101112
ISIZE1OFSy_global = val
102113
END SUBROUTINE
114+
103115
INTEGER FUNCTION get_ISIZE1OFSy()
104116
get_ISIZE1OFSy = ISIZE1OFSy_global
105117
END FUNCTION
118+
106119
SUBROUTINE check_ISIZE1OFSy_initialized()
107120
IF (ISIZE1OFSy_global < 0) THEN
108-
WRITE(*,'(A)') 'Error: ISIZE1OFSy_global not set.'
109-
STOP 1
110-
END IF
111-
END SUBROUTINE
112-
113-
SUBROUTINE set_ISIZE1OFZx(val)
114-
INTEGER, INTENT(IN) :: val
115-
ISIZE1OFZx_global = val
116-
END SUBROUTINE
117-
INTEGER FUNCTION get_ISIZE1OFZx()
118-
get_ISIZE1OFZx = ISIZE1OFZx_global
119-
END FUNCTION
120-
SUBROUTINE check_ISIZE1OFZx_initialized()
121-
IF (ISIZE1OFZx_global < 0) THEN
122-
WRITE(*,'(A)') 'Error: ISIZE1OFZx_global not set.'
121+
WRITE(*,'(A)') 'Error: ISIZE1OFSy_global not set. Call set_ISIZE1OFSy before differentiated routine.'
123122
STOP 1
124123
END IF
125124
END SUBROUTINE
126125

127-
SUBROUTINE set_ISIZE1OFZy(val)
128-
INTEGER, INTENT(IN) :: val
129-
ISIZE1OFZy_global = val
130-
END SUBROUTINE
131-
INTEGER FUNCTION get_ISIZE1OFZy()
132-
get_ISIZE1OFZy = ISIZE1OFZy_global
133-
END FUNCTION
134-
SUBROUTINE check_ISIZE1OFZy_initialized()
135-
IF (ISIZE1OFZy_global < 0) THEN
136-
WRITE(*,'(A)') 'Error: ISIZE1OFZy_global not set.'
137-
STOP 1
138-
END IF
139-
END SUBROUTINE
140-
141-
142126
SUBROUTINE set_ISIZE1OFX(val)
143127
INTEGER, INTENT(IN) :: val
144128
ISIZE1OFX_global = val
@@ -171,6 +155,38 @@ SUBROUTINE check_ISIZE1OFY_initialized()
171155
END IF
172156
END SUBROUTINE
173157

158+
SUBROUTINE set_ISIZE1OFZx(val)
159+
INTEGER, INTENT(IN) :: val
160+
ISIZE1OFZx_global = val
161+
END SUBROUTINE
162+
163+
INTEGER FUNCTION get_ISIZE1OFZx()
164+
get_ISIZE1OFZx = ISIZE1OFZx_global
165+
END FUNCTION
166+
167+
SUBROUTINE check_ISIZE1OFZx_initialized()
168+
IF (ISIZE1OFZx_global < 0) THEN
169+
WRITE(*,'(A)') 'Error: ISIZE1OFZx_global not set. Call set_ISIZE1OFZx before differentiated routine.'
170+
STOP 1
171+
END IF
172+
END SUBROUTINE
173+
174+
SUBROUTINE set_ISIZE1OFZy(val)
175+
INTEGER, INTENT(IN) :: val
176+
ISIZE1OFZy_global = val
177+
END SUBROUTINE
178+
179+
INTEGER FUNCTION get_ISIZE1OFZy()
180+
get_ISIZE1OFZy = ISIZE1OFZy_global
181+
END FUNCTION
182+
183+
SUBROUTINE check_ISIZE1OFZy_initialized()
184+
IF (ISIZE1OFZy_global < 0) THEN
185+
WRITE(*,'(A)') 'Error: ISIZE1OFZy_global not set. Call set_ISIZE1OFZy before differentiated routine.'
186+
STOP 1
187+
END IF
188+
END SUBROUTINE
189+
174190
SUBROUTINE set_ISIZE2OFA(val)
175191
INTEGER, INTENT(IN) :: val
176192
ISIZE2OFA_global = val

0 commit comments

Comments
 (0)