A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
[simgrid.git]
/
teshsuite
/
smpi
/
compute.c
diff --git
a/teshsuite/smpi/compute.c
b/teshsuite/smpi/compute.c
index
24607cb
..
92bce0f
100644
(file)
--- a/
teshsuite/smpi/compute.c
+++ b/
teshsuite/smpi/compute.c
@@
-1,4
+1,4
@@
-/* Copyright (c) 2009
, 2010
. The SimGrid Team.
+/* Copyright (c) 2009
-2010, 2012-2014
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
@@
-9,11
+9,12
@@
int main(int argc, char *argv[])
{
int main(int argc, char *argv[])
{
- int i;
+ int i
, n
;
double d;
MPI_Init(&argc, &argv);
double d;
MPI_Init(&argc, &argv);
+ n = argc > 1 ? atoi(argv[1]) : 0;
d = 2.0;
d = 2.0;
- for (i = 0; i <
atoi(argv[1])
; i++) {
+ for (i = 0; i <
n
; i++) {
if (d < 10000) {
d = d * d;
} else {
if (d < 10000) {
d = d * d;
} else {