1
1

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.
Этот коммит содержится в:
Prabhanjan Kambadur 2004-10-07 19:14:27 +00:00
родитель ecd7ef0bb0
Коммит 4c9f883a9b
4 изменённых файлов: 8 добавлений и 6 удалений

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

@ -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). ** 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, 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 myinfo[2];
int size, my_size; int size, my_size;
@ -508,8 +508,10 @@ int ompi_comm_split ( ompi_communicator_t* comm, int color, int key,
rprocs, /* remote_procs */ rprocs, /* remote_procs */
NULL, /* attrs */ NULL, /* attrs */
comm->error_handler,/* error handler */ 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 ) { if ( OMPI_SUCCESS != rc ) {
goto exit; goto exit;
} }

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

@ -237,7 +237,7 @@ extern "C" {
* @ * @
*/ */
int ompi_comm_split ( ompi_communicator_t *comm, int color, int key, 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 * free a communicator

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

@ -80,7 +80,7 @@ int mca_topo_base_cart_sub (MPI_Comm comm,
/* /*
* Split the communicator. * 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) { if (errcode != MPI_SUCCESS) {
return errcode; 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, 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); OMPI_ERRHANDLER_RETURN ( rc, comm, rc, FUNC_NAME);
} }