Skip to content
Snippets Groups Projects
Commit 9b73fcf4 authored by Harshada Balasubramanian's avatar Harshada Balasubramanian
Browse files

with Kokkos::fence

parent 27a9ca5c
Branches release-0.5.1
Tags v0.5.1
No related merge requests found
......@@ -36,6 +36,7 @@ void scenario_1(double* array, int nblocks, int nlev, int nproma, bool print=tru
d_view(jb, jk, jc) = p;
}});
Kokkos::fence();
if(print)
printf("Time = %f ms\n\n", timer.seconds() * 1000);
Kokkos::deep_copy(view, d_view);
......@@ -62,7 +63,8 @@ void scenario_2(double* array, int nblocks, int nlev, int nproma, bool print=tru
// printf("%f ", d_view(jb, jk, jc));
}});
Kokkos::fence();
if(print)
printf("Time = %f ms\n\n", timer.seconds() * 1000);
Kokkos::deep_copy(view, d_view);
......@@ -89,7 +91,8 @@ void scenario_2b(double* array, int nblocks, int nlev, int nproma, bool print=tr
// printf("%f ", d_view(jb, jk, jc));
}});
Kokkos::fence();
if(print)
printf("Time = %f ms\n\n", timer.seconds() * 1000);
Kokkos::deep_copy(view, d_view);
......@@ -116,7 +119,8 @@ void scenario_3(double* array, int nblocks, int nlev, int nproma, bool print=tru
// printf("%f ", d_view(jb, jk, jc));
}});
Kokkos::fence();
if(print)
printf("Time = %f ms\n\n", timer.seconds() * 1000);
Kokkos::deep_copy(view, d_view);
......@@ -144,6 +148,7 @@ void scenario_4(double* array, int nblocks, int nlev, int nproma, bool print=tru
// printf("%f ", d_view(jb, jk, jc));
}});
Kokkos::fence();
if(print)
printf("Time = %f ms\n\n", timer.seconds() * 1000);
Kokkos::deep_copy(view, d_view);
......@@ -172,6 +177,7 @@ void scenario_5(double* array, int nblocks, int nlev, int nproma, bool print=tru
// printf("%f ", d_view(jb, jk, jc));
}});
Kokkos::fence();
if(print)
printf("Time = %f ms\n\n", timer.seconds() * 1000);
Kokkos::deep_copy(view, d_view);
......
......@@ -12,7 +12,7 @@ then
cmake --build build_gpu --parallel
ncells=(5000000)
nlev=(90)
nproma=(10000 30000 50000 100000 1000000 5000000)
nproma=(5000000)
else
cmake -B build -S . -DMU_ARCH=x86_64 -DCMAKE_CXX_FLAGS="-O3"
cmake --build build --parallel
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment