Sync with PMIx master
Implement direct modex protection to turn off PMIx dstore when direct modex scenario is detected Signed-off-by: Ralph Castain <rhc@open-mpi.org>
Этот коммит содержится в:
родитель
291d22c0a4
Коммит
d4b83cc951
1
.gitignore
поставляемый
1
.gitignore
поставляемый
@ -319,6 +319,7 @@ opal/mca/pmix/pmix*/pmix/src/mca/pinstalldirs/config/pinstall_dirs.h
|
|||||||
opal/mca/pmix/pmix*/pmix/config/autogen_found_items.m4
|
opal/mca/pmix/pmix*/pmix/config/autogen_found_items.m4
|
||||||
opal/mca/pmix/pmix*/pmix/src/include/pmix_config.h
|
opal/mca/pmix/pmix*/pmix/src/include/pmix_config.h
|
||||||
opal/mca/pmix/pmix*/pmix/src/include/pmix_config.h.in
|
opal/mca/pmix/pmix*/pmix/src/include/pmix_config.h.in
|
||||||
|
opal/mca/pmix/pmix*/pmix/include/pmix_common.h
|
||||||
opal/mca/pmix/pmix*/pmix/include/pmix_rename.h
|
opal/mca/pmix/pmix*/pmix/include/pmix_rename.h
|
||||||
opal/mca/pmix/pmix*/pmix/include/pmix_version.h
|
opal/mca/pmix/pmix*/pmix/include/pmix_version.h
|
||||||
opal/mca/pmix/pmix*/pmix/src/util/keyval/keyval_lex.c
|
opal/mca/pmix/pmix*/pmix/src/util/keyval/keyval_lex.c
|
||||||
|
@ -30,7 +30,7 @@ greek=
|
|||||||
# command, or with the date (if "git describe" fails) in the form of
|
# command, or with the date (if "git describe" fails) in the form of
|
||||||
# "date<date>".
|
# "date<date>".
|
||||||
|
|
||||||
repo_rev=git877b4d8
|
repo_rev=git9137d98
|
||||||
|
|
||||||
# If tarball_version is not empty, it is used as the version string in
|
# If tarball_version is not empty, it is used as the version string in
|
||||||
# the tarball filename, regardless of all other versions listed in
|
# the tarball filename, regardless of all other versions listed in
|
||||||
@ -44,7 +44,7 @@ tarball_version=
|
|||||||
|
|
||||||
# The date when this release was created
|
# The date when this release was created
|
||||||
|
|
||||||
date="Oct 30, 2017"
|
date="Nov 07, 2017"
|
||||||
|
|
||||||
# The shared library version of each of PMIx's public libraries.
|
# The shared library version of each of PMIx's public libraries.
|
||||||
# These versions are maintained in accordance with the "Library
|
# These versions are maintained in accordance with the "Library
|
||||||
|
@ -819,6 +819,8 @@ AC_DEFUN([PMIX_SETUP_CORE],[
|
|||||||
|
|
||||||
pmix_show_subtitle "Final output"
|
pmix_show_subtitle "Final output"
|
||||||
|
|
||||||
|
AC_CONFIG_HEADERS(pmix_config_prefix[include/pmix_common.h])
|
||||||
|
|
||||||
AC_CONFIG_FILES(
|
AC_CONFIG_FILES(
|
||||||
pmix_config_prefix[Makefile]
|
pmix_config_prefix[Makefile]
|
||||||
pmix_config_prefix[config/Makefile]
|
pmix_config_prefix[config/Makefile]
|
||||||
|
@ -232,7 +232,7 @@ int main(int argc, char **argv)
|
|||||||
pmix_info_t *info;
|
pmix_info_t *info;
|
||||||
pmix_app_t *app;
|
pmix_app_t *app;
|
||||||
size_t ninfo, napps;
|
size_t ninfo, napps;
|
||||||
char *tdir, *filename, *sdir, *str, *nspace = NULL;
|
char *nspace = NULL;
|
||||||
char appspace[PMIX_MAX_NSLEN+1];
|
char appspace[PMIX_MAX_NSLEN+1];
|
||||||
int i;
|
int i;
|
||||||
pmix_query_t *query;
|
pmix_query_t *query;
|
||||||
@ -241,7 +241,6 @@ int main(int argc, char **argv)
|
|||||||
bool cospawn = false, stop_on_exec = false;
|
bool cospawn = false, stop_on_exec = false;
|
||||||
char cwd[1024];
|
char cwd[1024];
|
||||||
pmix_status_t code = PMIX_ERR_JOB_TERMINATED;
|
pmix_status_t code = PMIX_ERR_JOB_TERMINATED;
|
||||||
char hostname[1024];
|
|
||||||
mylock_t mylock;
|
mylock_t mylock;
|
||||||
|
|
||||||
/* Process any arguments we were given */
|
/* Process any arguments we were given */
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
if WANT_PRIMARY_HEADERS
|
if WANT_PRIMARY_HEADERS
|
||||||
include_HEADERS = \
|
include_HEADERS = \
|
||||||
pmix.h \
|
pmix.h \
|
||||||
pmix_common.h \
|
|
||||||
pmix_server.h \
|
pmix_server.h \
|
||||||
pmix_tool.h
|
pmix_tool.h
|
||||||
|
|
||||||
@ -24,6 +23,7 @@ include_HEADERS += \
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
nodist_include_HEADERS = \
|
nodist_include_HEADERS = \
|
||||||
|
pmix_common.h \
|
||||||
pmix_version.h \
|
pmix_version.h \
|
||||||
pmix_rename.h
|
pmix_rename.h
|
||||||
|
|
||||||
|
@ -61,12 +61,16 @@
|
|||||||
#include <unistd.h> /* for uid_t and gid_t */
|
#include <unistd.h> /* for uid_t and gid_t */
|
||||||
#include <sys/types.h> /* for uid_t and gid_t */
|
#include <sys/types.h> /* for uid_t and gid_t */
|
||||||
|
|
||||||
#ifdef PMIX_HAVE_VISIBILITY
|
/* Whether C compiler supports -fvisibility */
|
||||||
|
#undef PMIX_HAVE_VISIBILITY
|
||||||
|
|
||||||
|
#if PMIX_HAVE_VISIBILITY == 1
|
||||||
#define PMIX_EXPORT __attribute__((__visibility__("default")))
|
#define PMIX_EXPORT __attribute__((__visibility__("default")))
|
||||||
#else
|
#else
|
||||||
#define PMIX_EXPORT
|
#define PMIX_EXPORT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#include <pmix_rename.h>
|
#include <pmix_rename.h>
|
||||||
#include <pmix_version.h>
|
#include <pmix_version.h>
|
||||||
|
|
@ -97,7 +97,7 @@ static void pmix_client_notify_recv(struct pmix_peer_t *peer,
|
|||||||
pmix_event_chain_t *chain;
|
pmix_event_chain_t *chain;
|
||||||
size_t ninfo;
|
size_t ninfo;
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_client_globals.base_output,
|
||||||
"pmix:client_notify_recv - processing event");
|
"pmix:client_notify_recv - processing event");
|
||||||
|
|
||||||
/* a zero-byte buffer indicates that this recv is being
|
/* a zero-byte buffer indicates that this recv is being
|
||||||
@ -182,7 +182,7 @@ static void pmix_client_notify_recv(struct pmix_peer_t *peer,
|
|||||||
/* now put the callback object tag in the last element */
|
/* now put the callback object tag in the last element */
|
||||||
PMIX_INFO_LOAD(&chain->info[ninfo], PMIX_EVENT_RETURN_OBJECT, NULL, PMIX_POINTER);
|
PMIX_INFO_LOAD(&chain->info[ninfo], PMIX_EVENT_RETURN_OBJECT, NULL, PMIX_POINTER);
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_client_globals.base_output,
|
||||||
"[%s:%d] pmix:client_notify_recv - processing event %d, calling errhandler",
|
"[%s:%d] pmix:client_notify_recv - processing event %d, calling errhandler",
|
||||||
pmix_globals.myid.nspace, pmix_globals.myid.rank, chain->status);
|
pmix_globals.myid.nspace, pmix_globals.myid.rank, chain->status);
|
||||||
|
|
||||||
@ -191,7 +191,7 @@ static void pmix_client_notify_recv(struct pmix_peer_t *peer,
|
|||||||
|
|
||||||
error:
|
error:
|
||||||
/* we always need to return */
|
/* we always need to return */
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_client_globals.base_output,
|
||||||
"pmix:client_notify_recv - unpack error status =%d, calling def errhandler", rc);
|
"pmix:client_notify_recv - unpack error status =%d, calling def errhandler", rc);
|
||||||
chain = PMIX_NEW(pmix_event_chain_t);
|
chain = PMIX_NEW(pmix_event_chain_t);
|
||||||
if (NULL == chain) {
|
if (NULL == chain) {
|
||||||
@ -212,7 +212,7 @@ static void wait_cbfunc(struct pmix_peer_t *pr,
|
|||||||
{
|
{
|
||||||
pmix_lock_t *lock = (pmix_lock_t*)cbdata;
|
pmix_lock_t *lock = (pmix_lock_t*)cbdata;
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_client_globals.base_output,
|
||||||
"pmix:client wait_cbfunc received");
|
"pmix:client wait_cbfunc received");
|
||||||
PMIX_WAKEUP_THREAD(lock);
|
PMIX_WAKEUP_THREAD(lock);
|
||||||
}
|
}
|
||||||
@ -418,8 +418,15 @@ PMIX_EXPORT pmix_status_t PMIx_Init(pmix_proc_t *proc,
|
|||||||
PMIX_CONSTRUCT(&pmix_globals.notifications, pmix_ring_buffer_t);
|
PMIX_CONSTRUCT(&pmix_globals.notifications, pmix_ring_buffer_t);
|
||||||
pmix_ring_buffer_init(&pmix_globals.notifications, 256);
|
pmix_ring_buffer_init(&pmix_globals.notifications, 256);
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_client_globals.base_output,
|
||||||
"pmix: init called");
|
"pmix: init called");
|
||||||
|
/* setup the base verbosity */
|
||||||
|
if (0 < pmix_client_globals.base_verbose) {
|
||||||
|
/* set default output */
|
||||||
|
pmix_client_globals.base_output = pmix_output_open(NULL);
|
||||||
|
pmix_output_set_verbosity(pmix_client_globals.base_output,
|
||||||
|
pmix_client_globals.base_verbose);
|
||||||
|
}
|
||||||
|
|
||||||
/* we require our nspace */
|
/* we require our nspace */
|
||||||
if (NULL == (evar = getenv("PMIX_NAMESPACE"))) {
|
if (NULL == (evar = getenv("PMIX_NAMESPACE"))) {
|
||||||
@ -618,7 +625,7 @@ static void fin_timeout(int sd, short args, void *cbdata)
|
|||||||
pmix_client_timeout_t *tev;
|
pmix_client_timeout_t *tev;
|
||||||
tev = (pmix_client_timeout_t*)cbdata;
|
tev = (pmix_client_timeout_t*)cbdata;
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_client_globals.base_output,
|
||||||
"pmix:client finwait timeout fired");
|
"pmix:client finwait timeout fired");
|
||||||
if (tev->active) {
|
if (tev->active) {
|
||||||
tev->active = false;
|
tev->active = false;
|
||||||
@ -633,7 +640,7 @@ static void finwait_cbfunc(struct pmix_peer_t *pr,
|
|||||||
pmix_client_timeout_t *tev;
|
pmix_client_timeout_t *tev;
|
||||||
tev = (pmix_client_timeout_t*)cbdata;
|
tev = (pmix_client_timeout_t*)cbdata;
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_client_globals.base_output,
|
||||||
"pmix:client finwait_cbfunc received");
|
"pmix:client finwait_cbfunc received");
|
||||||
if (tev->active) {
|
if (tev->active) {
|
||||||
tev->active = false;
|
tev->active = false;
|
||||||
@ -658,7 +665,7 @@ PMIX_EXPORT pmix_status_t PMIx_Finalize(const pmix_info_t info[], size_t ninfo)
|
|||||||
}
|
}
|
||||||
pmix_globals.init_cntr = 0;
|
pmix_globals.init_cntr = 0;
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_client_globals.base_output,
|
||||||
"%s:%d pmix:client finalize called",
|
"%s:%d pmix:client finalize called",
|
||||||
pmix_globals.myid.nspace, pmix_globals.myid.rank);
|
pmix_globals.myid.nspace, pmix_globals.myid.rank);
|
||||||
|
|
||||||
@ -696,7 +703,7 @@ PMIX_EXPORT pmix_status_t PMIx_Finalize(const pmix_info_t info[], size_t ninfo)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_client_globals.base_output,
|
||||||
"%s:%d pmix:client sending finalize sync to server",
|
"%s:%d pmix:client sending finalize sync to server",
|
||||||
pmix_globals.myid.nspace, pmix_globals.myid.rank);
|
pmix_globals.myid.nspace, pmix_globals.myid.rank);
|
||||||
|
|
||||||
@ -723,7 +730,7 @@ PMIX_EXPORT pmix_status_t PMIx_Finalize(const pmix_info_t info[], size_t ninfo)
|
|||||||
pmix_event_del(&tev.ev);
|
pmix_event_del(&tev.ev);
|
||||||
}
|
}
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_client_globals.base_output,
|
||||||
"%s:%d pmix:client finalize sync received",
|
"%s:%d pmix:client finalize sync received",
|
||||||
pmix_globals.myid.nspace, pmix_globals.myid.rank);
|
pmix_globals.myid.nspace, pmix_globals.myid.rank);
|
||||||
}
|
}
|
||||||
@ -760,7 +767,7 @@ PMIX_EXPORT pmix_status_t PMIx_Abort(int flag, const char msg[],
|
|||||||
pmix_status_t rc;
|
pmix_status_t rc;
|
||||||
pmix_lock_t reglock;
|
pmix_lock_t reglock;
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_client_globals.base_output,
|
||||||
"pmix:client abort called");
|
"pmix:client abort called");
|
||||||
|
|
||||||
PMIX_ACQUIRE_THREAD(&pmix_global_lock);
|
PMIX_ACQUIRE_THREAD(&pmix_global_lock);
|
||||||
@ -911,7 +918,7 @@ PMIX_EXPORT pmix_status_t PMIx_Put(pmix_scope_t scope, const char key[], pmix_va
|
|||||||
pmix_cb_t *cb;
|
pmix_cb_t *cb;
|
||||||
pmix_status_t rc;
|
pmix_status_t rc;
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_client_globals.base_output,
|
||||||
"pmix: executing put for key %s type %d",
|
"pmix: executing put for key %s type %d",
|
||||||
key, val->type);
|
key, val->type);
|
||||||
|
|
||||||
|
@ -91,6 +91,12 @@ PMIX_EXPORT pmix_status_t PMIx_Get(const pmix_proc_t *proc, const char key[],
|
|||||||
}
|
}
|
||||||
PMIX_RELEASE_THREAD(&pmix_global_lock);
|
PMIX_RELEASE_THREAD(&pmix_global_lock);
|
||||||
|
|
||||||
|
pmix_output_verbose(2, pmix_client_globals.get_verbose,
|
||||||
|
"pmix:client get for %s:%d key %s",
|
||||||
|
(NULL == proc) ? "NULL" : proc->nspace,
|
||||||
|
(NULL == proc) ? PMIX_RANK_UNDEF : proc->rank,
|
||||||
|
(NULL == key) ? "NULL" : key);
|
||||||
|
|
||||||
/* create a callback object as we need to pass it to the
|
/* create a callback object as we need to pass it to the
|
||||||
* recv routine so we know which callback to use when
|
* recv routine so we know which callback to use when
|
||||||
* the return message is recvd */
|
* the return message is recvd */
|
||||||
@ -108,7 +114,7 @@ PMIX_EXPORT pmix_status_t PMIx_Get(const pmix_proc_t *proc, const char key[],
|
|||||||
}
|
}
|
||||||
PMIX_RELEASE(cb);
|
PMIX_RELEASE(cb);
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_client_globals.get_verbose,
|
||||||
"pmix:client get completed");
|
"pmix:client get completed");
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
@ -142,12 +148,16 @@ PMIX_EXPORT pmix_status_t PMIx_Get_nb(const pmix_proc_t *proc, const char *key,
|
|||||||
* Either case is supported. However, we don't currently
|
* Either case is supported. However, we don't currently
|
||||||
* support the case where -both- values are NULL */
|
* support the case where -both- values are NULL */
|
||||||
if (NULL == proc && NULL == key) {
|
if (NULL == proc && NULL == key) {
|
||||||
|
pmix_output_verbose(2, pmix_client_globals.get_verbose,
|
||||||
|
"pmix: get_nb value error - both proc and key are NULL");
|
||||||
return PMIX_ERR_BAD_PARAM;
|
return PMIX_ERR_BAD_PARAM;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if the key is NULL, the rank cannot be WILDCARD as
|
/* if the key is NULL, the rank cannot be WILDCARD as
|
||||||
* we cannot return all info from every rank */
|
* we cannot return all info from every rank */
|
||||||
if (NULL != proc && PMIX_RANK_WILDCARD == proc->rank && NULL == key) {
|
if (NULL != proc && PMIX_RANK_WILDCARD == proc->rank && NULL == key) {
|
||||||
|
pmix_output_verbose(2, pmix_client_globals.get_verbose,
|
||||||
|
"pmix: get_nb value error - WILDCARD rank and key is NULL");
|
||||||
return PMIX_ERR_BAD_PARAM;
|
return PMIX_ERR_BAD_PARAM;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -168,7 +178,7 @@ PMIX_EXPORT pmix_status_t PMIx_Get_nb(const pmix_proc_t *proc, const char *key,
|
|||||||
rank = proc->rank;
|
rank = proc->rank;
|
||||||
}
|
}
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_client_globals.get_verbose,
|
||||||
"pmix: get_nb value for proc %s:%u key %s",
|
"pmix: get_nb value for proc %s:%u key %s",
|
||||||
nm, rank, (NULL == key) ? "NULL" : key);
|
nm, rank, (NULL == key) ? "NULL" : key);
|
||||||
|
|
||||||
@ -273,7 +283,7 @@ static void _getnb_cbfunc(struct pmix_peer_t *pr,
|
|||||||
pmix_proc_t proc;
|
pmix_proc_t proc;
|
||||||
pmix_kval_t *kv;
|
pmix_kval_t *kv;
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_client_globals.get_verbose,
|
||||||
"pmix: get_nb callback recvd");
|
"pmix: get_nb callback recvd");
|
||||||
|
|
||||||
if (NULL == cb) {
|
if (NULL == cb) {
|
||||||
@ -479,7 +489,7 @@ static void _getnbfn(int fd, short flags, void *cbdata)
|
|||||||
/* cb was passed to us from another thread - acquire it */
|
/* cb was passed to us from another thread - acquire it */
|
||||||
PMIX_ACQUIRE_OBJECT(cb);
|
PMIX_ACQUIRE_OBJECT(cb);
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_client_globals.get_verbose,
|
||||||
"pmix: getnbfn value for proc %s:%u key %s",
|
"pmix: getnbfn value for proc %s:%u key %s",
|
||||||
cb->pname.nspace, cb->pname.rank,
|
cb->pname.nspace, cb->pname.rank,
|
||||||
(NULL == cb->key) ? "NULL" : cb->key);
|
(NULL == cb->key) ? "NULL" : cb->key);
|
||||||
@ -517,9 +527,13 @@ static void _getnbfn(int fd, short flags, void *cbdata)
|
|||||||
cb->copy = true;
|
cb->copy = true;
|
||||||
PMIX_GDS_FETCH_KV(rc, pmix_globals.mypeer, cb);
|
PMIX_GDS_FETCH_KV(rc, pmix_globals.mypeer, cb);
|
||||||
if (PMIX_SUCCESS == rc) {
|
if (PMIX_SUCCESS == rc) {
|
||||||
|
pmix_output_verbose(5, pmix_client_globals.get_verbose,
|
||||||
|
"pmix:client data found in internal storage");
|
||||||
rc = process_values(&val, cb);
|
rc = process_values(&val, cb);
|
||||||
goto respond;
|
goto respond;
|
||||||
}
|
}
|
||||||
|
pmix_output_verbose(5, pmix_client_globals.get_verbose,
|
||||||
|
"pmix:client data NOT found in internal storage");
|
||||||
|
|
||||||
/* if the key is NULL or starts with "pmix", then they are looking
|
/* if the key is NULL or starts with "pmix", then they are looking
|
||||||
* for data that was provided by the server at startup */
|
* for data that was provided by the server at startup */
|
||||||
@ -530,6 +544,8 @@ static void _getnbfn(int fd, short flags, void *cbdata)
|
|||||||
cb->copy = true;
|
cb->copy = true;
|
||||||
PMIX_GDS_FETCH_KV(rc, pmix_client_globals.myserver, cb);
|
PMIX_GDS_FETCH_KV(rc, pmix_client_globals.myserver, cb);
|
||||||
if (PMIX_SUCCESS != rc) {
|
if (PMIX_SUCCESS != rc) {
|
||||||
|
pmix_output_verbose(5, pmix_client_globals.get_verbose,
|
||||||
|
"pmix:client job-level data NOT found");
|
||||||
if (0 != strncmp(cb->pname.nspace, pmix_globals.myid.nspace, PMIX_MAX_NSLEN)) {
|
if (0 != strncmp(cb->pname.nspace, pmix_globals.myid.nspace, PMIX_MAX_NSLEN)) {
|
||||||
/* we are asking about the job-level info from another
|
/* we are asking about the job-level info from another
|
||||||
* namespace. It seems that we don't have it - go and
|
* namespace. It seems that we don't have it - go and
|
||||||
@ -542,6 +558,8 @@ static void _getnbfn(int fd, short flags, void *cbdata)
|
|||||||
* job-level info. In some cases, a server may elect not
|
* job-level info. In some cases, a server may elect not
|
||||||
* to provide info at init to save memory */
|
* to provide info at init to save memory */
|
||||||
if (immediate) {
|
if (immediate) {
|
||||||
|
pmix_output_verbose(5, pmix_client_globals.get_verbose,
|
||||||
|
"pmix:client IMMEDIATE given - querying data");
|
||||||
/* the direct modex request doesn't pass a key as it
|
/* the direct modex request doesn't pass a key as it
|
||||||
* was intended to support non-job-level information.
|
* was intended to support non-job-level information.
|
||||||
* So instead, we will use the PMIx_Query function
|
* So instead, we will use the PMIx_Query function
|
||||||
@ -560,11 +578,17 @@ static void _getnbfn(int fd, short flags, void *cbdata)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* we should have had this info, so respond with the error */
|
/* we should have had this info, so respond with the error */
|
||||||
|
pmix_output_verbose(5, pmix_client_globals.get_verbose,
|
||||||
|
"pmix:client returning NOT FOUND error");
|
||||||
goto respond;
|
goto respond;
|
||||||
} else {
|
} else {
|
||||||
|
pmix_output_verbose(5, pmix_client_globals.get_verbose,
|
||||||
|
"pmix:client NULL KEY - returning error");
|
||||||
goto respond;
|
goto respond;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
pmix_output_verbose(5, pmix_client_globals.get_verbose,
|
||||||
|
"pmix:client job-level data NOT found");
|
||||||
rc = process_values(&val, cb);
|
rc = process_values(&val, cb);
|
||||||
goto respond;
|
goto respond;
|
||||||
} else {
|
} else {
|
||||||
@ -619,7 +643,7 @@ static void _getnbfn(int fd, short flags, void *cbdata)
|
|||||||
* us to attempt to retrieve it from the server */
|
* us to attempt to retrieve it from the server */
|
||||||
if (optional) {
|
if (optional) {
|
||||||
/* they don't want us to try and retrieve it */
|
/* they don't want us to try and retrieve it */
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_client_globals.get_verbose,
|
||||||
"PMIx_Get key=%s for rank = %u, namespace = %s was not found - request was optional",
|
"PMIx_Get key=%s for rank = %u, namespace = %s was not found - request was optional",
|
||||||
cb->key, cb->pname.rank, cb->pname.nspace);
|
cb->key, cb->pname.rank, cb->pname.nspace);
|
||||||
rc = PMIX_ERR_NOT_FOUND;
|
rc = PMIX_ERR_NOT_FOUND;
|
||||||
@ -647,7 +671,7 @@ static void _getnbfn(int fd, short flags, void *cbdata)
|
|||||||
goto respond;
|
goto respond;
|
||||||
}
|
}
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_client_globals.get_verbose,
|
||||||
"%s:%d REQUESTING DATA FROM SERVER FOR %s:%d KEY %s",
|
"%s:%d REQUESTING DATA FROM SERVER FOR %s:%d KEY %s",
|
||||||
pmix_globals.myid.nspace, pmix_globals.myid.rank,
|
pmix_globals.myid.nspace, pmix_globals.myid.rank,
|
||||||
cb->pname.nspace, cb->pname.rank, cb->key);
|
cb->pname.nspace, cb->pname.rank, cb->key);
|
||||||
|
@ -22,6 +22,27 @@ BEGIN_C_DECLS
|
|||||||
typedef struct {
|
typedef struct {
|
||||||
pmix_peer_t *myserver; // messaging support to/from my server
|
pmix_peer_t *myserver; // messaging support to/from my server
|
||||||
pmix_list_t pending_requests; // list of pmix_cb_t pending data requests
|
pmix_list_t pending_requests; // list of pmix_cb_t pending data requests
|
||||||
|
// verbosity for client get operations
|
||||||
|
int get_output;
|
||||||
|
int get_verbose;
|
||||||
|
// verbosity for client connect operations
|
||||||
|
int connect_output;
|
||||||
|
int connect_verbose;
|
||||||
|
// verbosity for client fence operations
|
||||||
|
int fence_output;
|
||||||
|
int fence_verbose;
|
||||||
|
// verbosity for client pub operations
|
||||||
|
int pub_output;
|
||||||
|
int pub_verbose;
|
||||||
|
// verbosity for client spawn operations
|
||||||
|
int spawn_output;
|
||||||
|
int spawn_verbose;
|
||||||
|
// verbosity for client event operations
|
||||||
|
int event_output;
|
||||||
|
int event_verbose;
|
||||||
|
// verbosity for basic client functions
|
||||||
|
int base_output;
|
||||||
|
int base_verbose;
|
||||||
} pmix_client_globals_t;
|
} pmix_client_globals_t;
|
||||||
|
|
||||||
PMIX_EXPORT extern pmix_client_globals_t pmix_client_globals;
|
PMIX_EXPORT extern pmix_client_globals_t pmix_client_globals;
|
||||||
|
@ -65,7 +65,7 @@ PMIX_EXPORT pmix_status_t PMIx_Notify_event(pmix_status_t status,
|
|||||||
rc = pmix_server_notify_client_of_event(status, source, range,
|
rc = pmix_server_notify_client_of_event(status, source, range,
|
||||||
info, ninfo,
|
info, ninfo,
|
||||||
cbfunc, cbdata);
|
cbfunc, cbdata);
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.event_output,
|
||||||
"pmix_server_notify_event source = %s:%d event_status = %d, rc= %d",
|
"pmix_server_notify_event source = %s:%d event_status = %d, rc= %d",
|
||||||
(NULL == source) ? "UNKNOWN" : source->nspace,
|
(NULL == source) ? "UNKNOWN" : source->nspace,
|
||||||
(NULL == source) ? PMIX_RANK_WILDCARD : source->rank, status, rc);
|
(NULL == source) ? PMIX_RANK_WILDCARD : source->rank, status, rc);
|
||||||
@ -73,7 +73,7 @@ PMIX_EXPORT pmix_status_t PMIx_Notify_event(pmix_status_t status,
|
|||||||
rc = notify_server_of_event(status, source, range,
|
rc = notify_server_of_event(status, source, range,
|
||||||
info, ninfo,
|
info, ninfo,
|
||||||
cbfunc, cbdata);
|
cbfunc, cbdata);
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_client_globals.event_output,
|
||||||
"pmix_client_notify_event source = %s:%d event_status =%d, rc=%d",
|
"pmix_client_notify_event source = %s:%d event_status =%d, rc=%d",
|
||||||
(NULL == source) ? pmix_globals.myid.nspace : source->nspace,
|
(NULL == source) ? pmix_globals.myid.nspace : source->nspace,
|
||||||
(NULL == source) ? pmix_globals.myid.rank : source->rank, status, rc);
|
(NULL == source) ? pmix_globals.myid.rank : source->rank, status, rc);
|
||||||
@ -116,7 +116,7 @@ static pmix_status_t notify_server_of_event(pmix_status_t status,
|
|||||||
size_t n;
|
size_t n;
|
||||||
pmix_notify_caddy_t *cd, *rbout;
|
pmix_notify_caddy_t *cd, *rbout;
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_client_globals.event_output,
|
||||||
"client: notifying server %s:%d of status %s for range %s",
|
"client: notifying server %s:%d of status %s for range %s",
|
||||||
pmix_globals.myid.nspace, pmix_globals.myid.rank,
|
pmix_globals.myid.nspace, pmix_globals.myid.rank,
|
||||||
PMIx_Error_string(status), PMIx_Data_range_string(range));
|
PMIx_Error_string(status), PMIx_Data_range_string(range));
|
||||||
@ -243,7 +243,7 @@ static pmix_status_t notify_server_of_event(pmix_status_t status,
|
|||||||
cb->cbfunc.opfn = cbfunc;
|
cb->cbfunc.opfn = cbfunc;
|
||||||
cb->cbdata = cbdata;
|
cb->cbdata = cbdata;
|
||||||
/* send to the server */
|
/* send to the server */
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_client_globals.event_output,
|
||||||
"client: notifying server %s:%d - sending",
|
"client: notifying server %s:%d - sending",
|
||||||
pmix_globals.myid.nspace, pmix_globals.myid.rank);
|
pmix_globals.myid.nspace, pmix_globals.myid.rank);
|
||||||
PMIX_PTL_SEND_RECV(rc, pmix_client_globals.myserver,
|
PMIX_PTL_SEND_RECV(rc, pmix_client_globals.myserver,
|
||||||
@ -263,7 +263,7 @@ static pmix_status_t notify_server_of_event(pmix_status_t status,
|
|||||||
return PMIX_SUCCESS;
|
return PMIX_SUCCESS;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_client_globals.event_output,
|
||||||
"client: notifying server - unable to send");
|
"client: notifying server - unable to send");
|
||||||
PMIX_RELEASE(msg);
|
PMIX_RELEASE(msg);
|
||||||
/* we were unable to send anything, so we just return the error */
|
/* we were unable to send anything, so we just return the error */
|
||||||
@ -803,7 +803,7 @@ static void _notify_client_event(int sd, short args, void *cbdata)
|
|||||||
/* need to acquire the object from its originating thread */
|
/* need to acquire the object from its originating thread */
|
||||||
PMIX_ACQUIRE_OBJECT(cd);
|
PMIX_ACQUIRE_OBJECT(cd);
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.event_output,
|
||||||
"pmix_server: _notify_client_event notifying clients of event %s range %s type %s",
|
"pmix_server: _notify_client_event notifying clients of event %s range %s type %s",
|
||||||
PMIx_Error_string(cd->status),
|
PMIx_Error_string(cd->status),
|
||||||
PMIx_Data_range_string(cd->range),
|
PMIx_Data_range_string(cd->range),
|
||||||
@ -882,7 +882,7 @@ static void _notify_client_event(int sd, short args, void *cbdata)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.event_output,
|
||||||
"pmix_server: notifying client %s:%u on status %s",
|
"pmix_server: notifying client %s:%u on status %s",
|
||||||
pr->peer->info->pname.nspace, pr->peer->info->pname.rank,
|
pr->peer->info->pname.nspace, pr->peer->info->pname.rank,
|
||||||
PMIx_Error_string(cd->status));
|
PMIx_Error_string(cd->status));
|
||||||
@ -1007,7 +1007,7 @@ pmix_status_t pmix_server_notify_client_of_event(pmix_status_t status,
|
|||||||
pmix_notify_caddy_t *cd;
|
pmix_notify_caddy_t *cd;
|
||||||
size_t n;
|
size_t n;
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.event_output,
|
||||||
"pmix_server: notify client of event %s",
|
"pmix_server: notify client of event %s",
|
||||||
PMIx_Error_string(status));
|
PMIx_Error_string(status));
|
||||||
|
|
||||||
@ -1079,7 +1079,7 @@ pmix_status_t pmix_server_notify_client_of_event(pmix_status_t status,
|
|||||||
cd->cbfunc = cbfunc;
|
cd->cbfunc = cbfunc;
|
||||||
cd->cbdata = cbdata;
|
cd->cbdata = cbdata;
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.event_output,
|
||||||
"pmix_server_notify_event status =%d, source = %s:%d, ninfo =%lu",
|
"pmix_server_notify_event status =%d, source = %s:%d, ninfo =%lu",
|
||||||
status, cd->source.nspace, cd->source.rank, ninfo);
|
status, cd->source.nspace, cd->source.rank, ninfo);
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ typedef struct {
|
|||||||
pmix_list_t trackers;
|
pmix_list_t trackers;
|
||||||
} pmix_psensor_file_component_t;
|
} pmix_psensor_file_component_t;
|
||||||
|
|
||||||
extern pmix_psensor_file_component_t mca_psensor_file_component;
|
PMIX_EXPORT extern pmix_psensor_file_component_t mca_psensor_file_component;
|
||||||
extern pmix_psensor_base_module_t pmix_psensor_file_module;
|
extern pmix_psensor_base_module_t pmix_psensor_file_module;
|
||||||
|
|
||||||
|
|
||||||
|
@ -50,6 +50,7 @@
|
|||||||
#include "src/mca/preg/base/base.h"
|
#include "src/mca/preg/base/base.h"
|
||||||
#include "src/mca/ptl/base/base.h"
|
#include "src/mca/ptl/base/base.h"
|
||||||
|
|
||||||
|
#include "src/client/pmix_client_ops.h"
|
||||||
#include "src/event/pmix_event.h"
|
#include "src/event/pmix_event.h"
|
||||||
#include "src/include/types.h"
|
#include "src/include/types.h"
|
||||||
#include "src/util/error.h"
|
#include "src/util/error.h"
|
||||||
@ -159,6 +160,45 @@ int pmix_rte_init(pmix_proc_type_t type,
|
|||||||
PMIX_CONSTRUCT(&pmix_globals.notifications, pmix_ring_buffer_t);
|
PMIX_CONSTRUCT(&pmix_globals.notifications, pmix_ring_buffer_t);
|
||||||
pmix_ring_buffer_init(&pmix_globals.notifications, 256);
|
pmix_ring_buffer_init(&pmix_globals.notifications, 256);
|
||||||
|
|
||||||
|
/* Setup client verbosities as all procs are allowed to
|
||||||
|
* access client APIs */
|
||||||
|
if (0 < pmix_client_globals.get_verbose) {
|
||||||
|
/* set default output */
|
||||||
|
pmix_client_globals.get_output = pmix_output_open(NULL);
|
||||||
|
pmix_output_set_verbosity(pmix_client_globals.get_output,
|
||||||
|
pmix_client_globals.get_verbose);
|
||||||
|
}
|
||||||
|
if (0 < pmix_client_globals.connect_verbose) {
|
||||||
|
/* set default output */
|
||||||
|
pmix_client_globals.connect_output = pmix_output_open(NULL);
|
||||||
|
pmix_output_set_verbosity(pmix_client_globals.connect_output,
|
||||||
|
pmix_client_globals.connect_verbose);
|
||||||
|
}
|
||||||
|
if (0 < pmix_client_globals.fence_verbose) {
|
||||||
|
/* set default output */
|
||||||
|
pmix_client_globals.fence_output = pmix_output_open(NULL);
|
||||||
|
pmix_output_set_verbosity(pmix_client_globals.fence_output,
|
||||||
|
pmix_client_globals.fence_verbose);
|
||||||
|
}
|
||||||
|
if (0 < pmix_client_globals.pub_verbose) {
|
||||||
|
/* set default output */
|
||||||
|
pmix_client_globals.pub_output = pmix_output_open(NULL);
|
||||||
|
pmix_output_set_verbosity(pmix_client_globals.pub_output,
|
||||||
|
pmix_client_globals.pub_verbose);
|
||||||
|
}
|
||||||
|
if (0 < pmix_client_globals.spawn_verbose) {
|
||||||
|
/* set default output */
|
||||||
|
pmix_client_globals.spawn_output = pmix_output_open(NULL);
|
||||||
|
pmix_output_set_verbosity(pmix_client_globals.spawn_output,
|
||||||
|
pmix_client_globals.spawn_verbose);
|
||||||
|
}
|
||||||
|
if (0 < pmix_client_globals.event_verbose) {
|
||||||
|
/* set default output */
|
||||||
|
pmix_client_globals.event_output = pmix_output_open(NULL);
|
||||||
|
pmix_output_set_verbosity(pmix_client_globals.event_output,
|
||||||
|
pmix_client_globals.event_verbose);
|
||||||
|
}
|
||||||
|
|
||||||
/* get our effective id's */
|
/* get our effective id's */
|
||||||
pmix_globals.uid = geteuid();
|
pmix_globals.uid = geteuid();
|
||||||
pmix_globals.gid = getegid();
|
pmix_globals.gid = getegid();
|
||||||
@ -174,8 +214,8 @@ int pmix_rte_init(pmix_proc_type_t type,
|
|||||||
ret = PMIX_ERR_NOMEM;
|
ret = PMIX_ERR_NOMEM;
|
||||||
goto return_error;
|
goto return_error;
|
||||||
}
|
}
|
||||||
/* whatever our declared proc type, we are definitely v2.1 */
|
/* whatever our declared proc type, we are definitely v3.0 */
|
||||||
pmix_globals.mypeer->proc_type = type | PMIX_PROC_V21;
|
pmix_globals.mypeer->proc_type = type | PMIX_PROC_V3;
|
||||||
/* create an nspace object for ourselves - we will
|
/* create an nspace object for ourselves - we will
|
||||||
* fill in the nspace name later */
|
* fill in the nspace name later */
|
||||||
pmix_globals.mypeer->nptr = PMIX_NEW(pmix_nspace_t);
|
pmix_globals.mypeer->nptr = PMIX_NEW(pmix_nspace_t);
|
||||||
|
@ -35,6 +35,8 @@
|
|||||||
#include "src/mca/base/pmix_mca_base_var.h"
|
#include "src/mca/base/pmix_mca_base_var.h"
|
||||||
#include "src/runtime/pmix_rte.h"
|
#include "src/runtime/pmix_rte.h"
|
||||||
#include "src/util/timings.h"
|
#include "src/util/timings.h"
|
||||||
|
#include "src/client/pmix_client_ops.h"
|
||||||
|
#include "src/server/pmix_server_ops.h"
|
||||||
|
|
||||||
#if PMIX_ENABLE_TIMING
|
#if PMIX_ENABLE_TIMING
|
||||||
char *pmix_timing_output = NULL;
|
char *pmix_timing_output = NULL;
|
||||||
@ -106,6 +108,93 @@ pmix_status_t pmix_register_params(void)
|
|||||||
PMIX_INFO_LVL_1, PMIX_MCA_BASE_VAR_SCOPE_ALL,
|
PMIX_INFO_LVL_1, PMIX_MCA_BASE_VAR_SCOPE_ALL,
|
||||||
&pmix_suppress_missing_data_warning);
|
&pmix_suppress_missing_data_warning);
|
||||||
|
|
||||||
|
/**** CLIENT: VERBOSE OUTPUT PARAMS ****/
|
||||||
|
(void) pmix_mca_base_var_register ("pmix", "pmix", "client", "get_verbose",
|
||||||
|
"Verbosity for client get operations",
|
||||||
|
PMIX_MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
|
||||||
|
PMIX_INFO_LVL_1, PMIX_MCA_BASE_VAR_SCOPE_ALL,
|
||||||
|
&pmix_client_globals.get_verbose);
|
||||||
|
|
||||||
|
(void) pmix_mca_base_var_register ("pmix", "pmix", "client", "connect_verbose",
|
||||||
|
"Verbosity for client connect operations",
|
||||||
|
PMIX_MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
|
||||||
|
PMIX_INFO_LVL_1, PMIX_MCA_BASE_VAR_SCOPE_ALL,
|
||||||
|
&pmix_client_globals.connect_verbose);
|
||||||
|
|
||||||
|
(void) pmix_mca_base_var_register ("pmix", "pmix", "client", "fence_verbose",
|
||||||
|
"Verbosity for client fence operations",
|
||||||
|
PMIX_MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
|
||||||
|
PMIX_INFO_LVL_1, PMIX_MCA_BASE_VAR_SCOPE_ALL,
|
||||||
|
&pmix_client_globals.fence_verbose);
|
||||||
|
|
||||||
|
(void) pmix_mca_base_var_register ("pmix", "pmix", "client", "pub_verbose",
|
||||||
|
"Verbosity for client publish, lookup, and unpublish operations",
|
||||||
|
PMIX_MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
|
||||||
|
PMIX_INFO_LVL_1, PMIX_MCA_BASE_VAR_SCOPE_ALL,
|
||||||
|
&pmix_client_globals.pub_verbose);
|
||||||
|
|
||||||
|
(void) pmix_mca_base_var_register ("pmix", "pmix", "client", "spawn_verbose",
|
||||||
|
"Verbosity for client spawn operations",
|
||||||
|
PMIX_MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
|
||||||
|
PMIX_INFO_LVL_1, PMIX_MCA_BASE_VAR_SCOPE_ALL,
|
||||||
|
&pmix_client_globals.spawn_verbose);
|
||||||
|
|
||||||
|
(void) pmix_mca_base_var_register ("pmix", "pmix", "client", "event_verbose",
|
||||||
|
"Verbosity for eventt spawn operations",
|
||||||
|
PMIX_MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
|
||||||
|
PMIX_INFO_LVL_1, PMIX_MCA_BASE_VAR_SCOPE_ALL,
|
||||||
|
&pmix_client_globals.event_verbose);
|
||||||
|
|
||||||
|
(void) pmix_mca_base_var_register ("pmix", "pmix", "client", "base_verbose",
|
||||||
|
"Verbosity for basic client operations",
|
||||||
|
PMIX_MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
|
||||||
|
PMIX_INFO_LVL_1, PMIX_MCA_BASE_VAR_SCOPE_ALL,
|
||||||
|
&pmix_client_globals.base_verbose);
|
||||||
|
|
||||||
|
/**** SERVER: VERBOSE OUTPUT PARAMS ****/
|
||||||
|
(void) pmix_mca_base_var_register ("pmix", "pmix", "server", "get_verbose",
|
||||||
|
"Verbosity for server get operations",
|
||||||
|
PMIX_MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
|
||||||
|
PMIX_INFO_LVL_1, PMIX_MCA_BASE_VAR_SCOPE_ALL,
|
||||||
|
&pmix_server_globals.get_verbose);
|
||||||
|
|
||||||
|
(void) pmix_mca_base_var_register ("pmix", "pmix", "server", "connect_verbose",
|
||||||
|
"Verbosity for server connect operations",
|
||||||
|
PMIX_MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
|
||||||
|
PMIX_INFO_LVL_1, PMIX_MCA_BASE_VAR_SCOPE_ALL,
|
||||||
|
&pmix_server_globals.connect_verbose);
|
||||||
|
|
||||||
|
(void) pmix_mca_base_var_register ("pmix", "pmix", "server", "fence_verbose",
|
||||||
|
"Verbosity for server fence operations",
|
||||||
|
PMIX_MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
|
||||||
|
PMIX_INFO_LVL_1, PMIX_MCA_BASE_VAR_SCOPE_ALL,
|
||||||
|
&pmix_server_globals.fence_verbose);
|
||||||
|
|
||||||
|
(void) pmix_mca_base_var_register ("pmix", "pmix", "server", "pub_verbose",
|
||||||
|
"Verbosity for server publish, lookup, and unpublish operations",
|
||||||
|
PMIX_MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
|
||||||
|
PMIX_INFO_LVL_1, PMIX_MCA_BASE_VAR_SCOPE_ALL,
|
||||||
|
&pmix_server_globals.pub_verbose);
|
||||||
|
|
||||||
|
(void) pmix_mca_base_var_register ("pmix", "pmix", "server", "spawn_verbose",
|
||||||
|
"Verbosity for server spawn operations",
|
||||||
|
PMIX_MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
|
||||||
|
PMIX_INFO_LVL_1, PMIX_MCA_BASE_VAR_SCOPE_ALL,
|
||||||
|
&pmix_server_globals.spawn_verbose);
|
||||||
|
|
||||||
|
(void) pmix_mca_base_var_register ("pmix", "pmix", "server", "event_verbose",
|
||||||
|
"Verbosity for server event operations",
|
||||||
|
PMIX_MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
|
||||||
|
PMIX_INFO_LVL_1, PMIX_MCA_BASE_VAR_SCOPE_ALL,
|
||||||
|
&pmix_server_globals.event_verbose);
|
||||||
|
|
||||||
|
(void) pmix_mca_base_var_register ("pmix", "pmix", "server", "base_verbose",
|
||||||
|
"Verbosity for basic server operations",
|
||||||
|
PMIX_MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
|
||||||
|
PMIX_INFO_LVL_1, PMIX_MCA_BASE_VAR_SCOPE_ALL,
|
||||||
|
&pmix_server_globals.base_verbose);
|
||||||
|
|
||||||
|
|
||||||
return PMIX_SUCCESS;
|
return PMIX_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ PMIX_EXPORT pmix_status_t PMIx_server_init(pmix_server_module_t *module,
|
|||||||
|
|
||||||
PMIX_ACQUIRE_THREAD(&pmix_global_lock);
|
PMIX_ACQUIRE_THREAD(&pmix_global_lock);
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.base_output,
|
||||||
"pmix:server init called");
|
"pmix:server init called");
|
||||||
|
|
||||||
/* setup the runtime - this init's the globals,
|
/* setup the runtime - this init's the globals,
|
||||||
@ -130,9 +130,54 @@ PMIX_EXPORT pmix_status_t PMIx_server_init(pmix_server_module_t *module,
|
|||||||
PMIX_CONSTRUCT(&pmix_server_globals.local_reqs, pmix_list_t);
|
PMIX_CONSTRUCT(&pmix_server_globals.local_reqs, pmix_list_t);
|
||||||
PMIX_CONSTRUCT(&pmix_server_globals.nspaces, pmix_list_t);
|
PMIX_CONSTRUCT(&pmix_server_globals.nspaces, pmix_list_t);
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.base_output,
|
||||||
"pmix:server init called");
|
"pmix:server init called");
|
||||||
|
|
||||||
|
/* setup the server verbosities */
|
||||||
|
if (0 < pmix_server_globals.get_verbose) {
|
||||||
|
/* set default output */
|
||||||
|
pmix_server_globals.get_output = pmix_output_open(NULL);
|
||||||
|
pmix_output_set_verbosity(pmix_server_globals.get_output,
|
||||||
|
pmix_server_globals.get_verbose);
|
||||||
|
}
|
||||||
|
if (0 < pmix_server_globals.connect_verbose) {
|
||||||
|
/* set default output */
|
||||||
|
pmix_server_globals.connect_output = pmix_output_open(NULL);
|
||||||
|
pmix_output_set_verbosity(pmix_server_globals.connect_output,
|
||||||
|
pmix_server_globals.connect_verbose);
|
||||||
|
}
|
||||||
|
if (0 < pmix_server_globals.fence_verbose) {
|
||||||
|
/* set default output */
|
||||||
|
pmix_server_globals.fence_output = pmix_output_open(NULL);
|
||||||
|
pmix_output_set_verbosity(pmix_server_globals.fence_output,
|
||||||
|
pmix_server_globals.fence_verbose);
|
||||||
|
}
|
||||||
|
if (0 < pmix_server_globals.pub_verbose) {
|
||||||
|
/* set default output */
|
||||||
|
pmix_server_globals.pub_output = pmix_output_open(NULL);
|
||||||
|
pmix_output_set_verbosity(pmix_server_globals.pub_output,
|
||||||
|
pmix_server_globals.pub_verbose);
|
||||||
|
}
|
||||||
|
if (0 < pmix_server_globals.spawn_verbose) {
|
||||||
|
/* set default output */
|
||||||
|
pmix_server_globals.spawn_output = pmix_output_open(NULL);
|
||||||
|
pmix_output_set_verbosity(pmix_server_globals.spawn_output,
|
||||||
|
pmix_server_globals.spawn_verbose);
|
||||||
|
}
|
||||||
|
if (0 < pmix_server_globals.event_verbose) {
|
||||||
|
/* set default output */
|
||||||
|
pmix_server_globals.event_output = pmix_output_open(NULL);
|
||||||
|
pmix_output_set_verbosity(pmix_server_globals.event_output,
|
||||||
|
pmix_server_globals.event_verbose);
|
||||||
|
}
|
||||||
|
/* setup the base verbosity */
|
||||||
|
if (0 < pmix_server_globals.base_verbose) {
|
||||||
|
/* set default output */
|
||||||
|
pmix_server_globals.base_output = pmix_output_open(NULL);
|
||||||
|
pmix_output_set_verbosity(pmix_server_globals.base_output,
|
||||||
|
pmix_server_globals.base_verbose);
|
||||||
|
}
|
||||||
|
|
||||||
/* setup the function pointers */
|
/* setup the function pointers */
|
||||||
memset(&pmix_host_server, 0, sizeof(pmix_server_module_t));
|
memset(&pmix_host_server, 0, sizeof(pmix_server_module_t));
|
||||||
pmix_host_server = *module;
|
pmix_host_server = *module;
|
||||||
@ -316,7 +361,7 @@ PMIX_EXPORT pmix_status_t PMIx_server_finalize(void)
|
|||||||
pmix_globals.init_cntr = 0;
|
pmix_globals.init_cntr = 0;
|
||||||
PMIX_RELEASE_THREAD(&pmix_global_lock);
|
PMIX_RELEASE_THREAD(&pmix_global_lock);
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.base_output,
|
||||||
"pmix:server finalize called");
|
"pmix:server finalize called");
|
||||||
|
|
||||||
if (!pmix_globals.external_evbase) {
|
if (!pmix_globals.external_evbase) {
|
||||||
@ -359,7 +404,7 @@ PMIX_EXPORT pmix_status_t PMIx_server_finalize(void)
|
|||||||
}
|
}
|
||||||
pmix_rte_finalize();
|
pmix_rte_finalize();
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.base_output,
|
||||||
"pmix:server finalize complete");
|
"pmix:server finalize complete");
|
||||||
|
|
||||||
return PMIX_SUCCESS;
|
return PMIX_SUCCESS;
|
||||||
@ -374,7 +419,7 @@ static void _register_nspace(int sd, short args, void *cbdata)
|
|||||||
|
|
||||||
PMIX_ACQUIRE_OBJECT(caddy);
|
PMIX_ACQUIRE_OBJECT(caddy);
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.base_output,
|
||||||
"pmix:server _register_nspace %s", cd->proc.nspace);
|
"pmix:server _register_nspace %s", cd->proc.nspace);
|
||||||
|
|
||||||
/* see if we already have this nspace */
|
/* see if we already have this nspace */
|
||||||
@ -469,7 +514,7 @@ static void _deregister_nspace(int sd, short args, void *cbdata)
|
|||||||
|
|
||||||
PMIX_ACQUIRE_OBJECT(cd);
|
PMIX_ACQUIRE_OBJECT(cd);
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.base_output,
|
||||||
"pmix:server _deregister_nspace %s",
|
"pmix:server _deregister_nspace %s",
|
||||||
cd->proc.nspace);
|
cd->proc.nspace);
|
||||||
|
|
||||||
@ -501,7 +546,7 @@ PMIX_EXPORT void PMIx_server_deregister_nspace(const char nspace[],
|
|||||||
{
|
{
|
||||||
pmix_setup_caddy_t *cd;
|
pmix_setup_caddy_t *cd;
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.base_output,
|
||||||
"pmix:server deregister nspace %s",
|
"pmix:server deregister nspace %s",
|
||||||
nspace);
|
nspace);
|
||||||
|
|
||||||
@ -583,7 +628,7 @@ void pmix_server_execute_collective(int sd, short args, void *cbdata)
|
|||||||
PMIX_BFROPS_PACK(rc, peer, &bucket, &tmp, 1, PMIX_BYTE);
|
PMIX_BFROPS_PACK(rc, peer, &bucket, &tmp, 1, PMIX_BYTE);
|
||||||
|
|
||||||
if (PMIX_COLLECT_YES == trk->collect_type) {
|
if (PMIX_COLLECT_YES == trk->collect_type) {
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.base_output,
|
||||||
"fence - assembling data");
|
"fence - assembling data");
|
||||||
first = true;
|
first = true;
|
||||||
PMIX_CONSTRUCT(&pnames, pmix_list_t);
|
PMIX_CONSTRUCT(&pnames, pmix_list_t);
|
||||||
@ -692,7 +737,7 @@ static void _register_client(int sd, short args, void *cbdata)
|
|||||||
|
|
||||||
PMIX_ACQUIRE_OBJECT(cd);
|
PMIX_ACQUIRE_OBJECT(cd);
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.base_output,
|
||||||
"pmix:server _register_client for nspace %s rank %d",
|
"pmix:server _register_client for nspace %s rank %d",
|
||||||
cd->proc.nspace, cd->proc.rank);
|
cd->proc.nspace, cd->proc.rank);
|
||||||
|
|
||||||
@ -814,7 +859,7 @@ PMIX_EXPORT pmix_status_t PMIx_server_register_client(const pmix_proc_t *proc,
|
|||||||
}
|
}
|
||||||
PMIX_RELEASE_THREAD(&pmix_global_lock);
|
PMIX_RELEASE_THREAD(&pmix_global_lock);
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.base_output,
|
||||||
"pmix:server register client %s:%d",
|
"pmix:server register client %s:%d",
|
||||||
proc->nspace, proc->rank);
|
proc->nspace, proc->rank);
|
||||||
|
|
||||||
@ -844,7 +889,7 @@ static void _deregister_client(int sd, short args, void *cbdata)
|
|||||||
|
|
||||||
PMIX_ACQUIRE_OBJECT(cd);
|
PMIX_ACQUIRE_OBJECT(cd);
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.base_output,
|
||||||
"pmix:server _deregister_client for nspace %s rank %d",
|
"pmix:server _deregister_client for nspace %s rank %d",
|
||||||
cd->proc.nspace, cd->proc.rank);
|
cd->proc.nspace, cd->proc.rank);
|
||||||
|
|
||||||
@ -891,7 +936,7 @@ PMIX_EXPORT void PMIx_server_deregister_client(const pmix_proc_t *proc,
|
|||||||
}
|
}
|
||||||
PMIX_RELEASE_THREAD(&pmix_global_lock);
|
PMIX_RELEASE_THREAD(&pmix_global_lock);
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.base_output,
|
||||||
"pmix:server deregister client %s:%d",
|
"pmix:server deregister client %s:%d",
|
||||||
proc->nspace, proc->rank);
|
proc->nspace, proc->rank);
|
||||||
|
|
||||||
@ -928,7 +973,7 @@ PMIX_EXPORT pmix_status_t PMIx_server_setup_fork(const pmix_proc_t *proc, char *
|
|||||||
}
|
}
|
||||||
PMIX_RELEASE_THREAD(&pmix_global_lock);
|
PMIX_RELEASE_THREAD(&pmix_global_lock);
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.base_output,
|
||||||
"pmix:server setup_fork for nspace %s rank %d",
|
"pmix:server setup_fork for nspace %s rank %d",
|
||||||
proc->nspace, proc->rank);
|
proc->nspace, proc->rank);
|
||||||
|
|
||||||
@ -995,7 +1040,7 @@ static void _dmodex_req(int sd, short args, void *cbdata)
|
|||||||
|
|
||||||
PMIX_ACQUIRE_OBJECT(cd);
|
PMIX_ACQUIRE_OBJECT(cd);
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.base_output,
|
||||||
"DMODX LOOKING FOR %s:%d",
|
"DMODX LOOKING FOR %s:%d",
|
||||||
cd->proc.nspace, cd->proc.rank);
|
cd->proc.nspace, cd->proc.rank);
|
||||||
|
|
||||||
@ -1129,7 +1174,7 @@ PMIX_EXPORT pmix_status_t PMIx_server_dmodex_request(const pmix_proc_t *proc,
|
|||||||
return PMIX_ERR_BAD_PARAM;
|
return PMIX_ERR_BAD_PARAM;
|
||||||
}
|
}
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.base_output,
|
||||||
"pmix:server dmodex request%s:%d",
|
"pmix:server dmodex request%s:%d",
|
||||||
proc->nspace, proc->rank);
|
proc->nspace, proc->rank);
|
||||||
|
|
||||||
@ -1687,7 +1732,7 @@ static void _mdxcbfunc(int sd, short argc, void *cbdata)
|
|||||||
PMIX_ERROR_LOG(ret);
|
PMIX_ERROR_LOG(ret);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.base_output,
|
||||||
"server:modex_cbfunc reply being sent to %s:%u",
|
"server:modex_cbfunc reply being sent to %s:%u",
|
||||||
cd->peer->info->pname.nspace, cd->peer->info->pname.rank);
|
cd->peer->info->pname.nspace, cd->peer->info->pname.rank);
|
||||||
PMIX_SERVER_QUEUE_REPLY(cd->peer, cd->hdr.tag, reply);
|
PMIX_SERVER_QUEUE_REPLY(cd->peer, cd->hdr.tag, reply);
|
||||||
@ -1720,7 +1765,7 @@ static void modex_cbfunc(pmix_status_t status, const char *data, size_t ndata, v
|
|||||||
pmix_server_trkr_t *tracker = (pmix_server_trkr_t*)cbdata;
|
pmix_server_trkr_t *tracker = (pmix_server_trkr_t*)cbdata;
|
||||||
pmix_shift_caddy_t *scd;
|
pmix_shift_caddy_t *scd;
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.base_output,
|
||||||
"server:modex_cbfunc called with %d bytes", (int)ndata);
|
"server:modex_cbfunc called with %d bytes", (int)ndata);
|
||||||
|
|
||||||
if (NULL == tracker) {
|
if (NULL == tracker) {
|
||||||
@ -1757,7 +1802,7 @@ static void get_cbfunc(pmix_status_t status, const char *data, size_t ndata, voi
|
|||||||
pmix_buffer_t *reply, buf;
|
pmix_buffer_t *reply, buf;
|
||||||
pmix_status_t rc;
|
pmix_status_t rc;
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.base_output,
|
||||||
"server:get_cbfunc called with %d bytes", (int)ndata);
|
"server:get_cbfunc called with %d bytes", (int)ndata);
|
||||||
|
|
||||||
/* no need to thread-shift here as no global data is accessed */
|
/* no need to thread-shift here as no global data is accessed */
|
||||||
@ -1790,10 +1835,10 @@ static void get_cbfunc(pmix_status_t status, const char *data, size_t ndata, voi
|
|||||||
buf.bytes_used = 0;
|
buf.bytes_used = 0;
|
||||||
PMIX_DESTRUCT(&buf);
|
PMIX_DESTRUCT(&buf);
|
||||||
/* send the data to the requestor */
|
/* send the data to the requestor */
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.base_output,
|
||||||
"server:get_cbfunc reply being sent to %s:%u",
|
"server:get_cbfunc reply being sent to %s:%u",
|
||||||
cd->peer->info->pname.nspace, cd->peer->info->pname.rank);
|
cd->peer->info->pname.nspace, cd->peer->info->pname.rank);
|
||||||
pmix_output_hexdump(10, pmix_globals.debug_output,
|
pmix_output_hexdump(10, pmix_server_globals.base_output,
|
||||||
reply->base_ptr, (reply->bytes_used < 256 ? reply->bytes_used : 256));
|
reply->base_ptr, (reply->bytes_used < 256 ? reply->bytes_used : 256));
|
||||||
|
|
||||||
PMIX_SERVER_QUEUE_REPLY(cd->peer, cd->hdr.tag, reply);
|
PMIX_SERVER_QUEUE_REPLY(cd->peer, cd->hdr.tag, reply);
|
||||||
@ -1966,7 +2011,7 @@ static void _cnct(int sd, short args, void *cbdata)
|
|||||||
PMIX_DESTRUCT(&pbkt);
|
PMIX_DESTRUCT(&pbkt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.base_output,
|
||||||
"server:cnct_cbfunc reply being sent to %s:%u",
|
"server:cnct_cbfunc reply being sent to %s:%u",
|
||||||
cd->peer->info->pname.nspace, cd->peer->info->pname.rank);
|
cd->peer->info->pname.nspace, cd->peer->info->pname.rank);
|
||||||
PMIX_SERVER_QUEUE_REPLY(cd->peer, cd->hdr.tag, reply);
|
PMIX_SERVER_QUEUE_REPLY(cd->peer, cd->hdr.tag, reply);
|
||||||
@ -1990,7 +2035,7 @@ static void cnct_cbfunc(pmix_status_t status,
|
|||||||
pmix_server_trkr_t *tracker = (pmix_server_trkr_t*)cbdata;
|
pmix_server_trkr_t *tracker = (pmix_server_trkr_t*)cbdata;
|
||||||
pmix_shift_caddy_t *scd;
|
pmix_shift_caddy_t *scd;
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.base_output,
|
||||||
"server:cnct_cbfunc called with nspace %s",
|
"server:cnct_cbfunc called with nspace %s",
|
||||||
(NULL == nspace) ? "NULL" : nspace);
|
(NULL == nspace) ? "NULL" : nspace);
|
||||||
|
|
||||||
@ -2040,7 +2085,7 @@ static void _discnct(int sd, short args, void *cbdata)
|
|||||||
PMIX_RELEASE(reply);
|
PMIX_RELEASE(reply);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.base_output,
|
||||||
"server:cnct_cbfunc reply being sent to %s:%u",
|
"server:cnct_cbfunc reply being sent to %s:%u",
|
||||||
cd->peer->info->pname.nspace, cd->peer->info->pname.rank);
|
cd->peer->info->pname.nspace, cd->peer->info->pname.rank);
|
||||||
PMIX_SERVER_QUEUE_REPLY(cd->peer, cd->hdr.tag, reply);
|
PMIX_SERVER_QUEUE_REPLY(cd->peer, cd->hdr.tag, reply);
|
||||||
@ -2061,7 +2106,7 @@ static void discnct_cbfunc(pmix_status_t status, void *cbdata)
|
|||||||
pmix_server_trkr_t *tracker = (pmix_server_trkr_t*)cbdata;
|
pmix_server_trkr_t *tracker = (pmix_server_trkr_t*)cbdata;
|
||||||
pmix_shift_caddy_t *scd;
|
pmix_shift_caddy_t *scd;
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.base_output,
|
||||||
"server:discnct_cbfunc called on nspace %s",
|
"server:discnct_cbfunc called on nspace %s",
|
||||||
(NULL == tracker) ? "NULL" : tracker->pname.nspace);
|
(NULL == tracker) ? "NULL" : tracker->pname.nspace);
|
||||||
|
|
||||||
@ -2088,7 +2133,7 @@ static void regevents_cbfunc(pmix_status_t status, void *cbdata)
|
|||||||
pmix_server_caddy_t *cd = (pmix_server_caddy_t*) cbdata;
|
pmix_server_caddy_t *cd = (pmix_server_caddy_t*) cbdata;
|
||||||
pmix_buffer_t *reply;
|
pmix_buffer_t *reply;
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.base_output,
|
||||||
"server:regevents_cbfunc called status = %d", status);
|
"server:regevents_cbfunc called status = %d", status);
|
||||||
|
|
||||||
reply = PMIX_NEW(pmix_buffer_t);
|
reply = PMIX_NEW(pmix_buffer_t);
|
||||||
@ -2112,7 +2157,7 @@ static void notifyerror_cbfunc (pmix_status_t status, void *cbdata)
|
|||||||
pmix_server_caddy_t *cd = (pmix_server_caddy_t*) cbdata;
|
pmix_server_caddy_t *cd = (pmix_server_caddy_t*) cbdata;
|
||||||
pmix_buffer_t *reply;
|
pmix_buffer_t *reply;
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.base_output,
|
||||||
"server:notifyerror_cbfunc called status = %d", status);
|
"server:notifyerror_cbfunc called status = %d", status);
|
||||||
|
|
||||||
reply = PMIX_NEW(pmix_buffer_t);
|
reply = PMIX_NEW(pmix_buffer_t);
|
||||||
@ -2142,7 +2187,7 @@ static void query_cbfunc(pmix_status_t status,
|
|||||||
pmix_buffer_t *reply;
|
pmix_buffer_t *reply;
|
||||||
pmix_status_t rc;
|
pmix_status_t rc;
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.base_output,
|
||||||
"pmix:query callback with status %d", status);
|
"pmix:query callback with status %d", status);
|
||||||
|
|
||||||
reply = PMIX_NEW(pmix_buffer_t);
|
reply = PMIX_NEW(pmix_buffer_t);
|
||||||
@ -2219,7 +2264,7 @@ static pmix_status_t server_switchyard(pmix_peer_t *peer, uint32_t tag,
|
|||||||
PMIX_ERROR_LOG(rc);
|
PMIX_ERROR_LOG(rc);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.base_output,
|
||||||
"recvd pmix cmd %d from %s:%u",
|
"recvd pmix cmd %d from %s:%u",
|
||||||
cmd, peer->info->pname.nspace, peer->info->pname.rank);
|
cmd, peer->info->pname.nspace, peer->info->pname.rank);
|
||||||
|
|
||||||
@ -2281,7 +2326,7 @@ static pmix_status_t server_switchyard(pmix_peer_t *peer, uint32_t tag,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (PMIX_FINALIZE_CMD == cmd) {
|
if (PMIX_FINALIZE_CMD == cmd) {
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.base_output,
|
||||||
"recvd FINALIZE");
|
"recvd FINALIZE");
|
||||||
/* mark that this peer called finalize */
|
/* mark that this peer called finalize */
|
||||||
peer->finalized = true;
|
peer->finalized = true;
|
||||||
@ -2433,7 +2478,7 @@ static void server_message_handler(struct pmix_peer_t *pr,
|
|||||||
pmix_buffer_t *reply;
|
pmix_buffer_t *reply;
|
||||||
pmix_status_t rc, ret;
|
pmix_status_t rc, ret;
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.base_output,
|
||||||
"SWITCHYARD for %s:%u:%d",
|
"SWITCHYARD for %s:%u:%d",
|
||||||
peer->info->pname.nspace,
|
peer->info->pname.nspace,
|
||||||
peer->info->pname.rank, peer->sd);
|
peer->info->pname.rank, peer->sd);
|
||||||
|
@ -130,7 +130,7 @@ pmix_status_t pmix_server_get(pmix_buffer_t *buf,
|
|||||||
size_t sz, n;
|
size_t sz, n;
|
||||||
pmix_peer_t *peer;
|
pmix_peer_t *peer;
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.get_output,
|
||||||
"recvd GET");
|
"recvd GET");
|
||||||
|
|
||||||
/* setup */
|
/* setup */
|
||||||
@ -191,7 +191,7 @@ pmix_status_t pmix_server_get(pmix_buffer_t *buf,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.get_output,
|
||||||
"%s:%d EXECUTE GET FOR %s:%d ON BEHALF OF %s:%d",
|
"%s:%d EXECUTE GET FOR %s:%d ON BEHALF OF %s:%d",
|
||||||
pmix_globals.myid.nspace,
|
pmix_globals.myid.nspace,
|
||||||
pmix_globals.myid.rank, nspace, rank,
|
pmix_globals.myid.rank, nspace, rank,
|
||||||
@ -320,8 +320,17 @@ pmix_status_t pmix_server_get(pmix_buffer_t *buf,
|
|||||||
* we do know how many clients to expect, so first check to see if
|
* we do know how many clients to expect, so first check to see if
|
||||||
* all clients have been registered with us */
|
* all clients have been registered with us */
|
||||||
if (!nptr->all_registered) {
|
if (!nptr->all_registered) {
|
||||||
|
pmix_output_verbose(2, pmix_server_globals.get_output,
|
||||||
|
"%s:%d NSPACE %s not all registered",
|
||||||
|
pmix_globals.myid.nspace,
|
||||||
|
pmix_globals.myid.rank, nspace);
|
||||||
|
|
||||||
if (localonly) {
|
if (localonly) {
|
||||||
/* the client asked that we not wait, so return now */
|
/* the client asked that we not wait, so return now */
|
||||||
|
pmix_output_verbose(2, pmix_server_globals.get_output,
|
||||||
|
"%s:%d CLIENT REQUESTED IMMEDIATE",
|
||||||
|
pmix_globals.myid.nspace,
|
||||||
|
pmix_globals.myid.rank);
|
||||||
return PMIX_ERR_NOT_FOUND;
|
return PMIX_ERR_NOT_FOUND;
|
||||||
}
|
}
|
||||||
/* we cannot do anything further, so just track this request
|
/* we cannot do anything further, so just track this request
|
||||||
@ -331,6 +340,10 @@ pmix_status_t pmix_server_get(pmix_buffer_t *buf,
|
|||||||
if (PMIX_ERR_NOMEM == rc) {
|
if (PMIX_ERR_NOMEM == rc) {
|
||||||
PMIX_INFO_FREE(info, ninfo);
|
PMIX_INFO_FREE(info, ninfo);
|
||||||
}
|
}
|
||||||
|
pmix_output_verbose(2, pmix_server_globals.get_output,
|
||||||
|
"%s:%d TRACKER CREATED - WAITING",
|
||||||
|
pmix_globals.myid.nspace,
|
||||||
|
pmix_globals.myid.rank);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -342,9 +355,18 @@ pmix_status_t pmix_server_get(pmix_buffer_t *buf,
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pmix_output_verbose(2, pmix_server_globals.get_output,
|
||||||
|
"%s:%d DATA NOT FOUND",
|
||||||
|
pmix_globals.myid.nspace,
|
||||||
|
pmix_globals.myid.rank);
|
||||||
|
|
||||||
/* If we get here, then we don't have the data at this time. If
|
/* If we get here, then we don't have the data at this time. If
|
||||||
* the user doesn't want to look for it, then we are done */
|
* the user doesn't want to look for it, then we are done */
|
||||||
if (localonly) {
|
if (localonly) {
|
||||||
|
pmix_output_verbose(2, pmix_server_globals.get_output,
|
||||||
|
"%s:%d CLIENT REQUESTED IMMEDIATE",
|
||||||
|
pmix_globals.myid.nspace,
|
||||||
|
pmix_globals.myid.rank);
|
||||||
return PMIX_ERR_NOT_FOUND;
|
return PMIX_ERR_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -379,6 +401,10 @@ pmix_status_t pmix_server_get(pmix_buffer_t *buf,
|
|||||||
if (NULL != pmix_host_server.direct_modex) {
|
if (NULL != pmix_host_server.direct_modex) {
|
||||||
rc = pmix_host_server.direct_modex(&lcd->proc, info, ninfo, dmdx_cbfunc, lcd);
|
rc = pmix_host_server.direct_modex(&lcd->proc, info, ninfo, dmdx_cbfunc, lcd);
|
||||||
} else {
|
} else {
|
||||||
|
pmix_output_verbose(2, pmix_server_globals.get_output,
|
||||||
|
"%s:%d NO SERVER SUPPORT",
|
||||||
|
pmix_globals.myid.nspace,
|
||||||
|
pmix_globals.myid.rank);
|
||||||
/* if we don't have direct modex feature, just respond with "not found" */
|
/* if we don't have direct modex feature, just respond with "not found" */
|
||||||
cbfunc(PMIX_ERR_NOT_FOUND, NULL, 0, cbdata, NULL, NULL);
|
cbfunc(PMIX_ERR_NOT_FOUND, NULL, 0, cbdata, NULL, NULL);
|
||||||
PMIX_INFO_FREE(info, ninfo);
|
PMIX_INFO_FREE(info, ninfo);
|
||||||
@ -503,6 +529,11 @@ static pmix_status_t _satisfy_request(pmix_nspace_t *nptr, pmix_rank_t rank,
|
|||||||
size_t sz = 0;
|
size_t sz = 0;
|
||||||
pmix_scope_t scope = PMIX_SCOPE_UNDEF;
|
pmix_scope_t scope = PMIX_SCOPE_UNDEF;
|
||||||
|
|
||||||
|
pmix_output_verbose(2, pmix_server_globals.get_output,
|
||||||
|
"%s:%d SATISFY REQUEST CALLED",
|
||||||
|
pmix_globals.myid.nspace,
|
||||||
|
pmix_globals.myid.rank);
|
||||||
|
|
||||||
/* check to see if this data already has been
|
/* check to see if this data already has been
|
||||||
* obtained as a result of a prior direct modex request from
|
* obtained as a result of a prior direct modex request from
|
||||||
* a remote peer, or due to data from a local client
|
* a remote peer, or due to data from a local client
|
||||||
@ -582,6 +613,7 @@ static pmix_status_t _satisfy_request(pmix_nspace_t *nptr, pmix_rank_t rank,
|
|||||||
/* assemble the provided data into a byte object */
|
/* assemble the provided data into a byte object */
|
||||||
PMIX_GDS_ASSEMB_KVS_REQ(rc, cd->peer, &proc, &cb.kvs, &pkt, cd);
|
PMIX_GDS_ASSEMB_KVS_REQ(rc, cd->peer, &proc, &cb.kvs, &pkt, cd);
|
||||||
if (rc != PMIX_SUCCESS) {
|
if (rc != PMIX_SUCCESS) {
|
||||||
|
PMIX_ERROR_LOG(rc);
|
||||||
PMIX_DESTRUCT(&pkt);
|
PMIX_DESTRUCT(&pkt);
|
||||||
PMIX_DESTRUCT(&pbkt);
|
PMIX_DESTRUCT(&pbkt);
|
||||||
PMIX_DESTRUCT(&cb);
|
PMIX_DESTRUCT(&cb);
|
||||||
@ -595,6 +627,7 @@ static pmix_status_t _satisfy_request(pmix_nspace_t *nptr, pmix_rank_t rank,
|
|||||||
PMIX_CONSTRUCT(&xfer, pmix_buffer_t);
|
PMIX_CONSTRUCT(&xfer, pmix_buffer_t);
|
||||||
PMIX_BFROPS_PACK(rc, cd->peer, &xfer, &pkt, 1, PMIX_BUFFER);
|
PMIX_BFROPS_PACK(rc, cd->peer, &xfer, &pkt, 1, PMIX_BUFFER);
|
||||||
if (PMIX_SUCCESS != rc) {
|
if (PMIX_SUCCESS != rc) {
|
||||||
|
PMIX_ERROR_LOG(rc);
|
||||||
PMIX_DESTRUCT(&pkt);
|
PMIX_DESTRUCT(&pkt);
|
||||||
PMIX_DESTRUCT(&pbkt);
|
PMIX_DESTRUCT(&pbkt);
|
||||||
PMIX_DESTRUCT(&xfer);
|
PMIX_DESTRUCT(&xfer);
|
||||||
@ -610,6 +643,7 @@ static pmix_status_t _satisfy_request(pmix_nspace_t *nptr, pmix_rank_t rank,
|
|||||||
/* pack it for transmission */
|
/* pack it for transmission */
|
||||||
PMIX_BFROPS_PACK(rc, cd->peer, &pbkt, &bo, 1, PMIX_BYTE_OBJECT);
|
PMIX_BFROPS_PACK(rc, cd->peer, &pbkt, &bo, 1, PMIX_BYTE_OBJECT);
|
||||||
if (PMIX_SUCCESS != rc) {
|
if (PMIX_SUCCESS != rc) {
|
||||||
|
PMIX_ERROR_LOG(rc);
|
||||||
PMIX_DESTRUCT(&pbkt);
|
PMIX_DESTRUCT(&pbkt);
|
||||||
PMIX_DESTRUCT(&cb);
|
PMIX_DESTRUCT(&cb);
|
||||||
return rc;
|
return rc;
|
||||||
@ -638,6 +672,7 @@ static pmix_status_t _satisfy_request(pmix_nspace_t *nptr, pmix_rank_t rank,
|
|||||||
/* assemble the provided data into a byte object */
|
/* assemble the provided data into a byte object */
|
||||||
PMIX_GDS_ASSEMB_KVS_REQ(rc, cd->peer, &proc, &cb.kvs, &pkt, cd);
|
PMIX_GDS_ASSEMB_KVS_REQ(rc, cd->peer, &proc, &cb.kvs, &pkt, cd);
|
||||||
if (rc != PMIX_SUCCESS) {
|
if (rc != PMIX_SUCCESS) {
|
||||||
|
PMIX_ERROR_LOG(rc);
|
||||||
PMIX_DESTRUCT(&pkt);
|
PMIX_DESTRUCT(&pkt);
|
||||||
PMIX_DESTRUCT(&pbkt);
|
PMIX_DESTRUCT(&pbkt);
|
||||||
PMIX_DESTRUCT(&cb);
|
PMIX_DESTRUCT(&cb);
|
||||||
@ -650,6 +685,7 @@ static pmix_status_t _satisfy_request(pmix_nspace_t *nptr, pmix_rank_t rank,
|
|||||||
/* pack the rank */
|
/* pack the rank */
|
||||||
PMIX_BFROPS_PACK(rc, cd->peer, &pbkt, &rank, 1, PMIX_PROC_RANK);
|
PMIX_BFROPS_PACK(rc, cd->peer, &pbkt, &rank, 1, PMIX_PROC_RANK);
|
||||||
if (PMIX_SUCCESS != rc) {
|
if (PMIX_SUCCESS != rc) {
|
||||||
|
PMIX_ERROR_LOG(rc);
|
||||||
PMIX_DESTRUCT(&pkt);
|
PMIX_DESTRUCT(&pkt);
|
||||||
PMIX_DESTRUCT(&pbkt);
|
PMIX_DESTRUCT(&pbkt);
|
||||||
PMIX_DESTRUCT(&cb);
|
PMIX_DESTRUCT(&cb);
|
||||||
@ -658,6 +694,7 @@ static pmix_status_t _satisfy_request(pmix_nspace_t *nptr, pmix_rank_t rank,
|
|||||||
/* now pack the data itself as a buffer */
|
/* now pack the data itself as a buffer */
|
||||||
PMIX_BFROPS_PACK(rc, cd->peer, &pbkt, &pkt, 1, PMIX_BUFFER);
|
PMIX_BFROPS_PACK(rc, cd->peer, &pbkt, &pkt, 1, PMIX_BUFFER);
|
||||||
if (PMIX_SUCCESS != rc) {
|
if (PMIX_SUCCESS != rc) {
|
||||||
|
PMIX_ERROR_LOG(rc);
|
||||||
PMIX_DESTRUCT(&pkt);
|
PMIX_DESTRUCT(&pkt);
|
||||||
PMIX_DESTRUCT(&pbkt);
|
PMIX_DESTRUCT(&pbkt);
|
||||||
PMIX_DESTRUCT(&cb);
|
PMIX_DESTRUCT(&cb);
|
||||||
@ -670,6 +707,7 @@ static pmix_status_t _satisfy_request(pmix_nspace_t *nptr, pmix_rank_t rank,
|
|||||||
/* pack it for transmission */
|
/* pack it for transmission */
|
||||||
PMIX_BFROPS_PACK(rc, cd->peer, &pbkt, &bo, 1, PMIX_BYTE_OBJECT);
|
PMIX_BFROPS_PACK(rc, cd->peer, &pbkt, &bo, 1, PMIX_BYTE_OBJECT);
|
||||||
if (PMIX_SUCCESS != rc) {
|
if (PMIX_SUCCESS != rc) {
|
||||||
|
PMIX_ERROR_LOG(rc);
|
||||||
PMIX_DESTRUCT(&pbkt);
|
PMIX_DESTRUCT(&pbkt);
|
||||||
PMIX_DESTRUCT(&cb);
|
PMIX_DESTRUCT(&cb);
|
||||||
return rc;
|
return rc;
|
||||||
@ -687,12 +725,6 @@ static pmix_status_t _satisfy_request(pmix_nspace_t *nptr, pmix_rank_t rank,
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((PMIX_LOCAL == scope) && !found) {
|
|
||||||
/* pass PMIX_ERR_NOT_FOUND for local request if it's not found*/
|
|
||||||
cbfunc(PMIX_ERR_NOT_FOUND, NULL, 0, cbdata, NULL, NULL);
|
|
||||||
return PMIX_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
return PMIX_ERR_NOT_FOUND;
|
return PMIX_ERR_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -774,7 +806,7 @@ static void _process_dmdx_reply(int fd, short args, void *cbdata)
|
|||||||
|
|
||||||
PMIX_ACQUIRE_OBJECT(caddy);
|
PMIX_ACQUIRE_OBJECT(caddy);
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.get_output,
|
||||||
"[%s:%d] process dmdx reply from %s:%u",
|
"[%s:%d] process dmdx reply from %s:%u",
|
||||||
__FILE__, __LINE__,
|
__FILE__, __LINE__,
|
||||||
caddy->lcd->proc.nspace, caddy->lcd->proc.rank);
|
caddy->lcd->proc.nspace, caddy->lcd->proc.rank);
|
||||||
@ -903,7 +935,7 @@ static void dmdx_cbfunc(pmix_status_t status,
|
|||||||
caddy->data = data;
|
caddy->data = data;
|
||||||
caddy->ndata = ndata;
|
caddy->ndata = ndata;
|
||||||
caddy->lcd = (pmix_dmdx_local_t *)cbdata;
|
caddy->lcd = (pmix_dmdx_local_t *)cbdata;
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.get_output,
|
||||||
"[%s:%d] queue dmdx reply for %s:%u",
|
"[%s:%d] queue dmdx reply for %s:%u",
|
||||||
__FILE__, __LINE__,
|
__FILE__, __LINE__,
|
||||||
caddy->lcd->proc.nspace, caddy->lcd->proc.rank);
|
caddy->lcd->proc.nspace, caddy->lcd->proc.rank);
|
||||||
|
@ -70,7 +70,7 @@ pmix_status_t pmix_server_abort(pmix_peer_t *peer, pmix_buffer_t *buf,
|
|||||||
pmix_proc_t *procs = NULL;
|
pmix_proc_t *procs = NULL;
|
||||||
pmix_proc_t proc;
|
pmix_proc_t proc;
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output, "recvd ABORT");
|
pmix_output_verbose(2, pmix_server_globals.base_output, "recvd ABORT");
|
||||||
|
|
||||||
/* unpack the status */
|
/* unpack the status */
|
||||||
cnt = 1;
|
cnt = 1;
|
||||||
@ -156,7 +156,7 @@ pmix_status_t pmix_server_commit(pmix_peer_t *peer, pmix_buffer_t *buf)
|
|||||||
(void)strncpy(proc.nspace, nptr->nspace, PMIX_MAX_NSLEN);
|
(void)strncpy(proc.nspace, nptr->nspace, PMIX_MAX_NSLEN);
|
||||||
proc.rank = info->pname.rank;
|
proc.rank = info->pname.rank;
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.base_output,
|
||||||
"%s:%d EXECUTE COMMIT FOR %s:%d",
|
"%s:%d EXECUTE COMMIT FOR %s:%d",
|
||||||
pmix_globals.myid.nspace,
|
pmix_globals.myid.nspace,
|
||||||
pmix_globals.myid.rank,
|
pmix_globals.myid.rank,
|
||||||
@ -290,7 +290,7 @@ static pmix_server_trkr_t* get_tracker(pmix_proc_t *procs,
|
|||||||
size_t i, j;
|
size_t i, j;
|
||||||
size_t matches;
|
size_t matches;
|
||||||
|
|
||||||
pmix_output_verbose(5, pmix_globals.debug_output,
|
pmix_output_verbose(5, pmix_server_globals.base_output,
|
||||||
"get_tracker called with %d procs", (int)nprocs);
|
"get_tracker called with %d procs", (int)nprocs);
|
||||||
|
|
||||||
/* bozo check - should never happen outside of programmer error */
|
/* bozo check - should never happen outside of programmer error */
|
||||||
@ -360,7 +360,7 @@ static pmix_server_trkr_t* new_tracker(pmix_proc_t *procs,
|
|||||||
pmix_nspace_t *nptr, *ns;
|
pmix_nspace_t *nptr, *ns;
|
||||||
pmix_rank_info_t *info;
|
pmix_rank_info_t *info;
|
||||||
|
|
||||||
pmix_output_verbose(5, pmix_globals.debug_output,
|
pmix_output_verbose(5, pmix_server_globals.base_output,
|
||||||
"new_tracker called with %d procs", (int)nprocs);
|
"new_tracker called with %d procs", (int)nprocs);
|
||||||
|
|
||||||
/* bozo check - should never happen outside of programmer error */
|
/* bozo check - should never happen outside of programmer error */
|
||||||
@ -369,7 +369,7 @@ static pmix_server_trkr_t* new_tracker(pmix_proc_t *procs,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
pmix_output_verbose(5, pmix_globals.debug_output,
|
pmix_output_verbose(5, pmix_server_globals.base_output,
|
||||||
"adding new tracker with %d procs", (int)nprocs);
|
"adding new tracker with %d procs", (int)nprocs);
|
||||||
|
|
||||||
/* this tracker is new - create it */
|
/* this tracker is new - create it */
|
||||||
@ -406,7 +406,7 @@ static pmix_server_trkr_t* new_tracker(pmix_proc_t *procs,
|
|||||||
}
|
}
|
||||||
if (NULL == nptr) {
|
if (NULL == nptr) {
|
||||||
/* cannot be a local proc */
|
/* cannot be a local proc */
|
||||||
pmix_output_verbose(5, pmix_globals.debug_output,
|
pmix_output_verbose(5, pmix_server_globals.base_output,
|
||||||
"new_tracker: unknown nspace %s",
|
"new_tracker: unknown nspace %s",
|
||||||
procs[i].nspace);
|
procs[i].nspace);
|
||||||
continue;
|
continue;
|
||||||
@ -416,7 +416,7 @@ static pmix_server_trkr_t* new_tracker(pmix_proc_t *procs,
|
|||||||
/* nope, so no point in going further on this one - we'll
|
/* nope, so no point in going further on this one - we'll
|
||||||
* process it once all the procs are known */
|
* process it once all the procs are known */
|
||||||
all_def = false;
|
all_def = false;
|
||||||
pmix_output_verbose(5, pmix_globals.debug_output,
|
pmix_output_verbose(5, pmix_server_globals.base_output,
|
||||||
"new_tracker: all clients not registered nspace %s",
|
"new_tracker: all clients not registered nspace %s",
|
||||||
procs[i].nspace);
|
procs[i].nspace);
|
||||||
/* we have to continue processing the list of procs
|
/* we have to continue processing the list of procs
|
||||||
@ -427,7 +427,7 @@ static pmix_server_trkr_t* new_tracker(pmix_proc_t *procs,
|
|||||||
PMIX_LIST_FOREACH(info, &nptr->ranks, pmix_rank_info_t) {
|
PMIX_LIST_FOREACH(info, &nptr->ranks, pmix_rank_info_t) {
|
||||||
if (procs[i].rank == info->pname.rank ||
|
if (procs[i].rank == info->pname.rank ||
|
||||||
PMIX_RANK_WILDCARD == procs[i].rank) {
|
PMIX_RANK_WILDCARD == procs[i].rank) {
|
||||||
pmix_output_verbose(5, pmix_globals.debug_output,
|
pmix_output_verbose(5, pmix_server_globals.base_output,
|
||||||
"adding local proc %s.%d to tracker",
|
"adding local proc %s.%d to tracker",
|
||||||
info->pname.nspace, info->pname.rank);
|
info->pname.nspace, info->pname.rank);
|
||||||
/* track the count */
|
/* track the count */
|
||||||
@ -466,7 +466,7 @@ pmix_status_t pmix_server_fence(pmix_server_caddy_t *cd,
|
|||||||
pmix_info_t *info = NULL;
|
pmix_info_t *info = NULL;
|
||||||
size_t ninfo=0, n;
|
size_t ninfo=0, n;
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.fence_output,
|
||||||
"recvd FENCE");
|
"recvd FENCE");
|
||||||
|
|
||||||
if (NULL == pmix_host_server.fence_nb) {
|
if (NULL == pmix_host_server.fence_nb) {
|
||||||
@ -480,7 +480,7 @@ pmix_status_t pmix_server_fence(pmix_server_caddy_t *cd,
|
|||||||
if (PMIX_SUCCESS != rc) {
|
if (PMIX_SUCCESS != rc) {
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.fence_output,
|
||||||
"recvd fence from %s:%u with %d procs",
|
"recvd fence from %s:%u with %d procs",
|
||||||
cd->peer->info->pname.nspace, cd->peer->info->pname.rank, (int)nprocs);
|
cd->peer->info->pname.nspace, cd->peer->info->pname.rank, (int)nprocs);
|
||||||
/* there must be at least one as the client has to at least provide
|
/* there must be at least one as the client has to at least provide
|
||||||
@ -588,7 +588,7 @@ pmix_status_t pmix_server_fence(pmix_server_caddy_t *cd,
|
|||||||
* across all participants has been completed */
|
* across all participants has been completed */
|
||||||
if (trk->def_complete &&
|
if (trk->def_complete &&
|
||||||
pmix_list_get_size(&trk->local_cbs) == trk->nlocal) {
|
pmix_list_get_size(&trk->local_cbs) == trk->nlocal) {
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.base_output,
|
||||||
"fence complete");
|
"fence complete");
|
||||||
/* if the user asked us to collect data, then we have
|
/* if the user asked us to collect data, then we have
|
||||||
* to provide any locally collected data to the host
|
* to provide any locally collected data to the host
|
||||||
@ -606,7 +606,7 @@ pmix_status_t pmix_server_fence(pmix_server_caddy_t *cd,
|
|||||||
&tmp, 1, PMIX_BYTE);
|
&tmp, 1, PMIX_BYTE);
|
||||||
|
|
||||||
if (PMIX_COLLECT_YES == trk->collect_type) {
|
if (PMIX_COLLECT_YES == trk->collect_type) {
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.fence_output,
|
||||||
"fence - assembling data");
|
"fence - assembling data");
|
||||||
PMIX_LIST_FOREACH(scd, &trk->local_cbs, pmix_server_caddy_t) {
|
PMIX_LIST_FOREACH(scd, &trk->local_cbs, pmix_server_caddy_t) {
|
||||||
/* get any remote contribution - note that there
|
/* get any remote contribution - note that there
|
||||||
@ -710,7 +710,7 @@ pmix_status_t pmix_server_publish(pmix_peer_t *peer,
|
|||||||
pmix_proc_t proc;
|
pmix_proc_t proc;
|
||||||
uint32_t uid;
|
uint32_t uid;
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.pub_output,
|
||||||
"recvd PUBLISH");
|
"recvd PUBLISH");
|
||||||
|
|
||||||
if (NULL == pmix_host_server.publish) {
|
if (NULL == pmix_host_server.publish) {
|
||||||
@ -805,7 +805,7 @@ pmix_status_t pmix_server_lookup(pmix_peer_t *peer,
|
|||||||
pmix_proc_t proc;
|
pmix_proc_t proc;
|
||||||
uint32_t uid;
|
uint32_t uid;
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.pub_output,
|
||||||
"recvd LOOKUP");
|
"recvd LOOKUP");
|
||||||
|
|
||||||
if (NULL == pmix_host_server.lookup) {
|
if (NULL == pmix_host_server.lookup) {
|
||||||
@ -901,7 +901,7 @@ pmix_status_t pmix_server_unpublish(pmix_peer_t *peer,
|
|||||||
pmix_proc_t proc;
|
pmix_proc_t proc;
|
||||||
uint32_t uid;
|
uint32_t uid;
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.pub_output,
|
||||||
"recvd UNPUBLISH");
|
"recvd UNPUBLISH");
|
||||||
|
|
||||||
if (NULL == pmix_host_server.unpublish) {
|
if (NULL == pmix_host_server.unpublish) {
|
||||||
@ -1014,7 +1014,7 @@ pmix_status_t pmix_server_spawn(pmix_peer_t *peer,
|
|||||||
pmix_proc_t proc;
|
pmix_proc_t proc;
|
||||||
size_t ninfo;
|
size_t ninfo;
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.spawn_output,
|
||||||
"recvd SPAWN");
|
"recvd SPAWN");
|
||||||
|
|
||||||
if (NULL == pmix_host_server.spawn) {
|
if (NULL == pmix_host_server.spawn) {
|
||||||
@ -1225,7 +1225,7 @@ pmix_status_t pmix_server_connect(pmix_server_caddy_t *cd,
|
|||||||
size_t nprocs, ninfo;
|
size_t nprocs, ninfo;
|
||||||
pmix_server_trkr_t *trk;
|
pmix_server_trkr_t *trk;
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.connect_output,
|
||||||
"recvd CONNECT from peer %s:%d",
|
"recvd CONNECT from peer %s:%d",
|
||||||
cd->peer->info->pname.nspace,
|
cd->peer->info->pname.nspace,
|
||||||
cd->peer->info->pname.rank);
|
cd->peer->info->pname.rank);
|
||||||
@ -1355,7 +1355,7 @@ pmix_status_t pmix_server_register_events(pmix_peer_t *peer,
|
|||||||
pmix_buffer_t *relay;
|
pmix_buffer_t *relay;
|
||||||
pmix_cmd_t cmd = PMIX_NOTIFY_CMD;
|
pmix_cmd_t cmd = PMIX_NOTIFY_CMD;
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.event_output,
|
||||||
"recvd register events");
|
"recvd register events");
|
||||||
|
|
||||||
/* unpack the number of codes */
|
/* unpack the number of codes */
|
||||||
@ -1528,7 +1528,7 @@ pmix_status_t pmix_server_register_events(pmix_peer_t *peer,
|
|||||||
scd->opcbfunc = cbfunc;
|
scd->opcbfunc = cbfunc;
|
||||||
scd->cbdata = cbdata;
|
scd->cbdata = cbdata;
|
||||||
if (PMIX_SUCCESS != (rc = pmix_host_server.register_events(scd->codes, scd->ncodes, scd->info, scd->ninfo, opcbfunc, scd))) {
|
if (PMIX_SUCCESS != (rc = pmix_host_server.register_events(scd->codes, scd->ncodes, scd->info, scd->ninfo, opcbfunc, scd))) {
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.event_output,
|
||||||
"server register events: host server reg events returned rc =%d", rc);
|
"server register events: host server reg events returned rc =%d", rc);
|
||||||
if (NULL != scd->codes) {
|
if (NULL != scd->codes) {
|
||||||
free(scd->codes);
|
free(scd->codes);
|
||||||
@ -1543,7 +1543,7 @@ pmix_status_t pmix_server_register_events(pmix_peer_t *peer,
|
|||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.event_output,
|
||||||
"server register events: ninfo =%lu rc =%d", ninfo, rc);
|
"server register events: ninfo =%lu rc =%d", ninfo, rc);
|
||||||
/* be sure to execute the callback */
|
/* be sure to execute the callback */
|
||||||
if (NULL != cbfunc) {
|
if (NULL != cbfunc) {
|
||||||
@ -1659,7 +1659,7 @@ void pmix_server_deregister_events(pmix_peer_t *peer,
|
|||||||
pmix_regevents_info_t *reginfo_next;
|
pmix_regevents_info_t *reginfo_next;
|
||||||
pmix_peer_events_info_t *prev;
|
pmix_peer_events_info_t *prev;
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.event_output,
|
||||||
"recvd deregister events");
|
"recvd deregister events");
|
||||||
|
|
||||||
/* unpack codes and process until done */
|
/* unpack codes and process until done */
|
||||||
@ -1713,7 +1713,7 @@ pmix_status_t pmix_server_event_recvd_from_client(pmix_peer_t *peer,
|
|||||||
pmix_status_t rc;
|
pmix_status_t rc;
|
||||||
pmix_notify_caddy_t *cd;
|
pmix_notify_caddy_t *cd;
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.event_output,
|
||||||
"recvd event notification from client");
|
"recvd event notification from client");
|
||||||
|
|
||||||
if (NULL == pmix_host_server.notify_event) {
|
if (NULL == pmix_host_server.notify_event) {
|
||||||
@ -1804,7 +1804,7 @@ pmix_status_t pmix_server_query(pmix_peer_t *peer,
|
|||||||
pmix_query_caddy_t *cd;
|
pmix_query_caddy_t *cd;
|
||||||
pmix_proc_t proc;
|
pmix_proc_t proc;
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.base_output,
|
||||||
"recvd query from client");
|
"recvd query from client");
|
||||||
|
|
||||||
if (NULL == pmix_host_server.query) {
|
if (NULL == pmix_host_server.query) {
|
||||||
@ -1872,7 +1872,7 @@ pmix_status_t pmix_server_log(pmix_peer_t *peer,
|
|||||||
pmix_shift_caddy_t *cd;
|
pmix_shift_caddy_t *cd;
|
||||||
pmix_proc_t proc;
|
pmix_proc_t proc;
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.base_output,
|
||||||
"recvd log from client");
|
"recvd log from client");
|
||||||
|
|
||||||
if (NULL == pmix_host_server.log) {
|
if (NULL == pmix_host_server.log) {
|
||||||
@ -1946,7 +1946,7 @@ pmix_status_t pmix_server_alloc(pmix_peer_t *peer,
|
|||||||
pmix_proc_t proc;
|
pmix_proc_t proc;
|
||||||
pmix_alloc_directive_t directive;
|
pmix_alloc_directive_t directive;
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.base_output,
|
||||||
"recvd query from client");
|
"recvd query from client");
|
||||||
|
|
||||||
if (NULL == pmix_host_server.allocate) {
|
if (NULL == pmix_host_server.allocate) {
|
||||||
@ -2012,7 +2012,7 @@ pmix_status_t pmix_server_job_ctrl(pmix_peer_t *peer,
|
|||||||
pmix_query_caddy_t *cd;
|
pmix_query_caddy_t *cd;
|
||||||
pmix_proc_t proc;
|
pmix_proc_t proc;
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.base_output,
|
||||||
"recvd job control request from client");
|
"recvd job control request from client");
|
||||||
|
|
||||||
if (NULL == pmix_host_server.job_control) {
|
if (NULL == pmix_host_server.job_control) {
|
||||||
@ -2088,7 +2088,7 @@ pmix_status_t pmix_server_monitor(pmix_peer_t *peer,
|
|||||||
pmix_query_caddy_t *cd;
|
pmix_query_caddy_t *cd;
|
||||||
pmix_proc_t proc;
|
pmix_proc_t proc;
|
||||||
|
|
||||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
pmix_output_verbose(2, pmix_server_globals.base_output,
|
||||||
"recvd monitor request from client");
|
"recvd monitor request from client");
|
||||||
|
|
||||||
if (NULL == pmix_host_server.monitor) {
|
if (NULL == pmix_host_server.monitor) {
|
||||||
|
@ -107,6 +107,28 @@ typedef struct {
|
|||||||
pmix_list_t gdata; // cache of data given to me for passing to all clients
|
pmix_list_t gdata; // cache of data given to me for passing to all clients
|
||||||
pmix_list_t events; // list of pmix_regevents_info_t registered events
|
pmix_list_t events; // list of pmix_regevents_info_t registered events
|
||||||
bool tool_connections_allowed;
|
bool tool_connections_allowed;
|
||||||
|
// verbosity for server get operations
|
||||||
|
int get_output;
|
||||||
|
int get_verbose;
|
||||||
|
// verbosity for server connect operations
|
||||||
|
int connect_output;
|
||||||
|
int connect_verbose;
|
||||||
|
// verbosity for server fence operations
|
||||||
|
int fence_output;
|
||||||
|
int fence_verbose;
|
||||||
|
// verbosity for server pub operations
|
||||||
|
int pub_output;
|
||||||
|
int pub_verbose;
|
||||||
|
// verbosity for server spawn operations
|
||||||
|
int spawn_output;
|
||||||
|
int spawn_verbose;
|
||||||
|
// verbosity for server event operations
|
||||||
|
int event_output;
|
||||||
|
int event_verbose;
|
||||||
|
// verbosity for basic server functions
|
||||||
|
int base_output;
|
||||||
|
int base_verbose;
|
||||||
|
|
||||||
} pmix_server_globals_t;
|
} pmix_server_globals_t;
|
||||||
|
|
||||||
#define PMIX_GDS_CADDY(c, p, t) \
|
#define PMIX_GDS_CADDY(c, p, t) \
|
||||||
|
@ -75,12 +75,10 @@ typedef struct {
|
|||||||
PMIX_CONSTRUCT(&(l)->mutex, pmix_mutex_t); \
|
PMIX_CONSTRUCT(&(l)->mutex, pmix_mutex_t); \
|
||||||
pthread_cond_init(&(l)->cond, NULL); \
|
pthread_cond_init(&(l)->cond, NULL); \
|
||||||
(l)->active = true; \
|
(l)->active = true; \
|
||||||
PMIX_POST_OBJECT((l)); \
|
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
#define PMIX_DESTRUCT_LOCK(l) \
|
#define PMIX_DESTRUCT_LOCK(l) \
|
||||||
do { \
|
do { \
|
||||||
PMIX_ACQUIRE_OBJECT((l)); \
|
|
||||||
PMIX_DESTRUCT(&(l)->mutex); \
|
PMIX_DESTRUCT(&(l)->mutex); \
|
||||||
pthread_cond_destroy(&(l)->cond); \
|
pthread_cond_destroy(&(l)->cond); \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
@ -84,7 +84,7 @@ static void valcbfunc(pmix_status_t status,
|
|||||||
}
|
}
|
||||||
pmix_output(0, "%s:%d PMIx_Get_nb Key %s returned correctly", myproc.nspace, myproc.rank, key);
|
pmix_output(0, "%s:%d PMIx_Get_nb Key %s returned correctly", myproc.nspace, myproc.rank, key);
|
||||||
} else {
|
} else {
|
||||||
pmix_output(0, "%s:%d PMIx_Get_nb Key %s failed", myproc.nspace, myproc.rank, key);
|
pmix_output(0, "%s:%d PMIx_Get_nb Key %s failed: %s", myproc.nspace, myproc.rank, key, PMIx_Error_string(status));
|
||||||
}
|
}
|
||||||
done:
|
done:
|
||||||
free(key);
|
free(key);
|
||||||
@ -100,6 +100,11 @@ int main(int argc, char **argv)
|
|||||||
pmix_proc_t proc;
|
pmix_proc_t proc;
|
||||||
uint32_t n, num_gets;
|
uint32_t n, num_gets;
|
||||||
bool active;
|
bool active;
|
||||||
|
bool dofence = true;
|
||||||
|
|
||||||
|
if (NULL != getenv("PMIX_SIMPDMODEX_ASYNC")) {
|
||||||
|
dofence = false;
|
||||||
|
}
|
||||||
|
|
||||||
/* init us */
|
/* init us */
|
||||||
if (PMIX_SUCCESS != (rc = PMIx_Init(&myproc, NULL, 0))) {
|
if (PMIX_SUCCESS != (rc = PMIx_Init(&myproc, NULL, 0))) {
|
||||||
@ -148,6 +153,7 @@ int main(int argc, char **argv)
|
|||||||
* if a "get" is received prior to data being provided */
|
* if a "get" is received prior to data being provided */
|
||||||
if (0 == myproc.rank) {
|
if (0 == myproc.rank) {
|
||||||
sleep(2);
|
sleep(2);
|
||||||
|
pmix_output(0, "\n\n\nWOKE UP");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* commit the data to the server */
|
/* commit the data to the server */
|
||||||
@ -156,14 +162,16 @@ int main(int argc, char **argv)
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* call fence_nb, but don't return any data */
|
if (dofence) {
|
||||||
PMIX_PROC_CONSTRUCT(&proc);
|
/* call fence_nb, but don't return any data */
|
||||||
(void)strncpy(proc.nspace, myproc.nspace, PMIX_MAX_NSLEN);
|
PMIX_PROC_CONSTRUCT(&proc);
|
||||||
proc.rank = PMIX_RANK_WILDCARD;
|
(void)strncpy(proc.nspace, myproc.nspace, PMIX_MAX_NSLEN);
|
||||||
active = true;
|
proc.rank = PMIX_RANK_WILDCARD;
|
||||||
if (PMIX_SUCCESS != (rc = PMIx_Fence_nb(&proc, 1, NULL, 0, opcbfunc, &active))) {
|
active = true;
|
||||||
pmix_output(0, "Client ns %s rank %d: PMIx_Fence failed: %d", myproc.nspace, myproc.rank, rc);
|
if (PMIX_SUCCESS != (rc = PMIx_Fence_nb(&proc, 1, NULL, 0, opcbfunc, &active))) {
|
||||||
goto done;
|
pmix_output(0, "Client ns %s rank %d: PMIx_Fence failed: %d", myproc.nspace, myproc.rank, rc);
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* get the committed data - ask for someone who doesn't exist as well */
|
/* get the committed data - ask for someone who doesn't exist as well */
|
||||||
@ -186,8 +194,10 @@ int main(int argc, char **argv)
|
|||||||
++num_gets;
|
++num_gets;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* wait for the first fence to finish */
|
if (dofence) {
|
||||||
PMIX_WAIT_FOR_COMPLETION(active);
|
/* wait for the first fence to finish */
|
||||||
|
PMIX_WAIT_FOR_COMPLETION(active);
|
||||||
|
}
|
||||||
|
|
||||||
/* wait for all my "get" calls to complete */
|
/* wait for all my "get" calls to complete */
|
||||||
while (getcount < num_gets) {
|
while (getcount < num_gets) {
|
||||||
|
@ -37,12 +37,6 @@
|
|||||||
|
|
||||||
BEGIN_C_DECLS
|
BEGIN_C_DECLS
|
||||||
|
|
||||||
#ifdef OPAL_C_HAVE_VISIBILITY
|
|
||||||
#define PMIX_HAVE_VISIBILITY 1
|
|
||||||
#else
|
|
||||||
#undef PMIX_HAVE_VISIBILITY
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
opal_pmix_base_component_t super;
|
opal_pmix_base_component_t super;
|
||||||
opal_list_t jobids;
|
opal_list_t jobids;
|
||||||
|
@ -99,6 +99,11 @@ int pmix3x_client_init(opal_list_t *ilist)
|
|||||||
ninfo = 0;
|
ninfo = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* check for direct modex use-case */
|
||||||
|
if (opal_pmix_base_async_modex && !opal_pmix_collect_all_data) {
|
||||||
|
opal_setenv("PMIX_MCA_gds", "hash", true, &environ);
|
||||||
|
}
|
||||||
|
|
||||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||||
rc = PMIx_Init(&my_proc, pinfo, ninfo);
|
rc = PMIx_Init(&my_proc, pinfo, ninfo);
|
||||||
if (NULL != pinfo) {
|
if (NULL != pinfo) {
|
||||||
|
@ -128,6 +128,11 @@ int pmix3x_server_init(opal_pmix_server_module_t *module,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* check for direct modex use-case */
|
||||||
|
if (opal_pmix_base_async_modex && !opal_pmix_collect_all_data) {
|
||||||
|
opal_setenv("PMIX_MCA_gds", "hash", true, &environ);
|
||||||
|
}
|
||||||
|
|
||||||
/* insert ourselves into our list of jobids - it will be the
|
/* insert ourselves into our list of jobids - it will be the
|
||||||
* first, and so we'll check it first */
|
* first, and so we'll check it first */
|
||||||
job = OBJ_NEW(opal_pmix3x_jobid_trkr_t);
|
job = OBJ_NEW(opal_pmix3x_jobid_trkr_t);
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user