smpi_datatype_free does not update refcount, use unuse instead.
rbuf, 1, new_rdtype, recvfrom,
COLL_TAG_ALLGATHERV,
comm, MPI_STATUS_IGNORE);
rbuf, 1, new_rdtype, recvfrom,
COLL_TAG_ALLGATHERV,
comm, MPI_STATUS_IGNORE);
- smpi_datatype_free(&new_sdtype);
- smpi_datatype_free(&new_rdtype);
+ smpi_datatype_unuse(new_sdtype);
+ smpi_datatype_unuse(new_rdtype);
send_data_from = recv_data_from[i_parity];
send_data_from = recv_data_from[i_parity];
- smpi_datatype_free(&new_sdtype);
- smpi_datatype_free(&new_rdtype);
+ smpi_datatype_unuse(new_sdtype);
+ smpi_datatype_unuse(new_rdtype);
smpi_mpi_sendrecv(tmp_buff, position, MPI_PACKED, dst, tag, recv_buff, 1,
new_type, src, tag, comm, &status);
smpi_mpi_sendrecv(tmp_buff, position, MPI_PACKED, dst, tag, recv_buff, 1,
new_type, src, tag, comm, &status);
- smpi_datatype_free(&new_type);
+ smpi_datatype_unuse(new_type);