Remove the PMIx ext4x component
Update configury to redirect anything at or above v3 to the ext3x component Signed-off-by: Ralph Castain <rhc@open-mpi.org>
Этот коммит содержится в:
родитель
b12868239c
Коммит
4a596d35f7
@ -338,25 +338,11 @@ AC_DEFUN([OPAL_CHECK_PMIX],[
|
||||
# if it does exist, then we need to parse it to find
|
||||
# the actual release series
|
||||
AS_IF([test "$opal_external_pmix_version_found" = "0"],
|
||||
[AC_MSG_CHECKING([version 4x])
|
||||
[AC_MSG_CHECKING([version 3x or above])
|
||||
AC_PREPROC_IFELSE([AC_LANG_PROGRAM([
|
||||
#include <pmix_version.h>
|
||||
#if (PMIX_VERSION_MAJOR != 4L)
|
||||
#error "not version 4"
|
||||
#endif
|
||||
], [])],
|
||||
[AC_MSG_RESULT([found])
|
||||
opal_external_pmix_version=4x
|
||||
opal_external_pmix_version_found=1
|
||||
opal_external_pmix_happy=yes],
|
||||
[AC_MSG_RESULT([not found])])])
|
||||
|
||||
AS_IF([test "$opal_external_pmix_version_found" = "0"],
|
||||
[AC_MSG_CHECKING([version 3x])
|
||||
AC_PREPROC_IFELSE([AC_LANG_PROGRAM([
|
||||
#include <pmix_version.h>
|
||||
#if (PMIX_VERSION_MAJOR != 3L)
|
||||
#error "not version 3"
|
||||
#if (PMIX_VERSION_MAJOR < 3L)
|
||||
#error "not version 3 or above"
|
||||
#endif
|
||||
], [])],
|
||||
[AC_MSG_RESULT([found])
|
||||
|
@ -1,54 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2014-2018 Intel, Inc. All rights reserved.
|
||||
# Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2015-2018 Research Organization for Information Science
|
||||
# and Technology (RIST). All rights reserved.
|
||||
# Copyright (c) 2017 IBM Corporation. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
dist_opaldata_DATA = help-pmix-ext4x.txt
|
||||
|
||||
sources = \
|
||||
ext4x.c \
|
||||
ext4x_client.c \
|
||||
ext4x_component.c \
|
||||
ext4x_server_north.c \
|
||||
ext4x_server_south.c \
|
||||
ext4x_local.c
|
||||
|
||||
headers = \
|
||||
ext4x.h
|
||||
|
||||
|
||||
# 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_ext4x_DSO
|
||||
component_noinst =
|
||||
component_install = mca_pmix_ext4x.la
|
||||
else
|
||||
component_noinst = libmca_pmix_ext4x.la
|
||||
component_install =
|
||||
endif
|
||||
|
||||
mcacomponentdir = $(opallibdir)
|
||||
mcacomponent_LTLIBRARIES = $(component_install)
|
||||
mca_pmix_ext4x_la_SOURCES = $(sources)
|
||||
mca_pmix_ext4x_la_CFLAGS = $(opal_pmix_ext4x_CFLAGS)
|
||||
mca_pmix_ext4x_la_CPPFLAGS =$(opal_pmix_ext4x_CPPFLAGS)
|
||||
mca_pmix_ext4x_la_LDFLAGS = -module -avoid-version $(opal_pmix_ext4x_LDFLAGS)
|
||||
mca_pmix_ext4x_la_LIBADD = $(top_builddir)/opal/lib@OPAL_LIB_PREFIX@open-pal.la \
|
||||
$(opal_pmix_ext4x_LIBS)
|
||||
|
||||
noinst_LTLIBRARIES = $(component_noinst)
|
||||
libmca_pmix_ext4x_la_SOURCES =$(sources)
|
||||
libmca_pmix_ext4x_la_CFLAGS = $(opal_pmix_ext4x_CFLAGS)
|
||||
libmca_pmix_ext4x_la_CPPFLAGS = $(opal_pmix_ext4x_CPPFLAGS)
|
||||
libmca_pmix_ext4x_la_LDFLAGS = -module -avoid-version $(opal_pmix_ext4x_LDFLAGS)
|
||||
libmca_pmix_ext4x_la_LIBADD = $(opal_pmix_ext4x_LIBS)
|
@ -1,64 +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-2015 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2013-2018 Intel, Inc. All rights reserved.
|
||||
# Copyright (c) 2015-2017 Research Organization for Information Science
|
||||
# and Technology (RIST). All rights reserved.
|
||||
# Copyright (c) 2014-2015 Mellanox Technologies, Inc.
|
||||
# All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
# MCA_pmix_ext4x_CONFIG([action-if-found], [action-if-not-found])
|
||||
# -----------------------------------------------------------
|
||||
AC_DEFUN([MCA_opal_pmix_ext4x_CONFIG],[
|
||||
AC_CONFIG_FILES([opal/mca/pmix/ext4x/Makefile])
|
||||
|
||||
AS_IF([test "$opal_external_pmix_happy" = "yes"],
|
||||
[ # check for the 4.x version
|
||||
AC_MSG_CHECKING([if external component is version 4.x])
|
||||
AS_IF([test "$opal_external_pmix_version" = "4x"],
|
||||
[AC_MSG_RESULT([yes])
|
||||
AS_IF([test "$opal_event_external_support" != "yes"],
|
||||
[AC_MSG_WARN([EXTERNAL PMIX SUPPORT REQUIRES USE OF EXTERNAL LIBEVENT])
|
||||
AC_MSG_WARN([AND HWLOC LIBRARIES. THESE LIBRARIES MUST POINT TO THE])
|
||||
AC_MSG_WARN([SAME ONES USED TO BUILD PMIX OR ELSE UNPREDICTABLE])
|
||||
AC_MSG_WARN([BEHAVIOR MAY RESULT])
|
||||
AC_MSG_ERROR([PLEASE CORRECT THE CONFIGURE COMMAND LINE AND REBUILD])])
|
||||
opal_pmix_external_4x_happy=yes],
|
||||
[AC_MSG_RESULT([no])
|
||||
opal_pmix_external_4x_happy=no])
|
||||
|
||||
AS_IF([test "$opal_pmix_external_4x_happy" = "yes"],
|
||||
[$1
|
||||
# need to set the wrapper flags for static builds
|
||||
pmix_ext4x_WRAPPER_EXTRA_LDFLAGS=$opal_external_pmix_LDFLAGS
|
||||
pmix_ext4x_WRAPPER_EXTRA_LIBS=$opal_external_pmix_LIBS],
|
||||
[$2])],
|
||||
[$2])
|
||||
|
||||
opal_pmix_ext4x_CPPFLAGS=$opal_external_pmix_CPPFLAGS
|
||||
opal_pmix_ext4x_LDFLAGS=$opal_external_pmix_LDFLAGS
|
||||
opal_pmix_ext4x_LIBS=$opal_external_pmix_LIBS
|
||||
|
||||
AC_SUBST([opal_pmix_ext4x_CPPFLAGS])
|
||||
AC_SUBST([opal_pmix_ext4x_LDFLAGS])
|
||||
AC_SUBST([opal_pmix_ext4x_LIBS])
|
||||
|
||||
])dnl
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
@ -1,351 +0,0 @@
|
||||
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
||||
/*
|
||||
* Copyright (c) 2014-2018 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014-2015 Mellanox Technologies, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2016 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2017 Los Alamos National Security, LLC. 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/base/base.h"
|
||||
#include "pmix_server.h"
|
||||
#include "pmix_common.h"
|
||||
|
||||
BEGIN_C_DECLS
|
||||
|
||||
typedef struct {
|
||||
opal_pmix_base_component_t super;
|
||||
pmix_proc_t myproc;
|
||||
opal_list_t jobids;
|
||||
bool native_launch;
|
||||
size_t evindex;
|
||||
opal_list_t events;
|
||||
int cache_size;
|
||||
opal_list_t cache;
|
||||
opal_list_t dmdx;
|
||||
bool silence_warning;
|
||||
} mca_pmix_ext4x_component_t;
|
||||
|
||||
OPAL_DECLSPEC extern mca_pmix_ext4x_component_t mca_pmix_ext4x_component;
|
||||
|
||||
OPAL_DECLSPEC extern const opal_pmix_base_module_t opal_pmix_ext4x_module;
|
||||
|
||||
/**** INTERNAL OBJECTS ****/
|
||||
typedef struct {
|
||||
opal_list_item_t super;
|
||||
opal_jobid_t jobid;
|
||||
char nspace[PMIX_MAX_NSLEN + 1];
|
||||
} opal_ext4x_jobid_trkr_t;
|
||||
OBJ_CLASS_DECLARATION(opal_ext4x_jobid_trkr_t);
|
||||
|
||||
typedef struct {
|
||||
opal_list_item_t super;
|
||||
opal_pmix_lock_t lock;
|
||||
size_t index;
|
||||
opal_pmix_notification_fn_t handler;
|
||||
void *cbdata;
|
||||
} opal_ext4x_event_t;
|
||||
OBJ_CLASS_DECLARATION(opal_ext4x_event_t);
|
||||
|
||||
typedef struct {
|
||||
opal_list_item_t super;
|
||||
char *nspace;
|
||||
pmix_modex_cbfunc_t cbfunc;
|
||||
void *cbdata;
|
||||
} opal_ext4x_dmx_trkr_t;
|
||||
OBJ_CLASS_DECLARATION(opal_ext4x_dmx_trkr_t);
|
||||
|
||||
typedef struct {
|
||||
opal_object_t super;
|
||||
opal_event_t ev;
|
||||
pmix_status_t status;
|
||||
char *nspace;
|
||||
pmix_proc_t p;
|
||||
pmix_proc_t *procs;
|
||||
size_t nprocs;
|
||||
pmix_pdata_t *pdata;
|
||||
size_t npdata;
|
||||
pmix_proc_t *error_procs;
|
||||
size_t nerror_procs;
|
||||
pmix_info_t *info;
|
||||
size_t ninfo;
|
||||
pmix_app_t *apps;
|
||||
size_t sz;
|
||||
opal_pmix_lock_t lock;
|
||||
opal_list_t *codes;
|
||||
pmix_status_t *pcodes;
|
||||
size_t ncodes;
|
||||
pmix_query_t *queries;
|
||||
size_t nqueries;
|
||||
opal_ext4x_event_t *event;
|
||||
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;
|
||||
opal_pmix_evhandler_reg_cbfunc_t evregcbfunc;
|
||||
opal_pmix_info_cbfunc_t qcbfunc;
|
||||
opal_pmix_setup_application_cbfunc_t setupcbfunc;
|
||||
void *cbdata;
|
||||
} ext4x_opcaddy_t;
|
||||
OBJ_CLASS_DECLARATION(ext4x_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;
|
||||
} ext4x_opalcaddy_t;
|
||||
OBJ_CLASS_DECLARATION(ext4x_opalcaddy_t);
|
||||
|
||||
typedef struct {
|
||||
opal_object_t super;
|
||||
opal_event_t ev;
|
||||
opal_pmix_lock_t lock;
|
||||
const char *msg;
|
||||
char *strings;
|
||||
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_value_t *val;
|
||||
opal_list_t *event_codes;
|
||||
opal_list_t *info;
|
||||
opal_list_t results;
|
||||
opal_pmix_notification_fn_t evhandler;
|
||||
opal_pmix_evhandler_reg_cbfunc_t cbfunc;
|
||||
opal_pmix_op_cbfunc_t opcbfunc;
|
||||
pmix_event_notification_cbfunc_fn_t pmixcbfunc;
|
||||
opal_pmix_value_cbfunc_t valcbfunc;
|
||||
opal_pmix_lookup_cbfunc_t lkcbfunc;
|
||||
void *cbdata;
|
||||
} ext4x_threadshift_t;
|
||||
OBJ_CLASS_DECLARATION(ext4x_threadshift_t);
|
||||
|
||||
#define OPAL_PMIX_OP_THREADSHIFT(e, fn, cb, cd) \
|
||||
do { \
|
||||
ext4x_threadshift_t *_cd; \
|
||||
_cd = OBJ_NEW(ext4x_threadshift_t); \
|
||||
_cd->handler = (e); \
|
||||
_cd->opcbfunc = (cb); \
|
||||
_cd->cbdata = (cd); \
|
||||
opal_event_assign(&((_cd)->ev), opal_pmix_base.evbase, \
|
||||
-1, EV_WRITE, (fn), (_cd)); \
|
||||
OPAL_POST_OBJECT(_cd); \
|
||||
opal_event_active(&((_cd)->ev), EV_WRITE, 1); \
|
||||
} while(0)
|
||||
|
||||
#define OPAL_PMIX_THREADSHIFT(e, i, eh, fn, cb, cd) \
|
||||
do { \
|
||||
ext4x_threadshift_t *_cd; \
|
||||
_cd = OBJ_NEW(ext4x_threadshift_t); \
|
||||
_cd->event_codes = (e); \
|
||||
_cd->info = (i); \
|
||||
_cd->evhandler = (eh); \
|
||||
_cd->cbfunc = (cb); \
|
||||
_cd->cbdata = (cd); \
|
||||
opal_event_assign(&((_cd)->ev), opal_pmix_base.evbase, \
|
||||
-1, EV_WRITE, (fn), (_cd)); \
|
||||
OPAL_POST_OBJECT(_cd); \
|
||||
opal_event_active(&((_cd)->ev), EV_WRITE, 1); \
|
||||
} while(0)
|
||||
|
||||
#define OPAL_PMIX_NOTIFY_THREADSHIFT(s, sr, r, i, fn, cb, cd) \
|
||||
do { \
|
||||
ext4x_threadshift_t *_cd; \
|
||||
_cd = OBJ_NEW(ext4x_threadshift_t); \
|
||||
_cd->status = (s); \
|
||||
_cd->source = (sr); \
|
||||
_cd->range = (r); \
|
||||
_cd->info = (i); \
|
||||
_cd->opcbfunc = (cb); \
|
||||
_cd->cbdata = (cd); \
|
||||
opal_event_assign(&((_cd)->ev), opal_pmix_base.evbase, \
|
||||
-1, EV_WRITE, (fn), (_cd)); \
|
||||
OPAL_POST_OBJECT(_cd); \
|
||||
opal_event_active(&((_cd)->ev), EV_WRITE, 1); \
|
||||
} while(0)
|
||||
|
||||
#define OPAL_PMIX2X_THREADSHIFT(p, cb) \
|
||||
do { \
|
||||
opal_event_assign(&((p)->ev), opal_pmix_base.evbase, \
|
||||
-1, EV_WRITE, (cb), (p)); \
|
||||
OPAL_POST_OBJECT(p); \
|
||||
opal_event_active(&((p)->ev), EV_WRITE, 1); \
|
||||
} while(0)
|
||||
|
||||
/**** CLIENT FUNCTIONS ****/
|
||||
OPAL_MODULE_DECLSPEC int ext4x_client_init(opal_list_t *ilist);
|
||||
OPAL_MODULE_DECLSPEC int ext4x_client_finalize(void);
|
||||
OPAL_MODULE_DECLSPEC int ext4x_initialized(void);
|
||||
OPAL_MODULE_DECLSPEC int ext4x_abort(int flag, const char *msg,
|
||||
opal_list_t *procs);
|
||||
OPAL_MODULE_DECLSPEC int ext4x_commit(void);
|
||||
OPAL_MODULE_DECLSPEC int ext4x_fence(opal_list_t *procs, int collect_data);
|
||||
OPAL_MODULE_DECLSPEC int ext4x_fencenb(opal_list_t *procs, int collect_data,
|
||||
opal_pmix_op_cbfunc_t cbfunc, void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC int ext4x_put(opal_pmix_scope_t scope,
|
||||
opal_value_t *val);
|
||||
OPAL_MODULE_DECLSPEC int ext4x_get(const opal_process_name_t *proc, const char *key,
|
||||
opal_list_t *info, opal_value_t **val);
|
||||
OPAL_MODULE_DECLSPEC int ext4x_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 ext4x_publish(opal_list_t *info);
|
||||
OPAL_MODULE_DECLSPEC int ext4x_publishnb(opal_list_t *info,
|
||||
opal_pmix_op_cbfunc_t cbfunc, void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC int ext4x_lookup(opal_list_t *data, opal_list_t *info);
|
||||
OPAL_MODULE_DECLSPEC int ext4x_lookupnb(char **keys, opal_list_t *info,
|
||||
opal_pmix_lookup_cbfunc_t cbfunc, void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC int ext4x_unpublish(char **keys, opal_list_t *info);
|
||||
OPAL_MODULE_DECLSPEC int ext4x_unpublishnb(char **keys, opal_list_t *info,
|
||||
opal_pmix_op_cbfunc_t cbfunc, void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC int ext4x_spawn(opal_list_t *job_info, opal_list_t *apps, opal_jobid_t *jobid);
|
||||
OPAL_MODULE_DECLSPEC int ext4x_spawnnb(opal_list_t *job_info, opal_list_t *apps,
|
||||
opal_pmix_spawn_cbfunc_t cbfunc, void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC int ext4x_connect(opal_list_t *procs);
|
||||
OPAL_MODULE_DECLSPEC int ext4x_connectnb(opal_list_t *procs,
|
||||
opal_pmix_op_cbfunc_t cbfunc,
|
||||
void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC int ext4x_disconnect(opal_list_t *procs);
|
||||
OPAL_MODULE_DECLSPEC int ext4x_disconnectnb(opal_list_t *procs,
|
||||
opal_pmix_op_cbfunc_t cbfunc,
|
||||
void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC int ext4x_resolve_peers(const char *nodename, opal_jobid_t jobid,
|
||||
opal_list_t *procs);
|
||||
OPAL_MODULE_DECLSPEC int ext4x_resolve_nodes(opal_jobid_t jobid, char **nodelist);
|
||||
OPAL_MODULE_DECLSPEC int ext4x_allocate(opal_pmix_alloc_directive_t directive,
|
||||
opal_list_t *info,
|
||||
opal_pmix_info_cbfunc_t cbfunc, void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC int ext4x_job_control(opal_list_t *targets,
|
||||
opal_list_t *directives,
|
||||
opal_pmix_info_cbfunc_t cbfunc, void *cbdata);
|
||||
|
||||
/**** TOOL FUNCTIONS ****/
|
||||
OPAL_MODULE_DECLSPEC int ext4x_tool_init(opal_list_t *info);
|
||||
OPAL_MODULE_DECLSPEC int ext4x_tool_fini(void);
|
||||
|
||||
/**** COMMON FUNCTIONS ****/
|
||||
OPAL_MODULE_DECLSPEC int ext4x_store_local(const opal_process_name_t *proc,
|
||||
opal_value_t *val);
|
||||
|
||||
/**** SERVER SOUTHBOUND FUNCTIONS ****/
|
||||
OPAL_MODULE_DECLSPEC int ext4x_server_init(opal_pmix_server_module_t *module,
|
||||
opal_list_t *info);
|
||||
OPAL_MODULE_DECLSPEC int ext4x_server_finalize(void);
|
||||
OPAL_MODULE_DECLSPEC int ext4x_server_gen_regex(const char *input, char **regex);
|
||||
OPAL_MODULE_DECLSPEC int ext4x_server_gen_ppn(const char *input, char **ppn);
|
||||
OPAL_MODULE_DECLSPEC int ext4x_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 ext4x_server_deregister_nspace(opal_jobid_t jobid,
|
||||
opal_pmix_op_cbfunc_t cbfunc,
|
||||
void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC int ext4x_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 ext4x_server_deregister_client(const opal_process_name_t *proc,
|
||||
opal_pmix_op_cbfunc_t cbfunc,
|
||||
void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC int ext4x_server_setup_fork(const opal_process_name_t *proc, char ***env);
|
||||
OPAL_MODULE_DECLSPEC int ext4x_server_dmodex(const opal_process_name_t *proc,
|
||||
opal_pmix_modex_cbfunc_t cbfunc, void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC int ext4x_server_notify_event(int status,
|
||||
const opal_process_name_t *source,
|
||||
opal_list_t *info,
|
||||
opal_pmix_op_cbfunc_t cbfunc, void *cbdata);
|
||||
|
||||
OPAL_MODULE_DECLSPEC int ext4x_server_iof_push(const opal_process_name_t *source,
|
||||
opal_pmix_iof_channel_t channel,
|
||||
unsigned char *data, size_t nbytes);
|
||||
|
||||
OPAL_MODULE_DECLSPEC int ext4x_server_setup_application(opal_jobid_t jobid,
|
||||
opal_list_t *info,
|
||||
opal_pmix_setup_application_cbfunc_t cbfunc, void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC int ext4x_server_setup_local_support(opal_jobid_t jobid,
|
||||
opal_list_t *info,
|
||||
opal_pmix_op_cbfunc_t cbfunc, void *cbdata);
|
||||
|
||||
/**** COMPONENT UTILITY FUNCTIONS ****/
|
||||
OPAL_MODULE_DECLSPEC int opal_pmix_ext4x_check_evars(void);
|
||||
|
||||
OPAL_MODULE_DECLSPEC void ext4x_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 ext4x_convert_opalrc(int rc);
|
||||
OPAL_MODULE_DECLSPEC int ext4x_convert_rc(pmix_status_t rc);
|
||||
|
||||
OPAL_MODULE_DECLSPEC opal_vpid_t ext4x_convert_rank(pmix_rank_t rank);
|
||||
OPAL_MODULE_DECLSPEC pmix_rank_t ext4x_convert_opalrank(opal_vpid_t vpid);
|
||||
|
||||
OPAL_MODULE_DECLSPEC opal_pmix_scope_t ext4x_convert_scope(pmix_scope_t scope);
|
||||
OPAL_MODULE_DECLSPEC pmix_scope_t ext4x_convert_opalscope(opal_pmix_scope_t scope);
|
||||
|
||||
OPAL_MODULE_DECLSPEC pmix_data_range_t ext4x_convert_opalrange(opal_pmix_data_range_t range);
|
||||
OPAL_MODULE_DECLSPEC opal_pmix_data_range_t ext4x_convert_range(pmix_data_range_t range);
|
||||
|
||||
OPAL_MODULE_DECLSPEC opal_pmix_persistence_t ext4x_convert_persist(pmix_persistence_t scope);
|
||||
OPAL_MODULE_DECLSPEC pmix_persistence_t ext4x_convert_opalpersist(opal_pmix_persistence_t scope);
|
||||
|
||||
OPAL_MODULE_DECLSPEC void ext4x_value_load(pmix_value_t *v,
|
||||
opal_value_t *kv);
|
||||
OPAL_MODULE_DECLSPEC int ext4x_value_unload(opal_value_t *kv,
|
||||
const pmix_value_t *v);
|
||||
|
||||
OPAL_MODULE_DECLSPEC opal_pmix_alloc_directive_t ext4x_convert_allocdir(pmix_alloc_directive_t dir);
|
||||
|
||||
OPAL_MODULE_DECLSPEC char* ext4x_convert_jobid(opal_jobid_t jobid);
|
||||
|
||||
OPAL_MODULE_DECLSPEC int ext4x_convert_state(pmix_proc_state_t state);
|
||||
|
||||
OPAL_MODULE_DECLSPEC pmix_proc_state_t ext4x_convert_opalstate(int state);
|
||||
|
||||
|
||||
END_C_DECLS
|
||||
|
||||
#endif /* MCA_PMIX_EXTERNAL_H */
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
@ -1,153 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2018 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014-2015 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2016-2018 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/util/show_help.h"
|
||||
#include "opal/mca/pmix/pmix.h"
|
||||
#include "ext4x.h"
|
||||
|
||||
/*
|
||||
* Public string showing the pmix external component version number
|
||||
*/
|
||||
const char *opal_pmix_ext4x_component_version_string =
|
||||
"OPAL ext4x MCA component version " OPAL_VERSION;
|
||||
|
||||
/*
|
||||
* Local function
|
||||
*/
|
||||
static int external_register(void);
|
||||
static int external_open(void);
|
||||
static int external_close(void);
|
||||
static int external_component_query(mca_base_module_t **module, int *priority);
|
||||
|
||||
/*
|
||||
* Local variable
|
||||
*/
|
||||
static char *pmix_library_version = NULL;
|
||||
|
||||
|
||||
/*
|
||||
* Instantiate the public struct with all of our public information
|
||||
* and pointers to our public functions in it
|
||||
*/
|
||||
|
||||
mca_pmix_ext4x_component_t mca_pmix_ext4x_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 = "ext4x",
|
||||
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_base_component_t *component = &mca_pmix_ext4x_component.super.base_version;
|
||||
|
||||
mca_pmix_ext4x_component.silence_warning = false;
|
||||
(void) mca_base_component_var_register (component, "silence_warning",
|
||||
"Silence warning about PMIX_INSTALL_PREFIX",
|
||||
MCA_BASE_VAR_TYPE_BOOL, NULL, 0, 0,
|
||||
OPAL_INFO_LVL_4,
|
||||
MCA_BASE_VAR_SCOPE_READONLY,
|
||||
&mca_pmix_ext4x_component.silence_warning);
|
||||
|
||||
asprintf(&pmix_library_version,
|
||||
"PMIx library version %s", PMIx_Get_version());
|
||||
(void) mca_base_component_var_register(component, "library_version",
|
||||
"Version of the underlying PMIx library",
|
||||
MCA_BASE_VAR_TYPE_STRING,
|
||||
NULL, 0, 0,
|
||||
OPAL_INFO_LVL_4,
|
||||
MCA_BASE_VAR_SCOPE_CONSTANT,
|
||||
&pmix_library_version);
|
||||
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
static int external_open(void)
|
||||
{
|
||||
const char *version;
|
||||
|
||||
mca_pmix_ext4x_component.evindex = 0;
|
||||
OBJ_CONSTRUCT(&mca_pmix_ext4x_component.jobids, opal_list_t);
|
||||
OBJ_CONSTRUCT(&mca_pmix_ext4x_component.events, opal_list_t);
|
||||
OBJ_CONSTRUCT(&mca_pmix_ext4x_component.dmdx, opal_list_t);
|
||||
|
||||
version = PMIx_Get_version();
|
||||
if ('4' != version[0]) {
|
||||
opal_show_help("help-pmix-base.txt",
|
||||
"incorrect-pmix", true, version, "v4.x");
|
||||
return OPAL_ERROR;
|
||||
}
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
static int external_close(void)
|
||||
{
|
||||
OPAL_LIST_DESTRUCT(&mca_pmix_ext4x_component.jobids);
|
||||
OPAL_LIST_DESTRUCT(&mca_pmix_ext4x_component.events);
|
||||
OPAL_LIST_DESTRUCT(&mca_pmix_ext4x_component.dmdx);
|
||||
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_ext4x_module;
|
||||
return OPAL_SUCCESS;
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
||||
/*
|
||||
* Copyright (c) 2014-2018 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014-2017 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2014-2015 Mellanox Technologies, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2016 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2017 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "opal_config.h"
|
||||
#include "opal/constants.h"
|
||||
|
||||
#include "ext4x.h"
|
||||
|
||||
int opal_pmix_ext4x_check_evars(void)
|
||||
{
|
||||
/* a dummy function */
|
||||
return OPAL_SUCCESS;
|
||||
}
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
@ -1,790 +0,0 @@
|
||||
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
||||
/*
|
||||
* Copyright (c) 2014-2018 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014-2017 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014-2017 Mellanox Technologies, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2016 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2017 Los Alamos National Security, LLC. All rights
|
||||
* 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/threads/threads.h"
|
||||
#include "opal/util/argv.h"
|
||||
#include "opal/util/error.h"
|
||||
#include "opal/util/output.h"
|
||||
#include "opal/util/opal_environ.h"
|
||||
#include "opal/util/proc.h"
|
||||
#include "opal/util/show_help.h"
|
||||
#include "opal/mca/pmix/base/base.h"
|
||||
#include "ext4x.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 void errreg_cbfunc (pmix_status_t status,
|
||||
size_t errhandler_ref,
|
||||
void *cbdata)
|
||||
{
|
||||
opal_ext4x_event_t *ev = (opal_ext4x_event_t*)cbdata;
|
||||
|
||||
OPAL_ACQUIRE_OBJECT(ev);
|
||||
ev->index = 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);
|
||||
OPAL_POST_OBJECT(ev);
|
||||
OPAL_PMIX_WAKEUP_THREAD(&ev->lock);
|
||||
}
|
||||
|
||||
static void opcbfunc(pmix_status_t status, void *cbdata)
|
||||
{
|
||||
ext4x_opcaddy_t *op = (ext4x_opcaddy_t*)cbdata;
|
||||
|
||||
OPAL_ACQUIRE_OBJECT(op);
|
||||
|
||||
if (NULL != op->opcbfunc) {
|
||||
op->opcbfunc(ext4x_convert_rc(status), op->cbdata);
|
||||
}
|
||||
OBJ_RELEASE(op);
|
||||
}
|
||||
|
||||
static void lkcbfunc(pmix_status_t status, void *cbdata)
|
||||
{
|
||||
opal_pmix_lock_t *lk = (opal_pmix_lock_t*)cbdata;
|
||||
|
||||
OPAL_POST_OBJECT(lk);
|
||||
lk->status = ext4x_convert_rc(status);
|
||||
OPAL_PMIX_WAKEUP_THREAD(lk);
|
||||
}
|
||||
|
||||
int ext4x_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;
|
||||
opal_ext4x_event_t *event;
|
||||
opal_ext4x_jobid_trkr_t *job;
|
||||
opal_pmix_lock_t lk;
|
||||
|
||||
OPAL_PMIX_ACQUIRE_THREAD(&opal_pmix_base.lock);
|
||||
|
||||
if (0 == opal_pmix_base.initialized) {
|
||||
if (0 < (dbg = opal_output_get_verbosity(opal_pmix_base_framework.framework_output))) {
|
||||
asprintf(&dbgvalue, "PMIX_DEBUG=%d", dbg);
|
||||
putenv(dbgvalue);
|
||||
}
|
||||
/* check the evars for a mismatch */
|
||||
if (OPAL_SUCCESS != (dbg = opal_pmix_ext4x_check_evars())) {
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
return dbg;
|
||||
}
|
||||
}
|
||||
++opal_pmix_base.initialized;
|
||||
|
||||
/* convert the list to an array of pmix_info_t */
|
||||
sz = 2 + ((NULL==info)?0:opal_list_get_size(info));
|
||||
PMIX_INFO_CREATE(pinfo, sz);
|
||||
n = 0;
|
||||
if (NULL != info) {
|
||||
OPAL_LIST_FOREACH(kv, info, opal_value_t) {
|
||||
(void)strncpy(pinfo[n].key, kv->key, PMIX_MAX_KEYLEN);
|
||||
ext4x_value_load(&pinfo[n].value, kv);
|
||||
++n;
|
||||
}
|
||||
}
|
||||
|
||||
/* check for direct modex use-case */
|
||||
if (opal_pmix_base_async_modex && !opal_pmix_collect_all_data) {
|
||||
opal_setenv("PMIX_MCA_gds", "hash", true, &environ);
|
||||
}
|
||||
|
||||
/* insert ourselves into our list of jobids - it will be the
|
||||
* first, and so we'll check it first */
|
||||
job = OBJ_NEW(opal_ext4x_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_ext4x_component.jobids, &job->super);
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
|
||||
/* add our nspace and rank to the array going down to the PMIx server */
|
||||
PMIX_INFO_LOAD(&pinfo[sz-2], PMIX_SERVER_NSPACE, job->nspace, PMIX_STRING);
|
||||
PMIX_INFO_LOAD(&pinfo[sz-1], PMIX_SERVER_RANK, &OPAL_PROC_MY_NAME.vpid, PMIX_PROC_RANK);
|
||||
if (PMIX_SUCCESS != (rc = PMIx_server_init(&mymodule, pinfo, sz))) {
|
||||
PMIX_INFO_FREE(pinfo, sz);
|
||||
return ext4x_convert_rc(rc);
|
||||
}
|
||||
PMIX_INFO_FREE(pinfo, sz);
|
||||
|
||||
/* record the host module */
|
||||
host_module = module;
|
||||
|
||||
/* register the default event handler */
|
||||
event = OBJ_NEW(opal_ext4x_event_t);
|
||||
opal_list_append(&mca_pmix_ext4x_component.events, &event->super);
|
||||
PMIX_INFO_CREATE(pinfo, 1);
|
||||
PMIX_INFO_LOAD(&pinfo[0], PMIX_EVENT_HDLR_NAME, "OPAL-PMIX-2X-SERVER-DEFAULT", PMIX_STRING);
|
||||
PMIx_Register_event_handler(NULL, 0, pinfo, 1, ext4x_event_hdlr, errreg_cbfunc, (void*)event);
|
||||
OPAL_PMIX_WAIT_THREAD(&event->lock);
|
||||
PMIX_INFO_FREE(pinfo, 1);
|
||||
|
||||
/* as we might want to use some client-side functions, be sure
|
||||
* to register our own nspace */
|
||||
OPAL_PMIX_CONSTRUCT_LOCK(&lk);
|
||||
PMIX_INFO_CREATE(pinfo, 1);
|
||||
PMIX_INFO_LOAD(&pinfo[0], PMIX_REGISTER_NODATA, NULL, PMIX_BOOL);
|
||||
PMIx_server_register_nspace(job->nspace, 1, pinfo, 1, lkcbfunc, (void*)&lk);
|
||||
OPAL_PMIX_WAIT_THREAD(&lk);
|
||||
OPAL_PMIX_DESTRUCT_LOCK(&lk);
|
||||
PMIX_INFO_FREE(pinfo, 1);
|
||||
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
static void dereg_cbfunc(pmix_status_t st, void *cbdata)
|
||||
{
|
||||
opal_ext4x_event_t *ev = (opal_ext4x_event_t*)cbdata;
|
||||
OPAL_PMIX_WAKEUP_THREAD(&ev->lock);
|
||||
}
|
||||
|
||||
int ext4x_server_finalize(void)
|
||||
{
|
||||
pmix_status_t rc;
|
||||
opal_ext4x_event_t *event, *ev2;
|
||||
|
||||
OPAL_PMIX_ACQUIRE_THREAD(&opal_pmix_base.lock);
|
||||
--opal_pmix_base.initialized;
|
||||
|
||||
if (0 < opal_pmix_base.initialized) {
|
||||
/* deregister all event handlers */
|
||||
OPAL_LIST_FOREACH_SAFE(event, ev2, &mca_pmix_ext4x_component.events, opal_ext4x_event_t) {
|
||||
OPAL_PMIX_DESTRUCT_LOCK(&event->lock);
|
||||
OPAL_PMIX_CONSTRUCT_LOCK(&event->lock);
|
||||
PMIx_Deregister_event_handler(event->index, dereg_cbfunc, (void*)event);
|
||||
OPAL_PMIX_WAIT_THREAD(&event->lock);
|
||||
opal_list_remove_item(&mca_pmix_ext4x_component.events, &event->super);
|
||||
OBJ_RELEASE(event);
|
||||
}
|
||||
}
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
rc = PMIx_server_finalize();
|
||||
return ext4x_convert_rc(rc);
|
||||
}
|
||||
|
||||
int ext4x_server_gen_regex(const char *input, char **regex)
|
||||
{
|
||||
pmix_status_t rc;
|
||||
|
||||
OPAL_PMIX_ACQUIRE_THREAD(&opal_pmix_base.lock);
|
||||
if (0 >= opal_pmix_base.initialized) {
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
return OPAL_ERR_NOT_INITIALIZED;
|
||||
}
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
|
||||
rc = PMIx_generate_regex(input, regex);
|
||||
return ext4x_convert_rc(rc);
|
||||
}
|
||||
|
||||
|
||||
int ext4x_server_gen_ppn(const char *input, char **ppn)
|
||||
{
|
||||
pmix_status_t rc;
|
||||
|
||||
OPAL_PMIX_ACQUIRE_THREAD(&opal_pmix_base.lock);
|
||||
if (0 >= opal_pmix_base.initialized) {
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
return OPAL_ERR_NOT_INITIALIZED;
|
||||
}
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
|
||||
rc = PMIx_generate_ppn(input, ppn);
|
||||
return ext4x_convert_rc(rc);
|
||||
}
|
||||
|
||||
int ext4x_server_register_nspace(opal_jobid_t jobid,
|
||||
int nlocalprocs,
|
||||
opal_list_t *info,
|
||||
opal_pmix_op_cbfunc_t cbfunc,
|
||||
void *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_ext4x_jobid_trkr_t *job;
|
||||
opal_pmix_lock_t lock;
|
||||
int ret;
|
||||
|
||||
OPAL_PMIX_ACQUIRE_THREAD(&opal_pmix_base.lock);
|
||||
if (0 >= opal_pmix_base.initialized) {
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
return OPAL_ERR_NOT_INITIALIZED;
|
||||
}
|
||||
|
||||
/* convert the jobid */
|
||||
(void)opal_snprintf_jobid(nspace, PMIX_MAX_NSLEN, jobid);
|
||||
|
||||
/* store this job in our list of known nspaces */
|
||||
job = OBJ_NEW(opal_ext4x_jobid_trkr_t);
|
||||
(void)strncpy(job->nspace, nspace, PMIX_MAX_NSLEN);
|
||||
job->jobid = jobid;
|
||||
opal_list_append(&mca_pmix_ext4x_component.jobids, &job->super);
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
|
||||
/* convert the list to an array of pmix_info_t */
|
||||
if (NULL != info && 0 < (sz = opal_list_get_size(info))) {
|
||||
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);
|
||||
if (0 == strcmp(kv->key, OPAL_PMIX_PROC_DATA)) {
|
||||
pinfo[n].value.type = PMIX_DATA_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);
|
||||
if (0 < szmap) {
|
||||
PMIX_INFO_CREATE(pmap, szmap);
|
||||
pinfo[n].value.data.darray = (pmix_data_array_t*)calloc(1, sizeof(pmix_data_array_t));
|
||||
pinfo[n].value.data.darray->type = PMIX_INFO;
|
||||
pinfo[n].value.data.darray->array = (struct pmix_info_t*)pmap;
|
||||
pinfo[n].value.data.darray->size = szmap;
|
||||
m = 0;
|
||||
OPAL_LIST_FOREACH(k2, pmapinfo, opal_value_t) {
|
||||
(void)strncpy(pmap[m].key, k2->key, PMIX_MAX_KEYLEN);
|
||||
ext4x_value_load(&pmap[m].value, k2);
|
||||
++m;
|
||||
}
|
||||
}
|
||||
OPAL_LIST_RELEASE(pmapinfo);
|
||||
} else {
|
||||
ext4x_value_load(&pinfo[n].value, kv);
|
||||
}
|
||||
++n;
|
||||
}
|
||||
} else {
|
||||
sz = 0;
|
||||
pinfo = NULL;
|
||||
}
|
||||
|
||||
OPAL_PMIX_CONSTRUCT_LOCK(&lock);
|
||||
rc = PMIx_server_register_nspace(nspace, nlocalprocs, pinfo, sz,
|
||||
lkcbfunc, (void*)&lock);
|
||||
if (PMIX_SUCCESS == rc) {
|
||||
OPAL_PMIX_WAIT_THREAD(&lock);
|
||||
}
|
||||
OPAL_PMIX_DESTRUCT_LOCK(&lock);
|
||||
|
||||
if (NULL != pinfo) {
|
||||
PMIX_INFO_FREE(pinfo, sz);
|
||||
}
|
||||
|
||||
ret = ext4x_convert_rc(rc);
|
||||
|
||||
/* release the caller */
|
||||
if (NULL != cbfunc) {
|
||||
cbfunc(ret, cbdata);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
void ext4x_server_deregister_nspace(opal_jobid_t jobid,
|
||||
opal_pmix_op_cbfunc_t cbfunc,
|
||||
void *cbdata)
|
||||
{
|
||||
opal_ext4x_jobid_trkr_t *jptr;
|
||||
opal_pmix_lock_t lock;
|
||||
|
||||
OPAL_PMIX_ACQUIRE_THREAD(&opal_pmix_base.lock);
|
||||
if (0 >= opal_pmix_base.initialized) {
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
/* release the caller */
|
||||
if (NULL != cbfunc) {
|
||||
cbfunc(OPAL_ERR_NOT_INITIALIZED, cbdata);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/* if we don't already have it, we can ignore this */
|
||||
OPAL_LIST_FOREACH(jptr, &mca_pmix_ext4x_component.jobids, opal_ext4x_jobid_trkr_t) {
|
||||
if (jptr->jobid == jobid) {
|
||||
/* found it - tell the server to deregister */
|
||||
OPAL_PMIX_CONSTRUCT_LOCK(&lock);
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
PMIx_server_deregister_nspace(jptr->nspace, lkcbfunc, (void*)&lock);
|
||||
OPAL_PMIX_WAIT_THREAD(&lock);
|
||||
OPAL_PMIX_DESTRUCT_LOCK(&lock);
|
||||
/* now get rid of it from our list */
|
||||
OPAL_PMIX_ACQUIRE_THREAD(&opal_pmix_base.lock);
|
||||
opal_list_remove_item(&mca_pmix_ext4x_component.jobids, &jptr->super);
|
||||
OBJ_RELEASE(jptr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
/* release the caller */
|
||||
if (NULL != cbfunc) {
|
||||
cbfunc(OPAL_SUCCESS, cbdata);
|
||||
}
|
||||
}
|
||||
|
||||
int ext4x_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;
|
||||
opal_pmix_lock_t lock;
|
||||
|
||||
OPAL_PMIX_ACQUIRE_THREAD(&opal_pmix_base.lock);
|
||||
if (0 >= opal_pmix_base.initialized) {
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
return OPAL_ERR_NOT_INITIALIZED;
|
||||
}
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
|
||||
/* convert the jobid */
|
||||
(void)opal_snprintf_jobid(p.nspace, PMIX_MAX_NSLEN, proc->jobid);
|
||||
p.rank = ext4x_convert_opalrank(proc->vpid);
|
||||
|
||||
OPAL_PMIX_CONSTRUCT_LOCK(&lock);
|
||||
rc = PMIx_server_register_client(&p, uid, gid, server_object,
|
||||
lkcbfunc, (void*)&lock);
|
||||
if (PMIX_SUCCESS == rc) {
|
||||
OPAL_PMIX_WAIT_THREAD(&lock);
|
||||
}
|
||||
OPAL_PMIX_DESTRUCT_LOCK(&lock);
|
||||
return ext4x_convert_rc(rc);
|
||||
}
|
||||
|
||||
/* tell the local PMIx server to cleanup this client as it is
|
||||
* done executing */
|
||||
void ext4x_server_deregister_client(const opal_process_name_t *proc,
|
||||
opal_pmix_op_cbfunc_t cbfunc,
|
||||
void *cbdata)
|
||||
{
|
||||
opal_ext4x_jobid_trkr_t *jptr;
|
||||
pmix_proc_t p;
|
||||
opal_pmix_lock_t lock;
|
||||
|
||||
OPAL_PMIX_ACQUIRE_THREAD(&opal_pmix_base.lock);
|
||||
if (0 >= opal_pmix_base.initialized) {
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
if (NULL != cbfunc) {
|
||||
cbfunc(OPAL_ERR_NOT_INITIALIZED, cbdata);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/* if we don't already have it, we can ignore this */
|
||||
OPAL_LIST_FOREACH(jptr, &mca_pmix_ext4x_component.jobids, opal_ext4x_jobid_trkr_t) {
|
||||
if (jptr->jobid == proc->jobid) {
|
||||
/* found it - tell the server to deregister */
|
||||
(void)strncpy(p.nspace, jptr->nspace, PMIX_MAX_NSLEN);
|
||||
p.rank = ext4x_convert_opalrank(proc->vpid);
|
||||
OPAL_PMIX_CONSTRUCT_LOCK(&lock);
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
PMIx_server_deregister_client(&p, lkcbfunc, (void*)&lock);
|
||||
OPAL_PMIX_WAIT_THREAD(&lock);
|
||||
OPAL_PMIX_DESTRUCT_LOCK(&lock);
|
||||
OPAL_PMIX_ACQUIRE_THREAD(&opal_pmix_base.lock);
|
||||
break;
|
||||
}
|
||||
}
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
if (NULL != cbfunc) {
|
||||
cbfunc(OPAL_SUCCESS, cbdata);
|
||||
}
|
||||
}
|
||||
|
||||
/* have the local PMIx server setup the environment for this client */
|
||||
int ext4x_server_setup_fork(const opal_process_name_t *proc, char ***env)
|
||||
{
|
||||
pmix_status_t rc;
|
||||
pmix_proc_t p;
|
||||
|
||||
OPAL_PMIX_ACQUIRE_THREAD(&opal_pmix_base.lock);
|
||||
if (0 >= opal_pmix_base.initialized) {
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
return OPAL_ERR_NOT_INITIALIZED;
|
||||
}
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
|
||||
/* convert the jobid */
|
||||
(void)opal_snprintf_jobid(p.nspace, PMIX_MAX_NSLEN, proc->jobid);
|
||||
p.rank = ext4x_convert_opalrank(proc->vpid);
|
||||
|
||||
rc = PMIx_server_setup_fork(&p, env);
|
||||
return ext4x_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;
|
||||
ext4x_opcaddy_t *op = (ext4x_opcaddy_t*)cbdata;
|
||||
|
||||
rc = ext4x_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 ext4x_server_dmodex(const opal_process_name_t *proc,
|
||||
opal_pmix_modex_cbfunc_t cbfunc, void *cbdata)
|
||||
{
|
||||
ext4x_opcaddy_t *op;
|
||||
pmix_status_t rc;
|
||||
|
||||
OPAL_PMIX_ACQUIRE_THREAD(&opal_pmix_base.lock);
|
||||
if (0 >= opal_pmix_base.initialized) {
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
return OPAL_ERR_NOT_INITIALIZED;
|
||||
}
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
|
||||
/* setup the caddy */
|
||||
op = OBJ_NEW(ext4x_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 = ext4x_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 ext4x_convert_rc(rc);
|
||||
}
|
||||
|
||||
/* tell the PMIx server to notify its local clients of an event */
|
||||
int ext4x_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;
|
||||
ext4x_opcaddy_t *op;
|
||||
|
||||
OPAL_PMIX_ACQUIRE_THREAD(&opal_pmix_base.lock);
|
||||
if (0 >= opal_pmix_base.initialized) {
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
return OPAL_ERR_NOT_INITIALIZED;
|
||||
}
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
|
||||
/* convert the list to an array of pmix_info_t */
|
||||
if (NULL != info && 0 < (sz = opal_list_get_size(info))) {
|
||||
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);
|
||||
if (0 == strcmp(kv->key, OPAL_PMIX_JOB_TERM_STATUS)) {
|
||||
pinfo[n].value.type = PMIX_STATUS;
|
||||
pinfo[n].value.data.status = ext4x_convert_opalrc(kv->data.integer);
|
||||
} else {
|
||||
ext4x_value_load(&pinfo[n].value, kv);
|
||||
}
|
||||
++n;
|
||||
}
|
||||
} else {
|
||||
sz = 0;
|
||||
pinfo = NULL;
|
||||
}
|
||||
/* setup the caddy */
|
||||
op = OBJ_NEW(ext4x_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 = ext4x_convert_opalrank(OPAL_VPID_INVALID);
|
||||
} else {
|
||||
(void)opal_snprintf_jobid(op->p.nspace, PMIX_MAX_NSLEN, source->jobid);
|
||||
op->p.rank = ext4x_convert_opalrank(source->vpid);
|
||||
}
|
||||
|
||||
|
||||
rc = ext4x_convert_opalrc(status);
|
||||
/* the range must be nonlocal so the server will pass
|
||||
* the event down to its local clients */
|
||||
rc = PMIx_Notify_event(rc, &op->p, PMIX_RANGE_SESSION,
|
||||
pinfo, sz, opcbfunc, op);
|
||||
if (PMIX_SUCCESS != rc) {
|
||||
OBJ_RELEASE(op);
|
||||
}
|
||||
return ext4x_convert_rc(rc);
|
||||
}
|
||||
|
||||
int ext4x_server_iof_push(const opal_process_name_t *source,
|
||||
opal_pmix_iof_channel_t channel,
|
||||
unsigned char *data, size_t nbytes)
|
||||
{
|
||||
ext4x_opcaddy_t *op;
|
||||
pmix_byte_object_t bo;
|
||||
pmix_iof_channel_t pchan;
|
||||
opal_pmix_lock_t lock;
|
||||
pmix_status_t rc;
|
||||
int ret;
|
||||
|
||||
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
|
||||
"%s IOF push from %s with %d bytes",
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME),
|
||||
OPAL_NAME_PRINT(*source), (int)nbytes);
|
||||
|
||||
OPAL_PMIX_ACQUIRE_THREAD(&opal_pmix_base.lock);
|
||||
if (0 >= opal_pmix_base.initialized) {
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
return OPAL_ERR_NOT_INITIALIZED;
|
||||
}
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
|
||||
/* setup the caddy */
|
||||
op = OBJ_NEW(ext4x_opcaddy_t);
|
||||
/* convert the source */
|
||||
(void)opal_snprintf_jobid(op->p.nspace, PMIX_MAX_NSLEN, source->jobid);
|
||||
op->p.rank = ext4x_convert_opalrank(source->vpid);
|
||||
/* convert the channel */
|
||||
pchan = 0;
|
||||
if (OPAL_PMIX_FWD_STDIN_CHANNEL & channel) {
|
||||
pchan |= PMIX_FWD_STDIN_CHANNEL;
|
||||
}
|
||||
if (OPAL_PMIX_FWD_STDOUT_CHANNEL & channel) {
|
||||
pchan |= PMIX_FWD_STDOUT_CHANNEL;
|
||||
}
|
||||
if (OPAL_PMIX_FWD_STDERR_CHANNEL & channel) {
|
||||
pchan |= PMIX_FWD_STDERR_CHANNEL;
|
||||
}
|
||||
if (OPAL_PMIX_FWD_STDDIAG_CHANNEL & channel) {
|
||||
pchan |= PMIX_FWD_STDDIAG_CHANNEL;
|
||||
}
|
||||
|
||||
/* setup the byte object */
|
||||
PMIX_BYTE_OBJECT_CONSTRUCT(&bo);
|
||||
if (0 < nbytes) {
|
||||
bo.bytes = (char*)data;
|
||||
}
|
||||
bo.size = nbytes;
|
||||
|
||||
/* push the IO */
|
||||
OPAL_PMIX_CONSTRUCT_LOCK(&lock);
|
||||
rc = PMIx_server_IOF_deliver(&op->p, pchan, &bo, NULL, 0, lkcbfunc, (void*)&lock);
|
||||
if (PMIX_SUCCESS != rc) {
|
||||
ret = ext4x_convert_rc(rc);
|
||||
} else {
|
||||
/* wait for completion */
|
||||
OPAL_PMIX_WAIT_THREAD(&lock);
|
||||
ret = lock.status;
|
||||
OPAL_PMIX_DESTRUCT_LOCK(&lock);
|
||||
}
|
||||
/* cleanup */
|
||||
OBJ_RELEASE(op);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void final_cleanup(int status, void *cbdata)
|
||||
{
|
||||
ext4x_opalcaddy_t *opalcaddy = (ext4x_opalcaddy_t*)cbdata;
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
|
||||
static void setup_cbfunc(pmix_status_t status,
|
||||
pmix_info_t info[], size_t ninfo,
|
||||
void *provided_cbdata,
|
||||
pmix_op_cbfunc_t cbfunc, void *cbdata)
|
||||
{
|
||||
ext4x_opcaddy_t *op = (ext4x_opcaddy_t*)provided_cbdata;
|
||||
ext4x_opalcaddy_t *opalcaddy;
|
||||
size_t n;
|
||||
opal_value_t *iptr;
|
||||
int rc;
|
||||
pmix_status_t ret = PMIX_SUCCESS;
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(ext4x_opalcaddy_t);
|
||||
|
||||
rc = ext4x_convert_rc(status);
|
||||
if (OPAL_SUCCESS == rc && NULL != info) {
|
||||
/* need to convert the info array to a list */
|
||||
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 = ext4x_value_unload(iptr, &info[n].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
ret = ext4x_convert_opalrc(rc);
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
done:
|
||||
/* release our caller */
|
||||
if (NULL != cbfunc) {
|
||||
cbfunc(ret, cbdata);
|
||||
}
|
||||
/* pass what we have upstairs */
|
||||
if (NULL != op->setupcbfunc) {
|
||||
op->setupcbfunc(rc, &opalcaddy->info, op->cbdata,
|
||||
final_cleanup, opalcaddy);
|
||||
}
|
||||
OBJ_RELEASE(op);
|
||||
}
|
||||
|
||||
int ext4x_server_setup_application(opal_jobid_t jobid,
|
||||
opal_list_t *info,
|
||||
opal_pmix_setup_application_cbfunc_t cbfunc, void *cbdata)
|
||||
{
|
||||
opal_value_t *kv;
|
||||
pmix_info_t *pinfo;
|
||||
size_t sz, n;
|
||||
pmix_status_t rc;
|
||||
ext4x_opcaddy_t *op;
|
||||
|
||||
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
|
||||
"%s setup application for job %s",
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME),
|
||||
OPAL_JOBID_PRINT(jobid));
|
||||
|
||||
OPAL_PMIX_ACQUIRE_THREAD(&opal_pmix_base.lock);
|
||||
if (0 >= opal_pmix_base.initialized) {
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
return OPAL_ERR_NOT_INITIALIZED;
|
||||
}
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
|
||||
/* convert the list to an array of pmix_info_t */
|
||||
if (NULL != info && 0 < (sz = opal_list_get_size(info))) {
|
||||
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);
|
||||
ext4x_value_load(&pinfo[n].value, kv);
|
||||
++n;
|
||||
}
|
||||
} else {
|
||||
sz = 0;
|
||||
pinfo = NULL;
|
||||
}
|
||||
/* setup the caddy */
|
||||
op = OBJ_NEW(ext4x_opcaddy_t);
|
||||
op->info = pinfo;
|
||||
op->sz = sz;
|
||||
op->setupcbfunc = cbfunc;
|
||||
op->cbdata = cbdata;
|
||||
/* convert the jobid */
|
||||
(void)opal_snprintf_jobid(op->p.nspace, PMIX_MAX_NSLEN, jobid);
|
||||
|
||||
rc = PMIx_server_setup_application(op->p.nspace, op->info, op->sz,
|
||||
setup_cbfunc, op);
|
||||
if (PMIX_SUCCESS != rc) {
|
||||
OBJ_RELEASE(op);
|
||||
}
|
||||
return ext4x_convert_rc(rc);
|
||||
}
|
||||
|
||||
int ext4x_server_setup_local_support(opal_jobid_t jobid,
|
||||
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;
|
||||
ext4x_opcaddy_t *op;
|
||||
|
||||
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
|
||||
"%s setup local support for job %s",
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME),
|
||||
OPAL_JOBID_PRINT(jobid));
|
||||
|
||||
OPAL_PMIX_ACQUIRE_THREAD(&opal_pmix_base.lock);
|
||||
if (0 >= opal_pmix_base.initialized) {
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
return OPAL_ERR_NOT_INITIALIZED;
|
||||
}
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
|
||||
/* convert the list to an array of pmix_info_t */
|
||||
if (NULL != info && 0 < (sz = opal_list_get_size(info))) {
|
||||
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);
|
||||
ext4x_value_load(&pinfo[n].value, kv);
|
||||
++n;
|
||||
}
|
||||
} else {
|
||||
sz = 0;
|
||||
pinfo = NULL;
|
||||
}
|
||||
/* setup the caddy */
|
||||
op = OBJ_NEW(ext4x_opcaddy_t);
|
||||
op->info = pinfo;
|
||||
op->sz = sz;
|
||||
op->opcbfunc = cbfunc;
|
||||
op->cbdata = cbdata;
|
||||
/* convert the jobid */
|
||||
(void)opal_snprintf_jobid(op->p.nspace, PMIX_MAX_NSLEN, jobid);
|
||||
|
||||
rc = PMIx_server_setup_local_support(op->p.nspace, op->info, op->sz,
|
||||
opcbfunc, op);
|
||||
if (PMIX_SUCCESS != rc) {
|
||||
OBJ_RELEASE(op);
|
||||
}
|
||||
return ext4x_convert_rc(rc);
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
# -*- text -*-
|
||||
#
|
||||
# Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
|
||||
# University Research and Technology
|
||||
# Corporation. All rights reserved.
|
||||
# Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
# of Tennessee Research Foundation. All rights
|
||||
# reserved.
|
||||
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
# University of Stuttgart. All rights reserved.
|
||||
# Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2017-2018 Intel, Inc. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
# This is the US/English help file for Open MPI MCA error messages.
|
||||
#
|
||||
[evars]
|
||||
We found conflicting directives regarding the location of OPAL vs PMIx
|
||||
installation directories:
|
||||
|
||||
%s
|
||||
|
||||
This usually indicates that OMPI was configured to use its internal copy
|
||||
of PMIx, but another installation of PMIx is also in use on this system
|
||||
and could potentially cause confusion between the two sets of plugins.
|
||||
Please either unset the indicated environment variables, or configure
|
||||
OMPI to use the external PMIx installation.
|
Загрузка…
x
Ссылка в новой задаче
Block a user