Changing the logic in ompi_comm_split to pass on the topo information only when required. Also had to change other files to go along wit this. Tested the intel test suites (relevant tests ... MPI_Cart_sub_c MPI_Comm_split1_c MPI_Comm_split2_c ... everything seems to work fine
This commit was SVN r2982.
Этот коммит содержится в:
родитель
ecd7ef0bb0
Коммит
4c9f883a9b
@ -340,7 +340,7 @@ int ompi_comm_create ( ompi_communicator_t *comm, ompi_group_t *group,
|
||||
** Counterpart to MPI_Comm_split. To be used within OMPI (e.g. MPI_Cart_sub).
|
||||
*/
|
||||
int ompi_comm_split ( ompi_communicator_t* comm, int color, int key,
|
||||
ompi_communicator_t **newcomm )
|
||||
ompi_communicator_t **newcomm, bool pass_on_topo )
|
||||
{
|
||||
int myinfo[2];
|
||||
int size, my_size;
|
||||
@ -508,8 +508,10 @@ int ompi_comm_split ( ompi_communicator_t* comm, int color, int key,
|
||||
rprocs, /* remote_procs */
|
||||
NULL, /* attrs */
|
||||
comm->error_handler,/* error handler */
|
||||
(mca_base_component_t *)comm->c_topo_component /* topo component */
|
||||
);
|
||||
(pass_on_topo)?
|
||||
(mca_base_component_t *)comm->c_topo_component:
|
||||
NULL); /* topo component */
|
||||
|
||||
if ( OMPI_SUCCESS != rc ) {
|
||||
goto exit;
|
||||
}
|
||||
|
@ -237,7 +237,7 @@ extern "C" {
|
||||
* @
|
||||
*/
|
||||
int ompi_comm_split ( ompi_communicator_t *comm, int color, int key,
|
||||
ompi_communicator_t** newcomm );
|
||||
ompi_communicator_t** newcomm, bool pass_on_topo);
|
||||
|
||||
/**
|
||||
* free a communicator
|
||||
|
@ -80,7 +80,7 @@ int mca_topo_base_cart_sub (MPI_Comm comm,
|
||||
/*
|
||||
* Split the communicator.
|
||||
*/
|
||||
errcode = ompi_comm_split (comm, colour, key, &temp_comm);
|
||||
errcode = ompi_comm_split (comm, colour, key, &temp_comm, true);
|
||||
if (errcode != MPI_SUCCESS) {
|
||||
return errcode;
|
||||
}
|
||||
|
@ -43,6 +43,6 @@ int MPI_Comm_split(MPI_Comm comm, int color, int key, MPI_Comm *newcomm) {
|
||||
}
|
||||
|
||||
rc = ompi_comm_split ( (ompi_communicator_t*)comm, color, key,
|
||||
(ompi_communicator_t**)newcomm );
|
||||
(ompi_communicator_t**)newcomm, false);
|
||||
OMPI_ERRHANDLER_RETURN ( rc, comm, rc, FUNC_NAME);
|
||||
}
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user