@@ -5,21 +5,12 @@ module accelerated_module
55 private
66 public :: co_dot_accelerated
77 public :: co_dot_unaccelerated
8- public :: co_dot_mapped_manually_accelerated
98 public :: CUDA,OpenACC,OpenMP
109 public :: walltime
1110
1211 ! Explicit interfaces for procedures that wrap accelerated kernels
1312 interface
1413
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-
2314 ! This wrapper exploits the OpenCoarrays acceleration support and is therefore simpler
2415 subroutine cudaDot (a ,b ,partial_dot ,n ) bind(C, name= " cudaDot" )
2516 use iso_c_binding, only : c_float,c_int
@@ -49,13 +40,6 @@ subroutine co_dot_unaccelerated(x,y,x_dot_y)
4940 call co_sum(x_dot_y) ! Call Fortarn 2015 collective sum
5041 end subroutine
5142
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-
5943 ! Exploit the OpenCoarrays support for a accelerated dot products
6044 ! using any one of several acceleration APIs: OpenACC, CUDA, OpenMP 4.0, etc.
6145 ! 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
10993 sync all
11094
11195 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
11397 use accelerated_module
11498
11599 ! Parallel execution
@@ -128,10 +112,6 @@ program cu_dot_test
128112
129113 sync all
130114
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
135115 end block
136116
137117contains
0 commit comments