ompi_proc_finalize has an interesting side effect. A proc is
inserted in the ompi_proc_list as soon as it is created and it is removed only upon the call to the destructor. In ompi_proc_finalize we loop over all procs in ompi_proc_finalize and release them once. However, as a proc is not removed from this list right away, we decrease the ref count for each proc until it reach zero and the proc is finally removed. Thus, we cannot clean the BML/BTL after the call the ompi_proc_finalize. A quick fix is to delay the call to ompi_proc_finalize until all other frameworks have been finalized, and then the behavior depicted above will give the expected outcome.
Этот коммит содержится в:
родитель
71605d2763
Коммит
dee243c58d
@ -341,11 +341,6 @@ int ompi_mpi_finalize(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* free proc resources */
|
||||
if ( OMPI_SUCCESS != (ret = ompi_proc_finalize())) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* finalize the pubsub functions */
|
||||
if (OMPI_SUCCESS != (ret = mca_base_framework_close(&ompi_pubsub_base_framework) ) ) {
|
||||
return ret;
|
||||
@ -420,6 +415,11 @@ int ompi_mpi_finalize(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* free proc resources */
|
||||
if ( OMPI_SUCCESS != (ret = ompi_proc_finalize())) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (NULL != ompi_mpi_main_thread) {
|
||||
OBJ_RELEASE(ompi_mpi_main_thread);
|
||||
ompi_mpi_main_thread = NULL;
|
||||
|
@ -84,8 +84,8 @@ void mca_btl_tcp_proc_destruct(mca_btl_tcp_proc_t* tcp_proc)
|
||||
opal_proc_table_remove_value(&mca_btl_tcp_component.tcp_procs,
|
||||
tcp_proc->proc_opal->proc_name);
|
||||
OPAL_THREAD_UNLOCK(&mca_btl_tcp_component.tcp_lock);
|
||||
/* Do not OBJ_RELEASE the proc_opal ! */
|
||||
/* OBJ_RELEASE(tcp_proc->proc_opal); */
|
||||
OBJ_RELEASE(tcp_proc->proc_opal);
|
||||
tcp_proc->proc_opal = NULL;
|
||||
}
|
||||
/* release resources */
|
||||
if(NULL != tcp_proc->proc_endpoints) {
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user