1
1

For the reduce function request the size of the communicator prior to allocating memory as the size is used for that.

This commit was SVN r1515.
Этот коммит содержится в:
George Bosilca 2004-06-30 16:32:02 +00:00
родитель 11da941d0c
Коммит b9c7b24a3c

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

@ -263,6 +263,13 @@ int mca_coll_basic_reduce_log_intra(void *sbuf, void *rbuf, int count,
void *inmsg;
void *resmsg;
/* Some variables */
size = ompi_comm_size(comm);
rank = ompi_comm_rank(comm);
vrank = ompi_op_is_commute(op) ? (rank - root + size) % size : rank;
dim = comm->c_cube_dim;
/* Allocate the incoming and resulting message buffers. See lengthy
rationale above. */
@ -279,13 +286,6 @@ int mca_coll_basic_reduce_log_intra(void *sbuf, void *rbuf, int count,
pml_buffer2 = free_buffer - lb;
}
/* Some variables */
size = ompi_comm_size(comm);
rank = ompi_comm_rank(comm);
vrank = ompi_op_is_commute(op) ? (rank - root + size) % size : rank;
dim = comm->c_cube_dim;
/* Loop over cube dimensions. High processes send to low ones in the
dimension. */