Compare commits

..

2 Commits

Author SHA1 Message Date
Bryce Allen
e5e3ca178a more precision when printing timings 2022-10-24 18:07:38 -04:00
Bryce Allen
124654b576 update gt daxpy example for new gt-blas handle api 2022-10-24 18:01:22 -04:00
3 changed files with 3 additions and 3 deletions

View File

@@ -73,7 +73,7 @@ int main(int argc, char **argv) {
device_id = gt::backend::clib::device_get();
vendor_id = gt::backend::clib::device_get_vendor_id(device_id);
gt::blas::handle_t* h = gt::blas::create();
gt::blas::handle_t h;
gt::copy(x, d_x);
gt::copy(y, d_y);

View File

@@ -338,7 +338,7 @@ int main(int argc, char** argv)
d_dzdy_numeric = stencil2d_1d_5(d_z, stencil5) * scale;
gt::synchronize();
}
printf("%d/%d exchange time %0.4f\n", world_rank, world_size, total_time / n_iter);
printf("%d/%d exchange time %0.8f\n", world_rank, world_size, total_time / n_iter);
gt::copy(d_dzdy_numeric, h_dzdy_numeric);
// gt::synchronize();

View File

@@ -201,7 +201,7 @@ int main(int argc, char **argv) {
boundary_exchange(MPI_COMM_WORLD, world_size, world_rank, d_y, n_bnd);
clock_gettime(CLOCK_MONOTONIC, &end);
seconds = ((end.tv_sec - start.tv_sec) + (end.tv_nsec - start.tv_nsec) * 1.0e-9);
printf("%d/%d exchange time %0.4f\n", world_rank, world_size, seconds);
printf("%d/%d exchange time %0.8f\n", world_rank, world_size, seconds);
d_dydx_numeric = stencil1d_5(d_y, stencil5) * scale;