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
[sonar] A single statement should not have more than one resource allocation.
[simgrid.git]
/
src
/
smpi
/
mpi
/
smpi_topo.cpp
diff --git
a/src/smpi/mpi/smpi_topo.cpp
b/src/smpi/mpi/smpi_topo.cpp
index
424e349
..
b79cefc
100644
(file)
--- a/
src/smpi/mpi/smpi_topo.cpp
+++ b/
src/smpi/mpi/smpi_topo.cpp
@@
-80,7
+80,8
@@
Topo_Cart::Topo_Cart(MPI_Comm comm_old, int ndims, const int dims[], const int p
} else {
if(comm_cart != nullptr){
if (rank == 0) {
} else {
if(comm_cart != nullptr){
if (rank == 0) {
- *comm_cart = new Comm(new Group(MPI_COMM_SELF->group()), this);
+ MPI_Group group = new Group(MPI_COMM_SELF->group());
+ *comm_cart = new Comm(group, this);
} else {
*comm_cart = MPI_COMM_NULL;
}
} else {
*comm_cart = MPI_COMM_NULL;
}