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
small leak (removed)
[simgrid.git]
/
src
/
smpi
/
smpi_topo.c
diff --git
a/src/smpi/smpi_topo.c
b/src/smpi/smpi_topo.c
index
7429959
..
56622b8
100644
(file)
--- a/
src/smpi/smpi_topo.c
+++ b/
src/smpi/smpi_topo.c
@@
-53,10
+53,11
@@
int smpi_mpi_cart_create(MPI_Comm comm_old, int ndims, int dims[],
rank = smpi_comm_rank(comm_old);
rank = smpi_comm_rank(comm_old);
- // TODO : add somewhere : if topo != NULL, free...
- topo = smpi_topo_create(ndims);
+
+
newSize = 1;
if(ndims != 0) {
newSize = 1;
if(ndims != 0) {
+ topo = smpi_topo_create(ndims);
for (i = 0 ; i < ndims ; i++) {
newSize *= dims[i];
}
for (i = 0 ; i < ndims ; i++) {
newSize *= dims[i];
}
@@
-91,6
+92,7
@@
int smpi_mpi_cart_create(MPI_Comm comm_old, int ndims, int dims[],
}
else {
if (rank == 0) {
}
else {
if (rank == 0) {
+ topo = smpi_topo_create(ndims);
*comm_cart = smpi_comm_new(smpi_comm_group(MPI_COMM_SELF), topo);
}
else {
*comm_cart = smpi_comm_new(smpi_comm_group(MPI_COMM_SELF), topo);
}
else {