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.
Этот коммит содержится в:
родитель
11da941d0c
Коммит
b9c7b24a3c
@ -263,6 +263,13 @@ int mca_coll_basic_reduce_log_intra(void *sbuf, void *rbuf, int count,
|
|||||||
void *inmsg;
|
void *inmsg;
|
||||||
void *resmsg;
|
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
|
/* Allocate the incoming and resulting message buffers. See lengthy
|
||||||
rationale above. */
|
rationale above. */
|
||||||
|
|
||||||
@ -279,13 +286,6 @@ int mca_coll_basic_reduce_log_intra(void *sbuf, void *rbuf, int count,
|
|||||||
pml_buffer2 = free_buffer - lb;
|
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
|
/* Loop over cube dimensions. High processes send to low ones in the
|
||||||
dimension. */
|
dimension. */
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user