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
Change yes value to 1 value.
[simgrid.git]
/
examples
/
smpi
/
compute2.c
1
#include <stdio.h>
2
#include <mpi.h>
3
4
int main(int argc, char *argv[])
5
{
6
int i;
7
double d;
8
MPI_Init(&argc, &argv);
9
d = 2.0;
10
/* SMPI_DO_ONCE */{
11
for (i = 0; i < atoi(argv[1]); i++) {
12
if (d < 10000) {
13
d = d * d;
14
} else {
15
d = 2;
16
}
17
}
18
printf("%d %f\n", i, d);
19
}
20
MPI_Finalize();
21
return 0;
22
}