39a6057fc6
* General TCP cleanup for OPAL / ORTE * Simplifying the OOB by moving much of the logic into the RML * Allowing the OOB RML component to do routing of messages * Adding a component framework for handling routing tables * Moving the xcast functionality from the OOB base to its own framework Includes merge from tmp/bwb-oob-rml-merge revisions: r15506, r15507, r15508, r15510, r15511, r15512, r15513 This commit was SVN r15528. The following SVN revisions from the original message are invalid or inconsistent and therefore were not cross-referenced: r15506 r15507 r15508 r15510 r15511 r15512 r15513
76 строки
1.6 KiB
C
76 строки
1.6 KiB
C
/*
|
|
* $COPYRIGHT$
|
|
*
|
|
* Additional copyrights may follow
|
|
*
|
|
* $HEADER$
|
|
*/
|
|
|
|
#include "orte_config.h"
|
|
|
|
#include "rml_oob.h"
|
|
|
|
#include "opal/util/argv.h"
|
|
#include "orte/mca/oob/oob.h"
|
|
#include "orte/mca/oob/base/base.h"
|
|
#include "orte/mca/ns/ns.h"
|
|
#include "orte/mca/errmgr/errmgr.h"
|
|
#include "orte/mca/rml/base/rml_contact.h"
|
|
|
|
char*
|
|
orte_rml_oob_get_uri(void)
|
|
{
|
|
char *proc_name = NULL;
|
|
char *proc_addr = NULL;
|
|
char *contact_info = NULL;
|
|
int rc;
|
|
|
|
proc_addr = orte_rml_oob_module.active_oob->oob_get_addr();
|
|
if (NULL == proc_addr) return NULL;
|
|
|
|
if (ORTE_SUCCESS != (rc = orte_ns.get_proc_name_string(&proc_name,
|
|
orte_process_info.my_name))) {
|
|
ORTE_ERROR_LOG(rc);
|
|
return NULL;
|
|
}
|
|
if (0 > asprintf(&contact_info, "%s;%s", proc_name, proc_addr)) {
|
|
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
|
|
}
|
|
free(proc_name);
|
|
free(proc_addr);
|
|
return contact_info;
|
|
}
|
|
|
|
|
|
int
|
|
orte_rml_oob_set_uri(const char* uri)
|
|
{
|
|
orte_process_name_t name;
|
|
char** uris;
|
|
char** ptr;
|
|
int rc = orte_rml_base_parse_uris(uri, &name, &uris);
|
|
if(rc != ORTE_SUCCESS)
|
|
return rc;
|
|
|
|
for(ptr = uris; ptr != NULL && *ptr != NULL; ptr++) {
|
|
orte_rml_oob_module.active_oob->oob_set_addr(&name, *ptr);
|
|
}
|
|
|
|
if(uris != NULL) {
|
|
opal_argv_free(uris);
|
|
}
|
|
return ORTE_SUCCESS;
|
|
}
|
|
|
|
|
|
int
|
|
orte_rml_oob_get_new_name(orte_process_name_t *name)
|
|
{
|
|
if (NULL != ORTE_PROC_MY_NAME) {
|
|
return ORTE_ERR_NOT_SUPPORTED;
|
|
}
|
|
|
|
return orte_rml_oob_module.active_oob->oob_get_new_name(name);
|
|
|
|
}
|