Roll in update to PMIx master. Transfer updates from pmix2x component to ext2x
Signed-off-by: Ralph Castain <rhc@open-mpi.org>
Этот коммит содержится в:
родитель
b991135634
Коммит
a1b15c5666
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
|
||||
# Copyright (c) 2014-2017 Intel, Inc. All rights reserved.
|
||||
# Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2015 Research Organization for Information Science
|
||||
# and Technology (RIST). All rights reserved.
|
||||
@ -10,6 +10,8 @@
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
dist_opaldata_DATA = help-pmix-ext2x.txt
|
||||
|
||||
sources = \
|
||||
pmix2x.h \
|
||||
pmix2x_component.c \
|
||||
|
32
opal/mca/pmix/ext2x/help-pmix-ext2x.txt
Обычный файл
32
opal/mca/pmix/ext2x/help-pmix-ext2x.txt
Обычный файл
@ -0,0 +1,32 @@
|
||||
# -*- text -*-
|
||||
#
|
||||
# Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
|
||||
# University Research and Technology
|
||||
# Corporation. All rights reserved.
|
||||
# Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
# of Tennessee Research Foundation. All rights
|
||||
# reserved.
|
||||
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
# University of Stuttgart. All rights reserved.
|
||||
# Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2017 Intel, Inc. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
# This is the US/English help file for Open MPI MCA error messages.
|
||||
#
|
||||
[evars]
|
||||
We found conflicting directives regarding the location of OPAL vs PMIx
|
||||
installation directories:
|
||||
|
||||
%s
|
||||
|
||||
This usually indicates that OMPI was configured to use its internal copy
|
||||
of PMIx, but another installation of PMIx is also in use on this system
|
||||
and could potentially cause confusion between the two sets of plugins.
|
||||
Please either unset the indicated environment variables, or configure
|
||||
OMPI to use the external PMIx installation.
|
@ -34,6 +34,7 @@
|
||||
#include "opal/threads/threads.h"
|
||||
#include "opal/util/argv.h"
|
||||
#include "opal/util/error.h"
|
||||
#include "opal/util/opal_environ.h"
|
||||
#include "opal/util/output.h"
|
||||
#include "opal/util/proc.h"
|
||||
#include "opal/util/show_help.h"
|
||||
@ -110,6 +111,9 @@ const opal_pmix_base_module_t opal_pmix_ext2x_module = {
|
||||
.server_setup_fork = ext2x_server_setup_fork,
|
||||
.server_dmodex_request = ext2x_server_dmodex,
|
||||
.server_notify_event = ext2x_server_notify_event,
|
||||
/* tool APIs */
|
||||
.tool_init = ext2x_tool_init,
|
||||
.tool_finalize = ext2x_tool_fini,
|
||||
/* utility APIs */
|
||||
.get_version = PMIx_Get_version,
|
||||
.register_evhandler = register_handler,
|
||||
@ -190,14 +194,17 @@ static void return_local_event_hdlr(int status, opal_list_t *results,
|
||||
if (NULL != cd->pmixcbfunc) {
|
||||
op = OBJ_NEW(ext2x_opcaddy_t);
|
||||
|
||||
if (NULL != results && 0 < (op->ninfo = opal_list_get_size(results))) {
|
||||
/* convert the list of results to an array of info */
|
||||
PMIX_INFO_CREATE(op->info, op->ninfo);
|
||||
n=0;
|
||||
OPAL_LIST_FOREACH(kv, cd->info, opal_value_t) {
|
||||
(void)strncpy(op->info[n].key, kv->key, PMIX_MAX_KEYLEN);
|
||||
ext2x_value_load(&op->info[n].value, kv);
|
||||
++n;
|
||||
if (NULL != results) {
|
||||
/* convert the list of results to an array of info */
|
||||
op->ninfo = opal_list_get_size(results);
|
||||
if (0 < op->ninfo) {
|
||||
PMIX_INFO_CREATE(op->info, op->ninfo);
|
||||
n=0;
|
||||
OPAL_LIST_FOREACH(kv, cd->info, opal_value_t) {
|
||||
(void)strncpy(op->info[n].key, kv->key, PMIX_MAX_KEYLEN);
|
||||
ext2x_value_load(&op->info[n].value, kv);
|
||||
++n;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* convert the status */
|
||||
@ -237,9 +244,9 @@ void ext2x_event_hdlr(size_t evhdlr_registration_id,
|
||||
size_t n;
|
||||
opal_ext2x_event_t *event;
|
||||
|
||||
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
|
||||
"%s RECEIVED NOTIFICATION OF STATUS %d",
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), status);
|
||||
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
|
||||
"%s RECEIVED NOTIFICATION OF STATUS %d",
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), status);
|
||||
|
||||
OPAL_PMIX_ACQUIRE_THREAD(&opal_pmix_base.lock);
|
||||
|
||||
@ -808,17 +815,13 @@ void ext2x_value_load(pmix_value_t *v,
|
||||
v->data.darray = (pmix_data_array_t*)malloc(sizeof(pmix_data_array_t));
|
||||
v->data.darray->type = PMIX_INFO;
|
||||
v->data.darray->size = opal_list_get_size(list);
|
||||
if (0 < v->data.darray->size) {
|
||||
PMIX_INFO_CREATE(info, v->data.darray->size);
|
||||
v->data.darray->array = info;
|
||||
n=0;
|
||||
OPAL_LIST_FOREACH(val, list, opal_value_t) {
|
||||
(void)strncpy(info[n].key, val->key, PMIX_MAX_KEYLEN);
|
||||
ext2x_value_load(&info[n].value, val);
|
||||
++n;
|
||||
}
|
||||
} else {
|
||||
v->data.darray->array = NULL;
|
||||
PMIX_INFO_CREATE(info, v->data.darray->size);
|
||||
v->data.darray->array = info;
|
||||
n=0;
|
||||
OPAL_LIST_FOREACH(val, list, opal_value_t) {
|
||||
(void)strncpy(info[n].key, val->key, PMIX_MAX_KEYLEN);
|
||||
ext2x_value_load(&info[n].value, val);
|
||||
++n;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@ -1063,13 +1066,16 @@ static void register_handler(opal_list_t *event_codes,
|
||||
}
|
||||
|
||||
/* convert the list of info to an array of pmix_info_t */
|
||||
if (NULL != info && 0 < (op->ninfo = opal_list_get_size(info))) {
|
||||
PMIX_INFO_CREATE(op->info, op->ninfo);
|
||||
n=0;
|
||||
OPAL_LIST_FOREACH(kv, info, opal_value_t) {
|
||||
(void)strncpy(op->info[n].key, kv->key, PMIX_MAX_KEYLEN);
|
||||
ext2x_value_load(&op->info[n].value, kv);
|
||||
++n;
|
||||
if (NULL != info) {
|
||||
op->ninfo = opal_list_get_size(info);
|
||||
if (0 < op->ninfo) {
|
||||
PMIX_INFO_CREATE(op->info, op->ninfo);
|
||||
n=0;
|
||||
OPAL_LIST_FOREACH(kv, info, opal_value_t) {
|
||||
(void)strncpy(op->info[n].key, kv->key, PMIX_MAX_KEYLEN);
|
||||
ext2x_value_load(&op->info[n].value, kv);
|
||||
++n;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1174,13 +1180,16 @@ static int notify_event(int status,
|
||||
prange = ext2x_convert_opalrange(range);
|
||||
|
||||
/* convert the list of info */
|
||||
if (NULL != info && 0 < (op->ninfo = opal_list_get_size(info))) {
|
||||
PMIX_INFO_CREATE(op->info, op->ninfo);
|
||||
n=0;
|
||||
OPAL_LIST_FOREACH(kv, info, opal_value_t) {
|
||||
(void)strncpy(op->info[n].key, kv->key, PMIX_MAX_KEYLEN);
|
||||
ext2x_value_load(&op->info[n].value, kv);
|
||||
++n;
|
||||
if (NULL != info) {
|
||||
op->ninfo = opal_list_get_size(info);
|
||||
if (0 < op->ninfo) {
|
||||
PMIX_INFO_CREATE(op->info, op->ninfo);
|
||||
n=0;
|
||||
OPAL_LIST_FOREACH(kv, info, opal_value_t) {
|
||||
(void)strncpy(op->info[n].key, kv->key, PMIX_MAX_KEYLEN);
|
||||
ext2x_value_load(&op->info[n].value, kv);
|
||||
++n;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1251,8 +1260,10 @@ static void ext2x_query(opal_list_t *queries,
|
||||
OPAL_PMIX_ACQUIRE_THREAD(&opal_pmix_base.lock);
|
||||
if (0 >= opal_pmix_base.initialized) {
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
rc = OPAL_ERR_NOT_INITIALIZED;
|
||||
goto CLEANUP;
|
||||
if (NULL != cbfunc) {
|
||||
cbfunc(OPAL_ERR_NOT_INITIALIZED, NULL, cbdata, NULL, NULL);
|
||||
}
|
||||
return;
|
||||
}
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
|
||||
@ -1318,8 +1329,10 @@ static void ext2x_log(opal_list_t *info,
|
||||
OPAL_PMIX_ACQUIRE_THREAD(&opal_pmix_base.lock);
|
||||
if (0 >= opal_pmix_base.initialized) {
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
rc = OPAL_ERR_NOT_INITIALIZED;
|
||||
goto CLEANUP;
|
||||
if (NULL != cbfunc) {
|
||||
cbfunc(OPAL_ERR_NOT_INITIALIZED, cbdata);
|
||||
}
|
||||
return;
|
||||
}
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
|
||||
|
@ -14,8 +14,8 @@
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#ifndef MCA_PMIX_PMIX2X_H
|
||||
#define MCA_PMIX_PMIX2X_H
|
||||
#ifndef MCA_PMIX_EXT2X_H
|
||||
#define MCA_PMIX_EXT2X_H
|
||||
|
||||
#include "opal_config.h"
|
||||
|
||||
@ -37,6 +37,12 @@
|
||||
|
||||
BEGIN_C_DECLS
|
||||
|
||||
#ifdef OPAL_C_HAVE_VISIBILITY
|
||||
#define PMIX_HAVE_VISIBILITY 1
|
||||
#else
|
||||
#undef PMIX_HAVE_VISIBILITY
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
opal_pmix_base_component_t super;
|
||||
opal_list_t jobids;
|
||||
@ -46,6 +52,7 @@ typedef struct {
|
||||
int cache_size;
|
||||
opal_list_t cache;
|
||||
opal_list_t dmdx;
|
||||
bool silence_warning;
|
||||
} mca_pmix_ext2x_component_t;
|
||||
|
||||
OPAL_DECLSPEC extern mca_pmix_ext2x_component_t mca_pmix_ext2x_component;
|
||||
@ -250,6 +257,10 @@ OPAL_MODULE_DECLSPEC int ext2x_resolve_peers(const char *nodename, opal_jobid_t
|
||||
opal_list_t *procs);
|
||||
OPAL_MODULE_DECLSPEC int ext2x_resolve_nodes(opal_jobid_t jobid, char **nodelist);
|
||||
|
||||
/**** TOOL FUNCTIONS ****/
|
||||
OPAL_MODULE_DECLSPEC int ext2x_tool_init(opal_list_t *info);
|
||||
OPAL_MODULE_DECLSPEC int ext2x_tool_fini(void);
|
||||
|
||||
/**** COMMON FUNCTIONS ****/
|
||||
OPAL_MODULE_DECLSPEC int ext2x_store_local(const opal_process_name_t *proc,
|
||||
opal_value_t *val);
|
||||
|
@ -3,7 +3,7 @@
|
||||
* Copyright (c) 2014-2017 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014-2017 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2014-2015 Mellanox Technologies, Inc.
|
||||
* Copyright (c) 2014-2017 Mellanox Technologies, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2016 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2016 Los Alamos National Security, LLC. All rights
|
||||
@ -29,11 +29,14 @@
|
||||
#include "opal/hash_string.h"
|
||||
#include "opal/threads/threads.h"
|
||||
#include "opal/util/argv.h"
|
||||
#include "opal/util/opal_environ.h"
|
||||
#include "opal/util/proc.h"
|
||||
#include "opal/util/show_help.h"
|
||||
|
||||
#include "opal/mca/pmix/base/base.h"
|
||||
#include "pmix2x.h"
|
||||
#include "pmix.h"
|
||||
#include "pmix_tool.h"
|
||||
|
||||
static pmix_proc_t my_proc;
|
||||
static char *dbgvalue=NULL;
|
||||
@ -97,7 +100,9 @@ int ext2x_client_init(opal_list_t *ilist)
|
||||
PMIX_INFO_FREE(pinfo, ninfo);
|
||||
}
|
||||
if (PMIX_SUCCESS != rc) {
|
||||
return ext2x_convert_rc(rc);
|
||||
dbg = ext2x_convert_rc(rc);
|
||||
OPAL_ERROR_LOG(dbg);
|
||||
return dbg;
|
||||
}
|
||||
OPAL_PMIX_ACQUIRE_THREAD(&opal_pmix_base.lock);
|
||||
|
||||
@ -162,7 +167,7 @@ int ext2x_client_finalize(void)
|
||||
OPAL_PMIX_ACQUIRE_THREAD(&opal_pmix_base.lock);
|
||||
--opal_pmix_base.initialized;
|
||||
|
||||
if (0 < opal_pmix_base.initialized) {
|
||||
if (0 == opal_pmix_base.initialized) {
|
||||
/* deregister all event handlers */
|
||||
OPAL_LIST_FOREACH_SAFE(event, ev2, &mca_pmix_ext2x_component.events, opal_ext2x_event_t) {
|
||||
OPAL_PMIX_DESTRUCT_LOCK(&event->lock);
|
||||
@ -174,12 +179,125 @@ int ext2x_client_finalize(void)
|
||||
}
|
||||
}
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
|
||||
rc = PMIx_Finalize(NULL, 0);
|
||||
|
||||
return ext2x_convert_rc(rc);
|
||||
}
|
||||
|
||||
int ext2x_tool_init(opal_list_t *info)
|
||||
{
|
||||
pmix_info_t *pinfo;
|
||||
size_t ninfo, n;
|
||||
opal_ext2x_jobid_trkr_t *job;
|
||||
opal_value_t *val;
|
||||
pmix_status_t rc;
|
||||
int ret;
|
||||
opal_process_name_t pname;
|
||||
opal_ext2x_event_t *event;
|
||||
|
||||
opal_output_verbose(1, opal_pmix_base_framework.framework_output,
|
||||
"PMIx_tool init");
|
||||
|
||||
OPAL_PMIX_ACQUIRE_THREAD(&opal_pmix_base.lock);
|
||||
|
||||
/* convert the incoming list to info structs */
|
||||
if (NULL != info && 0 < (ninfo = opal_list_get_size(info))) {
|
||||
PMIX_INFO_CREATE(pinfo, ninfo);
|
||||
n=0;
|
||||
OPAL_LIST_FOREACH(val, info, opal_value_t) {
|
||||
(void)strncpy(pinfo[n].key, val->key, PMIX_MAX_KEYLEN);
|
||||
ext2x_value_load(&pinfo[n].value, val);
|
||||
++n;
|
||||
}
|
||||
} else {
|
||||
pinfo = NULL;
|
||||
ninfo = 0;
|
||||
}
|
||||
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
rc = PMIx_tool_init(&my_proc, pinfo, ninfo);
|
||||
if (NULL != pinfo) {
|
||||
PMIX_INFO_FREE(pinfo, ninfo);
|
||||
}
|
||||
if (PMIX_SUCCESS != rc) {
|
||||
ret = ext2x_convert_rc(rc);
|
||||
OPAL_ERROR_LOG(ret);
|
||||
return ret;
|
||||
}
|
||||
OPAL_PMIX_ACQUIRE_THREAD(&opal_pmix_base.lock);
|
||||
|
||||
++opal_pmix_base.initialized;
|
||||
if (1 < opal_pmix_base.initialized) {
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
/* store our jobid and rank */
|
||||
if (NULL != getenv(OPAL_MCA_PREFIX"orte_launch")) {
|
||||
/* if we were launched by the OMPI RTE, then
|
||||
* the jobid is in a special format - so get it */
|
||||
mca_pmix_ext2x_component.native_launch = true;
|
||||
opal_convert_string_to_jobid(&pname.jobid, my_proc.nspace);
|
||||
} else {
|
||||
/* we were launched by someone else, so make the
|
||||
* jobid just be the hash of the nspace */
|
||||
OPAL_HASH_JOBID(my_proc.nspace, pname.jobid);
|
||||
}
|
||||
/* insert this into our list of jobids - it will be the
|
||||
* first, and so we'll check it first */
|
||||
job = OBJ_NEW(opal_ext2x_jobid_trkr_t);
|
||||
(void)strncpy(job->nspace, my_proc.nspace, PMIX_MAX_NSLEN);
|
||||
job->jobid = pname.jobid;
|
||||
opal_list_append(&mca_pmix_ext2x_component.jobids, &job->super);
|
||||
|
||||
pname.vpid = ext2x_convert_rank(my_proc.rank);
|
||||
opal_proc_set_name(&pname);
|
||||
|
||||
/* release the thread in case the event handler fires when
|
||||
* registered */
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
|
||||
/* register the default event handler */
|
||||
event = OBJ_NEW(opal_ext2x_event_t);
|
||||
opal_list_append(&mca_pmix_ext2x_component.events, &event->super);
|
||||
PMIX_INFO_CREATE(pinfo, 1);
|
||||
PMIX_INFO_LOAD(&pinfo[0], PMIX_EVENT_HDLR_NAME, "OPAL-PMIX-2X-DEFAULT", PMIX_STRING);
|
||||
PMIx_Register_event_handler(NULL, 0, NULL, 0, ext2x_event_hdlr, errreg_cbfunc, event);
|
||||
OPAL_PMIX_WAIT_THREAD(&event->lock);
|
||||
PMIX_INFO_FREE(pinfo, 1);
|
||||
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
int ext2x_tool_fini(void)
|
||||
{
|
||||
pmix_status_t rc;
|
||||
opal_ext2x_event_t *event, *ev2;
|
||||
|
||||
opal_output_verbose(1, opal_pmix_base_framework.framework_output,
|
||||
"PMIx_tool finalize");
|
||||
|
||||
OPAL_PMIX_ACQUIRE_THREAD(&opal_pmix_base.lock);
|
||||
--opal_pmix_base.initialized;
|
||||
|
||||
if (0 == opal_pmix_base.initialized) {
|
||||
/* deregister all event handlers */
|
||||
OPAL_LIST_FOREACH_SAFE(event, ev2, &mca_pmix_ext2x_component.events, opal_ext2x_event_t) {
|
||||
OPAL_PMIX_DESTRUCT_LOCK(&event->lock);
|
||||
OPAL_PMIX_CONSTRUCT_LOCK(&event->lock);
|
||||
PMIx_Deregister_event_handler(event->index, dereg_cbfunc, (void*)event);
|
||||
OPAL_PMIX_WAIT_THREAD(&event->lock);
|
||||
opal_list_remove_item(&mca_pmix_ext2x_component.events, &event->super);
|
||||
OBJ_RELEASE(event);
|
||||
}
|
||||
}
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
rc = PMIx_tool_finalize();
|
||||
|
||||
return ext2x_convert_rc(rc);
|
||||
}
|
||||
|
||||
|
||||
int ext2x_initialized(void)
|
||||
{
|
||||
int init;
|
||||
@ -244,6 +362,7 @@ int ext2x_store_local(const opal_process_name_t *proc, opal_value_t *val)
|
||||
pmix_status_t rc;
|
||||
pmix_proc_t p;
|
||||
char *nsptr;
|
||||
opal_ext2x_jobid_trkr_t *job;
|
||||
|
||||
OPAL_PMIX_ACQUIRE_THREAD(&opal_pmix_base.lock);
|
||||
|
||||
@ -255,7 +374,13 @@ int ext2x_store_local(const opal_process_name_t *proc, opal_value_t *val)
|
||||
|
||||
if (NULL != proc) {
|
||||
if (NULL == (nsptr = ext2x_convert_jobid(proc->jobid))) {
|
||||
return OPAL_ERR_NOT_FOUND;
|
||||
job = OBJ_NEW(opal_ext2x_jobid_trkr_t);
|
||||
(void)opal_snprintf_jobid(job->nspace, PMIX_MAX_NSLEN, proc->jobid);
|
||||
job->jobid = proc->jobid;
|
||||
OPAL_PMIX_ACQUIRE_THREAD(&opal_pmix_base.lock);
|
||||
opal_list_append(&mca_pmix_ext2x_component.jobids, &job->super);
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
nsptr = job->nspace;
|
||||
}
|
||||
(void)strncpy(p.nspace, nsptr, PMIX_MAX_NSLEN);
|
||||
p.rank = ext2x_convert_opalrank(proc->vpid);
|
||||
@ -306,7 +431,7 @@ int ext2x_fence(opal_list_t *procs, int collect_data)
|
||||
pmix_status_t rc;
|
||||
opal_namelist_t *ptr;
|
||||
char *nsptr;
|
||||
size_t cnt, n;
|
||||
size_t cnt = 0, n;
|
||||
pmix_proc_t *parray = NULL;
|
||||
pmix_info_t info, *iptr;
|
||||
|
||||
@ -450,6 +575,7 @@ int ext2x_get(const opal_process_name_t *proc, const char *key,
|
||||
size_t sz = 0, n;
|
||||
opal_value_t *ival;
|
||||
pmix_value_t *pval = NULL;
|
||||
int ret;
|
||||
|
||||
opal_output_verbose(1, opal_pmix_base_framework.framework_output,
|
||||
"%s ext2x:client get on proc %s key %s",
|
||||
@ -508,8 +634,11 @@ int ext2x_get(const opal_process_name_t *proc, const char *key,
|
||||
rc = PMIx_Get(&p, key, pinfo, sz, &pval);
|
||||
if (PMIX_SUCCESS == rc) {
|
||||
ival = OBJ_NEW(opal_value_t);
|
||||
ext2x_value_unload(ival, pval);
|
||||
*val = ival;
|
||||
if (OPAL_SUCCESS != (ret = ext2x_value_unload(ival, pval))) {
|
||||
rc = ext2x_convert_opalrc(ret);
|
||||
} else {
|
||||
*val = ival;
|
||||
}
|
||||
PMIX_VALUE_FREE(pval, 1);
|
||||
}
|
||||
PMIX_INFO_FREE(pinfo, sz);
|
||||
@ -713,9 +842,10 @@ int ext2x_lookup(opal_list_t *data, opal_list_t *info)
|
||||
pmix_pdata_t *pdata;
|
||||
pmix_info_t *pinfo = NULL;
|
||||
pmix_status_t rc;
|
||||
size_t cnt, n, sz;
|
||||
size_t cnt, n, sz = 0;
|
||||
opal_value_t *iptr;
|
||||
opal_ext2x_jobid_trkr_t *jptr, *job;
|
||||
int ret;
|
||||
|
||||
opal_output_verbose(1, opal_pmix_base_framework.framework_output,
|
||||
"ext2x:client lookup");
|
||||
@ -777,7 +907,9 @@ int ext2x_lookup(opal_list_t *data, opal_list_t *info)
|
||||
opal_list_append(&mca_pmix_ext2x_component.jobids, &job->super);
|
||||
}
|
||||
d->proc.vpid = ext2x_convert_rank(pdata[n].proc.rank);
|
||||
ext2x_value_unload(&d->value, &pdata[n].value);
|
||||
if (OPAL_SUCCESS != (ret = ext2x_value_unload(&d->value, &pdata[n].value))) {
|
||||
OPAL_ERROR_LOG(ret);
|
||||
}
|
||||
}
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
}
|
||||
@ -971,7 +1103,7 @@ int ext2x_spawn(opal_list_t *job_info, opal_list_t *apps, opal_jobid_t *jobid)
|
||||
pmix_status_t rc;
|
||||
pmix_info_t *info = NULL;
|
||||
pmix_app_t *papps;
|
||||
size_t ninfo, napps, n, m;
|
||||
size_t ninfo = 0, napps, n, m;
|
||||
opal_value_t *ival;
|
||||
opal_pmix_app_t *app;
|
||||
char nspace[PMIX_MAX_NSLEN+1];
|
||||
@ -1047,7 +1179,7 @@ static void spcbfunc(pmix_status_t status,
|
||||
{
|
||||
ext2x_opcaddy_t *op = (ext2x_opcaddy_t*)cbdata;
|
||||
opal_ext2x_jobid_trkr_t *job;
|
||||
opal_jobid_t jobid;
|
||||
opal_jobid_t jobid = OPAL_JOBID_INVALID;
|
||||
int rc;
|
||||
|
||||
OPAL_ACQUIRE_OBJECT(op);
|
||||
|
@ -33,6 +33,7 @@ const char *opal_pmix_ext2x_component_version_string =
|
||||
/*
|
||||
* Local function
|
||||
*/
|
||||
static int external_register(void);
|
||||
static int external_open(void);
|
||||
static int external_close(void);
|
||||
static int external_component_query(mca_base_module_t **module, int *priority);
|
||||
@ -65,6 +66,7 @@ mca_pmix_ext2x_component_t mca_pmix_ext2x_component = {
|
||||
.mca_open_component = external_open,
|
||||
.mca_close_component = external_close,
|
||||
.mca_query_component = external_component_query,
|
||||
.mca_register_component_params = external_register
|
||||
},
|
||||
/* Next the MCA v1.0.0 component meta data */
|
||||
.base_data = {
|
||||
@ -75,6 +77,21 @@ mca_pmix_ext2x_component_t mca_pmix_ext2x_component = {
|
||||
.native_launch = false
|
||||
};
|
||||
|
||||
static int external_register(void)
|
||||
{
|
||||
mca_base_component_t *component = &mca_pmix_ext2x_component.super.base_version;
|
||||
|
||||
mca_pmix_ext2x_component.silence_warning = false;
|
||||
(void) mca_base_component_var_register (component, "silence_warning",
|
||||
"Silence warning about PMIX_INSTALL_PREFIX",
|
||||
MCA_BASE_VAR_TYPE_BOOL, NULL, 0, 0,
|
||||
OPAL_INFO_LVL_4,
|
||||
MCA_BASE_VAR_SCOPE_READONLY,
|
||||
&mca_pmix_ext2x_component.silence_warning);
|
||||
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
static int external_open(void)
|
||||
{
|
||||
mca_pmix_ext2x_component.evindex = 0;
|
||||
|
@ -921,12 +921,15 @@ static void info_cbfunc(int status,
|
||||
pcaddy->status = ext2x_convert_opalrc(status);
|
||||
|
||||
/* convert the list to a pmix_info_t array */
|
||||
if (NULL != info && 0 < (pcaddy->ninfo = opal_list_get_size(info))) {
|
||||
PMIX_INFO_CREATE(pcaddy->info, pcaddy->ninfo);
|
||||
n = 0;
|
||||
OPAL_LIST_FOREACH(kv, info, opal_value_t) {
|
||||
(void)strncpy(pcaddy->info[n].key, kv->key, PMIX_MAX_KEYLEN);
|
||||
ext2x_value_load(&pcaddy->info[n].value, kv);
|
||||
if (NULL != info) {
|
||||
pcaddy->ninfo = opal_list_get_size(info);
|
||||
if (0 < pcaddy->ninfo) {
|
||||
PMIX_INFO_CREATE(pcaddy->info, pcaddy->ninfo);
|
||||
n = 0;
|
||||
OPAL_LIST_FOREACH(kv, info, opal_value_t) {
|
||||
(void)strncpy(pcaddy->info[n].key, kv->key, PMIX_MAX_KEYLEN);
|
||||
ext2x_value_load(&pcaddy->info[n].value, kv);
|
||||
}
|
||||
}
|
||||
}
|
||||
/* we are done with the incoming data */
|
||||
@ -977,7 +980,7 @@ static pmix_status_t server_query(pmix_proc_t *proct,
|
||||
|
||||
/* convert the queries */
|
||||
for (n=0; n < nqueries; n++) {
|
||||
q = OBJ_NEW(opal_pmix_query_t);
|
||||
q = OBJ_NEW(opal_pmix_query_t);
|
||||
/* we "borrow" the info field of the caddy as we and the
|
||||
* server function both agree on what will be there */
|
||||
opal_list_append(&opalcaddy->info, &q->super);
|
||||
@ -1024,7 +1027,9 @@ static void toolcbfunc(int status,
|
||||
job = OBJ_NEW(opal_ext2x_jobid_trkr_t);
|
||||
(void)strncpy(job->nspace, p.nspace, PMIX_MAX_NSLEN);
|
||||
job->jobid = proc.jobid;
|
||||
OPAL_PMIX_ACQUIRE_THREAD(&opal_pmix_base.lock);
|
||||
opal_list_append(&mca_pmix_ext2x_component.jobids, &job->super);
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
}
|
||||
|
||||
/* pass it down */
|
||||
|
@ -4,7 +4,7 @@
|
||||
* Copyright (c) 2014-2017 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Mellanox Technologies, Inc.
|
||||
* Copyright (c) 2014-2017 Mellanox Technologies, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2016 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2017 Los Alamos National Security, LLC. All rights
|
||||
@ -36,6 +36,7 @@
|
||||
#include "opal/util/argv.h"
|
||||
#include "opal/util/error.h"
|
||||
#include "opal/util/output.h"
|
||||
#include "opal/util/opal_environ.h"
|
||||
#include "opal/util/proc.h"
|
||||
#include "opal/util/show_help.h"
|
||||
#include "opal/mca/pmix/base/base.h"
|
||||
@ -111,7 +112,8 @@ int ext2x_server_init(opal_pmix_server_module_t *module,
|
||||
++opal_pmix_base.initialized;
|
||||
|
||||
/* convert the list to an array of pmix_info_t */
|
||||
if (NULL != info && 0 < (sz = opal_list_get_size(info))) {
|
||||
if (NULL != info) {
|
||||
sz = opal_list_get_size(info) + 2;
|
||||
PMIX_INFO_CREATE(pinfo, sz);
|
||||
n = 0;
|
||||
OPAL_LIST_FOREACH(kv, info, opal_value_t) {
|
||||
@ -120,8 +122,8 @@ int ext2x_server_init(opal_pmix_server_module_t *module,
|
||||
++n;
|
||||
}
|
||||
} else {
|
||||
sz = 0;
|
||||
pinfo = NULL;
|
||||
sz = 2;
|
||||
PMIX_INFO_CREATE(pinfo, 2);
|
||||
}
|
||||
|
||||
/* insert ourselves into our list of jobids - it will be the
|
||||
@ -132,6 +134,9 @@ int ext2x_server_init(opal_pmix_server_module_t *module,
|
||||
opal_list_append(&mca_pmix_ext2x_component.jobids, &job->super);
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
|
||||
/* add our nspace and rank to the array going down to the PMIx server */
|
||||
PMIX_INFO_LOAD(&pinfo[sz-2], PMIX_SERVER_NSPACE, job->nspace, PMIX_STRING);
|
||||
PMIX_INFO_LOAD(&pinfo[sz-1], PMIX_SERVER_RANK, &OPAL_PROC_MY_NAME.vpid, PMIX_PROC_RANK);
|
||||
if (PMIX_SUCCESS != (rc = PMIx_server_init(&mymodule, pinfo, sz))) {
|
||||
PMIX_INFO_FREE(pinfo, sz);
|
||||
return ext2x_convert_rc(rc);
|
||||
@ -258,7 +263,8 @@ int ext2x_server_register_nspace(opal_jobid_t jobid,
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
|
||||
/* convert the list to an array of pmix_info_t */
|
||||
if (NULL != info && 0 < (sz = opal_list_get_size(info))) {
|
||||
if (NULL != info) {
|
||||
sz = opal_list_get_size(info);
|
||||
PMIX_INFO_CREATE(pinfo, sz);
|
||||
n = 0;
|
||||
OPAL_LIST_FOREACH(kv, info, opal_value_t) {
|
||||
@ -269,18 +275,16 @@ int ext2x_server_register_nspace(opal_jobid_t jobid,
|
||||
* that list to another array */
|
||||
pmapinfo = (opal_list_t*)kv->data.ptr;
|
||||
szmap = opal_list_get_size(pmapinfo);
|
||||
if (0 < szmap) {
|
||||
PMIX_INFO_CREATE(pmap, szmap);
|
||||
pinfo[n].value.data.darray = (pmix_data_array_t*)calloc(1, sizeof(pmix_data_array_t));
|
||||
pinfo[n].value.data.darray->type = PMIX_INFO;
|
||||
pinfo[n].value.data.darray->array = (struct pmix_info_t*)pmap;
|
||||
pinfo[n].value.data.darray->size = szmap;
|
||||
m = 0;
|
||||
OPAL_LIST_FOREACH(k2, pmapinfo, opal_value_t) {
|
||||
(void)strncpy(pmap[m].key, k2->key, PMIX_MAX_KEYLEN);
|
||||
ext2x_value_load(&pmap[m].value, k2);
|
||||
++m;
|
||||
}
|
||||
PMIX_INFO_CREATE(pmap, szmap);
|
||||
pinfo[n].value.data.darray = (pmix_data_array_t*)calloc(1, sizeof(pmix_data_array_t));
|
||||
pinfo[n].value.data.darray->type = PMIX_INFO;
|
||||
pinfo[n].value.data.darray->array = (struct pmix_info_t*)pmap;
|
||||
pinfo[n].value.data.darray->size = szmap;
|
||||
m = 0;
|
||||
OPAL_LIST_FOREACH(k2, pmapinfo, opal_value_t) {
|
||||
(void)strncpy(pmap[m].key, k2->key, PMIX_MAX_KEYLEN);
|
||||
ext2x_value_load(&pmap[m].value, k2);
|
||||
++m;
|
||||
}
|
||||
OPAL_LIST_RELEASE(pmapinfo);
|
||||
} else {
|
||||
@ -410,9 +414,11 @@ void ext2x_server_deregister_client(const opal_process_name_t *proc,
|
||||
(void)strncpy(p.nspace, jptr->nspace, PMIX_MAX_NSLEN);
|
||||
p.rank = ext2x_convert_opalrank(proc->vpid);
|
||||
OPAL_PMIX_CONSTRUCT_LOCK(&lock);
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
PMIx_server_deregister_client(&p, lkcbfunc, (void*)&lock);
|
||||
OPAL_PMIX_WAIT_THREAD(&lock);
|
||||
OPAL_PMIX_DESTRUCT_LOCK(&lock);
|
||||
OPAL_PMIX_ACQUIRE_THREAD(&opal_pmix_base.lock);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -509,7 +515,8 @@ int ext2x_server_notify_event(int status,
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
|
||||
/* convert the list to an array of pmix_info_t */
|
||||
if (NULL != info && 0 < (sz = opal_list_get_size(info))) {
|
||||
if (NULL != info) {
|
||||
sz = opal_list_get_size(info);
|
||||
PMIX_INFO_CREATE(pinfo, sz);
|
||||
n = 0;
|
||||
OPAL_LIST_FOREACH(kv, info, opal_value_t) {
|
||||
@ -538,9 +545,9 @@ int ext2x_server_notify_event(int status,
|
||||
|
||||
|
||||
rc = ext2x_convert_opalrc(status);
|
||||
/* the range is irrelevant here as the server is passing
|
||||
/* the range must be nonlocal so the server will pass
|
||||
* the event down to its local clients */
|
||||
rc = PMIx_Notify_event(rc, &op->p, PMIX_RANGE_LOCAL,
|
||||
rc = PMIx_Notify_event(rc, &op->p, PMIX_RANGE_SESSION,
|
||||
pinfo, sz, opcbfunc, op);
|
||||
if (PMIX_SUCCESS != rc) {
|
||||
OBJ_RELEASE(op);
|
||||
|
@ -30,7 +30,7 @@ greek=
|
||||
# command, or with the date (if "git describe" fails) in the form of
|
||||
# "date<date>".
|
||||
|
||||
repo_rev=git1aea5a0
|
||||
repo_rev=git439c171
|
||||
|
||||
# If tarball_version is not empty, it is used as the version string in
|
||||
# the tarball filename, regardless of all other versions listed in
|
||||
@ -44,7 +44,7 @@ tarball_version=
|
||||
|
||||
# The date when this release was created
|
||||
|
||||
date="Aug 15, 2017"
|
||||
date="Aug 22, 2017"
|
||||
|
||||
# The shared library version of each of PMIx's public libraries.
|
||||
# These versions are maintained in accordance with the "Library
|
||||
|
@ -111,7 +111,7 @@ static void pmix_client_notify_recv(struct pmix_peer_t *peer,
|
||||
|
||||
cnt=1;
|
||||
PMIX_BFROPS_UNPACK(rc, pmix_client_globals.myserver,
|
||||
buf, &cmd, &cnt, PMIX_CMD);
|
||||
buf, &cmd, &cnt, PMIX_COMMAND);
|
||||
if (PMIX_SUCCESS != rc) {
|
||||
PMIX_ERROR_LOG(rc);
|
||||
PMIX_RELEASE(chain);
|
||||
@ -537,7 +537,7 @@ PMIX_EXPORT pmix_status_t PMIx_Init(pmix_proc_t *proc,
|
||||
* blocking operations and error out if we try them. */
|
||||
req = PMIX_NEW(pmix_buffer_t);
|
||||
PMIX_BFROPS_PACK(rc, pmix_client_globals.myserver,
|
||||
req, &cmd, 1, PMIX_CMD);
|
||||
req, &cmd, 1, PMIX_COMMAND);
|
||||
if (PMIX_SUCCESS != rc) {
|
||||
PMIX_ERROR_LOG(rc);
|
||||
PMIX_RELEASE(req);
|
||||
@ -688,7 +688,7 @@ PMIX_EXPORT pmix_status_t PMIx_Finalize(const pmix_info_t info[], size_t ninfo)
|
||||
msg = PMIX_NEW(pmix_buffer_t);
|
||||
/* pack the cmd */
|
||||
PMIX_BFROPS_PACK(rc, pmix_client_globals.myserver,
|
||||
msg, &cmd, 1, PMIX_CMD);
|
||||
msg, &cmd, 1, PMIX_COMMAND);
|
||||
if (PMIX_SUCCESS != rc) {
|
||||
PMIX_ERROR_LOG(rc);
|
||||
PMIX_RELEASE(msg);
|
||||
@ -781,7 +781,7 @@ PMIX_EXPORT pmix_status_t PMIx_Abort(int flag, const char msg[],
|
||||
bfr = PMIX_NEW(pmix_buffer_t);
|
||||
/* pack the cmd */
|
||||
PMIX_BFROPS_PACK(rc, pmix_client_globals.myserver,
|
||||
bfr, &cmd, 1, PMIX_CMD);
|
||||
bfr, &cmd, 1, PMIX_COMMAND);
|
||||
if (PMIX_SUCCESS != rc) {
|
||||
PMIX_ERROR_LOG(rc);
|
||||
PMIX_RELEASE(bfr);
|
||||
@ -955,7 +955,7 @@ static void _commitfn(int sd, short args, void *cbdata)
|
||||
msgout = PMIX_NEW(pmix_buffer_t);
|
||||
/* pack the cmd */
|
||||
PMIX_BFROPS_PACK(rc, pmix_client_globals.myserver,
|
||||
msgout, &cmd, 1, PMIX_CMD);
|
||||
msgout, &cmd, 1, PMIX_COMMAND);
|
||||
if (PMIX_SUCCESS != rc) {
|
||||
PMIX_ERROR_LOG(rc);
|
||||
PMIX_RELEASE(msgout);
|
||||
|
@ -142,7 +142,7 @@ PMIX_EXPORT pmix_status_t PMIx_Connect_nb(const pmix_proc_t procs[], size_t npro
|
||||
msg = PMIX_NEW(pmix_buffer_t);
|
||||
/* pack the cmd */
|
||||
PMIX_BFROPS_PACK(rc, pmix_client_globals.myserver,
|
||||
msg, &cmd, 1, PMIX_CMD);
|
||||
msg, &cmd, 1, PMIX_COMMAND);
|
||||
if (PMIX_SUCCESS != rc) {
|
||||
PMIX_ERROR_LOG(rc);
|
||||
return rc;
|
||||
@ -272,7 +272,7 @@ PMIX_EXPORT pmix_status_t PMIx_Disconnect_nb(const pmix_proc_t procs[], size_t n
|
||||
msg = PMIX_NEW(pmix_buffer_t);
|
||||
/* pack the cmd */
|
||||
PMIX_BFROPS_PACK(rc, pmix_client_globals.myserver,
|
||||
msg, &cmd, 1, PMIX_CMD);
|
||||
msg, &cmd, 1, PMIX_COMMAND);
|
||||
if (PMIX_SUCCESS != rc) {
|
||||
PMIX_ERROR_LOG(rc);
|
||||
return rc;
|
||||
|
@ -209,7 +209,7 @@ static pmix_status_t pack_fence(pmix_buffer_t *msg, pmix_cmd_t cmd,
|
||||
|
||||
/* pack the cmd */
|
||||
PMIX_BFROPS_PACK(rc, pmix_client_globals.myserver,
|
||||
msg, &cmd, 1, PMIX_CMD);
|
||||
msg, &cmd, 1, PMIX_COMMAND);
|
||||
if (PMIX_SUCCESS != rc) {
|
||||
PMIX_ERROR_LOG(rc);
|
||||
return rc;
|
||||
|
@ -215,7 +215,7 @@ static pmix_buffer_t* _pack_get(char *nspace, pmix_rank_t rank,
|
||||
msg = PMIX_NEW(pmix_buffer_t);
|
||||
/* pack the get cmd */
|
||||
PMIX_BFROPS_PACK(rc, pmix_client_globals.myserver,
|
||||
msg, &cmd, 1, PMIX_CMD);
|
||||
msg, &cmd, 1, PMIX_COMMAND);
|
||||
if (PMIX_SUCCESS != rc) {
|
||||
PMIX_ERROR_LOG(rc);
|
||||
PMIX_RELEASE(msg);
|
||||
|
@ -142,7 +142,7 @@ PMIX_EXPORT pmix_status_t PMIx_Publish_nb(const pmix_info_t info[], size_t ninfo
|
||||
msg = PMIX_NEW(pmix_buffer_t);
|
||||
/* pack the cmd */
|
||||
PMIX_BFROPS_PACK(rc, pmix_client_globals.myserver,
|
||||
msg, &cmd, 1, PMIX_CMD);
|
||||
msg, &cmd, 1, PMIX_COMMAND);
|
||||
if (PMIX_SUCCESS != rc) {
|
||||
PMIX_ERROR_LOG(rc);
|
||||
PMIX_RELEASE(msg);
|
||||
@ -291,7 +291,7 @@ PMIX_EXPORT pmix_status_t PMIx_Lookup_nb(char **keys,
|
||||
msg = PMIX_NEW(pmix_buffer_t);
|
||||
/* pack the cmd */
|
||||
PMIX_BFROPS_PACK(rc, pmix_client_globals.myserver,
|
||||
msg, &cmd, 1, PMIX_CMD);
|
||||
msg, &cmd, 1, PMIX_COMMAND);
|
||||
if (PMIX_SUCCESS != rc) {
|
||||
PMIX_ERROR_LOG(rc);
|
||||
PMIX_RELEASE(msg);
|
||||
@ -437,7 +437,7 @@ PMIX_EXPORT pmix_status_t PMIx_Unpublish_nb(char **keys,
|
||||
msg = PMIX_NEW(pmix_buffer_t);
|
||||
/* pack the cmd */
|
||||
PMIX_BFROPS_PACK(rc, pmix_client_globals.myserver,
|
||||
msg, &cmd, 1, PMIX_CMD);
|
||||
msg, &cmd, 1, PMIX_COMMAND);
|
||||
if (PMIX_SUCCESS != rc) {
|
||||
PMIX_ERROR_LOG(rc);
|
||||
PMIX_RELEASE(msg);
|
||||
|
@ -140,7 +140,7 @@ PMIX_EXPORT pmix_status_t PMIx_Spawn_nb(const pmix_info_t job_info[], size_t nin
|
||||
msg = PMIX_NEW(pmix_buffer_t);
|
||||
/* pack the cmd */
|
||||
PMIX_BFROPS_PACK(rc, pmix_client_globals.myserver,
|
||||
msg, &cmd, 1, PMIX_CMD);
|
||||
msg, &cmd, 1, PMIX_COMMAND);
|
||||
if (PMIX_SUCCESS != rc) {
|
||||
PMIX_ERROR_LOG(rc);
|
||||
PMIX_RELEASE(msg);
|
||||
|
@ -142,7 +142,7 @@ PMIX_EXPORT pmix_status_t PMIx_Job_control_nb(const pmix_proc_t targets[], size_
|
||||
msg = PMIX_NEW(pmix_buffer_t);
|
||||
/* pack the cmd */
|
||||
PMIX_BFROPS_PACK(rc, pmix_client_globals.myserver,
|
||||
msg, &cmd, 1, PMIX_CMD);
|
||||
msg, &cmd, 1, PMIX_COMMAND);
|
||||
if (PMIX_SUCCESS != rc) {
|
||||
PMIX_ERROR_LOG(rc);
|
||||
PMIX_RELEASE(msg);
|
||||
@ -250,7 +250,7 @@ PMIX_EXPORT pmix_status_t PMIx_Process_monitor_nb(const pmix_info_t *monitor, pm
|
||||
msg = PMIX_NEW(pmix_buffer_t);
|
||||
/* pack the cmd */
|
||||
PMIX_BFROPS_PACK(rc, pmix_client_globals.myserver,
|
||||
msg, &cmd, 1, PMIX_CMD);
|
||||
msg, &cmd, 1, PMIX_COMMAND);
|
||||
if (PMIX_SUCCESS != rc) {
|
||||
PMIX_ERROR_LOG(rc);
|
||||
PMIX_RELEASE(msg);
|
||||
|
@ -104,7 +104,7 @@ PMIX_EXPORT pmix_status_t PMIx_Log_nb(const pmix_info_t data[], size_t ndata,
|
||||
cd->cbdata = cbdata;
|
||||
msg = PMIX_NEW(pmix_buffer_t);
|
||||
PMIX_BFROPS_PACK(rc, pmix_client_globals.myserver,
|
||||
msg, &cmd, 1, PMIX_CMD);
|
||||
msg, &cmd, 1, PMIX_COMMAND);
|
||||
if (PMIX_SUCCESS != rc) {
|
||||
PMIX_ERROR_LOG(rc);
|
||||
PMIX_RELEASE(msg);
|
||||
|
@ -146,7 +146,7 @@ PMIX_EXPORT pmix_status_t PMIx_Query_info_nb(pmix_query_t queries[], size_t nque
|
||||
cd->cbdata = cbdata;
|
||||
msg = PMIX_NEW(pmix_buffer_t);
|
||||
PMIX_BFROPS_PACK(rc, pmix_client_globals.myserver,
|
||||
msg, &cmd, 1, PMIX_CMD);
|
||||
msg, &cmd, 1, PMIX_COMMAND);
|
||||
if (PMIX_SUCCESS != rc) {
|
||||
PMIX_ERROR_LOG(rc);
|
||||
PMIX_RELEASE(msg);
|
||||
@ -222,7 +222,7 @@ PMIX_EXPORT pmix_status_t PMIx_Allocation_request_nb(pmix_alloc_directive_t dire
|
||||
msg = PMIX_NEW(pmix_buffer_t);
|
||||
/* pack the cmd */
|
||||
PMIX_BFROPS_PACK(rc, pmix_client_globals.myserver,
|
||||
msg, &cmd, 1, PMIX_CMD);
|
||||
msg, &cmd, 1, PMIX_COMMAND);
|
||||
if (PMIX_SUCCESS != rc) {
|
||||
PMIX_ERROR_LOG(rc);
|
||||
PMIX_RELEASE(msg);
|
||||
|
@ -126,7 +126,7 @@ static pmix_status_t notify_server_of_event(pmix_status_t status,
|
||||
msg = PMIX_NEW(pmix_buffer_t);
|
||||
|
||||
/* pack the command */
|
||||
PMIX_BFROPS_PACK(rc, pmix_client_globals.myserver, msg, &cmd, 1, PMIX_CMD);
|
||||
PMIX_BFROPS_PACK(rc, pmix_client_globals.myserver, msg, &cmd, 1, PMIX_COMMAND);
|
||||
if (PMIX_SUCCESS != rc) {
|
||||
PMIX_ERROR_LOG(rc);
|
||||
goto cleanup;
|
||||
@ -800,10 +800,8 @@ static void _notify_client_event(int sd, short args, void *cbdata)
|
||||
PMIX_ACQUIRE_OBJECT(cd);
|
||||
|
||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
||||
"pmix_server: _notify_client_event notifying clients of event %s range %s type %s",
|
||||
PMIx_Error_string(cd->status),
|
||||
PMIx_Data_range_string(cd->range),
|
||||
cd->nondefault ? "NONDEFAULT" : "OPEN");
|
||||
"pmix_server: _notify_client_event notifying clients of event %s",
|
||||
PMIx_Error_string(cd->status));
|
||||
|
||||
/* we cannot know if everyone who wants this notice has had a chance
|
||||
* to register for it - the notice may be coming too early. So cache
|
||||
@ -858,7 +856,7 @@ static void _notify_client_event(int sd, short args, void *cbdata)
|
||||
continue;
|
||||
}
|
||||
/* pack the command */
|
||||
PMIX_BFROPS_PACK(rc, pr->peer, bfr, &cmd, 1, PMIX_CMD);
|
||||
PMIX_BFROPS_PACK(rc, pr->peer, bfr, &cmd, 1, PMIX_COMMAND);
|
||||
if (PMIX_SUCCESS != rc) {
|
||||
PMIX_ERROR_LOG(rc);
|
||||
PMIX_RELEASE(bfr);
|
||||
|
@ -178,7 +178,7 @@ static pmix_status_t _send_to_server(pmix_rshift_caddy_t *rcd)
|
||||
|
||||
msg = PMIX_NEW(pmix_buffer_t);
|
||||
/* pack the cmd */
|
||||
PMIX_BFROPS_PACK(rc, pmix_client_globals.myserver, msg, &cmd, 1, PMIX_CMD);
|
||||
PMIX_BFROPS_PACK(rc, pmix_client_globals.myserver, msg, &cmd, 1, PMIX_COMMAND);
|
||||
if (PMIX_SUCCESS != rc) {
|
||||
PMIX_ERROR_LOG(rc);
|
||||
return rc;
|
||||
@ -826,7 +826,7 @@ static void dereg_event_hdlr(int sd, short args, void *cbdata)
|
||||
if (!PMIX_PROC_IS_SERVER) {
|
||||
msg = PMIX_NEW(pmix_buffer_t);
|
||||
PMIX_BFROPS_PACK(rc, pmix_client_globals.myserver,
|
||||
msg, &cmd, 1, PMIX_CMD);
|
||||
msg, &cmd, 1, PMIX_COMMAND);
|
||||
if (PMIX_SUCCESS != rc) {
|
||||
PMIX_RELEASE(msg);
|
||||
goto cleanup;
|
||||
|
@ -69,7 +69,6 @@ PMIX_CLASS_DECLARATION(pmix_namelist_t);
|
||||
/* define a command type for communicating to the
|
||||
* pmix server */
|
||||
typedef uint32_t pmix_cmd_t;
|
||||
#define PMIX_CMD PMIX_UINT32
|
||||
|
||||
/* define some commands */
|
||||
#define PMIX_REQ_CMD 0
|
||||
|
@ -1040,7 +1040,7 @@ pmix_status_t pmix_bfrops_base_print_cmd(char **output, char *prefix,
|
||||
prefx = prefix;
|
||||
}
|
||||
|
||||
if (0 > asprintf(output, "%sData type: PMIX_CMD\tValue: %s",
|
||||
if (0 > asprintf(output, "%sData type: PMIX_COMMAND\tValue: %s",
|
||||
prefx, pmix_command_string(*src))) {
|
||||
return PMIX_ERR_NOMEM;
|
||||
}
|
||||
|
@ -319,9 +319,6 @@ static pmix_status_t connect_to_peer(struct pmix_peer_t *peer,
|
||||
|
||||
/* do a final bozo check */
|
||||
if (NULL == nspace || PMIX_RANK_WILDCARD == rank) {
|
||||
if (NULL != nspace) {
|
||||
free(nspace);
|
||||
}
|
||||
CLOSE_THE_SOCKET(sd);
|
||||
return PMIX_ERR_UNREACH;
|
||||
}
|
||||
|
@ -2097,7 +2097,7 @@ static pmix_status_t server_switchyard(pmix_peer_t *peer, uint32_t tag,
|
||||
|
||||
/* retrieve the cmd */
|
||||
cnt = 1;
|
||||
PMIX_BFROPS_UNPACK(rc, peer, buf, &cmd, &cnt, PMIX_CMD);
|
||||
PMIX_BFROPS_UNPACK(rc, peer, buf, &cmd, &cnt, PMIX_COMMAND);
|
||||
if (PMIX_SUCCESS != rc) {
|
||||
PMIX_ERROR_LOG(rc);
|
||||
return rc;
|
||||
|
@ -1497,7 +1497,7 @@ pmix_status_t pmix_server_register_events(pmix_peer_t *peer,
|
||||
return PMIX_ERR_NOMEM;
|
||||
}
|
||||
/* pack the info data stored in the event */
|
||||
PMIX_BFROPS_PACK(rc, peer, relay, &cmd, 1, PMIX_CMD);
|
||||
PMIX_BFROPS_PACK(rc, peer, relay, &cmd, 1, PMIX_COMMAND);
|
||||
if (PMIX_SUCCESS != rc) {
|
||||
PMIX_ERROR_LOG(rc);
|
||||
break;
|
||||
|
@ -100,7 +100,7 @@ static void pmix_tool_notify_recv(struct pmix_peer_t *peer,
|
||||
|
||||
cnt=1;
|
||||
PMIX_BFROPS_UNPACK(rc, pmix_client_globals.myserver,
|
||||
buf, &cmd, &cnt, PMIX_CMD);
|
||||
buf, &cmd, &cnt, PMIX_COMMAND);
|
||||
if (PMIX_SUCCESS != rc) {
|
||||
PMIX_ERROR_LOG(rc);
|
||||
goto error;
|
||||
@ -652,7 +652,7 @@ PMIX_EXPORT pmix_status_t PMIx_tool_finalize(void)
|
||||
msg = PMIX_NEW(pmix_buffer_t);
|
||||
/* pack the cmd */
|
||||
PMIX_BFROPS_PACK(rc, pmix_client_globals.myserver,
|
||||
msg, &cmd, 1, PMIX_CMD);
|
||||
msg, &cmd, 1, PMIX_COMMAND);
|
||||
if (PMIX_SUCCESS != rc) {
|
||||
PMIX_ERROR_LOG(rc);
|
||||
PMIX_RELEASE(msg);
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user