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
leaks --
[simgrid.git]
/
src
/
smpi
/
smpi_pmpi.cpp
diff --git
a/src/smpi/smpi_pmpi.cpp
b/src/smpi/smpi_pmpi.cpp
index
33038ba
..
2baf7c1
100644
(file)
--- a/
src/smpi/smpi_pmpi.cpp
+++ b/
src/smpi/smpi_pmpi.cpp
@@
-2306,7
+2306,9
@@
int PMPI_Cart_create(MPI_Comm comm_old, int ndims, int* dims, int* periodic, int
} else if (ndims < 0 || (ndims > 0 && (dims == nullptr || periodic == nullptr)) || comm_cart == nullptr) {
return MPI_ERR_ARG;
} else{
} else if (ndims < 0 || (ndims > 0 && (dims == nullptr || periodic == nullptr)) || comm_cart == nullptr) {
return MPI_ERR_ARG;
} else{
- new Topo_Cart(comm_old, ndims, dims, periodic, reorder, comm_cart);
+ Topo_Cart* topo = new Topo_Cart(comm_old, ndims, dims, periodic, reorder, comm_cart);
+ if(*comm_cart==MPI_COMM_NULL)
+ delete topo;
return MPI_SUCCESS;
}
}
return MPI_SUCCESS;
}
}
@@
-2409,6
+2411,8
@@
int PMPI_Cart_sub(MPI_Comm comm, int* remain_dims, MPI_Comm* comm_new) {
return MPI_ERR_ARG;
}
MPIR_Cart_Topology cart = topo->sub(remain_dims, comm_new);
return MPI_ERR_ARG;
}
MPIR_Cart_Topology cart = topo->sub(remain_dims, comm_new);
+ if(*comm_new==MPI_COMM_NULL)
+ delete cart;
if(cart==nullptr)
return MPI_ERR_ARG;
return MPI_SUCCESS;
if(cart==nullptr)
return MPI_ERR_ARG;
return MPI_SUCCESS;