From: markls Date: Tue, 6 Nov 2007 08:29:25 +0000 (+0000) Subject: added compute timer test X-Git-Tag: v3.3~848 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/86a8865b0df491b343e018ffd2ff4722c93cb5fe?hp=49aa15c63b8823fd0fc084e9e86d2fbd5ca025b7 added compute timer test git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4974 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/smpi/sample/compute.c b/src/smpi/sample/compute.c new file mode 100644 index 0000000000..26ce12a946 --- /dev/null +++ b/src/smpi/sample/compute.c @@ -0,0 +1,18 @@ +#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_Finalize(); + return 0; +}