Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 0 additions & 29 deletions opal/mca/pmix/native/pmix_native.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ const opal_pmix_base_module_t opal_pmix_native_module = {
// local variables
static int init_cntr = 0;
opal_process_name_t native_pname;
static char *local_uri = NULL;
static uint32_t sm_flag;

static void unpack_segment_info(opal_buffer_t *buf, opal_process_name_t *id, char** seg_info)
Expand Down Expand Up @@ -437,12 +436,6 @@ static int native_put(opal_pmix_scope_t scope,
}
}

/* if this is our uri, save it as we need to send it to our server
* as a special, separate item */
if (0 == strcmp(OPAL_DSTORE_URI, kv->key)) {
local_uri = strdup(kv->data.string);
}

/* have to save a copy locally as some of our components will
* look for it */
(void)opal_dstore.store(opal_dstore_internal, &OPAL_PROC_MY_NAME, kv);
Expand Down Expand Up @@ -493,17 +486,6 @@ static int native_fence(opal_process_name_t *procs, size_t nprocs)
return rc;
}
}
/* provide our URI */
if (OPAL_SUCCESS != (rc = opal_dss.pack(msg, &local_uri, 1, OPAL_STRING))) {
OPAL_ERROR_LOG(rc);
OBJ_RELEASE(msg);
return rc;
}
/* only do it once */
if (NULL != local_uri) {
free(local_uri);
local_uri = NULL;
}

/* pack 1 if we have sm dstore enabled, 0 otherwise */
if (OPAL_SUCCESS != (rc = opal_dss.pack(msg, &sm_flag, 1, OPAL_UINT32))) {
Expand Down Expand Up @@ -757,17 +739,6 @@ static int native_fence_nb(opal_process_name_t *procs, size_t nprocs,
return rc;
}
}
/* provide our URI */
if (OPAL_SUCCESS != (rc = opal_dss.pack(msg, &local_uri, 1, OPAL_STRING))) {
OPAL_ERROR_LOG(rc);
OBJ_RELEASE(msg);
return rc;
}
/* only do it once */
if (NULL != local_uri) {
free(local_uri);
local_uri = NULL;
}

/* pack 1 if we have sm dstore enabled, 0 otherwise */
if (OPAL_SUCCESS != (rc = opal_dss.pack(msg, &sm_flag, 1, OPAL_UINT32))) {
Expand Down
7 changes: 3 additions & 4 deletions orte/mca/dfs/app/dfs_app.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Copyright (c) 2012-2013 Los Alamos National Security, LLC.
* All rights reserved.
* Copyright (c) 2014 Intel, Inc. All rights reserved
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved
* Copyright (c) 2014 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
Expand Down Expand Up @@ -33,6 +33,7 @@

#include "orte/util/error_strings.h"
#include "orte/util/name_fns.h"
#include "orte/util/proc_info.h"
#include "orte/util/show_help.h"
#include "orte/runtime/orte_globals.h"
#include "orte/mca/errmgr/errmgr.h"
Expand Down Expand Up @@ -537,9 +538,7 @@ static void process_opens(int fd, short args, void *cbdata)
}

