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
10 changes: 5 additions & 5 deletions opal/mca/pmix/pmix2x/pmix/src/server/pmix_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -990,11 +990,11 @@ static void _dmodex_req(int sd, short args, void *cbdata)
* may not be a contribution */
if (PMIX_SUCCESS == (rc = pmix_hash_fetch(&nptr->server->myremote, info->rank, "modex", &val)) &&
NULL != val) {
data = val->data.bo.bytes;
sz = val->data.bo.size;
/* protect the data */
val->data.bo.bytes = NULL;
val->data.bo.size = 0;
data = val->data.bo.bytes;
sz = val->data.bo.size;
/* protect the data */
val->data.bo.bytes = NULL;
val->data.bo.size = 0;
PMIX_VALUE_RELEASE(val);
}

Expand Down
12 changes: 7 additions & 5 deletions opal/mca/pmix/pmix2x/pmix/src/server/pmix_server_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ pmix_status_t pmix_server_commit(pmix_peer_t *peer, pmix_buffer_t *buf)
pmix_nspace_t *nptr;
pmix_rank_info_t *info;
pmix_dmdx_remote_t *dcd, *dcdnext;
pmix_buffer_t *pbkt;
pmix_value_t *val;
char *data;
size_t sz;
Expand Down Expand Up @@ -236,16 +235,19 @@ pmix_status_t pmix_server_commit(pmix_peer_t *peer, pmix_buffer_t *buf)
if (dcd->cd->proc.rank == info->rank) {
/* we can now fulfill this request - collect the
* remote/global data from this proc */
pbkt = PMIX_NEW(pmix_buffer_t);
/* get any remote contribution - note that there
* may not be a contribution */
data = NULL;
sz = 0;
if (PMIX_SUCCESS == pmix_hash_fetch(&nptr->server->myremote, info->rank, "modex", &val) &&
NULL != val) {
PMIX_LOAD_BUFFER(pbkt, val->data.bo.bytes, val->data.bo.size);
data = val->data.bo.bytes;
sz = val->data.bo.size;
/* protect the data */
val->data.bo.bytes = NULL;
val->data.bo.size = 0;
PMIX_VALUE_RELEASE(val);
}
PMIX_UNLOAD_BUFFER(pbkt, data, sz);
PMIX_RELEASE(pbkt);
/* execute the callback */
dcd->cd->cbfunc(PMIX_SUCCESS, data, sz, dcd->cd->cbdata);
if (NULL != data) {
Expand Down
6 changes: 3 additions & 3 deletions opal/mca/pmix/pmix2x/pmix/src/util/compress.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2015-2016 Intel, Inc. All rights reserved.
* Copyright (c) 2015-2017 Intel, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand All @@ -31,8 +31,8 @@

BEGIN_C_DECLS

/* define a limit for storing raw strings */
#define PMIX_STRING_LIMIT 512
/* define a limit of 128k for raw strings */
#define PMIX_STRING_LIMIT 131072

/* define a macro for quickly checking if a string exceeds the
* compression limit */
Expand Down
16 changes: 2 additions & 14 deletions orte/mca/ess/alps/ess_alps_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* Copyright (c) 2011 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2011-2013 Los Alamos National Security, LLC.
* All rights reserved.
* Copyright (c) 2017 Intel, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -58,7 +59,6 @@ static int rte_init(void)
{
int ret;
char *error = NULL;
char **hosts = NULL;

OPAL_OUTPUT_VERBOSE((1, orte_ess_base_framework.framework_output,
"ess:alps in rte_init"));
Expand Down Expand Up @@ -90,23 +90,11 @@ static int rte_init(void)
* default procedure
*/
if (ORTE_PROC_IS_DAEMON) {
if (NULL != orte_node_regex) {
/* extract the nodes */
if (ORTE_SUCCESS != (ret =
orte_regex_extract_node_names(orte_node_regex, &hosts)) ||
NULL == hosts) {
error = "orte_regex_extract_node_names";
goto fn_fail;
}
}
if (ORTE_SUCCESS != (ret = orte_ess_base_orted_setup(hosts))) {
if (ORTE_SUCCESS != (ret = orte_ess_base_orted_setup())) {
ORTE_ERROR_LOG(ret);
error = "orte_ess_base_orted_setup";
goto fn_fail;
}
if (NULL != hosts) {
opal_argv_free(hosts);
}

/*
* now synchronize with aprun.
Expand Down
4 changes: 2 additions & 2 deletions orte/mca/ess/base/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2012 Oak Ridge National Labs. All rights reserved.
* Copyright (c) 2013 Los Alamos National Security, LLC. All rights reserved.
* Copyright (c) 2013 Intel, Inc. All rights reserved.
* Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -67,7 +67,7 @@ ORTE_DECLSPEC void orte_ess_base_app_abort(int status, bool report);
ORTE_DECLSPEC int orte_ess_base_tool_setup(void);
ORTE_DECLSPEC int orte_ess_base_tool_finalize(void);

ORTE_DECLSPEC int orte_ess_base_orted_setup(char **hosts);
ORTE_DECLSPEC int orte_ess_base_orted_setup(void);
ORTE_DECLSPEC int orte_ess_base_orted_finalize(void);

/* Detect whether or not this proc is bound - if not,
Expand Down
43 changes: 17 additions & 26 deletions orte/mca/ess/base/ess_base_std_orted.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ static void setup_sighandler(int signal, opal_event_t *ev,
}


int orte_ess_base_orted_setup(char **hosts)
int orte_ess_base_orted_setup(void)
{
int ret = ORTE_ERROR;
int fd;
Expand All @@ -113,7 +113,6 @@ int orte_ess_base_orted_setup(char **hosts)
orte_job_t *jdata;
orte_proc_t *proc;
orte_app_context_t *app;
orte_node_t *node;
char *param;
hwloc_obj_t obj;
unsigned i, j;
Expand Down Expand Up @@ -218,12 +217,9 @@ int orte_ess_base_orted_setup(char **hosts)
* a specific module to use
*/
(void) mca_base_var_env_name("plm", &param);

plm_in_use = !!(getenv(param));
free (param);

if (plm_in_use) {

if (ORTE_SUCCESS != (ret = mca_base_framework_open(&orte_plm_base_framework, 0))) {
ORTE_ERROR_LOG(ret);
error = "orte_plm_base_open";
Expand Down Expand Up @@ -332,11 +328,6 @@ int orte_ess_base_orted_setup(char **hosts)
app = OBJ_NEW(orte_app_context_t);
opal_pointer_array_set_item(jdata->apps, 0, app);
jdata->num_apps++;
/* create and store a node object where we are */
node = OBJ_NEW(orte_node_t);
node->name = strdup(orte_process_info.nodename);
node->index = ORTE_PROC_MY_NAME->vpid;
opal_pointer_array_set_item(orte_node_pool, ORTE_PROC_MY_NAME->vpid, node);

/* create and store a proc object for us */
proc = OBJ_NEW(orte_proc_t);
Expand All @@ -345,19 +336,6 @@ int orte_ess_base_orted_setup(char **hosts)
proc->pid = orte_process_info.pid;
proc->state = ORTE_PROC_STATE_RUNNING;
opal_pointer_array_set_item(jdata->procs, proc->name.vpid, proc);
/* record that the daemon (i.e., us) is on this node
* NOTE: we do not add the proc object to the node's
* proc array because we are not an application proc.
* Instead, we record it in the daemon field of the
* node object
*/
OBJ_RETAIN(proc); /* keep accounting straight */
node->daemon = proc;
ORTE_FLAG_SET(node, ORTE_NODE_FLAG_DAEMON_LAUNCHED);
node->state = ORTE_NODE_STATE_UP;
/* now point our proc node field to the node */
OBJ_RETAIN(node); /* keep accounting straight */
proc->node = node;
/* record that the daemon job is running */
jdata->num_procs = 1;
jdata->state = ORTE_JOB_STATE_RUNNING;
Expand Down Expand Up @@ -514,7 +492,6 @@ int orte_ess_base_orted_setup(char **hosts)
orte_topo_signature = opal_hwloc_base_get_topo_signature(opal_hwloc_topology);
t->sig = strdup(orte_topo_signature);
opal_pointer_array_add(orte_node_topologies, t);
node->topology = t;
if (15 < opal_output_get_verbosity(orte_ess_base_framework.framework_output)) {
opal_output(0, "%s Topology Info:", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME));
opal_dss.dump(0, opal_hwloc_topology, OPAL_HWLOC_TOPO);
Expand All @@ -526,12 +503,25 @@ int orte_ess_base_orted_setup(char **hosts)
* after we enable_comm as that function determines our
* own port, which we need in order to construct the nidmap
*/
if (NULL != hosts) {
if (NULL != orte_node_regex) {
if (ORTE_SUCCESS != (ret = orte_util_nidmap_parse(orte_node_regex))) {
ORTE_ERROR_LOG(ret);
error = "construct nidmap";
goto error;
}
}

if (orte_static_ports) {
if (NULL == orte_node_regex) {
/* we didn't get the node info */
error = "cannot construct daemon map for static ports - no node map info";
goto error;
}
/* extract the node info from the environment and
* build a nidmap from it - this will update the
* routing plan as well
*/
if (ORTE_SUCCESS != (ret = orte_util_build_daemon_nidmap(hosts))) {
if (ORTE_SUCCESS != (ret = orte_util_build_daemon_nidmap())) {
ORTE_ERROR_LOG(ret);
error = "construct daemon map from static ports";
goto error;
Expand Down Expand Up @@ -635,6 +625,7 @@ int orte_ess_base_orted_setup(char **hosts)
}

return ORTE_SUCCESS;

error:
orte_show_help("help-orte-runtime.txt",
"orte_init:startup:internal-failure",
Expand Down
13 changes: 2 additions & 11 deletions orte/mca/ess/env/ess_env_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2013-2015 Intel, Inc. All rights reserved.
* Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -98,7 +98,6 @@ static int rte_init(void)
{
int ret;
char *error = NULL;
char **hosts = NULL;

/* run the prolog */
if (ORTE_SUCCESS != (ret = orte_ess_base_std_prolog())) {
Expand All @@ -112,19 +111,11 @@ static int rte_init(void)
/* if I am a daemon, complete my setup using the
* default procedure
*/
if (NULL != orte_node_regex) {
/* extract the nodes */
if (ORTE_SUCCESS != (ret = orte_regex_extract_node_names(orte_node_regex, &hosts))) {
error = "orte_regex_extract_node_names";
goto error;
}
}
if (ORTE_SUCCESS != (ret = orte_ess_base_orted_setup(hosts))) {
if (ORTE_SUCCESS != (ret = orte_ess_base_orted_setup())) {
ORTE_ERROR_LOG(ret);
error = "orte_ess_base_orted_setup";
goto error;
}
opal_argv_free(hosts);
return ORTE_SUCCESS;

error:
Expand Down
13 changes: 2 additions & 11 deletions orte/mca/ess/lsf/ess_lsf_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2007-2011 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2013 Intel, Inc. All rights reserved.
* Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
* Copyright (c) 2016 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
Expand Down Expand Up @@ -68,7 +68,6 @@ static int rte_init(void)
{
int ret;
char *error = NULL;
char **hosts = NULL;

/* run the prolog */
if (ORTE_SUCCESS != (ret = orte_ess_base_std_prolog())) {
Expand All @@ -83,19 +82,11 @@ static int rte_init(void)
* default procedure
*/
if (ORTE_PROC_IS_DAEMON) {
if (NULL != orte_node_regex) {
/* extract the nodes */
if (ORTE_SUCCESS != (ret = orte_regex_extract_node_names(orte_node_regex, &hosts))) {
error = "orte_regex_extract_node_names";
goto error;
}
}
if (ORTE_SUCCESS != (ret = orte_ess_base_orted_setup(hosts))) {
if (ORTE_SUCCESS != (ret = orte_ess_base_orted_setup())) {
ORTE_ERROR_LOG(ret);
error = "orte_ess_base_orted_setup";
goto error;
}
opal_argv_free(hosts);
return ORTE_SUCCESS;
}

Expand Down
17 changes: 2 additions & 15 deletions orte/mca/ess/slurm/ess_slurm_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2008-2011 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2013 Intel, Inc. All rights reserved.
* Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -62,7 +62,6 @@ static int rte_init(void)
{
int ret;
char *error = NULL;
char **hosts = NULL;

/* run the prolog */
if (ORTE_SUCCESS != (ret = orte_ess_base_std_prolog())) {
Expand All @@ -77,23 +76,11 @@ static int rte_init(void)
* default procedure
*/
if (ORTE_PROC_IS_DAEMON) {
if (NULL != orte_node_regex) {
/* extract the nodes */
if (ORTE_SUCCESS != (ret =
orte_regex_extract_node_names(orte_node_regex, &hosts)) ||
NULL == hosts) {
error = "orte_regex_extract_node_names";
goto error;
}
}
if (ORTE_SUCCESS != (ret = orte_ess_base_orted_setup(hosts))) {
if (ORTE_SUCCESS != (ret = orte_ess_base_orted_setup())) {
ORTE_ERROR_LOG(ret);
error = "orte_ess_base_orted_setup";
goto error;
}
if (NULL != hosts) {
opal_argv_free(hosts);
}
return ORTE_SUCCESS;
}

Expand Down
14 changes: 1 addition & 13 deletions orte/mca/ess/tm/ess_tm_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ static int rte_init(void)
{
int ret;
char *error = NULL;
char **hosts = NULL;

/* run the prolog */
if (ORTE_SUCCESS != (ret = orte_ess_base_std_prolog())) {
Expand All @@ -82,21 +81,11 @@ static int rte_init(void)
* default procedure
*/
if (ORTE_PROC_IS_DAEMON) {
if (NULL != orte_node_regex) {
/* extract the nodes */
if (ORTE_SUCCESS != (ret =
orte_regex_extract_node_names(orte_node_regex, &hosts)) ||
NULL == hosts) {
error = "orte_regex_extract_node_names";
goto error;
}
}
if (ORTE_SUCCESS != (ret = orte_ess_base_orted_setup(hosts))) {
if (ORTE_SUCCESS != (ret = orte_ess_base_orted_setup())) {
ORTE_ERROR_LOG(ret);
error = "orte_ess_base_orted_setup";
goto error;
}
opal_argv_free(hosts);
return ORTE_SUCCESS;
}

Expand Down Expand Up @@ -194,4 +183,3 @@ static int tm_set_name(void)

return ORTE_SUCCESS;
}

Loading