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.
|
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"
|
|
|
|
#include "opal/mca/mca.h"
|
|
|
|
#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
|
|
|
|
|
|
|
opal_list_t mca_vprotocol_base_components_available;
|
2007-09-12 20:47:17 +00:00
|
|
|
char *mca_vprotocol_base_include_list;
|
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
|
|
|
|
|
|
|
/* Load any vprotocol MCA component and call open function of all those
|
|
|
|
* components.
|
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
|
|
|
*/
|
2007-09-12 20:47:17 +00:00
|
|
|
int mca_vprotocol_base_open(char *vprotocol_include_list)
|
2007-08-16 05:52:30 +00:00
|
|
|
{
|
|
|
|
OBJ_CONSTRUCT(&mca_vprotocol_base_components_available, opal_list_t);
|
2007-09-12 20:47:17 +00:00
|
|
|
mca_vprotocol_base_include_list = vprotocol_include_list;
|
2010-10-22 05:12:12 +00:00
|
|
|
if (NULL == mca_vprotocol_base_include_list ||
|
|
|
|
mca_vprotocol_base_include_list[0] == 0) {
|
|
|
|
return OMPI_SUCCESS;
|
|
|
|
}
|
2007-08-16 05:52:30 +00:00
|
|
|
return mca_base_components_open("vprotocol", 0,
|
|
|
|
mca_vprotocol_base_static_components,
|
|
|
|
&mca_vprotocol_base_components_available,
|
|
|
|
true);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Close and unload any vprotocol MCA component loaded.
|
|
|
|
*/
|
|
|
|
int mca_vprotocol_base_close(void)
|
|
|
|
{
|
|
|
|
int ret;
|
2008-06-09 20:38:44 +00:00
|
|
|
ret = mca_base_components_close(mca_pml_v.output,
|
2007-08-16 05:52:30 +00:00
|
|
|
&mca_vprotocol_base_components_available,
|
|
|
|
NULL);
|
2009-02-13 03:45:11 +00:00
|
|
|
if (NULL != mca_vprotocol_base_include_list) {
|
|
|
|
free(mca_vprotocol_base_include_list);
|
|
|
|
}
|
2007-08-16 05:52:30 +00:00
|
|
|
OBJ_DESTRUCT(&mca_vprotocol_base_components_available);
|
|
|
|
return ret;
|
|
|
|
}
|