Commit 0cae8842 by Francois Gygi

Fix MPI_Comm leak in SlaterDet copy ctor

parent ffa583a0
......@@ -77,8 +77,10 @@ SlaterDet::SlaterDet(const Context& ctxt, D3vector kpoint) : ctxt_(ctxt),
////////////////////////////////////////////////////////////////////////////////
SlaterDet::SlaterDet(const SlaterDet& rhs) : ctxt_(rhs.context()),
basis_(new Basis(*(rhs.basis_))),
my_col_comm_(rhs.my_col_comm_), c_(rhs.c_){}
basis_(new Basis(*(rhs.basis_))), c_(rhs.c_)
{
MPI_Comm_dup(rhs.my_col_comm_,&my_col_comm_);
}
////////////////////////////////////////////////////////////////////////////////
SlaterDet::~SlaterDet()
......@@ -103,6 +105,7 @@ SlaterDet::~SlaterDet()
}
}
#endif
MPI_Comm_free(&my_col_comm_);
}
////////////////////////////////////////////////////////////////////////////////
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment