@@ -100,9 +100,14 @@ main(int argc, char **argv)
100100 pdcid_t local_region_id , global_region_id ;
101101 pdcid_t transfer_id ;
102102
103- double * local_buffer = (double * )malloc (g_x_ept * g_y_ept * sizeof (double ));
104-
105- uint64_t local_length [1 ] = {g_x_ept * g_y_ept };
103+ // double * local_buffer = (double *)malloc(g_x_ept * g_y_ept * sizeof(double));
104+ double * * local_buffer = (double * * )malloc (g_x_ept * sizeof (double * ));
105+ int i ;
106+ for (i = 0 ; i < g_x_ept ; i ++ )
107+ local_buffer [i ] = malloc (sizeof (double ) * g_y_ept );
108+
109+ uint64_t local_length [1 ] = {g_x_ept * g_y_ept };
110+ // uint64_t local_length[NUM_DIMS] = {g_x_ept, g_y_ept};
106111 uint64_t local_offsets [1 ] = {0 };
107112 uint64_t global_length [NUM_DIMS ] = {g_x_ept , g_y_ept };
108113 uint64_t global_offsets [NUM_DIMS ] = {g_coords [0 ] * g_x_ept , g_coords [1 ] * g_y_ept };
@@ -142,6 +147,10 @@ main(int argc, char **argv)
142147 time_total = MPI_Wtime () - time_total ;
143148 PDCregion_transfer_close (transfer_id );
144149
150+ #if PDC_TIMING == 1
151+ PDC_timing_report ("write" );
152+ #endif
153+
145154 // TODO delete before close ?
146155 PDCobj_close (obj_id );
147156 PDCprop_close (obj_prop );
@@ -154,7 +163,7 @@ main(int argc, char **argv)
154163
155164 if (g_mpi_rank == 0 ) {
156165 double bandwidth =
157- g_x_tiles * g_y_tiles * g_x_ept * g_y_ept / 1024.0 / 1024.0 * sizeof (double ) / time_total ;
166+ g_x_ept * g_y_ept / 1024.0 / 1024.0 * g_x_tiles * g_y_tiles * sizeof (double ) / time_total ;
158167 printf ("Bandwidth: %.2fMB/s, total time: %.4f, transfer create: %.4f, transfer start: %.4f, "
159168 "transfert wait: %.4f\n" ,
160169 bandwidth , time_total , time_create , time_start , time_wait );
0 commit comments