Sync to PMIx master
Signed-off-by: Ralph Castain <rhc@open-mpi.org>
Этот коммит содержится в:
родитель
3326439cf5
Коммит
c3b239cee8
@ -30,7 +30,7 @@ greek=
|
||||
# command, or with the date (if "git describe" fails) in the form of
|
||||
# "date<date>".
|
||||
|
||||
repo_rev=git0de7b68
|
||||
repo_rev=git9526eb3
|
||||
|
||||
# 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="Oct 05, 2017"
|
||||
date="Oct 06, 2017"
|
||||
|
||||
# The shared library version of each of PMIx's public libraries.
|
||||
# These versions are maintained in accordance with the "Library
|
||||
@ -76,3 +76,5 @@ date="Oct 05, 2017"
|
||||
# format.
|
||||
|
||||
libpmix_so_version=0:0:0
|
||||
libpmi_so_version=0:0:0
|
||||
libpmi2_so_version=0:0:0
|
||||
|
@ -50,7 +50,7 @@ AC_DEFUN([_PMIX_LIBEVENT_EMBEDDED_MODE],[
|
||||
])
|
||||
|
||||
AC_DEFUN([_PMIX_LIBEVENT_EXTERNAL],[
|
||||
PMIX_VAR_SCOPE_PUSH([pmix_event_dir pmix_event_libdir])
|
||||
PMIX_VAR_SCOPE_PUSH([pmix_event_dir pmix_event_libdir pmix_event_defaults])
|
||||
|
||||
AC_ARG_WITH([libevent],
|
||||
[AC_HELP_STRING([--with-libevent=DIR],
|
||||
@ -67,17 +67,32 @@ AC_DEFUN([_PMIX_LIBEVENT_EXTERNAL],[
|
||||
|
||||
AC_MSG_CHECKING([for libevent in])
|
||||
if test ! -z "$with_libevent" && test "$with_libevent" != "yes"; then
|
||||
pmix_event_defaults=no
|
||||
pmix_event_dir=$with_libevent
|
||||
if test -d $with_libevent/lib; then
|
||||
pmix_event_libdir=$with_libevent/lib
|
||||
elif test -d $with_libevent/lib64; then
|
||||
pmix_event_libdir=$with_libevent/lib64
|
||||
elif test -d $with_libevent; then
|
||||
pmix_event_libdir=$with_libevent
|
||||
else
|
||||
AC_MSG_RESULT([Could not find $with_libevent/lib or $with_libevent/lib64])
|
||||
AC_MSG_RESULT([Could not find $with_libevent/lib, $with_libevent/lib64, or $with_libevent])
|
||||
AC_MSG_ERROR([Can not continue])
|
||||
fi
|
||||
AC_MSG_RESULT([$pmix_event_dir and $pmix_event_libdir])
|
||||
else
|
||||
pmix_event_defaults=yes
|
||||
pmix_event_dir=/usr/include
|
||||
if test -d /usr/lib; then
|
||||
pmix_event_libdir=/usr/lib
|
||||
elif test -d /usr/lib64; then
|
||||
pmix_event_libdir=/usr/lib64
|
||||
else
|
||||
AC_MSG_RESULT([not found])
|
||||
AC_MSG_WARN([Could not find /usr/lib or /usr/lib64 - you may])
|
||||
AC_MSG_WARN([to specify --with-libevent-libdir=<path>])
|
||||
AC_MSG_ERROR([Can not continue])
|
||||
fi
|
||||
AC_MSG_RESULT([(default search paths)])
|
||||
fi
|
||||
AS_IF([test ! -z "$with_libevent_libdir" && "$with_libevent_libdir" != "yes"],
|
||||
@ -92,11 +107,13 @@ AC_DEFUN([_PMIX_LIBEVENT_EXTERNAL],[
|
||||
[$pmix_event_libdir],
|
||||
[],
|
||||
[AC_MSG_WARN([LIBEVENT SUPPORT NOT FOUND])
|
||||
AC_MSG_ERROR([CANNOT CONTINE])])
|
||||
AC_MSG_ERROR([CANNOT CONTINUE])])
|
||||
|
||||
AS_IF([test "$pmix_event_defaults" = "no"],
|
||||
[PMIX_FLAGS_APPEND_UNIQ(CPPFLAGS, $pmix_libevent_CPPFLAGS)
|
||||
PMIX_FLAGS_APPEND_UNIQ(LIBS, $pmix_libevent_LIBS)
|
||||
PMIX_FLAGS_APPEND_UNIQ(LDFLAGS, $pmix_libevent_LDFLAGS)])
|
||||
|
||||
PMIX_FLAGS_APPEND_UNIQ(CPPFLAGS, $pmix_libevent_CPPFLAGS)
|
||||
PMIX_FLAGS_APPEND_UNIQ(LIBS, $pmix_libevent_LIBS)
|
||||
PMIX_FLAGS_APPEND_UNIQ(LDFLAGS, $pmix_libevent_LDFLAGS)
|
||||
|
||||
# Ensure that this libevent has the symbol
|
||||
# "evthread_set_lock_callbacks", which will only exist if
|
||||
|
@ -237,6 +237,8 @@ AC_SUBST([CONFIGURE_DEPENDENCIES], ['$(top_srcdir)/VERSION'])
|
||||
|
||||
. $srcdir/VERSION
|
||||
AC_SUBST([libpmix_so_version])
|
||||
AC_SUBST([libpmi_so_version])
|
||||
AC_SUBST([libpmi2_so_version])
|
||||
|
||||
AC_CONFIG_FILES(pmix_config_prefix[contrib/Makefile]
|
||||
pmix_config_prefix[examples/Makefile]
|
||||
|
@ -71,6 +71,14 @@ lib_LTLIBRARIES = libpmix.la
|
||||
libpmix_la_SOURCES = $(headers) $(sources)
|
||||
libpmix_la_LDFLAGS = -version-info $(libpmix_so_version)
|
||||
|
||||
if WANT_PMI_BACKWARD
|
||||
lib_LTLIBRARIES += libpmi.la libpmi2.la
|
||||
libpmi_la_SOURCES = $(headers) $(sources)
|
||||
libpmi_la_LDFLAGS = -version-info $(libpmi_so_version)
|
||||
libpmi2_la_SOURCES = $(headers) $(sources)
|
||||
libpmi2_la_LDFLAGS = -version-info $(libpmi2_so_version)
|
||||
endif
|
||||
|
||||
endif !PMIX_EMBEDDED_MODE
|
||||
|
||||
include atomics/sys/Makefile.include
|
||||
|
@ -45,11 +45,11 @@
|
||||
#define PMI_MAX_VAL_LEN 4096 /* Maximum size of a PMI value */
|
||||
|
||||
|
||||
#define PMI_CHECK() \
|
||||
do { \
|
||||
if (!pmi_init) { \
|
||||
return PMI_FAIL; \
|
||||
} \
|
||||
#define PMI_CHECK() \
|
||||
do { \
|
||||
if (!pmi_init) { \
|
||||
return PMI_FAIL; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/* local functions */
|
||||
@ -57,6 +57,7 @@ static pmix_status_t convert_int(int *value, pmix_value_t *kv);
|
||||
static int convert_err(pmix_status_t rc);
|
||||
static pmix_proc_t myproc;
|
||||
static int pmi_init = 0;
|
||||
static bool pmi_singleton = false;
|
||||
|
||||
PMIX_EXPORT int PMI_Init(int *spawned)
|
||||
{
|
||||
@ -66,7 +67,19 @@ PMIX_EXPORT int PMI_Init(int *spawned)
|
||||
pmix_info_t info[1];
|
||||
bool val_optinal = 1;
|
||||
|
||||
if (PMIX_SUCCESS != PMIx_Init(&myproc, NULL, 0)) {
|
||||
if (PMIX_SUCCESS != (rc = PMIx_Init(&myproc, NULL, 0))) {
|
||||
/* if we didn't see a PMIx server (e.g., missing envar),
|
||||
* then allow us to run as a singleton */
|
||||
if (PMIX_ERR_INVALID_NAMESPACE == rc) {
|
||||
if (NULL != spawned) {
|
||||
*spawned = 0;
|
||||
}
|
||||
pmi_singleton = true;
|
||||
(void)strncpy(myproc.nspace, "1234", PMIX_MAX_NSLEN);
|
||||
myproc.rank = 0;
|
||||
pmi_init = 1;
|
||||
return PMI_SUCCESS;
|
||||
}
|
||||
return PMI_ERR_INIT;
|
||||
}
|
||||
|
||||
@ -109,7 +122,11 @@ PMIX_EXPORT int PMI_Initialized(PMI_BOOL *initialized)
|
||||
return PMI_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
*initialized = (PMIx_Initialized() ? PMI_TRUE : PMI_FALSE);
|
||||
if (pmi_singleton) {
|
||||
*initialized = PMI_TRUE;
|
||||
} else {
|
||||
*initialized = (PMIx_Initialized() ? PMI_TRUE : PMI_FALSE);
|
||||
}
|
||||
|
||||
return PMI_SUCCESS;
|
||||
}
|
||||
@ -120,6 +137,10 @@ PMIX_EXPORT int PMI_Finalize(void)
|
||||
|
||||
PMI_CHECK();
|
||||
|
||||
if (pmi_singleton) {
|
||||
return PMI_SUCCESS;
|
||||
}
|
||||
|
||||
pmi_init = 0;
|
||||
rc = PMIx_Finalize(NULL, 0);
|
||||
return convert_err(rc);
|
||||
@ -131,6 +152,10 @@ PMIX_EXPORT int PMI_Abort(int flag, const char msg[])
|
||||
|
||||
PMI_CHECK();
|
||||
|
||||
if (pmi_singleton) {
|
||||
return PMI_SUCCESS;
|
||||
}
|
||||
|
||||
rc = PMIx_Abort(flag, msg, NULL, 0);
|
||||
return convert_err(rc);
|
||||
}
|
||||
@ -153,6 +178,9 @@ PMIX_EXPORT int PMI_KVS_Put(const char kvsname[], const char key[], const char v
|
||||
if ((value == NULL) || (strlen(value) > PMI_MAX_VAL_LEN)) {
|
||||
return PMI_ERR_INVALID_VAL;
|
||||
}
|
||||
if (pmi_singleton) {
|
||||
return PMI_SUCCESS;
|
||||
}
|
||||
|
||||
pmix_output_verbose(2, pmix_globals.debug_output,
|
||||
"PMI_KVS_Put: KVS=%s, key=%s value=%s", kvsname, key, value);
|
||||
@ -173,6 +201,9 @@ PMIX_EXPORT int PMI_KVS_Commit(const char kvsname[])
|
||||
if ((kvsname == NULL) || (strlen(kvsname) > PMI_MAX_KVSNAME_LEN)) {
|
||||
return PMI_ERR_INVALID_KVS;
|
||||
}
|
||||
if (pmi_singleton) {
|
||||
return PMI_SUCCESS;
|
||||
}
|
||||
|
||||
pmix_output_verbose(2, pmix_globals.debug_output, "PMI_KVS_Commit: KVS=%s",
|
||||
kvsname);
|
||||
@ -256,6 +287,10 @@ PMIX_EXPORT int PMI_Barrier(void)
|
||||
|
||||
PMI_CHECK();
|
||||
|
||||
if (pmi_singleton) {
|
||||
return PMI_SUCCESS;
|
||||
}
|
||||
|
||||
info = &buf;
|
||||
PMIX_INFO_CONSTRUCT(info);
|
||||
PMIX_INFO_LOAD(info, PMIX_COLLECT_DATA, &val, PMIX_BOOL);
|
||||
@ -282,6 +317,11 @@ PMIX_EXPORT int PMI_Get_size(int *size)
|
||||
return PMI_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
if (pmi_singleton) {
|
||||
*size = 1;
|
||||
return PMI_SUCCESS;
|
||||
}
|
||||
|
||||
/* set controlling parameters
|
||||
* PMIX_OPTIONAL - expect that these keys should be available on startup
|
||||
*/
|
||||
@ -326,6 +366,11 @@ PMIX_EXPORT int PMI_Get_universe_size(int *size)
|
||||
return PMI_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
if (pmi_singleton) {
|
||||
*size = 1;
|
||||
return PMI_SUCCESS;
|
||||
}
|
||||
|
||||
/* set controlling parameters
|
||||
* PMIX_OPTIONAL - expect that these keys should be available on startup
|
||||
*/
|
||||
@ -358,6 +403,11 @@ PMIX_EXPORT int PMI_Get_appnum(int *appnum)
|
||||
return PMI_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
if (pmi_singleton) {
|
||||
*appnum = 0;
|
||||
return PMI_SUCCESS;
|
||||
}
|
||||
|
||||
/* set controlling parameters
|
||||
* PMIX_OPTIONAL - expect that these keys should be available on startup
|
||||
*/
|
||||
@ -390,6 +440,10 @@ PMIX_EXPORT int PMI_Publish_name(const char service_name[], const char port[])
|
||||
return PMI_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
if (pmi_singleton) {
|
||||
return PMI_FAIL;
|
||||
}
|
||||
|
||||
/* pass the service/port */
|
||||
(void) strncpy(info.key, service_name, PMIX_MAX_KEYLEN);
|
||||
info.value.type = PMIX_STRING;
|
||||
@ -413,6 +467,10 @@ PMIX_EXPORT int PMI_Unpublish_name(const char service_name[])
|
||||
return PMI_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
if (pmi_singleton) {
|
||||
return PMI_FAIL;
|
||||
}
|
||||
|
||||
/* pass the service */
|
||||
keys[0] = (char*) service_name;
|
||||
keys[1] = NULL;
|
||||
@ -432,6 +490,10 @@ PMIX_EXPORT int PMI_Lookup_name(const char service_name[], char port[])
|
||||
return PMI_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
if (pmi_singleton) {
|
||||
return PMI_FAIL;
|
||||
}
|
||||
|
||||
PMIX_PDATA_CONSTRUCT(&pdata);
|
||||
|
||||
/* pass the service */
|
||||
@ -512,6 +574,11 @@ PMIX_EXPORT int PMI_Get_clique_size(int *size)
|
||||
return PMI_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
if (pmi_singleton) {
|
||||
*size = 1;
|
||||
return PMI_SUCCESS;
|
||||
}
|
||||
|
||||
/* set controlling parameters
|
||||
* PMIX_OPTIONAL - expect that these keys should be available on startup
|
||||
*/
|
||||
@ -544,6 +611,11 @@ PMIX_EXPORT int PMI_Get_clique_ranks(int ranks[], int length)
|
||||
return PMI_ERR_INVALID_ARGS;
|
||||
}
|
||||
|
||||
if (pmi_singleton) {
|
||||
ranks[0] = 0;
|
||||
return PMI_SUCCESS;
|
||||
}
|
||||
|
||||
rc = PMIx_Get(&proc, PMIX_LOCAL_PEERS, NULL, 0, &val);
|
||||
if (PMIX_SUCCESS == rc) {
|
||||
/* kv will contain a string of comma-separated
|
||||
@ -655,6 +727,10 @@ PMIX_EXPORT int PMI_Spawn_multiple(int count,
|
||||
return PMI_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
if (pmi_singleton) {
|
||||
return PMI_FAIL;
|
||||
}
|
||||
|
||||
/* setup the apps */
|
||||
PMIX_APP_CREATE(apps, count);
|
||||
for (i = 0; i < count; i++) {
|
||||
|
@ -38,11 +38,11 @@
|
||||
|
||||
#define ANL_MAPPING "PMI_process_mapping"
|
||||
|
||||
#define PMI2_CHECK() \
|
||||
do { \
|
||||
if (!pmi2_init) { \
|
||||
return PMI2_FAIL; \
|
||||
} \
|
||||
#define PMI2_CHECK() \
|
||||
do { \
|
||||
if (!pmi2_init) { \
|
||||
return PMI2_FAIL; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/* local functions */
|
||||
@ -51,6 +51,7 @@ static int convert_err(pmix_status_t rc);
|
||||
static pmix_proc_t myproc;
|
||||
static int pmi2_init = 0;
|
||||
static bool commit_reqd = false;
|
||||
static bool pmi2_singleton = false;
|
||||
|
||||
PMIX_EXPORT int PMI2_Init(int *spawned, int *size, int *rank, int *appnum)
|
||||
{
|
||||
@ -61,7 +62,28 @@ PMIX_EXPORT int PMI2_Init(int *spawned, int *size, int *rank, int *appnum)
|
||||
pmix_proc_t proc = myproc;
|
||||
proc.rank = PMIX_RANK_WILDCARD;
|
||||
|
||||
if (PMIX_SUCCESS != PMIx_Init(&myproc, NULL, 0)) {
|
||||
if (PMIX_SUCCESS != (rc = PMIx_Init(&myproc, NULL, 0))) {
|
||||
/* if we didn't see a PMIx server (e.g., missing envar),
|
||||
* then allow us to run as a singleton */
|
||||
if (PMIX_ERR_INVALID_NAMESPACE == rc) {
|
||||
if (NULL != spawned) {
|
||||
*spawned = 0;
|
||||
}
|
||||
if (NULL != size) {
|
||||
*size = 1;
|
||||
}
|
||||
if (NULL != rank) {
|
||||
*rank = 0;
|
||||
}
|
||||
if (NULL != appnum) {
|
||||
*appnum = 0;
|
||||
}
|
||||
pmi2_singleton = true;
|
||||
(void)strncpy(myproc.nspace, "1234", PMIX_MAX_NSLEN);
|
||||
myproc.rank = 0;
|
||||
pmi2_init = 1;
|
||||
return PMI2_SUCCESS;
|
||||
}
|
||||
return PMI2_ERR_INIT;
|
||||
}
|
||||
|
||||
@ -132,6 +154,10 @@ error:
|
||||
PMIX_EXPORT int PMI2_Initialized(void)
|
||||
{
|
||||
int initialized;
|
||||
if (pmi2_singleton) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
initialized = (int)PMIx_Initialized();
|
||||
return initialized;
|
||||
}
|
||||
@ -143,6 +169,10 @@ PMIX_EXPORT int PMI2_Finalize(void)
|
||||
PMI2_CHECK();
|
||||
|
||||
pmi2_init = 0;
|
||||
if (pmi2_singleton) {
|
||||
return PMI2_SUCCESS;
|
||||
}
|
||||
|
||||
rc = PMIx_Finalize(NULL, 0);
|
||||
return convert_err(rc);
|
||||
}
|
||||
@ -153,6 +183,10 @@ PMIX_EXPORT int PMI2_Abort(int flag, const char msg[])
|
||||
|
||||
PMI2_CHECK();
|
||||
|
||||
if (pmi2_singleton) {
|
||||
return PMI2_SUCCESS;
|
||||
}
|
||||
|
||||
rc = PMIx_Abort(flag, msg, NULL, 0);
|
||||
return convert_err(rc);
|
||||
}
|
||||
@ -179,6 +213,10 @@ PMIX_EXPORT int PMI2_Job_Spawn(int count, const char * cmds[],
|
||||
return PMI2_ERR_INVALID_ARGS;
|
||||
}
|
||||
|
||||
if (pmi2_singleton) {
|
||||
return PMI2_FAIL;
|
||||
}
|
||||
|
||||
/* setup the apps */
|
||||
PMIX_APP_CREATE(apps, count);
|
||||
for (i=0; i < count; i++) {
|
||||
@ -264,6 +302,11 @@ PMIX_EXPORT int PMI2_Info_GetSize(int *size)
|
||||
return PMI2_ERR_INVALID_ARGS;
|
||||
}
|
||||
|
||||
if (pmi2_singleton) {
|
||||
*size = 1;
|
||||
return PMI2_SUCCESS;
|
||||
}
|
||||
|
||||
/* set controlling parameters
|
||||
* PMIX_OPTIONAL - expect that these keys should be available on startup
|
||||
*/
|
||||
@ -291,6 +334,10 @@ PMIX_EXPORT int PMI2_Job_Connect(const char jobid[], PMI2_Connect_comm_t *conn)
|
||||
return PMI2_ERR_INVALID_ARGS;
|
||||
}
|
||||
|
||||
if (pmi2_singleton) {
|
||||
return PMI2_FAIL;
|
||||
}
|
||||
|
||||
memset(proc.nspace, 0, sizeof(proc.nspace));
|
||||
(void)strncpy(proc.nspace, (jobid ? jobid : proc.nspace), sizeof(proc.nspace)-1);
|
||||
proc.rank = PMIX_RANK_WILDCARD;
|
||||
@ -305,6 +352,10 @@ PMIX_EXPORT int PMI2_Job_Disconnect(const char jobid[])
|
||||
|
||||
PMI2_CHECK();
|
||||
|
||||
if (pmi2_singleton) {
|
||||
return PMI2_SUCCESS;
|
||||
}
|
||||
|
||||
memset(proc.nspace, 0, sizeof(proc.nspace));
|
||||
(void)strncpy(proc.nspace, (jobid ? jobid : proc.nspace), sizeof(proc.nspace)-1);
|
||||
proc.rank = PMIX_RANK_WILDCARD;
|
||||
@ -324,6 +375,10 @@ PMIX_EXPORT int PMI2_KVS_Put(const char key[], const char value[])
|
||||
return PMI2_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
if (pmi2_singleton) {
|
||||
return PMI2_SUCCESS;
|
||||
}
|
||||
|
||||
pmix_output_verbose(3, pmix_globals.debug_output,
|
||||
"PMI2_KVS_Put: key=%s value=%s", key, value);
|
||||
|
||||
@ -344,6 +399,10 @@ PMIX_EXPORT int PMI2_KVS_Fence(void)
|
||||
|
||||
pmix_output_verbose(3, pmix_globals.debug_output, "PMI2_KVS_Fence");
|
||||
|
||||
if (pmi2_singleton) {
|
||||
return PMI2_SUCCESS;
|
||||
}
|
||||
|
||||
if (PMIX_SUCCESS != (rc = PMIx_Commit())) {
|
||||
return convert_err(rc);
|
||||
}
|
||||
@ -435,6 +494,10 @@ PMIX_EXPORT int PMI2_Info_GetNodeAttr(const char name[],
|
||||
return PMI2_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
if (pmi2_singleton) {
|
||||
return PMI2_FAIL;
|
||||
}
|
||||
|
||||
/* set controlling parameters
|
||||
* PMIX_OPTIONAL - expect that these keys should be available on startup
|
||||
*/
|
||||
@ -479,6 +542,10 @@ PMIX_EXPORT int PMI2_Info_PutNodeAttr(const char name[], const char value[])
|
||||
return PMI2_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
if (pmi2_singleton) {
|
||||
return PMI2_SUCCESS;
|
||||
}
|
||||
|
||||
val.type = PMIX_STRING;
|
||||
val.data.string = (char*)value;
|
||||
rc = PMIx_Put(PMIX_LOCAL, name, &val);
|
||||
@ -500,6 +567,10 @@ PMIX_EXPORT int PMI2_Info_GetJobAttr(const char name[], char value[], int valuel
|
||||
return PMI2_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
if (pmi2_singleton) {
|
||||
return PMI2_FAIL;
|
||||
}
|
||||
|
||||
/* set controlling parameters
|
||||
* PMIX_OPTIONAL - expect that these keys should be available on startup
|
||||
*/
|
||||
@ -572,6 +643,10 @@ PMIX_EXPORT int PMI2_Nameserv_publish(const char service_name[],
|
||||
return PMI2_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
if (pmi2_singleton) {
|
||||
return PMI2_FAIL;
|
||||
}
|
||||
|
||||
/* pass the service/port */
|
||||
(void)strncpy(info[0].key, service_name, PMIX_MAX_KEYLEN);
|
||||
info[0].value.type = PMIX_STRING;
|
||||
@ -606,6 +681,10 @@ PMIX_EXPORT int PMI2_Nameserv_lookup(const char service_name[],
|
||||
return PMI2_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
if (pmi2_singleton) {
|
||||
return PMI2_FAIL;
|
||||
}
|
||||
|
||||
PMIX_PDATA_CONSTRUCT(&pdata[0]);
|
||||
PMIX_PDATA_CONSTRUCT(&pdata[1]);
|
||||
|
||||
@ -659,6 +738,10 @@ PMIX_EXPORT int PMI2_Nameserv_unpublish(const char service_name[],
|
||||
return PMI2_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
if (pmi2_singleton) {
|
||||
return PMI2_FAIL;
|
||||
}
|
||||
|
||||
/* pass the service */
|
||||
keys[0] = (char*)service_name;
|
||||
keys[1] = NULL;
|
||||
|
@ -172,7 +172,7 @@ static void pmix_client_notify_recv(struct pmix_peer_t *peer,
|
||||
goto error;
|
||||
}
|
||||
/* check for non-default flag */
|
||||
for (cnt=0; cnt < ninfo; cnt++) {
|
||||
for (cnt=0; cnt < (int)ninfo; cnt++) {
|
||||
if (0 == strncmp(chain->info[cnt].key, PMIX_EVENT_NON_DEFAULT, PMIX_MAX_KEYLEN)) {
|
||||
chain->nondefault = PMIX_INFO_TRUE(&chain->info[cnt]);
|
||||
break;
|
||||
@ -672,7 +672,10 @@ PMIX_EXPORT pmix_status_t PMIx_Finalize(const pmix_info_t info[], size_t ninfo)
|
||||
for (n=0; n < ninfo; n++) {
|
||||
if (0 == strcmp(PMIX_EMBED_BARRIER, info[n].key)) {
|
||||
if (PMIX_INFO_TRUE(&info[n])) {
|
||||
PMIx_Fence(NULL, 0, NULL, 0);
|
||||
rc = PMIx_Fence(NULL, 0, NULL, 0);
|
||||
if (PMIX_SUCCESS != rc) {
|
||||
PMIX_ERROR_LOG(rc);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -409,15 +409,12 @@ pmix_status_t pmix_bfrops_base_copy_darray(pmix_data_array_t **dest,
|
||||
}
|
||||
p->type = src->type;
|
||||
p->size = src->size;
|
||||
if (0 == p->size || NULL == src->array) {
|
||||
return PMIX_SUCCESS;
|
||||
}
|
||||
|
||||
/* process based on type of array element */
|
||||
switch (src->type) {
|
||||
p->type = src->type;
|
||||
p->size = src->size;
|
||||
if (0 == p->size || NULL == src->array) {
|
||||
p->array = NULL;
|
||||
p->size = 0;
|
||||
break;
|
||||
}
|
||||
case PMIX_UINT8:
|
||||
case PMIX_INT8:
|
||||
case PMIX_BYTE:
|
||||
|
@ -1060,15 +1060,12 @@ pmix_status_t pmix20_bfrop_copy_darray(pmix_data_array_t **dest,
|
||||
}
|
||||
p->type = src->type;
|
||||
p->size = src->size;
|
||||
if (0 == p->size || NULL == src->array) {
|
||||
return PMIX_SUCCESS;
|
||||
}
|
||||
|
||||
/* process based on type of array element */
|
||||
switch (src->type) {
|
||||
p->type = src->type;
|
||||
p->size = src->size;
|
||||
if (0 == p->size || NULL == src->array) {
|
||||
p->array = NULL;
|
||||
p->size = 0;
|
||||
break;
|
||||
}
|
||||
case PMIX_UINT8:
|
||||
case PMIX_INT8:
|
||||
case PMIX_BYTE:
|
||||
|
@ -162,7 +162,7 @@ static void pmix_tool_notify_recv(struct pmix_peer_t *peer,
|
||||
goto error;
|
||||
}
|
||||
/* check for non-default flag */
|
||||
for (cnt=0; cnt < ninfo; cnt++) {
|
||||
for (cnt=0; cnt < (int)ninfo; cnt++) {
|
||||
if (0 == strncmp(chain->info[cnt].key, PMIX_EVENT_NON_DEFAULT, PMIX_MAX_KEYLEN)) {
|
||||
chain->nondefault = PMIX_INFO_TRUE(&chain->info[cnt]);
|
||||
break;
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user