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
Reduce scope of variables (please Codacy).
[simgrid.git]
/
teshsuite
/
smpi
/
coll-scatter
/
coll-scatter.c
diff --git
a/teshsuite/smpi/coll-scatter/coll-scatter.c
b/teshsuite/smpi/coll-scatter/coll-scatter.c
index
08c2aaf
..
9f18ddb
100644
(file)
--- a/
teshsuite/smpi/coll-scatter/coll-scatter.c
+++ b/
teshsuite/smpi/coll-scatter/coll-scatter.c
@@
-1,4
+1,4
@@
-/* Copyright (c) 2012-2014. The SimGrid Team.
+/* Copyright (c) 2012-2014
, 2016-2017
. 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
@@
-15,7
+15,6
@@
int main(int argc, char **argv)
int retval;
int sendcount = 1; // one double to each process
int recvcount = 1;
int retval;
int sendcount = 1; // one double to each process
int recvcount = 1;
- int i;
double *sndbuf = NULL;
double rcvd;
int root = 0; // arbitrary choice
double *sndbuf = NULL;
double rcvd;
int root = 0; // arbitrary choice
@@
-27,7
+26,7
@@
int main(int argc, char **argv)
// on root, initialize sendbuf
if (root == rank) {
sndbuf = malloc(size * sizeof(double));
// on root, initialize sendbuf
if (root == rank) {
sndbuf = malloc(size * sizeof(double));
- for (i = 0; i < size; i++) {
+ for (i
nt i
= 0; i < size; i++) {
sndbuf[i] = (double) i;
}
}
sndbuf[i] = (double) i;
}
}