You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I notice that your recv calls returns a status object that gets created with a reinterpret_cast of the MPI_Status. Fine. But I usually specify MPI_STATUS_IGNORE. In MPL that would be dropping the status object and never assigning it? But does that lead to a memory leak?
(This is the first time I'm looking at MPL and its source so I maybe overlooking something.)
The text was updated successfully, but these errors were encountered:
No there is no memory leak. The recv function creates a local status object which is automatically clean-up by the compiler when leaving the function. Note that reinterpret_cast does not create a new object.
reinterpret_cast<MPI_Status *>(&s)
Means, take the address of s (which is of type mpl::status) and interpret this address as a pointer to MPI_Status.
I notice that your
recv
calls returns astatus
object that gets created with areinterpret_cast
of theMPI_Status
. Fine. But I usually specifyMPI_STATUS_IGNORE
. In MPL that would be dropping the status object and never assigning it? But does that lead to a memory leak?(This is the first time I'm looking at MPL and its source so I maybe overlooking something.)
The text was updated successfully, but these errors were encountered: