Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
gha3mi committed Jan 23, 2024
1 parent 5ccf38d commit 70d5156
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion benchmarks/dot/dot.f90
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ program benchmark_dot

type(benchmark) :: bench
real(rk), allocatable :: u(:), v(:)
real(rk), volatile :: a
real(rk) :: a
real(rk), volatile :: b
integer(ik) :: p
integer :: nl, seed_size, i
integer, allocatable :: seed_array(:)
Expand Down Expand Up @@ -41,6 +42,7 @@ program benchmark_dot
call bench%start_benchmark(1,'dot_product','a = dot_product(u,v)',[p])
do nl = 1,bench%nloops
a = dot_product(u,v)
b = a
end do
call bench%stop_benchmark(cmp_gflops)
!===============================================================================
Expand All @@ -50,6 +52,7 @@ program benchmark_dot
call bench%start_benchmark(2,'m1', "a = dot_product(u,v,'m1')",[p])
do nl = 1,bench%nloops
a = dot_product(u,v,'m1')
b = a
end do
call bench%stop_benchmark(cmp_gflops)
!===============================================================================
Expand All @@ -59,6 +62,7 @@ program benchmark_dot
call bench%start_benchmark(3,'m2', "a = dot_product(u,v,'m2')",[p])
do nl = 1,bench%nloops
a = dot_product(u,v,'m2')
b = a
end do
call bench%stop_benchmark(cmp_gflops)
!===============================================================================
Expand All @@ -68,6 +72,7 @@ program benchmark_dot
call bench%start_benchmark(4,'m3', "a = dot_product(u,v,'m3')",[p])
do nl = 1,bench%nloops
a = dot_product(u,v,'m3')
b = a
end do
call bench%stop_benchmark(cmp_gflops)
!===============================================================================
Expand All @@ -77,6 +82,7 @@ program benchmark_dot
call bench%start_benchmark(5,'m4', "a = dot_product(u,v,'m4')",[p])
do nl = 1,bench%nloops
a = dot_product(u,v,'m4')
b = a
end do
call bench%stop_benchmark(cmp_gflops)
!===============================================================================
Expand All @@ -86,6 +92,7 @@ program benchmark_dot
call bench%start_benchmark(6,'chunks', "a = fprod(u,v)",[p])
do nl = 1,bench%nloops
a = fprod(u,v)
b = a
end do
call bench%stop_benchmark(cmp_gflops)
!===============================================================================
Expand All @@ -95,6 +102,7 @@ program benchmark_dot
call bench%start_benchmark(7,'kahan', "a = fprod_kahan(u,v)",[p])
do nl = 1,bench%nloops
a = fprod_kahan(u,v)
b = a
end do
call bench%stop_benchmark(cmp_gflops)
!===============================================================================
Expand Down

0 comments on commit 70d5156

Please sign in to comment.