2004-07-02 01:24:53 +00:00
|
|
|
/*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "ompi_config.h"
|
|
|
|
|
|
|
|
#include "mca/mca.h"
|
|
|
|
#include "mca/base/base.h"
|
2004-07-12 02:44:25 +00:00
|
|
|
#include "util/output.h"
|
2004-07-02 01:24:53 +00:00
|
|
|
#include "mca/ns/base/base.h"
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The following file was created by configure. It contains extern
|
|
|
|
* statements and the definition of an array of pointers to each
|
2004-07-11 04:34:47 +00:00
|
|
|
* component's public mca_base_module_t struct.
|
2004-07-02 01:24:53 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "mca/ns/base/static-modules.h"
|
|
|
|
|
2004-07-11 02:31:30 +00:00
|
|
|
/*
|
|
|
|
* globals
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* constructor - used to initialize state of name instance */
|
|
|
|
static void ompi_name_construct(ompi_process_name_t* name)
|
|
|
|
{
|
|
|
|
name->cellid = 0;
|
|
|
|
name->jobid = 0;
|
|
|
|
name->vpid = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* destructor - used to free any resources held by instance */
|
|
|
|
static void ompi_name_destructor(ompi_process_name_t* name)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
OBJ_CLASS_INSTANCE(
|
|
|
|
ompi_process_name_t, /* type name */
|
|
|
|
ompi_object_t, /* parent "class" name */
|
|
|
|
ompi_name_construct, /* constructor */
|
|
|
|
ompi_name_destructor); /* destructor */
|
|
|
|
|
2004-07-02 01:24:53 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Global variables
|
|
|
|
*/
|
|
|
|
int mca_ns_base_output = -1;
|
|
|
|
mca_ns_t ompi_name_server;
|
2004-07-13 11:56:26 +00:00
|
|
|
ompi_process_name_t mca_ns_my_replica;
|
2004-07-11 04:34:47 +00:00
|
|
|
bool mca_ns_base_selected = false;
|
|
|
|
ompi_list_t mca_ns_base_components_available;
|
|
|
|
mca_ns_base_component_t mca_ns_base_selected_component;
|
2004-07-02 01:24:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
2004-07-11 04:34:47 +00:00
|
|
|
* Function for finding and opening either all MCA components, or the one
|
2004-07-02 01:24:53 +00:00
|
|
|
* that was specifically requested via a MCA parameter.
|
|
|
|
*/
|
|
|
|
int mca_ns_base_open(void)
|
|
|
|
{
|
2004-07-08 12:43:30 +00:00
|
|
|
|
2004-07-11 04:34:47 +00:00
|
|
|
/* Open up all available components */
|
2004-07-02 01:24:53 +00:00
|
|
|
|
|
|
|
if (OMPI_SUCCESS !=
|
|
|
|
mca_base_modules_open("ns", 0, mca_ns_base_static_modules,
|
2004-07-11 04:34:47 +00:00
|
|
|
&mca_ns_base_components_available)) {
|
2004-07-02 01:24:53 +00:00
|
|
|
return OMPI_ERROR;
|
|
|
|
}
|
|
|
|
|
2004-07-12 02:44:25 +00:00
|
|
|
/* setup output for debug messages */
|
|
|
|
if (!ompi_output_init) { /* can't open output */
|
|
|
|
return OMPI_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
mca_ns_base_output = ompi_output_open(NULL);
|
|
|
|
|
2004-07-02 01:24:53 +00:00
|
|
|
/* All done */
|
|
|
|
|
|
|
|
return OMPI_SUCCESS;
|
|
|
|
}
|