Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix comms memory leak #436

Merged
merged 2 commits into from
Jan 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cpp/include/raft/comms/comms.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ constexpr datatype_t get_type<double>()

class comms_iface {
public:
virtual ~comms_iface() {}

virtual int get_size() const = 0;
virtual int get_rank() const = 0;

Expand Down
2 changes: 1 addition & 1 deletion cpp/include/raft/comms/mpi_comms.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ class mpi_comms : public comms_iface {
inline void initialize_mpi_comms(handle_t* handle, MPI_Comm comm)
{
auto communicator =
std::make_shared<comms_t>(std::unique_ptr<comms_iface>(new mpi_comms(comm, true)));
std::make_shared<comms_t>(std::unique_ptr<comms_iface>(new mpi_comms(comm, false)));
handle->set_comms(communicator);
};

Expand Down