A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
cosmetics
[simgrid.git]
/
src
/
smpi
/
sample
/
compute2.c
1
#include <stdio.h>
2
3
int main(int argc, char *argv[]) {
4
int i;
5
double d;
6
MPI_Init(&argc, &argv);
7
d = 2.0;
8
SMPI_DO_ONCE {
9
for (i = 0; i < atoi(argv[1]); i++) {
10
if (d < 10000) {
11
d = d*d;
12
} else {
13
d = 2;
14
}
15
}
16
printf("%d %f\n", i, d);
17
}
18
MPI_Finalize();
19
return 0;
20
}