#include "pmix_config.h"
#ifdef HAVE_UNISTD_H
# include "unistd.h"
#endif
#include "pmix_common.h"
#include "src/mca/base/pmix_base.h"
#include "src/mca/mca.h"
#include "src/mca/pcompress/base/base.h"
#include "src/util/pmix_output.h"
int pmix_compress_base_select(void)
{
int ret = PMIX_SUCCESS;
pmix_mca_base_component_t *best_component = NULL;
pmix_compress_base_module_t *best_module = NULL;
if (pmix_compress_base.selected) {
return PMIX_SUCCESS;
}
pmix_compress_base.selected = true;
if (PMIX_SUCCESS
!= pmix_mca_base_select("pcompress", pmix_pcompress_base_framework.framework_output,
&pmix_pcompress_base_framework.framework_components,
(pmix_mca_base_module_t **) &best_module,
(pmix_mca_base_component_t **) &best_component, NULL)) {
goto cleanup;
}
if (NULL != best_module) {
if (NULL != best_module->init) {
if (PMIX_SUCCESS != (ret = best_module->init())) {
goto cleanup;
}
}
pmix_compress = *best_module;
}
cleanup:
return ret;
}