Merge pull request #747 from hppritcha/topic/ofi_progress_fix
mtl/ofi: don't inline ofi progress method
Этот коммит содержится в:
Коммит
377bad18bd
@ -52,6 +52,8 @@ extern int ompi_mtl_ofi_del_procs(struct mca_mtl_base_module_t *mtl,
|
|||||||
size_t nprocs,
|
size_t nprocs,
|
||||||
struct ompi_proc_t **procs);
|
struct ompi_proc_t **procs);
|
||||||
|
|
||||||
|
int ompi_mtl_ofi_progress_no_inline(void);
|
||||||
|
|
||||||
__opal_attribute_always_inline__ static inline int
|
__opal_attribute_always_inline__ static inline int
|
||||||
ompi_mtl_ofi_progress(void)
|
ompi_mtl_ofi_progress(void)
|
||||||
{
|
{
|
||||||
@ -115,42 +117,7 @@ ompi_mtl_ofi_progress(void)
|
|||||||
|
|
||||||
|
|
||||||
/* MTL interface functions */
|
/* MTL interface functions */
|
||||||
__opal_attribute_always_inline__ static inline int
|
int ompi_mtl_ofi_finalize(struct mca_mtl_base_module_t *mtl);
|
||||||
ompi_mtl_ofi_finalize(struct mca_mtl_base_module_t *mtl)
|
|
||||||
{
|
|
||||||
opal_progress_unregister(ompi_mtl_ofi_progress);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Close all the OFI objects
|
|
||||||
*/
|
|
||||||
if (fi_close((fid_t)ompi_mtl_ofi.ep)) {
|
|
||||||
opal_output(ompi_mtl_base_framework.framework_output,
|
|
||||||
"fi_close failed: %s", strerror(errno));
|
|
||||||
abort();
|
|
||||||
}
|
|
||||||
if (fi_close((fid_t)ompi_mtl_ofi.cq)) {
|
|
||||||
opal_output(ompi_mtl_base_framework.framework_output,
|
|
||||||
"fi_close failed: %s", strerror(errno));
|
|
||||||
abort();
|
|
||||||
}
|
|
||||||
if (fi_close((fid_t)ompi_mtl_ofi.av)) {
|
|
||||||
opal_output(ompi_mtl_base_framework.framework_output,
|
|
||||||
"fi_close failed: %s", strerror(errno));
|
|
||||||
abort();
|
|
||||||
}
|
|
||||||
if (fi_close((fid_t)ompi_mtl_ofi.domain)) {
|
|
||||||
opal_output(ompi_mtl_base_framework.framework_output,
|
|
||||||
"fi_close failed: %s", strerror(errno));
|
|
||||||
abort();
|
|
||||||
}
|
|
||||||
if (fi_close((fid_t)ompi_mtl_ofi.fabric)) {
|
|
||||||
opal_output(ompi_mtl_base_framework.framework_output,
|
|
||||||
"fi_close failed: %s", strerror(errno));
|
|
||||||
abort();
|
|
||||||
}
|
|
||||||
|
|
||||||
return OMPI_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
__opal_attribute_always_inline__ static inline int
|
__opal_attribute_always_inline__ static inline int
|
||||||
ompi_mtl_ofi_get_error(int error_num)
|
ompi_mtl_ofi_get_error(int error_num)
|
||||||
|
@ -101,6 +101,11 @@ ompi_mtl_ofi_component_close(void)
|
|||||||
return OMPI_SUCCESS;
|
return OMPI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
ompi_mtl_ofi_progress_no_inline(void)
|
||||||
|
{
|
||||||
|
ompi_mtl_ofi_progress();
|
||||||
|
}
|
||||||
|
|
||||||
static mca_mtl_base_module_t*
|
static mca_mtl_base_module_t*
|
||||||
ompi_mtl_ofi_component_init(bool enable_progress_threads,
|
ompi_mtl_ofi_component_init(bool enable_progress_threads,
|
||||||
@ -338,7 +343,7 @@ ompi_mtl_ofi_component_init(bool enable_progress_threads,
|
|||||||
/**
|
/**
|
||||||
* Activate progress callback.
|
* Activate progress callback.
|
||||||
*/
|
*/
|
||||||
ret = opal_progress_register(ompi_mtl_ofi_progress);
|
ret = opal_progress_register(ompi_mtl_ofi_progress_no_inline);
|
||||||
if (OMPI_SUCCESS != ret) {
|
if (OMPI_SUCCESS != ret) {
|
||||||
opal_output_verbose(1, ompi_mtl_base_framework.framework_output,
|
opal_output_verbose(1, ompi_mtl_base_framework.framework_output,
|
||||||
"%s:%d: opal_progress_register failed: %d\n",
|
"%s:%d: opal_progress_register failed: %d\n",
|
||||||
@ -373,5 +378,42 @@ error:
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
ompi_mtl_ofi_finalize(struct mca_mtl_base_module_t *mtl)
|
||||||
|
{
|
||||||
|
opal_progress_unregister(ompi_mtl_ofi_progress_no_inline);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* * Close all the OFI objects
|
||||||
|
* */
|
||||||
|
if (fi_close((fid_t)ompi_mtl_ofi.ep)) {
|
||||||
|
opal_output(ompi_mtl_base_framework.framework_output,
|
||||||
|
"fi_close failed: %s", strerror(errno));
|
||||||
|
abort();
|
||||||
|
}
|
||||||
|
if (fi_close((fid_t)ompi_mtl_ofi.cq)) {
|
||||||
|
opal_output(ompi_mtl_base_framework.framework_output,
|
||||||
|
"fi_close failed: %s", strerror(errno));
|
||||||
|
abort();
|
||||||
|
}
|
||||||
|
if (fi_close((fid_t)ompi_mtl_ofi.av)) {
|
||||||
|
opal_output(ompi_mtl_base_framework.framework_output,
|
||||||
|
"fi_close failed: %s", strerror(errno));
|
||||||
|
abort();
|
||||||
|
}
|
||||||
|
if (fi_close((fid_t)ompi_mtl_ofi.domain)) {
|
||||||
|
opal_output(ompi_mtl_base_framework.framework_output,
|
||||||
|
"fi_close failed: %s", strerror(errno));
|
||||||
|
abort();
|
||||||
|
}
|
||||||
|
if (fi_close((fid_t)ompi_mtl_ofi.fabric)) {
|
||||||
|
opal_output(ompi_mtl_base_framework.framework_output,
|
||||||
|
"fi_close failed: %s", strerror(errno));
|
||||||
|
abort();
|
||||||
|
}
|
||||||
|
|
||||||
|
return OMPI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user