XBT_DEBUG("Copy the data over");
memcpy(comm->comm.dst_buff, comm->comm.src_buff, buff_size);
if (comm->comm.detached) { // if this is a detached send, the source buffer was duplicated by SMPI sender to make the original buffer available to the application ASAP
- comm->comm.clean_fun(comm->comm.src_buff);
- comm->comm.src_buff = NULL;
+ xbt_free(comm->comm.src_buff);
+ comm->comm.src_buff = NULL;
}
}
request->action =
SIMIX_req_comm_isend(mailbox, request->size, -1.0,
request->buf, request->size,
- &match_send,free, // a simple free is used to free the buffer
+ &match_send,
+ &smpi_mpi_request_free, // how to free the userdata if a detached send fails
request,
// detach if msg size < eager/rdv switch limit
detached);