1
1

Don't allocate space for the requests if the

underlying topology has no neighbors.

This commit fixes issue #2402.

Signed-off-by: George Bosilca <bosilca@icl.utk.edu>
Этот коммит содержится в:
George Bosilca 2016-11-12 18:01:09 -05:00
родитель aaf95c0713
Коммит 725277bc26
4 изменённых файлов: 16 добавлений и 0 удалений

Просмотреть файл

@ -48,6 +48,8 @@ mca_coll_basic_neighbor_allgather_cart(const void *sbuf, int scount,
ptrdiff_t lb, extent;
int rc = MPI_SUCCESS, dim, nreqs;
if( 0 == cart->ndims ) return OMPI_SUCCESS;
ompi_datatype_get_extent(rdtype, &lb, &extent);
reqs = preqs = coll_base_comm_get_reqs( module->base_data, 4 * cart->ndims );
@ -129,6 +131,7 @@ mca_coll_basic_neighbor_allgather_graph(const void *sbuf, int scount,
int rc = MPI_SUCCESS, neighbor;
mca_topo_base_graph_neighbors_count (comm, rank, &degree);
if( 0 == degree) return OMPI_SUCCESS;
edges = graph->edges;
if (rank > 0) {
@ -181,6 +184,7 @@ mca_coll_basic_neighbor_allgather_dist_graph(const void *sbuf, int scount,
indegree = dist_graph->indegree;
outdegree = dist_graph->outdegree;
if( 0 == (indegree + outdegree) ) return OMPI_SUCCESS;
inedges = dist_graph->in;
outedges = dist_graph->out;

Просмотреть файл

@ -47,6 +47,8 @@ mca_coll_basic_neighbor_allgatherv_cart(const void *sbuf, int scount, struct omp
ptrdiff_t lb, extent;
int rc = MPI_SUCCESS, dim, i, nreqs;
if( 0 == cart->ndims ) return OMPI_SUCCESS;
ompi_datatype_get_extent(rdtype, &lb, &extent);
reqs = preqs = coll_base_comm_get_reqs( module->base_data, 4 * cart->ndims);
@ -116,6 +118,7 @@ mca_coll_basic_neighbor_allgatherv_graph(const void *sbuf, int scount, struct om
ptrdiff_t lb, extent;
mca_topo_base_graph_neighbors_count (comm, rank, &degree);
if( 0 == degree ) return OMPI_SUCCESS;
edges = graph->edges;
if (rank > 0) {
@ -166,6 +169,7 @@ mca_coll_basic_neighbor_allgatherv_dist_graph(const void *sbuf, int scount, stru
indegree = dist_graph->indegree;
outdegree = dist_graph->outdegree;
if( 0 == (indegree + outdegree) ) return OMPI_SUCCESS;
inedges = dist_graph->in;
outedges = dist_graph->out;

Просмотреть файл

@ -46,6 +46,8 @@ mca_coll_basic_neighbor_alltoall_cart(const void *sbuf, int scount, struct ompi_
ptrdiff_t lb, rdextent, sdextent;
int rc = MPI_SUCCESS, dim, nreqs;
if( 0 == cart->ndims ) return OMPI_SUCCESS;
ompi_datatype_get_extent(rdtype, &lb, &rdextent);
ompi_datatype_get_extent(sdtype, &lb, &sdextent);
reqs = preqs = coll_base_comm_get_reqs( module->base_data, 4 * cart->ndims);
@ -146,6 +148,7 @@ mca_coll_basic_neighbor_alltoall_graph(const void *sbuf, int scount, struct ompi
const int *edges;
mca_topo_base_graph_neighbors_count (comm, rank, &degree);
if( 0 == degree ) return OMPI_SUCCESS;
edges = graph->edges;
if (rank > 0) {
@ -205,6 +208,7 @@ mca_coll_basic_neighbor_alltoall_dist_graph(const void *sbuf, int scount,struct
indegree = dist_graph->indegree;
outdegree = dist_graph->outdegree;
if( 0 == (indegree + outdegree) ) return OMPI_SUCCESS;
inedges = dist_graph->in;
outedges = dist_graph->out;

Просмотреть файл

@ -47,6 +47,8 @@ mca_coll_basic_neighbor_alltoallv_cart(const void *sbuf, const int scounts[], co
ptrdiff_t lb, rdextent, sdextent;
ompi_request_t **reqs, **preqs;
if( 0 == cart->ndims ) return OMPI_SUCCESS;
ompi_datatype_get_extent(rdtype, &lb, &rdextent);
ompi_datatype_get_extent(sdtype, &lb, &sdextent);
reqs = preqs = coll_base_comm_get_reqs( module->base_data, 4 * cart->ndims );
@ -133,6 +135,7 @@ mca_coll_basic_neighbor_alltoallv_graph(const void *sbuf, const int scounts[], c
const int *edges;
mca_topo_base_graph_neighbors_count (comm, rank, &degree);
if( 0 == degree ) return OMPI_SUCCESS;
edges = graph->edges;
if (rank > 0) {
@ -191,6 +194,7 @@ mca_coll_basic_neighbor_alltoallv_dist_graph(const void *sbuf, const int scounts
indegree = dist_graph->indegree;
outdegree = dist_graph->outdegree;
if( 0 == (indegree + outdegree) ) return OMPI_SUCCESS;
inedges = dist_graph->in;
outedges = dist_graph->out;