Seperate finalize and close for the PML, this gives the PML a chance to complete any outstanding operations prior to close. Before this change we just called pml_finalize in pml_close which causes problems if there are outstanding events that a BTL/MTL needs to progress during finalize. The problem is that MPI_COMM_WORLD and others were destroyed prior to closing the PML, pml_close would call pml_finalize, events would progress in the BTL, and these events expected MPI_COMM_WORLD to still be around..
This commit was SVN r16405.
Этот коммит содержится в:
родитель
c15047b264
Коммит
62ade993ca
@ -51,6 +51,8 @@ OMPI_DECLSPEC int mca_pml_base_pml_check_selected(const char *my_pml,
|
||||
struct ompi_proc_t **procs,
|
||||
size_t nprocs);
|
||||
|
||||
OMPI_DECLSPEC int mca_pml_base_finalize(void);
|
||||
|
||||
OMPI_DECLSPEC int mca_pml_base_close(void);
|
||||
|
||||
OMPI_DECLSPEC int mca_pml_base_ft_event(int state);
|
||||
|
@ -28,6 +28,15 @@
|
||||
#include "ompi/mca/pml/base/pml_base_request.h"
|
||||
#include "opal/runtime/opal_progress.h"
|
||||
|
||||
|
||||
int mca_pml_base_finalize(void) {
|
||||
if (NULL != mca_pml_base_selected_component.pmlm_finalize) {
|
||||
return mca_pml_base_selected_component.pmlm_finalize();
|
||||
}
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
int mca_pml_base_close(void)
|
||||
{
|
||||
/* turn off the progress code for the pml */
|
||||
@ -46,10 +55,7 @@ int mca_pml_base_close(void)
|
||||
OBJ_DESTRUCT(&mca_pml_base_recv_requests);
|
||||
|
||||
mca_pml.pml_progress = mca_pml_base_progress;
|
||||
if (NULL != mca_pml_base_selected_component.pmlm_finalize) {
|
||||
mca_pml_base_selected_component.pmlm_finalize();
|
||||
}
|
||||
|
||||
|
||||
OBJ_DESTRUCT(&mca_pml_base_pml);
|
||||
|
||||
/* Close all remaining available modules (may be one if this is a
|
||||
|
@ -183,6 +183,10 @@ int ompi_mpi_finalize(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* free pml resource */
|
||||
if(OMPI_SUCCESS != (ret = mca_pml_base_finalize())) {
|
||||
return ret;
|
||||
}
|
||||
/* free communicator resources */
|
||||
if (OMPI_SUCCESS != (ret = ompi_comm_finalize())) {
|
||||
return ret;
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user