File tree 2 files changed +7
-7
lines changed
2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ Dependencies:
45
45
46
46
Compilers tested include:
47
47
48
- * gfortran-10.3 .0
48
+ * gfortran-9.4 .0
49
49
* ifort-2021.4
50
50
* ifx-2021.4
51
51
Original file line number Diff line number Diff line change 5
5
6
6
contains
7
7
8
- pure module function tile_indices(dims)
8
+ pure module function tile_indices(dims) result(res)
9
9
integer (ik), intent (in ) :: dims
10
- integer (ik) :: tile_indices (2 )
10
+ integer (ik) :: res (2 )
11
11
integer (ik) :: offset, tile_size
12
12
13
13
tile_size = dims / num_images()
14
14
15
15
! ! start and end indices assuming equal tile sizes
16
- tile_indices (1 ) = (this_image() - 1 ) * tile_size + 1
17
- tile_indices (2 ) = tile_indices (1 ) + tile_size - 1
16
+ res (1 ) = (this_image() - 1 ) * tile_size + 1
17
+ res (2 ) = res (1 ) + tile_size - 1
18
18
19
19
! ! if we have any remainder, distribute it to the tiles at the end
20
20
offset = num_images() - mod (dims, num_images())
21
21
if (this_image() > offset) then
22
- tile_indices (1 ) = tile_indices (1 ) + this_image() - offset - 1
23
- tile_indices (2 ) = tile_indices (2 ) + this_image() - offset
22
+ res (1 ) = res (1 ) + this_image() - offset - 1
23
+ res (2 ) = res (2 ) + this_image() - offset
24
24
end if
25
25
26
26
end function tile_indices
You can’t perform that action at this time.
0 commit comments