2007-08-16 05:52:30 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2004-2007 The Trustees of the University of Tennessee.
|
|
|
|
* All rights reserved.
|
2009-02-13 03:45:11 +00:00
|
|
|
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
|
2015-06-23 20:59:57 -07:00
|
|
|
* Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved.
|
2015-05-08 09:19:02 +09:00
|
|
|
* Copyright (c) 2015 Research Organization for Information Science
|
|
|
|
* and Technology (RIST). All rights reserved.
|
2007-08-16 05:52:30 +00:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
2008-01-05 00:17:32 +00:00
|
|
|
|
|
|
|
#include "ompi_config.h"
|
2007-08-16 05:52:30 +00:00
|
|
|
#include "base.h"
|
2015-03-05 20:50:44 -07:00
|
|
|
#include "ompi/mca/mca.h"
|
2007-08-16 05:52:30 +00:00
|
|
|
#include "opal/mca/base/base.h"
|
2010-09-17 23:04:06 +00:00
|
|
|
#include "ompi/mca/vprotocol/base/static-components.h"
|
2007-08-16 05:52:30 +00:00
|
|
|
|
2015-05-08 09:19:02 +09:00
|
|
|
char *mca_vprotocol_base_include_list = NULL;
|
2010-10-22 05:12:12 +00:00
|
|
|
mca_pml_v_t mca_pml_v = {-1, 0, 0};
|
2007-08-16 05:52:30 +00:00
|
|
|
|
2015-06-23 20:59:57 -07:00
|
|
|
/* Load any vprotocol MCA component and call open function of all those
|
2007-08-16 05:52:30 +00:00
|
|
|
* components.
|
2015-06-23 20:59:57 -07:00
|
|
|
*
|
2007-09-12 20:47:17 +00:00
|
|
|
* Also fill the mca_vprotocol_base_include_list with components that exists
|
2007-08-16 05:52:30 +00:00
|
|
|
*/
|
2013-03-27 21:17:31 +00:00
|
|
|
|
|
|
|
static int mca_vprotocol_base_open(mca_base_open_flag_t flags)
|
2007-08-16 05:52:30 +00:00
|
|
|
{
|
2013-03-27 21:17:31 +00:00
|
|
|
if (NULL == mca_vprotocol_base_include_list) {
|
2010-10-22 05:12:12 +00:00
|
|
|
return OMPI_SUCCESS;
|
|
|
|
}
|
2012-11-06 20:06:54 +00:00
|
|
|
|
2013-03-27 21:17:31 +00:00
|
|
|
return mca_base_framework_components_open(&ompi_vprotocol_base_framework, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
void mca_vprotocol_base_set_include_list(char *vprotocol_include_list)
|
|
|
|
{
|
|
|
|
mca_vprotocol_base_include_list = NULL;
|
|
|
|
|
|
|
|
if (NULL != vprotocol_include_list && vprotocol_include_list[0] != '\0') {
|
|
|
|
mca_vprotocol_base_include_list = strdup (vprotocol_include_list);
|
|
|
|
}
|
2007-08-16 05:52:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Close and unload any vprotocol MCA component loaded.
|
|
|
|
*/
|
2013-03-27 21:17:31 +00:00
|
|
|
static int mca_vprotocol_base_close(void)
|
2007-08-16 05:52:30 +00:00
|
|
|
{
|
2009-02-13 03:45:11 +00:00
|
|
|
if (NULL != mca_vprotocol_base_include_list) {
|
|
|
|
free(mca_vprotocol_base_include_list);
|
|
|
|
}
|
2013-03-27 21:17:31 +00:00
|
|
|
|
|
|
|
return mca_base_framework_components_close(&ompi_vprotocol_base_framework, NULL);;
|
2007-08-16 05:52:30 +00:00
|
|
|
}
|
2013-03-27 21:17:31 +00:00
|
|
|
|
|
|
|
MCA_BASE_FRAMEWORK_DECLARE(ompi, vprotocol, "OMPI Vprotocol", NULL,
|
|
|
|
mca_vprotocol_base_open, mca_vprotocol_base_close,
|
|
|
|
mca_vprotocol_base_static_components, 0);
|
|
|
|
|