34
34
! ================== test transposes with integer x,y,z values ===============================
35
35
module run_size
36
36
use iso_fortran_env
37
- #ifndef HAVE_WALLTIME
38
- # ifdef MPI_WORKING_MODULE
39
- use MPI, only : WALLTIME= >MPI_WTIME
40
- implicit none
41
- # else
42
- implicit none
43
- include ' mpif.h'
44
- # define WALLTIME MPI_WTIME
45
- # endif
46
- #else
47
- implicit none
48
- #endif
49
- integer (int64), codimension[* ] :: nx, ny, nz
50
- integer (int64), codimension[* ] :: my, mx, first_y, last_y, first_x, last_x
51
- integer (int64) :: my_node, num_nodes
52
- real (real64), codimension[* ] :: tran_time
53
-
54
- #ifdef HAVE_WALLTIME
55
- interface
56
- function WALLTIME () bind(C, name = " WALLTIME" )
57
- use iso_fortran_env
58
- real (real64) :: WALLTIME
59
- end function WALLTIME
60
- end interface
61
- #endif
37
+ implicit none
38
+
39
+ integer (int64), codimension[* ] :: nx, ny, nz
40
+ integer (int64), codimension[* ] :: my, mx, first_y, last_y, first_x, last_x
41
+ integer (int64) :: my_node, num_nodes
42
+ real (real64), codimension[* ] :: tran_time
43
+
62
44
63
45
contains
64
46
@@ -226,9 +208,11 @@ subroutine transpose_X_Y
226
208
implicit none
227
209
228
210
integer (int64) :: i,stage
211
+ real (real64) :: tmp
229
212
230
213
sync all !- - wait for other nodes to finish compute
231
- tran_time = tran_time - WALLTIME()
214
+ call cpu_time(tmp)
215
+ tran_time = tran_time - tmp
232
216
233
217
call copy3 ( u(1 ,1 ,first_x,1 + (my_node-1 )* my) & !- - intra-node transpose
234
218
, ur(1 ,1 ,first_y,1 + (my_node-1 )* mx) & !- - no inter-node transpose needed
@@ -262,7 +246,8 @@ subroutine transpose_X_Y
262
246
#endif
263
247
264
248
sync all !- - wait for other nodes to finish transpose
265
- tran_time = tran_time + WALLTIME()
249
+ call cpu_time(tmp)
250
+ tran_time = tran_time + tmp
266
251
267
252
end subroutine transpose_X_Y
268
253
@@ -273,9 +258,11 @@ subroutine transpose_Y_X
273
258
implicit none
274
259
275
260
integer (int64) :: i, stage
261
+ real (real64) :: tmp
276
262
277
263
sync all !- - wait for other nodes to finish compute
278
- tran_time = tran_time - WALLTIME()
264
+ call cpu_time(tmp)
265
+ tran_time = tran_time - tmp
279
266
280
267
call copy3 ( ur(1 ,1 ,first_y,1 + (my_node-1 )* mx) & !- - intra-node transpose
281
268
, u(1 ,1 ,first_x,1 + (my_node-1 )* my) & !- - no inter-node transpose needed
@@ -309,7 +296,8 @@ subroutine transpose_Y_X
309
296
#endif
310
297
311
298
sync all !- - wait for other nodes to finish transpose
312
- tran_time = tran_time + WALLTIME()
299
+ call cpu_time(tmp)
300
+ tran_time = tran_time + tmp
313
301
314
302
end subroutine transpose_Y_X
315
303
0 commit comments