Now that PMIx has settled on its release strategy and numbering, update the OPAL pmix framework to track
Signed-off-by: Ralph Castain <rhc@open-mpi.org>
Этот коммит содержится в:
родитель
0366f3aedc
Коммит
1a0bccb536
18
.gitignore
поставляемый
18
.gitignore
поставляемый
@ -309,15 +309,15 @@ opal/mca/pmix/pmix*/pmix/src/include/private/autogen/config.h.in
|
||||
opal/mca/pmix/pmix*/pmix/src/include/private/autogen/config.h
|
||||
opal/mca/hwloc/base/static-components.h.new.extern
|
||||
opal/mca/hwloc/base/static-components.h.new.struct
|
||||
opal/mca/pmix/pmix3x/pmix/src/include/frameworks.h
|
||||
opal/mca/pmix/pmix3x/pmix/src/mca/pinstalldirs/config/pinstall_dirs.h
|
||||
opal/mca/pmix/pmix3x/pmix/config/autogen_found_items.m4
|
||||
opal/mca/pmix/pmix3x/pmix/src/include/pmix_config.h
|
||||
opal/mca/pmix/pmix3x/pmix/src/include/pmix_config.h.in
|
||||
opal/mca/pmix/pmix3x/pmix/include/pmix_rename.h
|
||||
opal/mca/pmix/pmix3x/pmix/include/pmix_version.h
|
||||
opal/mca/pmix/pmix3x/pmix/src/util/keyval/keyval_lex.c
|
||||
opal/mca/pmix/pmix3x/pmix/src/util/show_help_lex.c
|
||||
opal/mca/pmix/pmix2x/pmix/src/include/frameworks.h
|
||||
opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/config/pinstall_dirs.h
|
||||
opal/mca/pmix/pmix2x/pmix/config/autogen_found_items.m4
|
||||
opal/mca/pmix/pmix2x/pmix/src/include/pmix_config.h
|
||||
opal/mca/pmix/pmix2x/pmix/src/include/pmix_config.h.in
|
||||
opal/mca/pmix/pmix2x/pmix/include/pmix_rename.h
|
||||
opal/mca/pmix/pmix2x/pmix/include/pmix_version.h
|
||||
opal/mca/pmix/pmix2x/pmix/src/util/keyval/keyval_lex.c
|
||||
opal/mca/pmix/pmix2x/pmix/src/util/show_help_lex.c
|
||||
|
||||
opal/tools/opal-checkpoint/opal-checkpoint
|
||||
opal/tools/opal-checkpoint/opal-checkpoint.1
|
||||
|
@ -281,7 +281,7 @@ AC_DEFUN([OPAL_CHECK_PMIX],[
|
||||
#endif
|
||||
], [])],
|
||||
[AC_MSG_RESULT([found])
|
||||
opal_external_pmix_version=3X
|
||||
opal_external_pmix_version=3x
|
||||
opal_external_pmix_version_found=1],
|
||||
[AC_MSG_RESULT([not found])])])
|
||||
|
||||
@ -294,7 +294,7 @@ AC_DEFUN([OPAL_CHECK_PMIX],[
|
||||
#endif
|
||||
], [])],
|
||||
[AC_MSG_RESULT([found])
|
||||
opal_external_pmix_version=2X
|
||||
opal_external_pmix_version=2x
|
||||
opal_external_pmix_version_found=1],
|
||||
[AC_MSG_RESULT([not found])])])
|
||||
|
||||
@ -307,7 +307,7 @@ AC_DEFUN([OPAL_CHECK_PMIX],[
|
||||
#endif
|
||||
], [])],
|
||||
[AC_MSG_RESULT([found])
|
||||
opal_external_pmix_version=1X
|
||||
opal_external_pmix_version=1x
|
||||
opal_external_pmix_version_found=1],
|
||||
[AC_MSG_RESULT([not found])])])
|
||||
|
||||
|
@ -45,7 +45,7 @@ AC_DEFUN([MCA_opal_pmix_ext11_CONFIG],[
|
||||
# check for the 1.1.4 version
|
||||
AC_MSG_CHECKING([if external component is version 1.1.4])
|
||||
AS_IF([test "$opal_external_pmix_version" = "11" ||
|
||||
test "$opal_external_pmix_version" = "1X"],
|
||||
test "$opal_external_pmix_version" = "1x"],
|
||||
[AC_MSG_RESULT([yes])
|
||||
opal_pmix_external_11_happy=yes],
|
||||
[AC_MSG_RESULT([no])
|
||||
|
@ -1,8 +1,8 @@
|
||||
#
|
||||
# Copyright (c) 2x14-2x16 Intel, Inc. All rights reserved.
|
||||
# Copyright (c) 2x15 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2x14-2x15 Mellanox Technologies, Inc.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
|
||||
# Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2015 Research Organization for Information Science
|
||||
# and Technology (RIST). All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
@ -11,12 +11,12 @@
|
||||
#
|
||||
|
||||
sources = \
|
||||
pmix_ext2x.h \
|
||||
pmix_ext2x_component.c \
|
||||
pmix_ext2x.c \
|
||||
pmix_ext2x_client.c \
|
||||
pmix_ext2x_server_south.c \
|
||||
pmix_ext2x_server_north.c
|
||||
pmix2x.h \
|
||||
pmix2x_component.c \
|
||||
pmix2x.c \
|
||||
pmix2x_client.c \
|
||||
pmix2x_server_south.c \
|
||||
pmix2x_server_north.c
|
||||
|
||||
# Make the output library in this directory, and name it either
|
||||
# mca_<type>_<name>.la (for DSO builds) or libmca_<type>_<name>.la
|
||||
@ -33,14 +33,14 @@ endif
|
||||
mcacomponentdir = $(opallibdir)
|
||||
mcacomponent_LTLIBRARIES = $(component_install)
|
||||
mca_pmix_ext2x_la_SOURCES = $(sources)
|
||||
mca_pmix_ext2x_la_CFLAGS =
|
||||
mca_pmix_ext2x_la_CPPFLAGS = $(opal_pmix_ext2x_CPPFLAGS)
|
||||
mca_pmix_ext2x_la_CFLAGS = $(opal_pmix_ext2x_CFLAGS)
|
||||
mca_pmix_ext2x_la_CPPFLAGS =$(opal_pmix_ext2x_CPPFLAGS)
|
||||
mca_pmix_ext2x_la_LDFLAGS = -module -avoid-version $(opal_pmix_ext2x_LDFLAGS)
|
||||
mca_pmix_ext2x_la_LIBADD = $(opal_pmix_ext2x_LIBS)
|
||||
|
||||
noinst_LTLIBRARIES = $(component_noinst)
|
||||
libmca_pmix_ext2x_la_SOURCES =$(sources)
|
||||
libmca_pmix_ext2x_la_CFLAGS =
|
||||
libmca_pmix_ext2x_la_CFLAGS = $(opal_pmix_ext2x_CFLAGS)
|
||||
libmca_pmix_ext2x_la_CPPFLAGS = $(opal_pmix_ext2x_CPPFLAGS)
|
||||
libmca_pmix_ext2x_la_LDFLAGS = -module -avoid-version $(opal_pmix_ext2x_LDFLAGS)
|
||||
libmca_pmix_ext2x_la_LIBADD = $(opal_pmix_ext2x_LIBS)
|
||||
|
@ -1,23 +1,21 @@
|
||||
# -*- shell-script -*-
|
||||
#
|
||||
# Copyright (c) 2x04-2x05 The Trustees of Indiana University and Indiana
|
||||
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
# University Research and Technology
|
||||
# Corporation. All rights reserved.
|
||||
# Copyright (c) 2x04-2x05 The University of Tennessee and The University
|
||||
# Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
# of Tennessee Research Foundation. All rights
|
||||
# reserved.
|
||||
# Copyright (c) 2x04-2x05 High Performance Computing Center Stuttgart,
|
||||
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
# University of Stuttgart. All rights reserved.
|
||||
# Copyright (c) 2x04-2x05 The Regents of the University of California.
|
||||
# Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2x11-2x13 Los Alamos National Security, LLC.
|
||||
# Copyright (c) 2011-2013 Los Alamos National Security, LLC.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2x10-2x15 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2x13-2x16 Intel, Inc. All rights reserved.
|
||||
# Copyright (c) 2x15 Research Organization for Information Science
|
||||
# Copyright (c) 2010-2016 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2013-2016 Intel, Inc. All rights reserved.
|
||||
# Copyright (c) 2015-2016 Research Organization for Information Science
|
||||
# and Technology (RIST). All rights reserved.
|
||||
# Copyright (c) 2x14-2x15 Mellanox Technologies, Inc.
|
||||
# All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
@ -30,36 +28,33 @@
|
||||
AC_DEFUN([MCA_opal_pmix_ext2x_CONFIG],[
|
||||
AC_CONFIG_FILES([opal/mca/pmix/ext2x/Makefile])
|
||||
|
||||
# check to see
|
||||
# if we are linking to an external v2.x library. If not, then
|
||||
# do not use this component.
|
||||
AC_MSG_CHECKING([if external v2.x component is to be used])
|
||||
AS_IF([test "$opal_external_pmix_happy" = "yes"],
|
||||
[AS_IF([test "$opal_event_external_support" != "yes"],
|
||||
[AC_MSG_WARN([EXTERNAL PMIX SUPPORT REQUIRES USE OF EXTERNAL LIBEVENT])
|
||||
AC_MSG_WARN([LIBRARY. THIS LIBRARY MUST POINT TO THE SAME ONE USED])
|
||||
AC_MSG_WARN([TO BUILD PMIX OR ELSE UNPREDICTABLE BEHAVIOR MAY RESULT])
|
||||
AC_MSG_ERROR([PLEASE CORRECT THE CONFIGURE COMMAND LINE AND REBUILD])])
|
||||
AS_IF([test "$opal_hwloc_external_support" != "yes"],
|
||||
[AC_MSG_WARN([EXTERNAL PMIX SUPPORT REQUIRES USE OF EXTERNAL HWLOC])
|
||||
AC_MSG_WARN([LIBRARY THIS LIBRARY MUST POINT TO THE SAME ONE USED ])
|
||||
AC_MSG_WARN([TO BUILD PMIX OR ELSE UNPREDICTABLE BEHAVIOR MAY RESULT])
|
||||
AC_MSG_ERROR([PLEASE CORRECT THE CONFIGURE COMMAND LINE AND REBUILD])])
|
||||
external_WRAPPER_EXTRA_CPPFLAGS='-I${includedir}/openmpi/$opal_pmix_external_basedir/pmix -I${includedir}/openmpi/$opal_pmix_external_basedir/pmix/include'
|
||||
[AS_IF([test "$opal_external_pmix_version" = "2x"],
|
||||
[AC_MSG_RESULT([yes - using an external v2.x library])
|
||||
opal_pmix_ext2x_happy=1
|
||||
# Build flags for our Makefile.am
|
||||
opal_pmix_ext2x_CPPFLAGS=$opal_external_pmix_CPPFLAGS
|
||||
opal_pmix_ext2x_LDFLAGS=$opal_external_pmix_LDFLAGS
|
||||
opal_pmix_ext2x_LIBS=$opal_external_pmix_LIBS
|
||||
# setup wrapper flags
|
||||
pmix_ext2x_WRAPPER_EXTRA_LDFLAGS=$opal_external_pmix_LDFLAGS
|
||||
pmix_ext2x_WRAPPER_EXTRA_LIBS=$opal_external_pmix_LIBS],
|
||||
[AC_MSG_RESULT([no - disqualifying this component])
|
||||
opal_pmix_ext2x_happy=0])],
|
||||
[AC_MSG_RESULT([no - disqualifying this component])
|
||||
opal_pmix_ext2x_happy=0])
|
||||
|
||||
AC_MSG_CHECKING([if external component is version 2.x])
|
||||
AS_IF([test "$opal_external_pmix_version" = "2X"],
|
||||
[AC_MSG_RESULT([yes])
|
||||
opal_pmix_ext2x_happy=yes],
|
||||
[AC_MSG_RESULT([no])
|
||||
opal_pmix_ext2x_happy=no])
|
||||
AC_SUBST([opal_pmix_ext2x_LIBS])
|
||||
AC_SUBST([opal_pmix_ext2x_CPPFLAGS])
|
||||
AC_SUBST([opal_pmix_ext2x_LDFLAGS])
|
||||
AC_SUBST([opal_pmix_ext2x_DEPENDENCIES])
|
||||
|
||||
opal_pmix_ext2x_CPPFLAGS=$opal_external_pmix_CPPFLAGS
|
||||
opal_pmix_ext2x_LDFLAGS=$opal_external_pmix_LDFLAGS
|
||||
opal_pmix_ext2x_LIBS=$opal_external_pmix_LIBS
|
||||
|
||||
AC_SUBST(opal_pmix_ext2x_CPPFLAGS)
|
||||
AC_SUBST(opal_pmix_ext2x_LDFLAGS)
|
||||
AC_SUBST(opal_pmix_ext2x_LIBS)
|
||||
|
||||
AS_IF([test "$opal_pmix_ext2x_happy" = "yes"],
|
||||
[$1],
|
||||
[$2])],
|
||||
AS_IF([test $opal_pmix_ext2x_happy -eq 1],
|
||||
[$1],
|
||||
[$2])
|
||||
|
||||
])dnl
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include "opal/util/proc.h"
|
||||
#include "opal/util/show_help.h"
|
||||
|
||||
#include "pmix3x.h"
|
||||
#include "pmix2x.h"
|
||||
#include "opal/mca/pmix/base/base.h"
|
||||
#include "opal/mca/pmix/pmix_types.h"
|
||||
|
||||
@ -47,8 +47,8 @@
|
||||
/* These are functions used by both client and server to
|
||||
* access common functions in the embedded PMIx library */
|
||||
|
||||
static const char *pmix3x_get_nspace(opal_jobid_t jobid);
|
||||
static void pmix3x_register_jobid(opal_jobid_t jobid, const char *nspace);
|
||||
static const char *pmix2x_get_nspace(opal_jobid_t jobid);
|
||||
static void pmix2x_register_jobid(opal_jobid_t jobid, const char *nspace);
|
||||
static void register_handler(opal_list_t *event_codes,
|
||||
opal_list_t *info,
|
||||
opal_pmix_notification_fn_t evhandler,
|
||||
@ -62,66 +62,66 @@ static int notify_event(int status,
|
||||
opal_pmix_data_range_t range,
|
||||
opal_list_t *info,
|
||||
opal_pmix_op_cbfunc_t cbfunc, void *cbdata);
|
||||
static void pmix3x_query(opal_list_t *queries,
|
||||
static void pmix2x_query(opal_list_t *queries,
|
||||
opal_pmix_info_cbfunc_t cbfunc, void *cbdata);
|
||||
static void pmix3x_log(opal_list_t *info,
|
||||
static void pmix2x_log(opal_list_t *info,
|
||||
opal_pmix_op_cbfunc_t cbfunc, void *cbdata);
|
||||
|
||||
const opal_pmix_base_module_t opal_pmix_ext3x_module = {
|
||||
const opal_pmix_base_module_t opal_pmix_ext2x_module = {
|
||||
/* client APIs */
|
||||
.init = pmix3x_client_init,
|
||||
.finalize = pmix3x_client_finalize,
|
||||
.initialized = pmix3x_initialized,
|
||||
.abort = pmix3x_abort,
|
||||
.commit = pmix3x_commit,
|
||||
.fence = pmix3x_fence,
|
||||
.fence_nb = pmix3x_fencenb,
|
||||
.put = pmix3x_put,
|
||||
.get = pmix3x_get,
|
||||
.get_nb = pmix3x_getnb,
|
||||
.publish = pmix3x_publish,
|
||||
.publish_nb = pmix3x_publishnb,
|
||||
.lookup = pmix3x_lookup,
|
||||
.lookup_nb = pmix3x_lookupnb,
|
||||
.unpublish = pmix3x_unpublish,
|
||||
.unpublish_nb = pmix3x_unpublishnb,
|
||||
.spawn = pmix3x_spawn,
|
||||
.spawn_nb = pmix3x_spawnnb,
|
||||
.connect = pmix3x_connect,
|
||||
.connect_nb = pmix3x_connectnb,
|
||||
.disconnect = pmix3x_disconnect,
|
||||
.disconnect_nb = pmix3x_disconnectnb,
|
||||
.resolve_peers = pmix3x_resolve_peers,
|
||||
.resolve_nodes = pmix3x_resolve_nodes,
|
||||
.query = pmix3x_query,
|
||||
.log = pmix3x_log,
|
||||
.init = pmix2x_client_init,
|
||||
.finalize = pmix2x_client_finalize,
|
||||
.initialized = pmix2x_initialized,
|
||||
.abort = pmix2x_abort,
|
||||
.commit = pmix2x_commit,
|
||||
.fence = pmix2x_fence,
|
||||
.fence_nb = pmix2x_fencenb,
|
||||
.put = pmix2x_put,
|
||||
.get = pmix2x_get,
|
||||
.get_nb = pmix2x_getnb,
|
||||
.publish = pmix2x_publish,
|
||||
.publish_nb = pmix2x_publishnb,
|
||||
.lookup = pmix2x_lookup,
|
||||
.lookup_nb = pmix2x_lookupnb,
|
||||
.unpublish = pmix2x_unpublish,
|
||||
.unpublish_nb = pmix2x_unpublishnb,
|
||||
.spawn = pmix2x_spawn,
|
||||
.spawn_nb = pmix2x_spawnnb,
|
||||
.connect = pmix2x_connect,
|
||||
.connect_nb = pmix2x_connectnb,
|
||||
.disconnect = pmix2x_disconnect,
|
||||
.disconnect_nb = pmix2x_disconnectnb,
|
||||
.resolve_peers = pmix2x_resolve_peers,
|
||||
.resolve_nodes = pmix2x_resolve_nodes,
|
||||
.query = pmix2x_query,
|
||||
.log = pmix2x_log,
|
||||
/* server APIs */
|
||||
.server_init = pmix3x_server_init,
|
||||
.server_finalize = pmix3x_server_finalize,
|
||||
.generate_regex = pmix3x_server_gen_regex,
|
||||
.generate_ppn = pmix3x_server_gen_ppn,
|
||||
.server_register_nspace = pmix3x_server_register_nspace,
|
||||
.server_deregister_nspace = pmix3x_server_deregister_nspace,
|
||||
.server_register_client = pmix3x_server_register_client,
|
||||
.server_deregister_client = pmix3x_server_deregister_client,
|
||||
.server_setup_fork = pmix3x_server_setup_fork,
|
||||
.server_dmodex_request = pmix3x_server_dmodex,
|
||||
.server_notify_event = pmix3x_server_notify_event,
|
||||
.server_init = pmix2x_server_init,
|
||||
.server_finalize = pmix2x_server_finalize,
|
||||
.generate_regex = pmix2x_server_gen_regex,
|
||||
.generate_ppn = pmix2x_server_gen_ppn,
|
||||
.server_register_nspace = pmix2x_server_register_nspace,
|
||||
.server_deregister_nspace = pmix2x_server_deregister_nspace,
|
||||
.server_register_client = pmix2x_server_register_client,
|
||||
.server_deregister_client = pmix2x_server_deregister_client,
|
||||
.server_setup_fork = pmix2x_server_setup_fork,
|
||||
.server_dmodex_request = pmix2x_server_dmodex,
|
||||
.server_notify_event = pmix2x_server_notify_event,
|
||||
/* utility APIs */
|
||||
.get_version = PMIx_Get_version,
|
||||
.register_evhandler = register_handler,
|
||||
.deregister_evhandler = deregister_handler,
|
||||
.notify_event = notify_event,
|
||||
.store_local = pmix3x_store_local,
|
||||
.get_nspace = pmix3x_get_nspace,
|
||||
.register_jobid = pmix3x_register_jobid
|
||||
.store_local = pmix2x_store_local,
|
||||
.get_nspace = pmix2x_get_nspace,
|
||||
.register_jobid = pmix2x_register_jobid
|
||||
};
|
||||
|
||||
static const char *pmix3x_get_nspace(opal_jobid_t jobid)
|
||||
static const char *pmix2x_get_nspace(opal_jobid_t jobid)
|
||||
{
|
||||
opal_pmix3x_jobid_trkr_t *jptr;
|
||||
opal_pmix2x_jobid_trkr_t *jptr;
|
||||
|
||||
OPAL_LIST_FOREACH(jptr, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
|
||||
OPAL_LIST_FOREACH(jptr, &mca_pmix_ext2x_component.jobids, opal_pmix2x_jobid_trkr_t) {
|
||||
if (jptr->jobid == jobid) {
|
||||
return jptr->nspace;
|
||||
}
|
||||
@ -129,25 +129,25 @@ static const char *pmix3x_get_nspace(opal_jobid_t jobid)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void pmix3x_register_jobid(opal_jobid_t jobid, const char *nspace)
|
||||
static void pmix2x_register_jobid(opal_jobid_t jobid, const char *nspace)
|
||||
{
|
||||
opal_pmix3x_jobid_trkr_t *jptr;
|
||||
opal_pmix2x_jobid_trkr_t *jptr;
|
||||
|
||||
/* if we don't already have it, add this to our jobid tracker */
|
||||
OPAL_LIST_FOREACH(jptr, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
|
||||
OPAL_LIST_FOREACH(jptr, &mca_pmix_ext2x_component.jobids, opal_pmix2x_jobid_trkr_t) {
|
||||
if (jptr->jobid == jobid) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
jptr = OBJ_NEW(opal_pmix3x_jobid_trkr_t);
|
||||
jptr = OBJ_NEW(opal_pmix2x_jobid_trkr_t);
|
||||
(void)strncpy(jptr->nspace, nspace, PMIX_MAX_NSLEN);
|
||||
jptr->jobid = jobid;
|
||||
opal_list_append(&mca_pmix_ext3x_component.jobids, &jptr->super);
|
||||
opal_list_append(&mca_pmix_ext2x_component.jobids, &jptr->super);
|
||||
}
|
||||
|
||||
static void completion_handler(int status, void *cbdata)
|
||||
{
|
||||
opal_pmix3x_event_chain_t *chain = (opal_pmix3x_event_chain_t*)cbdata;
|
||||
opal_pmix2x_event_chain_t *chain = (opal_pmix2x_event_chain_t*)cbdata;
|
||||
if (NULL != chain->info) {
|
||||
OPAL_LIST_RELEASE(chain->info);
|
||||
}
|
||||
@ -158,12 +158,12 @@ static void progress_local_event_hdlr(int status,
|
||||
opal_pmix_op_cbfunc_t cbfunc, void *thiscbdata,
|
||||
void *notification_cbdata)
|
||||
{
|
||||
opal_pmix3x_event_chain_t *chain = (opal_pmix3x_event_chain_t*)notification_cbdata;
|
||||
opal_pmix2x_event_chain_t *chain = (opal_pmix2x_event_chain_t*)notification_cbdata;
|
||||
size_t n;
|
||||
opal_list_item_t *nxt;
|
||||
opal_pmix3x_single_event_t *sing;
|
||||
opal_pmix3x_multi_event_t *multi;
|
||||
opal_pmix3x_default_event_t *def;
|
||||
opal_pmix2x_single_event_t *sing;
|
||||
opal_pmix2x_multi_event_t *multi;
|
||||
opal_pmix2x_default_event_t *def;
|
||||
|
||||
/* if the caller indicates that the chain is completed, then stop here */
|
||||
if (OPAL_ERR_HANDLERS_COMPLETE == status) {
|
||||
@ -181,8 +181,8 @@ static void progress_local_event_hdlr(int status,
|
||||
if (NULL != chain->sing) {
|
||||
/* the last handler was for a single code - see if there are
|
||||
* any others that match this event */
|
||||
while (opal_list_get_end(&mca_pmix_ext3x_component.single_events) != (nxt = opal_list_get_next(&chain->sing->super))) {
|
||||
sing = (opal_pmix3x_single_event_t*)nxt;
|
||||
while (opal_list_get_end(&mca_pmix_ext2x_component.single_events) != (nxt = opal_list_get_next(&chain->sing->super))) {
|
||||
sing = (opal_pmix2x_single_event_t*)nxt;
|
||||
if (sing->code == chain->status) {
|
||||
OBJ_RETAIN(chain);
|
||||
chain->sing = sing;
|
||||
@ -199,15 +199,15 @@ static void progress_local_event_hdlr(int status,
|
||||
* events that match */
|
||||
chain->sing = NULL;
|
||||
/* pickup the beginning of the multi-code event list */
|
||||
if (0 < opal_list_get_size(&mca_pmix_ext3x_component.multi_events)) {
|
||||
chain->multi = (opal_pmix3x_multi_event_t*)opal_list_get_begin(&mca_pmix_ext3x_component.multi_events);
|
||||
if (0 < opal_list_get_size(&mca_pmix_ext2x_component.multi_events)) {
|
||||
chain->multi = (opal_pmix2x_multi_event_t*)opal_list_get_begin(&mca_pmix_ext2x_component.multi_events);
|
||||
}
|
||||
}
|
||||
|
||||
/* see if we need to continue with the multi code events */
|
||||
if (NULL != chain->multi) {
|
||||
while (opal_list_get_end(&mca_pmix_ext3x_component.multi_events) != (nxt = opal_list_get_next(&chain->multi->super))) {
|
||||
multi = (opal_pmix3x_multi_event_t*)nxt;
|
||||
while (opal_list_get_end(&mca_pmix_ext2x_component.multi_events) != (nxt = opal_list_get_next(&chain->multi->super))) {
|
||||
multi = (opal_pmix2x_multi_event_t*)nxt;
|
||||
for (n=0; n < multi->ncodes; n++) {
|
||||
if (multi->codes[n] == chain->status) {
|
||||
/* found it - invoke the handler, pointing its
|
||||
@ -228,8 +228,8 @@ static void progress_local_event_hdlr(int status,
|
||||
* events that match */
|
||||
chain->multi = NULL;
|
||||
/* pickup the beginning of the default event list */
|
||||
if (0 < opal_list_get_size(&mca_pmix_ext3x_component.default_events)) {
|
||||
chain->def = (opal_pmix3x_default_event_t*)opal_list_get_begin(&mca_pmix_ext3x_component.default_events);
|
||||
if (0 < opal_list_get_size(&mca_pmix_ext2x_component.default_events)) {
|
||||
chain->def = (opal_pmix2x_default_event_t*)opal_list_get_begin(&mca_pmix_ext2x_component.default_events);
|
||||
}
|
||||
}
|
||||
|
||||
@ -239,8 +239,8 @@ static void progress_local_event_hdlr(int status,
|
||||
}
|
||||
|
||||
if (NULL != chain->def) {
|
||||
if (opal_list_get_end(&mca_pmix_ext3x_component.default_events) != (nxt = opal_list_get_next(&chain->def->super))) {
|
||||
def = (opal_pmix3x_default_event_t*)nxt;
|
||||
if (opal_list_get_end(&mca_pmix_ext2x_component.default_events) != (nxt = opal_list_get_next(&chain->def->super))) {
|
||||
def = (opal_pmix2x_default_event_t*)nxt;
|
||||
OBJ_RETAIN(chain);
|
||||
chain->def = def;
|
||||
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
|
||||
@ -267,18 +267,18 @@ static void progress_local_event_hdlr(int status,
|
||||
|
||||
static void _event_hdlr(int sd, short args, void *cbdata)
|
||||
{
|
||||
pmix3x_threadshift_t *cd = (pmix3x_threadshift_t*)cbdata;
|
||||
pmix2x_threadshift_t *cd = (pmix2x_threadshift_t*)cbdata;
|
||||
size_t n;
|
||||
opal_pmix3x_event_chain_t *chain;
|
||||
opal_pmix3x_single_event_t *sing;
|
||||
opal_pmix3x_multi_event_t *multi;
|
||||
opal_pmix3x_default_event_t *def;
|
||||
opal_pmix2x_event_chain_t *chain;
|
||||
opal_pmix2x_single_event_t *sing;
|
||||
opal_pmix2x_multi_event_t *multi;
|
||||
opal_pmix2x_default_event_t *def;
|
||||
|
||||
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
|
||||
"%s _EVENT_HDLR RECEIVED NOTIFICATION OF STATUS %d",
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), cd->status);
|
||||
|
||||
chain = OBJ_NEW(opal_pmix3x_event_chain_t);
|
||||
chain = OBJ_NEW(opal_pmix2x_event_chain_t);
|
||||
/* point it at our final callback */
|
||||
chain->final_cbfunc = completion_handler;
|
||||
chain->final_cbdata = chain;
|
||||
@ -290,7 +290,7 @@ static void _event_hdlr(int sd, short args, void *cbdata)
|
||||
chain->nondefault = cd->nondefault;
|
||||
|
||||
/* cycle thru the single-event registrations first */
|
||||
OPAL_LIST_FOREACH(sing, &mca_pmix_ext3x_component.single_events, opal_pmix3x_single_event_t) {
|
||||
OPAL_LIST_FOREACH(sing, &mca_pmix_ext2x_component.single_events, opal_pmix2x_single_event_t) {
|
||||
if (sing->code == chain->status) {
|
||||
/* found it - invoke the handler, pointing its
|
||||
* callback function to our progression function */
|
||||
@ -308,7 +308,7 @@ static void _event_hdlr(int sd, short args, void *cbdata)
|
||||
|
||||
/* if we didn't find any match in the single-event registrations,
|
||||
* then cycle thru the multi-event registrations next */
|
||||
OPAL_LIST_FOREACH(multi, &mca_pmix_ext3x_component.multi_events, opal_pmix3x_multi_event_t) {
|
||||
OPAL_LIST_FOREACH(multi, &mca_pmix_ext2x_component.multi_events, opal_pmix2x_multi_event_t) {
|
||||
for (n=0; n < multi->ncodes; n++) {
|
||||
if (multi->codes[n] == chain->status) {
|
||||
/* found it - invoke the handler, pointing its
|
||||
@ -330,7 +330,7 @@ static void _event_hdlr(int sd, short args, void *cbdata)
|
||||
if (chain->nondefault) {
|
||||
/* if we get here, then we need to cache this event in case they
|
||||
* register for it later - we cannot lose individual events */
|
||||
opal_list_append(&mca_pmix_ext3x_component.cache, &chain->super);
|
||||
opal_list_append(&mca_pmix_ext2x_component.cache, &chain->super);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -338,8 +338,8 @@ static void _event_hdlr(int sd, short args, void *cbdata)
|
||||
OBJ_RELEASE(cd);
|
||||
|
||||
/* finally, pass it to any default handlers */
|
||||
if (0 < opal_list_get_size(&mca_pmix_ext3x_component.default_events)) {
|
||||
def = (opal_pmix3x_default_event_t*)opal_list_get_first(&mca_pmix_ext3x_component.default_events);
|
||||
if (0 < opal_list_get_size(&mca_pmix_ext2x_component.default_events)) {
|
||||
def = (opal_pmix2x_default_event_t*)opal_list_get_first(&mca_pmix_ext2x_component.default_events);
|
||||
OBJ_RETAIN(chain);
|
||||
chain->def = def;
|
||||
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
|
||||
@ -364,14 +364,14 @@ static void _event_hdlr(int sd, short args, void *cbdata)
|
||||
* by mpirun), directly from a RM (when direct launched), or
|
||||
* from another process (via the local daemon).
|
||||
* The call will occur in the PMIx event base */
|
||||
void pmix3x_event_hdlr(size_t evhdlr_registration_id,
|
||||
void pmix2x_event_hdlr(size_t evhdlr_registration_id,
|
||||
pmix_status_t status, const pmix_proc_t *source,
|
||||
pmix_info_t info[], size_t ninfo,
|
||||
pmix_info_t results[], size_t nresults,
|
||||
pmix_event_notification_cbfunc_fn_t cbfunc,
|
||||
void *cbdata)
|
||||
{
|
||||
pmix3x_threadshift_t *cd;
|
||||
pmix2x_threadshift_t *cd;
|
||||
int rc;
|
||||
opal_value_t *iptr;
|
||||
size_t n;
|
||||
@ -384,10 +384,10 @@ void pmix3x_event_hdlr(size_t evhdlr_registration_id,
|
||||
"%s RECEIVED NOTIFICATION OF STATUS %d",
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), status);
|
||||
|
||||
cd = OBJ_NEW(pmix3x_threadshift_t);
|
||||
cd = OBJ_NEW(pmix2x_threadshift_t);
|
||||
|
||||
/* convert the incoming status */
|
||||
cd->status = pmix3x_convert_rc(status);
|
||||
cd->status = pmix2x_convert_rc(status);
|
||||
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
|
||||
"%s CONVERTED STATUS %d TO STATUS %d",
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), status, cd->status);
|
||||
@ -402,7 +402,7 @@ void pmix3x_event_hdlr(size_t evhdlr_registration_id,
|
||||
OBJ_RELEASE(cd);
|
||||
return;
|
||||
}
|
||||
cd->pname.vpid = pmix3x_convert_rank(source->rank);
|
||||
cd->pname.vpid = pmix2x_convert_rank(source->rank);
|
||||
}
|
||||
|
||||
/* convert the array of info */
|
||||
@ -414,7 +414,7 @@ void pmix3x_event_hdlr(size_t evhdlr_registration_id,
|
||||
}
|
||||
iptr = OBJ_NEW(opal_value_t);
|
||||
iptr->key = strdup(info[n].key);
|
||||
if (OPAL_SUCCESS != (rc = pmix3x_value_unload(iptr, &info[n].value))) {
|
||||
if (OPAL_SUCCESS != (rc = pmix2x_value_unload(iptr, &info[n].value))) {
|
||||
OPAL_ERROR_LOG(rc);
|
||||
OBJ_RELEASE(iptr);
|
||||
continue;
|
||||
@ -435,7 +435,7 @@ void pmix3x_event_hdlr(size_t evhdlr_registration_id,
|
||||
}
|
||||
}
|
||||
|
||||
opal_vpid_t pmix3x_convert_rank(int rank)
|
||||
opal_vpid_t pmix2x_convert_rank(int rank)
|
||||
{
|
||||
switch(rank) {
|
||||
case PMIX_RANK_UNDEF:
|
||||
@ -447,7 +447,7 @@ opal_vpid_t pmix3x_convert_rank(int rank)
|
||||
}
|
||||
}
|
||||
|
||||
pmix_rank_t pmix3x_convert_opalrank(opal_vpid_t vpid)
|
||||
pmix_rank_t pmix2x_convert_opalrank(opal_vpid_t vpid)
|
||||
{
|
||||
switch(vpid) {
|
||||
case OPAL_VPID_WILDCARD:
|
||||
@ -459,7 +459,7 @@ pmix_rank_t pmix3x_convert_opalrank(opal_vpid_t vpid)
|
||||
}
|
||||
}
|
||||
|
||||
pmix_status_t pmix3x_convert_opalrc(int rc)
|
||||
pmix_status_t pmix2x_convert_opalrc(int rc)
|
||||
{
|
||||
switch (rc) {
|
||||
case OPAL_ERR_DEBUGGER_RELEASE:
|
||||
@ -540,7 +540,7 @@ pmix_status_t pmix3x_convert_opalrc(int rc)
|
||||
}
|
||||
}
|
||||
|
||||
int pmix3x_convert_rc(pmix_status_t rc)
|
||||
int pmix2x_convert_rc(pmix_status_t rc)
|
||||
{
|
||||
switch (rc) {
|
||||
case PMIX_ERR_DEBUGGER_RELEASE:
|
||||
@ -624,7 +624,7 @@ int pmix3x_convert_rc(pmix_status_t rc)
|
||||
}
|
||||
}
|
||||
|
||||
opal_pmix_scope_t pmix3x_convert_scope(pmix_scope_t scope)
|
||||
opal_pmix_scope_t pmix2x_convert_scope(pmix_scope_t scope)
|
||||
{
|
||||
switch(scope) {
|
||||
case PMIX_SCOPE_UNDEF:
|
||||
@ -640,7 +640,7 @@ opal_pmix_scope_t pmix3x_convert_scope(pmix_scope_t scope)
|
||||
}
|
||||
}
|
||||
|
||||
pmix_scope_t pmix3x_convert_opalscope(opal_pmix_scope_t scope) {
|
||||
pmix_scope_t pmix2x_convert_opalscope(opal_pmix_scope_t scope) {
|
||||
switch(scope) {
|
||||
case OPAL_PMIX_LOCAL:
|
||||
return PMIX_LOCAL;
|
||||
@ -653,7 +653,7 @@ pmix_scope_t pmix3x_convert_opalscope(opal_pmix_scope_t scope) {
|
||||
}
|
||||
}
|
||||
|
||||
pmix_data_range_t pmix3x_convert_opalrange(opal_pmix_data_range_t range) {
|
||||
pmix_data_range_t pmix2x_convert_opalrange(opal_pmix_data_range_t range) {
|
||||
switch(range) {
|
||||
case OPAL_PMIX_RANGE_UNDEF:
|
||||
return PMIX_RANGE_UNDEF;
|
||||
@ -672,7 +672,7 @@ pmix_data_range_t pmix3x_convert_opalrange(opal_pmix_data_range_t range) {
|
||||
}
|
||||
}
|
||||
|
||||
opal_pmix_data_range_t pmix3x_convert_range(pmix_data_range_t range) {
|
||||
opal_pmix_data_range_t pmix2x_convert_range(pmix_data_range_t range) {
|
||||
switch(range) {
|
||||
case PMIX_RANGE_UNDEF:
|
||||
return OPAL_PMIX_RANGE_UNDEF;
|
||||
@ -691,7 +691,7 @@ opal_pmix_data_range_t pmix3x_convert_range(pmix_data_range_t range) {
|
||||
}
|
||||
}
|
||||
|
||||
opal_pmix_persistence_t pmix3x_convert_persist(pmix_persistence_t persist)
|
||||
opal_pmix_persistence_t pmix2x_convert_persist(pmix_persistence_t persist)
|
||||
{
|
||||
switch(persist) {
|
||||
case PMIX_PERSIST_INDEF:
|
||||
@ -709,7 +709,7 @@ opal_pmix_persistence_t pmix3x_convert_persist(pmix_persistence_t persist)
|
||||
}
|
||||
}
|
||||
|
||||
pmix_persistence_t pmix3x_convert_opalpersist(opal_pmix_persistence_t persist)
|
||||
pmix_persistence_t pmix2x_convert_opalpersist(opal_pmix_persistence_t persist)
|
||||
{
|
||||
switch(persist) {
|
||||
case OPAL_PMIX_PERSIST_INDEF:
|
||||
@ -730,7 +730,7 @@ pmix_persistence_t pmix3x_convert_opalpersist(opal_pmix_persistence_t persist)
|
||||
/**** RHC: NEED TO ADD SUPPORT FOR NEW PMIX DATA TYPES, INCLUDING
|
||||
**** CONVERSION OF PROC STATES ****/
|
||||
|
||||
void pmix3x_value_load(pmix_value_t *v,
|
||||
void pmix2x_value_load(pmix_value_t *v,
|
||||
opal_value_t *kv)
|
||||
{
|
||||
switch(kv->type) {
|
||||
@ -823,14 +823,14 @@ void pmix3x_value_load(pmix_value_t *v,
|
||||
break;
|
||||
case OPAL_VPID:
|
||||
v->type = PMIX_PROC_RANK;
|
||||
v->data.rank = pmix3x_convert_opalrank(kv->data.name.vpid);
|
||||
v->data.rank = pmix2x_convert_opalrank(kv->data.name.vpid);
|
||||
break;
|
||||
case OPAL_NAME:
|
||||
v->type = PMIX_PROC;
|
||||
/* have to stringify the jobid */
|
||||
PMIX_PROC_CREATE(v->data.proc, 1);
|
||||
(void)opal_snprintf_jobid(v->data.proc->nspace, PMIX_MAX_NSLEN, kv->data.name.vpid);
|
||||
v->data.proc->rank = pmix3x_convert_opalrank(kv->data.name.vpid);
|
||||
v->data.proc->rank = pmix2x_convert_opalrank(kv->data.name.vpid);
|
||||
break;
|
||||
case OPAL_BYTE_OBJECT:
|
||||
v->type = PMIX_BYTE_OBJECT;
|
||||
@ -845,15 +845,15 @@ void pmix3x_value_load(pmix_value_t *v,
|
||||
break;
|
||||
case OPAL_PERSIST:
|
||||
v->type = PMIX_PERSIST;
|
||||
v->data.persist = pmix3x_convert_opalpersist(kv->data.uint8);
|
||||
v->data.persist = pmix2x_convert_opalpersist(kv->data.uint8);
|
||||
break;
|
||||
case OPAL_SCOPE:
|
||||
v->type = PMIX_SCOPE;
|
||||
v->data.scope = pmix3x_convert_opalscope(kv->data.uint8);
|
||||
v->data.scope = pmix2x_convert_opalscope(kv->data.uint8);
|
||||
break;
|
||||
case OPAL_DATA_RANGE:
|
||||
v->type = PMIX_DATA_RANGE;
|
||||
v->data.range = pmix3x_convert_opalrange(kv->data.uint8);
|
||||
v->data.range = pmix2x_convert_opalrange(kv->data.uint8);
|
||||
break;
|
||||
case OPAL_PROC_STATE:
|
||||
v->type = PMIX_PROC_STATE;
|
||||
@ -871,7 +871,7 @@ void pmix3x_value_load(pmix_value_t *v,
|
||||
}
|
||||
}
|
||||
|
||||
int pmix3x_value_unload(opal_value_t *kv,
|
||||
int pmix2x_value_unload(opal_value_t *kv,
|
||||
const pmix_value_t *v)
|
||||
{
|
||||
int rc=OPAL_SUCCESS;
|
||||
@ -965,14 +965,14 @@ int pmix3x_value_unload(opal_value_t *kv,
|
||||
break;
|
||||
case PMIX_PROC_RANK:
|
||||
kv->type = OPAL_VPID;
|
||||
kv->data.name.vpid = pmix3x_convert_rank(v->data.rank);
|
||||
kv->data.name.vpid = pmix2x_convert_rank(v->data.rank);
|
||||
break;
|
||||
case PMIX_PROC:
|
||||
kv->type = OPAL_NAME;
|
||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&kv->data.name.jobid, v->data.proc->nspace))) {
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
kv->data.name.vpid = pmix3x_convert_rank(v->data.proc->rank);
|
||||
kv->data.name.vpid = pmix2x_convert_rank(v->data.proc->rank);
|
||||
break;
|
||||
case PMIX_BYTE_OBJECT:
|
||||
kv->type = OPAL_BYTE_OBJECT;
|
||||
@ -987,15 +987,15 @@ int pmix3x_value_unload(opal_value_t *kv,
|
||||
break;
|
||||
case PMIX_PERSIST:
|
||||
kv->type = OPAL_PERSIST;
|
||||
kv->data.uint8 = pmix3x_convert_persist(v->data.persist);
|
||||
kv->data.uint8 = pmix2x_convert_persist(v->data.persist);
|
||||
break;
|
||||
case PMIX_SCOPE:
|
||||
kv->type = OPAL_SCOPE;
|
||||
kv->data.uint8 = pmix3x_convert_scope(v->data.scope);
|
||||
kv->data.uint8 = pmix2x_convert_scope(v->data.scope);
|
||||
break;
|
||||
case PMIX_DATA_RANGE:
|
||||
kv->type = OPAL_DATA_RANGE;
|
||||
kv->data.uint8 = pmix3x_convert_range(v->data.range);
|
||||
kv->data.uint8 = pmix2x_convert_range(v->data.range);
|
||||
break;
|
||||
case PMIX_PROC_STATE:
|
||||
kv->type = OPAL_PROC_STATE;
|
||||
@ -1017,11 +1017,11 @@ int pmix3x_value_unload(opal_value_t *kv,
|
||||
|
||||
static void _reg_hdlr(int sd, short args, void *cbdata)
|
||||
{
|
||||
pmix3x_threadshift_t *cd = (pmix3x_threadshift_t*)cbdata;
|
||||
opal_pmix3x_event_chain_t *chain;
|
||||
opal_pmix3x_single_event_t *sing = NULL;
|
||||
opal_pmix3x_multi_event_t *multi = NULL;
|
||||
opal_pmix3x_default_event_t *def = NULL;
|
||||
pmix2x_threadshift_t *cd = (pmix2x_threadshift_t*)cbdata;
|
||||
opal_pmix2x_event_chain_t *chain;
|
||||
opal_pmix2x_single_event_t *sing = NULL;
|
||||
opal_pmix2x_multi_event_t *multi = NULL;
|
||||
opal_pmix2x_default_event_t *def = NULL;
|
||||
opal_value_t *kv;
|
||||
int i;
|
||||
bool prepend = false;
|
||||
@ -1043,40 +1043,40 @@ static void _reg_hdlr(int sd, short args, void *cbdata)
|
||||
|
||||
if (NULL == cd->event_codes) {
|
||||
/* this is a default handler */
|
||||
def = OBJ_NEW(opal_pmix3x_default_event_t);
|
||||
def = OBJ_NEW(opal_pmix2x_default_event_t);
|
||||
def->handler = cd->evhandler;
|
||||
def->index = mca_pmix_ext3x_component.evindex;
|
||||
def->index = mca_pmix_ext2x_component.evindex;
|
||||
if (prepend) {
|
||||
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
|
||||
"%s PREPENDING TO DEFAULT EVENTS",
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME));
|
||||
opal_list_prepend(&mca_pmix_ext3x_component.default_events, &def->super);
|
||||
opal_list_prepend(&mca_pmix_ext2x_component.default_events, &def->super);
|
||||
} else {
|
||||
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
|
||||
"%s APPENDING TO DEFAULT EVENTS",
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME));
|
||||
opal_list_append(&mca_pmix_ext3x_component.default_events, &def->super);
|
||||
opal_list_append(&mca_pmix_ext2x_component.default_events, &def->super);
|
||||
}
|
||||
} else if (1 == opal_list_get_size(cd->event_codes)) {
|
||||
/* single handler */
|
||||
sing = OBJ_NEW(opal_pmix3x_single_event_t);
|
||||
sing = OBJ_NEW(opal_pmix2x_single_event_t);
|
||||
kv = (opal_value_t*)opal_list_get_first(cd->event_codes);
|
||||
sing->code = kv->data.integer;
|
||||
sing->index = mca_pmix_ext3x_component.evindex;
|
||||
sing->index = mca_pmix_ext2x_component.evindex;
|
||||
sing->handler = cd->evhandler;
|
||||
if (prepend) {
|
||||
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
|
||||
"%s PREPENDING TO SINGLE EVENTS WITH CODE %d",
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), sing->code);
|
||||
opal_list_prepend(&mca_pmix_ext3x_component.single_events, &sing->super);
|
||||
opal_list_prepend(&mca_pmix_ext2x_component.single_events, &sing->super);
|
||||
} else {
|
||||
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
|
||||
"%s APPENDING TO SINGLE EVENTS WITH CODE %d",
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), sing->code);
|
||||
opal_list_append(&mca_pmix_ext3x_component.single_events, &sing->super);
|
||||
opal_list_append(&mca_pmix_ext2x_component.single_events, &sing->super);
|
||||
}
|
||||
} else {
|
||||
multi = OBJ_NEW(opal_pmix3x_multi_event_t);
|
||||
multi = OBJ_NEW(opal_pmix2x_multi_event_t);
|
||||
multi->ncodes = opal_list_get_size(cd->event_codes);
|
||||
multi->codes = (int*)malloc(multi->ncodes * sizeof(int));
|
||||
i=0;
|
||||
@ -1084,35 +1084,35 @@ static void _reg_hdlr(int sd, short args, void *cbdata)
|
||||
multi->codes[i] = kv->data.integer;
|
||||
++i;
|
||||
}
|
||||
multi->index = mca_pmix_ext3x_component.evindex;
|
||||
multi->index = mca_pmix_ext2x_component.evindex;
|
||||
multi->handler = cd->evhandler;
|
||||
if (prepend) {
|
||||
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
|
||||
"%s PREPENDING TO MULTI EVENTS",
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME));
|
||||
opal_list_prepend(&mca_pmix_ext3x_component.multi_events, &multi->super);
|
||||
opal_list_prepend(&mca_pmix_ext2x_component.multi_events, &multi->super);
|
||||
} else {
|
||||
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
|
||||
"%s APPENDING TO MULTI EVENTS",
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME));
|
||||
opal_list_append(&mca_pmix_ext3x_component.multi_events, &multi->super);
|
||||
opal_list_append(&mca_pmix_ext2x_component.multi_events, &multi->super);
|
||||
}
|
||||
}
|
||||
|
||||
/* release the caller */
|
||||
if (NULL != cd->cbfunc) {
|
||||
cd->cbfunc(OPAL_SUCCESS, mca_pmix_ext3x_component.evindex, cd->cbdata);
|
||||
cd->cbfunc(OPAL_SUCCESS, mca_pmix_ext2x_component.evindex, cd->cbdata);
|
||||
}
|
||||
mca_pmix_ext3x_component.evindex++;
|
||||
mca_pmix_ext2x_component.evindex++;
|
||||
|
||||
/* check if any matching notifications have been cached - only nondefault
|
||||
* events will have been cached*/
|
||||
if (NULL == def) {
|
||||
/* check single code registrations */
|
||||
if (NULL != sing) {
|
||||
OPAL_LIST_FOREACH(chain, &mca_pmix_ext3x_component.cache, opal_pmix3x_event_chain_t) {
|
||||
OPAL_LIST_FOREACH(chain, &mca_pmix_ext2x_component.cache, opal_pmix2x_event_chain_t) {
|
||||
if (sing->code == chain->status) {
|
||||
opal_list_remove_item(&mca_pmix_ext3x_component.cache, &chain->super);
|
||||
opal_list_remove_item(&mca_pmix_ext2x_component.cache, &chain->super);
|
||||
chain->sing = sing;
|
||||
sing->handler(chain->status, &chain->source,
|
||||
chain->info, &chain->results,
|
||||
@ -1123,10 +1123,10 @@ static void _reg_hdlr(int sd, short args, void *cbdata)
|
||||
}
|
||||
} else if (NULL != multi) {
|
||||
/* check for multi code registrations */
|
||||
OPAL_LIST_FOREACH(chain, &mca_pmix_ext3x_component.cache, opal_pmix3x_event_chain_t) {
|
||||
OPAL_LIST_FOREACH(chain, &mca_pmix_ext2x_component.cache, opal_pmix2x_event_chain_t) {
|
||||
for (n=0; n < multi->ncodes; n++) {
|
||||
if (multi->codes[n] == chain->status) {
|
||||
opal_list_remove_item(&mca_pmix_ext3x_component.cache, &chain->super);
|
||||
opal_list_remove_item(&mca_pmix_ext2x_component.cache, &chain->super);
|
||||
chain->multi = multi;
|
||||
multi->handler(chain->status, &chain->source,
|
||||
chain->info, &chain->results,
|
||||
@ -1157,31 +1157,31 @@ static void register_handler(opal_list_t *event_codes,
|
||||
|
||||
static void _dereg_hdlr(int sd, short args, void *cbdata)
|
||||
{
|
||||
pmix3x_threadshift_t *cd = (pmix3x_threadshift_t*)cbdata;
|
||||
opal_pmix3x_single_event_t *sing;
|
||||
opal_pmix3x_multi_event_t *multi;
|
||||
opal_pmix3x_default_event_t *def;
|
||||
pmix2x_threadshift_t *cd = (pmix2x_threadshift_t*)cbdata;
|
||||
opal_pmix2x_single_event_t *sing;
|
||||
opal_pmix2x_multi_event_t *multi;
|
||||
opal_pmix2x_default_event_t *def;
|
||||
|
||||
/* check the single events first */
|
||||
OPAL_LIST_FOREACH(sing, &mca_pmix_ext3x_component.single_events, opal_pmix3x_single_event_t) {
|
||||
OPAL_LIST_FOREACH(sing, &mca_pmix_ext2x_component.single_events, opal_pmix2x_single_event_t) {
|
||||
if (cd->handler == sing->index) {
|
||||
opal_list_remove_item(&mca_pmix_ext3x_component.single_events, &sing->super);
|
||||
opal_list_remove_item(&mca_pmix_ext2x_component.single_events, &sing->super);
|
||||
OBJ_RELEASE(sing);
|
||||
goto release;
|
||||
}
|
||||
}
|
||||
/* check multi events */
|
||||
OPAL_LIST_FOREACH(multi, &mca_pmix_ext3x_component.multi_events, opal_pmix3x_multi_event_t) {
|
||||
OPAL_LIST_FOREACH(multi, &mca_pmix_ext2x_component.multi_events, opal_pmix2x_multi_event_t) {
|
||||
if (cd->handler == multi->index) {
|
||||
opal_list_remove_item(&mca_pmix_ext3x_component.multi_events, &multi->super);
|
||||
opal_list_remove_item(&mca_pmix_ext2x_component.multi_events, &multi->super);
|
||||
OBJ_RELEASE(multi);
|
||||
goto release;
|
||||
}
|
||||
}
|
||||
/* check default events */
|
||||
OPAL_LIST_FOREACH(def, &mca_pmix_ext3x_component.default_events, opal_pmix3x_default_event_t) {
|
||||
OPAL_LIST_FOREACH(def, &mca_pmix_ext2x_component.default_events, opal_pmix2x_default_event_t) {
|
||||
if (cd->handler == def->index) {
|
||||
opal_list_remove_item(&mca_pmix_ext3x_component.default_events, &def->super);
|
||||
opal_list_remove_item(&mca_pmix_ext2x_component.default_events, &def->super);
|
||||
OBJ_RELEASE(def);
|
||||
break;
|
||||
}
|
||||
@ -1206,21 +1206,21 @@ static void deregister_handler(size_t evhandler,
|
||||
|
||||
static void _notify_event(int sd, short args, void *cbdata)
|
||||
{
|
||||
pmix3x_threadshift_t *cd = (pmix3x_threadshift_t*)cbdata;
|
||||
pmix2x_threadshift_t *cd = (pmix2x_threadshift_t*)cbdata;
|
||||
size_t i;
|
||||
opal_pmix3x_single_event_t *sing;
|
||||
opal_pmix3x_multi_event_t *multi;
|
||||
opal_pmix3x_default_event_t *def;
|
||||
opal_pmix3x_event_chain_t *chain;
|
||||
opal_pmix2x_single_event_t *sing;
|
||||
opal_pmix2x_multi_event_t *multi;
|
||||
opal_pmix2x_default_event_t *def;
|
||||
opal_pmix2x_event_chain_t *chain;
|
||||
|
||||
/* check the single events first */
|
||||
OPAL_LIST_FOREACH(sing, &mca_pmix_ext3x_component.single_events, opal_pmix3x_single_event_t) {
|
||||
OPAL_LIST_FOREACH(sing, &mca_pmix_ext2x_component.single_events, opal_pmix2x_single_event_t) {
|
||||
if (cd->status == sing->code) {
|
||||
/* found it - invoke the handler, pointing its
|
||||
* callback function to our progression function */
|
||||
chain = OBJ_NEW(opal_pmix3x_event_chain_t);
|
||||
chain = OBJ_NEW(opal_pmix2x_event_chain_t);
|
||||
chain->status = cd->status;
|
||||
chain->range = pmix3x_convert_opalrange(cd->range);
|
||||
chain->range = pmix2x_convert_opalrange(cd->range);
|
||||
chain->source = *(cd->source);
|
||||
chain->info = cd->info;
|
||||
chain->final_cbfunc = cd->opcbfunc;
|
||||
@ -1237,14 +1237,14 @@ static void _notify_event(int sd, short args, void *cbdata)
|
||||
}
|
||||
}
|
||||
/* check multi events */
|
||||
OPAL_LIST_FOREACH(multi, &mca_pmix_ext3x_component.multi_events, opal_pmix3x_multi_event_t) {
|
||||
OPAL_LIST_FOREACH(multi, &mca_pmix_ext2x_component.multi_events, opal_pmix2x_multi_event_t) {
|
||||
for (i=0; i < multi->ncodes; i++) {
|
||||
if (cd->status == multi->codes[i]) {
|
||||
/* found it - invoke the handler, pointing its
|
||||
* callback function to our progression function */
|
||||
chain = OBJ_NEW(opal_pmix3x_event_chain_t);
|
||||
chain = OBJ_NEW(opal_pmix2x_event_chain_t);
|
||||
chain->status = cd->status;
|
||||
chain->range = pmix3x_convert_opalrange(cd->range);
|
||||
chain->range = pmix2x_convert_opalrange(cd->range);
|
||||
chain->source = *(cd->source);
|
||||
chain->info = cd->info;
|
||||
chain->final_cbfunc = cd->opcbfunc;
|
||||
@ -1262,11 +1262,11 @@ static void _notify_event(int sd, short args, void *cbdata)
|
||||
}
|
||||
}
|
||||
/* check default events */
|
||||
if (0 < opal_list_get_size(&mca_pmix_ext3x_component.default_events)) {
|
||||
def = (opal_pmix3x_default_event_t*)opal_list_get_first(&mca_pmix_ext3x_component.default_events);
|
||||
chain = OBJ_NEW(opal_pmix3x_event_chain_t);
|
||||
if (0 < opal_list_get_size(&mca_pmix_ext2x_component.default_events)) {
|
||||
def = (opal_pmix2x_default_event_t*)opal_list_get_first(&mca_pmix_ext2x_component.default_events);
|
||||
chain = OBJ_NEW(opal_pmix2x_event_chain_t);
|
||||
chain->status = cd->status;
|
||||
chain->range = pmix3x_convert_opalrange(cd->range);
|
||||
chain->range = pmix2x_convert_opalrange(cd->range);
|
||||
chain->source = *(cd->source);
|
||||
chain->info = cd->info;
|
||||
chain->final_cbfunc = cd->opcbfunc;
|
||||
@ -1302,7 +1302,7 @@ static int notify_event(int status,
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
static void pmix3x_query(opal_list_t *queries,
|
||||
static void pmix2x_query(opal_list_t *queries,
|
||||
opal_pmix_info_cbfunc_t cbfunc, void *cbdata)
|
||||
{
|
||||
if (NULL != cbfunc) {
|
||||
@ -1313,21 +1313,21 @@ static void pmix3x_query(opal_list_t *queries,
|
||||
|
||||
static void opcbfunc(pmix_status_t status, void *cbdata)
|
||||
{
|
||||
pmix3x_opcaddy_t *op = (pmix3x_opcaddy_t*)cbdata;
|
||||
pmix2x_opcaddy_t *op = (pmix2x_opcaddy_t*)cbdata;
|
||||
|
||||
if (NULL != op->opcbfunc) {
|
||||
op->opcbfunc(pmix3x_convert_rc(status), op->cbdata);
|
||||
op->opcbfunc(pmix2x_convert_rc(status), op->cbdata);
|
||||
}
|
||||
OBJ_RELEASE(op);
|
||||
}
|
||||
|
||||
static void pmix3x_log(opal_list_t *info,
|
||||
static void pmix2x_log(opal_list_t *info,
|
||||
opal_pmix_op_cbfunc_t cbfunc, void *cbdata)
|
||||
{
|
||||
int rc;
|
||||
opal_value_t *ival;
|
||||
size_t n, ninfo;
|
||||
pmix3x_opcaddy_t *cd;
|
||||
pmix2x_opcaddy_t *cd;
|
||||
|
||||
/* bozo check */
|
||||
if (NULL == info || 0 == (ninfo = opal_list_get_size(info))) {
|
||||
@ -1336,7 +1336,7 @@ static void pmix3x_log(opal_list_t *info,
|
||||
}
|
||||
|
||||
/* setup the operation */
|
||||
cd = OBJ_NEW(pmix3x_opcaddy_t);
|
||||
cd = OBJ_NEW(pmix2x_opcaddy_t);
|
||||
cd->opcbfunc = cbfunc;
|
||||
cd->cbdata = cbdata;
|
||||
cd->ninfo = ninfo;
|
||||
@ -1346,7 +1346,7 @@ static void pmix3x_log(opal_list_t *info,
|
||||
n=0;
|
||||
OPAL_LIST_FOREACH(ival, info, opal_value_t) {
|
||||
(void)strncpy(cd->info[n].key, ival->key, PMIX_MAX_KEYLEN);
|
||||
pmix3x_value_load(&cd->info[n].value, ival);
|
||||
pmix2x_value_load(&cd->info[n].value, ival);
|
||||
++n;
|
||||
}
|
||||
|
||||
@ -1362,34 +1362,34 @@ static void pmix3x_log(opal_list_t *info,
|
||||
}
|
||||
|
||||
/**** INSTANTIATE INTERNAL CLASSES ****/
|
||||
OBJ_CLASS_INSTANCE(opal_pmix3x_jobid_trkr_t,
|
||||
OBJ_CLASS_INSTANCE(opal_pmix2x_jobid_trkr_t,
|
||||
opal_list_item_t,
|
||||
NULL, NULL);
|
||||
|
||||
OBJ_CLASS_INSTANCE(opal_pmix3x_single_event_t,
|
||||
OBJ_CLASS_INSTANCE(opal_pmix2x_single_event_t,
|
||||
opal_list_item_t,
|
||||
NULL, NULL);
|
||||
|
||||
static void mtevcon(opal_pmix3x_multi_event_t *p)
|
||||
static void mtevcon(opal_pmix2x_multi_event_t *p)
|
||||
{
|
||||
p->codes = NULL;
|
||||
p->ncodes = 0;
|
||||
}
|
||||
static void mtevdes(opal_pmix3x_multi_event_t *p)
|
||||
static void mtevdes(opal_pmix2x_multi_event_t *p)
|
||||
{
|
||||
if (NULL != p->codes) {
|
||||
free(p->codes);
|
||||
}
|
||||
}
|
||||
OBJ_CLASS_INSTANCE(opal_pmix3x_multi_event_t,
|
||||
OBJ_CLASS_INSTANCE(opal_pmix2x_multi_event_t,
|
||||
opal_list_item_t,
|
||||
mtevcon, mtevdes);
|
||||
|
||||
OBJ_CLASS_INSTANCE(opal_pmix3x_default_event_t,
|
||||
OBJ_CLASS_INSTANCE(opal_pmix2x_default_event_t,
|
||||
opal_list_item_t,
|
||||
NULL, NULL);
|
||||
|
||||
static void chcon(opal_pmix3x_event_chain_t *p)
|
||||
static void chcon(opal_pmix2x_event_chain_t *p)
|
||||
{
|
||||
p->nondefault = false;
|
||||
p->info = NULL;
|
||||
@ -1400,15 +1400,15 @@ static void chcon(opal_pmix3x_event_chain_t *p)
|
||||
p->final_cbfunc = NULL;
|
||||
p->final_cbdata = NULL;
|
||||
}
|
||||
static void chdes(opal_pmix3x_event_chain_t *p)
|
||||
static void chdes(opal_pmix2x_event_chain_t *p)
|
||||
{
|
||||
OPAL_LIST_DESTRUCT(&p->results);
|
||||
}
|
||||
OBJ_CLASS_INSTANCE(opal_pmix3x_event_chain_t,
|
||||
OBJ_CLASS_INSTANCE(opal_pmix2x_event_chain_t,
|
||||
opal_list_item_t,
|
||||
chcon, chdes);
|
||||
|
||||
static void opcon(pmix3x_opcaddy_t *p)
|
||||
static void opcon(pmix2x_opcaddy_t *p)
|
||||
{
|
||||
memset(&p->p, 0, sizeof(pmix_proc_t));
|
||||
p->procs = NULL;
|
||||
@ -1427,7 +1427,7 @@ static void opcon(pmix3x_opcaddy_t *p)
|
||||
p->spcbfunc = NULL;
|
||||
p->cbdata = NULL;
|
||||
}
|
||||
static void opdes(pmix3x_opcaddy_t *p)
|
||||
static void opdes(pmix2x_opcaddy_t *p)
|
||||
{
|
||||
if (NULL != p->procs) {
|
||||
PMIX_PROC_FREE(p->procs, p->nprocs);
|
||||
@ -1442,11 +1442,11 @@ static void opdes(pmix3x_opcaddy_t *p)
|
||||
PMIX_APP_FREE(p->apps, p->sz);
|
||||
}
|
||||
}
|
||||
OBJ_CLASS_INSTANCE(pmix3x_opcaddy_t,
|
||||
OBJ_CLASS_INSTANCE(pmix2x_opcaddy_t,
|
||||
opal_object_t,
|
||||
opcon, opdes);
|
||||
|
||||
static void ocadcon(pmix3x_opalcaddy_t *p)
|
||||
static void ocadcon(pmix2x_opalcaddy_t *p)
|
||||
{
|
||||
OBJ_CONSTRUCT(&p->procs, opal_list_t);
|
||||
OBJ_CONSTRUCT(&p->info, opal_list_t);
|
||||
@ -1462,17 +1462,17 @@ static void ocadcon(pmix3x_opalcaddy_t *p)
|
||||
p->toolcbfunc = NULL;
|
||||
p->ocbdata = NULL;
|
||||
}
|
||||
static void ocaddes(pmix3x_opalcaddy_t *p)
|
||||
static void ocaddes(pmix2x_opalcaddy_t *p)
|
||||
{
|
||||
OPAL_LIST_DESTRUCT(&p->procs);
|
||||
OPAL_LIST_DESTRUCT(&p->info);
|
||||
OPAL_LIST_DESTRUCT(&p->apps);
|
||||
}
|
||||
OBJ_CLASS_INSTANCE(pmix3x_opalcaddy_t,
|
||||
OBJ_CLASS_INSTANCE(pmix2x_opalcaddy_t,
|
||||
opal_object_t,
|
||||
ocadcon, ocaddes);
|
||||
|
||||
static void tscon(pmix3x_threadshift_t *p)
|
||||
static void tscon(pmix2x_threadshift_t *p)
|
||||
{
|
||||
p->active = false;
|
||||
p->source = NULL;
|
||||
@ -1484,6 +1484,6 @@ static void tscon(pmix3x_threadshift_t *p)
|
||||
p->opcbfunc = NULL;
|
||||
p->cbdata = NULL;
|
||||
}
|
||||
OBJ_CLASS_INSTANCE(pmix3x_threadshift_t,
|
||||
OBJ_CLASS_INSTANCE(pmix2x_threadshift_t,
|
||||
opal_object_t,
|
||||
tscon, NULL);
|
@ -44,27 +44,27 @@ typedef struct {
|
||||
opal_list_t default_events;
|
||||
int cache_size;
|
||||
opal_list_t cache;
|
||||
} mca_pmix_ext3x_component_t;
|
||||
} mca_pmix_ext2x_component_t;
|
||||
|
||||
OPAL_DECLSPEC extern mca_pmix_ext3x_component_t mca_pmix_ext3x_component;
|
||||
OPAL_DECLSPEC extern mca_pmix_ext2x_component_t mca_pmix_ext2x_component;
|
||||
|
||||
OPAL_DECLSPEC extern const opal_pmix_base_module_t opal_pmix_ext3x_module;
|
||||
OPAL_DECLSPEC extern const opal_pmix_base_module_t opal_pmix_ext2x_module;
|
||||
|
||||
/**** INTERNAL OBJECTS ****/
|
||||
typedef struct {
|
||||
opal_list_item_t super;
|
||||
opal_jobid_t jobid;
|
||||
char nspace[PMIX_MAX_NSLEN + 1];
|
||||
} opal_pmix3x_jobid_trkr_t;
|
||||
OBJ_CLASS_DECLARATION(opal_pmix3x_jobid_trkr_t);
|
||||
} opal_pmix2x_jobid_trkr_t;
|
||||
OBJ_CLASS_DECLARATION(opal_pmix2x_jobid_trkr_t);
|
||||
|
||||
typedef struct {
|
||||
opal_list_item_t super;
|
||||
size_t index;
|
||||
int code;
|
||||
opal_pmix_notification_fn_t handler;
|
||||
} opal_pmix3x_single_event_t;
|
||||
OBJ_CLASS_DECLARATION(opal_pmix3x_single_event_t);
|
||||
} opal_pmix2x_single_event_t;
|
||||
OBJ_CLASS_DECLARATION(opal_pmix2x_single_event_t);
|
||||
|
||||
typedef struct {
|
||||
opal_list_item_t super;
|
||||
@ -72,15 +72,15 @@ typedef struct {
|
||||
int *codes;
|
||||
size_t ncodes;
|
||||
opal_pmix_notification_fn_t handler;
|
||||
} opal_pmix3x_multi_event_t;
|
||||
OBJ_CLASS_DECLARATION(opal_pmix3x_multi_event_t);
|
||||
} opal_pmix2x_multi_event_t;
|
||||
OBJ_CLASS_DECLARATION(opal_pmix2x_multi_event_t);
|
||||
|
||||
typedef struct {
|
||||
opal_list_item_t super;
|
||||
size_t index;
|
||||
opal_pmix_notification_fn_t handler;
|
||||
} opal_pmix3x_default_event_t;
|
||||
OBJ_CLASS_DECLARATION(opal_pmix3x_default_event_t);
|
||||
} opal_pmix2x_default_event_t;
|
||||
OBJ_CLASS_DECLARATION(opal_pmix2x_default_event_t);
|
||||
|
||||
typedef struct {
|
||||
opal_list_item_t super;
|
||||
@ -90,13 +90,13 @@ typedef struct {
|
||||
pmix_data_range_t range;
|
||||
opal_list_t *info;
|
||||
opal_list_t results;
|
||||
opal_pmix3x_single_event_t *sing;
|
||||
opal_pmix3x_multi_event_t *multi;
|
||||
opal_pmix3x_default_event_t *def;
|
||||
opal_pmix2x_single_event_t *sing;
|
||||
opal_pmix2x_multi_event_t *multi;
|
||||
opal_pmix2x_default_event_t *def;
|
||||
opal_pmix_op_cbfunc_t final_cbfunc;
|
||||
void *final_cbdata;
|
||||
} opal_pmix3x_event_chain_t;
|
||||
OBJ_CLASS_DECLARATION(opal_pmix3x_event_chain_t);
|
||||
} opal_pmix2x_event_chain_t;
|
||||
OBJ_CLASS_DECLARATION(opal_pmix2x_event_chain_t);
|
||||
|
||||
typedef struct {
|
||||
opal_object_t super;
|
||||
@ -117,8 +117,8 @@ typedef struct {
|
||||
opal_pmix_lookup_cbfunc_t lkcbfunc;
|
||||
opal_pmix_spawn_cbfunc_t spcbfunc;
|
||||
void *cbdata;
|
||||
} pmix3x_opcaddy_t;
|
||||
OBJ_CLASS_DECLARATION(pmix3x_opcaddy_t);
|
||||
} pmix2x_opcaddy_t;
|
||||
OBJ_CLASS_DECLARATION(pmix2x_opcaddy_t);
|
||||
|
||||
typedef struct {
|
||||
opal_object_t super;
|
||||
@ -135,8 +135,8 @@ typedef struct {
|
||||
void *cbdata;
|
||||
opal_pmix_release_cbfunc_t odmdxfunc;
|
||||
void *ocbdata;
|
||||
} pmix3x_opalcaddy_t;
|
||||
OBJ_CLASS_DECLARATION(pmix3x_opalcaddy_t);
|
||||
} pmix2x_opalcaddy_t;
|
||||
OBJ_CLASS_DECLARATION(pmix2x_opalcaddy_t);
|
||||
|
||||
typedef struct {
|
||||
opal_object_t super;
|
||||
@ -156,13 +156,13 @@ typedef struct {
|
||||
opal_pmix_evhandler_reg_cbfunc_t cbfunc;
|
||||
opal_pmix_op_cbfunc_t opcbfunc;
|
||||
void *cbdata;
|
||||
} pmix3x_threadshift_t;
|
||||
OBJ_CLASS_DECLARATION(pmix3x_threadshift_t);
|
||||
} pmix2x_threadshift_t;
|
||||
OBJ_CLASS_DECLARATION(pmix2x_threadshift_t);
|
||||
|
||||
#define OPAL_PMIX_OPCD_THREADSHIFT(i, s, sr, if, nif, fn, cb, cd) \
|
||||
do { \
|
||||
pmix3x_opalcaddy_t *_cd; \
|
||||
_cd = OBJ_NEW(pmix3x_opalcaddy_t); \
|
||||
pmix2x_opalcaddy_t *_cd; \
|
||||
_cd = OBJ_NEW(pmix2x_opalcaddy_t); \
|
||||
_cd->id = (i); \
|
||||
_cd->status = (s); \
|
||||
_cd->source = (sr); \
|
||||
@ -176,8 +176,8 @@ OBJ_CLASS_DECLARATION(pmix3x_threadshift_t);
|
||||
|
||||
#define OPAL_PMIX_OP_THREADSHIFT(e, fn, cb, cd) \
|
||||
do { \
|
||||
pmix3x_threadshift_t *_cd; \
|
||||
_cd = OBJ_NEW(pmix3x_threadshift_t); \
|
||||
pmix2x_threadshift_t *_cd; \
|
||||
_cd = OBJ_NEW(pmix2x_threadshift_t); \
|
||||
_cd->handler = (e); \
|
||||
_cd->opcbfunc = (cb); \
|
||||
_cd->cbdata = (cd); \
|
||||
@ -188,8 +188,8 @@ OBJ_CLASS_DECLARATION(pmix3x_threadshift_t);
|
||||
|
||||
#define OPAL_PMIX_THREADSHIFT(e, i, eh, fn, cb, cd) \
|
||||
do { \
|
||||
pmix3x_threadshift_t *_cd; \
|
||||
_cd = OBJ_NEW(pmix3x_threadshift_t); \
|
||||
pmix2x_threadshift_t *_cd; \
|
||||
_cd = OBJ_NEW(pmix2x_threadshift_t); \
|
||||
_cd->event_codes = (e); \
|
||||
_cd->info = (i); \
|
||||
_cd->evhandler = (eh); \
|
||||
@ -202,8 +202,8 @@ OBJ_CLASS_DECLARATION(pmix3x_threadshift_t);
|
||||
|
||||
#define OPAL_PMIX_NOTIFY_THREADSHIFT(s, sr, r, i, fn, cb, cd) \
|
||||
do { \
|
||||
pmix3x_threadshift_t *_cd; \
|
||||
_cd = OBJ_NEW(pmix3x_threadshift_t); \
|
||||
pmix2x_threadshift_t *_cd; \
|
||||
_cd = OBJ_NEW(pmix2x_threadshift_t); \
|
||||
_cd->status = (s); \
|
||||
_cd->source = (sr); \
|
||||
_cd->range = (r); \
|
||||
@ -216,106 +216,106 @@ OBJ_CLASS_DECLARATION(pmix3x_threadshift_t);
|
||||
} while(0)
|
||||
|
||||
/**** CLIENT FUNCTIONS ****/
|
||||
OPAL_MODULE_DECLSPEC int pmix3x_client_init(void);
|
||||
OPAL_MODULE_DECLSPEC int pmix3x_client_finalize(void);
|
||||
OPAL_MODULE_DECLSPEC int pmix3x_initialized(void);
|
||||
OPAL_MODULE_DECLSPEC int pmix3x_abort(int flag, const char *msg,
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_client_init(void);
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_client_finalize(void);
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_initialized(void);
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_abort(int flag, const char *msg,
|
||||
opal_list_t *procs);
|
||||
OPAL_MODULE_DECLSPEC int pmix3x_commit(void);
|
||||
OPAL_MODULE_DECLSPEC int pmix3x_fence(opal_list_t *procs, int collect_data);
|
||||
OPAL_MODULE_DECLSPEC int pmix3x_fencenb(opal_list_t *procs, int collect_data,
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_commit(void);
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_fence(opal_list_t *procs, int collect_data);
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_fencenb(opal_list_t *procs, int collect_data,
|
||||
opal_pmix_op_cbfunc_t cbfunc, void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC int pmix3x_put(opal_pmix_scope_t scope,
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_put(opal_pmix_scope_t scope,
|
||||
opal_value_t *val);
|
||||
OPAL_MODULE_DECLSPEC int pmix3x_get(const opal_process_name_t *proc, const char *key,
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_get(const opal_process_name_t *proc, const char *key,
|
||||
opal_list_t *info, opal_value_t **val);
|
||||
OPAL_MODULE_DECLSPEC int pmix3x_getnb(const opal_process_name_t *proc, const char *key,
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_getnb(const opal_process_name_t *proc, const char *key,
|
||||
opal_list_t *info,
|
||||
opal_pmix_value_cbfunc_t cbfunc, void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC int pmix3x_publish(opal_list_t *info);
|
||||
OPAL_MODULE_DECLSPEC int pmix3x_publishnb(opal_list_t *info,
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_publish(opal_list_t *info);
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_publishnb(opal_list_t *info,
|
||||
opal_pmix_op_cbfunc_t cbfunc, void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC int pmix3x_lookup(opal_list_t *data, opal_list_t *info);
|
||||
OPAL_MODULE_DECLSPEC int pmix3x_lookupnb(char **keys, opal_list_t *info,
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_lookup(opal_list_t *data, opal_list_t *info);
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_lookupnb(char **keys, opal_list_t *info,
|
||||
opal_pmix_lookup_cbfunc_t cbfunc, void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC int pmix3x_unpublish(char **keys, opal_list_t *info);
|
||||
OPAL_MODULE_DECLSPEC int pmix3x_unpublishnb(char **keys, opal_list_t *info,
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_unpublish(char **keys, opal_list_t *info);
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_unpublishnb(char **keys, opal_list_t *info,
|
||||
opal_pmix_op_cbfunc_t cbfunc, void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC int pmix3x_spawn(opal_list_t *job_info, opal_list_t *apps, opal_jobid_t *jobid);
|
||||
OPAL_MODULE_DECLSPEC int pmix3x_spawnnb(opal_list_t *job_info, opal_list_t *apps,
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_spawn(opal_list_t *job_info, opal_list_t *apps, opal_jobid_t *jobid);
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_spawnnb(opal_list_t *job_info, opal_list_t *apps,
|
||||
opal_pmix_spawn_cbfunc_t cbfunc, void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC int pmix3x_connect(opal_list_t *procs);
|
||||
OPAL_MODULE_DECLSPEC int pmix3x_connectnb(opal_list_t *procs,
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_connect(opal_list_t *procs);
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_connectnb(opal_list_t *procs,
|
||||
opal_pmix_op_cbfunc_t cbfunc,
|
||||
void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC int pmix3x_disconnect(opal_list_t *procs);
|
||||
OPAL_MODULE_DECLSPEC int pmix3x_disconnectnb(opal_list_t *procs,
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_disconnect(opal_list_t *procs);
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_disconnectnb(opal_list_t *procs,
|
||||
opal_pmix_op_cbfunc_t cbfunc,
|
||||
void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC int pmix3x_resolve_peers(const char *nodename, opal_jobid_t jobid,
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_resolve_peers(const char *nodename, opal_jobid_t jobid,
|
||||
opal_list_t *procs);
|
||||
OPAL_MODULE_DECLSPEC int pmix3x_resolve_nodes(opal_jobid_t jobid, char **nodelist);
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_resolve_nodes(opal_jobid_t jobid, char **nodelist);
|
||||
|
||||
/**** COMMON FUNCTIONS ****/
|
||||
OPAL_MODULE_DECLSPEC int pmix3x_store_local(const opal_process_name_t *proc,
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_store_local(const opal_process_name_t *proc,
|
||||
opal_value_t *val);
|
||||
|
||||
/**** SERVER SOUTHBOUND FUNCTIONS ****/
|
||||
OPAL_MODULE_DECLSPEC int pmix3x_server_init(opal_pmix_server_module_t *module,
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_server_init(opal_pmix_server_module_t *module,
|
||||
opal_list_t *info);
|
||||
OPAL_MODULE_DECLSPEC int pmix3x_server_finalize(void);
|
||||
OPAL_MODULE_DECLSPEC int pmix3x_server_gen_regex(const char *input, char **regex);
|
||||
OPAL_MODULE_DECLSPEC int pmix3x_server_gen_ppn(const char *input, char **ppn);
|
||||
OPAL_MODULE_DECLSPEC int pmix3x_server_register_nspace(opal_jobid_t jobid,
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_server_finalize(void);
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_server_gen_regex(const char *input, char **regex);
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_server_gen_ppn(const char *input, char **ppn);
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_server_register_nspace(opal_jobid_t jobid,
|
||||
int nlocalprocs,
|
||||
opal_list_t *info,
|
||||
opal_pmix_op_cbfunc_t cbfunc,
|
||||
void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC void pmix3x_server_deregister_nspace(opal_jobid_t jobid,
|
||||
OPAL_MODULE_DECLSPEC void pmix2x_server_deregister_nspace(opal_jobid_t jobid,
|
||||
opal_pmix_op_cbfunc_t cbfunc,
|
||||
void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC int pmix3x_server_register_client(const opal_process_name_t *proc,
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_server_register_client(const opal_process_name_t *proc,
|
||||
uid_t uid, gid_t gid,
|
||||
void *server_object,
|
||||
opal_pmix_op_cbfunc_t cbfunc,
|
||||
void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC void pmix3x_server_deregister_client(const opal_process_name_t *proc,
|
||||
OPAL_MODULE_DECLSPEC void pmix2x_server_deregister_client(const opal_process_name_t *proc,
|
||||
opal_pmix_op_cbfunc_t cbfunc,
|
||||
void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC int pmix3x_server_setup_fork(const opal_process_name_t *proc, char ***env);
|
||||
OPAL_MODULE_DECLSPEC int pmix3x_server_dmodex(const opal_process_name_t *proc,
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_server_setup_fork(const opal_process_name_t *proc, char ***env);
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_server_dmodex(const opal_process_name_t *proc,
|
||||
opal_pmix_modex_cbfunc_t cbfunc, void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC int pmix3x_server_notify_event(int status,
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_server_notify_event(int status,
|
||||
const opal_process_name_t *source,
|
||||
opal_list_t *info,
|
||||
opal_pmix_op_cbfunc_t cbfunc, void *cbdata);
|
||||
|
||||
|
||||
/**** COMPONENT UTILITY FUNCTIONS ****/
|
||||
OPAL_MODULE_DECLSPEC void pmix3x_event_hdlr(size_t evhdlr_registration_id,
|
||||
OPAL_MODULE_DECLSPEC void pmix2x_event_hdlr(size_t evhdlr_registration_id,
|
||||
pmix_status_t status, const pmix_proc_t *source,
|
||||
pmix_info_t info[], size_t ninfo,
|
||||
pmix_info_t results[], size_t nresults,
|
||||
pmix_event_notification_cbfunc_fn_t cbfunc,
|
||||
void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC pmix_status_t pmix3x_convert_opalrc(int rc);
|
||||
OPAL_MODULE_DECLSPEC int pmix3x_convert_rc(pmix_status_t rc);
|
||||
OPAL_MODULE_DECLSPEC pmix_status_t pmix2x_convert_opalrc(int rc);
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_convert_rc(pmix_status_t rc);
|
||||
|
||||
OPAL_MODULE_DECLSPEC opal_vpid_t pmix3x_convert_rank(int rank);
|
||||
OPAL_MODULE_DECLSPEC pmix_rank_t pmix3x_convert_opalrank(opal_vpid_t vpid);
|
||||
OPAL_MODULE_DECLSPEC opal_vpid_t pmix2x_convert_rank(int rank);
|
||||
OPAL_MODULE_DECLSPEC pmix_rank_t pmix2x_convert_opalrank(opal_vpid_t vpid);
|
||||
|
||||
OPAL_MODULE_DECLSPEC opal_pmix_scope_t pmix3x_convert_scope(pmix_scope_t scope);
|
||||
OPAL_MODULE_DECLSPEC pmix_scope_t pmix3x_convert_opalscope(opal_pmix_scope_t scope);
|
||||
OPAL_MODULE_DECLSPEC opal_pmix_scope_t pmix2x_convert_scope(pmix_scope_t scope);
|
||||
OPAL_MODULE_DECLSPEC pmix_scope_t pmix2x_convert_opalscope(opal_pmix_scope_t scope);
|
||||
|
||||
OPAL_MODULE_DECLSPEC pmix_data_range_t pmix3x_convert_opalrange(opal_pmix_data_range_t range);
|
||||
OPAL_MODULE_DECLSPEC opal_pmix_data_range_t pmix3x_convert_range(pmix_data_range_t range);
|
||||
OPAL_MODULE_DECLSPEC pmix_data_range_t pmix2x_convert_opalrange(opal_pmix_data_range_t range);
|
||||
OPAL_MODULE_DECLSPEC opal_pmix_data_range_t pmix2x_convert_range(pmix_data_range_t range);
|
||||
|
||||
OPAL_MODULE_DECLSPEC opal_pmix_persistence_t pmix3x_convert_persist(pmix_persistence_t scope);
|
||||
OPAL_MODULE_DECLSPEC pmix_persistence_t pmix3x_convert_opalpersist(opal_pmix_persistence_t scope);
|
||||
OPAL_MODULE_DECLSPEC opal_pmix_persistence_t pmix2x_convert_persist(pmix_persistence_t scope);
|
||||
OPAL_MODULE_DECLSPEC pmix_persistence_t pmix2x_convert_opalpersist(opal_pmix_persistence_t scope);
|
||||
|
||||
OPAL_MODULE_DECLSPEC void pmix3x_value_load(pmix_value_t *v,
|
||||
OPAL_MODULE_DECLSPEC void pmix2x_value_load(pmix_value_t *v,
|
||||
opal_value_t *kv);
|
||||
OPAL_MODULE_DECLSPEC int pmix3x_value_unload(opal_value_t *kv,
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_value_unload(opal_value_t *kv,
|
||||
const pmix_value_t *v);
|
||||
|
||||
END_C_DECLS
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
@ -1,8 +1,8 @@
|
||||
/*
|
||||
* Copyright (c) 2x14-2x16 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2x14-2x15 Research Organization for Information Science
|
||||
* Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014-2015 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2x16 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2016 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -22,13 +22,13 @@
|
||||
#include "opal/class/opal_list.h"
|
||||
#include "opal/util/proc.h"
|
||||
#include "opal/mca/pmix/pmix.h"
|
||||
#include "pmix_ext2x.h"
|
||||
#include "pmix2x.h"
|
||||
|
||||
/*
|
||||
* Public string showing the pmix external component version number
|
||||
*/
|
||||
const char *opal_pmix_ext2x_component_version_string =
|
||||
"OPAL external pmix2.0 MCA component version " OPAL_VERSION;
|
||||
const char *opal_pmix_pmix2x_component_version_string =
|
||||
"OPAL pmix2x MCA component version " OPAL_VERSION;
|
||||
|
||||
/*
|
||||
* Local function
|
@ -35,7 +35,7 @@
|
||||
#include "opal/util/proc.h"
|
||||
#include "opal/util/show_help.h"
|
||||
#include "opal/mca/pmix/base/base.h"
|
||||
#include "pmix3x.h"
|
||||
#include "pmix2x.h"
|
||||
|
||||
#include "pmix.h"
|
||||
#include "pmix_server.h"
|
||||
@ -126,10 +126,10 @@ opal_pmix_server_module_t *host_module = NULL;
|
||||
|
||||
static void opal_opcbfunc(int status, void *cbdata)
|
||||
{
|
||||
pmix3x_opalcaddy_t *opalcaddy = (pmix3x_opalcaddy_t*)cbdata;
|
||||
pmix2x_opalcaddy_t *opalcaddy = (pmix2x_opalcaddy_t*)cbdata;
|
||||
|
||||
if (NULL != opalcaddy->opcbfunc) {
|
||||
opalcaddy->opcbfunc(pmix3x_convert_opalrc(status), opalcaddy->cbdata);
|
||||
opalcaddy->opcbfunc(pmix2x_convert_opalrc(status), opalcaddy->cbdata);
|
||||
}
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
@ -139,33 +139,33 @@ static pmix_status_t server_client_connected_fn(const pmix_proc_t *p, void *serv
|
||||
{
|
||||
int rc;
|
||||
opal_process_name_t proc;
|
||||
pmix3x_opalcaddy_t *opalcaddy;
|
||||
pmix2x_opalcaddy_t *opalcaddy;
|
||||
|
||||
if (NULL == host_module || NULL == host_module->client_connected) {
|
||||
return PMIX_SUCCESS;
|
||||
}
|
||||
|
||||
opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t);
|
||||
opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t);
|
||||
opalcaddy->opcbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
/* convert the nspace/rank to an opal_process_name_t */
|
||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) {
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
proc.vpid = pmix3x_convert_rank(p->rank);
|
||||
proc.vpid = pmix2x_convert_rank(p->rank);
|
||||
|
||||
/* pass it up */
|
||||
rc = host_module->client_connected(&proc, server_object,
|
||||
opal_opcbfunc, opalcaddy);
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
|
||||
static pmix_status_t server_client_finalized_fn(const pmix_proc_t *p, void* server_object,
|
||||
pmix_op_cbfunc_t cbfunc, void *cbdata)
|
||||
{
|
||||
int rc;
|
||||
pmix3x_opalcaddy_t *opalcaddy;
|
||||
pmix2x_opalcaddy_t *opalcaddy;
|
||||
opal_process_name_t proc;
|
||||
|
||||
if (NULL == host_module || NULL == host_module->client_finalized) {
|
||||
@ -174,12 +174,12 @@ static pmix_status_t server_client_finalized_fn(const pmix_proc_t *p, void* serv
|
||||
|
||||
/* convert the nspace/rank to an opal_process_name_t */
|
||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) {
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
proc.vpid = pmix3x_convert_rank(p->rank);
|
||||
proc.vpid = pmix2x_convert_rank(p->rank);
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t);
|
||||
opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t);
|
||||
opalcaddy->opcbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
@ -188,7 +188,7 @@ static pmix_status_t server_client_finalized_fn(const pmix_proc_t *p, void* serv
|
||||
if (OPAL_SUCCESS != rc) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
|
||||
static pmix_status_t server_abort_fn(const pmix_proc_t *p, void *server_object,
|
||||
@ -200,7 +200,7 @@ static pmix_status_t server_abort_fn(const pmix_proc_t *p, void *server_object,
|
||||
opal_namelist_t *nm;
|
||||
opal_process_name_t proc;
|
||||
int rc;
|
||||
pmix3x_opalcaddy_t *opalcaddy;
|
||||
pmix2x_opalcaddy_t *opalcaddy;
|
||||
|
||||
if (NULL == host_module || NULL == host_module->abort) {
|
||||
return PMIX_ERR_NOT_SUPPORTED;
|
||||
@ -208,12 +208,12 @@ static pmix_status_t server_abort_fn(const pmix_proc_t *p, void *server_object,
|
||||
|
||||
/* convert the nspace/rank to an opal_process_name_t */
|
||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) {
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
proc.vpid = pmix3x_convert_rank(p->rank);
|
||||
proc.vpid = pmix2x_convert_rank(p->rank);
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t);
|
||||
opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t);
|
||||
opalcaddy->opcbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
@ -223,9 +223,9 @@ static pmix_status_t server_abort_fn(const pmix_proc_t *p, void *server_object,
|
||||
opal_list_append(&opalcaddy->procs, &nm->super);
|
||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&nm->name.jobid, procs[n].nspace))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
nm->name.vpid = pmix3x_convert_rank(procs[n].rank);
|
||||
nm->name.vpid = pmix2x_convert_rank(procs[n].rank);
|
||||
}
|
||||
|
||||
/* pass it up */
|
||||
@ -234,12 +234,12 @@ static pmix_status_t server_abort_fn(const pmix_proc_t *p, void *server_object,
|
||||
if (OPAL_SUCCESS != rc) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
|
||||
static void _data_release(void *cbdata)
|
||||
{
|
||||
pmix3x_opalcaddy_t *opalcaddy = (pmix3x_opalcaddy_t*)cbdata;
|
||||
pmix2x_opalcaddy_t *opalcaddy = (pmix2x_opalcaddy_t*)cbdata;
|
||||
|
||||
if (NULL != opalcaddy->odmdxfunc) {
|
||||
opalcaddy->odmdxfunc(opalcaddy->ocbdata);
|
||||
@ -251,9 +251,9 @@ static void opmdx_response(int status, const char *data, size_t sz, void *cbdata
|
||||
opal_pmix_release_cbfunc_t relcbfunc, void *relcbdata)
|
||||
{
|
||||
pmix_status_t rc;
|
||||
pmix3x_opalcaddy_t *opalcaddy = (pmix3x_opalcaddy_t*)cbdata;
|
||||
pmix2x_opalcaddy_t *opalcaddy = (pmix2x_opalcaddy_t*)cbdata;
|
||||
|
||||
rc = pmix3x_convert_rc(status);
|
||||
rc = pmix2x_convert_rc(status);
|
||||
if (NULL != opalcaddy->mdxcbfunc) {
|
||||
opalcaddy->odmdxfunc = relcbfunc;
|
||||
opalcaddy->ocbdata = relcbdata;
|
||||
@ -269,7 +269,7 @@ static pmix_status_t server_fencenb_fn(const pmix_proc_t procs[], size_t nprocs,
|
||||
char *data, size_t ndata,
|
||||
pmix_modex_cbfunc_t cbfunc, void *cbdata)
|
||||
{
|
||||
pmix3x_opalcaddy_t *opalcaddy;
|
||||
pmix2x_opalcaddy_t *opalcaddy;
|
||||
size_t n;
|
||||
opal_namelist_t *nm;
|
||||
opal_value_t *iptr;
|
||||
@ -280,7 +280,7 @@ static pmix_status_t server_fencenb_fn(const pmix_proc_t procs[], size_t nprocs,
|
||||
}
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t);
|
||||
opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t);
|
||||
opalcaddy->mdxcbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
@ -290,9 +290,9 @@ static pmix_status_t server_fencenb_fn(const pmix_proc_t procs[], size_t nprocs,
|
||||
opal_list_append(&opalcaddy->procs, &nm->super);
|
||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&nm->name.jobid, procs[n].nspace))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
nm->name.vpid = pmix3x_convert_rank(procs[n].rank);
|
||||
nm->name.vpid = pmix2x_convert_rank(procs[n].rank);
|
||||
}
|
||||
|
||||
/* convert the array of pmix_info_t to the list of info */
|
||||
@ -300,9 +300,9 @@ static pmix_status_t server_fencenb_fn(const pmix_proc_t procs[], size_t nprocs,
|
||||
iptr = OBJ_NEW(opal_value_t);
|
||||
opal_list_append(&opalcaddy->info, &iptr->super);
|
||||
iptr->key = strdup(info[n].key);
|
||||
if (OPAL_SUCCESS != (rc = pmix3x_value_unload(iptr, &info[n].value))) {
|
||||
if (OPAL_SUCCESS != (rc = pmix2x_value_unload(iptr, &info[n].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
}
|
||||
|
||||
@ -312,7 +312,7 @@ static pmix_status_t server_fencenb_fn(const pmix_proc_t procs[], size_t nprocs,
|
||||
if (OPAL_SUCCESS != rc) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
|
||||
static pmix_status_t server_dmodex_req_fn(const pmix_proc_t *p,
|
||||
@ -320,7 +320,7 @@ static pmix_status_t server_dmodex_req_fn(const pmix_proc_t *p,
|
||||
pmix_modex_cbfunc_t cbfunc, void *cbdata)
|
||||
{
|
||||
int rc;
|
||||
pmix3x_opalcaddy_t *opalcaddy;
|
||||
pmix2x_opalcaddy_t *opalcaddy;
|
||||
opal_process_name_t proc;
|
||||
opal_value_t *iptr;
|
||||
size_t n;
|
||||
@ -331,12 +331,12 @@ static pmix_status_t server_dmodex_req_fn(const pmix_proc_t *p,
|
||||
|
||||
/* convert the nspace/rank to an opal_process_name_t */
|
||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) {
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
proc.vpid = pmix3x_convert_rank(p->rank);
|
||||
proc.vpid = pmix2x_convert_rank(p->rank);
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t);
|
||||
opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t);
|
||||
opalcaddy->mdxcbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
@ -345,9 +345,9 @@ static pmix_status_t server_dmodex_req_fn(const pmix_proc_t *p,
|
||||
iptr = OBJ_NEW(opal_value_t);
|
||||
opal_list_append(&opalcaddy->info, &iptr->super);
|
||||
iptr->key = strdup(info[n].key);
|
||||
if (OPAL_SUCCESS != (rc = pmix3x_value_unload(iptr, &info[n].value))) {
|
||||
if (OPAL_SUCCESS != (rc = pmix2x_value_unload(iptr, &info[n].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
}
|
||||
|
||||
@ -359,7 +359,7 @@ static pmix_status_t server_dmodex_req_fn(const pmix_proc_t *p,
|
||||
if (OPAL_ERR_IN_PROCESS == rc) {
|
||||
rc = OPAL_SUCCESS;
|
||||
}
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
|
||||
static pmix_status_t server_publish_fn(const pmix_proc_t *p,
|
||||
@ -368,7 +368,7 @@ static pmix_status_t server_publish_fn(const pmix_proc_t *p,
|
||||
{
|
||||
int rc;
|
||||
size_t n;
|
||||
pmix3x_opalcaddy_t *opalcaddy;
|
||||
pmix2x_opalcaddy_t *opalcaddy;
|
||||
opal_process_name_t proc;
|
||||
opal_value_t *oinfo;
|
||||
|
||||
@ -378,12 +378,12 @@ static pmix_status_t server_publish_fn(const pmix_proc_t *p,
|
||||
|
||||
/* convert the nspace/rank to an opal_process_name_t */
|
||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) {
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
proc.vpid = pmix3x_convert_rank(p->rank);
|
||||
proc.vpid = pmix2x_convert_rank(p->rank);
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t);
|
||||
opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t);
|
||||
opalcaddy->opcbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
@ -392,9 +392,9 @@ static pmix_status_t server_publish_fn(const pmix_proc_t *p,
|
||||
oinfo = OBJ_NEW(opal_value_t);
|
||||
opal_list_append(&opalcaddy->info, &oinfo->super);
|
||||
oinfo->key = strdup(info[n].key);
|
||||
if (OPAL_SUCCESS != (rc = pmix3x_value_unload(oinfo, &info[n].value))) {
|
||||
if (OPAL_SUCCESS != (rc = pmix2x_value_unload(oinfo, &info[n].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
}
|
||||
|
||||
@ -404,21 +404,21 @@ static pmix_status_t server_publish_fn(const pmix_proc_t *p,
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
|
||||
static void opal_lkupcbfunc(int status,
|
||||
opal_list_t *data,
|
||||
void *cbdata)
|
||||
{
|
||||
pmix3x_opalcaddy_t *opalcaddy = (pmix3x_opalcaddy_t*)cbdata;
|
||||
pmix2x_opalcaddy_t *opalcaddy = (pmix2x_opalcaddy_t*)cbdata;
|
||||
pmix_status_t rc;
|
||||
pmix_pdata_t *d=NULL;
|
||||
size_t nd=0, n;
|
||||
opal_pmix_pdata_t *p;
|
||||
|
||||
if (NULL != opalcaddy->lkupcbfunc) {
|
||||
rc = pmix3x_convert_opalrc(status);
|
||||
rc = pmix2x_convert_opalrc(status);
|
||||
/* convert any returned data */
|
||||
if (NULL != data) {
|
||||
nd = opal_list_get_size(data);
|
||||
@ -427,9 +427,9 @@ static void opal_lkupcbfunc(int status,
|
||||
OPAL_LIST_FOREACH(p, data, opal_pmix_pdata_t) {
|
||||
/* convert the jobid */
|
||||
(void)opal_snprintf_jobid(d[n].proc.nspace, PMIX_MAX_NSLEN, p->proc.jobid);
|
||||
d[n].proc.rank = pmix3x_convert_opalrank(p->proc.vpid);
|
||||
d[n].proc.rank = pmix2x_convert_opalrank(p->proc.vpid);
|
||||
(void)strncpy(d[n].key, p->value.key, PMIX_MAX_KEYLEN);
|
||||
pmix3x_value_load(&d[n].value, &p->value);
|
||||
pmix2x_value_load(&d[n].value, &p->value);
|
||||
}
|
||||
}
|
||||
opalcaddy->lkupcbfunc(rc, d, nd, opalcaddy->cbdata);
|
||||
@ -442,7 +442,7 @@ static pmix_status_t server_lookup_fn(const pmix_proc_t *p, char **keys,
|
||||
pmix_lookup_cbfunc_t cbfunc, void *cbdata)
|
||||
{
|
||||
int rc;
|
||||
pmix3x_opalcaddy_t *opalcaddy;
|
||||
pmix2x_opalcaddy_t *opalcaddy;
|
||||
opal_process_name_t proc;
|
||||
opal_value_t *iptr;
|
||||
size_t n;
|
||||
@ -453,12 +453,12 @@ static pmix_status_t server_lookup_fn(const pmix_proc_t *p, char **keys,
|
||||
|
||||
/* convert the nspace/rank to an opal_process_name_t */
|
||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) {
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
proc.vpid = pmix3x_convert_rank(p->rank);
|
||||
proc.vpid = pmix2x_convert_rank(p->rank);
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t);
|
||||
opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t);
|
||||
opalcaddy->lkupcbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
@ -467,9 +467,9 @@ static pmix_status_t server_lookup_fn(const pmix_proc_t *p, char **keys,
|
||||
iptr = OBJ_NEW(opal_value_t);
|
||||
opal_list_append(&opalcaddy->info, &iptr->super);
|
||||
iptr->key = strdup(info[n].key);
|
||||
if (OPAL_SUCCESS != (rc = pmix3x_value_unload(iptr, &info[n].value))) {
|
||||
if (OPAL_SUCCESS != (rc = pmix2x_value_unload(iptr, &info[n].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
}
|
||||
|
||||
@ -479,7 +479,7 @@ static pmix_status_t server_lookup_fn(const pmix_proc_t *p, char **keys,
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
|
||||
|
||||
@ -488,7 +488,7 @@ static pmix_status_t server_unpublish_fn(const pmix_proc_t *p, char **keys,
|
||||
pmix_op_cbfunc_t cbfunc, void *cbdata)
|
||||
{
|
||||
int rc;
|
||||
pmix3x_opalcaddy_t *opalcaddy;
|
||||
pmix2x_opalcaddy_t *opalcaddy;
|
||||
opal_process_name_t proc;
|
||||
opal_value_t *iptr;
|
||||
size_t n;
|
||||
@ -499,12 +499,12 @@ static pmix_status_t server_unpublish_fn(const pmix_proc_t *p, char **keys,
|
||||
|
||||
/* convert the nspace/rank to an opal_process_name_t */
|
||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) {
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
proc.vpid = pmix3x_convert_rank(p->rank);
|
||||
proc.vpid = pmix2x_convert_rank(p->rank);
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t);
|
||||
opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t);
|
||||
opalcaddy->opcbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
@ -513,9 +513,9 @@ static pmix_status_t server_unpublish_fn(const pmix_proc_t *p, char **keys,
|
||||
iptr = OBJ_NEW(opal_value_t);
|
||||
opal_list_append(&opalcaddy->info, &iptr->super);
|
||||
iptr->key = strdup(info[n].key);
|
||||
if (OPAL_SUCCESS != (rc = pmix3x_value_unload(iptr, &info[n].value))) {
|
||||
if (OPAL_SUCCESS != (rc = pmix2x_value_unload(iptr, &info[n].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
}
|
||||
|
||||
@ -525,17 +525,17 @@ static pmix_status_t server_unpublish_fn(const pmix_proc_t *p, char **keys,
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
|
||||
static void opal_spncbfunc(int status, opal_jobid_t jobid, void *cbdata)
|
||||
{
|
||||
pmix3x_opalcaddy_t *opalcaddy = (pmix3x_opalcaddy_t*)cbdata;
|
||||
pmix2x_opalcaddy_t *opalcaddy = (pmix2x_opalcaddy_t*)cbdata;
|
||||
pmix_status_t rc;
|
||||
char nspace[PMIX_MAX_NSLEN];
|
||||
|
||||
if (NULL != opalcaddy->spwncbfunc) {
|
||||
rc = pmix3x_convert_opalrc(status);
|
||||
rc = pmix2x_convert_opalrc(status);
|
||||
/* convert the jobid */
|
||||
(void)opal_snprintf_jobid(nspace, PMIX_MAX_NSLEN, jobid);
|
||||
opalcaddy->spwncbfunc(rc, nspace, opalcaddy->cbdata);
|
||||
@ -548,7 +548,7 @@ static pmix_status_t server_spawn_fn(const pmix_proc_t *p,
|
||||
const pmix_app_t apps[], size_t napps,
|
||||
pmix_spawn_cbfunc_t cbfunc, void *cbdata)
|
||||
{
|
||||
pmix3x_opalcaddy_t *opalcaddy;
|
||||
pmix2x_opalcaddy_t *opalcaddy;
|
||||
opal_process_name_t proc;
|
||||
opal_pmix_app_t *app;
|
||||
opal_value_t *oinfo;
|
||||
@ -561,12 +561,12 @@ static pmix_status_t server_spawn_fn(const pmix_proc_t *p,
|
||||
|
||||
/* convert the nspace/rank to an opal_process_name_t */
|
||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) {
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
proc.vpid = pmix3x_convert_rank(p->rank);
|
||||
proc.vpid = pmix2x_convert_rank(p->rank);
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t);
|
||||
opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t);
|
||||
opalcaddy->spwncbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
@ -575,9 +575,9 @@ static pmix_status_t server_spawn_fn(const pmix_proc_t *p,
|
||||
oinfo = OBJ_NEW(opal_value_t);
|
||||
opal_list_append(&opalcaddy->info, &oinfo->super);
|
||||
oinfo->key = strdup(job_info[k].key);
|
||||
if (OPAL_SUCCESS != (rc = pmix3x_value_unload(oinfo, &job_info[k].value))) {
|
||||
if (OPAL_SUCCESS != (rc = pmix2x_value_unload(oinfo, &job_info[k].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
}
|
||||
|
||||
@ -600,9 +600,9 @@ static pmix_status_t server_spawn_fn(const pmix_proc_t *p,
|
||||
oinfo = OBJ_NEW(opal_value_t);
|
||||
opal_list_append(&app->info, &oinfo->super);
|
||||
oinfo->key = strdup(apps[n].info[k].key);
|
||||
if (OPAL_SUCCESS != (rc = pmix3x_value_unload(oinfo, &apps[n].info[k].value))) {
|
||||
if (OPAL_SUCCESS != (rc = pmix2x_value_unload(oinfo, &apps[n].info[k].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -614,7 +614,7 @@ static pmix_status_t server_spawn_fn(const pmix_proc_t *p,
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
|
||||
|
||||
@ -623,7 +623,7 @@ static pmix_status_t server_connect_fn(const pmix_proc_t procs[], size_t nprocs,
|
||||
pmix_op_cbfunc_t cbfunc, void *cbdata)
|
||||
{
|
||||
int rc;
|
||||
pmix3x_opalcaddy_t *opalcaddy;
|
||||
pmix2x_opalcaddy_t *opalcaddy;
|
||||
opal_namelist_t *nm;
|
||||
size_t n;
|
||||
opal_value_t *oinfo;
|
||||
@ -633,7 +633,7 @@ static pmix_status_t server_connect_fn(const pmix_proc_t procs[], size_t nprocs,
|
||||
}
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t);
|
||||
opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t);
|
||||
opalcaddy->opcbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
@ -643,9 +643,9 @@ static pmix_status_t server_connect_fn(const pmix_proc_t procs[], size_t nprocs,
|
||||
opal_list_append(&opalcaddy->procs, &nm->super);
|
||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&nm->name.jobid, procs[n].nspace))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
nm->name.vpid = pmix3x_convert_rank(procs[n].rank);
|
||||
nm->name.vpid = pmix2x_convert_rank(procs[n].rank);
|
||||
}
|
||||
|
||||
/* convert the info */
|
||||
@ -653,9 +653,9 @@ static pmix_status_t server_connect_fn(const pmix_proc_t procs[], size_t nprocs,
|
||||
oinfo = OBJ_NEW(opal_value_t);
|
||||
opal_list_append(&opalcaddy->info, &oinfo->super);
|
||||
oinfo->key = strdup(info[n].key);
|
||||
if (OPAL_SUCCESS != (rc = pmix3x_value_unload(oinfo, &info[n].value))) {
|
||||
if (OPAL_SUCCESS != (rc = pmix2x_value_unload(oinfo, &info[n].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
}
|
||||
|
||||
@ -665,7 +665,7 @@ static pmix_status_t server_connect_fn(const pmix_proc_t procs[], size_t nprocs,
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
|
||||
|
||||
@ -674,7 +674,7 @@ static pmix_status_t server_disconnect_fn(const pmix_proc_t procs[], size_t npro
|
||||
pmix_op_cbfunc_t cbfunc, void *cbdata)
|
||||
{
|
||||
int rc;
|
||||
pmix3x_opalcaddy_t *opalcaddy;
|
||||
pmix2x_opalcaddy_t *opalcaddy;
|
||||
opal_namelist_t *nm;
|
||||
size_t n;
|
||||
opal_value_t *oinfo;
|
||||
@ -684,7 +684,7 @@ static pmix_status_t server_disconnect_fn(const pmix_proc_t procs[], size_t npro
|
||||
}
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t);
|
||||
opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t);
|
||||
opalcaddy->opcbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
@ -694,9 +694,9 @@ static pmix_status_t server_disconnect_fn(const pmix_proc_t procs[], size_t npro
|
||||
opal_list_append(&opalcaddy->procs, &nm->super);
|
||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&nm->name.jobid, procs[n].nspace))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
nm->name.vpid = pmix3x_convert_rank(procs[n].rank);
|
||||
nm->name.vpid = pmix2x_convert_rank(procs[n].rank);
|
||||
}
|
||||
|
||||
/* convert the info */
|
||||
@ -704,9 +704,9 @@ static pmix_status_t server_disconnect_fn(const pmix_proc_t procs[], size_t npro
|
||||
oinfo = OBJ_NEW(opal_value_t);
|
||||
opal_list_append(&opalcaddy->info, &oinfo->super);
|
||||
oinfo->key = strdup(info[n].key);
|
||||
if (OPAL_SUCCESS != (rc = pmix3x_value_unload(oinfo, &info[n].value))) {
|
||||
if (OPAL_SUCCESS != (rc = pmix2x_value_unload(oinfo, &info[n].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
}
|
||||
|
||||
@ -716,20 +716,20 @@ static pmix_status_t server_disconnect_fn(const pmix_proc_t procs[], size_t npro
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
|
||||
static pmix_status_t server_register_events(pmix_status_t *codes, size_t ncodes,
|
||||
const pmix_info_t info[], size_t ninfo,
|
||||
pmix_op_cbfunc_t cbfunc, void *cbdata)
|
||||
{
|
||||
pmix3x_opalcaddy_t *opalcaddy;
|
||||
pmix2x_opalcaddy_t *opalcaddy;
|
||||
size_t n;
|
||||
opal_value_t *oinfo;
|
||||
int rc;
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t);
|
||||
opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t);
|
||||
opalcaddy->opcbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
@ -738,9 +738,9 @@ static pmix_status_t server_register_events(pmix_status_t *codes, size_t ncodes,
|
||||
oinfo = OBJ_NEW(opal_value_t);
|
||||
opal_list_append(&opalcaddy->info, &oinfo->super);
|
||||
oinfo->key = strdup(info[n].key);
|
||||
if (OPAL_SUCCESS != (rc = pmix3x_value_unload(oinfo, &info[n].value))) {
|
||||
if (OPAL_SUCCESS != (rc = pmix2x_value_unload(oinfo, &info[n].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
}
|
||||
|
||||
@ -750,7 +750,7 @@ static pmix_status_t server_register_events(pmix_status_t *codes, size_t ncodes,
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
|
||||
static pmix_status_t server_deregister_events(pmix_status_t *codes, size_t ncodes,
|
||||
@ -765,7 +765,7 @@ static pmix_status_t server_notify_event(pmix_status_t code,
|
||||
pmix_info_t info[], size_t ninfo,
|
||||
pmix_op_cbfunc_t cbfunc, void *cbdata)
|
||||
{
|
||||
pmix3x_opalcaddy_t *opalcaddy;
|
||||
pmix2x_opalcaddy_t *opalcaddy;
|
||||
opal_process_name_t src;
|
||||
size_t n;
|
||||
opal_value_t *oinfo;
|
||||
@ -776,20 +776,20 @@ static pmix_status_t server_notify_event(pmix_status_t code,
|
||||
}
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t);
|
||||
opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t);
|
||||
opalcaddy->opcbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
/* convert the code */
|
||||
status = pmix3x_convert_rc(code);
|
||||
status = pmix2x_convert_rc(code);
|
||||
|
||||
/* convert the source */
|
||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&src.jobid, source->nspace))) {
|
||||
opal_output(0, "FILE: %s LINE %d", __FILE__, __LINE__);
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
src.vpid = pmix3x_convert_rank(source->rank);
|
||||
src.vpid = pmix2x_convert_rank(source->rank);
|
||||
|
||||
/* ignore the range for now */
|
||||
|
||||
@ -798,9 +798,9 @@ static pmix_status_t server_notify_event(pmix_status_t code,
|
||||
oinfo = OBJ_NEW(opal_value_t);
|
||||
opal_list_append(&opalcaddy->info, &oinfo->super);
|
||||
oinfo->key = strdup(info[n].key);
|
||||
if (OPAL_SUCCESS != (rc = pmix3x_value_unload(oinfo, &info[n].value))) {
|
||||
if (OPAL_SUCCESS != (rc = pmix2x_value_unload(oinfo, &info[n].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
}
|
||||
|
||||
@ -809,12 +809,12 @@ static pmix_status_t server_notify_event(pmix_status_t code,
|
||||
opal_opcbfunc, opalcaddy))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
|
||||
static void _info_rel(void *cbdata)
|
||||
{
|
||||
pmix3x_opcaddy_t *pcaddy = (pmix3x_opcaddy_t*)cbdata;
|
||||
pmix2x_opcaddy_t *pcaddy = (pmix2x_opcaddy_t*)cbdata;
|
||||
|
||||
OBJ_RELEASE(pcaddy);
|
||||
}
|
||||
@ -824,15 +824,15 @@ static void info_cbfunc(int status,
|
||||
opal_pmix_release_cbfunc_t release_fn,
|
||||
void *release_cbdata)
|
||||
{
|
||||
pmix3x_opalcaddy_t *opalcaddy = (pmix3x_opalcaddy_t*)cbdata;
|
||||
pmix3x_opcaddy_t *pcaddy;
|
||||
pmix2x_opalcaddy_t *opalcaddy = (pmix2x_opalcaddy_t*)cbdata;
|
||||
pmix2x_opcaddy_t *pcaddy;
|
||||
opal_value_t *kv;
|
||||
size_t n;
|
||||
|
||||
pcaddy = OBJ_NEW(pmix3x_opcaddy_t);
|
||||
pcaddy = OBJ_NEW(pmix2x_opcaddy_t);
|
||||
|
||||
/* convert the status */
|
||||
pcaddy->status = pmix3x_convert_opalrc(status);
|
||||
pcaddy->status = pmix2x_convert_opalrc(status);
|
||||
|
||||
/* convert the list to a pmix_info_t array */
|
||||
if (NULL != info) {
|
||||
@ -842,7 +842,7 @@ static void info_cbfunc(int status,
|
||||
n = 0;
|
||||
OPAL_LIST_FOREACH(kv, info, opal_value_t) {
|
||||
(void)strncpy(pcaddy->info[n].key, kv->key, PMIX_MAX_KEYLEN);
|
||||
pmix3x_value_load(&pcaddy->info[n].value, kv);
|
||||
pmix2x_value_load(&pcaddy->info[n].value, kv);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -864,7 +864,7 @@ static pmix_status_t server_query(pmix_proc_t *proct,
|
||||
pmix_info_cbfunc_t cbfunc,
|
||||
void *cbdata)
|
||||
{
|
||||
pmix3x_opalcaddy_t *opalcaddy;
|
||||
pmix2x_opalcaddy_t *opalcaddy;
|
||||
opal_process_name_t requestor;
|
||||
int rc;
|
||||
size_t n, m;
|
||||
@ -876,7 +876,7 @@ static pmix_status_t server_query(pmix_proc_t *proct,
|
||||
}
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t);
|
||||
opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t);
|
||||
opalcaddy->infocbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
@ -884,9 +884,9 @@ static pmix_status_t server_query(pmix_proc_t *proct,
|
||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&requestor.jobid, proct->nspace))) {
|
||||
opal_output(0, "FILE: %s LINE %d", __FILE__, __LINE__);
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
requestor.vpid = pmix3x_convert_rank(proct->rank);
|
||||
requestor.vpid = pmix2x_convert_rank(proct->rank);
|
||||
|
||||
/* convert the queries */
|
||||
for (n=0; n < nqueries; n++) {
|
||||
@ -899,9 +899,9 @@ static pmix_status_t server_query(pmix_proc_t *proct,
|
||||
oinfo = OBJ_NEW(opal_value_t);
|
||||
opal_list_append(&q->qualifiers, &oinfo->super);
|
||||
oinfo->key = strdup(queries[n].qualifiers[m].key);
|
||||
if (OPAL_SUCCESS != (rc = pmix3x_value_unload(oinfo, &queries[n].qualifiers[m].value))) {
|
||||
if (OPAL_SUCCESS != (rc = pmix2x_value_unload(oinfo, &queries[n].qualifiers[m].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -913,23 +913,23 @@ static pmix_status_t server_query(pmix_proc_t *proct,
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
|
||||
return pmix3x_convert_opalrc(rc);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
}
|
||||
|
||||
static void toolcbfunc(int status,
|
||||
opal_process_name_t proc,
|
||||
void *cbdata)
|
||||
{
|
||||
pmix3x_opalcaddy_t *opalcaddy = (pmix3x_opalcaddy_t*)cbdata;
|
||||
pmix2x_opalcaddy_t *opalcaddy = (pmix2x_opalcaddy_t*)cbdata;
|
||||
pmix_status_t rc;
|
||||
pmix_proc_t p;
|
||||
|
||||
/* convert the status */
|
||||
rc = pmix3x_convert_opalrc(status);
|
||||
rc = pmix2x_convert_opalrc(status);
|
||||
|
||||
/* convert the process name */
|
||||
(void)opal_snprintf_jobid(p.nspace, PMIX_MAX_NSLEN, proc.jobid);
|
||||
p.rank = pmix3x_convert_opalrank(proc.vpid);
|
||||
p.rank = pmix2x_convert_opalrank(proc.vpid);
|
||||
|
||||
/* pass it down */
|
||||
if (NULL != opalcaddy->toolcbfunc) {
|
||||
@ -942,14 +942,14 @@ static void server_tool_connection(pmix_info_t *info, size_t ninfo,
|
||||
pmix_tool_connection_cbfunc_t cbfunc,
|
||||
void *cbdata)
|
||||
{
|
||||
pmix3x_opalcaddy_t *opalcaddy;
|
||||
pmix2x_opalcaddy_t *opalcaddy;
|
||||
size_t n;
|
||||
opal_value_t *oinfo;
|
||||
int rc;
|
||||
pmix_status_t err;
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t);
|
||||
opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t);
|
||||
opalcaddy->toolcbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
@ -958,9 +958,9 @@ static void server_tool_connection(pmix_info_t *info, size_t ninfo,
|
||||
oinfo = OBJ_NEW(opal_value_t);
|
||||
opal_list_append(&opalcaddy->info, &oinfo->super);
|
||||
oinfo->key = strdup(info[n].key);
|
||||
if (OPAL_SUCCESS != (rc = pmix3x_value_unload(oinfo, &info[n].value))) {
|
||||
if (OPAL_SUCCESS != (rc = pmix2x_value_unload(oinfo, &info[n].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
err = pmix3x_convert_opalrc(rc);
|
||||
err = pmix2x_convert_opalrc(rc);
|
||||
if (NULL != cbfunc) {
|
||||
cbfunc(err, NULL, cbdata);
|
||||
}
|
||||
@ -976,7 +976,7 @@ static void server_log(const pmix_proc_t *proct,
|
||||
const pmix_info_t directives[], size_t ndirs,
|
||||
pmix_op_cbfunc_t cbfunc, void *cbdata)
|
||||
{
|
||||
pmix3x_opalcaddy_t *opalcaddy;
|
||||
pmix2x_opalcaddy_t *opalcaddy;
|
||||
opal_process_name_t requestor;
|
||||
int rc;
|
||||
size_t n;
|
||||
@ -991,7 +991,7 @@ static void server_log(const pmix_proc_t *proct,
|
||||
}
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(pmix3x_opalcaddy_t);
|
||||
opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t);
|
||||
opalcaddy->opcbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
@ -999,13 +999,13 @@ static void server_log(const pmix_proc_t *proct,
|
||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&requestor.jobid, proct->nspace))) {
|
||||
opal_output(0, "FILE: %s LINE %d", __FILE__, __LINE__);
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
ret = pmix3x_convert_opalrc(rc);
|
||||
ret = pmix2x_convert_opalrc(rc);
|
||||
if (NULL != cbfunc) {
|
||||
cbfunc(ret, cbdata);
|
||||
}
|
||||
return;
|
||||
}
|
||||
requestor.vpid = pmix3x_convert_rank(proct->rank);
|
||||
requestor.vpid = pmix2x_convert_rank(proct->rank);
|
||||
|
||||
/* convert the data */
|
||||
for (n=0; n < ndata; n++) {
|
||||
@ -1013,9 +1013,9 @@ static void server_log(const pmix_proc_t *proct,
|
||||
/* we "borrow" the info field of the caddy as we and the
|
||||
* server function both agree on what will be there */
|
||||
opal_list_append(&opalcaddy->info, &oinfo->super);
|
||||
if (OPAL_SUCCESS != (rc = pmix3x_value_unload(oinfo, &data[n].value))) {
|
||||
if (OPAL_SUCCESS != (rc = pmix2x_value_unload(oinfo, &data[n].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
ret = pmix3x_convert_opalrc(rc);
|
||||
ret = pmix2x_convert_opalrc(rc);
|
||||
if (NULL != cbfunc) {
|
||||
cbfunc(ret, cbdata);
|
||||
}
|
||||
@ -1029,9 +1029,9 @@ static void server_log(const pmix_proc_t *proct,
|
||||
/* we "borrow" the apps field of the caddy as we and the
|
||||
* server function both agree on what will be there */
|
||||
opal_list_append(&opalcaddy->apps, &oinfo->super);
|
||||
if (OPAL_SUCCESS != (rc = pmix3x_value_unload(oinfo, &directives[n].value))) {
|
||||
if (OPAL_SUCCESS != (rc = pmix2x_value_unload(oinfo, &directives[n].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
ret = pmix3x_convert_opalrc(rc);
|
||||
ret = pmix2x_convert_opalrc(rc);
|
||||
if (NULL != cbfunc) {
|
||||
cbfunc(ret, cbdata);
|
||||
}
|
@ -36,7 +36,7 @@
|
||||
#include "opal/util/proc.h"
|
||||
#include "opal/util/show_help.h"
|
||||
#include "opal/mca/pmix/base/base.h"
|
||||
#include "pmix3x.h"
|
||||
#include "pmix2x.h"
|
||||
|
||||
#include "pmix.h"
|
||||
#include "pmix_server.h"
|
||||
@ -71,7 +71,7 @@ static void errreg_cbfunc (pmix_status_t status,
|
||||
*active = false;
|
||||
}
|
||||
|
||||
int pmix3x_server_init(opal_pmix_server_module_t *module,
|
||||
int pmix2x_server_init(opal_pmix_server_module_t *module,
|
||||
opal_list_t *info)
|
||||
{
|
||||
pmix_status_t rc;
|
||||
@ -80,7 +80,7 @@ int pmix3x_server_init(opal_pmix_server_module_t *module,
|
||||
pmix_info_t *pinfo;
|
||||
size_t sz, n;
|
||||
volatile bool active;
|
||||
opal_pmix3x_jobid_trkr_t *job;
|
||||
opal_pmix2x_jobid_trkr_t *job;
|
||||
|
||||
if (0 < (dbg = opal_output_get_verbosity(opal_pmix_base_framework.framework_output))) {
|
||||
asprintf(&dbgvalue, "PMIX_DEBUG=%d", dbg);
|
||||
@ -94,7 +94,7 @@ int pmix3x_server_init(opal_pmix_server_module_t *module,
|
||||
n = 0;
|
||||
OPAL_LIST_FOREACH(kv, info, opal_value_t) {
|
||||
(void)strncpy(pinfo[n].key, kv->key, PMIX_MAX_KEYLEN);
|
||||
pmix3x_value_load(&pinfo[n].value, kv);
|
||||
pmix2x_value_load(&pinfo[n].value, kv);
|
||||
++n;
|
||||
}
|
||||
} else {
|
||||
@ -104,14 +104,14 @@ int pmix3x_server_init(opal_pmix_server_module_t *module,
|
||||
|
||||
/* insert ourselves into our list of jobids - it will be the
|
||||
* first, and so we'll check it first */
|
||||
job = OBJ_NEW(opal_pmix3x_jobid_trkr_t);
|
||||
job = OBJ_NEW(opal_pmix2x_jobid_trkr_t);
|
||||
(void)opal_snprintf_jobid(job->nspace, PMIX_MAX_NSLEN, OPAL_PROC_MY_NAME.jobid);
|
||||
job->jobid = OPAL_PROC_MY_NAME.jobid;
|
||||
opal_list_append(&mca_pmix_ext3x_component.jobids, &job->super);
|
||||
opal_list_append(&mca_pmix_ext2x_component.jobids, &job->super);
|
||||
|
||||
if (PMIX_SUCCESS != (rc = PMIx_server_init(&mymodule, pinfo, sz))) {
|
||||
PMIX_INFO_FREE(pinfo, sz);
|
||||
return pmix3x_convert_rc(rc);
|
||||
return pmix2x_convert_rc(rc);
|
||||
}
|
||||
PMIX_INFO_FREE(pinfo, sz);
|
||||
|
||||
@ -120,7 +120,7 @@ int pmix3x_server_init(opal_pmix_server_module_t *module,
|
||||
|
||||
/* register the default event handler */
|
||||
active = true;
|
||||
PMIx_Register_event_handler(NULL, 0, NULL, 0, pmix3x_event_hdlr, errreg_cbfunc, (void*)&active);
|
||||
PMIx_Register_event_handler(NULL, 0, NULL, 0, pmix2x_event_hdlr, errreg_cbfunc, (void*)&active);
|
||||
PMIX_WAIT_FOR_COMPLETION(active);
|
||||
|
||||
return OPAL_SUCCESS;
|
||||
@ -132,7 +132,7 @@ static void fincb(pmix_status_t status, void *cbdata)
|
||||
*active = false;
|
||||
}
|
||||
|
||||
int pmix3x_server_finalize(void)
|
||||
int pmix2x_server_finalize(void)
|
||||
{
|
||||
pmix_status_t rc;
|
||||
volatile bool active;
|
||||
@ -143,32 +143,32 @@ int pmix3x_server_finalize(void)
|
||||
PMIX_WAIT_FOR_COMPLETION(active);
|
||||
|
||||
rc = PMIx_server_finalize();
|
||||
return pmix3x_convert_rc(rc);
|
||||
return pmix2x_convert_rc(rc);
|
||||
}
|
||||
|
||||
int pmix3x_server_gen_regex(const char *input, char **regex)
|
||||
int pmix2x_server_gen_regex(const char *input, char **regex)
|
||||
{
|
||||
pmix_status_t rc;
|
||||
|
||||
rc = PMIx_generate_regex(input, regex);
|
||||
return pmix3x_convert_rc(rc);
|
||||
return pmix2x_convert_rc(rc);
|
||||
}
|
||||
|
||||
|
||||
int pmix3x_server_gen_ppn(const char *input, char **ppn)
|
||||
int pmix2x_server_gen_ppn(const char *input, char **ppn)
|
||||
{
|
||||
pmix_status_t rc;
|
||||
|
||||
rc = PMIx_generate_ppn(input, ppn);
|
||||
return pmix3x_convert_rc(rc);
|
||||
return pmix2x_convert_rc(rc);
|
||||
}
|
||||
|
||||
static void opcbfunc(pmix_status_t status, void *cbdata)
|
||||
{
|
||||
pmix3x_opcaddy_t *op = (pmix3x_opcaddy_t*)cbdata;
|
||||
pmix2x_opcaddy_t *op = (pmix2x_opcaddy_t*)cbdata;
|
||||
|
||||
if (NULL != op->opcbfunc) {
|
||||
op->opcbfunc(pmix3x_convert_rc(status), op->cbdata);
|
||||
op->opcbfunc(pmix2x_convert_rc(status), op->cbdata);
|
||||
}
|
||||
if (op->active) {
|
||||
op->status = status;
|
||||
@ -180,15 +180,15 @@ static void opcbfunc(pmix_status_t status, void *cbdata)
|
||||
|
||||
static void _reg_nspace(int sd, short args, void *cbdata)
|
||||
{
|
||||
pmix3x_threadshift_t *cd = (pmix3x_threadshift_t*)cbdata;
|
||||
pmix2x_threadshift_t *cd = (pmix2x_threadshift_t*)cbdata;
|
||||
opal_value_t *kv, *k2;
|
||||
pmix_info_t *pinfo = NULL, *pmap;
|
||||
size_t sz, szmap, m, n;
|
||||
char nspace[PMIX_MAX_NSLEN];
|
||||
pmix_status_t rc;
|
||||
opal_list_t *pmapinfo;
|
||||
opal_pmix3x_jobid_trkr_t *job;
|
||||
pmix3x_opcaddy_t op;
|
||||
opal_pmix2x_jobid_trkr_t *job;
|
||||
pmix2x_opcaddy_t op;
|
||||
|
||||
/* we must threadshift this request as we might not be in an event
|
||||
* and we are going to access framework-global lists/objects */
|
||||
@ -197,10 +197,10 @@ static void _reg_nspace(int sd, short args, void *cbdata)
|
||||
(void)opal_snprintf_jobid(nspace, PMIX_MAX_NSLEN, cd->jobid);
|
||||
|
||||
/* store this job in our list of known nspaces */
|
||||
job = OBJ_NEW(opal_pmix3x_jobid_trkr_t);
|
||||
job = OBJ_NEW(opal_pmix2x_jobid_trkr_t);
|
||||
(void)strncpy(job->nspace, nspace, PMIX_MAX_NSLEN);
|
||||
job->jobid = cd->jobid;
|
||||
opal_list_append(&mca_pmix_ext3x_component.jobids, &job->super);
|
||||
opal_list_append(&mca_pmix_ext2x_component.jobids, &job->super);
|
||||
|
||||
/* convert the list to an array of pmix_info_t */
|
||||
if (NULL != cd->info) {
|
||||
@ -223,11 +223,11 @@ static void _reg_nspace(int sd, short args, void *cbdata)
|
||||
m = 0;
|
||||
OPAL_LIST_FOREACH(k2, pmapinfo, opal_value_t) {
|
||||
(void)strncpy(pmap[m].key, k2->key, PMIX_MAX_KEYLEN);
|
||||
pmix3x_value_load(&pmap[m].value, k2);
|
||||
pmix2x_value_load(&pmap[m].value, k2);
|
||||
++m;
|
||||
}
|
||||
} else {
|
||||
pmix3x_value_load(&pinfo[n].value, kv);
|
||||
pmix2x_value_load(&pinfo[n].value, kv);
|
||||
}
|
||||
++n;
|
||||
}
|
||||
@ -236,7 +236,7 @@ static void _reg_nspace(int sd, short args, void *cbdata)
|
||||
pinfo = NULL;
|
||||
}
|
||||
|
||||
OBJ_CONSTRUCT(&op, pmix3x_opcaddy_t);
|
||||
OBJ_CONSTRUCT(&op, pmix2x_opcaddy_t);
|
||||
op.active = true;
|
||||
rc = PMIx_server_register_nspace(nspace, cd->status, pinfo, sz,
|
||||
opcbfunc, (void*)&op);
|
||||
@ -247,7 +247,7 @@ static void _reg_nspace(int sd, short args, void *cbdata)
|
||||
}
|
||||
/* ensure we execute the cbfunc so the caller doesn't hang */
|
||||
if (NULL != cd->opcbfunc) {
|
||||
cd->opcbfunc(pmix3x_convert_rc(op.status), cd->cbdata);
|
||||
cd->opcbfunc(pmix2x_convert_rc(op.status), cd->cbdata);
|
||||
}
|
||||
if (NULL != pinfo) {
|
||||
PMIX_INFO_FREE(pinfo, sz);
|
||||
@ -256,17 +256,17 @@ static void _reg_nspace(int sd, short args, void *cbdata)
|
||||
OBJ_RELEASE(cd);
|
||||
}
|
||||
|
||||
int pmix3x_server_register_nspace(opal_jobid_t jobid,
|
||||
int pmix2x_server_register_nspace(opal_jobid_t jobid,
|
||||
int nlocalprocs,
|
||||
opal_list_t *info,
|
||||
opal_pmix_op_cbfunc_t cbfunc,
|
||||
void *cbdata)
|
||||
{
|
||||
pmix3x_threadshift_t *cd;
|
||||
pmix2x_threadshift_t *cd;
|
||||
|
||||
/* we must threadshift this request as it touches
|
||||
* shared lists of objects */
|
||||
cd = OBJ_NEW(pmix3x_threadshift_t);
|
||||
cd = OBJ_NEW(pmix2x_threadshift_t);
|
||||
cd->jobid = jobid;
|
||||
cd->status = nlocalprocs;
|
||||
cd->info = info;
|
||||
@ -287,10 +287,10 @@ int pmix3x_server_register_nspace(opal_jobid_t jobid,
|
||||
|
||||
static void tdcbfunc(pmix_status_t status, void *cbdata)
|
||||
{
|
||||
pmix3x_threadshift_t *cd = (pmix3x_threadshift_t*)cbdata;
|
||||
pmix2x_threadshift_t *cd = (pmix2x_threadshift_t*)cbdata;
|
||||
|
||||
if (NULL != cd->opcbfunc) {
|
||||
cd->opcbfunc(pmix3x_convert_rc(status), cd->cbdata);
|
||||
cd->opcbfunc(pmix2x_convert_rc(status), cd->cbdata);
|
||||
}
|
||||
if (cd->active) {
|
||||
cd->active = false;
|
||||
@ -301,11 +301,11 @@ static void tdcbfunc(pmix_status_t status, void *cbdata)
|
||||
|
||||
static void _dereg_nspace(int sd, short args, void *cbdata)
|
||||
{
|
||||
pmix3x_threadshift_t *cd = (pmix3x_threadshift_t*)cbdata;
|
||||
opal_pmix3x_jobid_trkr_t *jptr;
|
||||
pmix2x_threadshift_t *cd = (pmix2x_threadshift_t*)cbdata;
|
||||
opal_pmix2x_jobid_trkr_t *jptr;
|
||||
|
||||
/* if we don't already have it, we can ignore this */
|
||||
OPAL_LIST_FOREACH(jptr, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
|
||||
OPAL_LIST_FOREACH(jptr, &mca_pmix_ext2x_component.jobids, opal_pmix2x_jobid_trkr_t) {
|
||||
if (jptr->jobid == cd->jobid) {
|
||||
/* found it - tell the server to deregister */
|
||||
cd->active = true;
|
||||
@ -313,7 +313,7 @@ static void _dereg_nspace(int sd, short args, void *cbdata)
|
||||
PMIX_WAIT_FOR_COMPLETION(cd->active);
|
||||
OBJ_RELEASE(cd);
|
||||
/* now get rid of it from our list */
|
||||
opal_list_remove_item(&mca_pmix_ext3x_component.jobids, &jptr->super);
|
||||
opal_list_remove_item(&mca_pmix_ext2x_component.jobids, &jptr->super);
|
||||
OBJ_RELEASE(jptr);
|
||||
return;
|
||||
}
|
||||
@ -322,15 +322,15 @@ static void _dereg_nspace(int sd, short args, void *cbdata)
|
||||
tdcbfunc(PMIX_ERR_NOT_FOUND, cd);
|
||||
}
|
||||
|
||||
void pmix3x_server_deregister_nspace(opal_jobid_t jobid,
|
||||
void pmix2x_server_deregister_nspace(opal_jobid_t jobid,
|
||||
opal_pmix_op_cbfunc_t cbfunc,
|
||||
void *cbdata)
|
||||
{
|
||||
pmix3x_threadshift_t *cd;
|
||||
pmix2x_threadshift_t *cd;
|
||||
|
||||
/* we must threadshift this request as it touches
|
||||
* shared lists of objects */
|
||||
cd = OBJ_NEW(pmix3x_threadshift_t);
|
||||
cd = OBJ_NEW(pmix2x_threadshift_t);
|
||||
cd->jobid = jobid;
|
||||
cd->opcbfunc = cbfunc;
|
||||
cd->cbdata = cbdata;
|
||||
@ -343,7 +343,7 @@ void pmix3x_server_deregister_nspace(opal_jobid_t jobid,
|
||||
}
|
||||
}
|
||||
|
||||
int pmix3x_server_register_client(const opal_process_name_t *proc,
|
||||
int pmix2x_server_register_client(const opal_process_name_t *proc,
|
||||
uid_t uid, gid_t gid,
|
||||
void *server_object,
|
||||
opal_pmix_op_cbfunc_t cbfunc,
|
||||
@ -351,13 +351,13 @@ int pmix3x_server_register_client(const opal_process_name_t *proc,
|
||||
{
|
||||
pmix_status_t rc;
|
||||
pmix_proc_t p;
|
||||
pmix3x_opcaddy_t op;
|
||||
pmix2x_opcaddy_t op;
|
||||
|
||||
/* convert the jobid */
|
||||
(void)opal_snprintf_jobid(p.nspace, PMIX_MAX_NSLEN, proc->jobid);
|
||||
p.rank = pmix3x_convert_opalrank(proc->vpid);
|
||||
p.rank = pmix2x_convert_opalrank(proc->vpid);
|
||||
|
||||
OBJ_CONSTRUCT(&op, pmix3x_opcaddy_t);
|
||||
OBJ_CONSTRUCT(&op, pmix2x_opcaddy_t);
|
||||
op.active = true;
|
||||
rc = PMIx_server_register_client(&p, uid, gid, server_object,
|
||||
opcbfunc, (void*)&op);
|
||||
@ -366,21 +366,21 @@ int pmix3x_server_register_client(const opal_process_name_t *proc,
|
||||
rc = op.status;
|
||||
}
|
||||
OBJ_DESTRUCT(&op);
|
||||
return pmix3x_convert_rc(rc);
|
||||
return pmix2x_convert_rc(rc);
|
||||
}
|
||||
|
||||
static void _dereg_client(int sd, short args, void *cbdata)
|
||||
{
|
||||
pmix3x_threadshift_t *cd = (pmix3x_threadshift_t*)cbdata;
|
||||
opal_pmix3x_jobid_trkr_t *jptr;
|
||||
pmix2x_threadshift_t *cd = (pmix2x_threadshift_t*)cbdata;
|
||||
opal_pmix2x_jobid_trkr_t *jptr;
|
||||
pmix_proc_t p;
|
||||
|
||||
/* if we don't already have it, we can ignore this */
|
||||
OPAL_LIST_FOREACH(jptr, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
|
||||
OPAL_LIST_FOREACH(jptr, &mca_pmix_ext2x_component.jobids, opal_pmix2x_jobid_trkr_t) {
|
||||
if (jptr->jobid == cd->source->jobid) {
|
||||
/* found it - tell the server to deregister */
|
||||
(void)strncpy(p.nspace, jptr->nspace, PMIX_MAX_NSLEN);
|
||||
p.rank = pmix3x_convert_opalrank(cd->source->vpid);
|
||||
p.rank = pmix2x_convert_opalrank(cd->source->vpid);
|
||||
cd->active = true;
|
||||
PMIx_server_deregister_client(&p, tdcbfunc, (void*)cd);
|
||||
PMIX_WAIT_FOR_COMPLETION(cd->active);
|
||||
@ -392,15 +392,15 @@ static void _dereg_client(int sd, short args, void *cbdata)
|
||||
|
||||
/* tell the local PMIx server to cleanup this client as it is
|
||||
* done executing */
|
||||
void pmix3x_server_deregister_client(const opal_process_name_t *proc,
|
||||
void pmix2x_server_deregister_client(const opal_process_name_t *proc,
|
||||
opal_pmix_op_cbfunc_t cbfunc,
|
||||
void *cbdata)
|
||||
{
|
||||
pmix3x_threadshift_t *cd;
|
||||
pmix2x_threadshift_t *cd;
|
||||
|
||||
/* we must threadshift this request as we might not be in an event
|
||||
* and we are going to access framework-global lists/objects */
|
||||
cd = OBJ_NEW(pmix3x_threadshift_t);
|
||||
cd = OBJ_NEW(pmix2x_threadshift_t);
|
||||
cd->source = proc;
|
||||
cd->opcbfunc = cbfunc;
|
||||
cd->cbdata = cbdata;
|
||||
@ -414,17 +414,17 @@ void pmix3x_server_deregister_client(const opal_process_name_t *proc,
|
||||
}
|
||||
|
||||
/* have the local PMIx server setup the environment for this client */
|
||||
int pmix3x_server_setup_fork(const opal_process_name_t *proc, char ***env)
|
||||
int pmix2x_server_setup_fork(const opal_process_name_t *proc, char ***env)
|
||||
{
|
||||
pmix_status_t rc;
|
||||
pmix_proc_t p;
|
||||
|
||||
/* convert the jobid */
|
||||
(void)opal_snprintf_jobid(p.nspace, PMIX_MAX_NSLEN, proc->jobid);
|
||||
p.rank = pmix3x_convert_opalrank(proc->vpid);
|
||||
p.rank = pmix2x_convert_opalrank(proc->vpid);
|
||||
|
||||
rc = PMIx_server_setup_fork(&p, env);
|
||||
return pmix3x_convert_rc(rc);
|
||||
return pmix2x_convert_rc(rc);
|
||||
}
|
||||
|
||||
/* this is the call back up from the embedded PMIx server that
|
||||
@ -433,9 +433,9 @@ int pmix3x_server_setup_fork(const opal_process_name_t *proc, char ***env)
|
||||
static void dmdx_response(pmix_status_t status, char *data, size_t sz, void *cbdata)
|
||||
{
|
||||
int rc;
|
||||
pmix3x_opcaddy_t *op = (pmix3x_opcaddy_t*)cbdata;
|
||||
pmix2x_opcaddy_t *op = (pmix2x_opcaddy_t*)cbdata;
|
||||
|
||||
rc = pmix3x_convert_rc(status);
|
||||
rc = pmix2x_convert_rc(status);
|
||||
if (NULL != op->mdxcbfunc) {
|
||||
op->mdxcbfunc(rc, data, sz, op->cbdata, NULL, NULL);
|
||||
}
|
||||
@ -443,31 +443,31 @@ static void dmdx_response(pmix_status_t status, char *data, size_t sz, void *cbd
|
||||
}
|
||||
|
||||
/* request modex data for a local proc from the PMIx server */
|
||||
int pmix3x_server_dmodex(const opal_process_name_t *proc,
|
||||
int pmix2x_server_dmodex(const opal_process_name_t *proc,
|
||||
opal_pmix_modex_cbfunc_t cbfunc, void *cbdata)
|
||||
{
|
||||
pmix3x_opcaddy_t *op;
|
||||
pmix2x_opcaddy_t *op;
|
||||
pmix_status_t rc;
|
||||
|
||||
/* setup the caddy */
|
||||
op = OBJ_NEW(pmix3x_opcaddy_t);
|
||||
op = OBJ_NEW(pmix2x_opcaddy_t);
|
||||
op->mdxcbfunc = cbfunc;
|
||||
op->cbdata = cbdata;
|
||||
|
||||
/* convert the jobid */
|
||||
(void)opal_snprintf_jobid(op->p.nspace, PMIX_MAX_NSLEN, proc->jobid);
|
||||
op->p.rank = pmix3x_convert_opalrank(proc->vpid);
|
||||
op->p.rank = pmix2x_convert_opalrank(proc->vpid);
|
||||
|
||||
/* find the internally-cached data for this proc */
|
||||
rc = PMIx_server_dmodex_request(&op->p, dmdx_response, op);
|
||||
if (PMIX_SUCCESS != rc) {
|
||||
OBJ_RELEASE(op);
|
||||
}
|
||||
return pmix3x_convert_rc(rc);
|
||||
return pmix2x_convert_rc(rc);
|
||||
}
|
||||
|
||||
/* tell the PMIx server to notify its local clients of an event */
|
||||
int pmix3x_server_notify_event(int status,
|
||||
int pmix2x_server_notify_event(int status,
|
||||
const opal_process_name_t *source,
|
||||
opal_list_t *info,
|
||||
opal_pmix_op_cbfunc_t cbfunc, void *cbdata)
|
||||
@ -476,7 +476,7 @@ int pmix3x_server_notify_event(int status,
|
||||
pmix_info_t *pinfo;
|
||||
size_t sz, n;
|
||||
pmix_status_t rc;
|
||||
pmix3x_opcaddy_t *op;
|
||||
pmix2x_opcaddy_t *op;
|
||||
|
||||
/* convert the list to an array of pmix_info_t */
|
||||
if (NULL != info) {
|
||||
@ -485,14 +485,14 @@ int pmix3x_server_notify_event(int status,
|
||||
n = 0;
|
||||
OPAL_LIST_FOREACH(kv, info, opal_value_t) {
|
||||
(void)strncpy(pinfo[n].key, kv->key, PMIX_MAX_KEYLEN);
|
||||
pmix3x_value_load(&pinfo[n].value, kv);
|
||||
pmix2x_value_load(&pinfo[n].value, kv);
|
||||
}
|
||||
} else {
|
||||
sz = 0;
|
||||
pinfo = NULL;
|
||||
}
|
||||
/* setup the caddy */
|
||||
op = OBJ_NEW(pmix3x_opcaddy_t);
|
||||
op = OBJ_NEW(pmix2x_opcaddy_t);
|
||||
op->info = pinfo;
|
||||
op->sz = sz;
|
||||
op->opcbfunc = cbfunc;
|
||||
@ -500,14 +500,14 @@ int pmix3x_server_notify_event(int status,
|
||||
/* convert the jobid */
|
||||
if (NULL == source) {
|
||||
(void)opal_snprintf_jobid(op->p.nspace, PMIX_MAX_NSLEN, OPAL_JOBID_INVALID);
|
||||
op->p.rank = pmix3x_convert_opalrank(OPAL_VPID_INVALID);
|
||||
op->p.rank = pmix2x_convert_opalrank(OPAL_VPID_INVALID);
|
||||
} else {
|
||||
(void)opal_snprintf_jobid(op->p.nspace, PMIX_MAX_NSLEN, source->jobid);
|
||||
op->p.rank = pmix3x_convert_opalrank(source->vpid);
|
||||
op->p.rank = pmix2x_convert_opalrank(source->vpid);
|
||||
}
|
||||
|
||||
|
||||
rc = pmix3x_convert_opalrc(status);
|
||||
rc = pmix2x_convert_opalrc(status);
|
||||
/* the range is irrelevant here as the server is passing
|
||||
* the event down to its local clients */
|
||||
rc = PMIx_Notify_event(rc, &op->p, PMIX_RANGE_LOCAL,
|
||||
@ -515,5 +515,5 @@ int pmix3x_server_notify_event(int status,
|
||||
if (PMIX_SUCCESS != rc) {
|
||||
OBJ_RELEASE(op);
|
||||
}
|
||||
return pmix3x_convert_rc(rc);
|
||||
return pmix2x_convert_rc(rc);
|
||||
}
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
@ -1,325 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2x14-2x16 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2x14-2x15 Mellanox Technologies, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2x16 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#ifndef MCA_PMIX_PMIX2X_H
|
||||
#define MCA_PMIX_PMIX2X_H
|
||||
|
||||
#include "opal_config.h"
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_UN_H
|
||||
#include <sys/un.h>
|
||||
#endif
|
||||
|
||||
#include "opal/class/opal_list.h"
|
||||
#include "opal/mca/mca.h"
|
||||
#include "opal/mca/event/event.h"
|
||||
#include "opal/util/proc.h"
|
||||
|
||||
#include "opal/mca/pmix/pmix.h"
|
||||
#include "pmix_server.h"
|
||||
#include "pmix/pmix_common.h"
|
||||
|
||||
BEGIN_C_DECLS
|
||||
|
||||
typedef struct {
|
||||
opal_pmix_base_component_t super;
|
||||
opal_list_t jobids;
|
||||
bool native_launch;
|
||||
size_t evindex;
|
||||
opal_list_t single_events;
|
||||
opal_list_t multi_events;
|
||||
opal_list_t default_events;
|
||||
int cache_size;
|
||||
opal_list_t cache;
|
||||
} mca_pmix_ext2x_component_t;
|
||||
|
||||
OPAL_DECLSPEC extern mca_pmix_ext2x_component_t mca_pmix_ext2x_component;
|
||||
|
||||
OPAL_DECLSPEC extern const opal_pmix_base_module_t opal_pmix_ext2x_module;
|
||||
|
||||
/**** INTERNAL OBJECTS ****/
|
||||
typedef struct {
|
||||
opal_list_item_t super;
|
||||
opal_jobid_t jobid;
|
||||
char nspace[PMIX_MAX_NSLEN + 1];
|
||||
} opal_ext2x_jobid_trkr_t;
|
||||
OBJ_CLASS_DECLARATION(opal_ext2x_jobid_trkr_t);
|
||||
|
||||
typedef struct {
|
||||
opal_list_item_t super;
|
||||
size_t index;
|
||||
int code;
|
||||
opal_pmix_notification_fn_t handler;
|
||||
} opal_ext2x_single_event_t;
|
||||
OBJ_CLASS_DECLARATION(opal_ext2x_single_event_t);
|
||||
|
||||
typedef struct {
|
||||
opal_list_item_t super;
|
||||
size_t index;
|
||||
int *codes;
|
||||
size_t ncodes;
|
||||
opal_pmix_notification_fn_t handler;
|
||||
} opal_ext2x_multi_event_t;
|
||||
OBJ_CLASS_DECLARATION(opal_ext2x_multi_event_t);
|
||||
|
||||
typedef struct {
|
||||
opal_list_item_t super;
|
||||
size_t index;
|
||||
opal_pmix_notification_fn_t handler;
|
||||
} opal_ext2x_default_event_t;
|
||||
OBJ_CLASS_DECLARATION(opal_ext2x_default_event_t);
|
||||
|
||||
typedef struct {
|
||||
opal_list_item_t super;
|
||||
int status;
|
||||
bool nondefault;
|
||||
opal_process_name_t source;
|
||||
pmix_data_range_t range;
|
||||
opal_list_t *info;
|
||||
opal_list_t results;
|
||||
opal_ext2x_single_event_t *sing;
|
||||
opal_ext2x_multi_event_t *multi;
|
||||
opal_ext2x_default_event_t *def;
|
||||
opal_pmix_op_cbfunc_t final_cbfunc;
|
||||
void *final_cbdata;
|
||||
} opal_ext2x_event_chain_t;
|
||||
OBJ_CLASS_DECLARATION(opal_ext2x_event_chain_t);
|
||||
|
||||
typedef struct {
|
||||
opal_object_t super;
|
||||
pmix_status_t status;
|
||||
char *key;
|
||||
pmix_proc_t p;
|
||||
pmix_proc_t *procs;
|
||||
size_t nprocs;
|
||||
pmix_proc_t *error_procs;
|
||||
size_t nerror_procs;
|
||||
pmix_info_t *info;
|
||||
size_t ninfo;
|
||||
pmix_app_t *apps;
|
||||
size_t sz;
|
||||
volatile bool active;
|
||||
opal_pmix_op_cbfunc_t opcbfunc;
|
||||
opal_pmix_modex_cbfunc_t mdxcbfunc;
|
||||
opal_pmix_value_cbfunc_t valcbfunc;
|
||||
opal_pmix_lookup_cbfunc_t lkcbfunc;
|
||||
opal_pmix_spawn_cbfunc_t spcbfunc;
|
||||
void *cbdata;
|
||||
} ext2x_opcaddy_t;
|
||||
OBJ_CLASS_DECLARATION(ext2x_opcaddy_t);
|
||||
|
||||
typedef struct {
|
||||
opal_object_t super;
|
||||
opal_list_t procs;
|
||||
opal_list_t info;
|
||||
opal_list_t apps;
|
||||
pmix_op_cbfunc_t opcbfunc;
|
||||
pmix_dmodex_response_fn_t dmdxfunc;
|
||||
pmix_modex_cbfunc_t mdxcbfunc;
|
||||
pmix_lookup_cbfunc_t lkupcbfunc;
|
||||
pmix_spawn_cbfunc_t spwncbfunc;
|
||||
pmix_info_cbfunc_t infocbfunc;
|
||||
pmix_tool_connection_cbfunc_t toolcbfunc;
|
||||
void *cbdata;
|
||||
opal_pmix_release_cbfunc_t odmdxfunc;
|
||||
void *ocbdata;
|
||||
} ext2x_opalcaddy_t;
|
||||
OBJ_CLASS_DECLARATION(ext2x_opalcaddy_t);
|
||||
|
||||
typedef struct {
|
||||
opal_object_t super;
|
||||
opal_event_t ev;
|
||||
volatile bool active;
|
||||
size_t id;
|
||||
int status;
|
||||
opal_process_name_t pname;
|
||||
opal_jobid_t jobid;
|
||||
const opal_process_name_t *source;
|
||||
opal_pmix_data_range_t range;
|
||||
bool nondefault;
|
||||
size_t handler;
|
||||
opal_list_t *event_codes;
|
||||
opal_list_t *info;
|
||||
opal_pmix_notification_fn_t evhandler;
|
||||
opal_pmix_evhandler_reg_cbfunc_t cbfunc;
|
||||
opal_pmix_op_cbfunc_t opcbfunc;
|
||||
void *cbdata;
|
||||
} ext2x_threadshift_t;
|
||||
OBJ_CLASS_DECLARATION(ext2x_threadshift_t);
|
||||
|
||||
#define OPAL_PMIX_OPCD_THREADSHIFT(i, s, sr, if, nif, fn, cb, cd) \
|
||||
do { \
|
||||
ext2x_opalcaddy_t *_cd; \
|
||||
_cd = OBJ_NEW(ext2x_opalcaddy_t); \
|
||||
_cd->id = (i); \
|
||||
_cd->status = (s); \
|
||||
_cd->source = (sr); \
|
||||
_cd->info = (i); \
|
||||
_cd->evcbfunc = (cb); \
|
||||
_cd->cbdata = (cd); \
|
||||
event_assign(&((_cd)->ev), opal_pmix_base.evbase, \
|
||||
-1, EV_WRITE, (fn), (_cd)); \
|
||||
event_active(&((_cd)->ev), EV_WRITE, 1); \
|
||||
} while(0)
|
||||
|
||||
#define OPAL_PMIX_OP_THREADSHIFT(e, fn, cb, cd) \
|
||||
do { \
|
||||
ext2x_threadshift_t *_cd; \
|
||||
_cd = OBJ_NEW(ext2x_threadshift_t); \
|
||||
_cd->handler = (e); \
|
||||
_cd->opcbfunc = (cb); \
|
||||
_cd->cbdata = (cd); \
|
||||
event_assign(&((_cd)->ev), opal_pmix_base.evbase, \
|
||||
-1, EV_WRITE, (fn), (_cd)); \
|
||||
event_active(&((_cd)->ev), EV_WRITE, 1); \
|
||||
} while(0)
|
||||
|
||||
#define OPAL_PMIX_THREADSHIFT(e, i, eh, fn, cb, cd) \
|
||||
do { \
|
||||
ext2x_threadshift_t *_cd; \
|
||||
_cd = OBJ_NEW(ext2x_threadshift_t); \
|
||||
_cd->event_codes = (e); \
|
||||
_cd->info = (i); \
|
||||
_cd->evhandler = (eh); \
|
||||
_cd->cbfunc = (cb); \
|
||||
_cd->cbdata = (cd); \
|
||||
event_assign(&((_cd)->ev), opal_pmix_base.evbase, \
|
||||
-1, EV_WRITE, (fn), (_cd)); \
|
||||
event_active(&((_cd)->ev), EV_WRITE, 1); \
|
||||
} while(0)
|
||||
|
||||
#define OPAL_PMIX_NOTIFY_THREADSHIFT(s, sr, r, i, fn, cb, cd) \
|
||||
do { \
|
||||
ext2x_threadshift_t *_cd; \
|
||||
_cd = OBJ_NEW(ext2x_threadshift_t); \
|
||||
_cd->status = (s); \
|
||||
_cd->source = (sr); \
|
||||
_cd->range = (r); \
|
||||
_cd->info = (i); \
|
||||
_cd->opcbfunc = (cb); \
|
||||
_cd->cbdata = (cd); \
|
||||
event_assign(&((_cd)->ev), opal_pmix_base.evbase, \
|
||||
-1, EV_WRITE, (fn), (_cd)); \
|
||||
event_active(&((_cd)->ev), EV_WRITE, 1); \
|
||||
} while(0)
|
||||
|
||||
/**** CLIENT FUNCTIONS ****/
|
||||
OPAL_MODULE_DECLSPEC int ext2x_client_init(void);
|
||||
OPAL_MODULE_DECLSPEC int ext2x_client_finalize(void);
|
||||
OPAL_MODULE_DECLSPEC int ext2x_initialized(void);
|
||||
OPAL_MODULE_DECLSPEC int ext2x_abort(int flag, const char *msg,
|
||||
opal_list_t *procs);
|
||||
OPAL_MODULE_DECLSPEC int ext2x_commit(void);
|
||||
OPAL_MODULE_DECLSPEC int ext2x_fence(opal_list_t *procs, int collect_data);
|
||||
OPAL_MODULE_DECLSPEC int ext2x_fencenb(opal_list_t *procs, int collect_data,
|
||||
opal_pmix_op_cbfunc_t cbfunc, void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC int ext2x_put(opal_pmix_scope_t scope,
|
||||
opal_value_t *val);
|
||||
OPAL_MODULE_DECLSPEC int ext2x_get(const opal_process_name_t *proc, const char *key,
|
||||
opal_list_t *info, opal_value_t **val);
|
||||
OPAL_MODULE_DECLSPEC int ext2x_getnb(const opal_process_name_t *proc, const char *key,
|
||||
opal_list_t *info,
|
||||
opal_pmix_value_cbfunc_t cbfunc, void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC int ext2x_publish(opal_list_t *info);
|
||||
OPAL_MODULE_DECLSPEC int ext2x_publishnb(opal_list_t *info,
|
||||
opal_pmix_op_cbfunc_t cbfunc, void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC int ext2x_lookup(opal_list_t *data, opal_list_t *info);
|
||||
OPAL_MODULE_DECLSPEC int ext2x_lookupnb(char **keys, opal_list_t *info,
|
||||
opal_pmix_lookup_cbfunc_t cbfunc, void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC int ext2x_unpublish(char **keys, opal_list_t *info);
|
||||
OPAL_MODULE_DECLSPEC int ext2x_unpublishnb(char **keys, opal_list_t *info,
|
||||
opal_pmix_op_cbfunc_t cbfunc, void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC int ext2x_spawn(opal_list_t *job_info, opal_list_t *apps, opal_jobid_t *jobid);
|
||||
OPAL_MODULE_DECLSPEC int ext2x_spawnnb(opal_list_t *job_info, opal_list_t *apps,
|
||||
opal_pmix_spawn_cbfunc_t cbfunc, void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC int ext2x_connect(opal_list_t *procs);
|
||||
OPAL_MODULE_DECLSPEC int ext2x_connectnb(opal_list_t *procs,
|
||||
opal_pmix_op_cbfunc_t cbfunc,
|
||||
void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC int ext2x_disconnect(opal_list_t *procs);
|
||||
OPAL_MODULE_DECLSPEC int ext2x_disconnectnb(opal_list_t *procs,
|
||||
opal_pmix_op_cbfunc_t cbfunc,
|
||||
void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC int ext2x_resolve_peers(const char *nodename, opal_jobid_t jobid,
|
||||
opal_list_t *procs);
|
||||
OPAL_MODULE_DECLSPEC int ext2x_resolve_nodes(opal_jobid_t jobid, char **nodelist);
|
||||
|
||||
/**** COMMON FUNCTIONS ****/
|
||||
OPAL_MODULE_DECLSPEC int ext2x_store_local(const opal_process_name_t *proc,
|
||||
opal_value_t *val);
|
||||
|
||||
/**** SERVER SOUTHBOUND FUNCTIONS ****/
|
||||
OPAL_MODULE_DECLSPEC int ext2x_server_init(opal_pmix_server_module_t *module,
|
||||
opal_list_t *info);
|
||||
OPAL_MODULE_DECLSPEC int ext2x_server_finalize(void);
|
||||
OPAL_MODULE_DECLSPEC int ext2x_server_gen_regex(const char *input, char **regex);
|
||||
OPAL_MODULE_DECLSPEC int ext2x_server_gen_ppn(const char *input, char **ppn);
|
||||
OPAL_MODULE_DECLSPEC int ext2x_server_register_nspace(opal_jobid_t jobid,
|
||||
int nlocalprocs,
|
||||
opal_list_t *info,
|
||||
opal_pmix_op_cbfunc_t cbfunc,
|
||||
void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC void ext2x_server_deregister_nspace(opal_jobid_t jobid,
|
||||
opal_pmix_op_cbfunc_t cbfunc,
|
||||
void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC int ext2x_server_register_client(const opal_process_name_t *proc,
|
||||
uid_t uid, gid_t gid,
|
||||
void *server_object,
|
||||
opal_pmix_op_cbfunc_t cbfunc,
|
||||
void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC void ext2x_server_deregister_client(const opal_process_name_t *proc,
|
||||
opal_pmix_op_cbfunc_t cbfunc,
|
||||
void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC int ext2x_server_setup_fork(const opal_process_name_t *proc, char ***env);
|
||||
OPAL_MODULE_DECLSPEC int ext2x_server_dmodex(const opal_process_name_t *proc,
|
||||
opal_pmix_modex_cbfunc_t cbfunc, void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC int ext2x_server_notify_event(int status,
|
||||
const opal_process_name_t *source,
|
||||
opal_list_t *info,
|
||||
opal_pmix_op_cbfunc_t cbfunc, void *cbdata);
|
||||
|
||||
|
||||
/**** COMPONENT UTILITY FUNCTIONS ****/
|
||||
OPAL_MODULE_DECLSPEC void ext2x_event_hdlr(size_t evhdlr_registration_id,
|
||||
pmix_status_t status, const pmix_proc_t *source,
|
||||
pmix_info_t info[], size_t ninfo,
|
||||
pmix_info_t results[], size_t nresults,
|
||||
pmix_event_notification_cbfunc_fn_t cbfunc,
|
||||
void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC pmix_status_t ext2x_convert_opalrc(int rc);
|
||||
OPAL_MODULE_DECLSPEC int ext2x_convert_rc(pmix_status_t rc);
|
||||
|
||||
OPAL_MODULE_DECLSPEC opal_vpid_t ext2x_convert_rank(int rank);
|
||||
OPAL_MODULE_DECLSPEC int ext2x_convert_opalrank(opal_vpid_t vpid);
|
||||
|
||||
OPAL_MODULE_DECLSPEC opal_pmix_scope_t ext2x_convert_scope(pmix_scope_t scope);
|
||||
OPAL_MODULE_DECLSPEC pmix_scope_t ext2x_convert_opalscope(opal_pmix_scope_t scope);
|
||||
|
||||
OPAL_MODULE_DECLSPEC pmix_data_range_t ext2x_convert_opalrange(opal_pmix_data_range_t range);
|
||||
OPAL_MODULE_DECLSPEC opal_pmix_data_range_t ext2x_convert_range(pmix_data_range_t range);
|
||||
|
||||
OPAL_MODULE_DECLSPEC opal_pmix_persistence_t ext2x_convert_persist(pmix_persistence_t scope);
|
||||
OPAL_MODULE_DECLSPEC pmix_persistence_t ext2x_convert_opalpersist(opal_pmix_persistence_t scope);
|
||||
|
||||
OPAL_MODULE_DECLSPEC void ext2x_value_load(pmix_value_t *v,
|
||||
opal_value_t *kv);
|
||||
OPAL_MODULE_DECLSPEC int ext2x_value_unload(opal_value_t *kv,
|
||||
const char *key,
|
||||
const pmix_value_t *v);
|
||||
|
||||
END_C_DECLS
|
||||
|
||||
#endif /* MCA_PMIX_EXTERNAL_H */
|
@ -1,754 +0,0 @@
|
||||
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
||||
/*
|
||||
* Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014-2016 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2014-2015 Mellanox Technologies, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2016 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "opal_config.h"
|
||||
#include "opal/constants.h"
|
||||
#include "opal/types.h"
|
||||
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "opal/dss/dss.h"
|
||||
#include "opal/mca/event/event.h"
|
||||
#include "opal/mca/hwloc/base/base.h"
|
||||
#include "opal/runtime/opal.h"
|
||||
#include "opal/runtime/opal_progress_threads.h"
|
||||
#include "opal/util/argv.h"
|
||||
#include "opal/util/error.h"
|
||||
#include "opal/util/output.h"
|
||||
#include "opal/util/proc.h"
|
||||
#include "opal/util/show_help.h"
|
||||
#include "opal/mca/pmix/base/base.h"
|
||||
#include "pmix_ext2x.h"
|
||||
|
||||
#include "pmix.h"
|
||||
#include "pmix_server.h"
|
||||
|
||||
/**** N.O.R.T.H.B.O.U.N.D I.N.T.E.R.F.A.C.E.S ****/
|
||||
|
||||
/* These are the interfaces used by the embedded PMIx server
|
||||
* to call up into ORTE for service requests */
|
||||
|
||||
static pmix_status_t server_client_connected_fn(const pmix_proc_t *proc, void* server_object,
|
||||
pmix_op_cbfunc_t cbfunc, void *cbdata);
|
||||
static pmix_status_t server_client_finalized_fn(const pmix_proc_t *proc, void* server_object,
|
||||
pmix_op_cbfunc_t cbfunc, void *cbdata);
|
||||
static pmix_status_t server_abort_fn(const pmix_proc_t *proc, void *server_object,
|
||||
int status, const char msg[],
|
||||
pmix_proc_t procs[], size_t nprocs,
|
||||
pmix_op_cbfunc_t cbfunc, void *cbdata);
|
||||
static pmix_status_t server_fencenb_fn(const pmix_proc_t procs[], size_t nprocs,
|
||||
const pmix_info_t info[], size_t ninfo,
|
||||
char *data, size_t ndata,
|
||||
pmix_modex_cbfunc_t cbfunc, void *cbdata);
|
||||
static pmix_status_t server_dmodex_req_fn(const pmix_proc_t *proc,
|
||||
const pmix_info_t info[], size_t ninfo,
|
||||
pmix_modex_cbfunc_t cbfunc, void *cbdata);
|
||||
static pmix_status_t server_publish_fn(const pmix_proc_t *proc,
|
||||
const pmix_info_t info[], size_t ninfo,
|
||||
pmix_op_cbfunc_t cbfunc, void *cbdata);
|
||||
static pmix_status_t server_lookup_fn(const pmix_proc_t *proc, char **keys,
|
||||
const pmix_info_t info[], size_t ninfo,
|
||||
pmix_lookup_cbfunc_t cbfunc, void *cbdata);
|
||||
static pmix_status_t server_unpublish_fn(const pmix_proc_t *proc, char **keys,
|
||||
const pmix_info_t info[], size_t ninfo,
|
||||
pmix_op_cbfunc_t cbfunc, void *cbdata);
|
||||
static pmix_status_t server_spawn_fn(const pmix_proc_t *proc,
|
||||
const pmix_info_t job_info[], size_t ninfo,
|
||||
const pmix_app_t apps[], size_t napps,
|
||||
pmix_spawn_cbfunc_t cbfunc, void *cbdata);
|
||||
static pmix_status_t server_connect_fn(const pmix_proc_t procs[], size_t nprocs,
|
||||
const pmix_info_t info[], size_t ninfo,
|
||||
pmix_op_cbfunc_t cbfunc, void *cbdata);
|
||||
static pmix_status_t server_disconnect_fn(const pmix_proc_t procs[], size_t nprocs,
|
||||
const pmix_info_t info[], size_t ninfo,
|
||||
pmix_op_cbfunc_t cbfunc, void *cbdata);
|
||||
static pmix_status_t server_register_events(pmix_status_t *codes, size_t ncodes,
|
||||
const pmix_info_t info[], size_t ninfo,
|
||||
pmix_op_cbfunc_t cbfunc, void *cbdata);
|
||||
static pmix_status_t server_deregister_events(pmix_status_t *codes, size_t ncodes,
|
||||
pmix_op_cbfunc_t cbfunc, void *cbdata);
|
||||
static pmix_status_t server_notify_event(pmix_status_t code,
|
||||
const pmix_proc_t *source,
|
||||
pmix_data_range_t range,
|
||||
pmix_info_t info[], size_t ninfo,
|
||||
pmix_op_cbfunc_t cbfunc, void *cbdata);
|
||||
pmix_server_module_t mymodule = {
|
||||
.client_connected = server_client_connected_fn,
|
||||
.client_finalized = server_client_finalized_fn,
|
||||
.abort = server_abort_fn,
|
||||
.fence_nb = server_fencenb_fn,
|
||||
.direct_modex = server_dmodex_req_fn,
|
||||
.publish = server_publish_fn,
|
||||
.lookup = server_lookup_fn,
|
||||
.unpublish = server_unpublish_fn,
|
||||
.spawn = server_spawn_fn,
|
||||
.connect = server_connect_fn,
|
||||
.disconnect = server_disconnect_fn,
|
||||
.register_events = server_register_events,
|
||||
.deregister_events = server_deregister_events,
|
||||
.notify_event = server_notify_event
|
||||
};
|
||||
|
||||
opal_pmix_server_module_t *host_module = NULL;
|
||||
|
||||
|
||||
static void opal_opcbfunc(int status, void *cbdata)
|
||||
{
|
||||
ext2x_opalcaddy_t *opalcaddy = (ext2x_opalcaddy_t*)cbdata;
|
||||
|
||||
if (NULL != opalcaddy->opcbfunc) {
|
||||
opalcaddy->opcbfunc(ext2x_convert_opalrc(status), opalcaddy->cbdata);
|
||||
}
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
|
||||
static pmix_status_t server_client_connected_fn(const pmix_proc_t *p, void *server_object,
|
||||
pmix_op_cbfunc_t cbfunc, void *cbdata)
|
||||
{
|
||||
int rc;
|
||||
opal_process_name_t proc;
|
||||
ext2x_opalcaddy_t *opalcaddy;
|
||||
|
||||
if (NULL == host_module || NULL == host_module->client_connected) {
|
||||
return PMIX_SUCCESS;
|
||||
}
|
||||
|
||||
opalcaddy = OBJ_NEW(ext2x_opalcaddy_t);
|
||||
opalcaddy->opcbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
/* convert the nspace/rank to an opal_process_name_t */
|
||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) {
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
proc.vpid = ext2x_convert_rank(p->rank);
|
||||
|
||||
/* pass it up */
|
||||
rc = host_module->client_connected(&proc, server_object,
|
||||
opal_opcbfunc, opalcaddy);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
|
||||
static pmix_status_t server_client_finalized_fn(const pmix_proc_t *p, void* server_object,
|
||||
pmix_op_cbfunc_t cbfunc, void *cbdata)
|
||||
{
|
||||
int rc;
|
||||
ext2x_opalcaddy_t *opalcaddy;
|
||||
opal_process_name_t proc;
|
||||
|
||||
if (NULL == host_module || NULL == host_module->client_finalized) {
|
||||
return PMIX_SUCCESS;
|
||||
}
|
||||
|
||||
/* convert the nspace/rank to an opal_process_name_t */
|
||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) {
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
proc.vpid = ext2x_convert_rank(p->rank);
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(ext2x_opalcaddy_t);
|
||||
opalcaddy->opcbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
/* pass it up */
|
||||
rc = host_module->client_finalized(&proc, server_object, opal_opcbfunc, opalcaddy);
|
||||
if (OPAL_SUCCESS != rc) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
|
||||
static pmix_status_t server_abort_fn(const pmix_proc_t *p, void *server_object,
|
||||
int status, const char msg[],
|
||||
pmix_proc_t procs[], size_t nprocs,
|
||||
pmix_op_cbfunc_t cbfunc, void *cbdata)
|
||||
{
|
||||
size_t n;
|
||||
opal_namelist_t *nm;
|
||||
opal_process_name_t proc;
|
||||
int rc;
|
||||
ext2x_opalcaddy_t *opalcaddy;
|
||||
|
||||
if (NULL == host_module || NULL == host_module->abort) {
|
||||
return PMIX_ERR_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
/* convert the nspace/rank to an opal_process_name_t */
|
||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) {
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
proc.vpid = ext2x_convert_rank(p->rank);
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(ext2x_opalcaddy_t);
|
||||
opalcaddy->opcbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
/* convert the array of pmix_proc_t to the list of procs */
|
||||
for (n=0; n < nprocs; n++) {
|
||||
nm = OBJ_NEW(opal_namelist_t);
|
||||
opal_list_append(&opalcaddy->procs, &nm->super);
|
||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&nm->name.jobid, procs[n].nspace))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
nm->name.vpid = ext2x_convert_rank(procs[n].rank);
|
||||
}
|
||||
|
||||
/* pass it up */
|
||||
rc = host_module->abort(&proc, server_object, status, msg,
|
||||
&opalcaddy->procs, opal_opcbfunc, opalcaddy);
|
||||
if (OPAL_SUCCESS != rc) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
|
||||
static void _data_release(void *cbdata)
|
||||
{
|
||||
ext2x_opalcaddy_t *opalcaddy = (ext2x_opalcaddy_t*)cbdata;
|
||||
|
||||
if (NULL != opalcaddy->odmdxfunc) {
|
||||
opalcaddy->odmdxfunc(opalcaddy->ocbdata);
|
||||
}
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
|
||||
static void opmdx_response(int status, const char *data, size_t sz, void *cbdata,
|
||||
opal_pmix_release_cbfunc_t relcbfunc, void *relcbdata)
|
||||
{
|
||||
pmix_status_t rc;
|
||||
ext2x_opalcaddy_t *opalcaddy = (ext2x_opalcaddy_t*)cbdata;
|
||||
|
||||
rc = ext2x_convert_rc(status);
|
||||
if (NULL != opalcaddy->mdxcbfunc) {
|
||||
opalcaddy->odmdxfunc = relcbfunc;
|
||||
opalcaddy->ocbdata = relcbdata;
|
||||
opalcaddy->mdxcbfunc(rc, data, sz, opalcaddy->cbdata,
|
||||
_data_release, opalcaddy);
|
||||
} else {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
}
|
||||
|
||||
static pmix_status_t server_fencenb_fn(const pmix_proc_t procs[], size_t nprocs,
|
||||
const pmix_info_t info[], size_t ninfo,
|
||||
char *data, size_t ndata,
|
||||
pmix_modex_cbfunc_t cbfunc, void *cbdata)
|
||||
{
|
||||
ext2x_opalcaddy_t *opalcaddy;
|
||||
size_t n;
|
||||
opal_namelist_t *nm;
|
||||
opal_value_t *iptr;
|
||||
int rc;
|
||||
|
||||
if (NULL == host_module || NULL == host_module->fence_nb) {
|
||||
return PMIX_ERR_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(ext2x_opalcaddy_t);
|
||||
opalcaddy->mdxcbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
/* convert the array of pmix_proc_t to the list of procs */
|
||||
for (n=0; n < nprocs; n++) {
|
||||
nm = OBJ_NEW(opal_namelist_t);
|
||||
opal_list_append(&opalcaddy->procs, &nm->super);
|
||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&nm->name.jobid, procs[n].nspace))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
nm->name.vpid = ext2x_convert_rank(procs[n].rank);
|
||||
}
|
||||
|
||||
/* convert the array of pmix_info_t to the list of info */
|
||||
for (n=0; n < ninfo; n++) {
|
||||
iptr = OBJ_NEW(opal_value_t);
|
||||
opal_list_append(&opalcaddy->info, &iptr->super);
|
||||
iptr->key = strdup(info[n].key);
|
||||
if (OPAL_SUCCESS != (rc = ext2x_value_unload(iptr, info[n].key, &info[n].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
}
|
||||
|
||||
/* pass it up */
|
||||
rc = host_module->fence_nb(&opalcaddy->procs, &opalcaddy->info,
|
||||
data, ndata, opmdx_response, opalcaddy);
|
||||
if (OPAL_SUCCESS != rc) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
|
||||
static pmix_status_t server_dmodex_req_fn(const pmix_proc_t *p,
|
||||
const pmix_info_t info[], size_t ninfo,
|
||||
pmix_modex_cbfunc_t cbfunc, void *cbdata)
|
||||
{
|
||||
int rc;
|
||||
ext2x_opalcaddy_t *opalcaddy;
|
||||
opal_process_name_t proc;
|
||||
opal_value_t *iptr;
|
||||
size_t n;
|
||||
|
||||
if (NULL == host_module || NULL == host_module->direct_modex) {
|
||||
return PMIX_ERR_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
/* convert the nspace/rank to an opal_process_name_t */
|
||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) {
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
proc.vpid = ext2x_convert_rank(p->rank);
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(ext2x_opalcaddy_t);
|
||||
opalcaddy->mdxcbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
/* convert the array of pmix_info_t to the list of info */
|
||||
for (n=0; n < ninfo; n++) {
|
||||
iptr = OBJ_NEW(opal_value_t);
|
||||
opal_list_append(&opalcaddy->info, &iptr->super);
|
||||
iptr->key = strdup(info[n].key);
|
||||
if (OPAL_SUCCESS != (rc = ext2x_value_unload(iptr, info[n].key, &info[n].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
}
|
||||
|
||||
/* pass it up */
|
||||
rc = host_module->direct_modex(&proc, &opalcaddy->info, opmdx_response, opalcaddy);
|
||||
if (OPAL_SUCCESS != rc && OPAL_ERR_IN_PROCESS != rc) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
if (OPAL_ERR_IN_PROCESS == rc) {
|
||||
rc = OPAL_SUCCESS;
|
||||
}
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
|
||||
static pmix_status_t server_publish_fn(const pmix_proc_t *p,
|
||||
const pmix_info_t info[], size_t ninfo,
|
||||
pmix_op_cbfunc_t cbfunc, void *cbdata)
|
||||
{
|
||||
int rc;
|
||||
size_t n;
|
||||
ext2x_opalcaddy_t *opalcaddy;
|
||||
opal_process_name_t proc;
|
||||
opal_value_t *oinfo;
|
||||
|
||||
if (NULL == host_module || NULL == host_module->publish) {
|
||||
return PMIX_ERR_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
/* convert the nspace/rank to an opal_process_name_t */
|
||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) {
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
proc.vpid = ext2x_convert_rank(p->rank);
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(ext2x_opalcaddy_t);
|
||||
opalcaddy->opcbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
/* convert the info array */
|
||||
for (n=0; n < ninfo; n++) {
|
||||
oinfo = OBJ_NEW(opal_value_t);
|
||||
opal_list_append(&opalcaddy->info, &oinfo->super);
|
||||
oinfo->key = strdup(info[n].key);
|
||||
if (OPAL_SUCCESS != (rc = ext2x_value_unload(oinfo, info[n].key, &info[n].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
}
|
||||
|
||||
/* pass it up */
|
||||
rc = host_module->publish(&proc, &opalcaddy->info, opal_opcbfunc, opalcaddy);
|
||||
if (OPAL_SUCCESS != rc) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
|
||||
static void opal_lkupcbfunc(int status,
|
||||
opal_list_t *data,
|
||||
void *cbdata)
|
||||
{
|
||||
ext2x_opalcaddy_t *opalcaddy = (ext2x_opalcaddy_t*)cbdata;
|
||||
pmix_status_t rc;
|
||||
pmix_pdata_t *d=NULL;
|
||||
size_t nd=0, n;
|
||||
opal_pmix_pdata_t *p;
|
||||
|
||||
if (NULL != opalcaddy->lkupcbfunc) {
|
||||
rc = ext2x_convert_opalrc(status);
|
||||
/* convert any returned data */
|
||||
if (NULL != data) {
|
||||
nd = opal_list_get_size(data);
|
||||
PMIX_PDATA_CREATE(d, nd);
|
||||
n=0;
|
||||
OPAL_LIST_FOREACH(p, data, opal_pmix_pdata_t) {
|
||||
/* convert the jobid */
|
||||
(void)opal_snprintf_jobid(d[n].proc.nspace, PMIX_MAX_NSLEN, p->proc.jobid);
|
||||
d[n].proc.rank = ext2x_convert_opalrank(p->proc.vpid);
|
||||
(void)strncpy(d[n].key, p->value.key, PMIX_MAX_KEYLEN);
|
||||
ext2x_value_load(&d[n].value, &p->value);
|
||||
}
|
||||
}
|
||||
opalcaddy->lkupcbfunc(rc, d, nd, opalcaddy->cbdata);
|
||||
}
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
|
||||
static pmix_status_t server_lookup_fn(const pmix_proc_t *p, char **keys,
|
||||
const pmix_info_t info[], size_t ninfo,
|
||||
pmix_lookup_cbfunc_t cbfunc, void *cbdata)
|
||||
{
|
||||
int rc;
|
||||
ext2x_opalcaddy_t *opalcaddy;
|
||||
opal_process_name_t proc;
|
||||
opal_value_t *iptr;
|
||||
size_t n;
|
||||
|
||||
if (NULL == host_module || NULL == host_module->lookup) {
|
||||
return PMIX_ERR_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
/* convert the nspace/rank to an opal_process_name_t */
|
||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) {
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
proc.vpid = ext2x_convert_rank(p->rank);
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(ext2x_opalcaddy_t);
|
||||
opalcaddy->lkupcbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
/* convert the array of pmix_info_t to the list of info */
|
||||
for (n=0; n < ninfo; n++) {
|
||||
iptr = OBJ_NEW(opal_value_t);
|
||||
opal_list_append(&opalcaddy->info, &iptr->super);
|
||||
iptr->key = strdup(info[n].key);
|
||||
if (OPAL_SUCCESS != (rc = ext2x_value_unload(iptr, info[n].key, &info[n].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
}
|
||||
|
||||
/* pass it up */
|
||||
rc = host_module->lookup(&proc, keys, &opalcaddy->info, opal_lkupcbfunc, opalcaddy);
|
||||
if (OPAL_SUCCESS != rc) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
|
||||
|
||||
static pmix_status_t server_unpublish_fn(const pmix_proc_t *p, char **keys,
|
||||
const pmix_info_t info[], size_t ninfo,
|
||||
pmix_op_cbfunc_t cbfunc, void *cbdata)
|
||||
{
|
||||
int rc;
|
||||
ext2x_opalcaddy_t *opalcaddy;
|
||||
opal_process_name_t proc;
|
||||
opal_value_t *iptr;
|
||||
size_t n;
|
||||
|
||||
if (NULL == host_module || NULL == host_module->unpublish) {
|
||||
return PMIX_SUCCESS;
|
||||
}
|
||||
|
||||
/* convert the nspace/rank to an opal_process_name_t */
|
||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) {
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
proc.vpid = ext2x_convert_rank(p->rank);
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(ext2x_opalcaddy_t);
|
||||
opalcaddy->opcbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
/* convert the array of pmix_info_t to the list of info */
|
||||
for (n=0; n < ninfo; n++) {
|
||||
iptr = OBJ_NEW(opal_value_t);
|
||||
opal_list_append(&opalcaddy->info, &iptr->super);
|
||||
iptr->key = strdup(info[n].key);
|
||||
if (OPAL_SUCCESS != (rc = ext2x_value_unload(iptr, info[n].key, &info[n].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
}
|
||||
|
||||
/* pass it up */
|
||||
rc = host_module->unpublish(&proc, keys, &opalcaddy->info, opal_opcbfunc, opalcaddy);
|
||||
if (OPAL_SUCCESS != rc) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
|
||||
static void opal_spncbfunc(int status, opal_jobid_t jobid, void *cbdata)
|
||||
{
|
||||
ext2x_opalcaddy_t *opalcaddy = (ext2x_opalcaddy_t*)cbdata;
|
||||
pmix_status_t rc;
|
||||
char nspace[PMIX_MAX_NSLEN];
|
||||
|
||||
if (NULL != opalcaddy->spwncbfunc) {
|
||||
rc = ext2x_convert_opalrc(status);
|
||||
/* convert the jobid */
|
||||
(void)opal_snprintf_jobid(nspace, PMIX_MAX_NSLEN, jobid);
|
||||
opalcaddy->spwncbfunc(rc, nspace, opalcaddy->cbdata);
|
||||
}
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
|
||||
static pmix_status_t server_spawn_fn(const pmix_proc_t *p,
|
||||
const pmix_info_t job_info[], size_t ninfo,
|
||||
const pmix_app_t apps[], size_t napps,
|
||||
pmix_spawn_cbfunc_t cbfunc, void *cbdata)
|
||||
{
|
||||
ext2x_opalcaddy_t *opalcaddy;
|
||||
opal_process_name_t proc;
|
||||
opal_pmix_app_t *app;
|
||||
opal_value_t *oinfo;
|
||||
size_t k, n;
|
||||
int rc;
|
||||
|
||||
if (NULL == host_module || NULL == host_module->spawn) {
|
||||
return PMIX_ERR_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
/* convert the nspace/rank to an opal_process_name_t */
|
||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) {
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
proc.vpid = ext2x_convert_rank(p->rank);
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(ext2x_opalcaddy_t);
|
||||
opalcaddy->spwncbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
/* convert the job info */
|
||||
for (k=0; k < ninfo; k++) {
|
||||
oinfo = OBJ_NEW(opal_value_t);
|
||||
opal_list_append(&opalcaddy->info, &oinfo->super);
|
||||
oinfo->key = strdup(job_info[k].key);
|
||||
if (OPAL_SUCCESS != (rc = ext2x_value_unload(oinfo, job_info[k].key, &job_info[k].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
}
|
||||
|
||||
/* convert the apps */
|
||||
for (n=0; n < napps; n++) {
|
||||
app = OBJ_NEW(opal_pmix_app_t);
|
||||
opal_list_append(&opalcaddy->apps, &app->super);
|
||||
if (NULL != apps[n].cmd) {
|
||||
app->cmd = strdup(apps[n].cmd);
|
||||
}
|
||||
app->argc = apps[n].argc;
|
||||
if (NULL != apps[n].argv) {
|
||||
app->argv = opal_argv_copy(apps[n].argv);
|
||||
}
|
||||
if (NULL != apps[n].env) {
|
||||
app->env = opal_argv_copy(apps[n].env);
|
||||
}
|
||||
app->maxprocs = apps[n].maxprocs;
|
||||
for (k=0; k < apps[n].ninfo; k++) {
|
||||
oinfo = OBJ_NEW(opal_value_t);
|
||||
opal_list_append(&app->info, &oinfo->super);
|
||||
oinfo->key = strdup(apps[n].info[k].key);
|
||||
if (OPAL_SUCCESS != (rc = ext2x_value_unload(oinfo, apps[n].info[k].key, &apps[n].info[k].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* pass it up */
|
||||
rc = host_module->spawn(&proc, &opalcaddy->info, &opalcaddy->apps, opal_spncbfunc, opalcaddy);
|
||||
if (OPAL_SUCCESS != rc) {
|
||||
OPAL_ERROR_LOG(rc);
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
|
||||
|
||||
static pmix_status_t server_connect_fn(const pmix_proc_t procs[], size_t nprocs,
|
||||
const pmix_info_t info[], size_t ninfo,
|
||||
pmix_op_cbfunc_t cbfunc, void *cbdata)
|
||||
{
|
||||
int rc;
|
||||
ext2x_opalcaddy_t *opalcaddy;
|
||||
opal_namelist_t *nm;
|
||||
size_t n;
|
||||
opal_value_t *oinfo;
|
||||
|
||||
if (NULL == host_module || NULL == host_module->connect) {
|
||||
return PMIX_ERR_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(ext2x_opalcaddy_t);
|
||||
opalcaddy->opcbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
/* convert the array of pmix_proc_t to the list of procs */
|
||||
for (n=0; n < nprocs; n++) {
|
||||
nm = OBJ_NEW(opal_namelist_t);
|
||||
opal_list_append(&opalcaddy->procs, &nm->super);
|
||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&nm->name.jobid, procs[n].nspace))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
nm->name.vpid = ext2x_convert_rank(procs[n].rank);
|
||||
}
|
||||
|
||||
/* convert the info */
|
||||
for (n=0; n < ninfo; n++) {
|
||||
oinfo = OBJ_NEW(opal_value_t);
|
||||
opal_list_append(&opalcaddy->info, &oinfo->super);
|
||||
oinfo->key = strdup(info[n].key);
|
||||
if (OPAL_SUCCESS != (rc = ext2x_value_unload(oinfo, info[n].key, &info[n].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
}
|
||||
|
||||
/* pass it up */
|
||||
rc = host_module->connect(&opalcaddy->procs, &opalcaddy->info, opal_opcbfunc, opalcaddy);
|
||||
if (OPAL_SUCCESS != rc) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
|
||||
|
||||
static pmix_status_t server_disconnect_fn(const pmix_proc_t procs[], size_t nprocs,
|
||||
const pmix_info_t info[], size_t ninfo,
|
||||
pmix_op_cbfunc_t cbfunc, void *cbdata)
|
||||
{
|
||||
int rc;
|
||||
ext2x_opalcaddy_t *opalcaddy;
|
||||
opal_namelist_t *nm;
|
||||
size_t n;
|
||||
opal_value_t *oinfo;
|
||||
|
||||
if (NULL == host_module || NULL == host_module->disconnect) {
|
||||
return PMIX_ERR_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(ext2x_opalcaddy_t);
|
||||
opalcaddy->opcbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
/* convert the array of pmix_proc_t to the list of procs */
|
||||
for (n=0; n < nprocs; n++) {
|
||||
nm = OBJ_NEW(opal_namelist_t);
|
||||
opal_list_append(&opalcaddy->procs, &nm->super);
|
||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&nm->name.jobid, procs[n].nspace))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
nm->name.vpid = ext2x_convert_rank(procs[n].rank);
|
||||
}
|
||||
|
||||
/* convert the info */
|
||||
for (n=0; n < ninfo; n++) {
|
||||
oinfo = OBJ_NEW(opal_value_t);
|
||||
opal_list_append(&opalcaddy->info, &oinfo->super);
|
||||
oinfo->key = strdup(info[n].key);
|
||||
if (OPAL_SUCCESS != (rc = ext2x_value_unload(oinfo, info[n].key, &info[n].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
}
|
||||
|
||||
/* pass it up */
|
||||
rc = host_module->disconnect(&opalcaddy->procs, &opalcaddy->info, opal_opcbfunc, opalcaddy);
|
||||
if (OPAL_SUCCESS != rc) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
|
||||
static pmix_status_t server_register_events(pmix_status_t *codes, size_t ncodes,
|
||||
const pmix_info_t info[], size_t ninfo,
|
||||
pmix_op_cbfunc_t cbfunc, void *cbdata)
|
||||
{
|
||||
ext2x_opalcaddy_t *opalcaddy;
|
||||
size_t n;
|
||||
opal_value_t *oinfo;
|
||||
int rc;
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(ext2x_opalcaddy_t);
|
||||
opalcaddy->opcbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
/* convert the info */
|
||||
for (n=0; n < ninfo; n++) {
|
||||
oinfo = OBJ_NEW(opal_value_t);
|
||||
opal_list_append(&opalcaddy->info, &oinfo->super);
|
||||
oinfo->key = strdup(info[n].key);
|
||||
if (OPAL_SUCCESS != (rc = ext2x_value_unload(oinfo, info[n].key, &info[n].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
}
|
||||
|
||||
/* pass it up */
|
||||
rc = host_module->register_events(&opalcaddy->info, opal_opcbfunc, opalcaddy);
|
||||
if (OPAL_SUCCESS != rc) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
|
||||
static pmix_status_t server_deregister_events(pmix_status_t *codes, size_t ncodes,
|
||||
pmix_op_cbfunc_t cbfunc, void *cbdata)
|
||||
{
|
||||
return PMIX_ERR_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
static pmix_status_t server_notify_event(pmix_status_t code,
|
||||
const pmix_proc_t *source,
|
||||
pmix_data_range_t range,
|
||||
pmix_info_t info[], size_t ninfo,
|
||||
pmix_op_cbfunc_t cbfunc, void *cbdata)
|
||||
{
|
||||
return PMIX_ERR_NOT_SUPPORTED;
|
||||
}
|
@ -1,517 +0,0 @@
|
||||
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
||||
/*
|
||||
* Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014-2016 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Mellanox Technologies, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2016 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "opal_config.h"
|
||||
#include "opal/constants.h"
|
||||
#include "opal/types.h"
|
||||
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "opal/dss/dss.h"
|
||||
#include "opal/mca/event/event.h"
|
||||
#include "opal/mca/hwloc/base/base.h"
|
||||
#include "opal/runtime/opal.h"
|
||||
#include "opal/runtime/opal_progress_threads.h"
|
||||
#include "opal/util/argv.h"
|
||||
#include "opal/util/error.h"
|
||||
#include "opal/util/output.h"
|
||||
#include "opal/util/proc.h"
|
||||
#include "opal/util/show_help.h"
|
||||
#include "opal/mca/pmix/base/base.h"
|
||||
#include "pmix_ext2x.h"
|
||||
|
||||
#include "pmix.h"
|
||||
#include "pmix_server.h"
|
||||
|
||||
/**** S.O.U.T.H.B.O.U.N.D I.N.T.E.R.F.A.C.E.S ****/
|
||||
|
||||
/* These are the interfaces used by the OMPI/ORTE/OPAL layer to call
|
||||
* down into the embedded PMIx server. */
|
||||
|
||||
extern pmix_server_module_t mymodule;
|
||||
extern opal_pmix_server_module_t *host_module;
|
||||
static char *dbgvalue=NULL;
|
||||
static size_t errhdler_ref = 0;
|
||||
|
||||
#define PMIX_WAIT_FOR_COMPLETION(a) \
|
||||
do { \
|
||||
while ((a)) { \
|
||||
usleep(10); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
static void errreg_cbfunc (pmix_status_t status,
|
||||
size_t errhandler_ref,
|
||||
void *cbdata)
|
||||
{
|
||||
volatile bool *active = (volatile bool*)cbdata;
|
||||
|
||||
errhdler_ref = errhandler_ref;
|
||||
opal_output_verbose(5, opal_pmix_base_framework.framework_output,
|
||||
"PMIX server errreg_cbfunc - error handler registered status=%d, reference=%lu",
|
||||
status, (unsigned long)errhandler_ref);
|
||||
*active = false;
|
||||
}
|
||||
|
||||
int ext2x_server_init(opal_pmix_server_module_t *module,
|
||||
opal_list_t *info)
|
||||
{
|
||||
pmix_status_t rc;
|
||||
int dbg;
|
||||
opal_value_t *kv;
|
||||
pmix_info_t *pinfo;
|
||||
size_t sz, n;
|
||||
volatile bool active;
|
||||
opal_ext2x_jobid_trkr_t *job;
|
||||
|
||||
if (0 < (dbg = opal_output_get_verbosity(opal_pmix_base_framework.framework_output))) {
|
||||
asprintf(&dbgvalue, "PMIX_DEBUG=%d", dbg);
|
||||
putenv(dbgvalue);
|
||||
}
|
||||
|
||||
/* convert the list to an array of pmix_info_t */
|
||||
if (NULL != info) {
|
||||
sz = opal_list_get_size(info);
|
||||
PMIX_INFO_CREATE(pinfo, sz);
|
||||
n = 0;
|
||||
OPAL_LIST_FOREACH(kv, info, opal_value_t) {
|
||||
(void)strncpy(pinfo[n].key, kv->key, PMIX_MAX_KEYLEN);
|
||||
ext2x_value_load(&pinfo[n].value, kv);
|
||||
++n;
|
||||
}
|
||||
} else {
|
||||
sz = 0;
|
||||
pinfo = NULL;
|
||||
}
|
||||
|
||||
/* insert ourselves into our list of jobids - it will be the
|
||||
* first, and so we'll check it first */
|
||||
job = OBJ_NEW(opal_ext2x_jobid_trkr_t);
|
||||
(void)opal_snprintf_jobid(job->nspace, PMIX_MAX_NSLEN, OPAL_PROC_MY_NAME.jobid);
|
||||
job->jobid = OPAL_PROC_MY_NAME.jobid;
|
||||
opal_list_append(&mca_pmix_ext2x_component.jobids, &job->super);
|
||||
|
||||
if (PMIX_SUCCESS != (rc = PMIx_server_init(&mymodule, pinfo, sz))) {
|
||||
PMIX_INFO_FREE(pinfo, sz);
|
||||
return ext2x_convert_rc(rc);
|
||||
}
|
||||
PMIX_INFO_FREE(pinfo, sz);
|
||||
|
||||
/* record the host module */
|
||||
host_module = module;
|
||||
|
||||
/* register the default event handler */
|
||||
active = true;
|
||||
PMIx_Register_event_handler(NULL, 0, NULL, 0, ext2x_event_hdlr, errreg_cbfunc, (void*)&active);
|
||||
PMIX_WAIT_FOR_COMPLETION(active);
|
||||
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
static void fincb(pmix_status_t status, void *cbdata)
|
||||
{
|
||||
volatile bool *active = (volatile bool*)cbdata;
|
||||
*active = false;
|
||||
}
|
||||
|
||||
int ext2x_server_finalize(void)
|
||||
{
|
||||
pmix_status_t rc;
|
||||
volatile bool active;
|
||||
|
||||
/* deregister the default event handler */
|
||||
active = true;
|
||||
PMIx_Deregister_event_handler(errhdler_ref, fincb, (void*)&active);
|
||||
PMIX_WAIT_FOR_COMPLETION(active);
|
||||
|
||||
rc = PMIx_server_finalize();
|
||||
return ext2x_convert_rc(rc);
|
||||
}
|
||||
|
||||
int ext2x_server_gen_regex(const char *input, char **regex)
|
||||
{
|
||||
pmix_status_t rc;
|
||||
|
||||
rc = PMIx_generate_regex(input, regex);
|
||||
return ext2x_convert_rc(rc);
|
||||
}
|
||||
|
||||
|
||||
int ext2x_server_gen_ppn(const char *input, char **ppn)
|
||||
{
|
||||
pmix_status_t rc;
|
||||
|
||||
rc = PMIx_generate_ppn(input, ppn);
|
||||
return ext2x_convert_rc(rc);
|
||||
}
|
||||
|
||||
static void opcbfunc(pmix_status_t status, void *cbdata)
|
||||
{
|
||||
ext2x_opcaddy_t *op = (ext2x_opcaddy_t*)cbdata;
|
||||
|
||||
if (NULL != op->opcbfunc) {
|
||||
op->opcbfunc(ext2x_convert_rc(status), op->cbdata);
|
||||
}
|
||||
if (op->active) {
|
||||
op->status = status;
|
||||
op->active = false;
|
||||
} else {
|
||||
OBJ_RELEASE(op);
|
||||
}
|
||||
}
|
||||
|
||||
static void _reg_nspace(int sd, short args, void *cbdata)
|
||||
{
|
||||
ext2x_threadshift_t *cd = (ext2x_threadshift_t*)cbdata;
|
||||
opal_value_t *kv, *k2;
|
||||
pmix_info_t *pinfo = NULL, *pmap;
|
||||
size_t sz, szmap, m, n;
|
||||
char nspace[PMIX_MAX_NSLEN];
|
||||
pmix_status_t rc;
|
||||
opal_list_t *pmapinfo;
|
||||
opal_ext2x_jobid_trkr_t *job;
|
||||
ext2x_opcaddy_t op;
|
||||
|
||||
/* we must threadshift this request as we might not be in an event
|
||||
* and we are going to access framework-global lists/objects */
|
||||
|
||||
/* convert the jobid */
|
||||
(void)opal_snprintf_jobid(nspace, PMIX_MAX_NSLEN, cd->jobid);
|
||||
|
||||
/* store this job in our list of known nspaces */
|
||||
job = OBJ_NEW(opal_ext2x_jobid_trkr_t);
|
||||
(void)strncpy(job->nspace, nspace, PMIX_MAX_NSLEN);
|
||||
job->jobid = cd->jobid;
|
||||
opal_list_append(&mca_pmix_ext2x_component.jobids, &job->super);
|
||||
|
||||
/* convert the list to an array of pmix_info_t */
|
||||
if (NULL != cd->info) {
|
||||
sz = opal_list_get_size(cd->info);
|
||||
PMIX_INFO_CREATE(pinfo, sz);
|
||||
n = 0;
|
||||
OPAL_LIST_FOREACH(kv, cd->info, opal_value_t) {
|
||||
(void)strncpy(pinfo[n].key, kv->key, PMIX_MAX_KEYLEN);
|
||||
if (0 == strcmp(kv->key, OPAL_PMIX_PROC_DATA)) {
|
||||
pinfo[n].value.type = PMIX_INFO_ARRAY;
|
||||
/* the value contains a list of values - convert
|
||||
* that list to another array */
|
||||
pmapinfo = (opal_list_t*)kv->data.ptr;
|
||||
szmap = opal_list_get_size(pmapinfo);
|
||||
PMIX_INFO_CREATE(pmap, szmap);
|
||||
pinfo[n].value.data.array.array = (struct pmix_info_t*)pmap;
|
||||
pinfo[n].value.data.array.size = szmap;
|
||||
m = 0;
|
||||
OPAL_LIST_FOREACH(k2, pmapinfo, opal_value_t) {
|
||||
(void)strncpy(pmap[m].key, k2->key, PMIX_MAX_KEYLEN);
|
||||
ext2x_value_load(&pmap[m].value, k2);
|
||||
++m;
|
||||
}
|
||||
} else {
|
||||
ext2x_value_load(&pinfo[n].value, kv);
|
||||
}
|
||||
++n;
|
||||
}
|
||||
} else {
|
||||
sz = 0;
|
||||
pinfo = NULL;
|
||||
}
|
||||
|
||||
OBJ_CONSTRUCT(&op, ext2x_opcaddy_t);
|
||||
op.active = true;
|
||||
rc = PMIx_server_register_nspace(nspace, cd->status, pinfo, sz,
|
||||
opcbfunc, (void*)&op);
|
||||
if (PMIX_SUCCESS == rc) {
|
||||
PMIX_WAIT_FOR_COMPLETION(op.active);
|
||||
} else {
|
||||
op.status = rc;
|
||||
}
|
||||
/* ensure we execute the cbfunc so the caller doesn't hang */
|
||||
if (NULL != cd->opcbfunc) {
|
||||
cd->opcbfunc(ext2x_convert_rc(op.status), cd->cbdata);
|
||||
}
|
||||
if (NULL != pinfo) {
|
||||
PMIX_INFO_FREE(pinfo, sz);
|
||||
}
|
||||
OBJ_DESTRUCT(&op);
|
||||
OBJ_RELEASE(cd);
|
||||
}
|
||||
|
||||
int ext2x_server_register_nspace(opal_jobid_t jobid,
|
||||
int nlocalprocs,
|
||||
opal_list_t *info,
|
||||
opal_pmix_op_cbfunc_t cbfunc,
|
||||
void *cbdata)
|
||||
{
|
||||
ext2x_threadshift_t *cd;
|
||||
|
||||
/* we must threadshift this request as it touches
|
||||
* shared lists of objects */
|
||||
cd = OBJ_NEW(ext2x_threadshift_t);
|
||||
cd->jobid = jobid;
|
||||
cd->status = nlocalprocs;
|
||||
cd->info = info;
|
||||
cd->opcbfunc = cbfunc;
|
||||
cd->cbdata = cbdata;
|
||||
/* if the cbfunc is NULL, then the caller is in an event
|
||||
* and we can directly call the processing function */
|
||||
if (NULL == cbfunc) {
|
||||
_reg_nspace(0, 0, cd);
|
||||
} else {
|
||||
event_assign(&cd->ev, opal_pmix_base.evbase,
|
||||
-1, EV_WRITE, _reg_nspace, cd);
|
||||
event_active(&cd->ev, EV_WRITE, 1);
|
||||
}
|
||||
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
static void tdcbfunc(pmix_status_t status, void *cbdata)
|
||||
{
|
||||
ext2x_threadshift_t *cd = (ext2x_threadshift_t*)cbdata;
|
||||
|
||||
if (NULL != cd->opcbfunc) {
|
||||
cd->opcbfunc(ext2x_convert_rc(status), cd->cbdata);
|
||||
}
|
||||
if (cd->active) {
|
||||
cd->active = false;
|
||||
} else {
|
||||
OBJ_RELEASE(cd);
|
||||
}
|
||||
}
|
||||
|
||||
static void _dereg_nspace(int sd, short args, void *cbdata)
|
||||
{
|
||||
ext2x_threadshift_t *cd = (ext2x_threadshift_t*)cbdata;
|
||||
opal_ext2x_jobid_trkr_t *jptr;
|
||||
|
||||
/* if we don't already have it, we can ignore this */
|
||||
OPAL_LIST_FOREACH(jptr, &mca_pmix_ext2x_component.jobids, opal_ext2x_jobid_trkr_t) {
|
||||
if (jptr->jobid == cd->jobid) {
|
||||
/* found it - tell the server to deregister */
|
||||
cd->active = true;
|
||||
PMIx_server_deregister_nspace(jptr->nspace, tdcbfunc, cd);
|
||||
PMIX_WAIT_FOR_COMPLETION(cd->active);
|
||||
OBJ_RELEASE(cd);
|
||||
/* now get rid of it from our list */
|
||||
opal_list_remove_item(&mca_pmix_ext2x_component.jobids, &jptr->super);
|
||||
OBJ_RELEASE(jptr);
|
||||
return;
|
||||
}
|
||||
}
|
||||
/* must release the caller */
|
||||
tdcbfunc(PMIX_ERR_NOT_FOUND, cd);
|
||||
}
|
||||
|
||||
void ext2x_server_deregister_nspace(opal_jobid_t jobid,
|
||||
opal_pmix_op_cbfunc_t cbfunc,
|
||||
void *cbdata)
|
||||
{
|
||||
ext2x_threadshift_t *cd;
|
||||
|
||||
/* we must threadshift this request as it touches
|
||||
* shared lists of objects */
|
||||
cd = OBJ_NEW(ext2x_threadshift_t);
|
||||
cd->jobid = jobid;
|
||||
cd->opcbfunc = cbfunc;
|
||||
cd->cbdata = cbdata;
|
||||
if (NULL == cbfunc) {
|
||||
_dereg_nspace(0, 0, cd);
|
||||
} else {
|
||||
event_assign(&cd->ev, opal_pmix_base.evbase,
|
||||
-1, EV_WRITE, _dereg_nspace, cd);
|
||||
event_active(&cd->ev, EV_WRITE, 1);
|
||||
}
|
||||
}
|
||||
|
||||
int ext2x_server_register_client(const opal_process_name_t *proc,
|
||||
uid_t uid, gid_t gid,
|
||||
void *server_object,
|
||||
opal_pmix_op_cbfunc_t cbfunc,
|
||||
void *cbdata)
|
||||
{
|
||||
pmix_status_t rc;
|
||||
pmix_proc_t p;
|
||||
ext2x_opcaddy_t op;
|
||||
|
||||
/* convert the jobid */
|
||||
(void)opal_snprintf_jobid(p.nspace, PMIX_MAX_NSLEN, proc->jobid);
|
||||
p.rank = ext2x_convert_opalrank(proc->vpid);
|
||||
|
||||
OBJ_CONSTRUCT(&op, ext2x_opcaddy_t);
|
||||
op.active = true;
|
||||
rc = PMIx_server_register_client(&p, uid, gid, server_object,
|
||||
opcbfunc, (void*)&op);
|
||||
if (PMIX_SUCCESS == rc) {
|
||||
PMIX_WAIT_FOR_COMPLETION(op.active);
|
||||
rc = op.status;
|
||||
}
|
||||
OBJ_DESTRUCT(&op);
|
||||
return ext2x_convert_rc(rc);
|
||||
}
|
||||
|
||||
static void _dereg_client(int sd, short args, void *cbdata)
|
||||
{
|
||||
ext2x_threadshift_t *cd = (ext2x_threadshift_t*)cbdata;
|
||||
opal_ext2x_jobid_trkr_t *jptr;
|
||||
pmix_proc_t p;
|
||||
|
||||
/* if we don't already have it, we can ignore this */
|
||||
OPAL_LIST_FOREACH(jptr, &mca_pmix_ext2x_component.jobids, opal_ext2x_jobid_trkr_t) {
|
||||
if (jptr->jobid == cd->source->jobid) {
|
||||
/* found it - tell the server to deregister */
|
||||
(void)strncpy(p.nspace, jptr->nspace, PMIX_MAX_NSLEN);
|
||||
p.rank = ext2x_convert_opalrank(cd->source->vpid);
|
||||
cd->active = true;
|
||||
PMIx_server_deregister_client(&p, tdcbfunc, (void*)cd);
|
||||
PMIX_WAIT_FOR_COMPLETION(cd->active);
|
||||
break;
|
||||
}
|
||||
}
|
||||
OBJ_RELEASE(cd);
|
||||
}
|
||||
|
||||
/* tell the local PMIx server to cleanup this client as it is
|
||||
* done executing */
|
||||
void ext2x_server_deregister_client(const opal_process_name_t *proc,
|
||||
opal_pmix_op_cbfunc_t cbfunc,
|
||||
void *cbdata)
|
||||
{
|
||||
ext2x_threadshift_t *cd;
|
||||
|
||||
/* we must threadshift this request as we might not be in an event
|
||||
* and we are going to access framework-global lists/objects */
|
||||
cd = OBJ_NEW(ext2x_threadshift_t);
|
||||
cd->source = proc;
|
||||
cd->opcbfunc = cbfunc;
|
||||
cd->cbdata = cbdata;
|
||||
if (NULL == cbfunc) {
|
||||
_dereg_client(0, 0, cd);
|
||||
} else {
|
||||
event_assign(&cd->ev, opal_pmix_base.evbase,
|
||||
-1, EV_WRITE, _dereg_client, cd);
|
||||
event_active(&cd->ev, EV_WRITE, 1);
|
||||
}
|
||||
}
|
||||
|
||||
/* have the local PMIx server setup the environment for this client */
|
||||
int ext2x_server_setup_fork(const opal_process_name_t *proc, char ***env)
|
||||
{
|
||||
pmix_status_t rc;
|
||||
pmix_proc_t p;
|
||||
|
||||
/* convert the jobid */
|
||||
(void)opal_snprintf_jobid(p.nspace, PMIX_MAX_NSLEN, proc->jobid);
|
||||
p.rank = ext2x_convert_opalrank(proc->vpid);
|
||||
|
||||
rc = PMIx_server_setup_fork(&p, env);
|
||||
return ext2x_convert_rc(rc);
|
||||
}
|
||||
|
||||
/* this is the call back up from the embedded PMIx server that
|
||||
* will contain the returned data. Note that the embedded server
|
||||
* "owns" the data and will free it upon return from this function */
|
||||
static void dmdx_response(pmix_status_t status, char *data, size_t sz, void *cbdata)
|
||||
{
|
||||
int rc;
|
||||
ext2x_opcaddy_t *op = (ext2x_opcaddy_t*)cbdata;
|
||||
|
||||
rc = ext2x_convert_rc(status);
|
||||
if (NULL != op->mdxcbfunc) {
|
||||
op->mdxcbfunc(rc, data, sz, op->cbdata, NULL, NULL);
|
||||
}
|
||||
OBJ_RELEASE(op);
|
||||
}
|
||||
|
||||
/* request modex data for a local proc from the PMIx server */
|
||||
int ext2x_server_dmodex(const opal_process_name_t *proc,
|
||||
opal_pmix_modex_cbfunc_t cbfunc, void *cbdata)
|
||||
{
|
||||
ext2x_opcaddy_t *op;
|
||||
pmix_status_t rc;
|
||||
|
||||
/* setup the caddy */
|
||||
op = OBJ_NEW(ext2x_opcaddy_t);
|
||||
op->mdxcbfunc = cbfunc;
|
||||
op->cbdata = cbdata;
|
||||
|
||||
/* convert the jobid */
|
||||
(void)opal_snprintf_jobid(op->p.nspace, PMIX_MAX_NSLEN, proc->jobid);
|
||||
op->p.rank = ext2x_convert_opalrank(proc->vpid);
|
||||
|
||||
/* find the internally-cached data for this proc */
|
||||
rc = PMIx_server_dmodex_request(&op->p, dmdx_response, op);
|
||||
if (PMIX_SUCCESS != rc) {
|
||||
OBJ_RELEASE(op);
|
||||
}
|
||||
return ext2x_convert_rc(rc);
|
||||
}
|
||||
|
||||
/* tell the PMIx server to notify its local clients of an event */
|
||||
int ext2x_server_notify_event(int status,
|
||||
const opal_process_name_t *source,
|
||||
opal_list_t *info,
|
||||
opal_pmix_op_cbfunc_t cbfunc, void *cbdata)
|
||||
{
|
||||
opal_value_t *kv;
|
||||
pmix_info_t *pinfo;
|
||||
size_t sz, n;
|
||||
pmix_status_t rc;
|
||||
ext2x_opcaddy_t *op;
|
||||
|
||||
/* convert the list to an array of pmix_info_t */
|
||||
if (NULL != info) {
|
||||
sz = opal_list_get_size(info);
|
||||
PMIX_INFO_CREATE(pinfo, sz);
|
||||
n = 0;
|
||||
OPAL_LIST_FOREACH(kv, info, opal_value_t) {
|
||||
(void)strncpy(pinfo[n].key, kv->key, PMIX_MAX_KEYLEN);
|
||||
ext2x_value_load(&pinfo[n].value, kv);
|
||||
}
|
||||
} else {
|
||||
sz = 0;
|
||||
pinfo = NULL;
|
||||
}
|
||||
/* setup the caddy */
|
||||
op = OBJ_NEW(ext2x_opcaddy_t);
|
||||
op->info = pinfo;
|
||||
op->sz = sz;
|
||||
op->opcbfunc = cbfunc;
|
||||
op->cbdata = cbdata;
|
||||
/* convert the jobid */
|
||||
if (NULL == source) {
|
||||
(void)opal_snprintf_jobid(op->p.nspace, PMIX_MAX_NSLEN, OPAL_JOBID_INVALID);
|
||||
op->p.rank = ext2x_convert_opalrank(OPAL_VPID_INVALID);
|
||||
} else {
|
||||
(void)opal_snprintf_jobid(op->p.nspace, PMIX_MAX_NSLEN, source->jobid);
|
||||
op->p.rank = ext2x_convert_opalrank(source->vpid);
|
||||
}
|
||||
|
||||
|
||||
rc = ext2x_convert_opalrc(status);
|
||||
/* the range is irrelevant here as the server is passing
|
||||
* the event down to its local clients */
|
||||
rc = PMIx_Notify_event(rc, &op->p, PMIX_RANGE_LOCAL,
|
||||
pinfo, sz, opcbfunc, op);
|
||||
if (PMIX_SUCCESS != rc) {
|
||||
OBJ_RELEASE(op);
|
||||
}
|
||||
return ext2x_convert_rc(rc);
|
||||
}
|
@ -1,46 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
|
||||
# Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2015 Research Organization for Information Science
|
||||
# and Technology (RIST). All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
sources = \
|
||||
pmix3x.h \
|
||||
pmix3x_component.c \
|
||||
pmix3x.c \
|
||||
pmix3x_client.c \
|
||||
pmix3x_server_south.c \
|
||||
pmix3x_server_north.c
|
||||
|
||||
# Make the output library in this directory, and name it either
|
||||
# mca_<type>_<name>.la (for DSO builds) or libmca_<type>_<name>.la
|
||||
# (for static builds).
|
||||
|
||||
if MCA_BUILD_opal_pmix_ext3x_DSO
|
||||
component_noinst =
|
||||
component_install = mca_pmix_ext3x.la
|
||||
else
|
||||
component_noinst = libmca_pmix_ext3x.la
|
||||
component_install =
|
||||
endif
|
||||
|
||||
mcacomponentdir = $(opallibdir)
|
||||
mcacomponent_LTLIBRARIES = $(component_install)
|
||||
mca_pmix_ext3x_la_SOURCES = $(sources)
|
||||
mca_pmix_ext3x_la_CFLAGS = $(opal_pmix_ext3x_CFLAGS)
|
||||
mca_pmix_ext3x_la_CPPFLAGS =$(opal_pmix_ext3x_CPPFLAGS)
|
||||
mca_pmix_ext3x_la_LDFLAGS = -module -avoid-version $(opal_pmix_ext3x_LDFLAGS)
|
||||
mca_pmix_ext3x_la_LIBADD = $(opal_pmix_ext3x_LIBS)
|
||||
|
||||
noinst_LTLIBRARIES = $(component_noinst)
|
||||
libmca_pmix_ext3x_la_SOURCES =$(sources)
|
||||
libmca_pmix_ext3x_la_CFLAGS = $(opal_pmix_ext3x_CFLAGS)
|
||||
libmca_pmix_ext3x_la_CPPFLAGS = $(opal_pmix_ext3x_CPPFLAGS)
|
||||
libmca_pmix_ext3x_la_LDFLAGS = -module -avoid-version $(opal_pmix_ext3x_LDFLAGS)
|
||||
libmca_pmix_ext3x_la_LIBADD = $(opal_pmix_ext3x_LIBS)
|
@ -1,60 +0,0 @@
|
||||
# -*- shell-script -*-
|
||||
#
|
||||
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
# University Research and Technology
|
||||
# Corporation. All rights reserved.
|
||||
# Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
# of Tennessee Research Foundation. All rights
|
||||
# reserved.
|
||||
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
# University of Stuttgart. All rights reserved.
|
||||
# Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2011-2013 Los Alamos National Security, LLC.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2010-2016 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2013-2016 Intel, Inc. All rights reserved.
|
||||
# Copyright (c) 2015-2016 Research Organization for Information Science
|
||||
# and Technology (RIST). All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
# MCA_pmix_ext3x_CONFIG([action-if-found], [action-if-not-found])
|
||||
# -----------------------------------------------------------
|
||||
AC_DEFUN([MCA_opal_pmix_ext3x_CONFIG],[
|
||||
AC_CONFIG_FILES([opal/mca/pmix/ext3x/Makefile])
|
||||
|
||||
# check to see
|
||||
# if we are linking to an external v3.x library. If not, then
|
||||
# do not use this component.
|
||||
AC_MSG_CHECKING([if external v3.x component is to be used])
|
||||
AS_IF([test "$opal_external_pmix_happy" = "yes"],
|
||||
[AS_IF([test "$opal_external_pmix_version" = "3X"],
|
||||
[AC_MSG_RESULT([yes - using an external v3.x library])
|
||||
opal_pmix_ext3x_happy=1
|
||||
# Build flags for our Makefile.am
|
||||
opal_pmix_ext3x_CPPFLAGS=$opal_external_pmix_CPPFLAGS
|
||||
opal_pmix_ext3x_LDFLAGS=$opal_external_pmix_LDFLAGS
|
||||
opal_pmix_ext3x_LIBS=$opal_external_pmix_LIBS
|
||||
# setup wrapper flags
|
||||
pmix_ext3x_WRAPPER_EXTRA_LDFLAGS=$opal_external_pmix_LDFLAGS
|
||||
pmix_ext3x_WRAPPER_EXTRA_LIBS=$opal_external_pmix_LIBS],
|
||||
[AC_MSG_RESULT([no - disqualifying this component])
|
||||
opal_pmix_ext3x_happy=0])],
|
||||
[AC_MSG_RESULT([no - disqualifying this component])
|
||||
opal_pmix_ext3x_happy=0])
|
||||
|
||||
AC_SUBST([opal_pmix_ext3x_LIBS])
|
||||
AC_SUBST([opal_pmix_ext3x_CPPFLAGS])
|
||||
AC_SUBST([opal_pmix_ext3x_LDFLAGS])
|
||||
AC_SUBST([opal_pmix_ext3x_DEPENDENCIES])
|
||||
|
||||
AS_IF([test $opal_pmix_ext3x_happy -eq 1],
|
||||
[$1],
|
||||
[$2])
|
||||
|
||||
])dnl
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
@ -1,131 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014-2015 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2016 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*
|
||||
* These symbols are in a file by themselves to provide nice linker
|
||||
* semantics. Since linkers generally pull in symbols by object
|
||||
* files, keeping these symbols as the only symbols in this file
|
||||
* prevents utility programs such as "ompi_info" from having to import
|
||||
* entire components just to query their version and parameters.
|
||||
*/
|
||||
|
||||
#include "opal_config.h"
|
||||
|
||||
#include "opal/constants.h"
|
||||
#include "opal/class/opal_list.h"
|
||||
#include "opal/util/proc.h"
|
||||
#include "opal/mca/pmix/pmix.h"
|
||||
#include "pmix3x.h"
|
||||
|
||||
/*
|
||||
* Public string showing the pmix external component version number
|
||||
*/
|
||||
const char *opal_pmix_pmix3x_component_version_string =
|
||||
"OPAL pmix3x MCA component version " OPAL_VERSION;
|
||||
|
||||
/*
|
||||
* Local function
|
||||
*/
|
||||
static int external_open(void);
|
||||
static int external_close(void);
|
||||
static int external_component_query(mca_base_module_t **module, int *priority);
|
||||
static int external_register(void);
|
||||
|
||||
|
||||
/*
|
||||
* Instantiate the public struct with all of our public information
|
||||
* and pointers to our public functions in it
|
||||
*/
|
||||
|
||||
mca_pmix_ext3x_component_t mca_pmix_ext3x_component = {
|
||||
{
|
||||
/* First, the mca_component_t struct containing meta information
|
||||
about the component itself */
|
||||
|
||||
.base_version = {
|
||||
/* Indicate that we are a pmix v1.1.0 component (which also
|
||||
implies a specific MCA version) */
|
||||
|
||||
OPAL_PMIX_BASE_VERSION_2_0_0,
|
||||
|
||||
/* Component name and version */
|
||||
|
||||
.mca_component_name = "ext3x",
|
||||
MCA_BASE_MAKE_VERSION(component, OPAL_MAJOR_VERSION, OPAL_MINOR_VERSION,
|
||||
OPAL_RELEASE_VERSION),
|
||||
|
||||
/* Component open and close functions */
|
||||
|
||||
.mca_open_component = external_open,
|
||||
.mca_close_component = external_close,
|
||||
.mca_query_component = external_component_query,
|
||||
.mca_register_component_params = external_register,
|
||||
},
|
||||
/* Next the MCA v1.0.0 component meta data */
|
||||
.base_data = {
|
||||
/* The component is checkpoint ready */
|
||||
MCA_BASE_METADATA_PARAM_CHECKPOINT
|
||||
}
|
||||
},
|
||||
.native_launch = false
|
||||
};
|
||||
|
||||
static int external_register(void)
|
||||
{
|
||||
mca_pmix_ext3x_component.cache_size = 256;
|
||||
mca_base_component_var_register(&mca_pmix_ext3x_component.super.base_version,
|
||||
"cache_size", "Size of the ring buffer cache for events",
|
||||
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, OPAL_INFO_LVL_5,
|
||||
MCA_BASE_VAR_SCOPE_CONSTANT,
|
||||
&mca_pmix_ext3x_component.cache_size);
|
||||
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
static int external_open(void)
|
||||
{
|
||||
mca_pmix_ext3x_component.evindex = 0;
|
||||
OBJ_CONSTRUCT(&mca_pmix_ext3x_component.jobids, opal_list_t);
|
||||
OBJ_CONSTRUCT(&mca_pmix_ext3x_component.single_events, opal_list_t);
|
||||
OBJ_CONSTRUCT(&mca_pmix_ext3x_component.multi_events, opal_list_t);
|
||||
OBJ_CONSTRUCT(&mca_pmix_ext3x_component.default_events, opal_list_t);
|
||||
OBJ_CONSTRUCT(&mca_pmix_ext3x_component.cache, opal_list_t);
|
||||
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
static int external_close(void)
|
||||
{
|
||||
OPAL_LIST_DESTRUCT(&mca_pmix_ext3x_component.jobids);
|
||||
OPAL_LIST_DESTRUCT(&mca_pmix_ext3x_component.single_events);
|
||||
OPAL_LIST_DESTRUCT(&mca_pmix_ext3x_component.multi_events);
|
||||
OPAL_LIST_DESTRUCT(&mca_pmix_ext3x_component.default_events);
|
||||
OPAL_LIST_DESTRUCT(&mca_pmix_ext3x_component.cache);
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
static int external_component_query(mca_base_module_t **module, int *priority)
|
||||
{
|
||||
char *t, *id;
|
||||
|
||||
/* see if a PMIx server is present */
|
||||
if (NULL != (t = getenv("PMIX_SERVER_URI")) ||
|
||||
NULL != (id = getenv("PMIX_ID"))) {
|
||||
/* if PMIx is present, then we are a client and need to use it */
|
||||
*priority = 100;
|
||||
} else {
|
||||
/* we could be a server, so we still need to be considered */
|
||||
*priority = 5;
|
||||
}
|
||||
*module = (mca_base_module_t *)&opal_pmix_ext3x_module;
|
||||
return OPAL_SUCCESS;
|
||||
}
|
53
opal/mca/pmix/pmix2x/Makefile.am
Обычный файл
53
opal/mca/pmix/pmix2x/Makefile.am
Обычный файл
@ -0,0 +1,53 @@
|
||||
#
|
||||
# Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
|
||||
# Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2015 Research Organization for Information Science
|
||||
# and Technology (RIST). All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
EXTRA_DIST = autogen.subdirs
|
||||
|
||||
SUBDIRS = pmix
|
||||
|
||||
sources = \
|
||||
pmix2x.h \
|
||||
pmix2x_component.c \
|
||||
pmix2x.c \
|
||||
pmix2x_client.c \
|
||||
pmix2x_server_south.c \
|
||||
pmix2x_server_north.c
|
||||
|
||||
# Make the output library in this directory, and name it either
|
||||
# mca_<type>_<name>.la (for DSO builds) or libmca_<type>_<name>.la
|
||||
# (for static builds).
|
||||
|
||||
if MCA_BUILD_opal_pmix_pmix2x_DSO
|
||||
component_noinst =
|
||||
component_install = mca_pmix_pmix2x.la
|
||||
else
|
||||
component_noinst = libmca_pmix_pmix2x.la
|
||||
component_install =
|
||||
endif
|
||||
|
||||
mcacomponentdir = $(opallibdir)
|
||||
mcacomponent_LTLIBRARIES = $(component_install)
|
||||
mca_pmix_pmix2x_la_SOURCES = $(sources)
|
||||
mca_pmix_pmix2x_la_CFLAGS = $(opal_pmix_pmix2x_CFLAGS)
|
||||
mca_pmix_pmix2x_la_CPPFLAGS = \
|
||||
-I$(srcdir)/pmix/include $(opal_pmix_pmix2x_CPPFLAGS)
|
||||
mca_pmix_pmix2x_la_LDFLAGS = -module -avoid-version $(opal_pmix_pmix2x_LDFLAGS)
|
||||
mca_pmix_pmix2x_la_LIBADD = $(opal_pmix_pmix2x_LIBS)
|
||||
mca_pmix_pmix2x_la_DEPENDENCIES = $(opal_pmix_pmix2x_DEPENDENCIES)
|
||||
|
||||
noinst_LTLIBRARIES = $(component_noinst)
|
||||
libmca_pmix_pmix2x_la_SOURCES =$(sources)
|
||||
libmca_pmix_pmix2x_la_CFLAGS = $(opal_pmix_pmix2x_CFLAGS)
|
||||
libmca_pmix_pmix2x_la_CPPFLAGS = $(opal_pmix_pmix2x_CPPFLAGS)
|
||||
libmca_pmix_pmix2x_la_LDFLAGS = -module -avoid-version $(opal_pmix_pmix2x_LDFLAGS)
|
||||
libmca_pmix_pmix2x_la_LIBADD = $(opal_pmix_pmix2x_LIBS)
|
||||
libmca_pmix_pmix2x_la_DEPENDENCIES = $(opal_pmix_pmix2x_DEPENDENCIES)
|
@ -23,19 +23,19 @@
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
# MCA_pmix_pmix3x_CONFIG([action-if-found], [action-if-not-found])
|
||||
# MCA_pmix_pmix2x_CONFIG([action-if-found], [action-if-not-found])
|
||||
# -----------------------------------------------------------
|
||||
AC_DEFUN([MCA_opal_pmix_pmix3x_CONFIG],[
|
||||
AC_CONFIG_FILES([opal/mca/pmix/pmix3x/Makefile])
|
||||
AC_DEFUN([MCA_opal_pmix_pmix2x_CONFIG],[
|
||||
AC_CONFIG_FILES([opal/mca/pmix/pmix2x/Makefile])
|
||||
|
||||
OPAL_VAR_SCOPE_PUSH([PMIX_VERSION opal_pmix_pmix3x_save_CPPFLAGS opal_pmix_pmix3x_save_LDFLAGS opal_pmix_pmix3x_save_LIBS opal_pmix_pmix3x_basedir opal_pmix_pmix3x_save_cflags opal_pmix_pmix3x_sm_flag])
|
||||
OPAL_VAR_SCOPE_PUSH([PMIX_VERSION opal_pmix_pmix2x_save_CPPFLAGS opal_pmix_pmix2x_save_LDFLAGS opal_pmix_pmix2x_save_LIBS opal_pmix_pmix2x_basedir opal_pmix_pmix2x_save_cflags opal_pmix_pmix2x_sm_flag])
|
||||
|
||||
opal_pmix_pmix3x_basedir=opal/mca/pmix/pmix3x
|
||||
opal_pmix_pmix2x_basedir=opal/mca/pmix/pmix2x
|
||||
|
||||
opal_pmix_pmix3x_save_CFLAGS=$CFLAGS
|
||||
opal_pmix_pmix3x_save_CPPFLAGS=$CPPFLAGS
|
||||
opal_pmix_pmix3x_save_LDFLAGS=$LDFLAGS
|
||||
opal_pmix_pmix3x_save_LIBS=$LIBS
|
||||
opal_pmix_pmix2x_save_CFLAGS=$CFLAGS
|
||||
opal_pmix_pmix2x_save_CPPFLAGS=$CPPFLAGS
|
||||
opal_pmix_pmix2x_save_LDFLAGS=$LDFLAGS
|
||||
opal_pmix_pmix2x_save_LIBS=$LIBS
|
||||
|
||||
AC_ARG_ENABLE([pmix3-dstore],
|
||||
[AC_HELP_STRING([--enable-pmix3-dstore],
|
||||
@ -43,55 +43,55 @@ AC_DEFUN([MCA_opal_pmix_pmix3x_CONFIG],[
|
||||
AC_MSG_CHECKING([if PMIx3 shared memory data store is enabled])
|
||||
if test "$enable_pmix3_dstore" != "no"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
opal_pmix_pmix3x_sm_flag=--enable-dstore
|
||||
opal_pmix_pmix2x_sm_flag=--enable-dstore
|
||||
else
|
||||
AC_MSG_RESULT([no (disabled)])
|
||||
opal_pmix_pmix3x_sm_flag=--disable-dstore
|
||||
opal_pmix_pmix2x_sm_flag=--disable-dstore
|
||||
fi
|
||||
|
||||
opal_pmix_pmix3x_args="--with-pmix-symbol-rename=OPAL_MCA_PMIX3X_ $opal_pmix_pmix3x_sm_flag --without-tests-examples --disable-visibility --enable-embedded-libevent --with-libevent-header=\\\"opal/mca/event/$opal_event_base_include\\\" --enable-embedded-hwloc --with-hwloc-header=\\\"$opal_hwloc_base_include\\\""
|
||||
opal_pmix_pmix2x_args="--with-pmix-symbol-rename=OPAL_MCA_PMIX3X_ $opal_pmix_pmix2x_sm_flag --without-tests-examples --disable-visibility --enable-embedded-libevent --with-libevent-header=\\\"opal/mca/event/$opal_event_base_include\\\" --enable-embedded-hwloc --with-hwloc-header=\\\"$opal_hwloc_base_include\\\""
|
||||
AS_IF([test "$enable_debug" = "yes"],
|
||||
[opal_pmix_pmix3x_args="--enable-debug $opal_pmix_pmix3x_args"
|
||||
[opal_pmix_pmix2x_args="--enable-debug $opal_pmix_pmix2x_args"
|
||||
CFLAGS="$OPAL_CFLAGS_BEFORE_PICKY $OPAL_VISIBILITY_CFLAGS -g"],
|
||||
[opal_pmix_pmix3x_args="--disable-debug $opal_pmix_pmix3x_args"
|
||||
[opal_pmix_pmix2x_args="--disable-debug $opal_pmix_pmix2x_args"
|
||||
CFLAGS="$OPAL_CFLAGS_BEFORE_PICKY $OPAL_VISIBILITY_CFLAGS"])
|
||||
AS_IF([test "$with_devel_headers" = "yes"], [],
|
||||
[opal_pmix_pmix3x_args="--enable-embedded-mode $opal_pmix_pmix3x_args"])
|
||||
[opal_pmix_pmix2x_args="--enable-embedded-mode $opal_pmix_pmix2x_args"])
|
||||
CPPFLAGS="-I$OPAL_TOP_SRCDIR -I$OPAL_TOP_BUILDDIR -I$OPAL_TOP_SRCDIR/opal/include -I$OPAL_TOP_BUILDDIR/opal/include $CPPFLAGS"
|
||||
|
||||
OPAL_CONFIG_SUBDIR([$opal_pmix_pmix3x_basedir/pmix],
|
||||
[$opal_pmix_pmix3x_args $opal_subdir_args 'CFLAGS=$CFLAGS' 'CPPFLAGS=$CPPFLAGS'],
|
||||
[opal_pmix_pmix3x_happy=1], [opal_pmix_pmix3x_happy=0])
|
||||
OPAL_CONFIG_SUBDIR([$opal_pmix_pmix2x_basedir/pmix],
|
||||
[$opal_pmix_pmix2x_args $opal_subdir_args 'CFLAGS=$CFLAGS' 'CPPFLAGS=$CPPFLAGS'],
|
||||
[opal_pmix_pmix2x_happy=1], [opal_pmix_pmix2x_happy=0])
|
||||
|
||||
CFLAGS=$opal_pmix_pmix3x_save_CFLAGS
|
||||
CPPFLAGS=$opal_pmix_pmix3x_save_CPPFLAGS
|
||||
LDFLAGS=$opal_pmix_pmix3x_save_LDFLAGS
|
||||
LIBS=$opal_pmix_pmix3x_save_LIBS
|
||||
CFLAGS=$opal_pmix_pmix2x_save_CFLAGS
|
||||
CPPFLAGS=$opal_pmix_pmix2x_save_CPPFLAGS
|
||||
LDFLAGS=$opal_pmix_pmix2x_save_LDFLAGS
|
||||
LIBS=$opal_pmix_pmix2x_save_LIBS
|
||||
|
||||
# If we are not building the internal pmix, then check to see
|
||||
# if we are linking to an external v3.x library. If not, then
|
||||
# if we are linking to an external v2.x library. If not, then
|
||||
# do not use this component. NOTE: we still did all the
|
||||
# above configury so that all the proper GNU Autotools
|
||||
# infrastructure is setup properly (e.g., w.r.t. SUBDIRS=pmix in
|
||||
# this directory's Makefile.am, we still need the Autotools "make
|
||||
# distclean" infrastructure to work properly).
|
||||
AC_MSG_CHECKING([if v3.x component is to be used])
|
||||
AC_MSG_CHECKING([if v2.x component is to be used])
|
||||
AS_IF([test "$opal_external_pmix_happy" = "yes"],
|
||||
[AC_MSG_RESULT([no - disqualifying this component])
|
||||
opal_pmix_pmix3x_happy=0],
|
||||
[AC_MSG_RESULT([yes - using the internal v3.x library])
|
||||
opal_pmix_pmix2x_happy=0],
|
||||
[AC_MSG_RESULT([yes - using the internal v2.x library])
|
||||
# Build flags for our Makefile.am
|
||||
opal_pmix_pmix3x_LDFLAGS=
|
||||
opal_pmix_pmix3x_LIBS='$(OPAL_TOP_BUILDDIR)/'"$opal_pmix_pmix3x_basedir"'/pmix/src/libpmix.la'
|
||||
opal_pmix_pmix3x_CPPFLAGS='-I$(OPAL_TOP_BUILDDIR)/opal/mca/pmix/pmix3x/pmix/include -I$(OPAL_TOP_BUILDDIR)/opal/mca/pmix/pmix3x/pmix -I$(OPAL_TOP_SRCDIR)/opal/mca/pmix/pmix3x/pmix/include -I$(OPAL_TOP_SRCDIR)/opal/mca/pmix/pmix3x/pmix'
|
||||
opal_pmix_pmix3x_DEPENDENCIES='$(OPAL_TOP_BUILDDIR)/opal/mca/pmix/pmix3x/pmix/src/libpmix.la'])
|
||||
opal_pmix_pmix2x_LDFLAGS=
|
||||
opal_pmix_pmix2x_LIBS='$(OPAL_TOP_BUILDDIR)/'"$opal_pmix_pmix2x_basedir"'/pmix/src/libpmix.la'
|
||||
opal_pmix_pmix2x_CPPFLAGS='-I$(OPAL_TOP_BUILDDIR)/opal/mca/pmix/pmix2x/pmix/include -I$(OPAL_TOP_BUILDDIR)/opal/mca/pmix/pmix2x/pmix -I$(OPAL_TOP_SRCDIR)/opal/mca/pmix/pmix2x/pmix/include -I$(OPAL_TOP_SRCDIR)/opal/mca/pmix/pmix2x/pmix'
|
||||
opal_pmix_pmix2x_DEPENDENCIES='$(OPAL_TOP_BUILDDIR)/opal/mca/pmix/pmix2x/pmix/src/libpmix.la'])
|
||||
|
||||
AC_SUBST([opal_pmix_pmix3x_LIBS])
|
||||
AC_SUBST([opal_pmix_pmix3x_CPPFLAGS])
|
||||
AC_SUBST([opal_pmix_pmix3x_LDFLAGS])
|
||||
AC_SUBST([opal_pmix_pmix3x_DEPENDENCIES])
|
||||
AC_SUBST([opal_pmix_pmix2x_LIBS])
|
||||
AC_SUBST([opal_pmix_pmix2x_CPPFLAGS])
|
||||
AC_SUBST([opal_pmix_pmix2x_LDFLAGS])
|
||||
AC_SUBST([opal_pmix_pmix2x_DEPENDENCIES])
|
||||
|
||||
AS_IF([test $opal_pmix_pmix3x_happy -eq 1],
|
||||
AS_IF([test $opal_pmix_pmix2x_happy -eq 1],
|
||||
[$1],
|
||||
[$2])
|
||||
|
@ -9,7 +9,7 @@ Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
All rights reserved.
|
||||
Copyright (c) 2008-2015 Cisco Systems, Inc. All rights reserved.
|
||||
Copyright (c) 2013-2015 Intel, Inc. All rights reserved.
|
||||
Copyright (c) 2013-2016 Intel, Inc. All rights reserved.
|
||||
$COPYRIGHT$
|
||||
|
||||
Additional copyrights may follow
|
||||
@ -85,4 +85,3 @@ shell$ make install
|
||||
Parallel make is generally only helpful in the build phase; the
|
||||
installation process is mostly serial and does not benefit much from
|
||||
parallel make.
|
||||
|
@ -45,7 +45,7 @@ Copyright (c) 2010 ARM ltd. All rights reserved.
|
||||
Copyright (c) 2010-2011 Alex Brick <bricka@ccs.neu.edu>. All rights reserved.
|
||||
Copyright (c) 2012 The University of Wisconsin-La Crosse. All rights
|
||||
reserved.
|
||||
Copyright (c) 2013-2014 Intel, Inc. All rights reserved.
|
||||
Copyright (c) 2013-2016 Intel, Inc. All rights reserved.
|
||||
Copyright (c) 2011-2014 NVIDIA Corporation. All rights reserved.
|
||||
|
||||
$COPYRIGHT$
|
@ -61,4 +61,3 @@ nroff:
|
||||
|
||||
dist-hook:
|
||||
env LS_COLORS= sh "$(top_srcdir)/config/distscript.sh" "$(top_srcdir)" "$(distdir)" "$(PMIX_VERSION)" "$(PMIX_REPO_REV)"
|
||||
|
@ -15,7 +15,7 @@ Copyright (c) 2007 Myricom, Inc. All rights reserved.
|
||||
Copyright (c) 2008 IBM Corporation. All rights reserved.
|
||||
Copyright (c) 2010 Oak Ridge National Labs. All rights reserved.
|
||||
Copyright (c) 2011 University of Houston. All rights reserved.
|
||||
Copyright (c) 2013-2015 Intel, Inc. All rights reserved
|
||||
Copyright (c) 2013-2016 Intel, Inc. All rights reserved.
|
||||
$COPYRIGHT$
|
||||
|
||||
Additional copyrights may follow
|
||||
@ -269,7 +269,7 @@ PMIx provides forward ABI compatibility in all versions of a given
|
||||
feature release series and its corresponding
|
||||
super stable series. For example, on a single platform, an pmix
|
||||
application linked against PMIx v1.3.2 shared libraries can be
|
||||
updated to point to the shared libraries in any successive v1.3.x or
|
||||
updated to point to the shared libraries in any successive v1.2.x or
|
||||
v1.4 release and still work properly (e.g., via the LD_LIBRARY_PATH
|
||||
environment variable or other operating system mechanism).
|
||||
|
@ -11,7 +11,7 @@ dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2015 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
dnl $COPYRIGHT$
|
1
opal/mca/pmix/pmix3x/pmix/config/distscript.sh → opal/mca/pmix/pmix2x/pmix/config/distscript.sh
Исполняемый файл → Обычный файл
1
opal/mca/pmix/pmix3x/pmix/config/distscript.sh → opal/mca/pmix/pmix2x/pmix/config/distscript.sh
Исполняемый файл → Обычный файл
@ -15,6 +15,7 @@
|
||||
# and Technology (RIST). All rights reserved.
|
||||
# Copyright (c) 2015 Los Alamos National Security, LLC. All rights
|
||||
# reserved.
|
||||
# Copyright (c) 2016 Intel, Inc. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
@ -278,7 +278,7 @@ AC_DEFUN([PMIX_SETUP_CORE],[
|
||||
# fails
|
||||
# - checks for __inline__, which then emits no error, and works
|
||||
#
|
||||
# This also works nicely for gcc 3.x because "inline" will work on
|
||||
# This also works nicely for gcc 2.x because "inline" will work on
|
||||
# the first check, and all is fine. :-)
|
||||
|
||||
PMIX_CFLAGS_save=$CFLAGS
|
@ -1,6 +1,6 @@
|
||||
# -*- shell-script -*-
|
||||
# PMIx copyrights:
|
||||
# Copyright (c) 2013 Intel, Inc. All rights reserved
|
||||
# Copyright (c) 2013-2016 Intel, Inc. All rights reserved.
|
||||
#
|
||||
#########################
|
||||
#
|
@ -11,7 +11,7 @@ dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
@ -1,7 +1,7 @@
|
||||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
|
||||
dnl Copyright (c) 2013 Intel, Inc. All rights reserved
|
||||
dnl Copyright (c) 2013-2016 Intel, Inc. All rights reserved.
|
||||
dnl
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
@ -10,7 +10,7 @@ dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2014 Intel, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2016 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
dnl $COPYRIGHT$
|
@ -1,7 +1,7 @@
|
||||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2015 Intel, Inc. All rights reserved
|
||||
dnl Copyright (c) 2015-2016 Intel, Inc. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
@ -12,7 +12,7 @@
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2012-2015 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014 Intel, Inc. All rights reserved.
|
||||
# Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
@ -11,7 +11,7 @@ dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
|
||||
dnl Copyright (c) 2013 Intel, Inc. All rights reserved
|
||||
dnl Copyright (c) 2013-2016 Intel, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2015 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
@ -12,6 +12,7 @@
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2009-2011 Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2016 Intel, Inc. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
@ -11,7 +11,7 @@ dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2012-2016 Cisco Systems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2014 Intel, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2015 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
dnl $COPYRIGHT$
|
@ -12,7 +12,7 @@ dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2007-2009 Sun Microsystems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2008-2015 Cisco Systems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2013 Intel, Inc. All rights reserved
|
||||
dnl Copyright (c) 2013-2016 Intel, Inc. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
@ -13,7 +13,7 @@ dnl All rights reserved.
|
||||
dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
|
||||
dnl Copyright (c) 2009-2016 Cisco Systems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2013 Intel, Inc. All rights reserved
|
||||
dnl Copyright (c) 2013-2016 Intel, Inc. All rights reserved.
|
||||
dnl
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
2
opal/mca/pmix/pmix3x/pmix/config/pmix_get_version.sh → opal/mca/pmix/pmix2x/pmix/config/pmix_get_version.sh
Исполняемый файл → Обычный файл
2
opal/mca/pmix/pmix3x/pmix/config/pmix_get_version.sh → opal/mca/pmix/pmix2x/pmix/config/pmix_get_version.sh
Исполняемый файл → Обычный файл
@ -11,7 +11,7 @@
|
||||
# Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2008-2015 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2015 Intel, Inc. All rights reserved
|
||||
# Copyright (c) 2015-2016 Intel, Inc. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
@ -10,7 +10,7 @@ dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2015 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
dnl $COPYRIGHT$
|
1
opal/mca/pmix/pmix3x/pmix/config/pmix_mca_priority_sort.pl → opal/mca/pmix/pmix2x/pmix/config/pmix_mca_priority_sort.pl
Исполняемый файл → Обычный файл
1
opal/mca/pmix/pmix3x/pmix/config/pmix_mca_priority_sort.pl → opal/mca/pmix/pmix2x/pmix/config/pmix_mca_priority_sort.pl
Исполняемый файл → Обычный файл
@ -2,6 +2,7 @@
|
||||
#
|
||||
# Copyright (c) 2010 Sandia National Laboratories. All rights reserved.
|
||||
#
|
||||
# Copyright (c) 2016 Intel, Inc. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
@ -1,7 +1,7 @@
|
||||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2013-2014 Cisco Systems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2014 Intel, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
@ -16,7 +16,7 @@ dnl Copyright (c) 2012 Los Alamos National Security, LLC. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2015 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
dnl Copyright (c) 2015 Intel, Inc. All rights reserved
|
||||
dnl Copyright (c) 2015-2016 Intel, Inc. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
@ -19,7 +19,7 @@
|
||||
# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2013 Mellanox Technologies, Inc.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2014-2015 Intel, Inc. All rights reserved
|
||||
# Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
|
||||
# Copyright (c) 2016 IBM Corporation. All rights reserved.
|
||||
# Copyright (c) 2016 Research Organization for Information Science
|
||||
# and Technology (RIST). All rights reserved.
|
@ -1,6 +1,6 @@
|
||||
# -*- text -*-
|
||||
#
|
||||
# Copyright (c) 2015 Intel, Inc. All rights reserved.
|
||||
# Copyright (c) 2015-2016 Intel, Inc. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
@ -44,5 +44,3 @@
|
||||
fun:PMIx_init
|
||||
fun:main
|
||||
}
|
||||
|
||||
|
74
opal/mca/pmix/pmix2x/pmix/include/pmix_rename.h
Обычный файл
74
opal/mca/pmix/pmix2x/pmix/include/pmix_rename.h
Обычный файл
@ -0,0 +1,74 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Intel, Inc. All rights reserved
|
||||
* Copyright (c) 2016 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#ifndef PMIX_RENAME_H
|
||||
#define PMIX_RENAME_H
|
||||
|
||||
#define PMIx_Init OPAL_MCA_PMIX3X_PMIx_Init
|
||||
#define PMIx_Initialized OPAL_MCA_PMIX3X_PMIx_Initialized
|
||||
#define PMIx_Finalize OPAL_MCA_PMIX3X_PMIx_Finalize
|
||||
#define PMIx_Abort OPAL_MCA_PMIX3X_PMIx_Abort
|
||||
#define PMIx_Put OPAL_MCA_PMIX3X_PMIx_Put
|
||||
#define PMIx_Commit OPAL_MCA_PMIX3X_PMIx_Commit
|
||||
#define PMIx_Fence OPAL_MCA_PMIX3X_PMIx_Fence
|
||||
#define PMIx_Fence_nb OPAL_MCA_PMIX3X_PMIx_Fence_nb
|
||||
#define PMIx_Get OPAL_MCA_PMIX3X_PMIx_Get
|
||||
#define PMIx_Get_nb OPAL_MCA_PMIX3X_PMIx_Get_nb
|
||||
#define PMIx_Publish OPAL_MCA_PMIX3X_PMIx_Publish
|
||||
#define PMIx_Publish_nb OPAL_MCA_PMIX3X_PMIx_Publish_nb
|
||||
#define PMIx_Lookup OPAL_MCA_PMIX3X_PMIx_Lookup
|
||||
#define PMIx_Lookup_nb OPAL_MCA_PMIX3X_PMIx_Lookup_nb
|
||||
#define PMIx_Unpublish OPAL_MCA_PMIX3X_PMIx_Unpublish
|
||||
#define PMIx_Unpublish_nb OPAL_MCA_PMIX3X_PMIx_Unpublish_nb
|
||||
#define PMIx_Spawn OPAL_MCA_PMIX3X_PMIx_Spawn
|
||||
#define PMIx_Spawn_nb OPAL_MCA_PMIX3X_PMIx_Spawn_nb
|
||||
#define PMIx_Connect OPAL_MCA_PMIX3X_PMIx_Connect
|
||||
#define PMIx_Connect_nb OPAL_MCA_PMIX3X_PMIx_Connect_nb
|
||||
#define PMIx_Disconnect OPAL_MCA_PMIX3X_PMIx_Disconnect
|
||||
#define PMIx_Disconnect_nb OPAL_MCA_PMIX3X_PMIx_Disconnect_nb
|
||||
#define PMIx_Resolve_peers OPAL_MCA_PMIX3X_PMIx_Resolve_peers
|
||||
#define PMIx_Resolve_nodes OPAL_MCA_PMIX3X_PMIx_Resolve_nodes
|
||||
#define PMIx_Query_info_nb OPAL_MCA_PMIX3X_PMIx_Query_info_nb
|
||||
#define PMIx_Log_nb OPAL_MCA_PMIX3X_PMIx_Log_nb
|
||||
|
||||
#define PMIx_server_init OPAL_MCA_PMIX3X_PMIx_server_init
|
||||
#define PMIx_server_finalize OPAL_MCA_PMIX3X_PMIx_server_finalize
|
||||
#define PMIx_generate_regex OPAL_MCA_PMIX3X_PMIx_generate_regex
|
||||
#define PMIx_generate_ppn OPAL_MCA_PMIX3X_PMIx_generate_ppn
|
||||
#define PMIx_server_register_nspace OPAL_MCA_PMIX3X_PMIx_server_register_nspace
|
||||
#define PMIx_server_deregister_nspace OPAL_MCA_PMIX3X_PMIx_server_deregister_nspace
|
||||
#define PMIx_server_register_client OPAL_MCA_PMIX3X_PMIx_server_register_client
|
||||
#define PMIx_server_deregister_client OPAL_MCA_PMIX3X_PMIx_server_deregister_client
|
||||
#define PMIx_server_setup_fork OPAL_MCA_PMIX3X_PMIx_server_setup_fork
|
||||
#define PMIx_server_dmodex_request OPAL_MCA_PMIX3X_PMIx_server_dmodex_request
|
||||
|
||||
#define PMIx_tool_init OPAL_MCA_PMIX3X_PMIx_tool_init
|
||||
#define PMIx_tool_finalize OPAL_MCA_PMIX3X_PMIx_tool_finalize
|
||||
|
||||
#define PMIx_Register_event_handler OPAL_MCA_PMIX3X_PMIx_Register_event_handler
|
||||
#define PMIx_Deregister_event_handler OPAL_MCA_PMIX3X_PMIx_Deregister_event_handler
|
||||
#define PMIx_Notify_event OPAL_MCA_PMIX3X_PMIx_Notify_event
|
||||
#define PMIx_Error_string OPAL_MCA_PMIX3X_PMIx_Error_string
|
||||
#define PMIx_Proc_state_string OPAL_MCA_PMIX3X_PMIx_Proc_state_string
|
||||
#define PMIx_Persistence_string OPAL_MCA_PMIX3X_PMIx_Persistence_string
|
||||
#define PMIx_Data_range_string OPAL_MCA_PMIX3X_PMIx_Data_range_string
|
||||
#define PMIx_Info_directives_string OPAL_MCA_PMIX3X_PMIx_Info_directives_string
|
||||
#define PMIx_Data_type_string OPAL_MCA_PMIX3X_PMIx_Data_type_string
|
||||
#define PMIx_Get_version OPAL_MCA_PMIX3X_PMIx_Get_version
|
||||
#define PMIx_Store_internal OPAL_MCA_PMIX3X_PMIx_Store_internal
|
||||
|
||||
#define pmix_value_load OPAL_MCA_PMIX3X_pmix_value_load
|
||||
#define pmix_value_xfer OPAL_MCA_PMIX3X_pmix_value_xfer
|
||||
#define pmix_globals OPAL_MCA_PMIX3X_pmix_globals
|
||||
#define pmix_output OPAL_MCA_PMIX3X_pmix_output
|
||||
#define pmix_output_verbose OPAL_MCA_PMIX3X_pmix_output_verbose
|
||||
|
||||
#endif
|
20
opal/mca/pmix/pmix2x/pmix/include/pmix_version.h
Обычный файл
20
opal/mca/pmix/pmix2x/pmix/include/pmix_version.h
Обычный файл
@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Mellanox Technologies, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2016 Intel, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
|
||||
#ifndef PMIx_VERSION_H
|
||||
#define PMIx_VERSION_H
|
||||
|
||||
/* define PMIx version */
|
||||
#define PMIX_VERSION_MAJOR 2L
|
||||
#define PMIX_VERSION_MINOR 0L
|
||||
|
||||
#endif
|
@ -9,7 +9,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2015 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2015-2016 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2016 IBM Corporation. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
@ -662,4 +662,3 @@ pmix_status_t pmix_value_unload(pmix_value_t *kv, void **data,
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
@ -12,7 +12,7 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2007-2011 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved.
|
||||
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
@ -11,7 +11,7 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2014-2015 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved
|
||||
* Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
x
Ссылка в новой задаче
Block a user