1
1

issue with bml init/fin for yoda component

bml can be initialized by not yoda component and in this case yoda should not
call bml finalization.

This commit was SVN r29458.
Этот коммит содержится в:
Mike Dubman 2013-10-22 06:13:00 +00:00
родитель 25a84c7f0a
Коммит c33d5c0b59
4 изменённых файлов: 16 добавлений и 3 удалений

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

@ -137,7 +137,7 @@ static int mca_spml_base_open(mca_base_open_flag_t flags)
if( (NULL == default_spml || NULL == default_spml[0] ||
0 == strlen(default_spml[0])) || (default_spml[0][0] == '^') ) {
#ifdef OSHMEM_HAS_IKRIT
#if OSHMEM_HAS_IKRIT
opal_pointer_array_add(&mca_spml_base_spml, strdup("ikrit"));
#endif
opal_pointer_array_add(&mca_spml_base_spml, strdup("yoda"));

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

@ -311,6 +311,11 @@ static int mca_spml_ikrit_component_fini(void)
if (NULL != mca_spml_ikrit.mxm_ep) {
mxm_ep_destroy(mca_spml_ikrit.mxm_ep);
}
if(!mca_spml_ikrit.enabled)
return OSHMEM_SUCCESS; /* never selected.. return success.. */
mca_spml_ikrit.enabled = false; /* not anymore */
return OSHMEM_SUCCESS;
}

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

@ -74,6 +74,7 @@ struct mca_spml_yoda_t {
/* number of outstanding put requests */
int32_t n_active_puts;
bool enabled;
bool force_bml;
struct yoda_btl *btl_type_map;
int n_btls;
};

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

@ -112,13 +112,15 @@ mca_spml_yoda_component_init(int* priority,
}
/* We use BML/BTL and need to start it */
mca_spml_yoda.force_bml = false;
if (!mca_bml_base_inited()) {
SPML_VERBOSE(10, "starting bml\n");
if (OSHMEM_SUCCESS
if (OMPI_SUCCESS
!= mca_bml_base_init(enable_progress_threads,
enable_mpi_threads)) {
return NULL ;
}
mca_spml_yoda.force_bml = true;
}
mca_spml_yoda.n_active_puts = 0;
@ -131,9 +133,14 @@ int mca_spml_yoda_component_fini(void)
int rc;
/* Shutdown BML */
if (OMPI_SUCCESS != (rc = mca_bml.bml_finalize()))
if ((mca_spml_yoda.force_bml == true) &&
(OMPI_SUCCESS != (rc = mca_bml.bml_finalize())))
return rc;
if(!mca_spml_yoda.enabled)
return OSHMEM_SUCCESS; /* never selected.. return success.. */
mca_spml_yoda.enabled = false; /* not anymore */
OBJ_DESTRUCT(&mca_spml_yoda.lock);
#if OSHMEM_WAIT_COMPLETION_DEBUG == 1
condition_dbg_finalize();