X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/025965074dbe4c1b04466cc260260470f28b7472..29af76860c8d693917872c2a0ed3d2a4c7a0388f:/examples/smpi/compute.c diff --git a/examples/smpi/compute.c b/examples/smpi/compute.c index 2e4b0e3c57..775e131e82 100644 --- a/examples/smpi/compute.c +++ b/examples/smpi/compute.c @@ -1,19 +1,21 @@ #include +#include -int main(int argc, char *argv[]) { - int i; - double d; - MPI_Init(&argc, &argv); - d = 2.0; - for (i = 0; i < atoi(argv[1]); i++) { - if (d < 10000) { - d = d*d; - } else { - d = 2; - } - } - printf("%d %f\n", i, d); - MPI_Comm_rank(MPI_COMM_WORLD, &i); - MPI_Finalize(); - return 0; +int main(int argc, char *argv[]) +{ + int i; + double d; + MPI_Init(&argc, &argv); + d = 2.0; + for (i = 0; i < atoi(argv[1]); i++) { + if (d < 10000) { + d = d * d; + } else { + d = 2; + } + } + printf("%d %f\n", i, d); + MPI_Comm_rank(MPI_COMM_WORLD, &i); + MPI_Finalize(); + return 0; }