+ MPI_Datatype datatype = req->old_type;
+ if(datatype->has_subtype == 1){
+ // This part handles the problem of non-contignous memory
+ // the unserialization at the reception
+ s_smpi_subtype_t *subtype = datatype->substruct;
+ if(req->flags & RECV) {
+ subtype->unserialize(req->buf, req->old_buf, req->size/smpi_datatype_size(datatype) , datatype->substruct);
+ }
+ //FIXME: I am not sure that if the send is detached we have to free
+ //the sender buffer thus I do it only for the reciever
+ if(req->flags & RECV) free(req->buf);
+ }
+