Merge pull request #3722 from rhc54/topic/ext2x
Update the ext2x component to match the internal one
Этот коммит содержится в:
Коммит
d8b96983c2
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
@ -31,7 +31,7 @@
|
||||
#include "opal/mca/event/event.h"
|
||||
#include "opal/util/proc.h"
|
||||
|
||||
#include "opal/mca/pmix/pmix.h"
|
||||
#include "opal/mca/pmix/base/base.h"
|
||||
#include "pmix_server.h"
|
||||
#include "pmix_common.h"
|
||||
|
||||
@ -57,44 +57,49 @@ typedef struct {
|
||||
opal_list_item_t super;
|
||||
opal_jobid_t jobid;
|
||||
char nspace[PMIX_MAX_NSLEN + 1];
|
||||
} opal_pmix2x_jobid_trkr_t;
|
||||
OBJ_CLASS_DECLARATION(opal_pmix2x_jobid_trkr_t);
|
||||
} opal_ext2x_jobid_trkr_t;
|
||||
OBJ_CLASS_DECLARATION(opal_ext2x_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_pmix2x_event_t;
|
||||
OBJ_CLASS_DECLARATION(opal_pmix2x_event_t);
|
||||
} opal_ext2x_event_t;
|
||||
OBJ_CLASS_DECLARATION(opal_ext2x_event_t);
|
||||
|
||||
typedef struct {
|
||||
opal_list_item_t super;
|
||||
char *nspace;
|
||||
pmix_modex_cbfunc_t cbfunc;
|
||||
void *cbdata;
|
||||
} opal_pmix2x_dmx_trkr_t;
|
||||
OBJ_CLASS_DECLARATION(opal_pmix2x_dmx_trkr_t);
|
||||
} opal_ext2x_dmx_trkr_t;
|
||||
OBJ_CLASS_DECLARATION(opal_ext2x_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;
|
||||
volatile bool active;
|
||||
opal_pmix_lock_t lock;
|
||||
opal_list_t *codes;
|
||||
pmix_status_t *pcodes;
|
||||
size_t ncodes;
|
||||
pmix_query_t *queries;
|
||||
size_t nqueries;
|
||||
opal_pmix2x_event_t *event;
|
||||
opal_ext2x_event_t *event;
|
||||
opal_pmix_op_cbfunc_t opcbfunc;
|
||||
opal_pmix_modex_cbfunc_t mdxcbfunc;
|
||||
opal_pmix_value_cbfunc_t valcbfunc;
|
||||
@ -103,8 +108,8 @@ typedef struct {
|
||||
opal_pmix_evhandler_reg_cbfunc_t evregcbfunc;
|
||||
opal_pmix_info_cbfunc_t qcbfunc;
|
||||
void *cbdata;
|
||||
} pmix2x_opcaddy_t;
|
||||
OBJ_CLASS_DECLARATION(pmix2x_opcaddy_t);
|
||||
} ext2x_opcaddy_t;
|
||||
OBJ_CLASS_DECLARATION(ext2x_opcaddy_t);
|
||||
|
||||
typedef struct {
|
||||
opal_object_t super;
|
||||
@ -121,13 +126,15 @@ typedef struct {
|
||||
void *cbdata;
|
||||
opal_pmix_release_cbfunc_t odmdxfunc;
|
||||
void *ocbdata;
|
||||
} pmix2x_opalcaddy_t;
|
||||
OBJ_CLASS_DECLARATION(pmix2x_opalcaddy_t);
|
||||
} ext2x_opalcaddy_t;
|
||||
OBJ_CLASS_DECLARATION(ext2x_opalcaddy_t);
|
||||
|
||||
typedef struct {
|
||||
opal_object_t super;
|
||||
opal_event_t ev;
|
||||
volatile bool active;
|
||||
opal_pmix_lock_t lock;
|
||||
const char *msg;
|
||||
char *strings;
|
||||
size_t id;
|
||||
int status;
|
||||
opal_process_name_t pname;
|
||||
@ -136,6 +143,7 @@ typedef struct {
|
||||
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;
|
||||
@ -143,14 +151,16 @@ typedef struct {
|
||||
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;
|
||||
} pmix2x_threadshift_t;
|
||||
OBJ_CLASS_DECLARATION(pmix2x_threadshift_t);
|
||||
} ext2x_threadshift_t;
|
||||
OBJ_CLASS_DECLARATION(ext2x_threadshift_t);
|
||||
|
||||
#define OPAL_PMIX_OP_THREADSHIFT(e, fn, cb, cd) \
|
||||
do { \
|
||||
pmix2x_threadshift_t *_cd; \
|
||||
_cd = OBJ_NEW(pmix2x_threadshift_t); \
|
||||
ext2x_threadshift_t *_cd; \
|
||||
_cd = OBJ_NEW(ext2x_threadshift_t); \
|
||||
_cd->handler = (e); \
|
||||
_cd->opcbfunc = (cb); \
|
||||
_cd->cbdata = (cd); \
|
||||
@ -162,8 +172,8 @@ OBJ_CLASS_DECLARATION(pmix2x_threadshift_t);
|
||||
|
||||
#define OPAL_PMIX_THREADSHIFT(e, i, eh, fn, cb, cd) \
|
||||
do { \
|
||||
pmix2x_threadshift_t *_cd; \
|
||||
_cd = OBJ_NEW(pmix2x_threadshift_t); \
|
||||
ext2x_threadshift_t *_cd; \
|
||||
_cd = OBJ_NEW(ext2x_threadshift_t); \
|
||||
_cd->event_codes = (e); \
|
||||
_cd->info = (i); \
|
||||
_cd->evhandler = (eh); \
|
||||
@ -177,8 +187,8 @@ OBJ_CLASS_DECLARATION(pmix2x_threadshift_t);
|
||||
|
||||
#define OPAL_PMIX_NOTIFY_THREADSHIFT(s, sr, r, i, fn, cb, cd) \
|
||||
do { \
|
||||
pmix2x_threadshift_t *_cd; \
|
||||
_cd = OBJ_NEW(pmix2x_threadshift_t); \
|
||||
ext2x_threadshift_t *_cd; \
|
||||
_cd = OBJ_NEW(ext2x_threadshift_t); \
|
||||
_cd->status = (s); \
|
||||
_cd->source = (sr); \
|
||||
_cd->range = (r); \
|
||||
@ -191,110 +201,120 @@ OBJ_CLASS_DECLARATION(pmix2x_threadshift_t);
|
||||
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 pmix2x_client_init(opal_list_t *ilist);
|
||||
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_MODULE_DECLSPEC int ext2x_client_init(opal_list_t *ilist);
|
||||
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 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_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 pmix2x_put(opal_pmix_scope_t scope,
|
||||
OPAL_MODULE_DECLSPEC int ext2x_put(opal_pmix_scope_t scope,
|
||||
opal_value_t *val);
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_get(const opal_process_name_t *proc, const char *key,
|
||||
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 pmix2x_getnb(const opal_process_name_t *proc, const char *key,
|
||||
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 pmix2x_publish(opal_list_t *info);
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_publishnb(opal_list_t *info,
|
||||
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 pmix2x_lookup(opal_list_t *data, opal_list_t *info);
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_lookupnb(char **keys, opal_list_t *info,
|
||||
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 pmix2x_unpublish(char **keys, opal_list_t *info);
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_unpublishnb(char **keys, opal_list_t *info,
|
||||
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 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_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 pmix2x_connect(opal_list_t *procs);
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_connectnb(opal_list_t *procs,
|
||||
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 pmix2x_disconnect(opal_list_t *procs);
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_disconnectnb(opal_list_t *procs,
|
||||
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 pmix2x_resolve_peers(const char *nodename, opal_jobid_t jobid,
|
||||
OPAL_MODULE_DECLSPEC int ext2x_resolve_peers(const char *nodename, opal_jobid_t jobid,
|
||||
opal_list_t *procs);
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_resolve_nodes(opal_jobid_t jobid, char **nodelist);
|
||||
OPAL_MODULE_DECLSPEC int ext2x_resolve_nodes(opal_jobid_t jobid, char **nodelist);
|
||||
|
||||
/**** COMMON FUNCTIONS ****/
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_store_local(const opal_process_name_t *proc,
|
||||
OPAL_MODULE_DECLSPEC int ext2x_store_local(const opal_process_name_t *proc,
|
||||
opal_value_t *val);
|
||||
|
||||
/**** SERVER SOUTHBOUND FUNCTIONS ****/
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_server_init(opal_pmix_server_module_t *module,
|
||||
OPAL_MODULE_DECLSPEC int ext2x_server_init(opal_pmix_server_module_t *module,
|
||||
opal_list_t *info);
|
||||
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,
|
||||
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 pmix2x_server_deregister_nspace(opal_jobid_t jobid,
|
||||
OPAL_MODULE_DECLSPEC void ext2x_server_deregister_nspace(opal_jobid_t jobid,
|
||||
opal_pmix_op_cbfunc_t cbfunc,
|
||||
void *cbdata);
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_server_register_client(const opal_process_name_t *proc,
|
||||
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 pmix2x_server_deregister_client(const opal_process_name_t *proc,
|
||||
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 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_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 pmix2x_server_notify_event(int status,
|
||||
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 pmix2x_event_hdlr(size_t evhdlr_registration_id,
|
||||
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 pmix2x_convert_opalrc(int rc);
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_convert_rc(pmix_status_t rc);
|
||||
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 pmix2x_convert_rank(pmix_rank_t rank);
|
||||
OPAL_MODULE_DECLSPEC pmix_rank_t pmix2x_convert_opalrank(opal_vpid_t vpid);
|
||||
OPAL_MODULE_DECLSPEC opal_vpid_t ext2x_convert_rank(pmix_rank_t rank);
|
||||
OPAL_MODULE_DECLSPEC pmix_rank_t ext2x_convert_opalrank(opal_vpid_t vpid);
|
||||
|
||||
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 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 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 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 pmix2x_convert_persist(pmix_persistence_t scope);
|
||||
OPAL_MODULE_DECLSPEC pmix_persistence_t pmix2x_convert_opalpersist(opal_pmix_persistence_t scope);
|
||||
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 pmix2x_value_load(pmix_value_t *v,
|
||||
OPAL_MODULE_DECLSPEC void ext2x_value_load(pmix_value_t *v,
|
||||
opal_value_t *kv);
|
||||
OPAL_MODULE_DECLSPEC int pmix2x_value_unload(opal_value_t *kv,
|
||||
OPAL_MODULE_DECLSPEC int ext2x_value_unload(opal_value_t *kv,
|
||||
const pmix_value_t *v);
|
||||
|
||||
OPAL_MODULE_DECLSPEC opal_pmix_alloc_directive_t pmix2x_convert_allocdir(pmix_alloc_directive_t dir);
|
||||
OPAL_MODULE_DECLSPEC opal_pmix_alloc_directive_t ext2x_convert_allocdir(pmix_alloc_directive_t dir);
|
||||
|
||||
OPAL_MODULE_DECLSPEC char* ext2x_convert_jobid(opal_jobid_t jobid);
|
||||
|
||||
END_C_DECLS
|
||||
|
||||
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
@ -28,7 +28,7 @@
|
||||
* Public string showing the pmix external component version number
|
||||
*/
|
||||
const char *opal_pmix_ext2x_component_version_string =
|
||||
"OPAL pmix2x MCA component version " OPAL_VERSION;
|
||||
"OPAL ext2x MCA component version " OPAL_VERSION;
|
||||
|
||||
/*
|
||||
* Local function
|
||||
|
@ -141,11 +141,11 @@ opal_pmix_server_module_t *host_module = NULL;
|
||||
|
||||
static void opal_opcbfunc(int status, void *cbdata)
|
||||
{
|
||||
pmix2x_opalcaddy_t *opalcaddy = (pmix2x_opalcaddy_t*)cbdata;
|
||||
ext2x_opalcaddy_t *opalcaddy = (ext2x_opalcaddy_t*)cbdata;
|
||||
|
||||
OPAL_ACQUIRE_OBJECT(opalcaddy);
|
||||
if (NULL != opalcaddy->opcbfunc) {
|
||||
opalcaddy->opcbfunc(pmix2x_convert_opalrc(status), opalcaddy->cbdata);
|
||||
opalcaddy->opcbfunc(ext2x_convert_opalrc(status), opalcaddy->cbdata);
|
||||
}
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
@ -155,33 +155,33 @@ static pmix_status_t server_client_connected_fn(const pmix_proc_t *p, void *serv
|
||||
{
|
||||
int rc;
|
||||
opal_process_name_t proc;
|
||||
pmix2x_opalcaddy_t *opalcaddy;
|
||||
ext2x_opalcaddy_t *opalcaddy;
|
||||
|
||||
if (NULL == host_module || NULL == host_module->client_connected) {
|
||||
return PMIX_SUCCESS;
|
||||
}
|
||||
|
||||
opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t);
|
||||
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 pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
proc.vpid = pmix2x_convert_rank(p->rank);
|
||||
proc.vpid = ext2x_convert_rank(p->rank);
|
||||
|
||||
/* pass it up */
|
||||
rc = host_module->client_connected(&proc, server_object,
|
||||
opal_opcbfunc, opalcaddy);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
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;
|
||||
pmix2x_opalcaddy_t *opalcaddy;
|
||||
ext2x_opalcaddy_t *opalcaddy;
|
||||
opal_process_name_t proc;
|
||||
|
||||
if (NULL == host_module || NULL == host_module->client_finalized) {
|
||||
@ -190,21 +190,25 @@ 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 pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
proc.vpid = pmix2x_convert_rank(p->rank);
|
||||
proc.vpid = ext2x_convert_rank(p->rank);
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t);
|
||||
opalcaddy = OBJ_NEW(ext2x_opalcaddy_t);
|
||||
opalcaddy->opcbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
/* pass it up */
|
||||
opal_output_verbose(3, opal_pmix_base_framework.framework_output,
|
||||
"%s CLIENT %s FINALIZED",
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME),
|
||||
OPAL_NAME_PRINT(proc));
|
||||
rc = host_module->client_finalized(&proc, server_object, opal_opcbfunc, opalcaddy);
|
||||
if (OPAL_SUCCESS != rc) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
|
||||
static pmix_status_t server_abort_fn(const pmix_proc_t *p, void *server_object,
|
||||
@ -216,7 +220,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;
|
||||
pmix2x_opalcaddy_t *opalcaddy;
|
||||
ext2x_opalcaddy_t *opalcaddy;
|
||||
|
||||
if (NULL == host_module || NULL == host_module->abort) {
|
||||
return PMIX_ERR_NOT_SUPPORTED;
|
||||
@ -224,12 +228,17 @@ 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 pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
proc.vpid = pmix2x_convert_rank(p->rank);
|
||||
proc.vpid = ext2x_convert_rank(p->rank);
|
||||
|
||||
opal_output_verbose(3, opal_pmix_base_framework.framework_output,
|
||||
"%s CLIENT %s CALLED ABORT",
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME),
|
||||
OPAL_NAME_PRINT(proc));
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t);
|
||||
opalcaddy = OBJ_NEW(ext2x_opalcaddy_t);
|
||||
opalcaddy->opcbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
@ -239,9 +248,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 pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
nm->name.vpid = pmix2x_convert_rank(procs[n].rank);
|
||||
nm->name.vpid = ext2x_convert_rank(procs[n].rank);
|
||||
}
|
||||
|
||||
/* pass it up */
|
||||
@ -250,12 +259,12 @@ static pmix_status_t server_abort_fn(const pmix_proc_t *p, void *server_object,
|
||||
if (OPAL_SUCCESS != rc) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
|
||||
static void _data_release(void *cbdata)
|
||||
{
|
||||
pmix2x_opalcaddy_t *opalcaddy = (pmix2x_opalcaddy_t*)cbdata;
|
||||
ext2x_opalcaddy_t *opalcaddy = (ext2x_opalcaddy_t*)cbdata;
|
||||
|
||||
if (NULL != opalcaddy->odmdxfunc) {
|
||||
opalcaddy->odmdxfunc(opalcaddy->ocbdata);
|
||||
@ -267,10 +276,10 @@ 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;
|
||||
pmix2x_opalcaddy_t *opalcaddy = (pmix2x_opalcaddy_t*)cbdata;
|
||||
opal_pmix2x_dmx_trkr_t *dmdx;
|
||||
ext2x_opalcaddy_t *opalcaddy = (ext2x_opalcaddy_t*)cbdata;
|
||||
opal_ext2x_dmx_trkr_t *dmdx;
|
||||
|
||||
rc = pmix2x_convert_rc(status);
|
||||
rc = ext2x_convert_rc(status);
|
||||
if (NULL != opalcaddy->mdxcbfunc) {
|
||||
opalcaddy->odmdxfunc = relcbfunc;
|
||||
opalcaddy->ocbdata = relcbdata;
|
||||
@ -279,10 +288,12 @@ static void opmdx_response(int status, const char *data, size_t sz, void *cbdata
|
||||
/* if we were collecting all data, then check for any pending
|
||||
* dmodx requests that we cached and notify them that the
|
||||
* data has arrived */
|
||||
while (NULL != (dmdx = (opal_pmix2x_dmx_trkr_t*)opal_list_remove_first(&mca_pmix_ext2x_component.dmdx))) {
|
||||
OPAL_PMIX_ACQUIRE_THREAD(&opal_pmix_base.lock);
|
||||
while (NULL != (dmdx = (opal_ext2x_dmx_trkr_t*)opal_list_remove_first(&mca_pmix_ext2x_component.dmdx))) {
|
||||
dmdx->cbfunc(PMIX_SUCCESS, NULL, 0, dmdx->cbdata, NULL, NULL);
|
||||
OBJ_RELEASE(dmdx);
|
||||
}
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
} else {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
@ -293,17 +304,20 @@ 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)
|
||||
{
|
||||
pmix2x_opalcaddy_t *opalcaddy;
|
||||
ext2x_opalcaddy_t *opalcaddy;
|
||||
size_t n;
|
||||
opal_namelist_t *nm;
|
||||
opal_value_t *iptr;
|
||||
int rc;
|
||||
|
||||
opal_output_verbose(3, opal_pmix_base_framework.framework_output,
|
||||
"%s FENCE CALLED", OPAL_NAME_PRINT(OPAL_PROC_MY_NAME));
|
||||
|
||||
if (NULL == host_module || NULL == host_module->fence_nb) {
|
||||
return PMIX_ERR_NOT_SUPPORTED;
|
||||
}
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t);
|
||||
opalcaddy = OBJ_NEW(ext2x_opalcaddy_t);
|
||||
opalcaddy->mdxcbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
@ -313,9 +327,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 pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
nm->name.vpid = pmix2x_convert_rank(procs[n].rank);
|
||||
nm->name.vpid = ext2x_convert_rank(procs[n].rank);
|
||||
}
|
||||
|
||||
/* convert the array of pmix_info_t to the list of info */
|
||||
@ -323,9 +337,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 = pmix2x_value_unload(iptr, &info[n].value))) {
|
||||
if (OPAL_SUCCESS != (rc = ext2x_value_unload(iptr, &info[n].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
}
|
||||
|
||||
@ -335,7 +349,7 @@ static pmix_status_t server_fencenb_fn(const pmix_proc_t procs[], size_t nprocs,
|
||||
if (OPAL_SUCCESS != rc) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
|
||||
static pmix_status_t server_dmodex_req_fn(const pmix_proc_t *p,
|
||||
@ -343,11 +357,11 @@ static pmix_status_t server_dmodex_req_fn(const pmix_proc_t *p,
|
||||
pmix_modex_cbfunc_t cbfunc, void *cbdata)
|
||||
{
|
||||
int rc;
|
||||
pmix2x_opalcaddy_t *opalcaddy;
|
||||
ext2x_opalcaddy_t *opalcaddy;
|
||||
opal_process_name_t proc;
|
||||
opal_value_t *iptr;
|
||||
size_t n;
|
||||
opal_pmix2x_dmx_trkr_t *dmdx;
|
||||
opal_ext2x_dmx_trkr_t *dmdx;
|
||||
|
||||
if (NULL == host_module || NULL == host_module->direct_modex) {
|
||||
return PMIX_ERR_NOT_SUPPORTED;
|
||||
@ -355,12 +369,17 @@ 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 pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
proc.vpid = pmix2x_convert_rank(p->rank);
|
||||
proc.vpid = ext2x_convert_rank(p->rank);
|
||||
|
||||
opal_output_verbose(3, opal_pmix_base_framework.framework_output,
|
||||
"%s CLIENT %s CALLED DMODX",
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME),
|
||||
OPAL_NAME_PRINT(proc));
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t);
|
||||
opalcaddy = OBJ_NEW(ext2x_opalcaddy_t);
|
||||
opalcaddy->mdxcbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
@ -372,10 +391,12 @@ static pmix_status_t server_dmodex_req_fn(const pmix_proc_t *p,
|
||||
* arrived - this will trigger the pmix server to tell the
|
||||
* client that the data is available */
|
||||
if (opal_pmix_base_async_modex && opal_pmix_collect_all_data) {
|
||||
dmdx = OBJ_NEW(opal_pmix2x_dmx_trkr_t);
|
||||
OPAL_PMIX_ACQUIRE_THREAD(&opal_pmix_base.lock);
|
||||
dmdx = OBJ_NEW(opal_ext2x_dmx_trkr_t);
|
||||
dmdx->cbfunc = cbfunc;
|
||||
dmdx->cbdata = cbdata;
|
||||
opal_list_append(&mca_pmix_ext2x_component.dmdx, &dmdx->super);
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
return PMIX_SUCCESS;
|
||||
}
|
||||
|
||||
@ -384,9 +405,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 = pmix2x_value_unload(iptr, &info[n].value))) {
|
||||
if (OPAL_SUCCESS != (rc = ext2x_value_unload(iptr, &info[n].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
}
|
||||
|
||||
@ -398,7 +419,7 @@ static pmix_status_t server_dmodex_req_fn(const pmix_proc_t *p,
|
||||
if (OPAL_ERR_IN_PROCESS == rc) {
|
||||
rc = OPAL_SUCCESS;
|
||||
}
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
|
||||
static pmix_status_t server_publish_fn(const pmix_proc_t *p,
|
||||
@ -407,7 +428,7 @@ static pmix_status_t server_publish_fn(const pmix_proc_t *p,
|
||||
{
|
||||
int rc;
|
||||
size_t n;
|
||||
pmix2x_opalcaddy_t *opalcaddy;
|
||||
ext2x_opalcaddy_t *opalcaddy;
|
||||
opal_process_name_t proc;
|
||||
opal_value_t *oinfo;
|
||||
|
||||
@ -417,12 +438,17 @@ 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 pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
proc.vpid = pmix2x_convert_rank(p->rank);
|
||||
proc.vpid = ext2x_convert_rank(p->rank);
|
||||
|
||||
opal_output_verbose(3, opal_pmix_base_framework.framework_output,
|
||||
"%s CLIENT %s CALLED PUBLISH",
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME),
|
||||
OPAL_NAME_PRINT(proc));
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t);
|
||||
opalcaddy = OBJ_NEW(ext2x_opalcaddy_t);
|
||||
opalcaddy->opcbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
@ -431,9 +457,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 = pmix2x_value_unload(oinfo, &info[n].value))) {
|
||||
if (OPAL_SUCCESS != (rc = ext2x_value_unload(oinfo, &info[n].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
}
|
||||
|
||||
@ -443,21 +469,21 @@ static pmix_status_t server_publish_fn(const pmix_proc_t *p,
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
|
||||
static void opal_lkupcbfunc(int status,
|
||||
opal_list_t *data,
|
||||
void *cbdata)
|
||||
{
|
||||
pmix2x_opalcaddy_t *opalcaddy = (pmix2x_opalcaddy_t*)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 = pmix2x_convert_opalrc(status);
|
||||
rc = ext2x_convert_opalrc(status);
|
||||
/* convert any returned data */
|
||||
if (NULL != data) {
|
||||
nd = opal_list_get_size(data);
|
||||
@ -466,9 +492,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 = pmix2x_convert_opalrank(p->proc.vpid);
|
||||
d[n].proc.rank = ext2x_convert_opalrank(p->proc.vpid);
|
||||
(void)strncpy(d[n].key, p->value.key, PMIX_MAX_KEYLEN);
|
||||
pmix2x_value_load(&d[n].value, &p->value);
|
||||
ext2x_value_load(&d[n].value, &p->value);
|
||||
}
|
||||
}
|
||||
opalcaddy->lkupcbfunc(rc, d, nd, opalcaddy->cbdata);
|
||||
@ -482,7 +508,7 @@ static pmix_status_t server_lookup_fn(const pmix_proc_t *p, char **keys,
|
||||
pmix_lookup_cbfunc_t cbfunc, void *cbdata)
|
||||
{
|
||||
int rc;
|
||||
pmix2x_opalcaddy_t *opalcaddy;
|
||||
ext2x_opalcaddy_t *opalcaddy;
|
||||
opal_process_name_t proc;
|
||||
opal_value_t *iptr;
|
||||
size_t n;
|
||||
@ -493,12 +519,17 @@ 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 pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
proc.vpid = pmix2x_convert_rank(p->rank);
|
||||
proc.vpid = ext2x_convert_rank(p->rank);
|
||||
|
||||
opal_output_verbose(3, opal_pmix_base_framework.framework_output,
|
||||
"%s CLIENT %s CALLED LOOKUP",
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME),
|
||||
OPAL_NAME_PRINT(proc));
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t);
|
||||
opalcaddy = OBJ_NEW(ext2x_opalcaddy_t);
|
||||
opalcaddy->lkupcbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
@ -507,9 +538,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 = pmix2x_value_unload(iptr, &info[n].value))) {
|
||||
if (OPAL_SUCCESS != (rc = ext2x_value_unload(iptr, &info[n].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
}
|
||||
|
||||
@ -519,7 +550,7 @@ static pmix_status_t server_lookup_fn(const pmix_proc_t *p, char **keys,
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
|
||||
|
||||
@ -528,7 +559,7 @@ static pmix_status_t server_unpublish_fn(const pmix_proc_t *p, char **keys,
|
||||
pmix_op_cbfunc_t cbfunc, void *cbdata)
|
||||
{
|
||||
int rc;
|
||||
pmix2x_opalcaddy_t *opalcaddy;
|
||||
ext2x_opalcaddy_t *opalcaddy;
|
||||
opal_process_name_t proc;
|
||||
opal_value_t *iptr;
|
||||
size_t n;
|
||||
@ -539,12 +570,17 @@ 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 pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
proc.vpid = pmix2x_convert_rank(p->rank);
|
||||
proc.vpid = ext2x_convert_rank(p->rank);
|
||||
|
||||
opal_output_verbose(3, opal_pmix_base_framework.framework_output,
|
||||
"%s CLIENT %s CALLED UNPUBLISH",
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME),
|
||||
OPAL_NAME_PRINT(proc));
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t);
|
||||
opalcaddy = OBJ_NEW(ext2x_opalcaddy_t);
|
||||
opalcaddy->opcbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
@ -553,9 +589,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 = pmix2x_value_unload(iptr, &info[n].value))) {
|
||||
if (OPAL_SUCCESS != (rc = ext2x_value_unload(iptr, &info[n].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
}
|
||||
|
||||
@ -565,17 +601,17 @@ static pmix_status_t server_unpublish_fn(const pmix_proc_t *p, char **keys,
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
|
||||
static void opal_spncbfunc(int status, opal_jobid_t jobid, void *cbdata)
|
||||
{
|
||||
pmix2x_opalcaddy_t *opalcaddy = (pmix2x_opalcaddy_t*)cbdata;
|
||||
ext2x_opalcaddy_t *opalcaddy = (ext2x_opalcaddy_t*)cbdata;
|
||||
pmix_status_t rc;
|
||||
char nspace[PMIX_MAX_NSLEN];
|
||||
|
||||
if (NULL != opalcaddy->spwncbfunc) {
|
||||
rc = pmix2x_convert_opalrc(status);
|
||||
rc = ext2x_convert_opalrc(status);
|
||||
/* convert the jobid */
|
||||
(void)opal_snprintf_jobid(nspace, PMIX_MAX_NSLEN, jobid);
|
||||
opalcaddy->spwncbfunc(rc, nspace, opalcaddy->cbdata);
|
||||
@ -588,7 +624,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)
|
||||
{
|
||||
pmix2x_opalcaddy_t *opalcaddy;
|
||||
ext2x_opalcaddy_t *opalcaddy;
|
||||
opal_process_name_t proc;
|
||||
opal_pmix_app_t *app;
|
||||
opal_value_t *oinfo;
|
||||
@ -601,12 +637,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 pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
proc.vpid = pmix2x_convert_rank(p->rank);
|
||||
proc.vpid = ext2x_convert_rank(p->rank);
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t);
|
||||
opalcaddy = OBJ_NEW(ext2x_opalcaddy_t);
|
||||
opalcaddy->spwncbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
@ -615,9 +651,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 = pmix2x_value_unload(oinfo, &job_info[k].value))) {
|
||||
if (OPAL_SUCCESS != (rc = ext2x_value_unload(oinfo, &job_info[k].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
}
|
||||
|
||||
@ -639,9 +675,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 = pmix2x_value_unload(oinfo, &apps[n].info[k].value))) {
|
||||
if (OPAL_SUCCESS != (rc = ext2x_value_unload(oinfo, &apps[n].info[k].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -653,7 +689,7 @@ static pmix_status_t server_spawn_fn(const pmix_proc_t *p,
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
|
||||
|
||||
@ -662,7 +698,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;
|
||||
pmix2x_opalcaddy_t *opalcaddy;
|
||||
ext2x_opalcaddy_t *opalcaddy;
|
||||
opal_namelist_t *nm;
|
||||
size_t n;
|
||||
opal_value_t *oinfo;
|
||||
@ -672,7 +708,7 @@ static pmix_status_t server_connect_fn(const pmix_proc_t procs[], size_t nprocs,
|
||||
}
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t);
|
||||
opalcaddy = OBJ_NEW(ext2x_opalcaddy_t);
|
||||
opalcaddy->opcbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
@ -682,9 +718,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 pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
nm->name.vpid = pmix2x_convert_rank(procs[n].rank);
|
||||
nm->name.vpid = ext2x_convert_rank(procs[n].rank);
|
||||
}
|
||||
|
||||
/* convert the info */
|
||||
@ -692,9 +728,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 = pmix2x_value_unload(oinfo, &info[n].value))) {
|
||||
if (OPAL_SUCCESS != (rc = ext2x_value_unload(oinfo, &info[n].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
}
|
||||
|
||||
@ -704,7 +740,7 @@ static pmix_status_t server_connect_fn(const pmix_proc_t procs[], size_t nprocs,
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
|
||||
|
||||
@ -713,7 +749,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;
|
||||
pmix2x_opalcaddy_t *opalcaddy;
|
||||
ext2x_opalcaddy_t *opalcaddy;
|
||||
opal_namelist_t *nm;
|
||||
size_t n;
|
||||
opal_value_t *oinfo;
|
||||
@ -723,7 +759,7 @@ static pmix_status_t server_disconnect_fn(const pmix_proc_t procs[], size_t npro
|
||||
}
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t);
|
||||
opalcaddy = OBJ_NEW(ext2x_opalcaddy_t);
|
||||
opalcaddy->opcbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
@ -733,9 +769,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 pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
nm->name.vpid = pmix2x_convert_rank(procs[n].rank);
|
||||
nm->name.vpid = ext2x_convert_rank(procs[n].rank);
|
||||
}
|
||||
|
||||
/* convert the info */
|
||||
@ -743,9 +779,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 = pmix2x_value_unload(oinfo, &info[n].value))) {
|
||||
if (OPAL_SUCCESS != (rc = ext2x_value_unload(oinfo, &info[n].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
}
|
||||
|
||||
@ -755,20 +791,24 @@ static pmix_status_t server_disconnect_fn(const pmix_proc_t procs[], size_t npro
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
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)
|
||||
{
|
||||
pmix2x_opalcaddy_t *opalcaddy;
|
||||
ext2x_opalcaddy_t *opalcaddy;
|
||||
size_t n;
|
||||
opal_value_t *oinfo;
|
||||
int rc;
|
||||
|
||||
opal_output_verbose(3, opal_pmix_base_framework.framework_output,
|
||||
"%s REGISTER EVENTS",
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME));
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t);
|
||||
opalcaddy = OBJ_NEW(ext2x_opalcaddy_t);
|
||||
opalcaddy->opcbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
@ -777,9 +817,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 = pmix2x_value_unload(oinfo, &info[n].value))) {
|
||||
if (OPAL_SUCCESS != (rc = ext2x_value_unload(oinfo, &info[n].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
}
|
||||
|
||||
@ -789,12 +829,15 @@ static pmix_status_t server_register_events(pmix_status_t *codes, size_t ncodes,
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
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)
|
||||
{
|
||||
opal_output_verbose(3, opal_pmix_base_framework.framework_output,
|
||||
"%s DEREGISTER EVENTS", OPAL_NAME_PRINT(OPAL_PROC_MY_NAME));
|
||||
|
||||
return PMIX_ERR_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
@ -804,7 +847,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)
|
||||
{
|
||||
pmix2x_opalcaddy_t *opalcaddy;
|
||||
ext2x_opalcaddy_t *opalcaddy;
|
||||
opal_process_name_t src;
|
||||
size_t n;
|
||||
opal_value_t *oinfo;
|
||||
@ -815,19 +858,24 @@ static pmix_status_t server_notify_event(pmix_status_t code,
|
||||
}
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t);
|
||||
opalcaddy = OBJ_NEW(ext2x_opalcaddy_t);
|
||||
opalcaddy->opcbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
/* convert the code */
|
||||
status = pmix2x_convert_rc(code);
|
||||
status = ext2x_convert_rc(code);
|
||||
|
||||
/* convert the source */
|
||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&src.jobid, source->nspace))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
src.vpid = pmix2x_convert_rank(source->rank);
|
||||
src.vpid = ext2x_convert_rank(source->rank);
|
||||
|
||||
opal_output_verbose(3, opal_pmix_base_framework.framework_output,
|
||||
"%s CLIENT %s CALLED NOTIFY",
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME),
|
||||
OPAL_NAME_PRINT(src));
|
||||
|
||||
/* ignore the range for now */
|
||||
|
||||
@ -836,9 +884,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 = pmix2x_value_unload(oinfo, &info[n].value))) {
|
||||
if (OPAL_SUCCESS != (rc = ext2x_value_unload(oinfo, &info[n].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
}
|
||||
|
||||
@ -847,12 +895,12 @@ static pmix_status_t server_notify_event(pmix_status_t code,
|
||||
opal_opcbfunc, opalcaddy))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
|
||||
static void _info_rel(void *cbdata)
|
||||
{
|
||||
pmix2x_opcaddy_t *pcaddy = (pmix2x_opcaddy_t*)cbdata;
|
||||
ext2x_opcaddy_t *pcaddy = (ext2x_opcaddy_t*)cbdata;
|
||||
|
||||
OBJ_RELEASE(pcaddy);
|
||||
}
|
||||
@ -862,15 +910,15 @@ static void info_cbfunc(int status,
|
||||
opal_pmix_release_cbfunc_t release_fn,
|
||||
void *release_cbdata)
|
||||
{
|
||||
pmix2x_opalcaddy_t *opalcaddy = (pmix2x_opalcaddy_t*)cbdata;
|
||||
pmix2x_opcaddy_t *pcaddy;
|
||||
ext2x_opalcaddy_t *opalcaddy = (ext2x_opalcaddy_t*)cbdata;
|
||||
ext2x_opcaddy_t *pcaddy;
|
||||
opal_value_t *kv;
|
||||
size_t n;
|
||||
|
||||
pcaddy = OBJ_NEW(pmix2x_opcaddy_t);
|
||||
pcaddy = OBJ_NEW(ext2x_opcaddy_t);
|
||||
|
||||
/* convert the status */
|
||||
pcaddy->status = pmix2x_convert_opalrc(status);
|
||||
pcaddy->status = ext2x_convert_opalrc(status);
|
||||
|
||||
/* convert the list to a pmix_info_t array */
|
||||
if (NULL != info) {
|
||||
@ -880,7 +928,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);
|
||||
pmix2x_value_load(&pcaddy->info[n].value, kv);
|
||||
ext2x_value_load(&pcaddy->info[n].value, kv);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -902,7 +950,7 @@ static pmix_status_t server_query(pmix_proc_t *proct,
|
||||
pmix_info_cbfunc_t cbfunc,
|
||||
void *cbdata)
|
||||
{
|
||||
pmix2x_opalcaddy_t *opalcaddy;
|
||||
ext2x_opalcaddy_t *opalcaddy;
|
||||
opal_process_name_t requestor;
|
||||
int rc;
|
||||
size_t n, m;
|
||||
@ -914,16 +962,21 @@ static pmix_status_t server_query(pmix_proc_t *proct,
|
||||
}
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t);
|
||||
opalcaddy = OBJ_NEW(ext2x_opalcaddy_t);
|
||||
opalcaddy->infocbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
/* convert the requestor */
|
||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&requestor.jobid, proct->nspace))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
requestor.vpid = pmix2x_convert_rank(proct->rank);
|
||||
requestor.vpid = ext2x_convert_rank(proct->rank);
|
||||
|
||||
opal_output_verbose(3, opal_pmix_base_framework.framework_output,
|
||||
"%s CLIENT %s CALLED QUERY",
|
||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME),
|
||||
OPAL_NAME_PRINT(requestor));
|
||||
|
||||
/* convert the queries */
|
||||
for (n=0; n < nqueries; n++) {
|
||||
@ -936,9 +989,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 = pmix2x_value_unload(oinfo, &queries[n].qualifiers[m].value))) {
|
||||
if (OPAL_SUCCESS != (rc = ext2x_value_unload(oinfo, &queries[n].qualifiers[m].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -950,28 +1003,28 @@ static pmix_status_t server_query(pmix_proc_t *proct,
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
}
|
||||
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
|
||||
static void toolcbfunc(int status,
|
||||
opal_process_name_t proc,
|
||||
void *cbdata)
|
||||
{
|
||||
pmix2x_opalcaddy_t *opalcaddy = (pmix2x_opalcaddy_t*)cbdata;
|
||||
ext2x_opalcaddy_t *opalcaddy = (ext2x_opalcaddy_t*)cbdata;
|
||||
pmix_status_t rc;
|
||||
pmix_proc_t p;
|
||||
opal_pmix2x_jobid_trkr_t *job;
|
||||
opal_ext2x_jobid_trkr_t *job;
|
||||
|
||||
/* convert the status */
|
||||
rc = pmix2x_convert_opalrc(status);
|
||||
rc = ext2x_convert_opalrc(status);
|
||||
|
||||
memset(&p, 0, sizeof(pmix_proc_t));
|
||||
if (OPAL_SUCCESS == status) {
|
||||
/* convert the process name */
|
||||
(void)opal_snprintf_jobid(p.nspace, PMIX_MAX_NSLEN, proc.jobid);
|
||||
p.rank = pmix2x_convert_opalrank(proc.vpid);
|
||||
p.rank = ext2x_convert_opalrank(proc.vpid);
|
||||
/* store this job in our list of known nspaces */
|
||||
job = OBJ_NEW(opal_pmix2x_jobid_trkr_t);
|
||||
job = OBJ_NEW(opal_ext2x_jobid_trkr_t);
|
||||
(void)strncpy(job->nspace, p.nspace, PMIX_MAX_NSLEN);
|
||||
job->jobid = proc.jobid;
|
||||
opal_list_append(&mca_pmix_ext2x_component.jobids, &job->super);
|
||||
@ -988,14 +1041,14 @@ static void server_tool_connection(pmix_info_t *info, size_t ninfo,
|
||||
pmix_tool_connection_cbfunc_t cbfunc,
|
||||
void *cbdata)
|
||||
{
|
||||
pmix2x_opalcaddy_t *opalcaddy;
|
||||
ext2x_opalcaddy_t *opalcaddy;
|
||||
size_t n;
|
||||
opal_value_t *oinfo;
|
||||
int rc;
|
||||
pmix_status_t err;
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t);
|
||||
opalcaddy = OBJ_NEW(ext2x_opalcaddy_t);
|
||||
opalcaddy->toolcbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
@ -1004,9 +1057,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 = pmix2x_value_unload(oinfo, &info[n].value))) {
|
||||
if (OPAL_SUCCESS != (rc = ext2x_value_unload(oinfo, &info[n].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
err = pmix2x_convert_opalrc(rc);
|
||||
err = ext2x_convert_opalrc(rc);
|
||||
if (NULL != cbfunc) {
|
||||
cbfunc(err, NULL, cbdata);
|
||||
}
|
||||
@ -1022,7 +1075,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)
|
||||
{
|
||||
pmix2x_opalcaddy_t *opalcaddy;
|
||||
ext2x_opalcaddy_t *opalcaddy;
|
||||
opal_process_name_t requestor;
|
||||
int rc;
|
||||
size_t n;
|
||||
@ -1037,20 +1090,20 @@ static void server_log(const pmix_proc_t *proct,
|
||||
}
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t);
|
||||
opalcaddy = OBJ_NEW(ext2x_opalcaddy_t);
|
||||
opalcaddy->opcbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
/* convert the requestor */
|
||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&requestor.jobid, proct->nspace))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
ret = pmix2x_convert_opalrc(rc);
|
||||
ret = ext2x_convert_opalrc(rc);
|
||||
if (NULL != cbfunc) {
|
||||
cbfunc(ret, cbdata);
|
||||
}
|
||||
return;
|
||||
}
|
||||
requestor.vpid = pmix2x_convert_rank(proct->rank);
|
||||
requestor.vpid = ext2x_convert_rank(proct->rank);
|
||||
|
||||
/* convert the data */
|
||||
for (n=0; n < ndata; n++) {
|
||||
@ -1059,9 +1112,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 = pmix2x_value_unload(oinfo, &data[n].value))) {
|
||||
if (OPAL_SUCCESS != (rc = ext2x_value_unload(oinfo, &data[n].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
ret = pmix2x_convert_opalrc(rc);
|
||||
ret = ext2x_convert_opalrc(rc);
|
||||
if (NULL != cbfunc) {
|
||||
cbfunc(ret, cbdata);
|
||||
}
|
||||
@ -1075,9 +1128,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 = pmix2x_value_unload(oinfo, &directives[n].value))) {
|
||||
if (OPAL_SUCCESS != (rc = ext2x_value_unload(oinfo, &directives[n].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
ret = pmix2x_convert_opalrc(rc);
|
||||
ret = ext2x_convert_opalrc(rc);
|
||||
if (NULL != cbfunc) {
|
||||
cbfunc(ret, cbdata);
|
||||
}
|
||||
@ -1097,7 +1150,7 @@ static pmix_status_t server_allocate(const pmix_proc_t *proct,
|
||||
const pmix_info_t data[], size_t ndata,
|
||||
pmix_info_cbfunc_t cbfunc, void *cbdata)
|
||||
{
|
||||
pmix2x_opalcaddy_t *opalcaddy;
|
||||
ext2x_opalcaddy_t *opalcaddy;
|
||||
opal_process_name_t requestor;
|
||||
int rc;
|
||||
size_t n;
|
||||
@ -1109,27 +1162,27 @@ static pmix_status_t server_allocate(const pmix_proc_t *proct,
|
||||
}
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t);
|
||||
opalcaddy = OBJ_NEW(ext2x_opalcaddy_t);
|
||||
opalcaddy->infocbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
/* convert the requestor */
|
||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&requestor.jobid, proct->nspace))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
requestor.vpid = pmix2x_convert_rank(proct->rank);
|
||||
requestor.vpid = ext2x_convert_rank(proct->rank);
|
||||
|
||||
/* convert the directive */
|
||||
odir = pmix2x_convert_allocdir(directive);
|
||||
odir = ext2x_convert_allocdir(directive);
|
||||
|
||||
/* convert the data */
|
||||
for (n=0; n < ndata; n++) {
|
||||
oinfo = OBJ_NEW(opal_value_t);
|
||||
opal_list_append(&opalcaddy->info, &oinfo->super);
|
||||
if (OPAL_SUCCESS != (rc = pmix2x_value_unload(oinfo, &data[n].value))) {
|
||||
if (OPAL_SUCCESS != (rc = ext2x_value_unload(oinfo, &data[n].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1138,7 +1191,7 @@ static pmix_status_t server_allocate(const pmix_proc_t *proct,
|
||||
&opalcaddy->info,
|
||||
info_cbfunc, opalcaddy))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
|
||||
return PMIX_SUCCESS;
|
||||
@ -1150,7 +1203,7 @@ static pmix_status_t server_job_control(const pmix_proc_t *proct,
|
||||
const pmix_info_t directives[], size_t ndirs,
|
||||
pmix_info_cbfunc_t cbfunc, void *cbdata)
|
||||
{
|
||||
pmix2x_opalcaddy_t *opalcaddy;
|
||||
ext2x_opalcaddy_t *opalcaddy;
|
||||
opal_process_name_t requestor;
|
||||
int rc;
|
||||
size_t n;
|
||||
@ -1162,16 +1215,16 @@ static pmix_status_t server_job_control(const pmix_proc_t *proct,
|
||||
}
|
||||
|
||||
/* setup the caddy */
|
||||
opalcaddy = OBJ_NEW(pmix2x_opalcaddy_t);
|
||||
opalcaddy = OBJ_NEW(ext2x_opalcaddy_t);
|
||||
opalcaddy->infocbfunc = cbfunc;
|
||||
opalcaddy->cbdata = cbdata;
|
||||
|
||||
/* convert the requestor */
|
||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&requestor.jobid, proct->nspace))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
requestor.vpid = pmix2x_convert_rank(proct->rank);
|
||||
requestor.vpid = ext2x_convert_rank(proct->rank);
|
||||
|
||||
/* convert the targets */
|
||||
for (n=0; n < ntargets; n++) {
|
||||
@ -1179,18 +1232,18 @@ static pmix_status_t server_job_control(const pmix_proc_t *proct,
|
||||
opal_list_append(&opalcaddy->procs, &nm->super);
|
||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&nm->name.jobid, targets[n].nspace))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
nm->name.vpid = pmix2x_convert_rank(targets[n].rank);
|
||||
nm->name.vpid = ext2x_convert_rank(targets[n].rank);
|
||||
}
|
||||
|
||||
/* convert the directives */
|
||||
for (n=0; n < ndirs; n++) {
|
||||
oinfo = OBJ_NEW(opal_value_t);
|
||||
opal_list_append(&opalcaddy->info, &oinfo->super);
|
||||
if (OPAL_SUCCESS != (rc = pmix2x_value_unload(oinfo, &directives[n].value))) {
|
||||
if (OPAL_SUCCESS != (rc = ext2x_value_unload(oinfo, &directives[n].value))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1200,7 +1253,7 @@ static pmix_status_t server_job_control(const pmix_proc_t *proct,
|
||||
&opalcaddy->info,
|
||||
info_cbfunc, opalcaddy))) {
|
||||
OBJ_RELEASE(opalcaddy);
|
||||
return pmix2x_convert_opalrc(rc);
|
||||
return ext2x_convert_opalrc(rc);
|
||||
}
|
||||
|
||||
return PMIX_SUCCESS;
|
||||
|
@ -52,58 +52,43 @@
|
||||
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); \
|
||||
} \
|
||||
OPAL_ACQUIRE_OBJECT(a); \
|
||||
} while (0)
|
||||
|
||||
static void errreg_cbfunc (pmix_status_t status,
|
||||
size_t errhandler_ref,
|
||||
void *cbdata)
|
||||
{
|
||||
volatile bool *active = (volatile bool*)cbdata;
|
||||
opal_ext2x_event_t *ev = (opal_ext2x_event_t*)cbdata;
|
||||
|
||||
OPAL_ACQUIRE_OBJECT(active);
|
||||
errhdler_ref = errhandler_ref;
|
||||
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(active);
|
||||
*active = false;
|
||||
OPAL_POST_OBJECT(ev);
|
||||
OPAL_PMIX_WAKEUP_THREAD(&ev->lock);
|
||||
}
|
||||
|
||||
static void opcbfunc(pmix_status_t status, void *cbdata)
|
||||
{
|
||||
pmix2x_opcaddy_t *op = (pmix2x_opcaddy_t*)cbdata;
|
||||
ext2x_opcaddy_t *op = (ext2x_opcaddy_t*)cbdata;
|
||||
|
||||
OPAL_ACQUIRE_OBJECT(op);
|
||||
|
||||
if (NULL != op->opcbfunc) {
|
||||
op->opcbfunc(pmix2x_convert_rc(status), op->cbdata);
|
||||
}
|
||||
if (op->active) {
|
||||
op->status = status;
|
||||
OPAL_POST_OBJECT(op);
|
||||
op->active = false;
|
||||
} else {
|
||||
OBJ_RELEASE(op);
|
||||
op->opcbfunc(ext2x_convert_rc(status), op->cbdata);
|
||||
}
|
||||
OBJ_RELEASE(op);
|
||||
}
|
||||
|
||||
static void op2cbfunc(pmix_status_t status, void *cbdata)
|
||||
static void lkcbfunc(pmix_status_t status, void *cbdata)
|
||||
{
|
||||
volatile bool *active = (volatile bool*)cbdata;
|
||||
opal_pmix_lock_t *lk = (opal_pmix_lock_t*)cbdata;
|
||||
|
||||
OPAL_POST_OBJECT(active);
|
||||
*active = false;
|
||||
OPAL_POST_OBJECT(lk);
|
||||
OPAL_PMIX_WAKEUP_THREAD(lk);
|
||||
}
|
||||
|
||||
int pmix2x_server_init(opal_pmix_server_module_t *module,
|
||||
int ext2x_server_init(opal_pmix_server_module_t *module,
|
||||
opal_list_t *info)
|
||||
{
|
||||
pmix_status_t rc;
|
||||
@ -111,13 +96,19 @@ int pmix2x_server_init(opal_pmix_server_module_t *module,
|
||||
opal_value_t *kv;
|
||||
pmix_info_t *pinfo;
|
||||
size_t sz, n;
|
||||
volatile bool active;
|
||||
opal_pmix2x_jobid_trkr_t *job;
|
||||
opal_ext2x_event_t *event;
|
||||
opal_ext2x_jobid_trkr_t *job;
|
||||
opal_pmix_lock_t lk;
|
||||
|
||||
if (0 < (dbg = opal_output_get_verbosity(opal_pmix_base_framework.framework_output))) {
|
||||
asprintf(&dbgvalue, "PMIX_DEBUG=%d", dbg);
|
||||
putenv(dbgvalue);
|
||||
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);
|
||||
}
|
||||
}
|
||||
++opal_pmix_base.initialized;
|
||||
|
||||
/* convert the list to an array of pmix_info_t */
|
||||
if (NULL != info) {
|
||||
@ -126,7 +117,7 @@ int pmix2x_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);
|
||||
pmix2x_value_load(&pinfo[n].value, kv);
|
||||
ext2x_value_load(&pinfo[n].value, kv);
|
||||
++n;
|
||||
}
|
||||
} else {
|
||||
@ -136,14 +127,15 @@ int pmix2x_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_pmix2x_jobid_trkr_t);
|
||||
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);
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
|
||||
if (PMIX_SUCCESS != (rc = PMIx_server_init(&mymodule, pinfo, sz))) {
|
||||
PMIX_INFO_FREE(pinfo, sz);
|
||||
return pmix2x_convert_rc(rc);
|
||||
return ext2x_convert_rc(rc);
|
||||
}
|
||||
PMIX_INFO_FREE(pinfo, sz);
|
||||
|
||||
@ -151,95 +143,127 @@ int pmix2x_server_init(opal_pmix_server_module_t *module,
|
||||
host_module = module;
|
||||
|
||||
/* register the default event handler */
|
||||
active = true;
|
||||
event = OBJ_NEW(opal_ext2x_event_t);
|
||||
opal_list_append(&mca_pmix_ext2x_component.events, &event->super);
|
||||
PMIX_INFO_CREATE(pinfo, 1);
|
||||
PMIX_INFO_LOAD(&pinfo[0], PMIX_EVENT_HDLR_NAME, "OPAL-PMIX-2X-SERVER-DEFAULT", PMIX_STRING);
|
||||
PMIx_Register_event_handler(NULL, 0, pinfo, 1, pmix2x_event_hdlr, errreg_cbfunc, (void*)&active);
|
||||
PMIX_WAIT_FOR_COMPLETION(active);
|
||||
PMIx_Register_event_handler(NULL, 0, pinfo, 1, ext2x_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);
|
||||
active = true;
|
||||
PMIx_server_register_nspace(job->nspace, 1, pinfo, 1, op2cbfunc, (void*)&active);
|
||||
PMIX_WAIT_FOR_COMPLETION(active);
|
||||
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 fincb(pmix_status_t status, void *cbdata)
|
||||
static void dereg_cbfunc(pmix_status_t st, void *cbdata)
|
||||
{
|
||||
volatile bool *active = (volatile bool*)cbdata;
|
||||
OPAL_POST_OBJECT(active);
|
||||
*active = false;
|
||||
opal_ext2x_event_t *ev = (opal_ext2x_event_t*)cbdata;
|
||||
OPAL_PMIX_WAKEUP_THREAD(&ev->lock);
|
||||
}
|
||||
|
||||
int pmix2x_server_finalize(void)
|
||||
int ext2x_server_finalize(void)
|
||||
{
|
||||
pmix_status_t rc;
|
||||
volatile bool active;
|
||||
opal_ext2x_event_t *event, *ev2;
|
||||
|
||||
/* deregister the default event handler */
|
||||
active = true;
|
||||
PMIx_Deregister_event_handler(errhdler_ref, fincb, (void*)&active);
|
||||
PMIX_WAIT_FOR_COMPLETION(active);
|
||||
OPAL_PMIX_ACQUIRE_THREAD(&opal_pmix_base.lock);
|
||||
--opal_pmix_base.initialized;
|
||||
|
||||
if (0 < opal_pmix_base.initialized) {
|
||||
/* deregister all event handlers */
|
||||
OPAL_LIST_FOREACH_SAFE(event, ev2, &mca_pmix_ext2x_component.events, opal_ext2x_event_t) {
|
||||
OPAL_PMIX_DESTRUCT_LOCK(&event->lock);
|
||||
OPAL_PMIX_CONSTRUCT_LOCK(&event->lock);
|
||||
PMIx_Deregister_event_handler(event->index, dereg_cbfunc, (void*)event);
|
||||
OPAL_PMIX_WAIT_THREAD(&event->lock);
|
||||
opal_list_remove_item(&mca_pmix_ext2x_component.events, &event->super);
|
||||
OBJ_RELEASE(event);
|
||||
}
|
||||
}
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
|
||||
rc = PMIx_server_finalize();
|
||||
return pmix2x_convert_rc(rc);
|
||||
return ext2x_convert_rc(rc);
|
||||
}
|
||||
|
||||
int pmix2x_server_gen_regex(const char *input, char **regex)
|
||||
int ext2x_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 pmix2x_convert_rc(rc);
|
||||
return ext2x_convert_rc(rc);
|
||||
}
|
||||
|
||||
|
||||
int pmix2x_server_gen_ppn(const char *input, char **ppn)
|
||||
int ext2x_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 pmix2x_convert_rc(rc);
|
||||
return ext2x_convert_rc(rc);
|
||||
}
|
||||
|
||||
static void _reg_nspace(int sd, short args, void *cbdata)
|
||||
int ext2x_server_register_nspace(opal_jobid_t jobid,
|
||||
int nlocalprocs,
|
||||
opal_list_t *info,
|
||||
opal_pmix_op_cbfunc_t cbfunc,
|
||||
void *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_pmix2x_jobid_trkr_t *job;
|
||||
pmix2x_opcaddy_t op;
|
||||
opal_ext2x_jobid_trkr_t *job;
|
||||
opal_pmix_lock_t lock;
|
||||
int ret;
|
||||
|
||||
OPAL_ACQUIRE_OBJECT(cd);
|
||||
|
||||
/* we must threadshift this request as we might not be in an event
|
||||
* and we are going to access framework-global lists/objects */
|
||||
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, cd->jobid);
|
||||
(void)opal_snprintf_jobid(nspace, PMIX_MAX_NSLEN, jobid);
|
||||
|
||||
/* store this job in our list of known nspaces */
|
||||
job = OBJ_NEW(opal_pmix2x_jobid_trkr_t);
|
||||
job = OBJ_NEW(opal_ext2x_jobid_trkr_t);
|
||||
(void)strncpy(job->nspace, nspace, PMIX_MAX_NSLEN);
|
||||
job->jobid = cd->jobid;
|
||||
job->jobid = jobid;
|
||||
opal_list_append(&mca_pmix_ext2x_component.jobids, &job->super);
|
||||
OPAL_PMIX_RELEASE_THREAD(&opal_pmix_base.lock);
|
||||
|
||||
/* convert the list to an array of pmix_info_t */
|
||||
if (NULL != cd->info) {
|
||||
sz = opal_list_get_size(cd->info);
|
||||
if (NULL != info) {
|
||||
sz = opal_list_get_size(info);
|
||||
PMIX_INFO_CREATE(pinfo, sz);
|
||||
n = 0;
|
||||
OPAL_LIST_FOREACH(kv, cd->info, opal_value_t) {
|
||||
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;
|
||||
@ -255,12 +279,12 @@ 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);
|
||||
pmix2x_value_load(&pmap[m].value, k2);
|
||||
ext2x_value_load(&pmap[m].value, k2);
|
||||
++m;
|
||||
}
|
||||
OPAL_LIST_RELEASE(pmapinfo);
|
||||
} else {
|
||||
pmix2x_value_load(&pinfo[n].value, kv);
|
||||
ext2x_value_load(&pinfo[n].value, kv);
|
||||
}
|
||||
++n;
|
||||
}
|
||||
@ -269,119 +293,67 @@ static void _reg_nspace(int sd, short args, void *cbdata)
|
||||
pinfo = NULL;
|
||||
}
|
||||
|
||||
OBJ_CONSTRUCT(&op, pmix2x_opcaddy_t);
|
||||
op.active = true;
|
||||
rc = PMIx_server_register_nspace(nspace, cd->status, pinfo, sz,
|
||||
opcbfunc, (void*)&op);
|
||||
OPAL_PMIX_CONSTRUCT_LOCK(&lock);
|
||||
rc = PMIx_server_register_nspace(nspace, nlocalprocs, pinfo, sz,
|
||||
lkcbfunc, (void*)&lock);
|
||||
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(pmix2x_convert_rc(op.status), cd->cbdata);
|
||||
OPAL_PMIX_WAIT_THREAD(&lock);
|
||||
}
|
||||
OPAL_PMIX_DESTRUCT_LOCK(&lock);
|
||||
|
||||
if (NULL != pinfo) {
|
||||
PMIX_INFO_FREE(pinfo, sz);
|
||||
}
|
||||
OBJ_DESTRUCT(&op);
|
||||
OBJ_RELEASE(cd);
|
||||
|
||||
ret = ext2x_convert_rc(rc);
|
||||
|
||||
/* release the caller */
|
||||
if (NULL != cbfunc) {
|
||||
cbfunc(ret, cbdata);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
int pmix2x_server_register_nspace(opal_jobid_t jobid,
|
||||
int nlocalprocs,
|
||||
opal_list_t *info,
|
||||
opal_pmix_op_cbfunc_t cbfunc,
|
||||
void *cbdata)
|
||||
{
|
||||
pmix2x_threadshift_t *cd;
|
||||
|
||||
/* we must threadshift this request as it touches
|
||||
* shared lists of objects */
|
||||
cd = OBJ_NEW(pmix2x_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 {
|
||||
opal_event_assign(&cd->ev, opal_pmix_base.evbase,
|
||||
-1, EV_WRITE, _reg_nspace, cd);
|
||||
OPAL_POST_OBJECT(cd);
|
||||
opal_event_active(&cd->ev, EV_WRITE, 1);
|
||||
}
|
||||
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
static void tdcbfunc(pmix_status_t status, void *cbdata)
|
||||
{
|
||||
pmix2x_threadshift_t *cd = (pmix2x_threadshift_t*)cbdata;
|
||||
|
||||
OPAL_ACQUIRE_OBJECT(cd);
|
||||
if (NULL != cd->opcbfunc) {
|
||||
cd->opcbfunc(pmix2x_convert_rc(status), cd->cbdata);
|
||||
}
|
||||
if (cd->active) {
|
||||
OPAL_POST_OBJECT(cd);
|
||||
cd->active = false;
|
||||
} else {
|
||||
OBJ_RELEASE(cd);
|
||||
}
|
||||
}
|
||||
|
||||
static void _dereg_nspace(int sd, short args, void *cbdata)
|
||||
{
|
||||
pmix2x_threadshift_t *cd = (pmix2x_threadshift_t*)cbdata;
|
||||
opal_pmix2x_jobid_trkr_t *jptr;
|
||||
|
||||
OPAL_ACQUIRE_OBJECT(cd);
|
||||
/* if we don't already have it, we can ignore this */
|
||||
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;
|
||||
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 pmix2x_server_deregister_nspace(opal_jobid_t jobid,
|
||||
void ext2x_server_deregister_nspace(opal_jobid_t jobid,
|
||||
opal_pmix_op_cbfunc_t cbfunc,
|
||||
void *cbdata)
|
||||
{
|
||||
pmix2x_threadshift_t *cd;
|
||||
opal_ext2x_jobid_trkr_t *jptr;
|
||||
opal_pmix_lock_t lock;
|
||||
|
||||
/* we must threadshift this request as it touches
|
||||
* shared lists of objects */
|
||||
cd = OBJ_NEW(pmix2x_threadshift_t);
|
||||
cd->jobid = jobid;
|
||||
cd->opcbfunc = cbfunc;
|
||||
cd->cbdata = cbdata;
|
||||
if (NULL == cbfunc) {
|
||||
_dereg_nspace(0, 0, cd);
|
||||
} else {
|
||||
opal_event_assign(&cd->ev, opal_pmix_base.evbase,
|
||||
-1, EV_WRITE, _dereg_nspace, cd);
|
||||
OPAL_POST_OBJECT(cd);
|
||||
opal_event_active(&cd->ev, EV_WRITE, 1);
|
||||
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_ext2x_component.jobids, opal_ext2x_jobid_trkr_t) {
|
||||
if (jptr->jobid == jobid) {
|
||||
/* found it - tell the server to deregister */
|
||||
OPAL_PMIX_CONSTRUCT_LOCK(&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_list_remove_item(&mca_pmix_ext2x_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 pmix2x_server_register_client(const opal_process_name_t *proc,
|
||||
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,
|
||||
@ -389,82 +361,86 @@ int pmix2x_server_register_client(const opal_process_name_t *proc,
|
||||
{
|
||||
pmix_status_t rc;
|
||||
pmix_proc_t p;
|
||||
pmix2x_opcaddy_t op;
|
||||
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 = pmix2x_convert_opalrank(proc->vpid);
|
||||
p.rank = ext2x_convert_opalrank(proc->vpid);
|
||||
|
||||
OBJ_CONSTRUCT(&op, pmix2x_opcaddy_t);
|
||||
op.active = true;
|
||||
OPAL_PMIX_CONSTRUCT_LOCK(&lock);
|
||||
rc = PMIx_server_register_client(&p, uid, gid, server_object,
|
||||
opcbfunc, (void*)&op);
|
||||
lkcbfunc, (void*)&lock);
|
||||
if (PMIX_SUCCESS == rc) {
|
||||
PMIX_WAIT_FOR_COMPLETION(op.active);
|
||||
rc = op.status;
|
||||
OPAL_PMIX_WAIT_THREAD(&lock);
|
||||
}
|
||||
OBJ_DESTRUCT(&op);
|
||||
return pmix2x_convert_rc(rc);
|
||||
}
|
||||
|
||||
static void _dereg_client(int sd, short args, void *cbdata)
|
||||
{
|
||||
pmix2x_threadshift_t *cd = (pmix2x_threadshift_t*)cbdata;
|
||||
opal_pmix2x_jobid_trkr_t *jptr;
|
||||
pmix_proc_t p;
|
||||
|
||||
OPAL_ACQUIRE_OBJECT(cd);
|
||||
/* if we don't already have it, we can ignore this */
|
||||
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 = pmix2x_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);
|
||||
OPAL_PMIX_DESTRUCT_LOCK(&lock);
|
||||
return ext2x_convert_rc(rc);
|
||||
}
|
||||
|
||||
/* tell the local PMIx server to cleanup this client as it is
|
||||
* done executing */
|
||||
void pmix2x_server_deregister_client(const opal_process_name_t *proc,
|
||||
void ext2x_server_deregister_client(const opal_process_name_t *proc,
|
||||
opal_pmix_op_cbfunc_t cbfunc,
|
||||
void *cbdata)
|
||||
{
|
||||
pmix2x_threadshift_t *cd;
|
||||
opal_ext2x_jobid_trkr_t *jptr;
|
||||
pmix_proc_t p;
|
||||
opal_pmix_lock_t lock;
|
||||
|
||||
/* 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(pmix2x_threadshift_t);
|
||||
cd->source = proc;
|
||||
cd->opcbfunc = cbfunc;
|
||||
cd->cbdata = cbdata;
|
||||
if (NULL == cbfunc) {
|
||||
_dereg_client(0, 0, cd);
|
||||
} else {
|
||||
opal_event_assign(&cd->ev, opal_pmix_base.evbase,
|
||||
-1, EV_WRITE, _dereg_client, cd);
|
||||
OPAL_POST_OBJECT(cd);
|
||||
opal_event_active(&cd->ev, EV_WRITE, 1);
|
||||
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_ext2x_component.jobids, opal_ext2x_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 = ext2x_convert_opalrank(proc->vpid);
|
||||
OPAL_PMIX_CONSTRUCT_LOCK(&lock);
|
||||
PMIx_server_deregister_client(&p, lkcbfunc, (void*)&lock);
|
||||
OPAL_PMIX_WAIT_THREAD(&lock);
|
||||
OPAL_PMIX_DESTRUCT_LOCK(&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 pmix2x_server_setup_fork(const opal_process_name_t *proc, char ***env)
|
||||
int ext2x_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 = pmix2x_convert_opalrank(proc->vpid);
|
||||
p.rank = ext2x_convert_opalrank(proc->vpid);
|
||||
|
||||
rc = PMIx_server_setup_fork(&p, env);
|
||||
return pmix2x_convert_rc(rc);
|
||||
return ext2x_convert_rc(rc);
|
||||
}
|
||||
|
||||
/* this is the call back up from the embedded PMIx server that
|
||||
@ -473,9 +449,9 @@ int pmix2x_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;
|
||||
pmix2x_opcaddy_t *op = (pmix2x_opcaddy_t*)cbdata;
|
||||
ext2x_opcaddy_t *op = (ext2x_opcaddy_t*)cbdata;
|
||||
|
||||
rc = pmix2x_convert_rc(status);
|
||||
rc = ext2x_convert_rc(status);
|
||||
if (NULL != op->mdxcbfunc) {
|
||||
op->mdxcbfunc(rc, data, sz, op->cbdata, NULL, NULL);
|
||||
}
|
||||
@ -483,31 +459,38 @@ 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 pmix2x_server_dmodex(const opal_process_name_t *proc,
|
||||
int ext2x_server_dmodex(const opal_process_name_t *proc,
|
||||
opal_pmix_modex_cbfunc_t cbfunc, void *cbdata)
|
||||
{
|
||||
pmix2x_opcaddy_t *op;
|
||||
ext2x_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(pmix2x_opcaddy_t);
|
||||
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 = pmix2x_convert_opalrank(proc->vpid);
|
||||
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 pmix2x_convert_rc(rc);
|
||||
return ext2x_convert_rc(rc);
|
||||
}
|
||||
|
||||
/* tell the PMIx server to notify its local clients of an event */
|
||||
int pmix2x_server_notify_event(int status,
|
||||
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)
|
||||
@ -516,7 +499,14 @@ int pmix2x_server_notify_event(int status,
|
||||
pmix_info_t *pinfo;
|
||||
size_t sz, n;
|
||||
pmix_status_t rc;
|
||||
pmix2x_opcaddy_t *op;
|
||||
ext2x_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) {
|
||||
@ -525,7 +515,7 @@ int pmix2x_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);
|
||||
pmix2x_value_load(&pinfo[n].value, kv);
|
||||
ext2x_value_load(&pinfo[n].value, kv);
|
||||
++n;
|
||||
}
|
||||
} else {
|
||||
@ -533,7 +523,7 @@ int pmix2x_server_notify_event(int status,
|
||||
pinfo = NULL;
|
||||
}
|
||||
/* setup the caddy */
|
||||
op = OBJ_NEW(pmix2x_opcaddy_t);
|
||||
op = OBJ_NEW(ext2x_opcaddy_t);
|
||||
op->info = pinfo;
|
||||
op->sz = sz;
|
||||
op->opcbfunc = cbfunc;
|
||||
@ -541,14 +531,14 @@ int pmix2x_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 = pmix2x_convert_opalrank(OPAL_VPID_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 = pmix2x_convert_opalrank(source->vpid);
|
||||
op->p.rank = ext2x_convert_opalrank(source->vpid);
|
||||
}
|
||||
|
||||
|
||||
rc = pmix2x_convert_opalrc(status);
|
||||
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,
|
||||
@ -556,5 +546,5 @@ int pmix2x_server_notify_event(int status,
|
||||
if (PMIX_SUCCESS != rc) {
|
||||
OBJ_RELEASE(op);
|
||||
}
|
||||
return pmix2x_convert_rc(rc);
|
||||
return ext2x_convert_rc(rc);
|
||||
}
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user