Skip to content
Snippets Groups Projects
Verified Commit a4248035 authored by baptiste.coudray's avatar baptiste.coudray
Browse files

Beginning test

parent 82e66a2f
No related branches found
No related tags found
No related merge requests found
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#define ROOT_RANK 0 #define ROOT_RANK 0
#define FPS 60 #define FPS 60
#define N_MEASURES 15
void init_chunk_board(chunk_info_t *ci) { void init_chunk_board(chunk_info_t *ci) {
for (int i = 0; i < ci->dimensions[0]; ++i) { for (int i = 0; i < ci->dimensions[0]; ++i) {
...@@ -65,8 +66,8 @@ void compute_next_chunk_board(struct dispatch_context *dc, struct futhark_contex ...@@ -65,8 +66,8 @@ void compute_next_chunk_board(struct dispatch_context *dc, struct futhark_contex
futhark_context_sync(fc); futhark_context_sync(fc);
futhark_entry_next_chunk_board(fc, &fut_next_chunk_board, fut_chunk_board, fut_north_west, fut_north, futhark_entry_next_chunk_board(fc, &fut_next_chunk_board, fut_chunk_board, fut_north_west, fut_north,
fut_north_east, fut_west, fut_east, fut_south_west, fut_south, fut_north_east, fut_west, fut_east, fut_south_west, fut_south,
fut_south_east); fut_south_east);
futhark_context_sync(fc); futhark_context_sync(fc);
futhark_values_i8_2d(fc, fut_next_chunk_board, ci->data); futhark_values_i8_2d(fc, fut_next_chunk_board, ci->data);
...@@ -111,14 +112,16 @@ int main(int argc, char *argv[]) { ...@@ -111,14 +112,16 @@ int main(int argc, char *argv[]) {
chunk_info_t ci = get_chunk_info(disp_context); chunk_info_t ci = get_chunk_info(disp_context);
init_chunk_board(&ci); init_chunk_board(&ci);
double start = MPI_Wtime(); for (int i = 0; i < N_MEASURES; ++i) {
compute_next_chunk_board(disp_context, fut_context, &ci); double start = MPI_Wtime();
double finish = MPI_Wtime(); compute_next_chunk_board(disp_context, fut_context, &ci);
double finish = MPI_Wtime();
if (my_rank == ROOT_RANK) { if (my_rank == ROOT_RANK) {
printf("%d;%d;%d;%d;%f\n", world_size, nb_devices, board_n, board_m, finish - start); printf("%d;%d;%d;%d;%f\n", world_size, nb_devices, board_n, board_m, finish - start);
}
} }
dispatch_context_free(disp_context); dispatch_context_free(disp_context);
futhark_context_config_free(fut_config); futhark_context_config_free(fut_config);
futhark_context_free(fut_context); futhark_context_free(fut_context);
......
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