This commit is contained in:
2025-10-06 15:48:38 +02:00
parent 2a5d4dece0
commit eca18b7675

View File

@@ -276,7 +276,18 @@ int main(int argc, char **argv) {
// TASK: T2
// Time your code
// BEGIN: T2
if (world_rank == ROOT)
gettimeofday(&t_start, NULL);
simulate();
// MPI_Barrier(MPI_COMM_WORLD); // TODO
if (world_rank == ROOT) {
gettimeofday(&t_end, NULL);
printf("Total elapsed time: %lf seconds\n",
WALLTIME(t_end) - WALLTIME(t_start));
}
// END: T2
// Clean up and shut down