@@ -5,21 +5,12 @@ module accelerated_module
5
5
private
6
6
public :: co_dot_accelerated
7
7
public :: co_dot_unaccelerated
8
- public :: co_dot_mapped_manually_accelerated
9
8
public :: CUDA,OpenACC,OpenMP
10
9
public :: walltime
11
10
12
11
! Explicit interfaces for procedures that wrap accelerated kernels
13
12
interface
14
13
15
- subroutine manual_mapped_cudaDot (a ,b ,partial_dot ,n ,img ) bind(C, name= " manual_mapped_cudaDot" )
16
- use iso_c_binding, only : c_float,c_int
17
- real (c_float) :: a(* ),b(* )
18
- real (c_float) :: partial_dot
19
- integer (c_int),value :: n
20
- integer (c_int),value :: img
21
- end subroutine
22
-
23
14
! This wrapper exploits the OpenCoarrays acceleration support and is therefore simpler
24
15
subroutine cudaDot (a ,b ,partial_dot ,n ) bind(C, name= " cudaDot" )
25
16
use iso_c_binding, only : c_float,c_int
@@ -49,13 +40,6 @@ subroutine co_dot_unaccelerated(x,y,x_dot_y)
49
40
call co_sum(x_dot_y) ! Call Fortarn 2015 collective sum
50
41
end subroutine
51
42
52
- subroutine co_dot_mapped_manually_accelerated (x ,y ,x_dot_y )
53
- real (c_float), intent (in ) :: x(:),y(:)
54
- real (c_float), intent (out ) :: x_dot_y
55
- call manual_mapped_cudaDot(x,y,x_dot_y,size (x),this_image()- 1 )
56
- call co_sum(x_dot_y) ! Call Fortarn 2015 collective sum
57
- end subroutine
58
-
59
43
! Exploit the OpenCoarrays support for a accelerated dot products
60
44
! using any one of several acceleration APIs: OpenACC, CUDA, OpenMP 4.0, etc.
61
45
! On heterogeneous platforms, the API choice can vary in space (e.g., from one image/node to the
@@ -109,7 +93,7 @@ program cu_dot_test
109
93
sync all
110
94
111
95
block
112
- ! use accelerated_module, only : co_dot_accelerated,co_dot_unaccelerated,CUDA,walltime,co_dot_mapped_manually_accelerated
96
+ ! use accelerated_module, only : co_dot_accelerated,co_dot_unaccelerated,CUDA,walltime
113
97
use accelerated_module
114
98
115
99
! Parallel execution
@@ -128,10 +112,6 @@ program cu_dot_test
128
112
129
113
sync all
130
114
131
- t_start = walltime()
132
- call co_dot_mapped_manually_accelerated(a_man,b_man,dot)
133
- t_end = walltime()
134
- if (me== 1 ) print * , ' Manually mapped' ,dot,' time:' ,t_end- t_start
135
115
end block
136
116
137
117
contains
0 commit comments