//void prepare_redistribution(int qty, int myId, int numP, int numO, int is_children_group, int is_intercomm, char **recv, struct Counts *s_counts, struct Counts *r_counts);
voidprepare_redistribution(intqty,MPI_Datatypedatatype,intmyId,intnumP,intnumO,intis_children_group,intis_intercomm,intis_sync,void**recv,structCounts*s_counts,structCounts*r_counts);//FIXME Choose name for is_sync
voidprepare_redistribution(intqty,MPI_Datatypedatatype,intnumP,intnumO,intis_children_group,void**recv,structCounts*s_counts,structCounts*r_counts);//FIXME Choose name for is_sync
if(!is_children_group&&(mall_conf->spawn_method==MALL_SPAWN_BASELINE||mall->myId>=numO)){// TODO Simplify to "if rank is source only" or "if rank will be zombie"
MPI_Ibarrier(comm,&((*requests)[*request_qty-1]));//FIXME Not easy to read...
}
}
if(aux_comm_used){
MPI_Comm_free(&aux_comm);
}
freeCounts(&s_counts);
freeCounts(&r_counts);
return0;//FIXME In this case is always false...
}
/*
* Checks if a set of requests have been completed (1) or not (0).
*
* - myId (IN): Rank of the MPI process in the local communicator. For the parents is not the rank obtained from "comm".
* - is_children_group (IN): Indicates wether this MPI rank is a children(TRUE) or a parent(FALSE).
* - requests (IN): Pointer to array of requests to be used to determine if the communication has ended.
* - request_qty (IN): Quantity of requests in "requests".
*
* returns: An integer indicating if the operation has been completed(TRUE) or not(FALSE).