/* if the host is our own, then treat it as a local file */
if (0 == strcmp(host, orte_process_info.nodename) ||
0 == strcmp(host, "localhost") ||
opal_ifislocal(host)) {
if (orte_ifislocal(host)) {
opal_output_verbose(1, orte_dfs_base_framework.framework_output,
"%s file %s on local host",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
Expand Down
8 changes: 3 additions & 5 deletions orte/mca/dfs/orted/dfs_orted.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/*
* Copyright (c) 2012-2013 Los Alamos National Security, LLC.
* All rights reserved.
* Copyright (c) 2013 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2013 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2015 Intel, Inc. All rights reserved
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -329,10 +330,7 @@ static void process_opens(int fd, short args, void *cbdata)
goto complete;
}
/* if the host is our own, then treat it as a local file */
if (NULL == host ||
0 == strcmp(host, orte_process_info.nodename) ||
0 == strcmp(host, "localhost") ||
opal_ifislocal(host)) {
if (NULL == host || orte_ifislocal(host)) {
opal_output_verbose(1, orte_dfs_base_framework.framework_output,
"%s file %s on local host",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
Expand Down
41 changes: 22 additions & 19 deletions orte/mca/ess/pmi/ess_pmi_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,28 +232,31 @@ static int rte_init(void)

/*** PUSH DATA FOR OTHERS TO FIND ***/

/* if our URI was not provided by the system, then
* push our URI so others can find us */
OBJ_CONSTRUCT(&vals, opal_list_t);
if (OPAL_SUCCESS != opal_dstore.fetch(opal_dstore_internal, &OPAL_PROC_MY_NAME,
OPAL_DSTORE_URI, &vals)) {
/* construct the RTE string */
rmluri = orte_rml.get_contact_info();
/* push it out for others to use */
OBJ_CONSTRUCT(&kvn, opal_value_t);
kvn.key = strdup(OPAL_DSTORE_URI);
kvn.type = OPAL_STRING;
kvn.data.string = strdup(rmluri);
if (ORTE_SUCCESS != (ret = opal_pmix.put(PMIX_GLOBAL, &kvn))) {
error = "db store uri";
/* if we are direct launched, then push our RML URI - there
* is no need to do so when launched by mpirun as all apps
* communicate thru their local daemon */
if (orte_standalone_operation) {
OBJ_CONSTRUCT(&vals, opal_list_t);
if (OPAL_SUCCESS != opal_dstore.fetch(opal_dstore_internal, &OPAL_PROC_MY_NAME,
OPAL_DSTORE_URI, &vals)) {
/* construct the RTE string */
rmluri = orte_rml.get_contact_info();
/* push it out for others to use */
OBJ_CONSTRUCT(&kvn, opal_value_t);
kvn.key = strdup(OPAL_DSTORE_URI);
kvn.type = OPAL_STRING;
kvn.data.string = strdup(rmluri);
if (ORTE_SUCCESS != (ret = opal_pmix.put(PMIX_GLOBAL, &kvn))) {
error = "db store uri";
OBJ_DESTRUCT(&kvn);
goto error;
}
OBJ_DESTRUCT(&kvn);
goto error;
free(rmluri);
}
OBJ_DESTRUCT(&kvn);
free(rmluri);
OPAL_LIST_DESTRUCT(&vals);
}
OPAL_LIST_DESTRUCT(&vals);


/* push our hostname so others can find us, if they need to */
OBJ_CONSTRUCT(&kvn, opal_value_t);
kvn.key = strdup(OPAL_DSTORE_HOSTNAME);
Expand Down
21 changes: 6 additions & 15 deletions orte/mca/oob/tcp/oob_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,16 +216,14 @@ static void accept_connection(const int accepted_fd,
ORTE_ACTIVATE_TCP_ACCEPT_STATE(accepted_fd, addr, recv_handler);
}

/* the host in this case is always in "dot" notation, and
* thus we do not need to do a DNS lookup to convert it */
static int parse_uri(const uint16_t af_family,
const char* host,
const char *port,
struct sockaddr* inaddr)
{
struct sockaddr_in *in;
#if OPAL_ENABLE_IPV6
struct addrinfo hints, *res;
int ret;
#endif

if (AF_INET == af_family) {
memset(inaddr, 0, sizeof(struct sockaddr_in));
Expand All @@ -239,21 +237,14 @@ static int parse_uri(const uint16_t af_family,
}
#if OPAL_ENABLE_IPV6
else if (AF_INET6 == af_family) {
size_t len;
struct sockaddr_in6 *in6;
memset(inaddr, 0, sizeof(struct sockaddr_in6));
memset(&hints, 0, sizeof(hints));
hints.ai_family = af_family;
hints.ai_socktype = SOCK_STREAM;
ret = getaddrinfo(host, NULL, &hints, &res);
in6 = (struct sockaddr_in6*) inaddr;

if (ret) {
opal_output (0, "oob_tcp_parse_uri: Could not resolve %s. [Error: %s]\n",
host, gai_strerror (ret));
if (0 == inet_pton(AF_INET6, host, (void*)&in6->sin6_addr)) {
opal_output (0, "oob_tcp_parse_uri: Could not convert %s\n", host);
return ORTE_ERR_BAD_PARAM;
}
len = (res->ai_addrlen < sizeof(struct sockaddr_in6)) ? res->ai_addrlen : sizeof(struct sockaddr_in6);
memcpy(inaddr, res->ai_addr, len);
freeaddrinfo(res);
}
#endif
else {
Expand Down
6 changes: 6 additions & 0 deletions orte/mca/oob/tcp/oob_tcp_component.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,12 @@ static bool component_available(void)
opal_output_verbose(5, orte_oob_base_framework.framework_output,
"oob:tcp: component_available called");

/* if we are an APP and we are not direct launched,
* then we don't want to be considered */
if (ORTE_PROC_IS_APP && !orte_standalone_operation) {
return false;
}

/* if interface include was given, construct a list
* of those interfaces which match the specifications - remember,
* the includes could be given as named interfaces, IP addrs, or
Expand Down
10 changes: 7 additions & 3 deletions orte/mca/ras/base/ras_base_allocate.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* All rights reserved.
* Copyright (c) 2011-2012 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2014 Intel, Inc. All rights reserved.
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand All @@ -34,6 +34,7 @@
#include "opal/util/output.h"
#include "opal/dss/dss.h"
#include "opal/util/argv.h"
#include "opal/mca/if/if.h"

#include "orte/util/show_help.h"
#include "orte/mca/errmgr/errmgr.h"
Expand Down Expand Up @@ -195,6 +196,11 @@ void orte_ras_base_allocate(int fd, short args, void *cbdata)
}
/* If something came back, save it and we are done */
if (!opal_list_is_empty(&nodes)) {
/* flag that the allocation is managed */
orte_managed_allocation = true;
/* since it is managed, we do not attempt to resolve
* the nodenames */
opal_if_do_not_resolve = true;
/* store the results in the global resource pool - this removes the
* list items
*/
Expand All @@ -210,8 +216,6 @@ void orte_ras_base_allocate(int fd, short args, void *cbdata)
if (!(ORTE_MAPPING_SUBSCRIBE_GIVEN & ORTE_GET_MAPPING_DIRECTIVE(orte_rmaps_base.mapping))) {
ORTE_SET_MAPPING_DIRECTIVE(orte_rmaps_base.mapping, ORTE_MAPPING_NO_OVERSUBSCRIBE);
}
/* flag that the allocation is managed */
orte_managed_allocation = true;
goto DISPLAY;
} else if (orte_allocation_required) {
/* if nothing was found, and an allocation is
Expand Down
7 changes: 2 additions & 5 deletions orte/mca/ras/base/ras_base_node.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* All rights reserved.
* Copyright (c) 2011-2012 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2014 Intel, Inc. All rights reserved.
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -103,10 +103,7 @@ int orte_ras_base_node_insert(opal_list_t* nodes, orte_job_t *jdata)
* first position since it is the first one entered. We need to check to see
* if this node is the same as the HNP's node so we don't double-enter it
*/
if (NULL != hnp_node &&
(0 == strcmp(node->name, hnp_node->name) ||
0 == strcmp(node->name, "localhost") ||
opal_ifislocal(node->name))) {
if (NULL != hnp_node && orte_ifislocal(node->name)) {
OPAL_OUTPUT_VERBOSE((5, orte_ras_base_framework.framework_output,
"%s ras:base:node_insert updating HNP [%s] info to %ld slots",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
Expand Down
5 changes: 2 additions & 3 deletions orte/mca/rmaps/rank_file/rmaps_rank_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* All rights reserved.
* Copyright (c) 2008 Voltaire. All rights reserved
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014 Intel, Inc. All rights reserved.
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
*
* $COPYRIGHT$
*
Expand Down Expand Up @@ -484,8 +484,7 @@ static int orte_rmaps_rank_file_parse(const char *rankfile)
goto unlock;
}
/* check if this is the local node */
if (0 == strcmp(node_name, hnp_node->name) ||
opal_ifislocal(node_name)) {
if (orte_ifislocal(node_name)) {
rfmap->node_name = strdup(hnp_node->name);
} else {
rfmap->node_name = strdup(node_name);
Expand Down
4 changes: 2 additions & 2 deletions orte/mca/rmaps/seq/rmaps_seq.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* Copyright (c) 2006-2011 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2011 Los Alamos National Security, LLC.
* All rights reserved.
* Copyright (c) 2014 Intel, Inc. All rights reserved.
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
* Copyright (c) 2015 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
Expand Down Expand Up @@ -298,7 +298,7 @@ static int orte_rmaps_seq_map(orte_job_t *jdata)
* hostfile may not have been FQDN, while name returned
* by gethostname may have been (or vice versa)
*/
if (opal_ifislocal(seq->hostname)) {
if (orte_ifislocal(seq->hostname)) {
opal_output_verbose(5, orte_rmaps_base_framework.framework_output,
"mca:rmaps:seq: removing head node %s", seq->hostname);
opal_list_remove_item(seq_list, item);
Expand Down
14 changes: 0 additions & 14 deletions orte/orted/pmix/pmix_server_process_msgs.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ void pmix_server_process_message(pmix_server_peer_t *peer)
pmix_server_dmx_req_t *req, *nextreq;
bool found;
orte_grpcomm_signature_t *sig;
char *local_uri;
uint32_t sm_flag;

/* xfer the message to a buffer for unpacking */
Expand Down Expand Up @@ -207,19 +206,6 @@ void pmix_server_process_message(pmix_server_peer_t *peer)
(PMIX_FENCENB_CMD == cmd) ? "FENCE_NB" : "FENCE", tmp);
free(tmp);
}
/* get the URI for this process */
cnt = 1;
if (OPAL_SUCCESS != (rc = opal_dss.unpack(&xfer, &local_uri, &cnt, OPAL_STRING))) {
ORTE_ERROR_LOG(rc);
OBJ_RELEASE(sig);
goto reply_fence;
}
/* if not NULL, then update our connection info as we might need
* to send this proc a message at some point */
if (NULL != local_uri) {
orte_rml.set_contact_info(local_uri);
free(local_uri);
}
/* unpack flag if sm dstore is supported by the client */
cnt = 1;
if (OPAL_SUCCESS != (rc = opal_dss.unpack(&xfer, &sm_flag, &cnt, OPAL_UINT32))) {
Expand Down
Loading