+/* Copyright (c) 2014. The SimGrid Team.
+ * All rights reserved. */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
#include "xbt/log.h"
#include <stdio.h>
#include <mpi.h>
MPI_Init(&argc, &argv);
+ int rank;
+ MPI_Comm_rank(MPI_COMM_WORLD,&rank);
+
double *a = malloc(sizeof(double) * M);
double *b = malloc(sizeof(double) * N);
// Commenting out this barrier fixes it!!
MPI_Barrier(MPI_COMM_WORLD);
+ if(rank==0) {
+ printf("Walltime = %g\n",MPI_Wtime());
+ }
+
MPI_Finalize();
free(a);
free(b);