ex3: task 2
This commit is contained in:
@@ -160,7 +160,17 @@ int main(int argc, char **argv) {
|
||||
// TASK: T2
|
||||
// Time your code
|
||||
// BEGIN: T2
|
||||
if (comm_rank == ROOT)
|
||||
gettimeofday(&t_start, NULL);
|
||||
simulate();
|
||||
MPI_Barrier(MPI_COMM_WORLD);
|
||||
|
||||
if (comm_rank == ROOT) {
|
||||
gettimeofday(&t_end, NULL);
|
||||
|
||||
printf("Total elapsed time: %lf seconds\n",
|
||||
WALLTIME(t_end) - WALLTIME(t_start));
|
||||
}
|
||||
// END: T2
|
||||
|
||||
domain_finalize();
|
||||
|
||||
Reference in New Issue
Block a user