move the coll_base_comm_select functions after dpm has been opened and
selected, but before we check whether we have been spawned. This is necessary in order for the hierarch collective component to work. This component might create new communicators already in MPI_Init(), which then have to execute the dpm.mark_dyncomm function. If dpm is not initialized at that point, we segfault. This commit was SVN r18045.
Этот коммит содержится в:
родитель
f3936ff9bc
Коммит
f7c8bb78fd
@ -577,19 +577,6 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided)
|
|||||||
MCA_PML_CALL(add_comm(&ompi_mpi_comm_world));
|
MCA_PML_CALL(add_comm(&ompi_mpi_comm_world));
|
||||||
MCA_PML_CALL(add_comm(&ompi_mpi_comm_self));
|
MCA_PML_CALL(add_comm(&ompi_mpi_comm_self));
|
||||||
|
|
||||||
/* Init coll for the comms */
|
|
||||||
|
|
||||||
if (OMPI_SUCCESS !=
|
|
||||||
(ret = mca_coll_base_comm_select(MPI_COMM_WORLD))) {
|
|
||||||
error = "mca_coll_base_comm_select(MPI_COMM_WORLD) failed";
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (OMPI_SUCCESS !=
|
|
||||||
(ret = mca_coll_base_comm_select(MPI_COMM_SELF))) {
|
|
||||||
error = "mca_coll_base_comm_select(MPI_COMM_SELF) failed";
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Dump all MCA parameters if requested
|
* Dump all MCA parameters if requested
|
||||||
@ -663,6 +650,24 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided)
|
|||||||
error = "ompi_dpm_base_select() failed";
|
error = "ompi_dpm_base_select() failed";
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Init coll for the comms. This has to be after dpm_base_select,
|
||||||
|
(since dpm.mark_dyncomm is not set in the communicator creation
|
||||||
|
function else), but before dpm.dyncom_init, since this function
|
||||||
|
might require collective for the CID allocation. */
|
||||||
|
if (OMPI_SUCCESS !=
|
||||||
|
(ret = mca_coll_base_comm_select(MPI_COMM_WORLD))) {
|
||||||
|
error = "mca_coll_base_comm_select(MPI_COMM_WORLD) failed";
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (OMPI_SUCCESS !=
|
||||||
|
(ret = mca_coll_base_comm_select(MPI_COMM_SELF))) {
|
||||||
|
error = "mca_coll_base_comm_select(MPI_COMM_SELF) failed";
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Check whether we have been spawned or not. We introduce that
|
/* Check whether we have been spawned or not. We introduce that
|
||||||
at the very end, since we need collectives, datatypes, ptls
|
at the very end, since we need collectives, datatypes, ptls
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user