Merge pull request #1952 from rhc54/topic/pmixcov
Update to latest PMIx toolext branch
Этот коммит содержится в:
Коммит
82240f579a
6
.gitignore
поставляемый
6
.gitignore
поставляемый
@ -305,6 +305,12 @@ opal/mca/pmix/pmix*/pmix/include/pmix/autogen/config.h
|
|||||||
opal/mca/pmix/pmix*/pmix/include/pmix/autogen/config.h.in
|
opal/mca/pmix/pmix*/pmix/include/pmix/autogen/config.h.in
|
||||||
opal/mca/pmix/pmix*/pmix/src/include/private/autogen/config.h.in
|
opal/mca/pmix/pmix*/pmix/src/include/private/autogen/config.h.in
|
||||||
opal/mca/pmix/pmix*/pmix/src/include/private/autogen/config.h
|
opal/mca/pmix/pmix*/pmix/src/include/private/autogen/config.h
|
||||||
|
opal/mca/hwloc/base/static-components.h.new.extern
|
||||||
|
opal/mca/hwloc/base/static-components.h.new.struct
|
||||||
|
opal/mca/pmix/pmix2x/pmix/src/include/frameworks.h
|
||||||
|
opal/mca/pmix/pmix2x/pmix/src/mca/pinstalldirs/config/pinstall_dirs.h
|
||||||
|
opal/mca/pmix/pmix2x/pmix/config/autogen_found_items.m4
|
||||||
|
opal/mca/pmix/pmix2x/pmix/src/include/pmix_config.h
|
||||||
|
|
||||||
opal/tools/opal-checkpoint/opal-checkpoint
|
opal/tools/opal-checkpoint/opal-checkpoint
|
||||||
opal/tools/opal-checkpoint/opal-checkpoint.1
|
opal/tools/opal-checkpoint/opal-checkpoint.1
|
||||||
|
@ -66,7 +66,7 @@ AC_DEFUN([MCA_opal_pmix_ext20_CONFIG],[
|
|||||||
OPAL_CHECK_PACKAGE([opal_pmix_ext20],
|
OPAL_CHECK_PACKAGE([opal_pmix_ext20],
|
||||||
[pmix.h],
|
[pmix.h],
|
||||||
[pmix],
|
[pmix],
|
||||||
[PMIx_Query_info],
|
[PMIx_Query_info_nb],
|
||||||
[-lpmix],
|
[-lpmix],
|
||||||
[$pmix_ext_install_dir],
|
[$pmix_ext_install_dir],
|
||||||
[$pmix_ext_install_dir/lib],
|
[$pmix_ext_install_dir/lib],
|
||||||
|
@ -39,15 +39,15 @@
|
|||||||
#include "opal/mca/pmix/base/base.h"
|
#include "opal/mca/pmix/base/base.h"
|
||||||
#include "opal/mca/pmix/pmix_types.h"
|
#include "opal/mca/pmix/pmix_types.h"
|
||||||
|
|
||||||
#include <pmix/pmix_common.h>
|
#include <pmix_common.h>
|
||||||
|
|
||||||
/**** C.O.M.M.O.N I.N.T.E.R.F.A.C.E.S ****/
|
/**** C.O.M.M.O.N I.N.T.E.R.F.A.C.E.S ****/
|
||||||
|
|
||||||
/* These are functions used by both client and server to
|
/* These are functions used by both client and server to
|
||||||
* access common functions in the embedded PMIx library */
|
* access common functions in the embedded PMIx library */
|
||||||
|
|
||||||
static const char *pmix20_get_nspace(opal_jobid_t jobid);
|
static const char *ext20_get_nspace(opal_jobid_t jobid);
|
||||||
static void pmix20_register_jobid(opal_jobid_t jobid, const char *nspace);
|
static void ext20_register_jobid(opal_jobid_t jobid, const char *nspace);
|
||||||
static void register_handler(opal_list_t *event_codes,
|
static void register_handler(opal_list_t *event_codes,
|
||||||
opal_list_t *info,
|
opal_list_t *info,
|
||||||
opal_pmix_notification_fn_t evhandler,
|
opal_pmix_notification_fn_t evhandler,
|
||||||
@ -64,57 +64,57 @@ static int notify_event(int status,
|
|||||||
|
|
||||||
const opal_pmix_base_module_t opal_pmix_ext20_module = {
|
const opal_pmix_base_module_t opal_pmix_ext20_module = {
|
||||||
/* client APIs */
|
/* client APIs */
|
||||||
.init = pmix20_client_init,
|
.init = ext20_client_init,
|
||||||
.finalize = pmix20_client_finalize,
|
.finalize = ext20_client_finalize,
|
||||||
.initialized = pmix20_initialized,
|
.initialized = ext20_initialized,
|
||||||
.abort = pmix20_abort,
|
.abort = ext20_abort,
|
||||||
.commit = pmix20_commit,
|
.commit = ext20_commit,
|
||||||
.fence = pmix20_fence,
|
.fence = ext20_fence,
|
||||||
.fence_nb = pmix20_fencenb,
|
.fence_nb = ext20_fencenb,
|
||||||
.put = pmix20_put,
|
.put = ext20_put,
|
||||||
.get = pmix20_get,
|
.get = ext20_get,
|
||||||
.get_nb = pmix20_getnb,
|
.get_nb = ext20_getnb,
|
||||||
.publish = pmix20_publish,
|
.publish = ext20_publish,
|
||||||
.publish_nb = pmix20_publishnb,
|
.publish_nb = ext20_publishnb,
|
||||||
.lookup = pmix20_lookup,
|
.lookup = ext20_lookup,
|
||||||
.lookup_nb = pmix20_lookupnb,
|
.lookup_nb = ext20_lookupnb,
|
||||||
.unpublish = pmix20_unpublish,
|
.unpublish = ext20_unpublish,
|
||||||
.unpublish_nb = pmix20_unpublishnb,
|
.unpublish_nb = ext20_unpublishnb,
|
||||||
.spawn = pmix20_spawn,
|
.spawn = ext20_spawn,
|
||||||
.spawn_nb = pmix20_spawnnb,
|
.spawn_nb = ext20_spawnnb,
|
||||||
.connect = pmix20_connect,
|
.connect = ext20_connect,
|
||||||
.connect_nb = pmix20_connectnb,
|
.connect_nb = ext20_connectnb,
|
||||||
.disconnect = pmix20_disconnect,
|
.disconnect = ext20_disconnect,
|
||||||
.disconnect_nb = pmix20_disconnectnb,
|
.disconnect_nb = ext20_disconnectnb,
|
||||||
.resolve_peers = pmix20_resolve_peers,
|
.resolve_peers = ext20_resolve_peers,
|
||||||
.resolve_nodes = pmix20_resolve_nodes,
|
.resolve_nodes = ext20_resolve_nodes,
|
||||||
/* server APIs */
|
/* server APIs */
|
||||||
.server_init = pmix20_server_init,
|
.server_init = ext20_server_init,
|
||||||
.server_finalize = pmix20_server_finalize,
|
.server_finalize = ext20_server_finalize,
|
||||||
.generate_regex = pmix20_server_gen_regex,
|
.generate_regex = ext20_server_gen_regex,
|
||||||
.generate_ppn = pmix20_server_gen_ppn,
|
.generate_ppn = ext20_server_gen_ppn,
|
||||||
.server_register_nspace = pmix20_server_register_nspace,
|
.server_register_nspace = ext20_server_register_nspace,
|
||||||
.server_deregister_nspace = pmix20_server_deregister_nspace,
|
.server_deregister_nspace = ext20_server_deregister_nspace,
|
||||||
.server_register_client = pmix20_server_register_client,
|
.server_register_client = ext20_server_register_client,
|
||||||
.server_deregister_client = pmix20_server_deregister_client,
|
.server_deregister_client = ext20_server_deregister_client,
|
||||||
.server_setup_fork = pmix20_server_setup_fork,
|
.server_setup_fork = ext20_server_setup_fork,
|
||||||
.server_dmodex_request = pmix20_server_dmodex,
|
.server_dmodex_request = ext20_server_dmodex,
|
||||||
.server_notify_event = pmix20_server_notify_event,
|
.server_notify_event = ext20_server_notify_event,
|
||||||
/* utility APIs */
|
/* utility APIs */
|
||||||
.get_version = PMIx_Get_version,
|
.get_version = PMIx_Get_version,
|
||||||
.register_evhandler = register_handler,
|
.register_evhandler = register_handler,
|
||||||
.deregister_evhandler = deregister_handler,
|
.deregister_evhandler = deregister_handler,
|
||||||
.notify_event = notify_event,
|
.notify_event = notify_event,
|
||||||
.store_local = pmix20_store_local,
|
.store_local = ext20_store_local,
|
||||||
.get_nspace = pmix20_get_nspace,
|
.get_nspace = ext20_get_nspace,
|
||||||
.register_jobid = pmix20_register_jobid
|
.register_jobid = ext20_register_jobid
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char *pmix20_get_nspace(opal_jobid_t jobid)
|
static const char *ext20_get_nspace(opal_jobid_t jobid)
|
||||||
{
|
{
|
||||||
opal_pmix20_jobid_trkr_t *jptr;
|
opal_ext20_jobid_trkr_t *jptr;
|
||||||
|
|
||||||
OPAL_LIST_FOREACH(jptr, &mca_pmix_ext20_component.jobids, opal_pmix20_jobid_trkr_t) {
|
OPAL_LIST_FOREACH(jptr, &mca_pmix_ext20_component.jobids, opal_ext20_jobid_trkr_t) {
|
||||||
if (jptr->jobid == jobid) {
|
if (jptr->jobid == jobid) {
|
||||||
return jptr->nspace;
|
return jptr->nspace;
|
||||||
}
|
}
|
||||||
@ -122,17 +122,17 @@ static const char *pmix20_get_nspace(opal_jobid_t jobid)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pmix20_register_jobid(opal_jobid_t jobid, const char *nspace)
|
static void ext20_register_jobid(opal_jobid_t jobid, const char *nspace)
|
||||||
{
|
{
|
||||||
opal_pmix20_jobid_trkr_t *jptr;
|
opal_ext20_jobid_trkr_t *jptr;
|
||||||
|
|
||||||
/* if we don't already have it, add this to our jobid tracker */
|
/* if we don't already have it, add this to our jobid tracker */
|
||||||
OPAL_LIST_FOREACH(jptr, &mca_pmix_ext20_component.jobids, opal_pmix20_jobid_trkr_t) {
|
OPAL_LIST_FOREACH(jptr, &mca_pmix_ext20_component.jobids, opal_ext20_jobid_trkr_t) {
|
||||||
if (jptr->jobid == jobid) {
|
if (jptr->jobid == jobid) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
jptr = OBJ_NEW(opal_pmix20_jobid_trkr_t);
|
jptr = OBJ_NEW(opal_ext20_jobid_trkr_t);
|
||||||
(void)strncpy(jptr->nspace, nspace, PMIX_MAX_NSLEN);
|
(void)strncpy(jptr->nspace, nspace, PMIX_MAX_NSLEN);
|
||||||
jptr->jobid = jobid;
|
jptr->jobid = jobid;
|
||||||
opal_list_append(&mca_pmix_ext20_component.jobids, &jptr->super);
|
opal_list_append(&mca_pmix_ext20_component.jobids, &jptr->super);
|
||||||
@ -140,7 +140,7 @@ static void pmix20_register_jobid(opal_jobid_t jobid, const char *nspace)
|
|||||||
|
|
||||||
static void completion_handler(int status, void *cbdata)
|
static void completion_handler(int status, void *cbdata)
|
||||||
{
|
{
|
||||||
opal_pmix20_event_chain_t *chain = (opal_pmix20_event_chain_t*)cbdata;
|
opal_ext20_event_chain_t *chain = (opal_ext20_event_chain_t*)cbdata;
|
||||||
if (NULL != chain->info) {
|
if (NULL != chain->info) {
|
||||||
OPAL_LIST_RELEASE(chain->info);
|
OPAL_LIST_RELEASE(chain->info);
|
||||||
}
|
}
|
||||||
@ -151,12 +151,17 @@ static void progress_local_event_hdlr(int status,
|
|||||||
opal_pmix_op_cbfunc_t cbfunc, void *thiscbdata,
|
opal_pmix_op_cbfunc_t cbfunc, void *thiscbdata,
|
||||||
void *notification_cbdata)
|
void *notification_cbdata)
|
||||||
{
|
{
|
||||||
opal_pmix20_event_chain_t *chain = (opal_pmix20_event_chain_t*)notification_cbdata;
|
opal_ext20_event_chain_t *chain = (opal_ext20_event_chain_t*)notification_cbdata;
|
||||||
size_t n;
|
size_t n;
|
||||||
opal_list_item_t *nxt;
|
opal_list_item_t *nxt;
|
||||||
opal_pmix20_single_event_t *sing;
|
opal_ext20_single_event_t *sing;
|
||||||
opal_pmix20_multi_event_t *multi;
|
opal_ext20_multi_event_t *multi;
|
||||||
opal_pmix20_default_event_t *def;
|
opal_ext20_default_event_t *def;
|
||||||
|
|
||||||
|
/* if the caller indicates that the chain is completed, then stop here */
|
||||||
|
if (OPAL_ERR_HANDLERS_COMPLETE == status) {
|
||||||
|
goto complete;
|
||||||
|
}
|
||||||
|
|
||||||
/* if any results were provided, then add them here */
|
/* if any results were provided, then add them here */
|
||||||
if (NULL != results) {
|
if (NULL != results) {
|
||||||
@ -165,17 +170,12 @@ static void progress_local_event_hdlr(int status,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if the caller indicates that the chain is completed, then stop here */
|
|
||||||
if (OPAL_ERR_HANDLERS_COMPLETE == status) {
|
|
||||||
goto complete;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* see if we need to continue, starting with the single code events */
|
/* see if we need to continue, starting with the single code events */
|
||||||
if (NULL != chain->sing) {
|
if (NULL != chain->sing) {
|
||||||
/* the last handler was for a single code - see if there are
|
/* the last handler was for a single code - see if there are
|
||||||
* any others that match this event */
|
* any others that match this event */
|
||||||
while (opal_list_get_end(&mca_pmix_ext20_component.single_events) != (nxt = opal_list_get_next(&chain->sing->super))) {
|
while (opal_list_get_end(&mca_pmix_ext20_component.single_events) != (nxt = opal_list_get_next(&chain->sing->super))) {
|
||||||
sing = (opal_pmix20_single_event_t*)nxt;
|
sing = (opal_ext20_single_event_t*)nxt;
|
||||||
if (sing->code == chain->status) {
|
if (sing->code == chain->status) {
|
||||||
OBJ_RETAIN(chain);
|
OBJ_RETAIN(chain);
|
||||||
chain->sing = sing;
|
chain->sing = sing;
|
||||||
@ -190,14 +190,14 @@ static void progress_local_event_hdlr(int status,
|
|||||||
chain->sing = NULL;
|
chain->sing = NULL;
|
||||||
/* pickup the beginning of the multi-code event list */
|
/* pickup the beginning of the multi-code event list */
|
||||||
if (0 < opal_list_get_size(&mca_pmix_ext20_component.multi_events)) {
|
if (0 < opal_list_get_size(&mca_pmix_ext20_component.multi_events)) {
|
||||||
chain->multi = (opal_pmix20_multi_event_t*)opal_list_get_begin(&mca_pmix_ext20_component.multi_events);
|
chain->multi = (opal_ext20_multi_event_t*)opal_list_get_begin(&mca_pmix_ext20_component.multi_events);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* see if we need to continue with the multi code events */
|
/* see if we need to continue with the multi code events */
|
||||||
if (NULL != chain->multi) {
|
if (NULL != chain->multi) {
|
||||||
while (opal_list_get_end(&mca_pmix_ext20_component.multi_events) != (nxt = opal_list_get_next(&chain->multi->super))) {
|
while (opal_list_get_end(&mca_pmix_ext20_component.multi_events) != (nxt = opal_list_get_next(&chain->multi->super))) {
|
||||||
multi = (opal_pmix20_multi_event_t*)nxt;
|
multi = (opal_ext20_multi_event_t*)nxt;
|
||||||
for (n=0; n < multi->ncodes; n++) {
|
for (n=0; n < multi->ncodes; n++) {
|
||||||
if (multi->codes[n] == chain->status) {
|
if (multi->codes[n] == chain->status) {
|
||||||
/* found it - invoke the handler, pointing its
|
/* found it - invoke the handler, pointing its
|
||||||
@ -216,7 +216,7 @@ static void progress_local_event_hdlr(int status,
|
|||||||
chain->multi = NULL;
|
chain->multi = NULL;
|
||||||
/* pickup the beginning of the default event list */
|
/* pickup the beginning of the default event list */
|
||||||
if (0 < opal_list_get_size(&mca_pmix_ext20_component.default_events)) {
|
if (0 < opal_list_get_size(&mca_pmix_ext20_component.default_events)) {
|
||||||
chain->def = (opal_pmix20_default_event_t*)opal_list_get_begin(&mca_pmix_ext20_component.default_events);
|
chain->def = (opal_ext20_default_event_t*)opal_list_get_begin(&mca_pmix_ext20_component.default_events);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -227,7 +227,7 @@ static void progress_local_event_hdlr(int status,
|
|||||||
|
|
||||||
if (NULL != chain->def) {
|
if (NULL != chain->def) {
|
||||||
if (opal_list_get_end(&mca_pmix_ext20_component.default_events) != (nxt = opal_list_get_next(&chain->def->super))) {
|
if (opal_list_get_end(&mca_pmix_ext20_component.default_events) != (nxt = opal_list_get_next(&chain->def->super))) {
|
||||||
def = (opal_pmix20_default_event_t*)nxt;
|
def = (opal_ext20_default_event_t*)nxt;
|
||||||
OBJ_RETAIN(chain);
|
OBJ_RETAIN(chain);
|
||||||
chain->def = def;
|
chain->def = def;
|
||||||
def->handler(chain->status, &chain->source,
|
def->handler(chain->status, &chain->source,
|
||||||
@ -251,18 +251,18 @@ static void progress_local_event_hdlr(int status,
|
|||||||
|
|
||||||
static void _event_hdlr(int sd, short args, void *cbdata)
|
static void _event_hdlr(int sd, short args, void *cbdata)
|
||||||
{
|
{
|
||||||
pmix20_threadshift_t *cd = (pmix20_threadshift_t*)cbdata;
|
ext20_threadshift_t *cd = (ext20_threadshift_t*)cbdata;
|
||||||
size_t n;
|
size_t n;
|
||||||
opal_pmix20_event_chain_t *chain;
|
opal_ext20_event_chain_t *chain;
|
||||||
opal_pmix20_single_event_t *sing;
|
opal_ext20_single_event_t *sing;
|
||||||
opal_pmix20_multi_event_t *multi;
|
opal_ext20_multi_event_t *multi;
|
||||||
opal_pmix20_default_event_t *def;
|
opal_ext20_default_event_t *def;
|
||||||
|
|
||||||
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
|
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
|
||||||
"%s RECEIVED NOTIFICATION OF STATUS %d",
|
"%s RECEIVED NOTIFICATION OF STATUS %d",
|
||||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), cd->status);
|
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), cd->status);
|
||||||
|
|
||||||
chain = OBJ_NEW(opal_pmix20_event_chain_t);
|
chain = OBJ_NEW(opal_ext20_event_chain_t);
|
||||||
/* point it at our final callback */
|
/* point it at our final callback */
|
||||||
chain->final_cbfunc = completion_handler;
|
chain->final_cbfunc = completion_handler;
|
||||||
chain->final_cbdata = chain;
|
chain->final_cbdata = chain;
|
||||||
@ -274,7 +274,7 @@ static void _event_hdlr(int sd, short args, void *cbdata)
|
|||||||
chain->nondefault = cd->nondefault;
|
chain->nondefault = cd->nondefault;
|
||||||
|
|
||||||
/* cycle thru the single-event registrations first */
|
/* cycle thru the single-event registrations first */
|
||||||
OPAL_LIST_FOREACH(sing, &mca_pmix_ext20_component.single_events, opal_pmix20_single_event_t) {
|
OPAL_LIST_FOREACH(sing, &mca_pmix_ext20_component.single_events, opal_ext20_single_event_t) {
|
||||||
if (sing->code == chain->status) {
|
if (sing->code == chain->status) {
|
||||||
/* found it - invoke the handler, pointing its
|
/* found it - invoke the handler, pointing its
|
||||||
* callback function to our progression function */
|
* callback function to our progression function */
|
||||||
@ -292,7 +292,7 @@ static void _event_hdlr(int sd, short args, void *cbdata)
|
|||||||
|
|
||||||
/* if we didn't find any match in the single-event registrations,
|
/* if we didn't find any match in the single-event registrations,
|
||||||
* then cycle thru the multi-event registrations next */
|
* then cycle thru the multi-event registrations next */
|
||||||
OPAL_LIST_FOREACH(multi, &mca_pmix_ext20_component.multi_events, opal_pmix20_multi_event_t) {
|
OPAL_LIST_FOREACH(multi, &mca_pmix_ext20_component.multi_events, opal_ext20_multi_event_t) {
|
||||||
for (n=0; n < multi->ncodes; n++) {
|
for (n=0; n < multi->ncodes; n++) {
|
||||||
if (multi->codes[n] == chain->status) {
|
if (multi->codes[n] == chain->status) {
|
||||||
/* found it - invoke the handler, pointing its
|
/* found it - invoke the handler, pointing its
|
||||||
@ -323,7 +323,7 @@ static void _event_hdlr(int sd, short args, void *cbdata)
|
|||||||
|
|
||||||
/* finally, pass it to any default handlers */
|
/* finally, pass it to any default handlers */
|
||||||
if (0 < opal_list_get_size(&mca_pmix_ext20_component.default_events)) {
|
if (0 < opal_list_get_size(&mca_pmix_ext20_component.default_events)) {
|
||||||
def = (opal_pmix20_default_event_t*)opal_list_get_first(&mca_pmix_ext20_component.default_events);
|
def = (opal_ext20_default_event_t*)opal_list_get_first(&mca_pmix_ext20_component.default_events);
|
||||||
OBJ_RETAIN(chain);
|
OBJ_RETAIN(chain);
|
||||||
chain->def = def;
|
chain->def = def;
|
||||||
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
|
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
|
||||||
@ -348,14 +348,14 @@ static void _event_hdlr(int sd, short args, void *cbdata)
|
|||||||
* by mpirun), directly from a RM (when direct launched), or
|
* by mpirun), directly from a RM (when direct launched), or
|
||||||
* from another process (via the local daemon).
|
* from another process (via the local daemon).
|
||||||
* The call will occur in the PMIx event base */
|
* The call will occur in the PMIx event base */
|
||||||
void pmix20_event_hdlr(size_t evhdlr_registration_id,
|
void ext20_event_hdlr(size_t evhdlr_registration_id,
|
||||||
pmix_status_t status, const pmix_proc_t *source,
|
pmix_status_t status, const pmix_proc_t *source,
|
||||||
pmix_info_t info[], size_t ninfo,
|
pmix_info_t info[], size_t ninfo,
|
||||||
pmix_info_t results[], size_t nresults,
|
pmix_info_t results[], size_t nresults,
|
||||||
pmix_event_notification_cbfunc_fn_t cbfunc,
|
pmix_event_notification_cbfunc_fn_t cbfunc,
|
||||||
void *cbdata)
|
void *cbdata)
|
||||||
{
|
{
|
||||||
pmix20_threadshift_t *cd;
|
ext20_threadshift_t *cd;
|
||||||
int rc;
|
int rc;
|
||||||
opal_value_t *iptr;
|
opal_value_t *iptr;
|
||||||
size_t n;
|
size_t n;
|
||||||
@ -368,10 +368,10 @@ void pmix20_event_hdlr(size_t evhdlr_registration_id,
|
|||||||
"%s RECEIVED NOTIFICATION OF STATUS %d",
|
"%s RECEIVED NOTIFICATION OF STATUS %d",
|
||||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), status);
|
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), status);
|
||||||
|
|
||||||
cd = OBJ_NEW(pmix20_threadshift_t);
|
cd = OBJ_NEW(ext20_threadshift_t);
|
||||||
|
|
||||||
/* convert the incoming status */
|
/* convert the incoming status */
|
||||||
cd->status = pmix20_convert_rc(status);
|
cd->status = ext20_convert_rc(status);
|
||||||
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
|
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
|
||||||
"%s CONVERTED STATUS %d TO STATUS %d",
|
"%s CONVERTED STATUS %d TO STATUS %d",
|
||||||
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), status, cd->status);
|
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), status, cd->status);
|
||||||
@ -385,7 +385,7 @@ void pmix20_event_hdlr(size_t evhdlr_registration_id,
|
|||||||
OBJ_RELEASE(cd);
|
OBJ_RELEASE(cd);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cd->pname.vpid = source->rank;
|
cd->pname.vpid = ext20_convert_rank(source->rank);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* convert the array of info */
|
/* convert the array of info */
|
||||||
@ -397,7 +397,11 @@ void pmix20_event_hdlr(size_t evhdlr_registration_id,
|
|||||||
}
|
}
|
||||||
iptr = OBJ_NEW(opal_value_t);
|
iptr = OBJ_NEW(opal_value_t);
|
||||||
iptr->key = strdup(info[n].key);
|
iptr->key = strdup(info[n].key);
|
||||||
pmix20_value_unload(iptr, &info[n].value);
|
if (OPAL_SUCCESS != (rc = ext20_value_unload(iptr, &info[n].value))) {
|
||||||
|
OPAL_ERROR_LOG(rc);
|
||||||
|
OBJ_RELEASE(iptr);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
opal_list_append(cd->info, &iptr->super);
|
opal_list_append(cd->info, &iptr->super);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -413,12 +417,54 @@ void pmix20_event_hdlr(size_t evhdlr_registration_id,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pmix_status_t pmix20_convert_opalrc(int rc)
|
opal_vpid_t ext20_convert_rank(int rank)
|
||||||
|
{
|
||||||
|
switch(rank) {
|
||||||
|
case PMIX_RANK_UNDEF:
|
||||||
|
return OPAL_VPID_INVALID;
|
||||||
|
case PMIX_RANK_WILDCARD:
|
||||||
|
return OPAL_VPID_WILDCARD;
|
||||||
|
default:
|
||||||
|
return (opal_vpid_t)rank;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pmix_rank_t ext20_convert_opalrank(opal_vpid_t vpid)
|
||||||
|
{
|
||||||
|
switch(vpid) {
|
||||||
|
case OPAL_VPID_WILDCARD:
|
||||||
|
return PMIX_RANK_WILDCARD;
|
||||||
|
case OPAL_VPID_INVALID:
|
||||||
|
return PMIX_RANK_UNDEF;
|
||||||
|
default:
|
||||||
|
return (pmix_rank_t)vpid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pmix_status_t ext20_convert_opalrc(int rc)
|
||||||
{
|
{
|
||||||
switch (rc) {
|
switch (rc) {
|
||||||
case OPAL_ERR_DEBUGGER_RELEASE:
|
case OPAL_ERR_DEBUGGER_RELEASE:
|
||||||
return PMIX_ERR_DEBUGGER_RELEASE;
|
return PMIX_ERR_DEBUGGER_RELEASE;
|
||||||
|
|
||||||
|
case OPAL_ERR_HANDLERS_COMPLETE:
|
||||||
|
return PMIX_EVENT_ACTION_COMPLETE;
|
||||||
|
|
||||||
|
case OPAL_ERR_PROC_ABORTED:
|
||||||
|
return PMIX_ERR_PROC_ABORTED;
|
||||||
|
|
||||||
|
case OPAL_ERR_PROC_REQUESTED_ABORT:
|
||||||
|
return PMIX_ERR_PROC_REQUESTED_ABORT;
|
||||||
|
|
||||||
|
case OPAL_ERR_PROC_ABORTING:
|
||||||
|
return PMIX_ERR_PROC_ABORTING;
|
||||||
|
|
||||||
|
case OPAL_ERR_NODE_DOWN:
|
||||||
|
return PMIX_ERR_NODE_DOWN;
|
||||||
|
|
||||||
|
case OPAL_ERR_NODE_OFFLINE:
|
||||||
|
return PMIX_ERR_NODE_OFFLINE;
|
||||||
|
|
||||||
case OPAL_ERR_NOT_IMPLEMENTED:
|
case OPAL_ERR_NOT_IMPLEMENTED:
|
||||||
case OPAL_ERR_NOT_SUPPORTED:
|
case OPAL_ERR_NOT_SUPPORTED:
|
||||||
return PMIX_ERR_NOT_SUPPORTED;
|
return PMIX_ERR_NOT_SUPPORTED;
|
||||||
@ -449,6 +495,9 @@ pmix_status_t pmix20_convert_opalrc(int rc)
|
|||||||
case OPAL_EXISTS:
|
case OPAL_EXISTS:
|
||||||
return PMIX_EXISTS;
|
return PMIX_EXISTS;
|
||||||
|
|
||||||
|
case OPAL_ERR_PARTIAL_SUCCESS:
|
||||||
|
return PMIX_QUERY_PARTIAL_SUCCESS;
|
||||||
|
|
||||||
case OPAL_ERROR:
|
case OPAL_ERROR:
|
||||||
return PMIX_ERROR;
|
return PMIX_ERROR;
|
||||||
case OPAL_SUCCESS:
|
case OPAL_SUCCESS:
|
||||||
@ -458,12 +507,30 @@ pmix_status_t pmix20_convert_opalrc(int rc)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int pmix20_convert_rc(pmix_status_t rc)
|
int ext20_convert_rc(pmix_status_t rc)
|
||||||
{
|
{
|
||||||
switch (rc) {
|
switch (rc) {
|
||||||
case PMIX_ERR_DEBUGGER_RELEASE:
|
case PMIX_ERR_DEBUGGER_RELEASE:
|
||||||
return OPAL_ERR_DEBUGGER_RELEASE;
|
return OPAL_ERR_DEBUGGER_RELEASE;
|
||||||
|
|
||||||
|
case PMIX_EVENT_ACTION_COMPLETE:
|
||||||
|
return OPAL_ERR_HANDLERS_COMPLETE;
|
||||||
|
|
||||||
|
case PMIX_ERR_PROC_ABORTED:
|
||||||
|
return OPAL_ERR_PROC_ABORTED;
|
||||||
|
|
||||||
|
case PMIX_ERR_PROC_REQUESTED_ABORT:
|
||||||
|
return OPAL_ERR_PROC_REQUESTED_ABORT;
|
||||||
|
|
||||||
|
case PMIX_ERR_PROC_ABORTING:
|
||||||
|
return OPAL_ERR_PROC_ABORTING;
|
||||||
|
|
||||||
|
case PMIX_ERR_NODE_DOWN:
|
||||||
|
return OPAL_ERR_NODE_DOWN;
|
||||||
|
|
||||||
|
case PMIX_ERR_NODE_OFFLINE:
|
||||||
|
return OPAL_ERR_NODE_OFFLINE;
|
||||||
|
|
||||||
case PMIX_ERR_NOT_SUPPORTED:
|
case PMIX_ERR_NOT_SUPPORTED:
|
||||||
return OPAL_ERR_NOT_SUPPORTED;
|
return OPAL_ERR_NOT_SUPPORTED;
|
||||||
|
|
||||||
@ -497,6 +564,9 @@ int pmix20_convert_rc(pmix_status_t rc)
|
|||||||
case PMIX_EXISTS:
|
case PMIX_EXISTS:
|
||||||
return OPAL_EXISTS;
|
return OPAL_EXISTS;
|
||||||
|
|
||||||
|
case PMIX_QUERY_PARTIAL_SUCCESS:
|
||||||
|
return OPAL_ERR_PARTIAL_SUCCESS;
|
||||||
|
|
||||||
case PMIX_ERROR:
|
case PMIX_ERROR:
|
||||||
return OPAL_ERROR;
|
return OPAL_ERROR;
|
||||||
case PMIX_SUCCESS:
|
case PMIX_SUCCESS:
|
||||||
@ -506,7 +576,23 @@ int pmix20_convert_rc(pmix_status_t rc)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pmix_scope_t pmix20_convert_opalscope(opal_pmix_scope_t scope) {
|
opal_pmix_scope_t ext20_convert_scope(pmix_scope_t scope)
|
||||||
|
{
|
||||||
|
switch(scope) {
|
||||||
|
case PMIX_SCOPE_UNDEF:
|
||||||
|
return OPAL_PMIX_SCOPE_UNDEF;
|
||||||
|
case PMIX_LOCAL:
|
||||||
|
return OPAL_PMIX_LOCAL;
|
||||||
|
case PMIX_REMOTE:
|
||||||
|
return OPAL_PMIX_REMOTE;
|
||||||
|
case PMIX_GLOBAL:
|
||||||
|
return OPAL_PMIX_GLOBAL;
|
||||||
|
default:
|
||||||
|
return OPAL_PMIX_SCOPE_UNDEF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pmix_scope_t ext20_convert_opalscope(opal_pmix_scope_t scope) {
|
||||||
switch(scope) {
|
switch(scope) {
|
||||||
case OPAL_PMIX_LOCAL:
|
case OPAL_PMIX_LOCAL:
|
||||||
return PMIX_LOCAL;
|
return PMIX_LOCAL;
|
||||||
@ -519,7 +605,7 @@ pmix_scope_t pmix20_convert_opalscope(opal_pmix_scope_t scope) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pmix_data_range_t pmix20_convert_opalrange(opal_pmix_data_range_t range) {
|
pmix_data_range_t ext20_convert_opalrange(opal_pmix_data_range_t range) {
|
||||||
switch(range) {
|
switch(range) {
|
||||||
case OPAL_PMIX_RANGE_UNDEF:
|
case OPAL_PMIX_RANGE_UNDEF:
|
||||||
return PMIX_RANGE_UNDEF;
|
return PMIX_RANGE_UNDEF;
|
||||||
@ -538,7 +624,7 @@ pmix_data_range_t pmix20_convert_opalrange(opal_pmix_data_range_t range) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
opal_pmix_data_range_t pmix20_convert_range(pmix_data_range_t range) {
|
opal_pmix_data_range_t ext20_convert_range(pmix_data_range_t range) {
|
||||||
switch(range) {
|
switch(range) {
|
||||||
case PMIX_RANGE_UNDEF:
|
case PMIX_RANGE_UNDEF:
|
||||||
return OPAL_PMIX_RANGE_UNDEF;
|
return OPAL_PMIX_RANGE_UNDEF;
|
||||||
@ -557,13 +643,48 @@ opal_pmix_data_range_t pmix20_convert_range(pmix_data_range_t range) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
opal_pmix_persistence_t ext20_convert_persist(pmix_persistence_t persist)
|
||||||
|
{
|
||||||
|
switch(persist) {
|
||||||
|
case PMIX_PERSIST_INDEF:
|
||||||
|
return OPAL_PMIX_PERSIST_INDEF;
|
||||||
|
case PMIX_PERSIST_FIRST_READ:
|
||||||
|
return OPAL_PMIX_PERSIST_FIRST_READ;
|
||||||
|
case PMIX_PERSIST_PROC:
|
||||||
|
return OPAL_PMIX_PERSIST_PROC;
|
||||||
|
case PMIX_PERSIST_APP:
|
||||||
|
return OPAL_PMIX_PERSIST_APP;
|
||||||
|
case PMIX_PERSIST_SESSION:
|
||||||
|
return OPAL_PMIX_PERSIST_SESSION;
|
||||||
|
default:
|
||||||
|
return OPAL_PMIX_PERSIST_INDEF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void pmix20_value_load(pmix_value_t *v,
|
pmix_persistence_t ext20_convert_opalpersist(opal_pmix_persistence_t persist)
|
||||||
|
{
|
||||||
|
switch(persist) {
|
||||||
|
case OPAL_PMIX_PERSIST_INDEF:
|
||||||
|
return PMIX_PERSIST_INDEF;
|
||||||
|
case OPAL_PMIX_PERSIST_FIRST_READ:
|
||||||
|
return PMIX_PERSIST_FIRST_READ;
|
||||||
|
case OPAL_PMIX_PERSIST_PROC:
|
||||||
|
return PMIX_PERSIST_PROC;
|
||||||
|
case OPAL_PMIX_PERSIST_APP:
|
||||||
|
return PMIX_PERSIST_APP;
|
||||||
|
case OPAL_PMIX_PERSIST_SESSION:
|
||||||
|
return PMIX_PERSIST_SESSION;
|
||||||
|
default:
|
||||||
|
return PMIX_PERSIST_INDEF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**** RHC: NEED TO ADD SUPPORT FOR NEW PMIX DATA TYPES, INCLUDING
|
||||||
|
**** CONVERSION OF PROC STATES ****/
|
||||||
|
|
||||||
|
void ext20_value_load(pmix_value_t *v,
|
||||||
opal_value_t *kv)
|
opal_value_t *kv)
|
||||||
{
|
{
|
||||||
size_t n;
|
|
||||||
char nspace[PMIX_MAX_NSLEN + 1];
|
|
||||||
|
|
||||||
switch(kv->type) {
|
switch(kv->type) {
|
||||||
case OPAL_UNDEF:
|
case OPAL_UNDEF:
|
||||||
v->type = PMIX_UNDEF;
|
v->type = PMIX_UNDEF;
|
||||||
@ -644,6 +765,24 @@ void pmix20_value_load(pmix_value_t *v,
|
|||||||
v->type = PMIX_TIMEVAL;
|
v->type = PMIX_TIMEVAL;
|
||||||
memcpy(&(v->data.tv), &kv->data.tv, sizeof(struct timeval));
|
memcpy(&(v->data.tv), &kv->data.tv, sizeof(struct timeval));
|
||||||
break;
|
break;
|
||||||
|
case OPAL_TIME:
|
||||||
|
v->type = PMIX_TIME;
|
||||||
|
memcpy(&(v->data.time), &kv->data.time, sizeof(time_t));
|
||||||
|
break;
|
||||||
|
case OPAL_STATUS:
|
||||||
|
v->type = PMIX_STATUS;
|
||||||
|
memcpy(&(v->data.status), &kv->data.status, sizeof(pmix_status_t));
|
||||||
|
break;
|
||||||
|
case OPAL_VPID:
|
||||||
|
v->type = PMIX_PROC_RANK;
|
||||||
|
v->data.rank = ext20_convert_opalrank(kv->data.name.vpid);
|
||||||
|
break;
|
||||||
|
case OPAL_NAME:
|
||||||
|
v->type = PMIX_PROC;
|
||||||
|
/* have to stringify the jobid */
|
||||||
|
(void)opal_snprintf_jobid(v->data.proc.nspace, PMIX_MAX_NSLEN, kv->data.name.vpid);
|
||||||
|
v->data.proc.rank = ext20_convert_opalrank(kv->data.name.vpid);
|
||||||
|
break;
|
||||||
case OPAL_BYTE_OBJECT:
|
case OPAL_BYTE_OBJECT:
|
||||||
v->type = PMIX_BYTE_OBJECT;
|
v->type = PMIX_BYTE_OBJECT;
|
||||||
if (NULL != kv->data.bo.bytes) {
|
if (NULL != kv->data.bo.bytes) {
|
||||||
@ -655,18 +794,23 @@ void pmix20_value_load(pmix_value_t *v,
|
|||||||
v->data.bo.size = 0;
|
v->data.bo.size = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case OPAL_UINT32_ARRAY:
|
case OPAL_PERSIST:
|
||||||
/* an array of 32-bit jobids */
|
v->type = PMIX_PERSIST;
|
||||||
v->type = PMIX_INFO_ARRAY;
|
v->data.persist = ext20_convert_opalpersist(kv->data.uint8);
|
||||||
v->data.array.size = kv->data.uint32_array.size;
|
break;
|
||||||
if (0 < v->data.array.size) {
|
case OPAL_SCOPE:
|
||||||
PMIX_INFO_CREATE(v->data.array.array, v->data.array.size);
|
v->type = PMIX_SCOPE;
|
||||||
for (n=0; n < v->data.array.size; n++) {
|
v->data.scope = ext20_convert_opalscope(kv->data.uint8);
|
||||||
v->data.array.array[n].value.type = PMIX_STRING;
|
break;
|
||||||
(void)opal_snprintf_jobid(nspace, PMIX_MAX_NSLEN, kv->data.uint32_array.data[n]);
|
case OPAL_DATA_RANGE:
|
||||||
v->data.array.array[n].value.data.string = strdup(nspace);
|
v->type = PMIX_DATA_RANGE;
|
||||||
}
|
v->data.range = ext20_convert_opalrange(kv->data.uint8);
|
||||||
}
|
break;
|
||||||
|
case OPAL_PROC_STATE:
|
||||||
|
v->type = PMIX_PROC_STATE;
|
||||||
|
/* the OPAL layer doesn't have any concept of proc state,
|
||||||
|
* so the ORTE layer is responsible for converting it */
|
||||||
|
memcpy(&v->data.state, &kv->data.uint8, sizeof(uint8_t));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
/* silence warnings */
|
/* silence warnings */
|
||||||
@ -674,7 +818,7 @@ void pmix20_value_load(pmix_value_t *v,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int pmix20_value_unload(opal_value_t *kv,
|
int ext20_value_unload(opal_value_t *kv,
|
||||||
const pmix_value_t *v)
|
const pmix_value_t *v)
|
||||||
{
|
{
|
||||||
int rc=OPAL_SUCCESS;
|
int rc=OPAL_SUCCESS;
|
||||||
@ -724,39 +868,58 @@ int pmix20_value_unload(opal_value_t *kv,
|
|||||||
break;
|
break;
|
||||||
case PMIX_INT64:
|
case PMIX_INT64:
|
||||||
kv->type = OPAL_INT64;
|
kv->type = OPAL_INT64;
|
||||||
memcpy(&kv->data, &(v->data.int64), 8);
|
memcpy(&kv->data.int64, &(v->data.int64), 8);
|
||||||
break;
|
break;
|
||||||
case PMIX_UINT:
|
case PMIX_UINT:
|
||||||
kv->type = OPAL_UINT;
|
kv->type = OPAL_UINT;
|
||||||
memcpy(&kv->data, &(v->data.uint), sizeof(int));
|
memcpy(&kv->data.uint, &(v->data.uint), sizeof(int));
|
||||||
break;
|
break;
|
||||||
case PMIX_UINT8:
|
case PMIX_UINT8:
|
||||||
kv->type = OPAL_UINT8;
|
kv->type = OPAL_UINT8;
|
||||||
memcpy(&kv->data, &(v->data.uint8), 1);
|
memcpy(&kv->data.uint8, &(v->data.uint8), 1);
|
||||||
break;
|
break;
|
||||||
case PMIX_UINT16:
|
case PMIX_UINT16:
|
||||||
kv->type = OPAL_UINT16;
|
kv->type = OPAL_UINT16;
|
||||||
memcpy(&kv->data, &(v->data.uint16), 2);
|
memcpy(&kv->data.uint16, &(v->data.uint16), 2);
|
||||||
break;
|
break;
|
||||||
case PMIX_UINT32:
|
case PMIX_UINT32:
|
||||||
kv->type = OPAL_UINT32;
|
kv->type = OPAL_UINT32;
|
||||||
memcpy(&kv->data, &(v->data.uint32), 4);
|
memcpy(&kv->data.uint32, &(v->data.uint32), 4);
|
||||||
break;
|
break;
|
||||||
case PMIX_UINT64:
|
case PMIX_UINT64:
|
||||||
kv->type = OPAL_UINT64;
|
kv->type = OPAL_UINT64;
|
||||||
memcpy(&kv->data, &(v->data.uint64), 8);
|
memcpy(&kv->data.uint64, &(v->data.uint64), 8);
|
||||||
break;
|
break;
|
||||||
case PMIX_FLOAT:
|
case PMIX_FLOAT:
|
||||||
kv->type = OPAL_FLOAT;
|
kv->type = OPAL_FLOAT;
|
||||||
memcpy(&kv->data, &(v->data.fval), sizeof(float));
|
memcpy(&kv->data.fval, &(v->data.fval), sizeof(float));
|
||||||
break;
|
break;
|
||||||
case PMIX_DOUBLE:
|
case PMIX_DOUBLE:
|
||||||
kv->type = OPAL_DOUBLE;
|
kv->type = OPAL_DOUBLE;
|
||||||
memcpy(&kv->data, &(v->data.dval), sizeof(double));
|
memcpy(&kv->data.dval, &(v->data.dval), sizeof(double));
|
||||||
break;
|
break;
|
||||||
case PMIX_TIMEVAL:
|
case PMIX_TIMEVAL:
|
||||||
kv->type = OPAL_TIMEVAL;
|
kv->type = OPAL_TIMEVAL;
|
||||||
memcpy(&kv->data, &(v->data.tv), sizeof(struct timeval));
|
memcpy(&kv->data.tv, &(v->data.tv), sizeof(struct timeval));
|
||||||
|
break;
|
||||||
|
case PMIX_TIME:
|
||||||
|
kv->type = OPAL_TIME;
|
||||||
|
memcpy(&kv->data.time, &(v->data.tv), sizeof(struct timeval));
|
||||||
|
break;
|
||||||
|
case PMIX_STATUS:
|
||||||
|
kv->type = OPAL_STATUS;
|
||||||
|
memcpy(&kv->data.status, &(v->data.status), sizeof(opal_status_t));
|
||||||
|
break;
|
||||||
|
case PMIX_PROC_RANK:
|
||||||
|
kv->type = OPAL_VPID;
|
||||||
|
kv->data.name.vpid = ext20_convert_rank(v->data.rank);
|
||||||
|
break;
|
||||||
|
case PMIX_PROC:
|
||||||
|
kv->type = OPAL_NAME;
|
||||||
|
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&kv->data.name.jobid, v->data.proc.nspace))) {
|
||||||
|
return ext20_convert_opalrc(rc);
|
||||||
|
}
|
||||||
|
kv->data.name.vpid = ext20_convert_rank(v->data.proc.rank);
|
||||||
break;
|
break;
|
||||||
case PMIX_BYTE_OBJECT:
|
case PMIX_BYTE_OBJECT:
|
||||||
kv->type = OPAL_BYTE_OBJECT;
|
kv->type = OPAL_BYTE_OBJECT;
|
||||||
@ -769,6 +932,22 @@ int pmix20_value_unload(opal_value_t *kv,
|
|||||||
kv->data.bo.size = 0;
|
kv->data.bo.size = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case PMIX_PERSIST:
|
||||||
|
kv->type = OPAL_PERSIST;
|
||||||
|
kv->data.uint8 = ext20_convert_persist(v->data.persist);
|
||||||
|
break;
|
||||||
|
case PMIX_SCOPE:
|
||||||
|
kv->type = OPAL_SCOPE;
|
||||||
|
kv->data.uint8 = ext20_convert_scope(v->data.persist);
|
||||||
|
break;
|
||||||
|
case PMIX_DATA_RANGE:
|
||||||
|
kv->type = OPAL_DATA_RANGE;
|
||||||
|
kv->data.uint8 = ext20_convert_range(v->data.persist);
|
||||||
|
case PMIX_PROC_STATE:
|
||||||
|
kv->type = OPAL_PROC_STATE;
|
||||||
|
/* the OPAL layer doesn't have any concept of proc state,
|
||||||
|
* so the ORTE layer is responsible for converting it */
|
||||||
|
memcpy(&kv->data.uint8, &v->data.state, sizeof(uint8_t));
|
||||||
default:
|
default:
|
||||||
/* silence warnings */
|
/* silence warnings */
|
||||||
rc = OPAL_ERROR;
|
rc = OPAL_ERROR;
|
||||||
@ -779,11 +958,11 @@ int pmix20_value_unload(opal_value_t *kv,
|
|||||||
|
|
||||||
static void _reg_hdlr(int sd, short args, void *cbdata)
|
static void _reg_hdlr(int sd, short args, void *cbdata)
|
||||||
{
|
{
|
||||||
pmix20_threadshift_t *cd = (pmix20_threadshift_t*)cbdata;
|
ext20_threadshift_t *cd = (ext20_threadshift_t*)cbdata;
|
||||||
opal_pmix20_event_chain_t *chain;
|
opal_ext20_event_chain_t *chain;
|
||||||
opal_pmix20_single_event_t *sing = NULL;
|
opal_ext20_single_event_t *sing = NULL;
|
||||||
opal_pmix20_multi_event_t *multi = NULL;
|
opal_ext20_multi_event_t *multi = NULL;
|
||||||
opal_pmix20_default_event_t *def = NULL;
|
opal_ext20_default_event_t *def = NULL;
|
||||||
opal_value_t *kv;
|
opal_value_t *kv;
|
||||||
int i;
|
int i;
|
||||||
bool prepend = false;
|
bool prepend = false;
|
||||||
@ -805,7 +984,7 @@ static void _reg_hdlr(int sd, short args, void *cbdata)
|
|||||||
|
|
||||||
if (NULL == cd->event_codes) {
|
if (NULL == cd->event_codes) {
|
||||||
/* this is a default handler */
|
/* this is a default handler */
|
||||||
def = OBJ_NEW(opal_pmix20_default_event_t);
|
def = OBJ_NEW(opal_ext20_default_event_t);
|
||||||
def->handler = cd->evhandler;
|
def->handler = cd->evhandler;
|
||||||
def->index = mca_pmix_ext20_component.evindex;
|
def->index = mca_pmix_ext20_component.evindex;
|
||||||
if (prepend) {
|
if (prepend) {
|
||||||
@ -821,7 +1000,7 @@ static void _reg_hdlr(int sd, short args, void *cbdata)
|
|||||||
}
|
}
|
||||||
} else if (1 == opal_list_get_size(cd->event_codes)) {
|
} else if (1 == opal_list_get_size(cd->event_codes)) {
|
||||||
/* single handler */
|
/* single handler */
|
||||||
sing = OBJ_NEW(opal_pmix20_single_event_t);
|
sing = OBJ_NEW(opal_ext20_single_event_t);
|
||||||
kv = (opal_value_t*)opal_list_get_first(cd->event_codes);
|
kv = (opal_value_t*)opal_list_get_first(cd->event_codes);
|
||||||
sing->code = kv->data.integer;
|
sing->code = kv->data.integer;
|
||||||
sing->index = mca_pmix_ext20_component.evindex;
|
sing->index = mca_pmix_ext20_component.evindex;
|
||||||
@ -838,7 +1017,7 @@ static void _reg_hdlr(int sd, short args, void *cbdata)
|
|||||||
opal_list_append(&mca_pmix_ext20_component.single_events, &sing->super);
|
opal_list_append(&mca_pmix_ext20_component.single_events, &sing->super);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
multi = OBJ_NEW(opal_pmix20_multi_event_t);
|
multi = OBJ_NEW(opal_ext20_multi_event_t);
|
||||||
multi->ncodes = opal_list_get_size(cd->event_codes);
|
multi->ncodes = opal_list_get_size(cd->event_codes);
|
||||||
multi->codes = (int*)malloc(multi->ncodes * sizeof(int));
|
multi->codes = (int*)malloc(multi->ncodes * sizeof(int));
|
||||||
i=0;
|
i=0;
|
||||||
@ -872,7 +1051,7 @@ static void _reg_hdlr(int sd, short args, void *cbdata)
|
|||||||
if (NULL == def) {
|
if (NULL == def) {
|
||||||
/* check single code registrations */
|
/* check single code registrations */
|
||||||
if (NULL != sing) {
|
if (NULL != sing) {
|
||||||
OPAL_LIST_FOREACH(chain, &mca_pmix_ext20_component.cache, opal_pmix20_event_chain_t) {
|
OPAL_LIST_FOREACH(chain, &mca_pmix_ext20_component.cache, opal_ext20_event_chain_t) {
|
||||||
if (sing->code == chain->status) {
|
if (sing->code == chain->status) {
|
||||||
opal_list_remove_item(&mca_pmix_ext20_component.cache, &chain->super);
|
opal_list_remove_item(&mca_pmix_ext20_component.cache, &chain->super);
|
||||||
chain->sing = sing;
|
chain->sing = sing;
|
||||||
@ -885,7 +1064,7 @@ static void _reg_hdlr(int sd, short args, void *cbdata)
|
|||||||
}
|
}
|
||||||
} else if (NULL != multi) {
|
} else if (NULL != multi) {
|
||||||
/* check for multi code registrations */
|
/* check for multi code registrations */
|
||||||
OPAL_LIST_FOREACH(chain, &mca_pmix_ext20_component.cache, opal_pmix20_event_chain_t) {
|
OPAL_LIST_FOREACH(chain, &mca_pmix_ext20_component.cache, opal_ext20_event_chain_t) {
|
||||||
for (n=0; n < multi->ncodes; n++) {
|
for (n=0; n < multi->ncodes; n++) {
|
||||||
if (multi->codes[n] == chain->status) {
|
if (multi->codes[n] == chain->status) {
|
||||||
opal_list_remove_item(&mca_pmix_ext20_component.cache, &chain->super);
|
opal_list_remove_item(&mca_pmix_ext20_component.cache, &chain->super);
|
||||||
@ -919,13 +1098,13 @@ static void register_handler(opal_list_t *event_codes,
|
|||||||
|
|
||||||
static void _dereg_hdlr(int sd, short args, void *cbdata)
|
static void _dereg_hdlr(int sd, short args, void *cbdata)
|
||||||
{
|
{
|
||||||
pmix20_threadshift_t *cd = (pmix20_threadshift_t*)cbdata;
|
ext20_threadshift_t *cd = (ext20_threadshift_t*)cbdata;
|
||||||
opal_pmix20_single_event_t *sing;
|
opal_ext20_single_event_t *sing;
|
||||||
opal_pmix20_multi_event_t *multi;
|
opal_ext20_multi_event_t *multi;
|
||||||
opal_pmix20_default_event_t *def;
|
opal_ext20_default_event_t *def;
|
||||||
|
|
||||||
/* check the single events first */
|
/* check the single events first */
|
||||||
OPAL_LIST_FOREACH(sing, &mca_pmix_ext20_component.single_events, opal_pmix20_single_event_t) {
|
OPAL_LIST_FOREACH(sing, &mca_pmix_ext20_component.single_events, opal_ext20_single_event_t) {
|
||||||
if (cd->handler == sing->index) {
|
if (cd->handler == sing->index) {
|
||||||
opal_list_remove_item(&mca_pmix_ext20_component.single_events, &sing->super);
|
opal_list_remove_item(&mca_pmix_ext20_component.single_events, &sing->super);
|
||||||
OBJ_RELEASE(sing);
|
OBJ_RELEASE(sing);
|
||||||
@ -933,7 +1112,7 @@ static void _dereg_hdlr(int sd, short args, void *cbdata)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* check multi events */
|
/* check multi events */
|
||||||
OPAL_LIST_FOREACH(multi, &mca_pmix_ext20_component.multi_events, opal_pmix20_multi_event_t) {
|
OPAL_LIST_FOREACH(multi, &mca_pmix_ext20_component.multi_events, opal_ext20_multi_event_t) {
|
||||||
if (cd->handler == multi->index) {
|
if (cd->handler == multi->index) {
|
||||||
opal_list_remove_item(&mca_pmix_ext20_component.multi_events, &multi->super);
|
opal_list_remove_item(&mca_pmix_ext20_component.multi_events, &multi->super);
|
||||||
OBJ_RELEASE(multi);
|
OBJ_RELEASE(multi);
|
||||||
@ -941,7 +1120,7 @@ static void _dereg_hdlr(int sd, short args, void *cbdata)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* check default events */
|
/* check default events */
|
||||||
OPAL_LIST_FOREACH(def, &mca_pmix_ext20_component.default_events, opal_pmix20_default_event_t) {
|
OPAL_LIST_FOREACH(def, &mca_pmix_ext20_component.default_events, opal_ext20_default_event_t) {
|
||||||
if (cd->handler == def->index) {
|
if (cd->handler == def->index) {
|
||||||
opal_list_remove_item(&mca_pmix_ext20_component.default_events, &def->super);
|
opal_list_remove_item(&mca_pmix_ext20_component.default_events, &def->super);
|
||||||
OBJ_RELEASE(def);
|
OBJ_RELEASE(def);
|
||||||
@ -968,21 +1147,21 @@ static void deregister_handler(size_t evhandler,
|
|||||||
|
|
||||||
static void _notify_event(int sd, short args, void *cbdata)
|
static void _notify_event(int sd, short args, void *cbdata)
|
||||||
{
|
{
|
||||||
pmix20_threadshift_t *cd = (pmix20_threadshift_t*)cbdata;
|
ext20_threadshift_t *cd = (ext20_threadshift_t*)cbdata;
|
||||||
size_t i;
|
size_t i;
|
||||||
opal_pmix20_single_event_t *sing;
|
opal_ext20_single_event_t *sing;
|
||||||
opal_pmix20_multi_event_t *multi;
|
opal_ext20_multi_event_t *multi;
|
||||||
opal_pmix20_default_event_t *def;
|
opal_ext20_default_event_t *def;
|
||||||
opal_pmix20_event_chain_t *chain;
|
opal_ext20_event_chain_t *chain;
|
||||||
|
|
||||||
/* check the single events first */
|
/* check the single events first */
|
||||||
OPAL_LIST_FOREACH(sing, &mca_pmix_ext20_component.single_events, opal_pmix20_single_event_t) {
|
OPAL_LIST_FOREACH(sing, &mca_pmix_ext20_component.single_events, opal_ext20_single_event_t) {
|
||||||
if (cd->status == sing->code) {
|
if (cd->status == sing->code) {
|
||||||
/* found it - invoke the handler, pointing its
|
/* found it - invoke the handler, pointing its
|
||||||
* callback function to our progression function */
|
* callback function to our progression function */
|
||||||
chain = OBJ_NEW(opal_pmix20_event_chain_t);
|
chain = OBJ_NEW(opal_ext20_event_chain_t);
|
||||||
chain->status = cd->status;
|
chain->status = cd->status;
|
||||||
chain->range = pmix20_convert_opalrange(cd->range);
|
chain->range = ext20_convert_opalrange(cd->range);
|
||||||
chain->source = *(cd->source);
|
chain->source = *(cd->source);
|
||||||
chain->info = cd->info;
|
chain->info = cd->info;
|
||||||
chain->final_cbfunc = cd->opcbfunc;
|
chain->final_cbfunc = cd->opcbfunc;
|
||||||
@ -999,14 +1178,14 @@ static void _notify_event(int sd, short args, void *cbdata)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* check multi events */
|
/* check multi events */
|
||||||
OPAL_LIST_FOREACH(multi, &mca_pmix_ext20_component.multi_events, opal_pmix20_multi_event_t) {
|
OPAL_LIST_FOREACH(multi, &mca_pmix_ext20_component.multi_events, opal_ext20_multi_event_t) {
|
||||||
for (i=0; i < multi->ncodes; i++) {
|
for (i=0; i < multi->ncodes; i++) {
|
||||||
if (cd->status == multi->codes[i]) {
|
if (cd->status == multi->codes[i]) {
|
||||||
/* found it - invoke the handler, pointing its
|
/* found it - invoke the handler, pointing its
|
||||||
* callback function to our progression function */
|
* callback function to our progression function */
|
||||||
chain = OBJ_NEW(opal_pmix20_event_chain_t);
|
chain = OBJ_NEW(opal_ext20_event_chain_t);
|
||||||
chain->status = cd->status;
|
chain->status = cd->status;
|
||||||
chain->range = pmix20_convert_opalrange(cd->range);
|
chain->range = ext20_convert_opalrange(cd->range);
|
||||||
chain->source = *(cd->source);
|
chain->source = *(cd->source);
|
||||||
chain->info = cd->info;
|
chain->info = cd->info;
|
||||||
chain->final_cbfunc = cd->opcbfunc;
|
chain->final_cbfunc = cd->opcbfunc;
|
||||||
@ -1025,10 +1204,10 @@ static void _notify_event(int sd, short args, void *cbdata)
|
|||||||
}
|
}
|
||||||
/* check default events */
|
/* check default events */
|
||||||
if (0 < opal_list_get_size(&mca_pmix_ext20_component.default_events)) {
|
if (0 < opal_list_get_size(&mca_pmix_ext20_component.default_events)) {
|
||||||
def = (opal_pmix20_default_event_t*)opal_list_get_first(&mca_pmix_ext20_component.default_events);
|
def = (opal_ext20_default_event_t*)opal_list_get_first(&mca_pmix_ext20_component.default_events);
|
||||||
chain = OBJ_NEW(opal_pmix20_event_chain_t);
|
chain = OBJ_NEW(opal_ext20_event_chain_t);
|
||||||
chain->status = cd->status;
|
chain->status = cd->status;
|
||||||
chain->range = pmix20_convert_opalrange(cd->range);
|
chain->range = ext20_convert_opalrange(cd->range);
|
||||||
chain->source = *(cd->source);
|
chain->source = *(cd->source);
|
||||||
chain->info = cd->info;
|
chain->info = cd->info;
|
||||||
chain->final_cbfunc = cd->opcbfunc;
|
chain->final_cbfunc = cd->opcbfunc;
|
||||||
@ -1065,34 +1244,34 @@ static int notify_event(int status,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**** INSTANTIATE INTERNAL CLASSES ****/
|
/**** INSTANTIATE INTERNAL CLASSES ****/
|
||||||
OBJ_CLASS_INSTANCE(opal_pmix20_jobid_trkr_t,
|
OBJ_CLASS_INSTANCE(opal_ext20_jobid_trkr_t,
|
||||||
opal_list_item_t,
|
opal_list_item_t,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
|
|
||||||
OBJ_CLASS_INSTANCE(opal_pmix20_single_event_t,
|
OBJ_CLASS_INSTANCE(opal_ext20_single_event_t,
|
||||||
opal_list_item_t,
|
opal_list_item_t,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
|
|
||||||
static void mtevcon(opal_pmix20_multi_event_t *p)
|
static void mtevcon(opal_ext20_multi_event_t *p)
|
||||||
{
|
{
|
||||||
p->codes = NULL;
|
p->codes = NULL;
|
||||||
p->ncodes = 0;
|
p->ncodes = 0;
|
||||||
}
|
}
|
||||||
static void mtevdes(opal_pmix20_multi_event_t *p)
|
static void mtevdes(opal_ext20_multi_event_t *p)
|
||||||
{
|
{
|
||||||
if (NULL != p->codes) {
|
if (NULL != p->codes) {
|
||||||
free(p->codes);
|
free(p->codes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
OBJ_CLASS_INSTANCE(opal_pmix20_multi_event_t,
|
OBJ_CLASS_INSTANCE(opal_ext20_multi_event_t,
|
||||||
opal_list_item_t,
|
opal_list_item_t,
|
||||||
mtevcon, mtevdes);
|
mtevcon, mtevdes);
|
||||||
|
|
||||||
OBJ_CLASS_INSTANCE(opal_pmix20_default_event_t,
|
OBJ_CLASS_INSTANCE(opal_ext20_default_event_t,
|
||||||
opal_list_item_t,
|
opal_list_item_t,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
|
|
||||||
static void chcon(opal_pmix20_event_chain_t *p)
|
static void chcon(opal_ext20_event_chain_t *p)
|
||||||
{
|
{
|
||||||
p->nondefault = false;
|
p->nondefault = false;
|
||||||
p->info = NULL;
|
p->info = NULL;
|
||||||
@ -1103,15 +1282,15 @@ static void chcon(opal_pmix20_event_chain_t *p)
|
|||||||
p->final_cbfunc = NULL;
|
p->final_cbfunc = NULL;
|
||||||
p->final_cbdata = NULL;
|
p->final_cbdata = NULL;
|
||||||
}
|
}
|
||||||
static void chdes(opal_pmix20_event_chain_t *p)
|
static void chdes(opal_ext20_event_chain_t *p)
|
||||||
{
|
{
|
||||||
OPAL_LIST_DESTRUCT(&p->results);
|
OPAL_LIST_DESTRUCT(&p->results);
|
||||||
}
|
}
|
||||||
OBJ_CLASS_INSTANCE(opal_pmix20_event_chain_t,
|
OBJ_CLASS_INSTANCE(opal_ext20_event_chain_t,
|
||||||
opal_list_item_t,
|
opal_list_item_t,
|
||||||
chcon, chdes);
|
chcon, chdes);
|
||||||
|
|
||||||
static void opcon(pmix20_opcaddy_t *p)
|
static void opcon(ext20_opcaddy_t *p)
|
||||||
{
|
{
|
||||||
memset(&p->p, 0, sizeof(pmix_proc_t));
|
memset(&p->p, 0, sizeof(pmix_proc_t));
|
||||||
p->procs = NULL;
|
p->procs = NULL;
|
||||||
@ -1130,7 +1309,7 @@ static void opcon(pmix20_opcaddy_t *p)
|
|||||||
p->spcbfunc = NULL;
|
p->spcbfunc = NULL;
|
||||||
p->cbdata = NULL;
|
p->cbdata = NULL;
|
||||||
}
|
}
|
||||||
static void opdes(pmix20_opcaddy_t *p)
|
static void opdes(ext20_opcaddy_t *p)
|
||||||
{
|
{
|
||||||
if (NULL != p->procs) {
|
if (NULL != p->procs) {
|
||||||
PMIX_PROC_FREE(p->procs, p->nprocs);
|
PMIX_PROC_FREE(p->procs, p->nprocs);
|
||||||
@ -1145,11 +1324,11 @@ static void opdes(pmix20_opcaddy_t *p)
|
|||||||
PMIX_APP_FREE(p->apps, p->sz);
|
PMIX_APP_FREE(p->apps, p->sz);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
OBJ_CLASS_INSTANCE(pmix20_opcaddy_t,
|
OBJ_CLASS_INSTANCE(ext20_opcaddy_t,
|
||||||
opal_object_t,
|
opal_object_t,
|
||||||
opcon, opdes);
|
opcon, opdes);
|
||||||
|
|
||||||
static void ocadcon(pmix20_opalcaddy_t *p)
|
static void ocadcon(ext20_opalcaddy_t *p)
|
||||||
{
|
{
|
||||||
OBJ_CONSTRUCT(&p->procs, opal_list_t);
|
OBJ_CONSTRUCT(&p->procs, opal_list_t);
|
||||||
OBJ_CONSTRUCT(&p->info, opal_list_t);
|
OBJ_CONSTRUCT(&p->info, opal_list_t);
|
||||||
@ -1161,23 +1340,21 @@ static void ocadcon(pmix20_opalcaddy_t *p)
|
|||||||
p->spwncbfunc = NULL;
|
p->spwncbfunc = NULL;
|
||||||
p->cbdata = NULL;
|
p->cbdata = NULL;
|
||||||
p->odmdxfunc = NULL;
|
p->odmdxfunc = NULL;
|
||||||
#if HAVE_PMIX_QUERY_FUNCTION
|
|
||||||
p->infocbfunc = NULL;
|
p->infocbfunc = NULL;
|
||||||
p->toolcbfunc = NULL;
|
p->toolcbfunc = NULL;
|
||||||
#endif
|
|
||||||
p->ocbdata = NULL;
|
p->ocbdata = NULL;
|
||||||
}
|
}
|
||||||
static void ocaddes(pmix20_opalcaddy_t *p)
|
static void ocaddes(ext20_opalcaddy_t *p)
|
||||||
{
|
{
|
||||||
OPAL_LIST_DESTRUCT(&p->procs);
|
OPAL_LIST_DESTRUCT(&p->procs);
|
||||||
OPAL_LIST_DESTRUCT(&p->info);
|
OPAL_LIST_DESTRUCT(&p->info);
|
||||||
OPAL_LIST_DESTRUCT(&p->apps);
|
OPAL_LIST_DESTRUCT(&p->apps);
|
||||||
}
|
}
|
||||||
OBJ_CLASS_INSTANCE(pmix20_opalcaddy_t,
|
OBJ_CLASS_INSTANCE(ext20_opalcaddy_t,
|
||||||
opal_object_t,
|
opal_object_t,
|
||||||
ocadcon, ocaddes);
|
ocadcon, ocaddes);
|
||||||
|
|
||||||
static void tscon(pmix20_threadshift_t *p)
|
static void tscon(ext20_threadshift_t *p)
|
||||||
{
|
{
|
||||||
p->active = false;
|
p->active = false;
|
||||||
p->source = NULL;
|
p->source = NULL;
|
||||||
@ -1189,6 +1366,6 @@ static void tscon(pmix20_threadshift_t *p)
|
|||||||
p->opcbfunc = NULL;
|
p->opcbfunc = NULL;
|
||||||
p->cbdata = NULL;
|
p->cbdata = NULL;
|
||||||
}
|
}
|
||||||
OBJ_CLASS_INSTANCE(pmix20_threadshift_t,
|
OBJ_CLASS_INSTANCE(ext20_threadshift_t,
|
||||||
opal_object_t,
|
opal_object_t,
|
||||||
tscon, NULL);
|
tscon, NULL);
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
* Copyright (c) 2016 Research Organization for Information Science
|
* Copyright (c) 2016 Research Organization for Information Science
|
||||||
* and Technology (RIST). All rights reserved.
|
* and Technology (RIST). All rights reserved.
|
||||||
* Copyright (c) 2016 Cisco Systems, Inc. All rights reserved.
|
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
@ -12,8 +11,8 @@
|
|||||||
* $HEADER$
|
* $HEADER$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MCA_PMIX_EXT20_H
|
#ifndef MCA_PMIX_PMIX2X_H
|
||||||
#define MCA_PMIX_EXT20_H
|
#define MCA_PMIX_PMIX2X_H
|
||||||
|
|
||||||
#include "opal_config.h"
|
#include "opal_config.h"
|
||||||
|
|
||||||
@ -31,7 +30,7 @@
|
|||||||
|
|
||||||
#include "opal/mca/pmix/pmix.h"
|
#include "opal/mca/pmix/pmix.h"
|
||||||
#include "pmix_server.h"
|
#include "pmix_server.h"
|
||||||
#include "pmix/pmix_common.h"
|
#include "pmix_common.h"
|
||||||
|
|
||||||
BEGIN_C_DECLS
|
BEGIN_C_DECLS
|
||||||
|
|
||||||
@ -56,16 +55,16 @@ typedef struct {
|
|||||||
opal_list_item_t super;
|
opal_list_item_t super;
|
||||||
opal_jobid_t jobid;
|
opal_jobid_t jobid;
|
||||||
char nspace[PMIX_MAX_NSLEN + 1];
|
char nspace[PMIX_MAX_NSLEN + 1];
|
||||||
} opal_pmix20_jobid_trkr_t;
|
} opal_ext20_jobid_trkr_t;
|
||||||
OBJ_CLASS_DECLARATION(opal_pmix20_jobid_trkr_t);
|
OBJ_CLASS_DECLARATION(opal_ext20_jobid_trkr_t);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
opal_list_item_t super;
|
opal_list_item_t super;
|
||||||
size_t index;
|
size_t index;
|
||||||
int code;
|
int code;
|
||||||
opal_pmix_notification_fn_t handler;
|
opal_pmix_notification_fn_t handler;
|
||||||
} opal_pmix20_single_event_t;
|
} opal_ext20_single_event_t;
|
||||||
OBJ_CLASS_DECLARATION(opal_pmix20_single_event_t);
|
OBJ_CLASS_DECLARATION(opal_ext20_single_event_t);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
opal_list_item_t super;
|
opal_list_item_t super;
|
||||||
@ -73,15 +72,15 @@ typedef struct {
|
|||||||
int *codes;
|
int *codes;
|
||||||
size_t ncodes;
|
size_t ncodes;
|
||||||
opal_pmix_notification_fn_t handler;
|
opal_pmix_notification_fn_t handler;
|
||||||
} opal_pmix20_multi_event_t;
|
} opal_ext20_multi_event_t;
|
||||||
OBJ_CLASS_DECLARATION(opal_pmix20_multi_event_t);
|
OBJ_CLASS_DECLARATION(opal_ext20_multi_event_t);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
opal_list_item_t super;
|
opal_list_item_t super;
|
||||||
size_t index;
|
size_t index;
|
||||||
opal_pmix_notification_fn_t handler;
|
opal_pmix_notification_fn_t handler;
|
||||||
} opal_pmix20_default_event_t;
|
} opal_ext20_default_event_t;
|
||||||
OBJ_CLASS_DECLARATION(opal_pmix20_default_event_t);
|
OBJ_CLASS_DECLARATION(opal_ext20_default_event_t);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
opal_list_item_t super;
|
opal_list_item_t super;
|
||||||
@ -91,13 +90,13 @@ typedef struct {
|
|||||||
pmix_data_range_t range;
|
pmix_data_range_t range;
|
||||||
opal_list_t *info;
|
opal_list_t *info;
|
||||||
opal_list_t results;
|
opal_list_t results;
|
||||||
opal_pmix20_single_event_t *sing;
|
opal_ext20_single_event_t *sing;
|
||||||
opal_pmix20_multi_event_t *multi;
|
opal_ext20_multi_event_t *multi;
|
||||||
opal_pmix20_default_event_t *def;
|
opal_ext20_default_event_t *def;
|
||||||
opal_pmix_op_cbfunc_t final_cbfunc;
|
opal_pmix_op_cbfunc_t final_cbfunc;
|
||||||
void *final_cbdata;
|
void *final_cbdata;
|
||||||
} opal_pmix20_event_chain_t;
|
} opal_ext20_event_chain_t;
|
||||||
OBJ_CLASS_DECLARATION(opal_pmix20_event_chain_t);
|
OBJ_CLASS_DECLARATION(opal_ext20_event_chain_t);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
opal_object_t super;
|
opal_object_t super;
|
||||||
@ -118,8 +117,8 @@ typedef struct {
|
|||||||
opal_pmix_lookup_cbfunc_t lkcbfunc;
|
opal_pmix_lookup_cbfunc_t lkcbfunc;
|
||||||
opal_pmix_spawn_cbfunc_t spcbfunc;
|
opal_pmix_spawn_cbfunc_t spcbfunc;
|
||||||
void *cbdata;
|
void *cbdata;
|
||||||
} pmix20_opcaddy_t;
|
} ext20_opcaddy_t;
|
||||||
OBJ_CLASS_DECLARATION(pmix20_opcaddy_t);
|
OBJ_CLASS_DECLARATION(ext20_opcaddy_t);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
opal_object_t super;
|
opal_object_t super;
|
||||||
@ -131,15 +130,13 @@ typedef struct {
|
|||||||
pmix_modex_cbfunc_t mdxcbfunc;
|
pmix_modex_cbfunc_t mdxcbfunc;
|
||||||
pmix_lookup_cbfunc_t lkupcbfunc;
|
pmix_lookup_cbfunc_t lkupcbfunc;
|
||||||
pmix_spawn_cbfunc_t spwncbfunc;
|
pmix_spawn_cbfunc_t spwncbfunc;
|
||||||
#if HAVE_PMIX_QUERY_FUNCTION
|
|
||||||
pmix_info_cbfunc_t infocbfunc;
|
pmix_info_cbfunc_t infocbfunc;
|
||||||
pmix_tool_connection_cbfunc_t toolcbfunc;
|
pmix_tool_connection_cbfunc_t toolcbfunc;
|
||||||
#endif
|
|
||||||
void *cbdata;
|
void *cbdata;
|
||||||
opal_pmix_release_cbfunc_t odmdxfunc;
|
opal_pmix_release_cbfunc_t odmdxfunc;
|
||||||
void *ocbdata;
|
void *ocbdata;
|
||||||
} pmix20_opalcaddy_t;
|
} ext20_opalcaddy_t;
|
||||||
OBJ_CLASS_DECLARATION(pmix20_opalcaddy_t);
|
OBJ_CLASS_DECLARATION(ext20_opalcaddy_t);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
opal_object_t super;
|
opal_object_t super;
|
||||||
@ -159,13 +156,13 @@ typedef struct {
|
|||||||
opal_pmix_evhandler_reg_cbfunc_t cbfunc;
|
opal_pmix_evhandler_reg_cbfunc_t cbfunc;
|
||||||
opal_pmix_op_cbfunc_t opcbfunc;
|
opal_pmix_op_cbfunc_t opcbfunc;
|
||||||
void *cbdata;
|
void *cbdata;
|
||||||
} pmix20_threadshift_t;
|
} ext20_threadshift_t;
|
||||||
OBJ_CLASS_DECLARATION(pmix20_threadshift_t);
|
OBJ_CLASS_DECLARATION(ext20_threadshift_t);
|
||||||
|
|
||||||
#define OPAL_PMIX_OPCD_THREADSHIFT(i, s, sr, if, nif, fn, cb, cd) \
|
#define OPAL_PMIX_OPCD_THREADSHIFT(i, s, sr, if, nif, fn, cb, cd) \
|
||||||
do { \
|
do { \
|
||||||
pmix20_opalcaddy_t *_cd; \
|
ext20_opalcaddy_t *_cd; \
|
||||||
_cd = OBJ_NEW(pmix20_opalcaddy_t); \
|
_cd = OBJ_NEW(ext20_opalcaddy_t); \
|
||||||
_cd->id = (i); \
|
_cd->id = (i); \
|
||||||
_cd->status = (s); \
|
_cd->status = (s); \
|
||||||
_cd->source = (sr); \
|
_cd->source = (sr); \
|
||||||
@ -179,8 +176,8 @@ OBJ_CLASS_DECLARATION(pmix20_threadshift_t);
|
|||||||
|
|
||||||
#define OPAL_PMIX_OP_THREADSHIFT(e, fn, cb, cd) \
|
#define OPAL_PMIX_OP_THREADSHIFT(e, fn, cb, cd) \
|
||||||
do { \
|
do { \
|
||||||
pmix20_threadshift_t *_cd; \
|
ext20_threadshift_t *_cd; \
|
||||||
_cd = OBJ_NEW(pmix20_threadshift_t); \
|
_cd = OBJ_NEW(ext20_threadshift_t); \
|
||||||
_cd->handler = (e); \
|
_cd->handler = (e); \
|
||||||
_cd->opcbfunc = (cb); \
|
_cd->opcbfunc = (cb); \
|
||||||
_cd->cbdata = (cd); \
|
_cd->cbdata = (cd); \
|
||||||
@ -191,8 +188,8 @@ OBJ_CLASS_DECLARATION(pmix20_threadshift_t);
|
|||||||
|
|
||||||
#define OPAL_PMIX_THREADSHIFT(e, i, eh, fn, cb, cd) \
|
#define OPAL_PMIX_THREADSHIFT(e, i, eh, fn, cb, cd) \
|
||||||
do { \
|
do { \
|
||||||
pmix20_threadshift_t *_cd; \
|
ext20_threadshift_t *_cd; \
|
||||||
_cd = OBJ_NEW(pmix20_threadshift_t); \
|
_cd = OBJ_NEW(ext20_threadshift_t); \
|
||||||
_cd->event_codes = (e); \
|
_cd->event_codes = (e); \
|
||||||
_cd->info = (i); \
|
_cd->info = (i); \
|
||||||
_cd->evhandler = (eh); \
|
_cd->evhandler = (eh); \
|
||||||
@ -205,8 +202,8 @@ OBJ_CLASS_DECLARATION(pmix20_threadshift_t);
|
|||||||
|
|
||||||
#define OPAL_PMIX_NOTIFY_THREADSHIFT(s, sr, r, i, fn, cb, cd) \
|
#define OPAL_PMIX_NOTIFY_THREADSHIFT(s, sr, r, i, fn, cb, cd) \
|
||||||
do { \
|
do { \
|
||||||
pmix20_threadshift_t *_cd; \
|
ext20_threadshift_t *_cd; \
|
||||||
_cd = OBJ_NEW(pmix20_threadshift_t); \
|
_cd = OBJ_NEW(ext20_threadshift_t); \
|
||||||
_cd->status = (s); \
|
_cd->status = (s); \
|
||||||
_cd->source = (sr); \
|
_cd->source = (sr); \
|
||||||
_cd->range = (r); \
|
_cd->range = (r); \
|
||||||
@ -219,96 +216,106 @@ OBJ_CLASS_DECLARATION(pmix20_threadshift_t);
|
|||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
/**** CLIENT FUNCTIONS ****/
|
/**** CLIENT FUNCTIONS ****/
|
||||||
OPAL_MODULE_DECLSPEC int pmix20_client_init(void);
|
OPAL_MODULE_DECLSPEC int ext20_client_init(void);
|
||||||
OPAL_MODULE_DECLSPEC int pmix20_client_finalize(void);
|
OPAL_MODULE_DECLSPEC int ext20_client_finalize(void);
|
||||||
OPAL_MODULE_DECLSPEC int pmix20_initialized(void);
|
OPAL_MODULE_DECLSPEC int ext20_initialized(void);
|
||||||
OPAL_MODULE_DECLSPEC int pmix20_abort(int flag, const char *msg,
|
OPAL_MODULE_DECLSPEC int ext20_abort(int flag, const char *msg,
|
||||||
opal_list_t *procs);
|
opal_list_t *procs);
|
||||||
OPAL_MODULE_DECLSPEC int pmix20_commit(void);
|
OPAL_MODULE_DECLSPEC int ext20_commit(void);
|
||||||
OPAL_MODULE_DECLSPEC int pmix20_fence(opal_list_t *procs, int collect_data);
|
OPAL_MODULE_DECLSPEC int ext20_fence(opal_list_t *procs, int collect_data);
|
||||||
OPAL_MODULE_DECLSPEC int pmix20_fencenb(opal_list_t *procs, int collect_data,
|
OPAL_MODULE_DECLSPEC int ext20_fencenb(opal_list_t *procs, int collect_data,
|
||||||
opal_pmix_op_cbfunc_t cbfunc, void *cbdata);
|
opal_pmix_op_cbfunc_t cbfunc, void *cbdata);
|
||||||
OPAL_MODULE_DECLSPEC int pmix20_put(opal_pmix_scope_t scope,
|
OPAL_MODULE_DECLSPEC int ext20_put(opal_pmix_scope_t scope,
|
||||||
opal_value_t *val);
|
opal_value_t *val);
|
||||||
OPAL_MODULE_DECLSPEC int pmix20_get(const opal_process_name_t *proc, const char *key,
|
OPAL_MODULE_DECLSPEC int ext20_get(const opal_process_name_t *proc, const char *key,
|
||||||
opal_list_t *info, opal_value_t **val);
|
opal_list_t *info, opal_value_t **val);
|
||||||
OPAL_MODULE_DECLSPEC int pmix20_getnb(const opal_process_name_t *proc, const char *key,
|
OPAL_MODULE_DECLSPEC int ext20_getnb(const opal_process_name_t *proc, const char *key,
|
||||||
opal_list_t *info,
|
opal_list_t *info,
|
||||||
opal_pmix_value_cbfunc_t cbfunc, void *cbdata);
|
opal_pmix_value_cbfunc_t cbfunc, void *cbdata);
|
||||||
OPAL_MODULE_DECLSPEC int pmix20_publish(opal_list_t *info);
|
OPAL_MODULE_DECLSPEC int ext20_publish(opal_list_t *info);
|
||||||
OPAL_MODULE_DECLSPEC int pmix20_publishnb(opal_list_t *info,
|
OPAL_MODULE_DECLSPEC int ext20_publishnb(opal_list_t *info,
|
||||||
opal_pmix_op_cbfunc_t cbfunc, void *cbdata);
|
opal_pmix_op_cbfunc_t cbfunc, void *cbdata);
|
||||||
OPAL_MODULE_DECLSPEC int pmix20_lookup(opal_list_t *data, opal_list_t *info);
|
OPAL_MODULE_DECLSPEC int ext20_lookup(opal_list_t *data, opal_list_t *info);
|
||||||
OPAL_MODULE_DECLSPEC int pmix20_lookupnb(char **keys, opal_list_t *info,
|
OPAL_MODULE_DECLSPEC int ext20_lookupnb(char **keys, opal_list_t *info,
|
||||||
opal_pmix_lookup_cbfunc_t cbfunc, void *cbdata);
|
opal_pmix_lookup_cbfunc_t cbfunc, void *cbdata);
|
||||||
OPAL_MODULE_DECLSPEC int pmix20_unpublish(char **keys, opal_list_t *info);
|
OPAL_MODULE_DECLSPEC int ext20_unpublish(char **keys, opal_list_t *info);
|
||||||
OPAL_MODULE_DECLSPEC int pmix20_unpublishnb(char **keys, opal_list_t *info,
|
OPAL_MODULE_DECLSPEC int ext20_unpublishnb(char **keys, opal_list_t *info,
|
||||||
opal_pmix_op_cbfunc_t cbfunc, void *cbdata);
|
opal_pmix_op_cbfunc_t cbfunc, void *cbdata);
|
||||||
OPAL_MODULE_DECLSPEC int pmix20_spawn(opal_list_t *job_info, opal_list_t *apps, opal_jobid_t *jobid);
|
OPAL_MODULE_DECLSPEC int ext20_spawn(opal_list_t *job_info, opal_list_t *apps, opal_jobid_t *jobid);
|
||||||
OPAL_MODULE_DECLSPEC int pmix20_spawnnb(opal_list_t *job_info, opal_list_t *apps,
|
OPAL_MODULE_DECLSPEC int ext20_spawnnb(opal_list_t *job_info, opal_list_t *apps,
|
||||||
opal_pmix_spawn_cbfunc_t cbfunc, void *cbdata);
|
opal_pmix_spawn_cbfunc_t cbfunc, void *cbdata);
|
||||||
OPAL_MODULE_DECLSPEC int pmix20_connect(opal_list_t *procs);
|
OPAL_MODULE_DECLSPEC int ext20_connect(opal_list_t *procs);
|
||||||
OPAL_MODULE_DECLSPEC int pmix20_connectnb(opal_list_t *procs,
|
OPAL_MODULE_DECLSPEC int ext20_connectnb(opal_list_t *procs,
|
||||||
opal_pmix_op_cbfunc_t cbfunc,
|
opal_pmix_op_cbfunc_t cbfunc,
|
||||||
void *cbdata);
|
void *cbdata);
|
||||||
OPAL_MODULE_DECLSPEC int pmix20_disconnect(opal_list_t *procs);
|
OPAL_MODULE_DECLSPEC int ext20_disconnect(opal_list_t *procs);
|
||||||
OPAL_MODULE_DECLSPEC int pmix20_disconnectnb(opal_list_t *procs,
|
OPAL_MODULE_DECLSPEC int ext20_disconnectnb(opal_list_t *procs,
|
||||||
opal_pmix_op_cbfunc_t cbfunc,
|
opal_pmix_op_cbfunc_t cbfunc,
|
||||||
void *cbdata);
|
void *cbdata);
|
||||||
OPAL_MODULE_DECLSPEC int pmix20_resolve_peers(const char *nodename, opal_jobid_t jobid,
|
OPAL_MODULE_DECLSPEC int ext20_resolve_peers(const char *nodename, opal_jobid_t jobid,
|
||||||
opal_list_t *procs);
|
opal_list_t *procs);
|
||||||
OPAL_MODULE_DECLSPEC int pmix20_resolve_nodes(opal_jobid_t jobid, char **nodelist);
|
OPAL_MODULE_DECLSPEC int ext20_resolve_nodes(opal_jobid_t jobid, char **nodelist);
|
||||||
|
|
||||||
/**** COMMON FUNCTIONS ****/
|
/**** COMMON FUNCTIONS ****/
|
||||||
OPAL_MODULE_DECLSPEC int pmix20_store_local(const opal_process_name_t *proc,
|
OPAL_MODULE_DECLSPEC int ext20_store_local(const opal_process_name_t *proc,
|
||||||
opal_value_t *val);
|
opal_value_t *val);
|
||||||
|
|
||||||
/**** SERVER SOUTHBOUND FUNCTIONS ****/
|
/**** SERVER SOUTHBOUND FUNCTIONS ****/
|
||||||
OPAL_MODULE_DECLSPEC int pmix20_server_init(opal_pmix_server_module_t *module,
|
OPAL_MODULE_DECLSPEC int ext20_server_init(opal_pmix_server_module_t *module,
|
||||||
opal_list_t *info);
|
opal_list_t *info);
|
||||||
OPAL_MODULE_DECLSPEC int pmix20_server_finalize(void);
|
OPAL_MODULE_DECLSPEC int ext20_server_finalize(void);
|
||||||
OPAL_MODULE_DECLSPEC int pmix20_server_gen_regex(const char *input, char **regex);
|
OPAL_MODULE_DECLSPEC int ext20_server_gen_regex(const char *input, char **regex);
|
||||||
OPAL_MODULE_DECLSPEC int pmix20_server_gen_ppn(const char *input, char **ppn);
|
OPAL_MODULE_DECLSPEC int ext20_server_gen_ppn(const char *input, char **ppn);
|
||||||
OPAL_MODULE_DECLSPEC int pmix20_server_register_nspace(opal_jobid_t jobid,
|
OPAL_MODULE_DECLSPEC int ext20_server_register_nspace(opal_jobid_t jobid,
|
||||||
int nlocalprocs,
|
int nlocalprocs,
|
||||||
opal_list_t *info,
|
opal_list_t *info,
|
||||||
opal_pmix_op_cbfunc_t cbfunc,
|
opal_pmix_op_cbfunc_t cbfunc,
|
||||||
void *cbdata);
|
void *cbdata);
|
||||||
OPAL_MODULE_DECLSPEC void pmix20_server_deregister_nspace(opal_jobid_t jobid,
|
OPAL_MODULE_DECLSPEC void ext20_server_deregister_nspace(opal_jobid_t jobid,
|
||||||
opal_pmix_op_cbfunc_t cbfunc,
|
opal_pmix_op_cbfunc_t cbfunc,
|
||||||
void *cbdata);
|
void *cbdata);
|
||||||
OPAL_MODULE_DECLSPEC int pmix20_server_register_client(const opal_process_name_t *proc,
|
OPAL_MODULE_DECLSPEC int ext20_server_register_client(const opal_process_name_t *proc,
|
||||||
uid_t uid, gid_t gid,
|
uid_t uid, gid_t gid,
|
||||||
void *server_object,
|
void *server_object,
|
||||||
opal_pmix_op_cbfunc_t cbfunc,
|
opal_pmix_op_cbfunc_t cbfunc,
|
||||||
void *cbdata);
|
void *cbdata);
|
||||||
OPAL_MODULE_DECLSPEC void pmix20_server_deregister_client(const opal_process_name_t *proc,
|
OPAL_MODULE_DECLSPEC void ext20_server_deregister_client(const opal_process_name_t *proc,
|
||||||
opal_pmix_op_cbfunc_t cbfunc,
|
opal_pmix_op_cbfunc_t cbfunc,
|
||||||
void *cbdata);
|
void *cbdata);
|
||||||
OPAL_MODULE_DECLSPEC int pmix20_server_setup_fork(const opal_process_name_t *proc, char ***env);
|
OPAL_MODULE_DECLSPEC int ext20_server_setup_fork(const opal_process_name_t *proc, char ***env);
|
||||||
OPAL_MODULE_DECLSPEC int pmix20_server_dmodex(const opal_process_name_t *proc,
|
OPAL_MODULE_DECLSPEC int ext20_server_dmodex(const opal_process_name_t *proc,
|
||||||
opal_pmix_modex_cbfunc_t cbfunc, void *cbdata);
|
opal_pmix_modex_cbfunc_t cbfunc, void *cbdata);
|
||||||
OPAL_MODULE_DECLSPEC int pmix20_server_notify_event(int status,
|
OPAL_MODULE_DECLSPEC int ext20_server_notify_event(int status,
|
||||||
const opal_process_name_t *source,
|
const opal_process_name_t *source,
|
||||||
opal_list_t *info,
|
opal_list_t *info,
|
||||||
opal_pmix_op_cbfunc_t cbfunc, void *cbdata);
|
opal_pmix_op_cbfunc_t cbfunc, void *cbdata);
|
||||||
|
|
||||||
|
|
||||||
/**** COMPONENT UTILITY FUNCTIONS ****/
|
/**** COMPONENT UTILITY FUNCTIONS ****/
|
||||||
OPAL_MODULE_DECLSPEC void pmix20_event_hdlr(size_t evhdlr_registration_id,
|
OPAL_MODULE_DECLSPEC void ext20_event_hdlr(size_t evhdlr_registration_id,
|
||||||
pmix_status_t status, const pmix_proc_t *source,
|
pmix_status_t status, const pmix_proc_t *source,
|
||||||
pmix_info_t info[], size_t ninfo,
|
pmix_info_t info[], size_t ninfo,
|
||||||
pmix_info_t results[], size_t nresults,
|
pmix_info_t results[], size_t nresults,
|
||||||
pmix_event_notification_cbfunc_fn_t cbfunc,
|
pmix_event_notification_cbfunc_fn_t cbfunc,
|
||||||
void *cbdata);
|
void *cbdata);
|
||||||
OPAL_MODULE_DECLSPEC pmix_status_t pmix20_convert_opalrc(int rc);
|
OPAL_MODULE_DECLSPEC pmix_status_t ext20_convert_opalrc(int rc);
|
||||||
OPAL_MODULE_DECLSPEC int pmix20_convert_rc(pmix_status_t rc);
|
OPAL_MODULE_DECLSPEC int ext20_convert_rc(pmix_status_t rc);
|
||||||
OPAL_MODULE_DECLSPEC pmix_scope_t pmix20_convert_opalscope(opal_pmix_scope_t scope);
|
|
||||||
OPAL_MODULE_DECLSPEC pmix_data_range_t pmix20_convert_opalrange(opal_pmix_data_range_t range);
|
OPAL_MODULE_DECLSPEC opal_vpid_t ext20_convert_rank(int rank);
|
||||||
OPAL_MODULE_DECLSPEC opal_pmix_data_range_t pmix20_convert_range(pmix_data_range_t range);
|
OPAL_MODULE_DECLSPEC pmix_rank_t ext20_convert_opalrank(opal_vpid_t vpid);
|
||||||
OPAL_MODULE_DECLSPEC void pmix20_value_load(pmix_value_t *v,
|
|
||||||
|
OPAL_MODULE_DECLSPEC opal_pmix_scope_t ext20_convert_scope(pmix_scope_t scope);
|
||||||
|
OPAL_MODULE_DECLSPEC pmix_scope_t ext20_convert_opalscope(opal_pmix_scope_t scope);
|
||||||
|
|
||||||
|
OPAL_MODULE_DECLSPEC pmix_data_range_t ext20_convert_opalrange(opal_pmix_data_range_t range);
|
||||||
|
OPAL_MODULE_DECLSPEC opal_pmix_data_range_t ext20_convert_range(pmix_data_range_t range);
|
||||||
|
|
||||||
|
OPAL_MODULE_DECLSPEC opal_pmix_persistence_t ext20_convert_persist(pmix_persistence_t scope);
|
||||||
|
OPAL_MODULE_DECLSPEC pmix_persistence_t ext20_convert_opalpersist(opal_pmix_persistence_t scope);
|
||||||
|
|
||||||
|
OPAL_MODULE_DECLSPEC void ext20_value_load(pmix_value_t *v,
|
||||||
opal_value_t *kv);
|
opal_value_t *kv);
|
||||||
OPAL_MODULE_DECLSPEC int pmix20_value_unload(opal_value_t *kv,
|
OPAL_MODULE_DECLSPEC int ext20_value_unload(opal_value_t *kv,
|
||||||
const pmix_value_t *v);
|
const pmix_value_t *v);
|
||||||
|
|
||||||
END_C_DECLS
|
END_C_DECLS
|
||||||
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
@ -89,16 +89,17 @@
|
|||||||
pmix_data_range_t range,
|
pmix_data_range_t range,
|
||||||
pmix_info_t info[], size_t ninfo,
|
pmix_info_t info[], size_t ninfo,
|
||||||
pmix_op_cbfunc_t cbfunc, void *cbdata);
|
pmix_op_cbfunc_t cbfunc, void *cbdata);
|
||||||
#if HAVE_PMIX_QUERY_FUNCTION
|
static pmix_status_t server_query(pmix_proc_t *proct,
|
||||||
static pmix_status_t server_query(pmix_proc_t *proct,
|
pmix_query_t *queryies, size_t nqueries,
|
||||||
pmix_info_t *info, size_t ninfo,
|
|
||||||
pmix_info_t *directives, size_t ndirs,
|
|
||||||
pmix_info_cbfunc_t cbfunc,
|
pmix_info_cbfunc_t cbfunc,
|
||||||
void *cbdata);
|
void *cbdata);
|
||||||
static void server_tool_connection(pmix_info_t *info, size_t ninfo,
|
static void server_tool_connection(pmix_info_t *info, size_t ninfo,
|
||||||
pmix_tool_connection_cbfunc_t cbfunc,
|
pmix_tool_connection_cbfunc_t cbfunc,
|
||||||
void *cbdata);
|
void *cbdata);
|
||||||
#endif
|
static void server_log(const pmix_proc_t *client,
|
||||||
|
const pmix_info_t data[], size_t ndata,
|
||||||
|
const pmix_info_t directives[], size_t ndirs,
|
||||||
|
pmix_op_cbfunc_t cbfunc, void *cbdata);
|
||||||
|
|
||||||
pmix_server_module_t mymodule = {
|
pmix_server_module_t mymodule = {
|
||||||
.client_connected = server_client_connected_fn,
|
.client_connected = server_client_connected_fn,
|
||||||
@ -115,10 +116,9 @@ static void server_tool_connection(pmix_info_t *info, size_t ninfo,
|
|||||||
.register_events = server_register_events,
|
.register_events = server_register_events,
|
||||||
.deregister_events = server_deregister_events,
|
.deregister_events = server_deregister_events,
|
||||||
.notify_event = server_notify_event,
|
.notify_event = server_notify_event,
|
||||||
#if HAVE_PMIX_QUERY_FUNCTION
|
|
||||||
.query = server_query,
|
.query = server_query,
|
||||||
.tool_connected = server_tool_connection
|
.tool_connected = server_tool_connection,
|
||||||
#endif
|
.log = server_log
|
||||||
};
|
};
|
||||||
|
|
||||||
opal_pmix_server_module_t *host_module = NULL;
|
opal_pmix_server_module_t *host_module = NULL;
|
||||||
@ -126,10 +126,10 @@ opal_pmix_server_module_t *host_module = NULL;
|
|||||||
|
|
||||||
static void opal_opcbfunc(int status, void *cbdata)
|
static void opal_opcbfunc(int status, void *cbdata)
|
||||||
{
|
{
|
||||||
pmix20_opalcaddy_t *opalcaddy = (pmix20_opalcaddy_t*)cbdata;
|
ext20_opalcaddy_t *opalcaddy = (ext20_opalcaddy_t*)cbdata;
|
||||||
|
|
||||||
if (NULL != opalcaddy->opcbfunc) {
|
if (NULL != opalcaddy->opcbfunc) {
|
||||||
opalcaddy->opcbfunc(pmix20_convert_opalrc(status), opalcaddy->cbdata);
|
opalcaddy->opcbfunc(ext20_convert_opalrc(status), opalcaddy->cbdata);
|
||||||
}
|
}
|
||||||
OBJ_RELEASE(opalcaddy);
|
OBJ_RELEASE(opalcaddy);
|
||||||
}
|
}
|
||||||
@ -139,33 +139,33 @@ static pmix_status_t server_client_connected_fn(const pmix_proc_t *p, void *serv
|
|||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
opal_process_name_t proc;
|
opal_process_name_t proc;
|
||||||
pmix20_opalcaddy_t *opalcaddy;
|
ext20_opalcaddy_t *opalcaddy;
|
||||||
|
|
||||||
if (NULL == host_module || NULL == host_module->client_connected) {
|
if (NULL == host_module || NULL == host_module->client_connected) {
|
||||||
return PMIX_SUCCESS;
|
return PMIX_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
opalcaddy = OBJ_NEW(pmix20_opalcaddy_t);
|
opalcaddy = OBJ_NEW(ext20_opalcaddy_t);
|
||||||
opalcaddy->opcbfunc = cbfunc;
|
opalcaddy->opcbfunc = cbfunc;
|
||||||
opalcaddy->cbdata = cbdata;
|
opalcaddy->cbdata = cbdata;
|
||||||
|
|
||||||
/* convert the nspace/rank to an opal_process_name_t */
|
/* convert the nspace/rank to an opal_process_name_t */
|
||||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) {
|
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) {
|
||||||
return pmix20_convert_opalrc(rc);
|
return ext20_convert_opalrc(rc);
|
||||||
}
|
}
|
||||||
proc.vpid = p->rank;
|
proc.vpid = ext20_convert_rank(p->rank);
|
||||||
|
|
||||||
/* pass it up */
|
/* pass it up */
|
||||||
rc = host_module->client_connected(&proc, server_object,
|
rc = host_module->client_connected(&proc, server_object,
|
||||||
opal_opcbfunc, opalcaddy);
|
opal_opcbfunc, opalcaddy);
|
||||||
return pmix20_convert_opalrc(rc);
|
return ext20_convert_opalrc(rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static pmix_status_t server_client_finalized_fn(const pmix_proc_t *p, void* server_object,
|
static pmix_status_t server_client_finalized_fn(const pmix_proc_t *p, void* server_object,
|
||||||
pmix_op_cbfunc_t cbfunc, void *cbdata)
|
pmix_op_cbfunc_t cbfunc, void *cbdata)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
pmix20_opalcaddy_t *opalcaddy;
|
ext20_opalcaddy_t *opalcaddy;
|
||||||
opal_process_name_t proc;
|
opal_process_name_t proc;
|
||||||
|
|
||||||
if (NULL == host_module || NULL == host_module->client_finalized) {
|
if (NULL == host_module || NULL == host_module->client_finalized) {
|
||||||
@ -174,12 +174,12 @@ static pmix_status_t server_client_finalized_fn(const pmix_proc_t *p, void* serv
|
|||||||
|
|
||||||
/* convert the nspace/rank to an opal_process_name_t */
|
/* convert the nspace/rank to an opal_process_name_t */
|
||||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) {
|
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) {
|
||||||
return pmix20_convert_opalrc(rc);
|
return ext20_convert_opalrc(rc);
|
||||||
}
|
}
|
||||||
proc.vpid = p->rank;
|
proc.vpid = ext20_convert_rank(p->rank);
|
||||||
|
|
||||||
/* setup the caddy */
|
/* setup the caddy */
|
||||||
opalcaddy = OBJ_NEW(pmix20_opalcaddy_t);
|
opalcaddy = OBJ_NEW(ext20_opalcaddy_t);
|
||||||
opalcaddy->opcbfunc = cbfunc;
|
opalcaddy->opcbfunc = cbfunc;
|
||||||
opalcaddy->cbdata = cbdata;
|
opalcaddy->cbdata = cbdata;
|
||||||
|
|
||||||
@ -188,7 +188,7 @@ static pmix_status_t server_client_finalized_fn(const pmix_proc_t *p, void* serv
|
|||||||
if (OPAL_SUCCESS != rc) {
|
if (OPAL_SUCCESS != rc) {
|
||||||
OBJ_RELEASE(opalcaddy);
|
OBJ_RELEASE(opalcaddy);
|
||||||
}
|
}
|
||||||
return pmix20_convert_opalrc(rc);
|
return ext20_convert_opalrc(rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static pmix_status_t server_abort_fn(const pmix_proc_t *p, void *server_object,
|
static pmix_status_t server_abort_fn(const pmix_proc_t *p, void *server_object,
|
||||||
@ -200,7 +200,7 @@ static pmix_status_t server_abort_fn(const pmix_proc_t *p, void *server_object,
|
|||||||
opal_namelist_t *nm;
|
opal_namelist_t *nm;
|
||||||
opal_process_name_t proc;
|
opal_process_name_t proc;
|
||||||
int rc;
|
int rc;
|
||||||
pmix20_opalcaddy_t *opalcaddy;
|
ext20_opalcaddy_t *opalcaddy;
|
||||||
|
|
||||||
if (NULL == host_module || NULL == host_module->abort) {
|
if (NULL == host_module || NULL == host_module->abort) {
|
||||||
return PMIX_ERR_NOT_SUPPORTED;
|
return PMIX_ERR_NOT_SUPPORTED;
|
||||||
@ -208,12 +208,12 @@ static pmix_status_t server_abort_fn(const pmix_proc_t *p, void *server_object,
|
|||||||
|
|
||||||
/* convert the nspace/rank to an opal_process_name_t */
|
/* convert the nspace/rank to an opal_process_name_t */
|
||||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) {
|
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) {
|
||||||
return pmix20_convert_opalrc(rc);
|
return ext20_convert_opalrc(rc);
|
||||||
}
|
}
|
||||||
proc.vpid = p->rank;
|
proc.vpid = ext20_convert_rank(p->rank);
|
||||||
|
|
||||||
/* setup the caddy */
|
/* setup the caddy */
|
||||||
opalcaddy = OBJ_NEW(pmix20_opalcaddy_t);
|
opalcaddy = OBJ_NEW(ext20_opalcaddy_t);
|
||||||
opalcaddy->opcbfunc = cbfunc;
|
opalcaddy->opcbfunc = cbfunc;
|
||||||
opalcaddy->cbdata = cbdata;
|
opalcaddy->cbdata = cbdata;
|
||||||
|
|
||||||
@ -223,13 +223,9 @@ static pmix_status_t server_abort_fn(const pmix_proc_t *p, void *server_object,
|
|||||||
opal_list_append(&opalcaddy->procs, &nm->super);
|
opal_list_append(&opalcaddy->procs, &nm->super);
|
||||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&nm->name.jobid, procs[n].nspace))) {
|
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&nm->name.jobid, procs[n].nspace))) {
|
||||||
OBJ_RELEASE(opalcaddy);
|
OBJ_RELEASE(opalcaddy);
|
||||||
return pmix20_convert_opalrc(rc);
|
return ext20_convert_opalrc(rc);
|
||||||
}
|
|
||||||
if (PMIX_RANK_WILDCARD == procs[n].rank) {
|
|
||||||
nm->name.vpid = OPAL_VPID_WILDCARD;
|
|
||||||
} else {
|
|
||||||
nm->name.vpid = procs[n].rank;
|
|
||||||
}
|
}
|
||||||
|
nm->name.vpid = ext20_convert_rank(procs[n].rank);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* pass it up */
|
/* pass it up */
|
||||||
@ -238,12 +234,12 @@ static pmix_status_t server_abort_fn(const pmix_proc_t *p, void *server_object,
|
|||||||
if (OPAL_SUCCESS != rc) {
|
if (OPAL_SUCCESS != rc) {
|
||||||
OBJ_RELEASE(opalcaddy);
|
OBJ_RELEASE(opalcaddy);
|
||||||
}
|
}
|
||||||
return pmix20_convert_opalrc(rc);
|
return ext20_convert_opalrc(rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _data_release(void *cbdata)
|
static void _data_release(void *cbdata)
|
||||||
{
|
{
|
||||||
pmix20_opalcaddy_t *opalcaddy = (pmix20_opalcaddy_t*)cbdata;
|
ext20_opalcaddy_t *opalcaddy = (ext20_opalcaddy_t*)cbdata;
|
||||||
|
|
||||||
if (NULL != opalcaddy->odmdxfunc) {
|
if (NULL != opalcaddy->odmdxfunc) {
|
||||||
opalcaddy->odmdxfunc(opalcaddy->ocbdata);
|
opalcaddy->odmdxfunc(opalcaddy->ocbdata);
|
||||||
@ -255,9 +251,9 @@ static void opmdx_response(int status, const char *data, size_t sz, void *cbdata
|
|||||||
opal_pmix_release_cbfunc_t relcbfunc, void *relcbdata)
|
opal_pmix_release_cbfunc_t relcbfunc, void *relcbdata)
|
||||||
{
|
{
|
||||||
pmix_status_t rc;
|
pmix_status_t rc;
|
||||||
pmix20_opalcaddy_t *opalcaddy = (pmix20_opalcaddy_t*)cbdata;
|
ext20_opalcaddy_t *opalcaddy = (ext20_opalcaddy_t*)cbdata;
|
||||||
|
|
||||||
rc = pmix20_convert_rc(status);
|
rc = ext20_convert_rc(status);
|
||||||
if (NULL != opalcaddy->mdxcbfunc) {
|
if (NULL != opalcaddy->mdxcbfunc) {
|
||||||
opalcaddy->odmdxfunc = relcbfunc;
|
opalcaddy->odmdxfunc = relcbfunc;
|
||||||
opalcaddy->ocbdata = relcbdata;
|
opalcaddy->ocbdata = relcbdata;
|
||||||
@ -273,7 +269,7 @@ static pmix_status_t server_fencenb_fn(const pmix_proc_t procs[], size_t nprocs,
|
|||||||
char *data, size_t ndata,
|
char *data, size_t ndata,
|
||||||
pmix_modex_cbfunc_t cbfunc, void *cbdata)
|
pmix_modex_cbfunc_t cbfunc, void *cbdata)
|
||||||
{
|
{
|
||||||
pmix20_opalcaddy_t *opalcaddy;
|
ext20_opalcaddy_t *opalcaddy;
|
||||||
size_t n;
|
size_t n;
|
||||||
opal_namelist_t *nm;
|
opal_namelist_t *nm;
|
||||||
opal_value_t *iptr;
|
opal_value_t *iptr;
|
||||||
@ -284,7 +280,7 @@ static pmix_status_t server_fencenb_fn(const pmix_proc_t procs[], size_t nprocs,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* setup the caddy */
|
/* setup the caddy */
|
||||||
opalcaddy = OBJ_NEW(pmix20_opalcaddy_t);
|
opalcaddy = OBJ_NEW(ext20_opalcaddy_t);
|
||||||
opalcaddy->mdxcbfunc = cbfunc;
|
opalcaddy->mdxcbfunc = cbfunc;
|
||||||
opalcaddy->cbdata = cbdata;
|
opalcaddy->cbdata = cbdata;
|
||||||
|
|
||||||
@ -294,13 +290,9 @@ static pmix_status_t server_fencenb_fn(const pmix_proc_t procs[], size_t nprocs,
|
|||||||
opal_list_append(&opalcaddy->procs, &nm->super);
|
opal_list_append(&opalcaddy->procs, &nm->super);
|
||||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&nm->name.jobid, procs[n].nspace))) {
|
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&nm->name.jobid, procs[n].nspace))) {
|
||||||
OBJ_RELEASE(opalcaddy);
|
OBJ_RELEASE(opalcaddy);
|
||||||
return pmix20_convert_opalrc(rc);
|
return ext20_convert_opalrc(rc);
|
||||||
}
|
|
||||||
if (PMIX_RANK_WILDCARD == procs[n].rank) {
|
|
||||||
nm->name.vpid = OPAL_VPID_WILDCARD;
|
|
||||||
} else {
|
|
||||||
nm->name.vpid = procs[n].rank;
|
|
||||||
}
|
}
|
||||||
|
nm->name.vpid = ext20_convert_rank(procs[n].rank);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* convert the array of pmix_info_t to the list of info */
|
/* convert the array of pmix_info_t to the list of info */
|
||||||
@ -308,9 +300,9 @@ static pmix_status_t server_fencenb_fn(const pmix_proc_t procs[], size_t nprocs,
|
|||||||
iptr = OBJ_NEW(opal_value_t);
|
iptr = OBJ_NEW(opal_value_t);
|
||||||
opal_list_append(&opalcaddy->info, &iptr->super);
|
opal_list_append(&opalcaddy->info, &iptr->super);
|
||||||
iptr->key = strdup(info[n].key);
|
iptr->key = strdup(info[n].key);
|
||||||
if (OPAL_SUCCESS != (rc = pmix20_value_unload(iptr, &info[n].value))) {
|
if (OPAL_SUCCESS != (rc = ext20_value_unload(iptr, &info[n].value))) {
|
||||||
OBJ_RELEASE(opalcaddy);
|
OBJ_RELEASE(opalcaddy);
|
||||||
return pmix20_convert_opalrc(rc);
|
return ext20_convert_opalrc(rc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -320,7 +312,7 @@ static pmix_status_t server_fencenb_fn(const pmix_proc_t procs[], size_t nprocs,
|
|||||||
if (OPAL_SUCCESS != rc) {
|
if (OPAL_SUCCESS != rc) {
|
||||||
OBJ_RELEASE(opalcaddy);
|
OBJ_RELEASE(opalcaddy);
|
||||||
}
|
}
|
||||||
return pmix20_convert_opalrc(rc);
|
return ext20_convert_opalrc(rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static pmix_status_t server_dmodex_req_fn(const pmix_proc_t *p,
|
static pmix_status_t server_dmodex_req_fn(const pmix_proc_t *p,
|
||||||
@ -328,7 +320,7 @@ static pmix_status_t server_dmodex_req_fn(const pmix_proc_t *p,
|
|||||||
pmix_modex_cbfunc_t cbfunc, void *cbdata)
|
pmix_modex_cbfunc_t cbfunc, void *cbdata)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
pmix20_opalcaddy_t *opalcaddy;
|
ext20_opalcaddy_t *opalcaddy;
|
||||||
opal_process_name_t proc;
|
opal_process_name_t proc;
|
||||||
opal_value_t *iptr;
|
opal_value_t *iptr;
|
||||||
size_t n;
|
size_t n;
|
||||||
@ -339,16 +331,12 @@ static pmix_status_t server_dmodex_req_fn(const pmix_proc_t *p,
|
|||||||
|
|
||||||
/* convert the nspace/rank to an opal_process_name_t */
|
/* convert the nspace/rank to an opal_process_name_t */
|
||||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) {
|
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) {
|
||||||
return pmix20_convert_opalrc(rc);
|
return ext20_convert_opalrc(rc);
|
||||||
}
|
|
||||||
if (PMIX_RANK_WILDCARD == p->rank) {
|
|
||||||
proc.vpid = OPAL_VPID_WILDCARD;
|
|
||||||
} else {
|
|
||||||
proc.vpid = p->rank;
|
|
||||||
}
|
}
|
||||||
|
proc.vpid = ext20_convert_rank(p->rank);
|
||||||
|
|
||||||
/* setup the caddy */
|
/* setup the caddy */
|
||||||
opalcaddy = OBJ_NEW(pmix20_opalcaddy_t);
|
opalcaddy = OBJ_NEW(ext20_opalcaddy_t);
|
||||||
opalcaddy->mdxcbfunc = cbfunc;
|
opalcaddy->mdxcbfunc = cbfunc;
|
||||||
opalcaddy->cbdata = cbdata;
|
opalcaddy->cbdata = cbdata;
|
||||||
|
|
||||||
@ -357,9 +345,9 @@ static pmix_status_t server_dmodex_req_fn(const pmix_proc_t *p,
|
|||||||
iptr = OBJ_NEW(opal_value_t);
|
iptr = OBJ_NEW(opal_value_t);
|
||||||
opal_list_append(&opalcaddy->info, &iptr->super);
|
opal_list_append(&opalcaddy->info, &iptr->super);
|
||||||
iptr->key = strdup(info[n].key);
|
iptr->key = strdup(info[n].key);
|
||||||
if (OPAL_SUCCESS != (rc = pmix20_value_unload(iptr, &info[n].value))) {
|
if (OPAL_SUCCESS != (rc = ext20_value_unload(iptr, &info[n].value))) {
|
||||||
OBJ_RELEASE(opalcaddy);
|
OBJ_RELEASE(opalcaddy);
|
||||||
return pmix20_convert_opalrc(rc);
|
return ext20_convert_opalrc(rc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -371,7 +359,7 @@ static pmix_status_t server_dmodex_req_fn(const pmix_proc_t *p,
|
|||||||
if (OPAL_ERR_IN_PROCESS == rc) {
|
if (OPAL_ERR_IN_PROCESS == rc) {
|
||||||
rc = OPAL_SUCCESS;
|
rc = OPAL_SUCCESS;
|
||||||
}
|
}
|
||||||
return pmix20_convert_opalrc(rc);
|
return ext20_convert_opalrc(rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static pmix_status_t server_publish_fn(const pmix_proc_t *p,
|
static pmix_status_t server_publish_fn(const pmix_proc_t *p,
|
||||||
@ -380,7 +368,7 @@ static pmix_status_t server_publish_fn(const pmix_proc_t *p,
|
|||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
size_t n;
|
size_t n;
|
||||||
pmix20_opalcaddy_t *opalcaddy;
|
ext20_opalcaddy_t *opalcaddy;
|
||||||
opal_process_name_t proc;
|
opal_process_name_t proc;
|
||||||
opal_value_t *oinfo;
|
opal_value_t *oinfo;
|
||||||
|
|
||||||
@ -390,16 +378,12 @@ static pmix_status_t server_publish_fn(const pmix_proc_t *p,
|
|||||||
|
|
||||||
/* convert the nspace/rank to an opal_process_name_t */
|
/* convert the nspace/rank to an opal_process_name_t */
|
||||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) {
|
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) {
|
||||||
return pmix20_convert_opalrc(rc);
|
return ext20_convert_opalrc(rc);
|
||||||
}
|
|
||||||
if (PMIX_RANK_WILDCARD == p->rank) {
|
|
||||||
proc.vpid = OPAL_VPID_WILDCARD;
|
|
||||||
} else {
|
|
||||||
proc.vpid = p->rank;
|
|
||||||
}
|
}
|
||||||
|
proc.vpid = ext20_convert_rank(p->rank);
|
||||||
|
|
||||||
/* setup the caddy */
|
/* setup the caddy */
|
||||||
opalcaddy = OBJ_NEW(pmix20_opalcaddy_t);
|
opalcaddy = OBJ_NEW(ext20_opalcaddy_t);
|
||||||
opalcaddy->opcbfunc = cbfunc;
|
opalcaddy->opcbfunc = cbfunc;
|
||||||
opalcaddy->cbdata = cbdata;
|
opalcaddy->cbdata = cbdata;
|
||||||
|
|
||||||
@ -408,9 +392,9 @@ static pmix_status_t server_publish_fn(const pmix_proc_t *p,
|
|||||||
oinfo = OBJ_NEW(opal_value_t);
|
oinfo = OBJ_NEW(opal_value_t);
|
||||||
opal_list_append(&opalcaddy->info, &oinfo->super);
|
opal_list_append(&opalcaddy->info, &oinfo->super);
|
||||||
oinfo->key = strdup(info[n].key);
|
oinfo->key = strdup(info[n].key);
|
||||||
if (OPAL_SUCCESS != (rc = pmix20_value_unload(oinfo, &info[n].value))) {
|
if (OPAL_SUCCESS != (rc = ext20_value_unload(oinfo, &info[n].value))) {
|
||||||
OBJ_RELEASE(opalcaddy);
|
OBJ_RELEASE(opalcaddy);
|
||||||
return pmix20_convert_opalrc(rc);
|
return ext20_convert_opalrc(rc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -420,21 +404,21 @@ static pmix_status_t server_publish_fn(const pmix_proc_t *p,
|
|||||||
OBJ_RELEASE(opalcaddy);
|
OBJ_RELEASE(opalcaddy);
|
||||||
}
|
}
|
||||||
|
|
||||||
return pmix20_convert_opalrc(rc);
|
return ext20_convert_opalrc(rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void opal_lkupcbfunc(int status,
|
static void opal_lkupcbfunc(int status,
|
||||||
opal_list_t *data,
|
opal_list_t *data,
|
||||||
void *cbdata)
|
void *cbdata)
|
||||||
{
|
{
|
||||||
pmix20_opalcaddy_t *opalcaddy = (pmix20_opalcaddy_t*)cbdata;
|
ext20_opalcaddy_t *opalcaddy = (ext20_opalcaddy_t*)cbdata;
|
||||||
pmix_status_t rc;
|
pmix_status_t rc;
|
||||||
pmix_pdata_t *d=NULL;
|
pmix_pdata_t *d=NULL;
|
||||||
size_t nd=0, n;
|
size_t nd=0, n;
|
||||||
opal_pmix_pdata_t *p;
|
opal_pmix_pdata_t *p;
|
||||||
|
|
||||||
if (NULL != opalcaddy->lkupcbfunc) {
|
if (NULL != opalcaddy->lkupcbfunc) {
|
||||||
rc = pmix20_convert_opalrc(status);
|
rc = ext20_convert_opalrc(status);
|
||||||
/* convert any returned data */
|
/* convert any returned data */
|
||||||
if (NULL != data) {
|
if (NULL != data) {
|
||||||
nd = opal_list_get_size(data);
|
nd = opal_list_get_size(data);
|
||||||
@ -443,9 +427,9 @@ static void opal_lkupcbfunc(int status,
|
|||||||
OPAL_LIST_FOREACH(p, data, opal_pmix_pdata_t) {
|
OPAL_LIST_FOREACH(p, data, opal_pmix_pdata_t) {
|
||||||
/* convert the jobid */
|
/* convert the jobid */
|
||||||
(void)opal_snprintf_jobid(d[n].proc.nspace, PMIX_MAX_NSLEN, p->proc.jobid);
|
(void)opal_snprintf_jobid(d[n].proc.nspace, PMIX_MAX_NSLEN, p->proc.jobid);
|
||||||
d[n].proc.rank = p->proc.vpid;
|
d[n].proc.rank = ext20_convert_opalrank(p->proc.vpid);
|
||||||
(void)strncpy(d[n].key, p->value.key, PMIX_MAX_KEYLEN);
|
(void)strncpy(d[n].key, p->value.key, PMIX_MAX_KEYLEN);
|
||||||
pmix20_value_load(&d[n].value, &p->value);
|
ext20_value_load(&d[n].value, &p->value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
opalcaddy->lkupcbfunc(rc, d, nd, opalcaddy->cbdata);
|
opalcaddy->lkupcbfunc(rc, d, nd, opalcaddy->cbdata);
|
||||||
@ -458,7 +442,7 @@ static pmix_status_t server_lookup_fn(const pmix_proc_t *p, char **keys,
|
|||||||
pmix_lookup_cbfunc_t cbfunc, void *cbdata)
|
pmix_lookup_cbfunc_t cbfunc, void *cbdata)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
pmix20_opalcaddy_t *opalcaddy;
|
ext20_opalcaddy_t *opalcaddy;
|
||||||
opal_process_name_t proc;
|
opal_process_name_t proc;
|
||||||
opal_value_t *iptr;
|
opal_value_t *iptr;
|
||||||
size_t n;
|
size_t n;
|
||||||
@ -469,16 +453,12 @@ static pmix_status_t server_lookup_fn(const pmix_proc_t *p, char **keys,
|
|||||||
|
|
||||||
/* convert the nspace/rank to an opal_process_name_t */
|
/* convert the nspace/rank to an opal_process_name_t */
|
||||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) {
|
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) {
|
||||||
return pmix20_convert_opalrc(rc);
|
return ext20_convert_opalrc(rc);
|
||||||
}
|
|
||||||
if (PMIX_RANK_WILDCARD == p->rank) {
|
|
||||||
proc.vpid = OPAL_VPID_WILDCARD;
|
|
||||||
} else {
|
|
||||||
proc.vpid = p->rank;
|
|
||||||
}
|
}
|
||||||
|
proc.vpid = ext20_convert_rank(p->rank);
|
||||||
|
|
||||||
/* setup the caddy */
|
/* setup the caddy */
|
||||||
opalcaddy = OBJ_NEW(pmix20_opalcaddy_t);
|
opalcaddy = OBJ_NEW(ext20_opalcaddy_t);
|
||||||
opalcaddy->lkupcbfunc = cbfunc;
|
opalcaddy->lkupcbfunc = cbfunc;
|
||||||
opalcaddy->cbdata = cbdata;
|
opalcaddy->cbdata = cbdata;
|
||||||
|
|
||||||
@ -487,9 +467,9 @@ static pmix_status_t server_lookup_fn(const pmix_proc_t *p, char **keys,
|
|||||||
iptr = OBJ_NEW(opal_value_t);
|
iptr = OBJ_NEW(opal_value_t);
|
||||||
opal_list_append(&opalcaddy->info, &iptr->super);
|
opal_list_append(&opalcaddy->info, &iptr->super);
|
||||||
iptr->key = strdup(info[n].key);
|
iptr->key = strdup(info[n].key);
|
||||||
if (OPAL_SUCCESS != (rc = pmix20_value_unload(iptr, &info[n].value))) {
|
if (OPAL_SUCCESS != (rc = ext20_value_unload(iptr, &info[n].value))) {
|
||||||
OBJ_RELEASE(opalcaddy);
|
OBJ_RELEASE(opalcaddy);
|
||||||
return pmix20_convert_opalrc(rc);
|
return ext20_convert_opalrc(rc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -499,7 +479,7 @@ static pmix_status_t server_lookup_fn(const pmix_proc_t *p, char **keys,
|
|||||||
OBJ_RELEASE(opalcaddy);
|
OBJ_RELEASE(opalcaddy);
|
||||||
}
|
}
|
||||||
|
|
||||||
return pmix20_convert_opalrc(rc);
|
return ext20_convert_opalrc(rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -508,7 +488,7 @@ static pmix_status_t server_unpublish_fn(const pmix_proc_t *p, char **keys,
|
|||||||
pmix_op_cbfunc_t cbfunc, void *cbdata)
|
pmix_op_cbfunc_t cbfunc, void *cbdata)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
pmix20_opalcaddy_t *opalcaddy;
|
ext20_opalcaddy_t *opalcaddy;
|
||||||
opal_process_name_t proc;
|
opal_process_name_t proc;
|
||||||
opal_value_t *iptr;
|
opal_value_t *iptr;
|
||||||
size_t n;
|
size_t n;
|
||||||
@ -519,16 +499,12 @@ static pmix_status_t server_unpublish_fn(const pmix_proc_t *p, char **keys,
|
|||||||
|
|
||||||
/* convert the nspace/rank to an opal_process_name_t */
|
/* convert the nspace/rank to an opal_process_name_t */
|
||||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) {
|
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) {
|
||||||
return pmix20_convert_opalrc(rc);
|
return ext20_convert_opalrc(rc);
|
||||||
}
|
|
||||||
if (PMIX_RANK_WILDCARD == p->rank) {
|
|
||||||
proc.vpid = OPAL_VPID_WILDCARD;
|
|
||||||
} else {
|
|
||||||
proc.vpid = p->rank;
|
|
||||||
}
|
}
|
||||||
|
proc.vpid = ext20_convert_rank(p->rank);
|
||||||
|
|
||||||
/* setup the caddy */
|
/* setup the caddy */
|
||||||
opalcaddy = OBJ_NEW(pmix20_opalcaddy_t);
|
opalcaddy = OBJ_NEW(ext20_opalcaddy_t);
|
||||||
opalcaddy->opcbfunc = cbfunc;
|
opalcaddy->opcbfunc = cbfunc;
|
||||||
opalcaddy->cbdata = cbdata;
|
opalcaddy->cbdata = cbdata;
|
||||||
|
|
||||||
@ -537,9 +513,9 @@ static pmix_status_t server_unpublish_fn(const pmix_proc_t *p, char **keys,
|
|||||||
iptr = OBJ_NEW(opal_value_t);
|
iptr = OBJ_NEW(opal_value_t);
|
||||||
opal_list_append(&opalcaddy->info, &iptr->super);
|
opal_list_append(&opalcaddy->info, &iptr->super);
|
||||||
iptr->key = strdup(info[n].key);
|
iptr->key = strdup(info[n].key);
|
||||||
if (OPAL_SUCCESS != (rc = pmix20_value_unload(iptr, &info[n].value))) {
|
if (OPAL_SUCCESS != (rc = ext20_value_unload(iptr, &info[n].value))) {
|
||||||
OBJ_RELEASE(opalcaddy);
|
OBJ_RELEASE(opalcaddy);
|
||||||
return pmix20_convert_opalrc(rc);
|
return ext20_convert_opalrc(rc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -549,17 +525,17 @@ static pmix_status_t server_unpublish_fn(const pmix_proc_t *p, char **keys,
|
|||||||
OBJ_RELEASE(opalcaddy);
|
OBJ_RELEASE(opalcaddy);
|
||||||
}
|
}
|
||||||
|
|
||||||
return pmix20_convert_opalrc(rc);
|
return ext20_convert_opalrc(rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void opal_spncbfunc(int status, opal_jobid_t jobid, void *cbdata)
|
static void opal_spncbfunc(int status, opal_jobid_t jobid, void *cbdata)
|
||||||
{
|
{
|
||||||
pmix20_opalcaddy_t *opalcaddy = (pmix20_opalcaddy_t*)cbdata;
|
ext20_opalcaddy_t *opalcaddy = (ext20_opalcaddy_t*)cbdata;
|
||||||
pmix_status_t rc;
|
pmix_status_t rc;
|
||||||
char nspace[PMIX_MAX_NSLEN];
|
char nspace[PMIX_MAX_NSLEN];
|
||||||
|
|
||||||
if (NULL != opalcaddy->spwncbfunc) {
|
if (NULL != opalcaddy->spwncbfunc) {
|
||||||
rc = pmix20_convert_opalrc(status);
|
rc = ext20_convert_opalrc(status);
|
||||||
/* convert the jobid */
|
/* convert the jobid */
|
||||||
(void)opal_snprintf_jobid(nspace, PMIX_MAX_NSLEN, jobid);
|
(void)opal_snprintf_jobid(nspace, PMIX_MAX_NSLEN, jobid);
|
||||||
opalcaddy->spwncbfunc(rc, nspace, opalcaddy->cbdata);
|
opalcaddy->spwncbfunc(rc, nspace, opalcaddy->cbdata);
|
||||||
@ -572,7 +548,7 @@ static pmix_status_t server_spawn_fn(const pmix_proc_t *p,
|
|||||||
const pmix_app_t apps[], size_t napps,
|
const pmix_app_t apps[], size_t napps,
|
||||||
pmix_spawn_cbfunc_t cbfunc, void *cbdata)
|
pmix_spawn_cbfunc_t cbfunc, void *cbdata)
|
||||||
{
|
{
|
||||||
pmix20_opalcaddy_t *opalcaddy;
|
ext20_opalcaddy_t *opalcaddy;
|
||||||
opal_process_name_t proc;
|
opal_process_name_t proc;
|
||||||
opal_pmix_app_t *app;
|
opal_pmix_app_t *app;
|
||||||
opal_value_t *oinfo;
|
opal_value_t *oinfo;
|
||||||
@ -585,16 +561,12 @@ static pmix_status_t server_spawn_fn(const pmix_proc_t *p,
|
|||||||
|
|
||||||
/* convert the nspace/rank to an opal_process_name_t */
|
/* convert the nspace/rank to an opal_process_name_t */
|
||||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) {
|
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&proc.jobid, p->nspace))) {
|
||||||
return pmix20_convert_opalrc(rc);
|
return ext20_convert_opalrc(rc);
|
||||||
}
|
|
||||||
if (PMIX_RANK_WILDCARD == p->rank) {
|
|
||||||
proc.vpid = OPAL_VPID_WILDCARD;
|
|
||||||
} else {
|
|
||||||
proc.vpid = p->rank;
|
|
||||||
}
|
}
|
||||||
|
proc.vpid = ext20_convert_rank(p->rank);
|
||||||
|
|
||||||
/* setup the caddy */
|
/* setup the caddy */
|
||||||
opalcaddy = OBJ_NEW(pmix20_opalcaddy_t);
|
opalcaddy = OBJ_NEW(ext20_opalcaddy_t);
|
||||||
opalcaddy->spwncbfunc = cbfunc;
|
opalcaddy->spwncbfunc = cbfunc;
|
||||||
opalcaddy->cbdata = cbdata;
|
opalcaddy->cbdata = cbdata;
|
||||||
|
|
||||||
@ -603,9 +575,9 @@ static pmix_status_t server_spawn_fn(const pmix_proc_t *p,
|
|||||||
oinfo = OBJ_NEW(opal_value_t);
|
oinfo = OBJ_NEW(opal_value_t);
|
||||||
opal_list_append(&opalcaddy->info, &oinfo->super);
|
opal_list_append(&opalcaddy->info, &oinfo->super);
|
||||||
oinfo->key = strdup(job_info[k].key);
|
oinfo->key = strdup(job_info[k].key);
|
||||||
if (OPAL_SUCCESS != (rc = pmix20_value_unload(oinfo, &job_info[k].value))) {
|
if (OPAL_SUCCESS != (rc = ext20_value_unload(oinfo, &job_info[k].value))) {
|
||||||
OBJ_RELEASE(opalcaddy);
|
OBJ_RELEASE(opalcaddy);
|
||||||
return pmix20_convert_opalrc(rc);
|
return ext20_convert_opalrc(rc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -628,9 +600,9 @@ static pmix_status_t server_spawn_fn(const pmix_proc_t *p,
|
|||||||
oinfo = OBJ_NEW(opal_value_t);
|
oinfo = OBJ_NEW(opal_value_t);
|
||||||
opal_list_append(&app->info, &oinfo->super);
|
opal_list_append(&app->info, &oinfo->super);
|
||||||
oinfo->key = strdup(apps[n].info[k].key);
|
oinfo->key = strdup(apps[n].info[k].key);
|
||||||
if (OPAL_SUCCESS != (rc = pmix20_value_unload(oinfo, &apps[n].info[k].value))) {
|
if (OPAL_SUCCESS != (rc = ext20_value_unload(oinfo, &apps[n].info[k].value))) {
|
||||||
OBJ_RELEASE(opalcaddy);
|
OBJ_RELEASE(opalcaddy);
|
||||||
return pmix20_convert_opalrc(rc);
|
return ext20_convert_opalrc(rc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -642,7 +614,7 @@ static pmix_status_t server_spawn_fn(const pmix_proc_t *p,
|
|||||||
OBJ_RELEASE(opalcaddy);
|
OBJ_RELEASE(opalcaddy);
|
||||||
}
|
}
|
||||||
|
|
||||||
return pmix20_convert_opalrc(rc);
|
return ext20_convert_opalrc(rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -651,7 +623,7 @@ static pmix_status_t server_connect_fn(const pmix_proc_t procs[], size_t nprocs,
|
|||||||
pmix_op_cbfunc_t cbfunc, void *cbdata)
|
pmix_op_cbfunc_t cbfunc, void *cbdata)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
pmix20_opalcaddy_t *opalcaddy;
|
ext20_opalcaddy_t *opalcaddy;
|
||||||
opal_namelist_t *nm;
|
opal_namelist_t *nm;
|
||||||
size_t n;
|
size_t n;
|
||||||
opal_value_t *oinfo;
|
opal_value_t *oinfo;
|
||||||
@ -661,7 +633,7 @@ static pmix_status_t server_connect_fn(const pmix_proc_t procs[], size_t nprocs,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* setup the caddy */
|
/* setup the caddy */
|
||||||
opalcaddy = OBJ_NEW(pmix20_opalcaddy_t);
|
opalcaddy = OBJ_NEW(ext20_opalcaddy_t);
|
||||||
opalcaddy->opcbfunc = cbfunc;
|
opalcaddy->opcbfunc = cbfunc;
|
||||||
opalcaddy->cbdata = cbdata;
|
opalcaddy->cbdata = cbdata;
|
||||||
|
|
||||||
@ -671,13 +643,9 @@ static pmix_status_t server_connect_fn(const pmix_proc_t procs[], size_t nprocs,
|
|||||||
opal_list_append(&opalcaddy->procs, &nm->super);
|
opal_list_append(&opalcaddy->procs, &nm->super);
|
||||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&nm->name.jobid, procs[n].nspace))) {
|
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&nm->name.jobid, procs[n].nspace))) {
|
||||||
OBJ_RELEASE(opalcaddy);
|
OBJ_RELEASE(opalcaddy);
|
||||||
return pmix20_convert_opalrc(rc);
|
return ext20_convert_opalrc(rc);
|
||||||
}
|
|
||||||
if (PMIX_RANK_WILDCARD == procs[n].rank) {
|
|
||||||
nm->name.vpid = OPAL_VPID_WILDCARD;
|
|
||||||
} else {
|
|
||||||
nm->name.vpid = procs[n].rank;
|
|
||||||
}
|
}
|
||||||
|
nm->name.vpid = ext20_convert_rank(procs[n].rank);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* convert the info */
|
/* convert the info */
|
||||||
@ -685,9 +653,9 @@ static pmix_status_t server_connect_fn(const pmix_proc_t procs[], size_t nprocs,
|
|||||||
oinfo = OBJ_NEW(opal_value_t);
|
oinfo = OBJ_NEW(opal_value_t);
|
||||||
opal_list_append(&opalcaddy->info, &oinfo->super);
|
opal_list_append(&opalcaddy->info, &oinfo->super);
|
||||||
oinfo->key = strdup(info[n].key);
|
oinfo->key = strdup(info[n].key);
|
||||||
if (OPAL_SUCCESS != (rc = pmix20_value_unload(oinfo, &info[n].value))) {
|
if (OPAL_SUCCESS != (rc = ext20_value_unload(oinfo, &info[n].value))) {
|
||||||
OBJ_RELEASE(opalcaddy);
|
OBJ_RELEASE(opalcaddy);
|
||||||
return pmix20_convert_opalrc(rc);
|
return ext20_convert_opalrc(rc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -697,7 +665,7 @@ static pmix_status_t server_connect_fn(const pmix_proc_t procs[], size_t nprocs,
|
|||||||
OBJ_RELEASE(opalcaddy);
|
OBJ_RELEASE(opalcaddy);
|
||||||
}
|
}
|
||||||
|
|
||||||
return pmix20_convert_opalrc(rc);
|
return ext20_convert_opalrc(rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -706,7 +674,7 @@ static pmix_status_t server_disconnect_fn(const pmix_proc_t procs[], size_t npro
|
|||||||
pmix_op_cbfunc_t cbfunc, void *cbdata)
|
pmix_op_cbfunc_t cbfunc, void *cbdata)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
pmix20_opalcaddy_t *opalcaddy;
|
ext20_opalcaddy_t *opalcaddy;
|
||||||
opal_namelist_t *nm;
|
opal_namelist_t *nm;
|
||||||
size_t n;
|
size_t n;
|
||||||
opal_value_t *oinfo;
|
opal_value_t *oinfo;
|
||||||
@ -716,7 +684,7 @@ static pmix_status_t server_disconnect_fn(const pmix_proc_t procs[], size_t npro
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* setup the caddy */
|
/* setup the caddy */
|
||||||
opalcaddy = OBJ_NEW(pmix20_opalcaddy_t);
|
opalcaddy = OBJ_NEW(ext20_opalcaddy_t);
|
||||||
opalcaddy->opcbfunc = cbfunc;
|
opalcaddy->opcbfunc = cbfunc;
|
||||||
opalcaddy->cbdata = cbdata;
|
opalcaddy->cbdata = cbdata;
|
||||||
|
|
||||||
@ -726,13 +694,9 @@ static pmix_status_t server_disconnect_fn(const pmix_proc_t procs[], size_t npro
|
|||||||
opal_list_append(&opalcaddy->procs, &nm->super);
|
opal_list_append(&opalcaddy->procs, &nm->super);
|
||||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&nm->name.jobid, procs[n].nspace))) {
|
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&nm->name.jobid, procs[n].nspace))) {
|
||||||
OBJ_RELEASE(opalcaddy);
|
OBJ_RELEASE(opalcaddy);
|
||||||
return pmix20_convert_opalrc(rc);
|
return ext20_convert_opalrc(rc);
|
||||||
}
|
|
||||||
if (PMIX_RANK_WILDCARD == procs[n].rank) {
|
|
||||||
nm->name.vpid = OPAL_VPID_WILDCARD;
|
|
||||||
} else {
|
|
||||||
nm->name.vpid = procs[n].rank;
|
|
||||||
}
|
}
|
||||||
|
nm->name.vpid = ext20_convert_rank(procs[n].rank);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* convert the info */
|
/* convert the info */
|
||||||
@ -740,9 +704,9 @@ static pmix_status_t server_disconnect_fn(const pmix_proc_t procs[], size_t npro
|
|||||||
oinfo = OBJ_NEW(opal_value_t);
|
oinfo = OBJ_NEW(opal_value_t);
|
||||||
opal_list_append(&opalcaddy->info, &oinfo->super);
|
opal_list_append(&opalcaddy->info, &oinfo->super);
|
||||||
oinfo->key = strdup(info[n].key);
|
oinfo->key = strdup(info[n].key);
|
||||||
if (OPAL_SUCCESS != (rc = pmix20_value_unload(oinfo, &info[n].value))) {
|
if (OPAL_SUCCESS != (rc = ext20_value_unload(oinfo, &info[n].value))) {
|
||||||
OBJ_RELEASE(opalcaddy);
|
OBJ_RELEASE(opalcaddy);
|
||||||
return pmix20_convert_opalrc(rc);
|
return ext20_convert_opalrc(rc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -752,20 +716,20 @@ static pmix_status_t server_disconnect_fn(const pmix_proc_t procs[], size_t npro
|
|||||||
OBJ_RELEASE(opalcaddy);
|
OBJ_RELEASE(opalcaddy);
|
||||||
}
|
}
|
||||||
|
|
||||||
return pmix20_convert_opalrc(rc);
|
return ext20_convert_opalrc(rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static pmix_status_t server_register_events(pmix_status_t *codes, size_t ncodes,
|
static pmix_status_t server_register_events(pmix_status_t *codes, size_t ncodes,
|
||||||
const pmix_info_t info[], size_t ninfo,
|
const pmix_info_t info[], size_t ninfo,
|
||||||
pmix_op_cbfunc_t cbfunc, void *cbdata)
|
pmix_op_cbfunc_t cbfunc, void *cbdata)
|
||||||
{
|
{
|
||||||
pmix20_opalcaddy_t *opalcaddy;
|
ext20_opalcaddy_t *opalcaddy;
|
||||||
size_t n;
|
size_t n;
|
||||||
opal_value_t *oinfo;
|
opal_value_t *oinfo;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
/* setup the caddy */
|
/* setup the caddy */
|
||||||
opalcaddy = OBJ_NEW(pmix20_opalcaddy_t);
|
opalcaddy = OBJ_NEW(ext20_opalcaddy_t);
|
||||||
opalcaddy->opcbfunc = cbfunc;
|
opalcaddy->opcbfunc = cbfunc;
|
||||||
opalcaddy->cbdata = cbdata;
|
opalcaddy->cbdata = cbdata;
|
||||||
|
|
||||||
@ -774,9 +738,9 @@ static pmix_status_t server_register_events(pmix_status_t *codes, size_t ncodes,
|
|||||||
oinfo = OBJ_NEW(opal_value_t);
|
oinfo = OBJ_NEW(opal_value_t);
|
||||||
opal_list_append(&opalcaddy->info, &oinfo->super);
|
opal_list_append(&opalcaddy->info, &oinfo->super);
|
||||||
oinfo->key = strdup(info[n].key);
|
oinfo->key = strdup(info[n].key);
|
||||||
if (OPAL_SUCCESS != (rc = pmix20_value_unload(oinfo, &info[n].value))) {
|
if (OPAL_SUCCESS != (rc = ext20_value_unload(oinfo, &info[n].value))) {
|
||||||
OBJ_RELEASE(opalcaddy);
|
OBJ_RELEASE(opalcaddy);
|
||||||
return pmix20_convert_opalrc(rc);
|
return ext20_convert_opalrc(rc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -786,7 +750,7 @@ static pmix_status_t server_register_events(pmix_status_t *codes, size_t ncodes,
|
|||||||
OBJ_RELEASE(opalcaddy);
|
OBJ_RELEASE(opalcaddy);
|
||||||
}
|
}
|
||||||
|
|
||||||
return pmix20_convert_opalrc(rc);
|
return ext20_convert_opalrc(rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static pmix_status_t server_deregister_events(pmix_status_t *codes, size_t ncodes,
|
static pmix_status_t server_deregister_events(pmix_status_t *codes, size_t ncodes,
|
||||||
@ -804,10 +768,9 @@ static pmix_status_t server_notify_event(pmix_status_t code,
|
|||||||
return PMIX_ERR_NOT_SUPPORTED;
|
return PMIX_ERR_NOT_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAVE_PMIX_QUERY_FUNCTION
|
|
||||||
static void _info_rel(void *cbdata)
|
static void _info_rel(void *cbdata)
|
||||||
{
|
{
|
||||||
pmix20_opcaddy_t *pcaddy = (pmix20_opcaddy_t*)cbdata;
|
ext20_opcaddy_t *pcaddy = (ext20_opcaddy_t*)cbdata;
|
||||||
|
|
||||||
OBJ_RELEASE(pcaddy);
|
OBJ_RELEASE(pcaddy);
|
||||||
}
|
}
|
||||||
@ -817,15 +780,15 @@ static void info_cbfunc(int status,
|
|||||||
opal_pmix_release_cbfunc_t release_fn,
|
opal_pmix_release_cbfunc_t release_fn,
|
||||||
void *release_cbdata)
|
void *release_cbdata)
|
||||||
{
|
{
|
||||||
pmix20_opalcaddy_t *opalcaddy = (pmix20_opalcaddy_t*)cbdata;
|
ext20_opalcaddy_t *opalcaddy = (ext20_opalcaddy_t*)cbdata;
|
||||||
pmix20_opcaddy_t *pcaddy;
|
ext20_opcaddy_t *pcaddy;
|
||||||
opal_value_t *kv;
|
opal_value_t *kv;
|
||||||
size_t n;
|
size_t n;
|
||||||
|
|
||||||
pcaddy = OBJ_NEW(pmix20_opcaddy_t);
|
pcaddy = OBJ_NEW(ext20_opcaddy_t);
|
||||||
|
|
||||||
/* convert the status */
|
/* convert the status */
|
||||||
pcaddy->status = pmix20_convert_opalrc(status);
|
pcaddy->status = ext20_convert_opalrc(status);
|
||||||
|
|
||||||
/* convert the list to a pmix_info_t array */
|
/* convert the list to a pmix_info_t array */
|
||||||
if (NULL != info) {
|
if (NULL != info) {
|
||||||
@ -835,7 +798,7 @@ static void info_cbfunc(int status,
|
|||||||
n = 0;
|
n = 0;
|
||||||
OPAL_LIST_FOREACH(kv, info, opal_value_t) {
|
OPAL_LIST_FOREACH(kv, info, opal_value_t) {
|
||||||
(void)strncpy(pcaddy->info[n].key, kv->key, PMIX_MAX_KEYLEN);
|
(void)strncpy(pcaddy->info[n].key, kv->key, PMIX_MAX_KEYLEN);
|
||||||
pmix20_value_load(&pcaddy->info[n].value, kv);
|
ext20_value_load(&pcaddy->info[n].value, kv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -853,15 +816,15 @@ static void info_cbfunc(int status,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static pmix_status_t server_query(pmix_proc_t *proct,
|
static pmix_status_t server_query(pmix_proc_t *proct,
|
||||||
pmix_info_t *info, size_t ninfo,
|
pmix_query_t *queries, size_t nqueries,
|
||||||
pmix_info_t *directives, size_t ndirs,
|
|
||||||
pmix_info_cbfunc_t cbfunc,
|
pmix_info_cbfunc_t cbfunc,
|
||||||
void *cbdata)
|
void *cbdata)
|
||||||
{
|
{
|
||||||
pmix20_opalcaddy_t *opalcaddy;
|
ext20_opalcaddy_t *opalcaddy;
|
||||||
opal_process_name_t requestor;
|
opal_process_name_t requestor;
|
||||||
int rc;
|
int rc;
|
||||||
size_t n;
|
size_t n, m;
|
||||||
|
opal_pmix_query_t *q;
|
||||||
opal_value_t *oinfo;
|
opal_value_t *oinfo;
|
||||||
|
|
||||||
if (NULL == host_module || NULL == host_module->query) {
|
if (NULL == host_module || NULL == host_module->query) {
|
||||||
@ -869,55 +832,60 @@ static pmix_status_t server_query(pmix_proc_t *proct,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* setup the caddy */
|
/* setup the caddy */
|
||||||
opalcaddy = OBJ_NEW(pmix20_opalcaddy_t);
|
opalcaddy = OBJ_NEW(ext20_opalcaddy_t);
|
||||||
opalcaddy->infocbfunc = cbfunc;
|
opalcaddy->infocbfunc = cbfunc;
|
||||||
opalcaddy->cbdata = cbdata;
|
opalcaddy->cbdata = cbdata;
|
||||||
|
|
||||||
/* convert the requestor */
|
/* convert the requestor */
|
||||||
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&requestor.jobid, proct->nspace))) {
|
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&requestor.jobid, proct->nspace))) {
|
||||||
|
opal_output(0, "FILE: %s LINE %d", __FILE__, __LINE__);
|
||||||
OBJ_RELEASE(opalcaddy);
|
OBJ_RELEASE(opalcaddy);
|
||||||
return pmix20_convert_opalrc(rc);
|
return ext20_convert_opalrc(rc);
|
||||||
}
|
}
|
||||||
requestor.vpid = proct->rank;
|
requestor.vpid = ext20_convert_rank(proct->rank);
|
||||||
|
|
||||||
/* convert the info */
|
/* convert the queries */
|
||||||
for (n=0; n < ninfo; n++) {
|
for (n=0; n < nqueries; n++) {
|
||||||
|
q = OBJ_NEW(opal_pmix_query_t);
|
||||||
|
/* 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, &q->super);
|
||||||
|
q->keys = opal_argv_copy(queries[n].keys);
|
||||||
|
for (m=0; m < queries[n].nqual; m++) {
|
||||||
oinfo = OBJ_NEW(opal_value_t);
|
oinfo = OBJ_NEW(opal_value_t);
|
||||||
opal_list_append(&opalcaddy->info, &oinfo->super);
|
opal_list_append(&q->qualifiers, &oinfo->super);
|
||||||
oinfo->key = strdup(info[n].key);
|
oinfo->key = strdup(queries[n].qualifiers[m].key);
|
||||||
if (OPAL_SUCCESS != (rc = pmix20_value_unload(oinfo, &info[n].value))) {
|
if (OPAL_SUCCESS != (rc = ext20_value_unload(oinfo, &queries[n].qualifiers[m].value))) {
|
||||||
OBJ_RELEASE(opalcaddy);
|
OBJ_RELEASE(opalcaddy);
|
||||||
return pmix20_convert_opalrc(rc);
|
return ext20_convert_opalrc(rc);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* we ignore directives for now */
|
|
||||||
|
|
||||||
/* pass the call upwards */
|
/* pass the call upwards */
|
||||||
if (OPAL_SUCCESS != (rc = host_module->query(&requestor,
|
if (OPAL_SUCCESS != (rc = host_module->query(&requestor,
|
||||||
&opalcaddy->info, NULL,
|
&opalcaddy->info,
|
||||||
info_cbfunc, opalcaddy))) {
|
info_cbfunc, opalcaddy))) {
|
||||||
OBJ_RELEASE(opalcaddy);
|
OBJ_RELEASE(opalcaddy);
|
||||||
}
|
}
|
||||||
|
|
||||||
return pmix20_convert_opalrc(rc);
|
return ext20_convert_opalrc(rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void toolcbfunc(int status,
|
static void toolcbfunc(int status,
|
||||||
opal_process_name_t proc,
|
opal_process_name_t proc,
|
||||||
void *cbdata)
|
void *cbdata)
|
||||||
{
|
{
|
||||||
pmix20_opalcaddy_t *opalcaddy = (pmix20_opalcaddy_t*)cbdata;
|
ext20_opalcaddy_t *opalcaddy = (ext20_opalcaddy_t*)cbdata;
|
||||||
pmix_status_t rc;
|
pmix_status_t rc;
|
||||||
pmix_proc_t p;
|
pmix_proc_t p;
|
||||||
|
|
||||||
|
|
||||||
/* convert the status */
|
/* convert the status */
|
||||||
rc = pmix20_convert_opalrc(status);
|
rc = ext20_convert_opalrc(status);
|
||||||
|
|
||||||
/* convert the process name */
|
/* convert the process name */
|
||||||
(void)opal_snprintf_jobid(p.nspace, PMIX_MAX_NSLEN, proc.jobid);
|
(void)opal_snprintf_jobid(p.nspace, PMIX_MAX_NSLEN, proc.jobid);
|
||||||
p.rank = proc.vpid;
|
p.rank = ext20_convert_opalrank(proc.vpid);
|
||||||
|
|
||||||
/* pass it down */
|
/* pass it down */
|
||||||
if (NULL != opalcaddy->toolcbfunc) {
|
if (NULL != opalcaddy->toolcbfunc) {
|
||||||
@ -930,14 +898,14 @@ static void server_tool_connection(pmix_info_t *info, size_t ninfo,
|
|||||||
pmix_tool_connection_cbfunc_t cbfunc,
|
pmix_tool_connection_cbfunc_t cbfunc,
|
||||||
void *cbdata)
|
void *cbdata)
|
||||||
{
|
{
|
||||||
pmix20_opalcaddy_t *opalcaddy;
|
ext20_opalcaddy_t *opalcaddy;
|
||||||
size_t n;
|
size_t n;
|
||||||
opal_value_t *oinfo;
|
opal_value_t *oinfo;
|
||||||
int rc;
|
int rc;
|
||||||
pmix_status_t err;
|
pmix_status_t err;
|
||||||
|
|
||||||
/* setup the caddy */
|
/* setup the caddy */
|
||||||
opalcaddy = OBJ_NEW(pmix20_opalcaddy_t);
|
opalcaddy = OBJ_NEW(ext20_opalcaddy_t);
|
||||||
opalcaddy->toolcbfunc = cbfunc;
|
opalcaddy->toolcbfunc = cbfunc;
|
||||||
opalcaddy->cbdata = cbdata;
|
opalcaddy->cbdata = cbdata;
|
||||||
|
|
||||||
@ -946,9 +914,9 @@ static void server_tool_connection(pmix_info_t *info, size_t ninfo,
|
|||||||
oinfo = OBJ_NEW(opal_value_t);
|
oinfo = OBJ_NEW(opal_value_t);
|
||||||
opal_list_append(&opalcaddy->info, &oinfo->super);
|
opal_list_append(&opalcaddy->info, &oinfo->super);
|
||||||
oinfo->key = strdup(info[n].key);
|
oinfo->key = strdup(info[n].key);
|
||||||
if (OPAL_SUCCESS != (rc = pmix20_value_unload(oinfo, &info[n].value))) {
|
if (OPAL_SUCCESS != (rc = ext20_value_unload(oinfo, &info[n].value))) {
|
||||||
OBJ_RELEASE(opalcaddy);
|
OBJ_RELEASE(opalcaddy);
|
||||||
err = pmix20_convert_opalrc(rc);
|
err = ext20_convert_opalrc(rc);
|
||||||
if (NULL != cbfunc) {
|
if (NULL != cbfunc) {
|
||||||
cbfunc(err, NULL, cbdata);
|
cbfunc(err, NULL, cbdata);
|
||||||
}
|
}
|
||||||
@ -958,4 +926,78 @@ static void server_tool_connection(pmix_info_t *info, size_t ninfo,
|
|||||||
/* pass it up */
|
/* pass it up */
|
||||||
host_module->tool_connected(&opalcaddy->info, toolcbfunc, opalcaddy);
|
host_module->tool_connected(&opalcaddy->info, toolcbfunc, opalcaddy);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
static void server_log(const pmix_proc_t *proct,
|
||||||
|
const pmix_info_t data[], size_t ndata,
|
||||||
|
const pmix_info_t directives[], size_t ndirs,
|
||||||
|
pmix_op_cbfunc_t cbfunc, void *cbdata)
|
||||||
|
{
|
||||||
|
ext20_opalcaddy_t *opalcaddy;
|
||||||
|
opal_process_name_t requestor;
|
||||||
|
int rc;
|
||||||
|
size_t n;
|
||||||
|
opal_value_t *oinfo;
|
||||||
|
pmix_status_t ret;
|
||||||
|
|
||||||
|
if (NULL == host_module || NULL == host_module->log) {
|
||||||
|
if (NULL != cbfunc) {
|
||||||
|
cbfunc(PMIX_ERR_NOT_SUPPORTED, cbdata);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* setup the caddy */
|
||||||
|
opalcaddy = OBJ_NEW(ext20_opalcaddy_t);
|
||||||
|
opalcaddy->opcbfunc = cbfunc;
|
||||||
|
opalcaddy->cbdata = cbdata;
|
||||||
|
|
||||||
|
/* convert the requestor */
|
||||||
|
if (OPAL_SUCCESS != (rc = opal_convert_string_to_jobid(&requestor.jobid, proct->nspace))) {
|
||||||
|
opal_output(0, "FILE: %s LINE %d", __FILE__, __LINE__);
|
||||||
|
OBJ_RELEASE(opalcaddy);
|
||||||
|
ret = ext20_convert_opalrc(rc);
|
||||||
|
if (NULL != cbfunc) {
|
||||||
|
cbfunc(ret, cbdata);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
requestor.vpid = ext20_convert_rank(proct->rank);
|
||||||
|
|
||||||
|
/* convert the data */
|
||||||
|
for (n=0; n < ndata; n++) {
|
||||||
|
oinfo = OBJ_NEW(opal_value_t);
|
||||||
|
/* 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 = ext20_value_unload(oinfo, &data[n].value))) {
|
||||||
|
OBJ_RELEASE(opalcaddy);
|
||||||
|
ret = ext20_convert_opalrc(rc);
|
||||||
|
if (NULL != cbfunc) {
|
||||||
|
cbfunc(ret, cbdata);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* convert the directives */
|
||||||
|
for (n=0; n < ndirs; n++) {
|
||||||
|
oinfo = OBJ_NEW(opal_value_t);
|
||||||
|
/* 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 = ext20_value_unload(oinfo, &directives[n].value))) {
|
||||||
|
OBJ_RELEASE(opalcaddy);
|
||||||
|
ret = ext20_convert_opalrc(rc);
|
||||||
|
if (NULL != cbfunc) {
|
||||||
|
cbfunc(ret, cbdata);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* pass the call upwards */
|
||||||
|
host_module->log(&requestor,
|
||||||
|
&opalcaddy->info,
|
||||||
|
&opalcaddy->apps,
|
||||||
|
opal_opcbfunc, opalcaddy);
|
||||||
|
}
|
||||||
|
@ -71,7 +71,7 @@ static void errreg_cbfunc (pmix_status_t status,
|
|||||||
*active = false;
|
*active = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int pmix20_server_init(opal_pmix_server_module_t *module,
|
int ext20_server_init(opal_pmix_server_module_t *module,
|
||||||
opal_list_t *info)
|
opal_list_t *info)
|
||||||
{
|
{
|
||||||
pmix_status_t rc;
|
pmix_status_t rc;
|
||||||
@ -93,7 +93,7 @@ int pmix20_server_init(opal_pmix_server_module_t *module,
|
|||||||
n = 0;
|
n = 0;
|
||||||
OPAL_LIST_FOREACH(kv, info, opal_value_t) {
|
OPAL_LIST_FOREACH(kv, info, opal_value_t) {
|
||||||
(void)strncpy(pinfo[n].key, kv->key, PMIX_MAX_KEYLEN);
|
(void)strncpy(pinfo[n].key, kv->key, PMIX_MAX_KEYLEN);
|
||||||
pmix20_value_load(&pinfo[n].value, kv);
|
ext20_value_load(&pinfo[n].value, kv);
|
||||||
++n;
|
++n;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -103,7 +103,7 @@ int pmix20_server_init(opal_pmix_server_module_t *module,
|
|||||||
|
|
||||||
if (PMIX_SUCCESS != (rc = PMIx_server_init(&mymodule, pinfo, sz))) {
|
if (PMIX_SUCCESS != (rc = PMIx_server_init(&mymodule, pinfo, sz))) {
|
||||||
PMIX_INFO_FREE(pinfo, sz);
|
PMIX_INFO_FREE(pinfo, sz);
|
||||||
return pmix20_convert_rc(rc);
|
return ext20_convert_rc(rc);
|
||||||
}
|
}
|
||||||
PMIX_INFO_FREE(pinfo, sz);
|
PMIX_INFO_FREE(pinfo, sz);
|
||||||
|
|
||||||
@ -112,7 +112,7 @@ int pmix20_server_init(opal_pmix_server_module_t *module,
|
|||||||
|
|
||||||
/* register the default event handler */
|
/* register the default event handler */
|
||||||
active = true;
|
active = true;
|
||||||
PMIx_Register_event_handler(NULL, 0, NULL, 0, pmix20_event_hdlr, errreg_cbfunc, (void*)&active);
|
PMIx_Register_event_handler(NULL, 0, NULL, 0, ext20_event_hdlr, errreg_cbfunc, (void*)&active);
|
||||||
PMIX_WAIT_FOR_COMPLETION(active);
|
PMIX_WAIT_FOR_COMPLETION(active);
|
||||||
|
|
||||||
return OPAL_SUCCESS;
|
return OPAL_SUCCESS;
|
||||||
@ -124,7 +124,7 @@ static void fincb(pmix_status_t status, void *cbdata)
|
|||||||
*active = false;
|
*active = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int pmix20_server_finalize(void)
|
int ext20_server_finalize(void)
|
||||||
{
|
{
|
||||||
pmix_status_t rc;
|
pmix_status_t rc;
|
||||||
volatile bool active;
|
volatile bool active;
|
||||||
@ -135,32 +135,32 @@ int pmix20_server_finalize(void)
|
|||||||
PMIX_WAIT_FOR_COMPLETION(active);
|
PMIX_WAIT_FOR_COMPLETION(active);
|
||||||
|
|
||||||
rc = PMIx_server_finalize();
|
rc = PMIx_server_finalize();
|
||||||
return pmix20_convert_rc(rc);
|
return ext20_convert_rc(rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
int pmix20_server_gen_regex(const char *input, char **regex)
|
int ext20_server_gen_regex(const char *input, char **regex)
|
||||||
{
|
{
|
||||||
pmix_status_t rc;
|
pmix_status_t rc;
|
||||||
|
|
||||||
rc = PMIx_generate_regex(input, regex);
|
rc = PMIx_generate_regex(input, regex);
|
||||||
return pmix20_convert_rc(rc);
|
return ext20_convert_rc(rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int pmix20_server_gen_ppn(const char *input, char **ppn)
|
int ext20_server_gen_ppn(const char *input, char **ppn)
|
||||||
{
|
{
|
||||||
pmix_status_t rc;
|
pmix_status_t rc;
|
||||||
|
|
||||||
rc = PMIx_generate_ppn(input, ppn);
|
rc = PMIx_generate_ppn(input, ppn);
|
||||||
return pmix20_convert_rc(rc);
|
return ext20_convert_rc(rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void opcbfunc(pmix_status_t status, void *cbdata)
|
static void opcbfunc(pmix_status_t status, void *cbdata)
|
||||||
{
|
{
|
||||||
pmix20_opcaddy_t *op = (pmix20_opcaddy_t*)cbdata;
|
ext20_opcaddy_t *op = (ext20_opcaddy_t*)cbdata;
|
||||||
|
|
||||||
if (NULL != op->opcbfunc) {
|
if (NULL != op->opcbfunc) {
|
||||||
op->opcbfunc(pmix20_convert_rc(status), op->cbdata);
|
op->opcbfunc(ext20_convert_rc(status), op->cbdata);
|
||||||
}
|
}
|
||||||
if (op->active) {
|
if (op->active) {
|
||||||
op->status = status;
|
op->status = status;
|
||||||
@ -172,15 +172,15 @@ static void opcbfunc(pmix_status_t status, void *cbdata)
|
|||||||
|
|
||||||
static void _reg_nspace(int sd, short args, void *cbdata)
|
static void _reg_nspace(int sd, short args, void *cbdata)
|
||||||
{
|
{
|
||||||
pmix20_threadshift_t *cd = (pmix20_threadshift_t*)cbdata;
|
ext20_threadshift_t *cd = (ext20_threadshift_t*)cbdata;
|
||||||
opal_value_t *kv, *k2;
|
opal_value_t *kv, *k2;
|
||||||
pmix_info_t *pinfo = NULL, *pmap;
|
pmix_info_t *pinfo = NULL, *pmap;
|
||||||
size_t sz, szmap, m, n;
|
size_t sz, szmap, m, n;
|
||||||
char nspace[PMIX_MAX_NSLEN];
|
char nspace[PMIX_MAX_NSLEN];
|
||||||
pmix_status_t rc;
|
pmix_status_t rc;
|
||||||
opal_list_t *pmapinfo;
|
opal_list_t *pmapinfo;
|
||||||
opal_pmix20_jobid_trkr_t *job;
|
opal_ext20_jobid_trkr_t *job;
|
||||||
pmix20_opcaddy_t op;
|
ext20_opcaddy_t op;
|
||||||
|
|
||||||
/* we must threadshift this request as we might not be in an event
|
/* we must threadshift this request as we might not be in an event
|
||||||
* and we are going to access framework-global lists/objects */
|
* and we are going to access framework-global lists/objects */
|
||||||
@ -189,7 +189,7 @@ static void _reg_nspace(int sd, short args, void *cbdata)
|
|||||||
(void)opal_snprintf_jobid(nspace, PMIX_MAX_NSLEN, cd->jobid);
|
(void)opal_snprintf_jobid(nspace, PMIX_MAX_NSLEN, cd->jobid);
|
||||||
|
|
||||||
/* store this job in our list of known nspaces */
|
/* store this job in our list of known nspaces */
|
||||||
job = OBJ_NEW(opal_pmix20_jobid_trkr_t);
|
job = OBJ_NEW(opal_ext20_jobid_trkr_t);
|
||||||
(void)strncpy(job->nspace, nspace, PMIX_MAX_NSLEN);
|
(void)strncpy(job->nspace, nspace, PMIX_MAX_NSLEN);
|
||||||
job->jobid = cd->jobid;
|
job->jobid = cd->jobid;
|
||||||
opal_list_append(&mca_pmix_ext20_component.jobids, &job->super);
|
opal_list_append(&mca_pmix_ext20_component.jobids, &job->super);
|
||||||
@ -202,22 +202,23 @@ static void _reg_nspace(int sd, short args, void *cbdata)
|
|||||||
OPAL_LIST_FOREACH(kv, cd->info, opal_value_t) {
|
OPAL_LIST_FOREACH(kv, cd->info, opal_value_t) {
|
||||||
(void)strncpy(pinfo[n].key, kv->key, PMIX_MAX_KEYLEN);
|
(void)strncpy(pinfo[n].key, kv->key, PMIX_MAX_KEYLEN);
|
||||||
if (0 == strcmp(kv->key, OPAL_PMIX_PROC_DATA)) {
|
if (0 == strcmp(kv->key, OPAL_PMIX_PROC_DATA)) {
|
||||||
pinfo[n].value.type = PMIX_INFO_ARRAY;
|
pinfo[n].value.type = PMIX_DATA_ARRAY;
|
||||||
/* the value contains a list of values - convert
|
/* the value contains a list of values - convert
|
||||||
* that list to another array */
|
* that list to another array */
|
||||||
pmapinfo = (opal_list_t*)kv->data.ptr;
|
pmapinfo = (opal_list_t*)kv->data.ptr;
|
||||||
szmap = opal_list_get_size(pmapinfo);
|
szmap = opal_list_get_size(pmapinfo);
|
||||||
PMIX_INFO_CREATE(pmap, szmap);
|
PMIX_INFO_CREATE(pmap, szmap);
|
||||||
pinfo[n].value.data.array.array = (struct pmix_info_t*)pmap;
|
pinfo[n].value.data.darray.type = PMIX_INFO;
|
||||||
pinfo[n].value.data.array.size = szmap;
|
pinfo[n].value.data.darray.array = (struct pmix_info_t*)pmap;
|
||||||
|
pinfo[n].value.data.darray.size = szmap;
|
||||||
m = 0;
|
m = 0;
|
||||||
OPAL_LIST_FOREACH(k2, pmapinfo, opal_value_t) {
|
OPAL_LIST_FOREACH(k2, pmapinfo, opal_value_t) {
|
||||||
(void)strncpy(pmap[m].key, k2->key, PMIX_MAX_KEYLEN);
|
(void)strncpy(pmap[m].key, k2->key, PMIX_MAX_KEYLEN);
|
||||||
pmix20_value_load(&pmap[m].value, k2);
|
ext20_value_load(&pmap[m].value, k2);
|
||||||
++m;
|
++m;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
pmix20_value_load(&pinfo[n].value, kv);
|
ext20_value_load(&pinfo[n].value, kv);
|
||||||
}
|
}
|
||||||
++n;
|
++n;
|
||||||
}
|
}
|
||||||
@ -226,7 +227,7 @@ static void _reg_nspace(int sd, short args, void *cbdata)
|
|||||||
pinfo = NULL;
|
pinfo = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
OBJ_CONSTRUCT(&op, pmix20_opcaddy_t);
|
OBJ_CONSTRUCT(&op, ext20_opcaddy_t);
|
||||||
op.active = true;
|
op.active = true;
|
||||||
rc = PMIx_server_register_nspace(nspace, cd->status, pinfo, sz,
|
rc = PMIx_server_register_nspace(nspace, cd->status, pinfo, sz,
|
||||||
opcbfunc, (void*)&op);
|
opcbfunc, (void*)&op);
|
||||||
@ -237,7 +238,7 @@ static void _reg_nspace(int sd, short args, void *cbdata)
|
|||||||
}
|
}
|
||||||
/* ensure we execute the cbfunc so the caller doesn't hang */
|
/* ensure we execute the cbfunc so the caller doesn't hang */
|
||||||
if (NULL != cd->opcbfunc) {
|
if (NULL != cd->opcbfunc) {
|
||||||
cd->opcbfunc(pmix20_convert_rc(op.status), cd->cbdata);
|
cd->opcbfunc(ext20_convert_rc(op.status), cd->cbdata);
|
||||||
}
|
}
|
||||||
if (NULL != pinfo) {
|
if (NULL != pinfo) {
|
||||||
PMIX_INFO_FREE(pinfo, sz);
|
PMIX_INFO_FREE(pinfo, sz);
|
||||||
@ -246,17 +247,17 @@ static void _reg_nspace(int sd, short args, void *cbdata)
|
|||||||
OBJ_RELEASE(cd);
|
OBJ_RELEASE(cd);
|
||||||
}
|
}
|
||||||
|
|
||||||
int pmix20_server_register_nspace(opal_jobid_t jobid,
|
int ext20_server_register_nspace(opal_jobid_t jobid,
|
||||||
int nlocalprocs,
|
int nlocalprocs,
|
||||||
opal_list_t *info,
|
opal_list_t *info,
|
||||||
opal_pmix_op_cbfunc_t cbfunc,
|
opal_pmix_op_cbfunc_t cbfunc,
|
||||||
void *cbdata)
|
void *cbdata)
|
||||||
{
|
{
|
||||||
pmix20_threadshift_t *cd;
|
ext20_threadshift_t *cd;
|
||||||
|
|
||||||
/* we must threadshift this request as it touches
|
/* we must threadshift this request as it touches
|
||||||
* shared lists of objects */
|
* shared lists of objects */
|
||||||
cd = OBJ_NEW(pmix20_threadshift_t);
|
cd = OBJ_NEW(ext20_threadshift_t);
|
||||||
cd->jobid = jobid;
|
cd->jobid = jobid;
|
||||||
cd->status = nlocalprocs;
|
cd->status = nlocalprocs;
|
||||||
cd->info = info;
|
cd->info = info;
|
||||||
@ -277,10 +278,10 @@ int pmix20_server_register_nspace(opal_jobid_t jobid,
|
|||||||
|
|
||||||
static void tdcbfunc(pmix_status_t status, void *cbdata)
|
static void tdcbfunc(pmix_status_t status, void *cbdata)
|
||||||
{
|
{
|
||||||
pmix20_threadshift_t *cd = (pmix20_threadshift_t*)cbdata;
|
ext20_threadshift_t *cd = (ext20_threadshift_t*)cbdata;
|
||||||
|
|
||||||
if (NULL != cd->opcbfunc) {
|
if (NULL != cd->opcbfunc) {
|
||||||
cd->opcbfunc(pmix20_convert_rc(status), cd->cbdata);
|
cd->opcbfunc(ext20_convert_rc(status), cd->cbdata);
|
||||||
}
|
}
|
||||||
if (cd->active) {
|
if (cd->active) {
|
||||||
cd->active = false;
|
cd->active = false;
|
||||||
@ -291,11 +292,11 @@ static void tdcbfunc(pmix_status_t status, void *cbdata)
|
|||||||
|
|
||||||
static void _dereg_nspace(int sd, short args, void *cbdata)
|
static void _dereg_nspace(int sd, short args, void *cbdata)
|
||||||
{
|
{
|
||||||
pmix20_threadshift_t *cd = (pmix20_threadshift_t*)cbdata;
|
ext20_threadshift_t *cd = (ext20_threadshift_t*)cbdata;
|
||||||
opal_pmix20_jobid_trkr_t *jptr;
|
opal_ext20_jobid_trkr_t *jptr;
|
||||||
|
|
||||||
/* if we don't already have it, we can ignore this */
|
/* if we don't already have it, we can ignore this */
|
||||||
OPAL_LIST_FOREACH(jptr, &mca_pmix_ext20_component.jobids, opal_pmix20_jobid_trkr_t) {
|
OPAL_LIST_FOREACH(jptr, &mca_pmix_ext20_component.jobids, opal_ext20_jobid_trkr_t) {
|
||||||
if (jptr->jobid == cd->jobid) {
|
if (jptr->jobid == cd->jobid) {
|
||||||
/* found it - tell the server to deregister */
|
/* found it - tell the server to deregister */
|
||||||
cd->active = true;
|
cd->active = true;
|
||||||
@ -312,15 +313,15 @@ static void _dereg_nspace(int sd, short args, void *cbdata)
|
|||||||
tdcbfunc(PMIX_ERR_NOT_FOUND, cd);
|
tdcbfunc(PMIX_ERR_NOT_FOUND, cd);
|
||||||
}
|
}
|
||||||
|
|
||||||
void pmix20_server_deregister_nspace(opal_jobid_t jobid,
|
void ext20_server_deregister_nspace(opal_jobid_t jobid,
|
||||||
opal_pmix_op_cbfunc_t cbfunc,
|
opal_pmix_op_cbfunc_t cbfunc,
|
||||||
void *cbdata)
|
void *cbdata)
|
||||||
{
|
{
|
||||||
pmix20_threadshift_t *cd;
|
ext20_threadshift_t *cd;
|
||||||
|
|
||||||
/* we must threadshift this request as it touches
|
/* we must threadshift this request as it touches
|
||||||
* shared lists of objects */
|
* shared lists of objects */
|
||||||
cd = OBJ_NEW(pmix20_threadshift_t);
|
cd = OBJ_NEW(ext20_threadshift_t);
|
||||||
cd->jobid = jobid;
|
cd->jobid = jobid;
|
||||||
cd->opcbfunc = cbfunc;
|
cd->opcbfunc = cbfunc;
|
||||||
cd->cbdata = cbdata;
|
cd->cbdata = cbdata;
|
||||||
@ -333,7 +334,7 @@ void pmix20_server_deregister_nspace(opal_jobid_t jobid,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int pmix20_server_register_client(const opal_process_name_t *proc,
|
int ext20_server_register_client(const opal_process_name_t *proc,
|
||||||
uid_t uid, gid_t gid,
|
uid_t uid, gid_t gid,
|
||||||
void *server_object,
|
void *server_object,
|
||||||
opal_pmix_op_cbfunc_t cbfunc,
|
opal_pmix_op_cbfunc_t cbfunc,
|
||||||
@ -341,13 +342,13 @@ int pmix20_server_register_client(const opal_process_name_t *proc,
|
|||||||
{
|
{
|
||||||
pmix_status_t rc;
|
pmix_status_t rc;
|
||||||
pmix_proc_t p;
|
pmix_proc_t p;
|
||||||
pmix20_opcaddy_t op;
|
ext20_opcaddy_t op;
|
||||||
|
|
||||||
/* convert the jobid */
|
/* convert the jobid */
|
||||||
(void)opal_snprintf_jobid(p.nspace, PMIX_MAX_NSLEN, proc->jobid);
|
(void)opal_snprintf_jobid(p.nspace, PMIX_MAX_NSLEN, proc->jobid);
|
||||||
p.rank = proc->vpid;
|
p.rank = ext20_convert_opalrank(proc->vpid);
|
||||||
|
|
||||||
OBJ_CONSTRUCT(&op, pmix20_opcaddy_t);
|
OBJ_CONSTRUCT(&op, ext20_opcaddy_t);
|
||||||
op.active = true;
|
op.active = true;
|
||||||
rc = PMIx_server_register_client(&p, uid, gid, server_object,
|
rc = PMIx_server_register_client(&p, uid, gid, server_object,
|
||||||
opcbfunc, (void*)&op);
|
opcbfunc, (void*)&op);
|
||||||
@ -356,21 +357,21 @@ int pmix20_server_register_client(const opal_process_name_t *proc,
|
|||||||
rc = op.status;
|
rc = op.status;
|
||||||
}
|
}
|
||||||
OBJ_DESTRUCT(&op);
|
OBJ_DESTRUCT(&op);
|
||||||
return pmix20_convert_rc(rc);
|
return ext20_convert_rc(rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _dereg_client(int sd, short args, void *cbdata)
|
static void _dereg_client(int sd, short args, void *cbdata)
|
||||||
{
|
{
|
||||||
pmix20_threadshift_t *cd = (pmix20_threadshift_t*)cbdata;
|
ext20_threadshift_t *cd = (ext20_threadshift_t*)cbdata;
|
||||||
opal_pmix20_jobid_trkr_t *jptr;
|
opal_ext20_jobid_trkr_t *jptr;
|
||||||
pmix_proc_t p;
|
pmix_proc_t p;
|
||||||
|
|
||||||
/* if we don't already have it, we can ignore this */
|
/* if we don't already have it, we can ignore this */
|
||||||
OPAL_LIST_FOREACH(jptr, &mca_pmix_ext20_component.jobids, opal_pmix20_jobid_trkr_t) {
|
OPAL_LIST_FOREACH(jptr, &mca_pmix_ext20_component.jobids, opal_ext20_jobid_trkr_t) {
|
||||||
if (jptr->jobid == cd->source->jobid) {
|
if (jptr->jobid == cd->source->jobid) {
|
||||||
/* found it - tell the server to deregister */
|
/* found it - tell the server to deregister */
|
||||||
(void)strncpy(p.nspace, jptr->nspace, PMIX_MAX_NSLEN);
|
(void)strncpy(p.nspace, jptr->nspace, PMIX_MAX_NSLEN);
|
||||||
p.rank = cd->source->vpid;
|
p.rank = ext20_convert_opalrank(cd->source->vpid);
|
||||||
cd->active = true;
|
cd->active = true;
|
||||||
PMIx_server_deregister_client(&p, tdcbfunc, (void*)cd);
|
PMIx_server_deregister_client(&p, tdcbfunc, (void*)cd);
|
||||||
PMIX_WAIT_FOR_COMPLETION(cd->active);
|
PMIX_WAIT_FOR_COMPLETION(cd->active);
|
||||||
@ -382,15 +383,15 @@ static void _dereg_client(int sd, short args, void *cbdata)
|
|||||||
|
|
||||||
/* tell the local PMIx server to cleanup this client as it is
|
/* tell the local PMIx server to cleanup this client as it is
|
||||||
* done executing */
|
* done executing */
|
||||||
void pmix20_server_deregister_client(const opal_process_name_t *proc,
|
void ext20_server_deregister_client(const opal_process_name_t *proc,
|
||||||
opal_pmix_op_cbfunc_t cbfunc,
|
opal_pmix_op_cbfunc_t cbfunc,
|
||||||
void *cbdata)
|
void *cbdata)
|
||||||
{
|
{
|
||||||
pmix20_threadshift_t *cd;
|
ext20_threadshift_t *cd;
|
||||||
|
|
||||||
/* we must threadshift this request as we might not be in an event
|
/* we must threadshift this request as we might not be in an event
|
||||||
* and we are going to access framework-global lists/objects */
|
* and we are going to access framework-global lists/objects */
|
||||||
cd = OBJ_NEW(pmix20_threadshift_t);
|
cd = OBJ_NEW(ext20_threadshift_t);
|
||||||
cd->source = proc;
|
cd->source = proc;
|
||||||
cd->opcbfunc = cbfunc;
|
cd->opcbfunc = cbfunc;
|
||||||
cd->cbdata = cbdata;
|
cd->cbdata = cbdata;
|
||||||
@ -404,17 +405,17 @@ void pmix20_server_deregister_client(const opal_process_name_t *proc,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* have the local PMIx server setup the environment for this client */
|
/* have the local PMIx server setup the environment for this client */
|
||||||
int pmix20_server_setup_fork(const opal_process_name_t *proc, char ***env)
|
int ext20_server_setup_fork(const opal_process_name_t *proc, char ***env)
|
||||||
{
|
{
|
||||||
pmix_status_t rc;
|
pmix_status_t rc;
|
||||||
pmix_proc_t p;
|
pmix_proc_t p;
|
||||||
|
|
||||||
/* convert the jobid */
|
/* convert the jobid */
|
||||||
(void)opal_snprintf_jobid(p.nspace, PMIX_MAX_NSLEN, proc->jobid);
|
(void)opal_snprintf_jobid(p.nspace, PMIX_MAX_NSLEN, proc->jobid);
|
||||||
p.rank = proc->vpid;
|
p.rank = ext20_convert_opalrank(proc->vpid);
|
||||||
|
|
||||||
rc = PMIx_server_setup_fork(&p, env);
|
rc = PMIx_server_setup_fork(&p, env);
|
||||||
return pmix20_convert_rc(rc);
|
return ext20_convert_rc(rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* this is the call back up from the embedded PMIx server that
|
/* this is the call back up from the embedded PMIx server that
|
||||||
@ -423,9 +424,9 @@ int pmix20_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)
|
static void dmdx_response(pmix_status_t status, char *data, size_t sz, void *cbdata)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
pmix20_opcaddy_t *op = (pmix20_opcaddy_t*)cbdata;
|
ext20_opcaddy_t *op = (ext20_opcaddy_t*)cbdata;
|
||||||
|
|
||||||
rc = pmix20_convert_rc(status);
|
rc = ext20_convert_rc(status);
|
||||||
if (NULL != op->mdxcbfunc) {
|
if (NULL != op->mdxcbfunc) {
|
||||||
op->mdxcbfunc(rc, data, sz, op->cbdata, NULL, NULL);
|
op->mdxcbfunc(rc, data, sz, op->cbdata, NULL, NULL);
|
||||||
}
|
}
|
||||||
@ -433,31 +434,31 @@ static void dmdx_response(pmix_status_t status, char *data, size_t sz, void *cbd
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* request modex data for a local proc from the PMIx server */
|
/* request modex data for a local proc from the PMIx server */
|
||||||
int pmix20_server_dmodex(const opal_process_name_t *proc,
|
int ext20_server_dmodex(const opal_process_name_t *proc,
|
||||||
opal_pmix_modex_cbfunc_t cbfunc, void *cbdata)
|
opal_pmix_modex_cbfunc_t cbfunc, void *cbdata)
|
||||||
{
|
{
|
||||||
pmix20_opcaddy_t *op;
|
ext20_opcaddy_t *op;
|
||||||
pmix_status_t rc;
|
pmix_status_t rc;
|
||||||
|
|
||||||
/* setup the caddy */
|
/* setup the caddy */
|
||||||
op = OBJ_NEW(pmix20_opcaddy_t);
|
op = OBJ_NEW(ext20_opcaddy_t);
|
||||||
op->mdxcbfunc = cbfunc;
|
op->mdxcbfunc = cbfunc;
|
||||||
op->cbdata = cbdata;
|
op->cbdata = cbdata;
|
||||||
|
|
||||||
/* convert the jobid */
|
/* convert the jobid */
|
||||||
(void)opal_snprintf_jobid(op->p.nspace, PMIX_MAX_NSLEN, proc->jobid);
|
(void)opal_snprintf_jobid(op->p.nspace, PMIX_MAX_NSLEN, proc->jobid);
|
||||||
op->p.rank = proc->vpid;
|
op->p.rank = ext20_convert_opalrank(proc->vpid);
|
||||||
|
|
||||||
/* find the internally-cached data for this proc */
|
/* find the internally-cached data for this proc */
|
||||||
rc = PMIx_server_dmodex_request(&op->p, dmdx_response, op);
|
rc = PMIx_server_dmodex_request(&op->p, dmdx_response, op);
|
||||||
if (PMIX_SUCCESS != rc) {
|
if (PMIX_SUCCESS != rc) {
|
||||||
OBJ_RELEASE(op);
|
OBJ_RELEASE(op);
|
||||||
}
|
}
|
||||||
return pmix20_convert_rc(rc);
|
return ext20_convert_rc(rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* tell the PMIx server to notify its local clients of an event */
|
/* tell the PMIx server to notify its local clients of an event */
|
||||||
int pmix20_server_notify_event(int status,
|
int ext20_server_notify_event(int status,
|
||||||
const opal_process_name_t *source,
|
const opal_process_name_t *source,
|
||||||
opal_list_t *info,
|
opal_list_t *info,
|
||||||
opal_pmix_op_cbfunc_t cbfunc, void *cbdata)
|
opal_pmix_op_cbfunc_t cbfunc, void *cbdata)
|
||||||
@ -466,7 +467,7 @@ int pmix20_server_notify_event(int status,
|
|||||||
pmix_info_t *pinfo;
|
pmix_info_t *pinfo;
|
||||||
size_t sz, n;
|
size_t sz, n;
|
||||||
pmix_status_t rc;
|
pmix_status_t rc;
|
||||||
pmix20_opcaddy_t *op;
|
ext20_opcaddy_t *op;
|
||||||
|
|
||||||
/* convert the list to an array of pmix_info_t */
|
/* convert the list to an array of pmix_info_t */
|
||||||
if (NULL != info) {
|
if (NULL != info) {
|
||||||
@ -475,14 +476,14 @@ int pmix20_server_notify_event(int status,
|
|||||||
n = 0;
|
n = 0;
|
||||||
OPAL_LIST_FOREACH(kv, info, opal_value_t) {
|
OPAL_LIST_FOREACH(kv, info, opal_value_t) {
|
||||||
(void)strncpy(pinfo[n].key, kv->key, PMIX_MAX_KEYLEN);
|
(void)strncpy(pinfo[n].key, kv->key, PMIX_MAX_KEYLEN);
|
||||||
pmix20_value_load(&pinfo[n].value, kv);
|
ext20_value_load(&pinfo[n].value, kv);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
sz = 0;
|
sz = 0;
|
||||||
pinfo = NULL;
|
pinfo = NULL;
|
||||||
}
|
}
|
||||||
/* setup the caddy */
|
/* setup the caddy */
|
||||||
op = OBJ_NEW(pmix20_opcaddy_t);
|
op = OBJ_NEW(ext20_opcaddy_t);
|
||||||
op->info = pinfo;
|
op->info = pinfo;
|
||||||
op->sz = sz;
|
op->sz = sz;
|
||||||
op->opcbfunc = cbfunc;
|
op->opcbfunc = cbfunc;
|
||||||
@ -490,14 +491,14 @@ int pmix20_server_notify_event(int status,
|
|||||||
/* convert the jobid */
|
/* convert the jobid */
|
||||||
if (NULL == source) {
|
if (NULL == source) {
|
||||||
(void)opal_snprintf_jobid(op->p.nspace, PMIX_MAX_NSLEN, OPAL_JOBID_INVALID);
|
(void)opal_snprintf_jobid(op->p.nspace, PMIX_MAX_NSLEN, OPAL_JOBID_INVALID);
|
||||||
op->p.rank = OPAL_VPID_INVALID;
|
op->p.rank = ext20_convert_opalrank(OPAL_VPID_INVALID);
|
||||||
} else {
|
} else {
|
||||||
(void)opal_snprintf_jobid(op->p.nspace, PMIX_MAX_NSLEN, source->jobid);
|
(void)opal_snprintf_jobid(op->p.nspace, PMIX_MAX_NSLEN, source->jobid);
|
||||||
op->p.rank = source->vpid;
|
op->p.rank = ext20_convert_opalrank(source->vpid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
rc = pmix20_convert_opalrc(status);
|
rc = ext20_convert_opalrc(status);
|
||||||
/* the range is irrelevant here as the server is passing
|
/* the range is irrelevant here as the server is passing
|
||||||
* the event down to its local clients */
|
* the event down to its local clients */
|
||||||
rc = PMIx_Notify_event(rc, &op->p, PMIX_RANGE_LOCAL,
|
rc = PMIx_Notify_event(rc, &op->p, PMIX_RANGE_LOCAL,
|
||||||
@ -505,5 +506,5 @@ int pmix20_server_notify_event(int status,
|
|||||||
if (PMIX_SUCCESS != rc) {
|
if (PMIX_SUCCESS != rc) {
|
||||||
OBJ_RELEASE(op);
|
OBJ_RELEASE(op);
|
||||||
}
|
}
|
||||||
return pmix20_convert_rc(rc);
|
return ext20_convert_rc(rc);
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ AC_DEFUN([MCA_opal_pmix_pmix2x_CONFIG],[
|
|||||||
AS_IF([test $opal_pmix_pmix2x_happy -eq 1],
|
AS_IF([test $opal_pmix_pmix2x_happy -eq 1],
|
||||||
[PMIX_VERSION="internal v`$srcdir/$opal_pmix_pmix2x_basedir/pmix/config/pmix_get_version.sh $srcdir/$opal_pmix_pmix2x_basedir/pmix/VERSION`"
|
[PMIX_VERSION="internal v`$srcdir/$opal_pmix_pmix2x_basedir/pmix/config/pmix_get_version.sh $srcdir/$opal_pmix_pmix2x_basedir/pmix/VERSION`"
|
||||||
# Build flags for our Makefile.am
|
# Build flags for our Makefile.am
|
||||||
opal_pmix_pmix2x_LIBS='$(OPAL_TOP_BUILDDIR)/'"$opal_pmix_pmix2x_basedir"'/pmix/libpmix.la'
|
opal_pmix_pmix2x_LIBS='$(OPAL_TOP_BUILDDIR)/'"$opal_pmix_pmix2x_basedir"'/pmix/src/libpmix.la'
|
||||||
opal_pmix_pmix2x_CPPFLAGS='-I$(OPAL_TOP_BUILDDIR)/opal/mca/pmix/pmix2x/pmix/include/pmix -I$(OPAL_TOP_BUILDDIR)/opal/mca/pmix/pmix2x/pmix/include -I$(OPAL_TOP_BUILDDIR)/opal/mca/pmix/pmix2x/pmix -I$(OPAL_TOP_SRCDIR)/opal/mca/pmix/pmix2x/pmix'
|
opal_pmix_pmix2x_CPPFLAGS='-I$(OPAL_TOP_BUILDDIR)/opal/mca/pmix/pmix2x/pmix/include/pmix -I$(OPAL_TOP_BUILDDIR)/opal/mca/pmix/pmix2x/pmix/include -I$(OPAL_TOP_BUILDDIR)/opal/mca/pmix/pmix2x/pmix -I$(OPAL_TOP_SRCDIR)/opal/mca/pmix/pmix2x/pmix'
|
||||||
AC_SUBST([opal_pmix_pmix2x_LIBS])
|
AC_SUBST([opal_pmix_pmix2x_LIBS])
|
||||||
AC_SUBST([opal_pmix_pmix2x_CPPFLAGS])])
|
AC_SUBST([opal_pmix_pmix2x_CPPFLAGS])])
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# University of Stuttgart. All rights reserved.
|
# University of Stuttgart. All rights reserved.
|
||||||
# Copyright (c) 2004-2005 The Regents of the University of California.
|
# Copyright (c) 2004-2005 The Regents of the University of California.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
# Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved.
|
# Copyright (c) 2006-2016 Cisco Systems, Inc. All rights reserved.
|
||||||
# Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved.
|
# Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved.
|
||||||
# Copyright (c) 2013-2016 Intel, Inc. All rights reserved
|
# Copyright (c) 2013-2016 Intel, Inc. All rights reserved
|
||||||
# $COPYRIGHT$
|
# $COPYRIGHT$
|
||||||
@ -23,64 +23,28 @@
|
|||||||
# via AC_CONFIG_MACRO_DIR in configure.ac.
|
# via AC_CONFIG_MACRO_DIR in configure.ac.
|
||||||
ACLOCAL_AMFLAGS = -I ./config
|
ACLOCAL_AMFLAGS = -I ./config
|
||||||
|
|
||||||
|
SUBDIRS = config include src
|
||||||
|
|
||||||
|
|
||||||
headers =
|
headers =
|
||||||
sources =
|
sources =
|
||||||
nodist_headers =
|
nodist_headers =
|
||||||
EXTRA_DIST =
|
EXTRA_DIST = AUTHORS README INSTALL VERSION LICENSE autogen.pl
|
||||||
|
|
||||||
# Only install the valgrind suppressions file if we're building in
|
# Only install the valgrind suppressions file and man pages
|
||||||
# standalone mode
|
# if we're building in standalone mode
|
||||||
dist_pmixdata_DATA =
|
dist_pmixdata_DATA =
|
||||||
man_MANS =
|
|
||||||
|
|
||||||
if ! PMIX_EMBEDDED_MODE
|
if ! PMIX_EMBEDDED_MODE
|
||||||
dist_pmixdata_DATA += contrib/pmix-valgrind.supp
|
dist_pmixdata_DATA += contrib/pmix-valgrind.supp
|
||||||
man_MANS += \
|
|
||||||
man/man3/pmix_init.3 \
|
if PMIX_HAVE_PANDOC
|
||||||
man/man3/pmix_finalize.3 \
|
SUBDIRS += man
|
||||||
man/man3/pmix_initialized.3 \
|
|
||||||
man/man3/pmix_abort.3 \
|
|
||||||
man/man3/pmix_put.3 \
|
|
||||||
man/man3/pmix_commit.3 \
|
|
||||||
man/man3/pmix_fence.3 \
|
|
||||||
man/man3/pmix_get.3 \
|
|
||||||
man/man7/pmix.7 \
|
|
||||||
man/man7/pmix_constants.7
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
include config/Makefile.am
|
|
||||||
include include/Makefile.am
|
|
||||||
include src/class/Makefile.am
|
|
||||||
include src/include/Makefile.am
|
|
||||||
include src/buffer_ops/Makefile.am
|
|
||||||
include src/util/Makefile.am
|
|
||||||
include src/usock/Makefile.am
|
|
||||||
include src/client/Makefile.am
|
|
||||||
include src/server/Makefile.am
|
|
||||||
include src/sec/Makefile.am
|
|
||||||
include src/event/Makefile.am
|
|
||||||
include src/common/Makefile.am
|
|
||||||
include src/tool/Makefile.am
|
|
||||||
|
|
||||||
if WANT_DSTORE
|
|
||||||
include src/sm/Makefile.am
|
|
||||||
include src/dstore/Makefile.am
|
|
||||||
endif
|
|
||||||
|
|
||||||
if PMIX_EMBEDDED_MODE
|
|
||||||
noinst_LTLIBRARIES = libpmix.la
|
|
||||||
libpmix_la_SOURCES = $(headers) $(sources)
|
|
||||||
libpmix_la_LDFLAGS =
|
|
||||||
|
|
||||||
else
|
|
||||||
|
|
||||||
lib_LTLIBRARIES = libpmix.la
|
|
||||||
libpmix_la_SOURCES = $(headers) $(sources)
|
|
||||||
libpmix_la_LDFLAGS = -version-info $(libpmix_so_version)
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if PMIX_TESTS_EXAMPLES
|
if PMIX_TESTS_EXAMPLES
|
||||||
SUBDIRS = . test examples
|
SUBDIRS += . test examples
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if WANT_INSTALL_HEADERS
|
if WANT_INSTALL_HEADERS
|
||||||
@ -93,19 +57,7 @@ noinst_HEADERS = $(headers)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
nroff:
|
nroff:
|
||||||
@for file in $(man_MANS); do \
|
(cd man; $(MAKE) nroff)
|
||||||
source=`echo $$file | sed -e 's@/man[0-9]@@'`; \
|
|
||||||
contrib/md2nroff.pl --source=$$source.md; \
|
|
||||||
done
|
|
||||||
|
|
||||||
EXTRA_DIST += AUTHORS README INSTALL VERSION LICENSE autogen.sh \
|
|
||||||
config/pmix_get_version.sh $(man_MANS) \
|
|
||||||
contrib/platform/optimized \
|
|
||||||
test/test_common.h test/cli_stages.h \
|
|
||||||
test/server_callbacks.h test/test_fence.h \
|
|
||||||
test/test_publish.h test/test_resolve_peers.h \
|
|
||||||
test/test_spawn.h test/utils.h test/test_cd.h
|
|
||||||
|
|
||||||
|
|
||||||
dist-hook:
|
dist-hook:
|
||||||
env LS_COLORS= sh "$(top_srcdir)/config/distscript.sh" "$(top_srcdir)" "$(distdir)" "$(PMIX_VERSION)" "$(PMIX_REPO_REV)"
|
env LS_COLORS= sh "$(top_srcdir)/config/distscript.sh" "$(top_srcdir)" "$(distdir)" "$(PMIX_VERSION)" "$(PMIX_REPO_REV)"
|
||||||
|
@ -30,7 +30,7 @@ greek=
|
|||||||
# command, or with the date (if "git describe" fails) in the form of
|
# command, or with the date (if "git describe" fails) in the form of
|
||||||
# "date<date>".
|
# "date<date>".
|
||||||
|
|
||||||
repo_rev=git23ee156
|
repo_rev=gitc2e543b
|
||||||
|
|
||||||
# If tarball_version is not empty, it is used as the version string in
|
# If tarball_version is not empty, it is used as the version string in
|
||||||
# the tarball filename, regardless of all other versions listed in
|
# the tarball filename, regardless of all other versions listed in
|
||||||
@ -44,7 +44,7 @@ tarball_version=
|
|||||||
|
|
||||||
# The date when this release was created
|
# The date when this release was created
|
||||||
|
|
||||||
date="Aug 07, 2016"
|
date="Aug 10, 2016"
|
||||||
|
|
||||||
# The shared library version of each of PMIx's public libraries.
|
# The shared library version of each of PMIx's public libraries.
|
||||||
# These versions are maintained in accordance with the "Library
|
# These versions are maintained in accordance with the "Library
|
||||||
|
739
opal/mca/pmix/pmix2x/pmix/autogen.pl
Исполняемый файл
739
opal/mca/pmix/pmix2x/pmix/autogen.pl
Исполняемый файл
@ -0,0 +1,739 @@
|
|||||||
|
#!/usr/bin/env perl
|
||||||
|
#
|
||||||
|
# Copyright (c) 2009-2016 Cisco Systems, Inc. All rights reserved.
|
||||||
|
# Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
|
||||||
|
# Copyright (c) 2013 Mellanox Technologies, Inc.
|
||||||
|
# All rights reserved.
|
||||||
|
# Copyright (c) 2013-2016 Intel, Inc. All rights reserved.
|
||||||
|
# Copyright (c) 2015 Research Organization for Information Science
|
||||||
|
# and Technology (RIST). All rights reserved.
|
||||||
|
# Copyright (c) 2015 IBM Corporation. All rights reserved.
|
||||||
|
#
|
||||||
|
# $COPYRIGHT$
|
||||||
|
#
|
||||||
|
# Additional copyrights may follow
|
||||||
|
#
|
||||||
|
# $HEADER$
|
||||||
|
#
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
|
||||||
|
use Cwd;
|
||||||
|
use File::Basename;
|
||||||
|
use File::Find;
|
||||||
|
use Data::Dumper;
|
||||||
|
use Getopt::Long;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Global variables
|
||||||
|
#
|
||||||
|
|
||||||
|
# Sentinel file to remove if we fail
|
||||||
|
my $sentinel;
|
||||||
|
|
||||||
|
# The m4 file we'll write at the end
|
||||||
|
my $m4_output_file = "config/autogen_found_items.m4";
|
||||||
|
my $m4;
|
||||||
|
# Sanity check file
|
||||||
|
my $topdir_file = "include/pmix.h";
|
||||||
|
my $dnl_line = "dnl ---------------------------------------------------------------------------";
|
||||||
|
|
||||||
|
# Data structures to fill up with all the stuff we find
|
||||||
|
my $mca_found;
|
||||||
|
my @subdirs;
|
||||||
|
|
||||||
|
# Command line parameters
|
||||||
|
my $quiet_arg = 0;
|
||||||
|
my $debug_arg = 0;
|
||||||
|
my $help_arg = 0;
|
||||||
|
my $include_arg = 0;
|
||||||
|
my $exclude_arg = 0;
|
||||||
|
my $force_arg = 0;
|
||||||
|
|
||||||
|
# Include/exclude lists
|
||||||
|
my $include_list;
|
||||||
|
my $exclude_list;
|
||||||
|
|
||||||
|
# Minimum versions
|
||||||
|
my $pmix_automake_version = "1.12.2";
|
||||||
|
my $pmix_autoconf_version = "2.69";
|
||||||
|
my $pmix_libtool_version = "2.4.2";
|
||||||
|
|
||||||
|
# Search paths
|
||||||
|
my $pmix_autoconf_search = "autoconf";
|
||||||
|
my $pmix_automake_search = "automake";
|
||||||
|
my $pmix_libtoolize_search = "libtoolize;glibtoolize";
|
||||||
|
|
||||||
|
# One-time setup
|
||||||
|
my $username;
|
||||||
|
my $hostname;
|
||||||
|
my $full_hostname;
|
||||||
|
|
||||||
|
$username = getpwuid($>);
|
||||||
|
$full_hostname = `hostname`;
|
||||||
|
chomp($full_hostname);
|
||||||
|
$hostname = $full_hostname;
|
||||||
|
$hostname =~ s/^([\w\-]+)\..+/\1/;
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
sub my_die {
|
||||||
|
unlink($sentinel)
|
||||||
|
if ($sentinel);
|
||||||
|
die @_;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub my_exit {
|
||||||
|
my ($ret) = @_;
|
||||||
|
unlink($sentinel)
|
||||||
|
if ($sentinel && $ret != 0);
|
||||||
|
exit($ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
sub verbose {
|
||||||
|
print @_
|
||||||
|
if (!$quiet_arg);
|
||||||
|
}
|
||||||
|
|
||||||
|
sub debug {
|
||||||
|
print @_
|
||||||
|
if ($debug_arg);
|
||||||
|
}
|
||||||
|
|
||||||
|
sub debug_dump {
|
||||||
|
my $d = new Data::Dumper([@_]);
|
||||||
|
$d->Purity(1)->Indent(1);
|
||||||
|
debug $d->Dump;
|
||||||
|
}
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
sub mca_process_component {
|
||||||
|
my ($framework, $component) = @_;
|
||||||
|
|
||||||
|
my $cdir = "src/mca/$framework/$component";
|
||||||
|
|
||||||
|
return
|
||||||
|
if (! -d $cdir);
|
||||||
|
|
||||||
|
# Process this directory
|
||||||
|
my $found_component;
|
||||||
|
|
||||||
|
$found_component = {
|
||||||
|
name => $component,
|
||||||
|
framework_name => $framework,
|
||||||
|
abs_dir => $cdir,
|
||||||
|
};
|
||||||
|
|
||||||
|
# Does this directory have a configure.m4 file?
|
||||||
|
if (-f "$cdir/configure.m4") {
|
||||||
|
$found_component->{"configure.m4"} = 1;
|
||||||
|
verbose " Found configure.m4 file\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
# Push the results onto the $mca_found hash array
|
||||||
|
push(@{$mca_found->{$framework}->{"components"}},
|
||||||
|
$found_component);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
sub ignored {
|
||||||
|
my ($dir) = @_;
|
||||||
|
|
||||||
|
# If this directory does not have .pmix_ignore, or if it has a
|
||||||
|
# .pmix_unignore that has my username in it, then add it to the
|
||||||
|
# list of components.
|
||||||
|
my $ignored = 0;
|
||||||
|
|
||||||
|
if (-f "$dir/.pmix_ignore") {
|
||||||
|
$ignored = 1;
|
||||||
|
}
|
||||||
|
if (-f "$dir/.pmix_unignore") {
|
||||||
|
open(UNIGNORE, "$dir/.pmix_unignore") ||
|
||||||
|
my_die "Can't open $dir/.pmix_unignore file";
|
||||||
|
my $unignore;
|
||||||
|
$unignore .= $_
|
||||||
|
while (<UNIGNORE>);
|
||||||
|
close(UNIGNORE);
|
||||||
|
|
||||||
|
$ignored = 0
|
||||||
|
if ($unignore =~ /^$username$/m ||
|
||||||
|
$unignore =~ /^$username\@$hostname$/m ||
|
||||||
|
$unignore =~ /^$username\@$full_hostname$/m);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $ignored;
|
||||||
|
}
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
sub mca_process_framework {
|
||||||
|
my ($framework) = @_;
|
||||||
|
|
||||||
|
# Does this framework have a configure.m4 file?
|
||||||
|
my $dir = "src/mca/$framework";
|
||||||
|
if (-f "$dir/configure.m4") {
|
||||||
|
$mca_found->{$framework}->{"configure.m4"} = 1;
|
||||||
|
verbose " Found framework configure.m4 file\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
# Did we exclude all components for this framework?
|
||||||
|
if (exists($exclude_list->{$framework}) &&
|
||||||
|
$exclude_list->{$framework}[0] eq "AGEN_EXCLUDE_ALL") {
|
||||||
|
verbose " => Excluded\n";
|
||||||
|
} else {
|
||||||
|
# Look for component directories in this framework
|
||||||
|
if (-d $dir) {
|
||||||
|
$mca_found->{$framework}->{found} = 1;
|
||||||
|
opendir(DIR, $dir) ||
|
||||||
|
my_die "Can't open $dir directory";
|
||||||
|
foreach my $d (readdir(DIR)) {
|
||||||
|
# Skip any non-directory, "base", or any dir that
|
||||||
|
# begins with "."
|
||||||
|
next
|
||||||
|
if (! -d "$dir/$d" || $d eq "base" ||
|
||||||
|
substr($d, 0, 1) eq ".");
|
||||||
|
|
||||||
|
# Skip any component that doesn't have a configure.m4
|
||||||
|
# or Makefile.am as we couldn't build it anyway
|
||||||
|
if (! -f "$dir/$d/configure.m4" &&
|
||||||
|
! -f "$dir/$d/Makefile.am" &&
|
||||||
|
! -f "$dir/$d/configure.ac" &&
|
||||||
|
! -f "$dir/$d/configure.in") {
|
||||||
|
verbose " => No sentinel file found in $dir/$d -> Excluded\n";
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
|
verbose "--- Found pmix / $framework / $d component: src/mca/$framework/$d\n";
|
||||||
|
|
||||||
|
# Skip if specifically excluded
|
||||||
|
if (exists($exclude_list->{$framework}) &&
|
||||||
|
$exclude_list->{$framework}[0] eq $d) {
|
||||||
|
verbose " => Excluded\n";
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Skip if the framework is on the include list, but
|
||||||
|
# doesn't contain this component
|
||||||
|
if (exists($include_list->{$framework})) {
|
||||||
|
my $tst = 0;
|
||||||
|
foreach my $ck (@{$include_list->{$framework}}) {
|
||||||
|
if ($ck ne $d) {
|
||||||
|
verbose " => Not included\n";
|
||||||
|
$tst = 1;
|
||||||
|
last;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($tst) {
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Check ignore status
|
||||||
|
if (ignored("$dir/$d")) {
|
||||||
|
verbose " => Ignored (found .pmix_ignore file)\n";
|
||||||
|
} else {
|
||||||
|
mca_process_component($framework, $d);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir(DIR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
sub mca_generate_framework_header(\$\@) {
|
||||||
|
my (@frameworks) = @_;
|
||||||
|
my $framework_array_output="";
|
||||||
|
my $framework_decl_output="";
|
||||||
|
|
||||||
|
foreach my $framework (@frameworks) {
|
||||||
|
# There is no common framework object
|
||||||
|
if ($framework ne "common") {
|
||||||
|
my $framework_name = "pmix_${framework}_base_framework";
|
||||||
|
$framework_array_output .= " &$framework_name,\n";
|
||||||
|
$framework_decl_output .= "extern pmix_mca_base_framework_t $framework_name;\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
my $ifdef_string = uc "pmix_FRAMEWORKS_H";
|
||||||
|
open(FRAMEWORKS_OUT, ">src/include/frameworks.h");
|
||||||
|
printf FRAMEWORKS_OUT "%s", "/*
|
||||||
|
* This file is autogenerated by autogen.pl. Do not edit this file by hand.
|
||||||
|
*/
|
||||||
|
#ifndef $ifdef_string
|
||||||
|
#define $ifdef_string
|
||||||
|
|
||||||
|
#include <pmix/mca/base/mca_base_framework.h>
|
||||||
|
|
||||||
|
$framework_decl_output
|
||||||
|
static pmix_mca_base_framework_t *pmix_frameworks[] = {
|
||||||
|
$framework_array_output NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* $ifdef_string */\n\n";
|
||||||
|
close(FRAMEWORKS_OUT);
|
||||||
|
}
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
sub mca_process_project {
|
||||||
|
|
||||||
|
# Look for framework directories
|
||||||
|
my $dir = "src/mca";
|
||||||
|
opendir(DIR, $dir) ||
|
||||||
|
my_die "Can't open $dir directory";
|
||||||
|
my @my_dirs = readdir(DIR);
|
||||||
|
@my_dirs = sort(@my_dirs);
|
||||||
|
|
||||||
|
foreach my $d (@my_dirs) {
|
||||||
|
# Skip any non-directory, "base", or any dir that begins with "."
|
||||||
|
next
|
||||||
|
if (! -d "$dir/$d" || $d eq "base" || substr($d, 0, 1) eq ".");
|
||||||
|
|
||||||
|
# If this directory has a $dir.h file and a base/
|
||||||
|
# subdirectory, or its name is "common", then it's a
|
||||||
|
# framework.
|
||||||
|
if ("common" eq $d ||
|
||||||
|
(-f "$dir/$d/$d.h" && -d "$dir/$d/base")) {
|
||||||
|
verbose "\n=== Found pmix framework: src/mca/$d\n";
|
||||||
|
mca_process_framework($d);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir(DIR);
|
||||||
|
}
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
sub mca_run_global {
|
||||||
|
|
||||||
|
# Go find a list of frameworks, and for each of
|
||||||
|
# those, go find a list of components.
|
||||||
|
mca_process_project();
|
||||||
|
|
||||||
|
# Debugging output
|
||||||
|
debug_dump($mca_found);
|
||||||
|
|
||||||
|
$m4 .= "\n$dnl_line
|
||||||
|
$dnl_line
|
||||||
|
$dnl_line
|
||||||
|
|
||||||
|
dnl MCA information\n";
|
||||||
|
|
||||||
|
# Array for all the m4_includes that we'll need to pick up the
|
||||||
|
# configure.m4's.
|
||||||
|
my @includes;
|
||||||
|
|
||||||
|
# Write the list of frameworks
|
||||||
|
my $frameworks_comma;
|
||||||
|
|
||||||
|
# Print out project-level info
|
||||||
|
my @mykeys = keys(%{$mca_found});
|
||||||
|
@mykeys = sort(@mykeys);
|
||||||
|
|
||||||
|
# Ensure that the "common" framework is listed first
|
||||||
|
# (if it exists)
|
||||||
|
my @tmp;
|
||||||
|
push(@tmp, "common")
|
||||||
|
if (grep(/common/, @mykeys));
|
||||||
|
foreach my $f (@mykeys) {
|
||||||
|
push(@tmp, $f)
|
||||||
|
if ($f ne "common");
|
||||||
|
}
|
||||||
|
@mykeys = @tmp;
|
||||||
|
|
||||||
|
foreach my $f (@mykeys) {
|
||||||
|
$frameworks_comma .= ", $f";
|
||||||
|
|
||||||
|
# Does this framework have a configure.m4 file?
|
||||||
|
push(@includes, "src/mca/$f/configure.m4")
|
||||||
|
if (exists($mca_found->{$f}->{"configure.m4"}));
|
||||||
|
|
||||||
|
# This framework does have a Makefile.am (or at least,
|
||||||
|
# it should!)
|
||||||
|
my_die "Missing src/mca/$f/Makefile.am"
|
||||||
|
if (! -f "src/mca/$f/Makefile.am");
|
||||||
|
}
|
||||||
|
$frameworks_comma =~ s/^, //;
|
||||||
|
|
||||||
|
&mca_generate_framework_header("src", @mykeys);
|
||||||
|
|
||||||
|
$m4 .= "$dnl_line
|
||||||
|
|
||||||
|
dnl Frameworks in the pmix project and their corresponding directories
|
||||||
|
m4_define([mca_pmix_framework_list], [$frameworks_comma])
|
||||||
|
|
||||||
|
";
|
||||||
|
|
||||||
|
# Print out framework-level info
|
||||||
|
foreach my $f (@mykeys) {
|
||||||
|
my $components;
|
||||||
|
my $m4_config_component_list;
|
||||||
|
my $no_config_component_list;
|
||||||
|
|
||||||
|
# Troll through each of the found components
|
||||||
|
foreach my $comp (@{$mca_found->{$f}->{components}}) {
|
||||||
|
my $c = $comp->{name};
|
||||||
|
$components .= "$c ";
|
||||||
|
|
||||||
|
# Does this component have a configure.m4 file?
|
||||||
|
if (exists($comp->{"configure.m4"})) {
|
||||||
|
push(@includes, "src/mca/$f/$c/configure.m4");
|
||||||
|
$m4_config_component_list .= ", $c";
|
||||||
|
} else {
|
||||||
|
$no_config_component_list .= ", $c";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$m4_config_component_list =~ s/^, //;
|
||||||
|
$no_config_component_list =~ s/^, //;
|
||||||
|
|
||||||
|
$m4 .= "dnl Components in the pmix / $f framework
|
||||||
|
m4_define([mca_pmix_${f}_m4_config_component_list], [$m4_config_component_list])
|
||||||
|
m4_define([mca_pmix_${f}_no_config_component_list], [$no_config_component_list])
|
||||||
|
|
||||||
|
";
|
||||||
|
}
|
||||||
|
|
||||||
|
# List out all the m4_include
|
||||||
|
$m4 .= "$dnl_line
|
||||||
|
|
||||||
|
dnl List of configure.m4 files to include\n";
|
||||||
|
foreach my $i (@includes) {
|
||||||
|
$m4 .= "m4_include([$i])\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# Find and remove stale files
|
||||||
|
|
||||||
|
sub find_and_delete {
|
||||||
|
foreach my $file (@_) {
|
||||||
|
my $removed = 0;
|
||||||
|
if (-f $file) {
|
||||||
|
unlink($file);
|
||||||
|
$removed = 1;
|
||||||
|
}
|
||||||
|
if (-f "config/$file") {
|
||||||
|
unlink("config/$file");
|
||||||
|
$removed = 1;
|
||||||
|
}
|
||||||
|
debug " Removed stale copy of $file\n"
|
||||||
|
if ($removed);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# Find a specific executable and ensure that it is a recent enough
|
||||||
|
# version.
|
||||||
|
|
||||||
|
sub find_and_check {
|
||||||
|
my ($app, $app_name, $req_version) = @_;
|
||||||
|
|
||||||
|
my @search_path = split(/;/, $app_name);
|
||||||
|
my @min_version = split(/\./, $req_version);
|
||||||
|
my @versions_found = ();
|
||||||
|
|
||||||
|
foreach (@search_path) {
|
||||||
|
verbose " Searching for $_\n";
|
||||||
|
my $version = `$_ --version`;
|
||||||
|
if (!defined($version)) {
|
||||||
|
verbose " $_ not found\n";
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Matches a version string with 1 or more parts possibly prefixed with a letter (ex:
|
||||||
|
# v2.2) or followed by a letter (ex: 2.2.6b). This regex assumes there is a space
|
||||||
|
# before the version string and that the version is ok if there is no version.
|
||||||
|
if (!($version =~ m/\s[vV]?(\d[\d\.]*\w?)/m)) {
|
||||||
|
verbose " WARNING: $_ does not appear to support --version. Assuming it is ok\n";
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$version = $1;
|
||||||
|
|
||||||
|
verbose " Found $_ version $version; checking version...\n";
|
||||||
|
push(@versions_found, $version);
|
||||||
|
|
||||||
|
my @parts = split(/\./, $version);
|
||||||
|
my $i = 0;
|
||||||
|
# Check every component of the version number
|
||||||
|
while ($i <= $#min_version) {
|
||||||
|
verbose " Found version component $parts[$i] -- need $min_version[$i]\n";
|
||||||
|
|
||||||
|
# Check to see if there are any characters (!) in the
|
||||||
|
# version number (e.g., Libtool's "2.2.6b" -- #%@#$%!!!).
|
||||||
|
# Do separate comparisons between the number and any
|
||||||
|
# trailing digits. You can't just "lt" compare the whole
|
||||||
|
# string because "10 lt 2b" will return true. #@$@#$#@$
|
||||||
|
# Libtool!!
|
||||||
|
$parts[$i] =~ m/(\d+)([a-z]*)/i;
|
||||||
|
my $pn = $1;
|
||||||
|
my $pa = $2;
|
||||||
|
$min_version[$i] =~ m/(\d+)([a-z]*)/i;
|
||||||
|
my $mn = $1;
|
||||||
|
my $ma = $2;
|
||||||
|
|
||||||
|
# If the version is higher, we're done.
|
||||||
|
if ($pn > $mn) {
|
||||||
|
verbose " ==> ACCEPTED\n";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
# If the version is lower, we're done.
|
||||||
|
elsif ($pn < $mn ||
|
||||||
|
($pn == $mn && $pa lt $ma)) {
|
||||||
|
verbose " ==> Too low! Skipping this version\n";
|
||||||
|
last;
|
||||||
|
}
|
||||||
|
|
||||||
|
# If the version was equal, keep checking.
|
||||||
|
++$i;
|
||||||
|
}
|
||||||
|
|
||||||
|
# If we found a good version, return.
|
||||||
|
if ($i > $#min_version) {
|
||||||
|
verbose " ==> ACCEPTED\n";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# if no acceptable version found, reject it
|
||||||
|
print "
|
||||||
|
=================================================================
|
||||||
|
I could not find a recent enough copy of $app.
|
||||||
|
I need at least $req_version, but only found the following versions:\n\n";
|
||||||
|
|
||||||
|
my $i = 0;
|
||||||
|
foreach (@search_path) {
|
||||||
|
print " $_: $versions_found[$i]\n";
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
print "\nI am gonna abort. :-(
|
||||||
|
|
||||||
|
Please make sure you are using at least the following versions of the
|
||||||
|
tools:
|
||||||
|
|
||||||
|
GNU Autoconf: $pmix_autoconf_version
|
||||||
|
GNU Automake: $pmix_automake_version
|
||||||
|
GNU Libtool: $pmix_libtool_version
|
||||||
|
=================================================================\n";
|
||||||
|
my_exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
sub safe_system {
|
||||||
|
print "Running: " . join(/ /, @_) . "\n";
|
||||||
|
my $ret = system(@_);
|
||||||
|
$ret >>= 8;
|
||||||
|
if (0 != $ret) {
|
||||||
|
print "Command failed: @_\n";
|
||||||
|
my_exit($ret);
|
||||||
|
}
|
||||||
|
$ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
sub in_tarball {
|
||||||
|
my $tarball = 0;
|
||||||
|
open(IN, "VERSION") || my_die "Can't open VERSION";
|
||||||
|
# If repo_rev is not an empty string, we are in a tarball
|
||||||
|
while (<IN>) {
|
||||||
|
my $line = $_;
|
||||||
|
my @fields = split(/=/,$line);
|
||||||
|
if ($fields[0] eq "repo_rev") {
|
||||||
|
if ($fields[1] ne "\n") {
|
||||||
|
$tarball = 1;
|
||||||
|
last;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
close(IN);
|
||||||
|
return $tarball;
|
||||||
|
}
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
##############################################################################
|
||||||
|
## main - do the real work...
|
||||||
|
##############################################################################
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
# Command line parameters
|
||||||
|
|
||||||
|
my $ok = Getopt::Long::GetOptions("quiet|q" => \$quiet_arg,
|
||||||
|
"debug|d" => \$debug_arg,
|
||||||
|
"help|h" => \$help_arg,
|
||||||
|
"include=s" => \$include_arg,
|
||||||
|
"exclude=s" => \$exclude_arg,
|
||||||
|
"force|f" => \$force_arg,
|
||||||
|
);
|
||||||
|
|
||||||
|
if (!$ok || $help_arg) {
|
||||||
|
print "Invalid command line argument.\n\n"
|
||||||
|
if (!$ok);
|
||||||
|
print "Options:
|
||||||
|
--quiet | -q Do not display normal verbose output
|
||||||
|
--debug | -d Output lots of debug information
|
||||||
|
--help | -h This help list
|
||||||
|
--include | -i Comma-separated list of framework-component pairs
|
||||||
|
to be exclusively built - i.e., all other components
|
||||||
|
will be ignored and only those specified will be marked
|
||||||
|
to build
|
||||||
|
--exclude | -e Comma-separated list of framework or framework-component
|
||||||
|
to be excluded from the build
|
||||||
|
--force | -f Run even if invoked from the source tree of an expanded
|
||||||
|
distribution tarball\n";
|
||||||
|
my_exit($ok ? 0 : 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Check for project existence
|
||||||
|
my $project_name_long = "PMIx";
|
||||||
|
my $project_name_short = "PMIx";
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
$full_hostname = `hostname`;
|
||||||
|
chomp($full_hostname);
|
||||||
|
|
||||||
|
$m4 = "dnl
|
||||||
|
dnl \$HEADER\$
|
||||||
|
dnl
|
||||||
|
$dnl_line
|
||||||
|
dnl This file is automatically created by autogen.pl; it should not
|
||||||
|
dnl be edited by hand!!
|
||||||
|
dnl
|
||||||
|
dnl Generated by $username at " . localtime(time) . "
|
||||||
|
dnl on $full_hostname.
|
||||||
|
$dnl_line\n\n";
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Verify that we're in the PMIx root directory by checking for a token file.
|
||||||
|
|
||||||
|
my_die "Not at the root directory of an PMIx source tree"
|
||||||
|
if (! -f "config/pmix_mca.m4");
|
||||||
|
|
||||||
|
$force_arg = 1;
|
||||||
|
|
||||||
|
my_die "autogen.pl has been invoked in the source tree of a PMIx distribution tarball; aborting...
|
||||||
|
You likely do not need to invoke \"autogen.pl\" -- you can probably run \"configure\" directly.
|
||||||
|
If you really know what you are doing, and really need to run autogen.pl, use the \"--force\" flag."
|
||||||
|
if (!$force_arg && in_tarball());
|
||||||
|
|
||||||
|
# Now that we've verified that we're in the top-level OMPI directory,
|
||||||
|
# set the sentinel file to remove if we abort.
|
||||||
|
$sentinel = Cwd::cwd() . "/configure";
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
my $step = 1;
|
||||||
|
verbose "PMIx autogen (buckle up!)
|
||||||
|
|
||||||
|
$step. Checking tool versions\n\n";
|
||||||
|
|
||||||
|
# Check the autotools revision levels
|
||||||
|
&find_and_check("autoconf", $pmix_autoconf_search, $pmix_autoconf_version);
|
||||||
|
&find_and_check("libtool", $pmix_libtoolize_search, $pmix_libtool_version);
|
||||||
|
&find_and_check("automake", $pmix_automake_search, $pmix_automake_version);
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# No platform file -- write an empty list
|
||||||
|
$m4 .= "m4_define([autogen_platform_file], [])\n\n";
|
||||||
|
|
||||||
|
if ($exclude_arg) {
|
||||||
|
debug "Using exclude list: $exclude_arg";
|
||||||
|
my @list = split(/,/, $exclude_arg);
|
||||||
|
foreach (@list) {
|
||||||
|
my @pairs = split(/-/, $_);
|
||||||
|
if (exists($pairs[1])) {
|
||||||
|
# Remove any trailing newlines
|
||||||
|
chomp($pairs[1]);
|
||||||
|
debug " Adding ".$pairs[0]."->".$pairs[1]." to exclude list\n";
|
||||||
|
push(@{$exclude_list->{$pairs[0]}}, $pairs[1]);
|
||||||
|
} else {
|
||||||
|
debug " Adding $pairs[0] to exclude list\n";
|
||||||
|
push(@{$exclude_list->{$pairs[0]}}, "AGEN_EXCLUDE_ALL");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($include_arg) {
|
||||||
|
debug "Using include list: $include_arg";
|
||||||
|
my @list = split(/,/, $include_arg);
|
||||||
|
foreach (@list) {
|
||||||
|
my @pairs = split(/-/, $_);
|
||||||
|
if (exists($pairs[1])) {
|
||||||
|
# Remove any trailing newlines
|
||||||
|
chomp($pairs[1]);
|
||||||
|
debug " Adding ".$pairs[0]."->".$pairs[1]." to include list\n";
|
||||||
|
push(@{$include_list->{$pairs[0]}}, $pairs[1]);
|
||||||
|
}
|
||||||
|
# NOTE: it makes no sense to include all as that is the default
|
||||||
|
# so ignore that scenario here, if given
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Find frameworks, components
|
||||||
|
++$step;
|
||||||
|
verbose "\n$step. Searching for MCA frameworks and components\n";
|
||||||
|
|
||||||
|
my $ret;
|
||||||
|
|
||||||
|
# Figure out if we're at the top level of the PMIx tree or not.
|
||||||
|
if (! (-f "VERSION" && -f "configure.ac" && -f $topdir_file)) {
|
||||||
|
print("\n\nYou must run this script from the top-level directory of the PMIx tree.\n\n");
|
||||||
|
my_exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
$m4 .= "\ndnl Project names
|
||||||
|
m4_define([project_name_long], [$project_name_long])
|
||||||
|
m4_define([project_name_short], [$project_name_short])\n";
|
||||||
|
|
||||||
|
# Setup MCA
|
||||||
|
mca_run_global();
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# If we got here, all was good. Run the auto tools.
|
||||||
|
++$step;
|
||||||
|
verbose "\n$step. Running autotools on top-level tree\n\n";
|
||||||
|
|
||||||
|
# Remove old versions of the files (this is probably overkill, but...)
|
||||||
|
verbose "==> Remove stale files\n";
|
||||||
|
find_and_delete(qw/config.guess config.sub depcomp compile install-sh ltconfig
|
||||||
|
ltmain.sh missing mkinstalldirs libtool/);
|
||||||
|
|
||||||
|
# Remove the old m4 file and write the new one
|
||||||
|
verbose "==> Writing m4 file with autogen.pl results\n";
|
||||||
|
unlink($m4_output_file);
|
||||||
|
open(M4, ">$m4_output_file") ||
|
||||||
|
my_die "Can't open $m4_output_file";
|
||||||
|
print M4 $m4;
|
||||||
|
close(M4);
|
||||||
|
|
||||||
|
# Run autoreconf
|
||||||
|
verbose "==> Running autoreconf\n";
|
||||||
|
my $cmd = "autoreconf -ivf --warnings=all,no-obsolete,no-override -I config";
|
||||||
|
safe_system($cmd);
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
verbose "
|
||||||
|
================================================
|
||||||
|
PMIx autogen: completed successfully. w00t!
|
||||||
|
================================================\n\n";
|
||||||
|
|
||||||
|
# Done!
|
||||||
|
exit(0);
|
@ -1,5 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Run all the rest of the Autotools
|
|
||||||
echo "==> Running autoreconf";
|
|
||||||
autoreconf ${autoreconf_args:-"-ivf"}
|
|
@ -1,10 +1,7 @@
|
|||||||
# PMIx copyrights:
|
# Copyright (c) 2013-2016 Intel, Inc. All rights reserved
|
||||||
# Copyright (c) 2013-2015 Intel, Inc. All rights reserved
|
|
||||||
# Copyright (c) 2016 Research Organization for Information Science
|
# Copyright (c) 2016 Research Organization for Information Science
|
||||||
# and Technology (RIST). All rights reserved.
|
# and Technology (RIST). All rights reserved.
|
||||||
#
|
# Copyright (c) 2006-2016 Cisco Systems, Inc. All rights reserved.
|
||||||
#########################
|
|
||||||
#
|
|
||||||
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
|
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
|
||||||
# University Research and Technology
|
# University Research and Technology
|
||||||
# Corporation. All rights reserved.
|
# Corporation. All rights reserved.
|
||||||
@ -15,10 +12,10 @@
|
|||||||
# University of Stuttgart. All rights reserved.
|
# University of Stuttgart. All rights reserved.
|
||||||
# Copyright (c) 2004-2005 The Regents of the University of California.
|
# Copyright (c) 2004-2005 The Regents of the University of California.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
# Copyright (c) 2006-2010 Cisco Systems, Inc. All rights reserved.
|
# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
|
||||||
# Copyright (c) 2010 Oracle and/or its affiliates. All rights
|
# Copyright (c) 2010 Oracle and/or its affiliates. All rights
|
||||||
# reserved.
|
# reserved.
|
||||||
#########################
|
# Copyright (c) 2016 Intel, Inc. All rights reserved.
|
||||||
# $COPYRIGHT$
|
# $COPYRIGHT$
|
||||||
#
|
#
|
||||||
# Additional copyrights may follow
|
# Additional copyrights may follow
|
||||||
@ -26,28 +23,28 @@
|
|||||||
# $HEADER$
|
# $HEADER$
|
||||||
#
|
#
|
||||||
|
|
||||||
EXTRA_DIST += \
|
EXTRA_DIST = \
|
||||||
config/c_get_alignment.m4 \
|
c_get_alignment.m4 \
|
||||||
config/pmix_get_version.sh \
|
pmix_get_version.sh \
|
||||||
config/distscript.sh \
|
distscript.sh \
|
||||||
config/pmix_check_attributes.m4 \
|
pmix_check_attributes.m4 \
|
||||||
config/pmix_check_broken_qsort.m4 \
|
pmix_check_broken_qsort.m4 \
|
||||||
config/pmix_check_compiler_version.m4 \
|
pmix_check_compiler_version.m4 \
|
||||||
config/pmix_check_icc.m4 \
|
pmix_check_icc.m4 \
|
||||||
config/pmix_check_ident.m4 \
|
pmix_check_ident.m4 \
|
||||||
config/pmix_check_munge.m4 \
|
pmix_check_package.m4 \
|
||||||
config/pmix_check_package.m4 \
|
pmix_check_vendor.m4 \
|
||||||
config/pmix_check_sasl.m4 \
|
pmix_check_visibility.m4 \
|
||||||
config/pmix_check_vendor.m4 \
|
pmix_config_subdir.m4 \
|
||||||
config/pmix_check_visibility.m4 \
|
pmix_ensure_contains_optflags.m4 \
|
||||||
config/pmix_ensure_contains_optflags.m4 \
|
pmix_functions.m4 \
|
||||||
config/pmix_functions.m4 \
|
pmix.m4 \
|
||||||
config/pmix.m4 \
|
pmix_search_libs.m4 \
|
||||||
config/pmix_search_libs.m4 \
|
pmix_setup_cc.m4 \
|
||||||
config/pmix_setup_cc.m4 \
|
pmix_setup_hwloc.m4 \
|
||||||
config/pmix_setup_hwloc.m4 \
|
pmix_setup_libevent.m4 \
|
||||||
config/pmix_setup_libevent.m4
|
pmix_mca_priority_sort.pl
|
||||||
|
|
||||||
|
|
||||||
maintainer-clean-local:
|
maintainer-clean-local:
|
||||||
rm -f config/pmix_get_version.sh
|
rm -f pmix_get_version.sh
|
||||||
|
@ -10,19 +10,18 @@ dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|||||||
dnl University of Stuttgart. All rights reserved.
|
dnl University of Stuttgart. All rights reserved.
|
||||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||||
dnl All rights reserved.
|
dnl All rights reserved.
|
||||||
dnl Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved.
|
dnl Copyright (c) 2006-2016 Cisco Systems, Inc. All rights reserved.
|
||||||
dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
|
dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
|
||||||
dnl Copyright (c) 2009 IBM Corporation. All rights reserved.
|
dnl Copyright (c) 2009 IBM Corporation. All rights reserved.
|
||||||
dnl Copyright (c) 2009 Los Alamos National Security, LLC. All rights
|
dnl Copyright (c) 2009 Los Alamos National Security, LLC. All rights
|
||||||
dnl reserved.
|
dnl reserved.
|
||||||
dnl Copyright (c) 2009-2011 Oak Ridge National Labs. All rights reserved.
|
dnl Copyright (c) 2009-2011 Oak Ridge National Labs. All rights reserved.
|
||||||
dnl Copyright (c) 2011-2013 NVIDIA Corporation. All rights reserved.
|
dnl Copyright (c) 2011-2013 NVIDIA Corporation. All rights reserved.
|
||||||
dnl Copyright (c) 2013-2016 Intel, Inc. All rights reserved
|
dnl Copyright (c) 2013-2015 Intel, Inc. All rights reserved
|
||||||
dnl Copyright (c) 2015 Research Organization for Information Science
|
dnl Copyright (c) 2015 Research Organization for Information Science
|
||||||
dnl and Technology (RIST). All rights reserved.
|
dnl and Technology (RIST). All rights reserved.
|
||||||
dnl Copyright (c) 2016 Mellanox Technologies, Inc.
|
dnl Copyright (c) 2016 Mellanox Technologies, Inc.
|
||||||
dnl All rights reserved.
|
dnl All rights reserved.
|
||||||
dnl Copyright (c) 2016 IBM Corporation. All rights reserved.
|
|
||||||
dnl
|
dnl
|
||||||
dnl $COPYRIGHT$
|
dnl $COPYRIGHT$
|
||||||
dnl
|
dnl
|
||||||
@ -78,12 +77,13 @@ AC_DEFUN([PMIX_SETUP_CORE],[
|
|||||||
if test "$?" != "0"; then
|
if test "$?" != "0"; then
|
||||||
AC_MSG_ERROR([Cannot continue])
|
AC_MSG_ERROR([Cannot continue])
|
||||||
fi
|
fi
|
||||||
PMIX_RELEASE_DATE="`$PMIX_top_srcdir/config/pmix_get_version.sh $PMIX_top_srcdir/VERSION --release-date`"
|
AC_MSG_RESULT([$PMIX_VERSION])
|
||||||
AC_SUBST(PMIX_VERSION)
|
AC_SUBST(PMIX_VERSION)
|
||||||
AC_DEFINE_UNQUOTED([PMIX_VERSION], ["$PMIX_VERSION"],
|
AC_DEFINE_UNQUOTED([PMIX_VERSION], ["$PMIX_VERSION"],
|
||||||
[The library version is always available, contrary to VERSION])
|
[The library version is always available, contrary to VERSION])
|
||||||
|
|
||||||
|
PMIX_RELEASE_DATE="`$PMIX_top_srcdir/config/pmix_get_version.sh $PMIX_top_srcdir/VERSION --release-date`"
|
||||||
AC_SUBST(PMIX_RELEASE_DATE)
|
AC_SUBST(PMIX_RELEASE_DATE)
|
||||||
AC_MSG_RESULT([$PMIX_VERSION])
|
|
||||||
|
|
||||||
# Save the breakdown the version information
|
# Save the breakdown the version information
|
||||||
AC_MSG_CHECKING([for pmix major version])
|
AC_MSG_CHECKING([for pmix major version])
|
||||||
@ -92,31 +92,25 @@ AC_DEFUN([PMIX_SETUP_CORE],[
|
|||||||
AC_MSG_ERROR([Cannot continue])
|
AC_MSG_ERROR([Cannot continue])
|
||||||
fi
|
fi
|
||||||
AC_SUBST(PMIX_MAJOR_VERSION)
|
AC_SUBST(PMIX_MAJOR_VERSION)
|
||||||
AC_DEFINE_UNQUOTED([PMIX_MAJOR_VERSION], ["$PMIX_MAJOR_VERSION"],
|
AC_DEFINE_UNQUOTED([PMIX_MAJOR_VERSION], [$PMIX_MAJOR_VERSION],
|
||||||
[The library major version is always available, contrary to VERSION])
|
[The library major version is always available, contrary to VERSION])
|
||||||
|
|
||||||
AC_DEFINE_UNQUOTED([PMIX_VERSION_MAJOR], [${PMIX_MAJOR_VERSION}L],
|
|
||||||
[The library major version as integer])
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([for pmix minor version])
|
AC_MSG_CHECKING([for pmix minor version])
|
||||||
PMIX_MINOR_VERSION="`$PMIX_top_srcdir/config/pmix_get_version.sh $PMIX_top_srcdir/VERSION --minor`"
|
PMIX_MINOR_VERSION="`$PMIX_top_srcdir/config/pmix_get_version.sh $PMIX_top_srcdir/VERSION --minor`"
|
||||||
if test "$?" != "0"; then
|
if test "$?" != "0"; then
|
||||||
AC_MSG_ERROR([Cannot continue])
|
AC_MSG_ERROR([Cannot continue])
|
||||||
fi
|
fi
|
||||||
AC_SUBST(PMIX_MINOR_VERSION)
|
AC_SUBST(PMIX_MINOR_VERSION)
|
||||||
AC_DEFINE_UNQUOTED([PMIX_MINOR_VERSION], ["$PMIX_MINOR_VERSION"],
|
AC_DEFINE_UNQUOTED([PMIX_MINOR_VERSION], [$PMIX_MINOR_VERSION],
|
||||||
[The library minor version is always available, contrary to VERSION])
|
[The library minor version is always available, contrary to VERSION])
|
||||||
|
|
||||||
AC_DEFINE_UNQUOTED([PMIX_VERSION_MINOR], [${PMIX_MINOR_VERSION}L],
|
|
||||||
[The library minor version as integer])
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([for pmix release version])
|
AC_MSG_CHECKING([for pmix release version])
|
||||||
PMIX_RELEASE_VERSION="`$PMIX_top_srcdir/config/pmix_get_version.sh $PMIX_top_srcdir/VERSION --release`"
|
PMIX_RELEASE_VERSION="`$PMIX_top_srcdir/config/pmix_get_version.sh $PMIX_top_srcdir/VERSION --release`"
|
||||||
if test "$?" != "0"; then
|
if test "$?" != "0"; then
|
||||||
AC_MSG_ERROR([Cannot continue])
|
AC_MSG_ERROR([Cannot continue])
|
||||||
fi
|
fi
|
||||||
AC_SUBST(PMIX_RELEASE_VERSION)
|
AC_SUBST(PMIX_RELEASE_VERSION)
|
||||||
AC_DEFINE_UNQUOTED([PMIX_RELEASE_VERSION], ["$PMIX_RELEASE_VERSION"],
|
AC_DEFINE_UNQUOTED([PMIX_RELEASE_VERSION], [$PMIX_RELEASE_VERSION],
|
||||||
[The library release version is always available, contrary to VERSION])
|
[The library release version is always available, contrary to VERSION])
|
||||||
|
|
||||||
# Debug mode?
|
# Debug mode?
|
||||||
@ -136,29 +130,11 @@ AC_DEFUN([PMIX_SETUP_CORE],[
|
|||||||
AC_MSG_CHECKING([for pmix directory prefix])
|
AC_MSG_CHECKING([for pmix directory prefix])
|
||||||
AC_MSG_RESULT(m4_ifval([$1], pmix_config_prefix, [(none)]))
|
AC_MSG_RESULT(m4_ifval([$1], pmix_config_prefix, [(none)]))
|
||||||
|
|
||||||
AC_CONFIG_HEADERS(pmix_config_prefix[include/pmix/autogen/config.h])
|
# Note that private/config.h *MUST* be listed first so that it
|
||||||
|
# becomes the "main" config header file. Any AC-CONFIG-HEADERS
|
||||||
# What prefix are we using?
|
# after that (pmix/config.h) will only have selective #defines
|
||||||
AC_MSG_CHECKING([for pmix symbol prefix])
|
# replaced, not the entire file.
|
||||||
AS_IF([test "$pmix_symbol_prefix_value" = ""],
|
AC_CONFIG_HEADERS(pmix_config_prefix[src/include/pmix_config.h])
|
||||||
[AS_IF([test "$with_pmix_symbol_prefix" = ""],
|
|
||||||
[pmix_symbol_prefix_value=pmix_],
|
|
||||||
[pmix_symbol_prefix_value=$with_pmix_symbol_prefix])])
|
|
||||||
AC_DEFINE_UNQUOTED(PMIX_SYM_PREFIX, [$pmix_symbol_prefix_value],
|
|
||||||
[The pmix symbol prefix])
|
|
||||||
# Ensure to [] escape the whole next line so that we can get the
|
|
||||||
# proper tr tokens
|
|
||||||
[pmix_symbol_prefix_value_caps="`echo $pmix_symbol_prefix_value | tr '[:lower:]' '[:upper:]'`"]
|
|
||||||
AC_DEFINE_UNQUOTED(PMIX_SYM_PREFIX_CAPS, [$pmix_symbol_prefix_value_caps],
|
|
||||||
[The pmix symbol prefix in all caps])
|
|
||||||
AC_MSG_RESULT([$pmix_symbol_prefix_value])
|
|
||||||
|
|
||||||
# Give an easy #define to know if we need to transform all the
|
|
||||||
# pmix names
|
|
||||||
AH_TEMPLATE([PMIX_SYM_TRANSFORM], [Whether we need to re-define all the pmix public symbols or not])
|
|
||||||
AS_IF([test "$pmix_symbol_prefix_value" = "pmix_"],
|
|
||||||
[AC_DEFINE([PMIX_SYM_TRANSFORM], [0])],
|
|
||||||
[AC_DEFINE([PMIX_SYM_TRANSFORM], [1])])
|
|
||||||
|
|
||||||
# GCC specifics.
|
# GCC specifics.
|
||||||
if test "x$GCC" = "xyes"; then
|
if test "x$GCC" = "xyes"; then
|
||||||
@ -324,13 +300,14 @@ AC_DEFUN([PMIX_SETUP_CORE],[
|
|||||||
sys/wait.h syslog.h \
|
sys/wait.h syslog.h \
|
||||||
time.h unistd.h dirent.h \
|
time.h unistd.h dirent.h \
|
||||||
crt_externs.h signal.h \
|
crt_externs.h signal.h \
|
||||||
ioLib.h sockLib.h hostLib.h limits.h])
|
ioLib.h sockLib.h hostLib.h limits.h \
|
||||||
|
sys/statfs.h sys/statvfs.h])
|
||||||
|
|
||||||
# Note that sometimes we have <stdbool.h>, but it doesn't work (e.g.,
|
# Note that sometimes we have <stdbool.h>, but it doesn't work (e.g.,
|
||||||
# have both Portland and GNU installed; using pgcc will find GNU's
|
# have both Portland and GNU installed; using pgcc will find GNU's
|
||||||
# <stdbool.h>, which all it does -- by standard -- is define "bool" to
|
# <stdbool.h>, which all it does -- by standard -- is define "bool" to
|
||||||
# "_Bool" [see
|
# "_Bool" [see
|
||||||
# http://www.opengroup.org/onlinepubs/009695399/basedefs/stdbool.h.html],
|
# http://pmixw.opengroup.org/onlinepubs/009695399/basedefs/stdbool.h.html],
|
||||||
# and Portland has no idea what to do with _Bool).
|
# and Portland has no idea what to do with _Bool).
|
||||||
|
|
||||||
# So first figure out if we have <stdbool.h> (i.e., check the value of
|
# So first figure out if we have <stdbool.h> (i.e., check the value of
|
||||||
@ -467,6 +444,7 @@ AC_DEFUN([PMIX_SETUP_CORE],[
|
|||||||
[#include <sys/types.h>
|
[#include <sys/types.h>
|
||||||
#include <sys/socket.h> ])
|
#include <sys/socket.h> ])
|
||||||
|
|
||||||
|
#
|
||||||
# Check for ptrdiff type. Yes, there are platforms where
|
# Check for ptrdiff type. Yes, there are platforms where
|
||||||
# sizeof(void*) != sizeof(long) (64 bit Windows, apparently).
|
# sizeof(void*) != sizeof(long) (64 bit Windows, apparently).
|
||||||
#
|
#
|
||||||
@ -487,6 +465,34 @@ AC_DEFUN([PMIX_SETUP_CORE],[
|
|||||||
[type to use for ptrdiff_t])
|
[type to use for ptrdiff_t])
|
||||||
AC_MSG_RESULT([$pmix_ptrdiff_t (size: $pmix_ptrdiff_size)])
|
AC_MSG_RESULT([$pmix_ptrdiff_t (size: $pmix_ptrdiff_size)])
|
||||||
|
|
||||||
|
##################################
|
||||||
|
# Linker characteristics
|
||||||
|
##################################
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([the linker for support for the -fini option])
|
||||||
|
PMIX_VAR_SCOPE_PUSH([LDFLAGS_save])
|
||||||
|
LDFLAGS_save=$LDFLAGS
|
||||||
|
LDFLAGS="$LDFLAGS_save -Wl,-fini -Wl,finalize"
|
||||||
|
AC_TRY_LINK([void finalize (void) {}], [], [AC_MSG_RESULT([yes])
|
||||||
|
pmix_ld_have_fini=1], [AC_MSG_RESULT([no])
|
||||||
|
pmix_ld_have_fini=0])
|
||||||
|
LDFLAGS=$LDFLAGS_save
|
||||||
|
PMIX_VAR_SCOPE_POP
|
||||||
|
|
||||||
|
pmix_destructor_use_fini=0
|
||||||
|
pmix_no_destructor=0
|
||||||
|
if test x$pmix_cv___attribute__destructor = x0 ; then
|
||||||
|
if test x$pmix_ld_have_fini = x1 ; then
|
||||||
|
pmix_destructor_use_fini=1
|
||||||
|
else
|
||||||
|
pmix_no_destructor=1;
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_DEFINE_UNQUOTED(PMIX_NO_LIB_DESTRUCTOR, [$pmix_no_destructor],
|
||||||
|
[Whether libraries can be configured with destructor functions])
|
||||||
|
AM_CONDITIONAL(PMIX_DESTRUCTOR_USE_FINI, [test x$pmix_destructor_use_fini = x1])
|
||||||
|
|
||||||
##################################
|
##################################
|
||||||
# Libraries
|
# Libraries
|
||||||
##################################
|
##################################
|
||||||
@ -501,14 +507,14 @@ AC_DEFUN([PMIX_SETUP_CORE],[
|
|||||||
# Darwin doesn't need -lm, as it's a symlink to libSystem.dylib
|
# Darwin doesn't need -lm, as it's a symlink to libSystem.dylib
|
||||||
PMIX_SEARCH_LIBS_CORE([ceil], [m])
|
PMIX_SEARCH_LIBS_CORE([ceil], [m])
|
||||||
|
|
||||||
AC_CHECK_FUNCS([asprintf snprintf vasprintf vsnprintf strsignal socketpair strncpy_s usleep getpeereid strnlen])
|
AC_CHECK_FUNCS([asprintf snprintf vasprintf vsnprintf strsignal socketpair strncpy_s usleep statfs statvfs getpeereid strnlen])
|
||||||
|
|
||||||
# On some hosts, htonl is a define, so the AC_CHECK_FUNC will get
|
# On some hosts, htonl is a define, so the AC_CHECK_FUNC will get
|
||||||
# confused. On others, it's in the standard library, but stubbed with
|
# confused. On others, it's in the standard library, but stubbed with
|
||||||
# the magic glibc foo as not implemented. and on other systems, it's
|
# the magic glibc foo as not implemented. and on other systems, it's
|
||||||
# just not there. This covers all cases.
|
# just not there. This covers all cases.
|
||||||
AC_CACHE_CHECK([for htonl define],
|
AC_CACHE_CHECK([for htonl define],
|
||||||
[ompi_cv_htonl_define],
|
[pmix_cv_htonl_define],
|
||||||
[AC_PREPROC_IFELSE([AC_LANG_PROGRAM([
|
[AC_PREPROC_IFELSE([AC_LANG_PROGRAM([
|
||||||
#ifdef HAVE_SYS_TYPES_H
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@ -522,12 +528,16 @@ AC_DEFUN([PMIX_SETUP_CORE],[
|
|||||||
#ifndef ntohl
|
#ifndef ntohl
|
||||||
#error "ntohl not defined"
|
#error "ntohl not defined"
|
||||||
#endif
|
#endif
|
||||||
])], [ompi_cv_htonl_define=yes], [ompi_cv_htonl_define=no])])
|
])], [pmix_cv_htonl_define=yes], [pmix_cv_htonl_define=no])])
|
||||||
AC_CHECK_FUNC([htonl], [ompi_have_htonl=yes], [ompi_have_htonl=no])
|
AC_CHECK_FUNC([htonl], [pmix_have_htonl=yes], [pmix_have_htonl=no])
|
||||||
AS_IF([test "$ompi_cv_htonl_define" = "yes" || test "$ompi_have_htonl" = "yes"],
|
AS_IF([test "$pmix_cv_htonl_define" = "yes" || test "$pmix_have_htonl" = "yes"],
|
||||||
[AC_DEFINE_UNQUOTED([HAVE_UNIX_BYTESWAP], [1],
|
[AC_DEFINE_UNQUOTED([HAVE_UNIX_BYTESWAP], [1],
|
||||||
[whether unix byteswap routines -- htonl, htons, nothl, ntohs -- are available])])
|
[whether unix byteswap routines -- htonl, htons, nothl, ntohs -- are available])])
|
||||||
|
|
||||||
|
# check pandoc separately so we can setup an AM_CONDITIONAL off it
|
||||||
|
AC_CHECK_PROG([pmix_have_pandoc], [pandoc], [yes], [no])
|
||||||
|
AM_CONDITIONAL([PMIX_HAVE_PANDOC], [test "x$pmix_have_pandoc" = "xyes"])
|
||||||
|
|
||||||
#
|
#
|
||||||
# Make sure we can copy va_lists (need check declared, not linkable)
|
# Make sure we can copy va_lists (need check declared, not linkable)
|
||||||
#
|
#
|
||||||
@ -595,6 +605,18 @@ AC_DEFUN([PMIX_SETUP_CORE],[
|
|||||||
|
|
||||||
PMIX_MUNGE_CONFIG
|
PMIX_MUNGE_CONFIG
|
||||||
|
|
||||||
|
##################################
|
||||||
|
# MCA
|
||||||
|
##################################
|
||||||
|
|
||||||
|
pmix_show_title "Modular Component Architecture (MCA) setup"
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for subdir args])
|
||||||
|
PMIX_CONFIG_SUBDIR_ARGS([pmix_subdir_args])
|
||||||
|
AC_MSG_RESULT([$pmix_subdir_args])
|
||||||
|
|
||||||
|
PMIX_MCA
|
||||||
|
|
||||||
############################################################################
|
############################################################################
|
||||||
# final compiler config
|
# final compiler config
|
||||||
############################################################################
|
############################################################################
|
||||||
@ -636,7 +658,14 @@ AC_DEFUN([PMIX_SETUP_CORE],[
|
|||||||
|
|
||||||
pmix_show_subtitle "Final output"
|
pmix_show_subtitle "Final output"
|
||||||
|
|
||||||
AC_CONFIG_FILES(pmix_config_prefix[Makefile])
|
AC_CONFIG_FILES(
|
||||||
|
pmix_config_prefix[Makefile]
|
||||||
|
pmix_config_prefix[config/Makefile]
|
||||||
|
pmix_config_prefix[include/Makefile]
|
||||||
|
pmix_config_prefix[src/Makefile]
|
||||||
|
pmix_config_prefix[src/util/keyval/Makefile]
|
||||||
|
pmix_config_prefix[src/mca/base/Makefile]
|
||||||
|
)
|
||||||
|
|
||||||
# Success
|
# Success
|
||||||
$2
|
$2
|
||||||
@ -654,6 +683,16 @@ AC_DEFUN([PMIX_DEFINE_ARGS],[
|
|||||||
[pmix_mode=standalone
|
[pmix_mode=standalone
|
||||||
AC_MSG_RESULT([no])])
|
AC_MSG_RESULT([no])])
|
||||||
|
|
||||||
|
# Rename symbols?
|
||||||
|
AC_ARG_WITH([pmix-symbol-rename],
|
||||||
|
AC_HELP_STRING([--with-pmix-symbol-rename=FILE],
|
||||||
|
[Provide an include file that contains directives to rename PMIx symbols]))
|
||||||
|
AS_IF([test ! -z "$with_pmix_symbol_rename" && test "$with_pmix_symbol_rename" != "yes"],
|
||||||
|
[pmix_symbol_rename="$with_pmix_symbol_rename"],
|
||||||
|
[pmix_symbol_rename=\"src/include/rename.h\"])
|
||||||
|
AC_DEFINE_UNQUOTED(PMIX_SYMBOL_RENAME, [$pmix_symbol_rename],
|
||||||
|
[The pmix symbol rename include directive])
|
||||||
|
|
||||||
# Install tests and examples?
|
# Install tests and examples?
|
||||||
AC_MSG_CHECKING([if tests and examples are to be installed])
|
AC_MSG_CHECKING([if tests and examples are to be installed])
|
||||||
AC_ARG_WITH([tests-examples],
|
AC_ARG_WITH([tests-examples],
|
||||||
@ -665,11 +704,6 @@ AC_DEFUN([PMIX_DEFINE_ARGS],[
|
|||||||
[pmix_tests=yes
|
[pmix_tests=yes
|
||||||
AC_MSG_RESULT([yes])])
|
AC_MSG_RESULT([yes])])
|
||||||
|
|
||||||
# Change the symbol prefix?
|
|
||||||
AC_ARG_WITH([pmix-symbol-prefix],
|
|
||||||
AC_HELP_STRING([--with-pmix-symbol-prefix=STRING],
|
|
||||||
[STRING can be any valid C symbol name. It will be prefixed to all public PMIx symbols. Default: "pmix_"]))
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Is this a developer copy?
|
# Is this a developer copy?
|
||||||
#
|
#
|
||||||
@ -751,6 +785,20 @@ else
|
|||||||
fi
|
fi
|
||||||
AM_CONDITIONAL(WANT_INSTALL_HEADERS, test "$WANT_INSTALL_HEADERS" = 1)
|
AM_CONDITIONAL(WANT_INSTALL_HEADERS, test "$WANT_INSTALL_HEADERS" = 1)
|
||||||
|
|
||||||
|
#
|
||||||
|
# Support per-user config files?
|
||||||
|
#
|
||||||
|
AC_ARG_ENABLE([per-user-config-files],
|
||||||
|
[AC_HELP_STRING([--enable-per-user-config-files],
|
||||||
|
[Disable per-user configuration files, to save disk accesses during job start-up. This is likely desirable for large jobs. Note that this can also be acheived by environment variables at run-time. (default: enabled)])])
|
||||||
|
if test "$enable_per_user_config_files" = "no" ; then
|
||||||
|
result=0
|
||||||
|
else
|
||||||
|
result=1
|
||||||
|
fi
|
||||||
|
AC_DEFINE_UNQUOTED([PMIX_WANT_HOME_CONFIG_FILES], [$result],
|
||||||
|
[Enable per-user config files])
|
||||||
|
|
||||||
#
|
#
|
||||||
# Do we want the pretty-print stack trace feature?
|
# Do we want the pretty-print stack trace feature?
|
||||||
#
|
#
|
||||||
@ -770,26 +818,6 @@ AC_DEFINE_UNQUOTED([PMIX_WANT_PRETTY_PRINT_STACKTRACE],
|
|||||||
[$WANT_PRETTY_PRINT_STACKTRACE],
|
[$WANT_PRETTY_PRINT_STACKTRACE],
|
||||||
[if want pretty-print stack trace feature])
|
[if want pretty-print stack trace feature])
|
||||||
|
|
||||||
#
|
|
||||||
# Do we want the shared memory datastore usage?
|
|
||||||
#
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([if want special dstore usage])
|
|
||||||
AC_ARG_ENABLE([dstore],
|
|
||||||
[AC_HELP_STRING([--enable-dstore],
|
|
||||||
[Using special datastore (default: disabled)])])
|
|
||||||
if test "$enable_dstore" = "yes" ; then
|
|
||||||
AC_MSG_RESULT([yes])
|
|
||||||
WANT_DSTORE=1
|
|
||||||
else
|
|
||||||
AC_MSG_RESULT([no])
|
|
||||||
WANT_DSTORE=0
|
|
||||||
fi
|
|
||||||
AC_DEFINE_UNQUOTED([PMIX_ENABLE_DSTORE],
|
|
||||||
[$WANT_DSTORE],
|
|
||||||
[if want special dstore feature])
|
|
||||||
AM_CONDITIONAL([WANT_DSTORE],[test "x$enable_dstore" = "xyes"])
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Ident string
|
# Ident string
|
||||||
#
|
#
|
||||||
@ -832,11 +860,22 @@ fi
|
|||||||
AC_DEFINE_UNQUOTED([PMIX_ENABLE_TIMING], [$WANT_TIMING],
|
AC_DEFINE_UNQUOTED([PMIX_ENABLE_TIMING], [$WANT_TIMING],
|
||||||
[Whether we want developer-level timing support or not])
|
[Whether we want developer-level timing support or not])
|
||||||
|
|
||||||
])dnl
|
#
|
||||||
|
# Install header files
|
||||||
|
#
|
||||||
|
AC_MSG_CHECKING([if want to head developer-level header files])
|
||||||
|
AC_ARG_WITH(devel-headers,
|
||||||
|
AC_HELP_STRING([--with-devel-headers],
|
||||||
|
[also install developer-level header files (only for internal PMIx developers, default: disabled)]))
|
||||||
|
if test "$with_devel_headers" = "yes"; then
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
WANT_INSTALL_HEADERS=1
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
WANT_INSTALL_HEADERS=0
|
||||||
|
fi
|
||||||
|
|
||||||
# Specify the symbol prefix
|
AM_CONDITIONAL([WANT_INSTALL_HEADERS], [test $WANT_INSTALL_HEADERS -eq 1])
|
||||||
AC_DEFUN([PMIX_SET_SYMBOL_PREFIX],[
|
|
||||||
pmix_symbol_prefix_value=$1
|
|
||||||
])dnl
|
])dnl
|
||||||
|
|
||||||
# This must be a standalone routine so that it can be called both by
|
# This must be a standalone routine so that it can be called both by
|
||||||
|
147
opal/mca/pmix/pmix2x/pmix/config/pmix_config_subdir.m4
Обычный файл
147
opal/mca/pmix/pmix2x/pmix/config/pmix_config_subdir.m4
Обычный файл
@ -0,0 +1,147 @@
|
|||||||
|
dnl -*- shell-script -*-
|
||||||
|
dnl
|
||||||
|
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||||
|
dnl University Research and Technology
|
||||||
|
dnl Corporation. All rights reserved.
|
||||||
|
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||||
|
dnl of Tennessee Research Foundation. All rights
|
||||||
|
dnl reserved.
|
||||||
|
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||||
|
dnl University of Stuttgart. All rights reserved.
|
||||||
|
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||||
|
dnl All rights reserved.
|
||||||
|
dnl Copyright (c) 2012-2016 Cisco Systems, Inc. All rights reserved.
|
||||||
|
dnl Copyright (c) 2014 Intel, Inc. All rights reserved.
|
||||||
|
dnl Copyright (c) 2015 Research Organization for Information Science
|
||||||
|
dnl and Technology (RIST). All rights reserved.
|
||||||
|
dnl $COPYRIGHT$
|
||||||
|
dnl
|
||||||
|
dnl Additional copyrights may follow
|
||||||
|
dnl
|
||||||
|
dnl $HEADER$
|
||||||
|
dnl
|
||||||
|
|
||||||
|
AC_DEFUN([PMIX_CONFIG_SUBDIR],[
|
||||||
|
PMIX_VAR_SCOPE_PUSH([subdir_parent sub_configure subdir_dir subdir_srcdir subdir_cache_file subdir_args subdir_dots total_dir dir_part temp])
|
||||||
|
|
||||||
|
#
|
||||||
|
# Invoke configure in a specific subdirectory.
|
||||||
|
#
|
||||||
|
# $1 is the directory to invoke in
|
||||||
|
# $2 is the list of arguments to pass
|
||||||
|
# $3 is actions to execute upon success
|
||||||
|
# $4 is actions to execute upon failure
|
||||||
|
#
|
||||||
|
subdir_dir="$1"
|
||||||
|
subdir_args="$2"
|
||||||
|
subdir_success="$3"
|
||||||
|
subdir_failure="$4"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Sanity checks
|
||||||
|
#
|
||||||
|
|
||||||
|
if test "$subdir_dir" != ":" && test -d $srcdir/$subdir_dir; then
|
||||||
|
AC_MSG_NOTICE([PMIX configuring in $subdir_dir])
|
||||||
|
|
||||||
|
#
|
||||||
|
# Gotta check where srcdir is for VPATH builds. If srcdir is not
|
||||||
|
# ., then we need to mkdir the subdir. Otherwise, we can just cd
|
||||||
|
# into it.
|
||||||
|
#
|
||||||
|
|
||||||
|
case $srcdir in
|
||||||
|
.)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
{ case $subdir_dir in
|
||||||
|
[[\\/]]* | ?:[[\\/]]* ) total_dir=;;
|
||||||
|
*) total_dir=.;;
|
||||||
|
esac
|
||||||
|
temp=$subdir_dir
|
||||||
|
for dir_part in `IFS='/\\'; set X $temp; shift; echo "$[@]"`; do
|
||||||
|
case $dir_part in
|
||||||
|
# Skip DOS drivespec
|
||||||
|
?:) total_dir=$dir_part ;;
|
||||||
|
*) total_dir=$total_dir/$dir_part
|
||||||
|
test -d "$total_dir" ||
|
||||||
|
mkdir "$total_dir" ||
|
||||||
|
AC_MSG_ERROR([cannot create $subdir_dir])
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done; }
|
||||||
|
|
||||||
|
if test -d ./$subdir_dir; then :;
|
||||||
|
else
|
||||||
|
AC_MSG_ERROR([cannot create `pwd`/$subdir_dir])
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
#
|
||||||
|
# Move into the target directory
|
||||||
|
#
|
||||||
|
|
||||||
|
subdir_parent=`pwd`
|
||||||
|
cd $subdir_dir
|
||||||
|
|
||||||
|
#
|
||||||
|
# Make a "../" for each directory in $subdir_dir.
|
||||||
|
#
|
||||||
|
|
||||||
|
subdir_dots=`[echo $subdir_dir | sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g]'`
|
||||||
|
#
|
||||||
|
# Construct the --srcdir argument
|
||||||
|
#
|
||||||
|
|
||||||
|
case $srcdir in
|
||||||
|
.)
|
||||||
|
# In place
|
||||||
|
subdir_srcdir="$srcdir"
|
||||||
|
;;
|
||||||
|
[[\\/]* | ?:[\\/]*] )
|
||||||
|
# Absolute path
|
||||||
|
subdir_srcdir="$srcdir/$subdir_dir"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
# Relative path
|
||||||
|
subdir_srcdir="$subdir_dots$srcdir/$subdir_dir"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
#
|
||||||
|
# Construct the --cache-file argument
|
||||||
|
#
|
||||||
|
|
||||||
|
# BWB - subdir caching is a pain since we change CFLAGS and all that.
|
||||||
|
# Just disable it for now
|
||||||
|
subdir_cache_file="/dev/null"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Invoke the configure script in the subdirectory
|
||||||
|
#
|
||||||
|
|
||||||
|
sub_configure="$SHELL '$subdir_srcdir/configure'"
|
||||||
|
AC_MSG_NOTICE([running $sub_configure $subdir_args --cache-file=$subdir_cache_file --srcdir=$subdir_srcdir --disable-option-checking])
|
||||||
|
eval "$sub_configure $subdir_args \
|
||||||
|
--cache-file=\"\$subdir_cache_file\" --srcdir=\"$subdir_srcdir\" --disable-option-checking"
|
||||||
|
if test "$?" = "0"; then
|
||||||
|
eval $subdir_success
|
||||||
|
AC_MSG_NOTICE([$sub_configure succeeded for $subdir_dir])
|
||||||
|
else
|
||||||
|
eval $subdir_failure
|
||||||
|
AC_MSG_NOTICE([$sub_configure *failed* for $subdir_dir])
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Go back to the topdir
|
||||||
|
#
|
||||||
|
|
||||||
|
cd $subdir_parent
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Clean up
|
||||||
|
#
|
||||||
|
|
||||||
|
PMIX_VAR_SCOPE_POP])dnl
|
84
opal/mca/pmix/pmix2x/pmix/config/pmix_config_subdir_args.m4
Обычный файл
84
opal/mca/pmix/pmix2x/pmix/config/pmix_config_subdir_args.m4
Обычный файл
@ -0,0 +1,84 @@
|
|||||||
|
dnl -*- shell-script -*-
|
||||||
|
dnl
|
||||||
|
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||||
|
dnl University Research and Technology
|
||||||
|
dnl Corporation. All rights reserved.
|
||||||
|
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||||
|
dnl of Tennessee Research Foundation. All rights
|
||||||
|
dnl reserved.
|
||||||
|
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||||
|
dnl University of Stuttgart. All rights reserved.
|
||||||
|
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||||
|
dnl All rights reserved.
|
||||||
|
dnl Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
|
||||||
|
dnl Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
|
||||||
|
dnl $COPYRIGHT$
|
||||||
|
dnl
|
||||||
|
dnl Additional copyrights may follow
|
||||||
|
dnl
|
||||||
|
dnl $HEADER$
|
||||||
|
dnl
|
||||||
|
|
||||||
|
AC_DEFUN([PMIX_CONFIG_SUBDIR_ARGS],[
|
||||||
|
PMIX_VAR_SCOPE_PUSH([subdirs_str subdirs_skip subdirs_args subdirs_arg])
|
||||||
|
#
|
||||||
|
# Invoke configure in subdirectories.
|
||||||
|
#
|
||||||
|
# $1 is the name of the variable to assign the output to
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# Make a list of command line args --eliminate the --srcdir and
|
||||||
|
# --cache-file args, because we need to replace them with our own
|
||||||
|
# values when invoking the sub-configure script. Also eliminate
|
||||||
|
# the --with-platform as this will confuse any subdir with
|
||||||
|
# similar options
|
||||||
|
#
|
||||||
|
|
||||||
|
subdirs_args=
|
||||||
|
subdirs_skip=no
|
||||||
|
|
||||||
|
eval "set x $ac_configure_args"
|
||||||
|
shift
|
||||||
|
for subdirs_arg
|
||||||
|
do
|
||||||
|
if test "$subdirs_skip" = "yes"; then
|
||||||
|
subdirs_skip=no
|
||||||
|
else
|
||||||
|
case $subdirs_arg in
|
||||||
|
-cache-file | --cache-file | -cache | --cache)
|
||||||
|
subdirs_skip=yes
|
||||||
|
;;
|
||||||
|
--config-cache | -C)
|
||||||
|
;;
|
||||||
|
-cache-file=* | --cache-file=*)
|
||||||
|
;;
|
||||||
|
-srcdir | --srcdir)
|
||||||
|
subdirs_skip=yes
|
||||||
|
;;
|
||||||
|
-srcdir=* | --srcdir=*)
|
||||||
|
;;
|
||||||
|
-with-platform=* | --with-platform=*)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
case $subdir_arg in
|
||||||
|
*\'*) subdir_arg=`echo "$subdir_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
|
||||||
|
esac
|
||||||
|
subdirs_args="$subdirs_args '$subdirs_arg'"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
#
|
||||||
|
# Assign the output
|
||||||
|
#
|
||||||
|
|
||||||
|
subdirs_str=$1=\"$subdirs_args\"
|
||||||
|
eval "$subdirs_str"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Clean up
|
||||||
|
#
|
||||||
|
|
||||||
|
PMIX_VAR_SCOPE_POP])dnl
|
@ -12,7 +12,7 @@ dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
|||||||
dnl All rights reserved.
|
dnl All rights reserved.
|
||||||
dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
|
dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
|
||||||
dnl Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
|
dnl Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
|
||||||
dnl Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved.
|
dnl Copyright (c) 2009-2016 Cisco Systems, Inc. All rights reserved.
|
||||||
dnl Copyright (c) 2013 Intel, Inc. All rights reserved
|
dnl Copyright (c) 2013 Intel, Inc. All rights reserved
|
||||||
dnl
|
dnl
|
||||||
dnl $COPYRIGHT$
|
dnl $COPYRIGHT$
|
||||||
@ -79,6 +79,15 @@ EOF
|
|||||||
PMIX_LOG_MSG([--- ${1}], 1)
|
PMIX_LOG_MSG([--- ${1}], 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pmix_show_verbose() {
|
||||||
|
if test "$V" = "1"; then
|
||||||
|
cat <<EOF
|
||||||
|
+++ VERBOSE: ${1}
|
||||||
|
EOF
|
||||||
|
PMIX_LOG_MSG([--- ${1}], 1)
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Save some stats about this build
|
# Save some stats about this build
|
||||||
#
|
#
|
||||||
@ -347,6 +356,35 @@ dnl #######################################################################
|
|||||||
dnl #######################################################################
|
dnl #######################################################################
|
||||||
dnl #######################################################################
|
dnl #######################################################################
|
||||||
|
|
||||||
|
# PMIX_FLAGS_APPEND_UNIQ(variable, new_argument)
|
||||||
|
# ----------------------------------------------
|
||||||
|
# Append new_argument to variable if:
|
||||||
|
#
|
||||||
|
# - the argument does not begin with -I, -L, or -l, or
|
||||||
|
# - the argument begins with -I, -L, or -l, and it's not already in variable
|
||||||
|
#
|
||||||
|
# This macro assumes a space seperated list.
|
||||||
|
AC_DEFUN([PMIX_FLAGS_APPEND_UNIQ], [
|
||||||
|
PMIX_VAR_SCOPE_PUSH([pmix_tmp pmix_append])
|
||||||
|
|
||||||
|
for arg in $2; do
|
||||||
|
pmix_tmp=`echo $arg | cut -c1-2`
|
||||||
|
pmix_append=1
|
||||||
|
AS_IF([test "$pmix_tmp" = "-I" || test "$pmix_tmp" = "-L" || test "$pmix_tmp" = "-l"],
|
||||||
|
[for val in ${$1}; do
|
||||||
|
AS_IF([test "x$val" = "x$arg"], [pmix_append=0])
|
||||||
|
done])
|
||||||
|
AS_IF([test "$pmix_append" = "1"],
|
||||||
|
[AS_IF([test -z "$$1"], [$1=$arg], [$1="$$1 $arg"])])
|
||||||
|
done
|
||||||
|
|
||||||
|
PMIX_VAR_SCOPE_POP
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl #######################################################################
|
||||||
|
dnl #######################################################################
|
||||||
|
dnl #######################################################################
|
||||||
|
|
||||||
# Macro that serves as an alternative to using `which <prog>`. It is
|
# Macro that serves as an alternative to using `which <prog>`. It is
|
||||||
# preferable to simply using `which <prog>` because backticks (`) (aka
|
# preferable to simply using `which <prog>` because backticks (`) (aka
|
||||||
# backquotes) invoke a sub-shell which may source a "noisy"
|
# backquotes) invoke a sub-shell which may source a "noisy"
|
||||||
|
918
opal/mca/pmix/pmix2x/pmix/config/pmix_mca.m4
Обычный файл
918
opal/mca/pmix/pmix2x/pmix/config/pmix_mca.m4
Обычный файл
@ -0,0 +1,918 @@
|
|||||||
|
dnl -*- shell-script -*-
|
||||||
|
dnl
|
||||||
|
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||||
|
dnl University Research and Technology
|
||||||
|
dnl Corporation. All rights reserved.
|
||||||
|
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||||
|
dnl of Tennessee Research Foundation. All rights
|
||||||
|
dnl reserved.
|
||||||
|
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||||
|
dnl University of Stuttgart. All rights reserved.
|
||||||
|
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||||
|
dnl All rights reserved.
|
||||||
|
dnl Copyright (c) 2010-2015 Cisco Systems, Inc. All rights reserved.
|
||||||
|
dnl Copyright (c) 2013-2016 Intel, Inc. All rights reserved.
|
||||||
|
dnl $COPYRIGHT$
|
||||||
|
dnl
|
||||||
|
dnl Additional copyrights may follow
|
||||||
|
dnl
|
||||||
|
dnl $HEADER$
|
||||||
|
dnl
|
||||||
|
|
||||||
|
# PMIX_EVAL_ARG(arg)
|
||||||
|
# ------------------
|
||||||
|
# evaluates and returns argument
|
||||||
|
AC_DEFUN([PMIX_EVAL_ARG], [$1])
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
#
|
||||||
|
# PMIX_MCA
|
||||||
|
#
|
||||||
|
# configure the MCA (modular component architecture). Works hand in hand
|
||||||
|
# with PMIX's autogen.pl, requiring it's specially formatted lists
|
||||||
|
# of frameworks, components, etc.
|
||||||
|
#
|
||||||
|
# USAGE:
|
||||||
|
# PMIX_MCA()
|
||||||
|
#
|
||||||
|
######################################################################
|
||||||
|
AC_DEFUN([PMIX_MCA],[
|
||||||
|
dnl for PMIX_CONFIGURE_USER env variable
|
||||||
|
AC_REQUIRE([PMIX_CONFIGURE_SETUP])
|
||||||
|
|
||||||
|
# Find which components should be built as run-time loadable components
|
||||||
|
# Acceptable combinations:
|
||||||
|
#
|
||||||
|
# [default -- no option given]
|
||||||
|
# --enable-mca-dso
|
||||||
|
# --enable-mca-dso=[.+,]*COMPONENT_TYPE[.+,]*
|
||||||
|
# --enable-mca-dso=[.+,]*COMPONENT_TYPE-COMPONENT_NAME[.+,]*
|
||||||
|
# --disable-mca-dso
|
||||||
|
#
|
||||||
|
AC_ARG_ENABLE([mca-no-build],
|
||||||
|
[AC_HELP_STRING([--enable-mca-no-build=LIST],
|
||||||
|
[Comma-separated list of <type>-<component> pairs
|
||||||
|
that will not be built. Example: "--enable-mca-no-build=maffinity,btl-portals" will disable building all maffinity components and the "portals" btl components.])])
|
||||||
|
AC_ARG_ENABLE(mca-dso,
|
||||||
|
AC_HELP_STRING([--enable-mca-dso=LIST],
|
||||||
|
[Comma-separated list of types and/or
|
||||||
|
type-component pairs that will be built as
|
||||||
|
run-time loadable components (as opposed to
|
||||||
|
statically linked in), if supported on this
|
||||||
|
platform. The default is to build all components
|
||||||
|
as DSOs.]))
|
||||||
|
AC_ARG_ENABLE(mca-static,
|
||||||
|
AC_HELP_STRING([--enable-mca-static=LIST],
|
||||||
|
[Comma-separated list of types and/or
|
||||||
|
type-component pairs that will be built statically
|
||||||
|
linked into the library. The default (if DSOs are
|
||||||
|
supported) is to build all components as DSOs.
|
||||||
|
Enabling a component as static disables it
|
||||||
|
building as a DSO.]))
|
||||||
|
AC_ARG_ENABLE(mca-direct,
|
||||||
|
AC_HELP_STRING([--enable-mca-direct=LIST],
|
||||||
|
[Comma-separated list of type-component pairs that
|
||||||
|
will be hard coded as the one component to use for
|
||||||
|
a given component type, saving the (small)
|
||||||
|
overhead of the component architecture. LIST must
|
||||||
|
not be empty and implies given component pairs are
|
||||||
|
build as static components.]))
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([which components should be disabled])
|
||||||
|
if test "$enable_mca_no_build" = "yes"; then
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
AC_MSG_ERROR([*** The enable-mca-no-build flag requires an explicit list
|
||||||
|
*** of type-component pairs. For example, --enable-mca-direct=pml-ob1])
|
||||||
|
else
|
||||||
|
ifs_save="$IFS"
|
||||||
|
IFS="${IFS}$PATH_SEPARATOR,"
|
||||||
|
msg=
|
||||||
|
for item in $enable_mca_no_build; do
|
||||||
|
type="`echo $item | cut -s -f1 -d-`"
|
||||||
|
comp="`echo $item | cut -s -f2- -d-`"
|
||||||
|
if test -z $type ; then
|
||||||
|
type=$item
|
||||||
|
fi
|
||||||
|
if test -z $comp ; then
|
||||||
|
str="`echo DISABLE_${type}=1 | sed s/-/_/g`"
|
||||||
|
eval $str
|
||||||
|
msg="$item $msg"
|
||||||
|
else
|
||||||
|
str="`echo DISABLE_${type}_${comp}=1 | sed s/-/_/g`"
|
||||||
|
eval $str
|
||||||
|
msg="$item $msg"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
IFS="$ifs_save"
|
||||||
|
fi
|
||||||
|
AC_MSG_RESULT([$msg])
|
||||||
|
unset msg
|
||||||
|
|
||||||
|
#
|
||||||
|
# First, add all the mca-direct components / types into the mca-static
|
||||||
|
# lists and create a list of component types that are direct compile,
|
||||||
|
# in the form DIRECT_[type]=[component]
|
||||||
|
#
|
||||||
|
AC_MSG_CHECKING([which components should be direct-linked into the library])
|
||||||
|
if test "$enable_mca_direct" = "yes" ; then
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
AC_MSG_ERROR([*** The enable-mca-direct flag requires an explicit list of
|
||||||
|
*** type-component pairs. For example, --enable-mca-direct=pml-ob1,coll-basic])
|
||||||
|
elif test ! -z "$enable_mca_direct" && test "$enable_mca_direct" != "" ; then
|
||||||
|
#
|
||||||
|
# we need to add this into the static list, unless the static list
|
||||||
|
# is everything
|
||||||
|
#
|
||||||
|
if test "$enable_mca_static" = "no" ; then
|
||||||
|
AC_MSG_WARN([*** Re-enabling static component support for direct call])
|
||||||
|
enable_mca_static="$enable_mca_direct"
|
||||||
|
elif test -z "$enable_mca_static" ; then
|
||||||
|
enable_mca_static="$enable_mca_direct"
|
||||||
|
elif test "$enable_mca_static" != "yes" ; then
|
||||||
|
enable_mca_static="$enable_mca_direct,$enable_mca_static"
|
||||||
|
fi
|
||||||
|
|
||||||
|
ifs_save="$IFS"
|
||||||
|
IFS="${IFS}$PATH_SEPARATOR,"
|
||||||
|
msg=
|
||||||
|
for item in $enable_mca_direct; do
|
||||||
|
type="`echo $item | cut -f1 -d-`"
|
||||||
|
comp="`echo $item | cut -f2- -d-`"
|
||||||
|
if test -z $type || test -z $comp ; then
|
||||||
|
AC_MSG_ERROR([*** The enable-mca-direct flag requires a
|
||||||
|
*** list of type-component pairs. Invalid input detected.])
|
||||||
|
else
|
||||||
|
str="`echo DIRECT_$type=$comp | sed s/-/_/g`"
|
||||||
|
eval $str
|
||||||
|
msg="$item $msg"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
IFS="$ifs_save"
|
||||||
|
fi
|
||||||
|
AC_MSG_RESULT([$msg])
|
||||||
|
unset msg
|
||||||
|
|
||||||
|
#
|
||||||
|
# Second, set the DSO_all and STATIC_all variables. conflict
|
||||||
|
# resolution (prefer static) is done in the big loop below
|
||||||
|
#
|
||||||
|
AC_MSG_CHECKING([which components should be run-time loadable])
|
||||||
|
if test "$enable_static" != "no"; then
|
||||||
|
DSO_all=0
|
||||||
|
msg=none
|
||||||
|
elif test -z "$enable_mca_dso" || test "$enable_mca_dso" = "yes"; then
|
||||||
|
DSO_all=1
|
||||||
|
msg=all
|
||||||
|
elif test "$enable_mca_dso" = "no"; then
|
||||||
|
DSO_all=0
|
||||||
|
msg=none
|
||||||
|
else
|
||||||
|
DSO_all=0
|
||||||
|
ifs_save="$IFS"
|
||||||
|
IFS="${IFS}$PATH_SEPARATOR,"
|
||||||
|
msg=
|
||||||
|
for item in $enable_mca_dso; do
|
||||||
|
str="`echo DSO_$item=1 | sed s/-/_/g`"
|
||||||
|
eval $str
|
||||||
|
msg="$item $msg"
|
||||||
|
done
|
||||||
|
IFS="$ifs_save"
|
||||||
|
fi
|
||||||
|
AC_MSG_RESULT([$msg])
|
||||||
|
unset msg
|
||||||
|
if test "$enable_static" != "no"; then
|
||||||
|
AC_MSG_WARN([*** Shared libraries have been disabled (--disable-shared)])
|
||||||
|
AC_MSG_WARN([*** Building MCA components as DSOs automatically disabled])
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([which components should be static])
|
||||||
|
if test "$enable_mca_static" = "yes"; then
|
||||||
|
STATIC_all=1
|
||||||
|
msg=all
|
||||||
|
elif test -z "$enable_mca_static" || test "$enable_mca_static" = "no"; then
|
||||||
|
STATIC_all=0
|
||||||
|
msg=none
|
||||||
|
else
|
||||||
|
STATIC_all=0
|
||||||
|
ifs_save="$IFS"
|
||||||
|
IFS="${IFS}$PATH_SEPARATOR,"
|
||||||
|
msg=
|
||||||
|
for item in $enable_mca_static; do
|
||||||
|
str="`echo STATIC_$item=1 | sed s/-/_/g`"
|
||||||
|
eval $str
|
||||||
|
msg="$item $msg"
|
||||||
|
done
|
||||||
|
IFS="$ifs_save"
|
||||||
|
fi
|
||||||
|
AC_MSG_RESULT([$msg])
|
||||||
|
unset msg
|
||||||
|
|
||||||
|
# now configure the PMIx project. Most
|
||||||
|
# of the hard stuff is in here
|
||||||
|
MCA_PROJECT_SUBDIRS=
|
||||||
|
|
||||||
|
# can't use a variable rename here because these need to be evaled
|
||||||
|
# at auto* time.
|
||||||
|
|
||||||
|
pmix_show_subtitle "Configuring MCA"
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for frameworks])
|
||||||
|
AC_MSG_RESULT([mca_pmix_framework_list])
|
||||||
|
|
||||||
|
# iterate through the list of frameworks. There is something
|
||||||
|
# funky with m4 foreach if the list is defined, but empty. It
|
||||||
|
# will call the 3rd argument once with an empty value for the
|
||||||
|
# first argument. Protect against calling MCA_CONFIGURE_FRAMEWORK
|
||||||
|
# with an empty second argument. Grrr....
|
||||||
|
# if there isn't a project list, abort
|
||||||
|
#
|
||||||
|
# Also setup two variables for Makefiles:
|
||||||
|
# MCA_project_FRAMEWORKS - list of frameworks in that project
|
||||||
|
# MCA_project_FRAMEWORK_LIBS - list of libraries (or variables pointing
|
||||||
|
# to more libraries) that must be included
|
||||||
|
# in the project's main library
|
||||||
|
m4_ifdef([mca_pmix_framework_list], [],
|
||||||
|
[m4_fatal([Could not find mca_pmix_framework_list - please rerun autogen.pl])])
|
||||||
|
|
||||||
|
MCA_pmix_FRAMEWORKS=
|
||||||
|
MCA_pmix_FRAMEWORKS_SUBDIRS=
|
||||||
|
MCA_pmix_FRAMEWORK_COMPONENT_ALL_SUBDIRS=
|
||||||
|
MCA_pmix_FRAMEWORK_COMPONENT_DSO_SUBDIRS=
|
||||||
|
MCA_pmix_FRAMEWORK_COMPONENT_STATIC_SUBDIRS=
|
||||||
|
MCA_pmix_FRAMEWORK_LIBS=
|
||||||
|
|
||||||
|
m4_foreach(mca_framework, [mca_pmix_framework_list],
|
||||||
|
[m4_ifval(mca_framework,
|
||||||
|
[dnl common has to go up front
|
||||||
|
m4_if(mca_framework, [common],
|
||||||
|
[MCA_pmix_FRAMEWORKS="mca_framework $MCA_pmix_FRAMEWORKS"
|
||||||
|
MCA_pmix_FRAMEWORKS_SUBDIRS="[mca/]mca_framework $MCA_pmix_FRAMEWORKS_SUBDIRS"
|
||||||
|
MCA_pmix_FRAMEWORK_COMPONENT_ALL_SUBDIRS="[\$(MCA_pmix_]mca_framework[_ALL_SUBDIRS)] $MCA_pmix_FRAMEWORK_COMPONENT_ALL_SUBDIRS"
|
||||||
|
MCA_pmix_FRAMEWORK_COMPONENT_DSO_SUBDIRS="[\$(MCA_pmix_]mca_framework[_DSO_SUBDIRS)] $MCA_pmix_FRAMEWORK_COMPONENT_DSO_SUBDIRS"
|
||||||
|
MCA_pmix_FRAMEWORK_COMPONENT_STATIC_SUBDIRS="[\$(MCA_pmix_]mca_framework[_STATIC_SUBDIRS)] $MCA_pmix_FRAMEWORK_COMPONENT_STATIC_SUBDIRS"
|
||||||
|
], [
|
||||||
|
MCA_pmix_FRAMEWORKS="$MCA_pmix_FRAMEWORKS mca_framework"
|
||||||
|
MCA_pmix_FRAMEWORKS_SUBDIRS="$MCA_pmix_FRAMEWORKS_SUBDIRS [mca/]mca_framework"
|
||||||
|
MCA_pmix_FRAMEWORK_COMPONENT_ALL_SUBDIRS="$MCA_pmix_FRAMEWORK_COMPONENT_ALL_SUBDIRS [\$(MCA_pmix_]mca_framework[_ALL_SUBDIRS)]"
|
||||||
|
MCA_pmix_FRAMEWORK_COMPONENT_DSO_SUBDIRS="$MCA_pmix_FRAMEWORK_COMPONENT_DSO_SUBDIRS [\$(MCA_]pmix[_]mca_framework[_DSO_SUBDIRS)]"
|
||||||
|
MCA_pmix_FRAMEWORK_COMPONENT_STATIC_SUBDIRS="$MCA_pmix_FRAMEWORK_COMPONENT_STATIC_SUBDIRS [\$(MCA_pmix_]mca_framework[_STATIC_SUBDIRS)]"
|
||||||
|
MCA_pmix_FRAMEWORK_LIBS="$MCA_pmix_FRAMEWORK_LIBS [mca/]mca_framework[/libmca_]mca_framework[.la]"])
|
||||||
|
MCA_pmix_FRAMEWORK_LIBS="$MCA_pmix_FRAMEWORK_LIBS [\$(MCA_pmix_]mca_framework[_STATIC_LTLIBS)]"
|
||||||
|
m4_ifdef([MCA_pmix_]mca_framework[_CONFIG],
|
||||||
|
[MCA_pmix_]mca_framework[_CONFIG](mca_framework),
|
||||||
|
[MCA_CONFIGURE_FRAMEWORK(mca_framework, 1)])])])
|
||||||
|
|
||||||
|
# note that mca_wrapper_extra_* is a running list, and we take checkpoints at the end of our project
|
||||||
|
pmix_mca_wrapper_extra_cppflags="$mca_wrapper_extra_cppflags"
|
||||||
|
pmix_mca_wrapper_extra_ldflags="$mca_wrapper_extra_ldflags"
|
||||||
|
pmix_mca_wrapper_extra_libs="$mca_wrapper_extra_libs"
|
||||||
|
|
||||||
|
AC_SUBST(MCA_pmix_FRAMEWORKS)
|
||||||
|
AC_SUBST(MCA_pmix_FRAMEWORKS_SUBDIRS)
|
||||||
|
AC_SUBST(MCA_pmix_FRAMEWORK_COMPONENT_ALL_SUBDIRS)
|
||||||
|
AC_SUBST(MCA_pmix_FRAMEWORK_COMPONENT_DSO_SUBDIRS)
|
||||||
|
AC_SUBST(MCA_pmix_FRAMEWORK_COMPONENT_STATIC_SUBDIRS)
|
||||||
|
AC_SUBST(MCA_pmix_FRAMEWORK_LIBS)
|
||||||
|
|
||||||
|
AC_SUBST(MCA_PROJECT_SUBDIRS)
|
||||||
|
|
||||||
|
])
|
||||||
|
|
||||||
|
# MCA_ORDER_COMPONENT_LIST(framework_name)
|
||||||
|
AC_DEFUN([MCA_ORDER_COMPONENT_LIST], [
|
||||||
|
m4_foreach(mca_component, [mca_pmix_$1_m4_config_component_list],
|
||||||
|
[m4_ifval(mca_component,
|
||||||
|
[m4_ifdef([MCA_pmix_]$1[_]mca_component[_PRIORITY], [],
|
||||||
|
[m4_fatal([MCA_pmix_$1_]mca_component[_PRIORITY not found, but required.])])])])
|
||||||
|
m4_define([component_list],
|
||||||
|
[esyscmd([config/pmix_mca_priority_sort.pl] m4_foreach([mca_component], [mca_pmix_$1_m4_config_component_list],
|
||||||
|
[m4_ifval(mca_component, [mca_component ]PMIX_EVAL_ARG([MCA_pmix_]$1[_]mca_component[_PRIORITY ]))]))])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([MCA_CHECK_IGNORED_PRIORITY], [
|
||||||
|
m4_foreach(mca_component, [mca_pmix_$1_m4_config_component_list],
|
||||||
|
[m4_ifval(mca_component,
|
||||||
|
[m4_ifdef([MCA_pmix_]$1[_]mca_component[_PRIORITY],
|
||||||
|
[m4_warn([unsupported], [MCA_pmix_]$1[_]mca_component[_PRIORITY found, but ignored.])])])])
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
#
|
||||||
|
# MCA_CONFIGURE_FRAMEWORK
|
||||||
|
#
|
||||||
|
# Configure the given framework and all components inside the
|
||||||
|
# framework. Assumes that the framework is located in
|
||||||
|
# src/mca/[framework], and that all components are
|
||||||
|
# available under the framework directory. Will configure all
|
||||||
|
# no-configure and builtin components, then search for components with
|
||||||
|
# configure scripts. Assumes that no component is marked as builtin
|
||||||
|
# AND has a configure script.
|
||||||
|
#
|
||||||
|
# USAGE:
|
||||||
|
# MCA_CONFIGURE_FRAMEWORK(framework_name, allow_succeed)
|
||||||
|
#
|
||||||
|
######################################################################
|
||||||
|
AC_DEFUN([MCA_CONFIGURE_FRAMEWORK],[
|
||||||
|
pmix_show_subsubtitle "Configuring MCA framework $1"
|
||||||
|
|
||||||
|
m4_ifdef([mca_pmix_$1_no_config_component_list], [],
|
||||||
|
[m4_fatal([Could not find mca_pmix_$1_no_config_component_list - please rerun autogen.pl])])
|
||||||
|
m4_ifdef([mca_pmix_$1_m4_config_component_list], [],
|
||||||
|
[m4_fatal([Could not find mca_pmix_$1_m4_config_component_list - please rerun autogen.pl])])
|
||||||
|
|
||||||
|
# setup for framework
|
||||||
|
all_components=
|
||||||
|
static_components=
|
||||||
|
dso_components=
|
||||||
|
static_ltlibs=
|
||||||
|
|
||||||
|
# Ensure that the directory where the #include file is to live
|
||||||
|
# exists. Need to do this for VPATH builds, because the directory
|
||||||
|
# may not exist yet. For the "common" type, it's not really a
|
||||||
|
# component, so it doesn't have a base.
|
||||||
|
m4_if([$1], [common], [outdir=src/mca/common], [outdir=src/mca/$1/base])
|
||||||
|
AS_MKDIR_P([$outdir])
|
||||||
|
|
||||||
|
# emit Makefile rule
|
||||||
|
AC_CONFIG_FILES([src/mca/$1/Makefile])
|
||||||
|
|
||||||
|
# remove any previously generated #include files
|
||||||
|
outfile_real=$outdir/static-components.h
|
||||||
|
outfile=$outfile_real.new
|
||||||
|
rm -f $outfile $outfile.struct $outfile.extern
|
||||||
|
touch $outfile.struct $outfile.extern
|
||||||
|
|
||||||
|
# print some nice messages about what we're about to do...
|
||||||
|
AC_MSG_CHECKING([for no configure components in framework $1])
|
||||||
|
AC_MSG_RESULT([mca_pmix_$1_no_config_component_list])
|
||||||
|
AC_MSG_CHECKING([for m4 configure components in framework $1])
|
||||||
|
AC_MSG_RESULT([mca_pmix_$1_m4_config_component_list])
|
||||||
|
|
||||||
|
# If there are components in the no configure list, but we're
|
||||||
|
# doing one of the "special" selection logics, abort with a
|
||||||
|
# reasonable message.
|
||||||
|
m4_if(PMIX_EVAL_ARG([MCA_pmix_$1_CONFIGURE_MODE]), [STOP_AT_FIRST],
|
||||||
|
[m4_ifval(mca_pmix_$1_no_config_component_list,
|
||||||
|
[m4_fatal([Framework $1 using STOP_AT_FIRST but at least one component has no configure.m4])])])
|
||||||
|
m4_if(PMIX_EVAL_ARG([MCA_pmix_$1_CONFIGURE_MODE]), [STOP_AT_FIRST_PRIORITY],
|
||||||
|
[m4_ifval(mca_pmix_$1_no_config_component_list,
|
||||||
|
[m4_fatal([Framework $1 using STOP_AT_FIRST_PRIORITY but at least one component has no configure.m4])])])
|
||||||
|
m4_if(PMIX_EVAL_ARG([MCA_pmix_$1_CONFIGURE_MODE]), [PRIORITY],
|
||||||
|
[m4_ifval(mca_pmix_$1_no_config_component_list,
|
||||||
|
[m4_fatal([Framework $1 using PRIORITY but at least one component has no configure.m4])])])
|
||||||
|
# run the configure logic for the no-config components
|
||||||
|
m4_foreach(mca_component, [mca_pmix_$1_no_config_component_list],
|
||||||
|
[m4_ifval(mca_component,
|
||||||
|
[MCA_CONFIGURE_NO_CONFIG_COMPONENT($1, mca_component,
|
||||||
|
[all_components],
|
||||||
|
[static_components],
|
||||||
|
[dso_components],
|
||||||
|
[static_ltlibs],
|
||||||
|
[$2])])])
|
||||||
|
|
||||||
|
# configure components that use built-in configuration scripts
|
||||||
|
m4_ifdef([component_list], [m4_undefine([component_list])])
|
||||||
|
m4_if(PMIX_EVAL_ARG([MCA_pmix_$1_CONFIGURE_MODE]), [STOP_AT_FIRST], [MCA_ORDER_COMPONENT_LIST($1)],
|
||||||
|
[m4_if(PMIX_EVAL_ARG([MCA_pmix_$1_CONFIGURE_MODE]), [STOP_AT_FIRST_PRIORITY], [MCA_ORDER_COMPONENT_LIST($1)],
|
||||||
|
[m4_if(PMIX_EVAL_ARG([MCA_pmix_$1_CONFIGURE_MODE]), [PRIORITY], [MCA_ORDER_COMPONENT_LIST($1)],
|
||||||
|
[m4_define([component_list], [mca_pmix_$1_m4_config_component_list])])])])
|
||||||
|
|
||||||
|
best_mca_component_priority=0
|
||||||
|
components_looking_for_succeed=$2
|
||||||
|
components_last_result=0
|
||||||
|
m4_foreach(mca_component, [component_list],
|
||||||
|
[m4_ifval(mca_component,
|
||||||
|
[m4_if(PMIX_EVAL_ARG([MCA_pmix_$1_CONFIGURE_MODE]), [STOP_AT_FIRST_PRIORITY],
|
||||||
|
[AS_IF([test $best_mca_component_priority -gt MCA_pmix_$1_]mca_component[_PRIORITY], [components_looking_for_succeed=0])])
|
||||||
|
MCA_CONFIGURE_M4_CONFIG_COMPONENT($1, mca_component,
|
||||||
|
[all_components],
|
||||||
|
[static_components],
|
||||||
|
[dso_components],
|
||||||
|
[static_ltlibs],
|
||||||
|
[$components_looking_for_succeed],
|
||||||
|
[components_last_result=1],
|
||||||
|
[components_last_result=0])
|
||||||
|
m4_if(PMIX_EVAL_ARG([MCA_pmix_$1_CONFIGURE_MODE]), [STOP_AT_FIRST],
|
||||||
|
[AS_IF([test $components_last_result -eq 1], [components_looking_for_succeed=0])])
|
||||||
|
m4_if(PMIX_EVAL_ARG([MCA_pmix_$1_CONFIGURE_MODE]), [STOP_AT_FIRST_PRIORITY],
|
||||||
|
[AS_IF([test $components_last_result -eq 1], [best_mca_component_priority=]PMIX_EVAL_ARG([MCA_pmix_$1_]mca_component[_PRIORITY]))])
|
||||||
|
])])
|
||||||
|
|
||||||
|
# configure components that provide their own configure script.
|
||||||
|
# It would be really hard to run these for "find first that
|
||||||
|
# works", so we don't :)
|
||||||
|
m4_if(PMIX_EVAL_ARG([MCA_pmix_]$1[_CONFIGURE_MODE]), [STOP_AT_FIRST], [],
|
||||||
|
[m4_if(PMIX_EVAL_ARG([MCA_pmix_]$1[_CONFIGURE_MODE]), [STOP_AT_FIRST_PRIORITY], [],
|
||||||
|
[m4_if(PMIX_EVAL_ARG([MCA_pmix_]$1[_CONFIGURE_MODE]), [PRIORITY], [],
|
||||||
|
[MCA_CHECK_IGNORED_PRIORITY($1)
|
||||||
|
AS_IF([test "$2" != "0"],
|
||||||
|
[MCA_CONFIGURE_ALL_CONFIG_COMPONENTS($1, [all_components],
|
||||||
|
[static_components], [dso_components],
|
||||||
|
[static_ltlibs])])])])])
|
||||||
|
|
||||||
|
MCA_pmix_$1_ALL_COMPONENTS="$all_components"
|
||||||
|
MCA_pmix_$1_STATIC_COMPONENTS="$static_components"
|
||||||
|
MCA_pmix_$1_DSO_COMPONENTS="$dso_components"
|
||||||
|
MCA_pmix_$1_STATIC_LTLIBS="$static_ltlibs"
|
||||||
|
|
||||||
|
AC_SUBST(MCA_pmix_$1_ALL_COMPONENTS)
|
||||||
|
AC_SUBST(MCA_pmix_$1_STATIC_COMPONENTS)
|
||||||
|
AC_SUBST(MCA_pmix_$1_DSO_COMPONENTS)
|
||||||
|
AC_SUBST(MCA_pmix_$1_STATIC_LTLIBS)
|
||||||
|
|
||||||
|
PMIX_MCA_MAKE_DIR_LIST(MCA_pmix_$1_ALL_SUBDIRS, $1, [$all_components])
|
||||||
|
PMIX_MCA_MAKE_DIR_LIST(MCA_pmix_$1_STATIC_SUBDIRS, $1, [$static_components])
|
||||||
|
PMIX_MCA_MAKE_DIR_LIST(MCA_pmix_$1_DSO_SUBDIRS, $1, [$dso_components])
|
||||||
|
|
||||||
|
# Create the final .h file that will be included in the type's
|
||||||
|
# top-level glue. This lists all the static components. We don't
|
||||||
|
# need to do this for "common".
|
||||||
|
if test "$2" != "common"; then
|
||||||
|
cat > $outfile <<EOF
|
||||||
|
/*
|
||||||
|
* \$HEADER\$
|
||||||
|
*/
|
||||||
|
#if defined(c_plusplus) || defined(__cplusplus)
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
`cat $outfile.extern`
|
||||||
|
|
||||||
|
const pmix_mca_base_component_t *mca_$1_base_static_components[[]] = {
|
||||||
|
`cat $outfile.struct`
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
#if defined(c_plusplus) || defined(__cplusplus)
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
EOF
|
||||||
|
# Only replace the header file if a) it doesn't previously
|
||||||
|
# exist, or b) the contents are different. Do this to not
|
||||||
|
# trigger recompilation of certain .c files just because the
|
||||||
|
# timestamp changed on $outfile_real (similar to the way AC
|
||||||
|
# handles AC_CONFIG_HEADER files).
|
||||||
|
diff $outfile $outfile_real > /dev/null 2>&1
|
||||||
|
if test "$?" != "0"; then
|
||||||
|
mv $outfile $outfile_real
|
||||||
|
else
|
||||||
|
rm -f $outfile
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
rm -f $outfile.struct $outfile.extern
|
||||||
|
|
||||||
|
unset all_components static_components dso_components outfile outfile_real
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
#
|
||||||
|
# MCA_CONFIGURE_NO_CONFIG_COMPONENT
|
||||||
|
#
|
||||||
|
# Configure the given framework and all components inside the framework.
|
||||||
|
# Assumes that the framework is located in [project_name]/mca/[framework],
|
||||||
|
# and that all components are available under the framework directory.
|
||||||
|
# Will configure all builtin components, then search for components with
|
||||||
|
# configure scripts. Assumes that no component is marked as builtin
|
||||||
|
# AND has a configure script.
|
||||||
|
#
|
||||||
|
# USAGE:
|
||||||
|
# MCA_CONFIGURE_PROJECT(framework_name, component_name
|
||||||
|
# all_components_variable,
|
||||||
|
# static_components_variable,
|
||||||
|
# dso_components_variable,
|
||||||
|
# static_ltlibs_variable,
|
||||||
|
# allowed_to_succeed)
|
||||||
|
#
|
||||||
|
######################################################################
|
||||||
|
AC_DEFUN([MCA_CONFIGURE_NO_CONFIG_COMPONENT],[
|
||||||
|
pmix_show_subsubsubtitle "MCA component $1:$2 (no configuration)"
|
||||||
|
|
||||||
|
pmix_show_verbose "PMIX_MCA_NO_CONFIG_COMPONENT: before, should_build=$7"
|
||||||
|
MCA_COMPONENT_BUILD_CHECK($1, $2,
|
||||||
|
[should_build=$7], [should_build=0])
|
||||||
|
MCA_COMPONENT_COMPILE_MODE($1, $2, compile_mode)
|
||||||
|
pmix_show_verbose "PMIX_MCA_NO_CONFIG_COMPONENT: after, should_build=$should_build"
|
||||||
|
|
||||||
|
if test "$should_build" = "1" ; then
|
||||||
|
MCA_PROCESS_COMPONENT($1, $2, $3, $4, $5, $6, $compile_mode)
|
||||||
|
else
|
||||||
|
MCA_PROCESS_DEAD_COMPONENT($1, $2)
|
||||||
|
# add component to all component list
|
||||||
|
$3="$$3 $2"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# set the AM_CONDITIONAL on how we should build
|
||||||
|
if test "$compile_mode" = "dso" ; then
|
||||||
|
BUILD_pmix_$1_$2_DSO=1
|
||||||
|
else
|
||||||
|
BUILD_pmix_$1_$2_DSO=0
|
||||||
|
fi
|
||||||
|
AM_CONDITIONAL(MCA_BUILD_pmix_$1_$2_DSO, test "$BUILD_pmix_$1_$2_DSO" = "1")
|
||||||
|
|
||||||
|
AC_CONFIG_FILES([src/mca/$1/$2/Makefile])
|
||||||
|
|
||||||
|
unset compile_mode
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
#
|
||||||
|
# MCA_CONFIGURE_M4_CONFIG_COMPONENT
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# USAGE:
|
||||||
|
# MCA_CONFIGURE_PROJECT(framework_name, component_name
|
||||||
|
# all_components_variable,
|
||||||
|
# static_components_variable,
|
||||||
|
# dso_components_variable,
|
||||||
|
# static_ltlibs_variable,
|
||||||
|
# allowed_to_succeed,
|
||||||
|
# [eval if should build],
|
||||||
|
# [eval if should not build])
|
||||||
|
#
|
||||||
|
######################################################################
|
||||||
|
AC_DEFUN([MCA_CONFIGURE_M4_CONFIG_COMPONENT],[
|
||||||
|
m4_ifdef([MCA_pmix_$1_$2_PRIORITY],
|
||||||
|
[pmix_show_subsubsubtitle "MCA component $1:$2 (m4 configuration macro, priority MCA_pmix_$1_$2_PRIORITY)"],
|
||||||
|
[pmix_show_subsubsubtitle "MCA component $1:$2 (m4 configuration macro)"])
|
||||||
|
|
||||||
|
pmix_show_verbose "PMIX_MCA_M4_CONFIG_COMPONENT: before, should_build=$7"
|
||||||
|
MCA_COMPONENT_BUILD_CHECK($1, $2, [should_build=$7], [should_build=0])
|
||||||
|
# Allow the component to override the build mode if it really wants to.
|
||||||
|
# It is, of course, free to end up calling MCA_COMPONENT_COMPILE_MODE
|
||||||
|
m4_ifdef([MCA_pmix_$1_$2_COMPILE_MODE],
|
||||||
|
[MCA_pmix_$1_$2_COMPILE_MODE($1, $2, compile_mode)],
|
||||||
|
[MCA_COMPONENT_COMPILE_MODE($1, $2, compile_mode)])
|
||||||
|
|
||||||
|
# try to configure the component
|
||||||
|
m4_ifdef([MCA_pmix_$1_$2_CONFIG],
|
||||||
|
[MCA_pmix_$1_$2_CONFIG([should_build=$should_build],
|
||||||
|
[should_build=0])],
|
||||||
|
[m4_fatal([MCA_pmix_$1_$2_CONFIG macro not found])])
|
||||||
|
pmix_show_verbose "PMIX_MCA_M4_CONFIG_COMPONENT: after, should_build=$should_build"
|
||||||
|
|
||||||
|
AS_IF([test "$should_build" = "1"],
|
||||||
|
[MCA_PROCESS_COMPONENT($1, $2, $3, $4, $5, $6, $compile_mode)],
|
||||||
|
[MCA_PROCESS_DEAD_COMPONENT($1, $2)
|
||||||
|
# add component to all component list
|
||||||
|
$3="$$3 $2"])
|
||||||
|
|
||||||
|
m4_ifdef([MCA_pmix_$1_$2_POST_CONFIG],
|
||||||
|
[ MCA_pmix_$1_$2_POST_CONFIG($should_build)])
|
||||||
|
|
||||||
|
# set the AM_CONDITIONAL on how we should build
|
||||||
|
AS_IF([test "$compile_mode" = "dso"],
|
||||||
|
[BUILD_pmix_$1_$2_DSO=1],
|
||||||
|
[BUILD_pmix_$1_$2_DSO=0])
|
||||||
|
AM_CONDITIONAL(MCA_BUILD_pmix_$1_$2_DSO, test "$BUILD_pmix_$1_$2_DSO" = "1")
|
||||||
|
|
||||||
|
AS_IF([test "$should_build" = "1"], [$8], [$9])
|
||||||
|
|
||||||
|
unset compile_mode
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
#
|
||||||
|
# MCA_CONFIGURE_ALL_CONFIG_COMPONENTS
|
||||||
|
#
|
||||||
|
# configure all components in the given framework that have configure
|
||||||
|
# scripts and should be configured according to the usual rules...
|
||||||
|
#
|
||||||
|
# USAGE:
|
||||||
|
# MCA_CONFIGURE_ALL_CONFIG_COMPONENTS(framework_name,
|
||||||
|
# all_components_variable,
|
||||||
|
# static_components_variable,
|
||||||
|
# dso_components_variable,
|
||||||
|
# static_ltlibs_variable)
|
||||||
|
#
|
||||||
|
######################################################################
|
||||||
|
AC_DEFUN([MCA_CONFIGURE_ALL_CONFIG_COMPONENTS],[
|
||||||
|
for component_path in $srcdir/src/mca/$1/* ; do
|
||||||
|
component="`basename $component_path`"
|
||||||
|
if test -d $component_path && test -x $component_path/configure ; then
|
||||||
|
pmix_show_subsubsubtitle "MCA component $1:$component (need to configure)"
|
||||||
|
|
||||||
|
pmix_show_verbose "PMIX_MCA_ALL_CONFIG_COMPONENTS: before, should_build=$7"
|
||||||
|
MCA_COMPONENT_BUILD_CHECK($1, $component,
|
||||||
|
[should_build=1], [should_build=0])
|
||||||
|
MCA_COMPONENT_COMPILE_MODE($1, $component, compile_mode)
|
||||||
|
pmix_show_verbose "PMIX_MCA_ALL_CONFIG_COMPONENTS: after, should_build=$should_build"
|
||||||
|
|
||||||
|
if test "$should_build" = "1" ; then
|
||||||
|
PMIX_CONFIG_SUBDIR([src/mca/$1/$component],
|
||||||
|
[$pmix_subdir_args],
|
||||||
|
[should_build=1], [should_build=0])
|
||||||
|
pmix_show_verbose "PMIX_MCA_ALL_CONFIG_COMPONENTS: after subdir, should_build=$should_build"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$should_build" = "1" ; then
|
||||||
|
# do some extra work to pass flags back from the
|
||||||
|
# top-level configure, the way a configure.m4
|
||||||
|
# component would.
|
||||||
|
infile="$srcdir/src/mca/$1/$2/post_configure.sh"
|
||||||
|
if test -f $infile; then
|
||||||
|
|
||||||
|
# First check for the ABORT tag
|
||||||
|
line="`$GREP ABORT= $infile | cut -d= -f2-`"
|
||||||
|
if test -n "$line" && test "$line" != "no"; then
|
||||||
|
AC_MSG_WARN([MCA component configure script told me to abort])
|
||||||
|
AC_MSG_ERROR([cannot continue])
|
||||||
|
fi
|
||||||
|
|
||||||
|
m4_foreach(flags, [LDFLAGS, LIBS],
|
||||||
|
[[line="`$GREP WRAPPER_EXTRA_]flags[= $infile | cut -d= -f2-`"]
|
||||||
|
eval "line=$line"
|
||||||
|
if test -n "$line"; then
|
||||||
|
$2[_]$3[_WRAPPER_EXTRA_]flags[="$line"]
|
||||||
|
fi
|
||||||
|
])dnl
|
||||||
|
fi
|
||||||
|
|
||||||
|
MCA_PROCESS_COMPONENT($1, $component, $2, $3, $4, $5, $compile_mode)
|
||||||
|
else
|
||||||
|
MCA_PROCESS_DEAD_COMPONENT($1, $component)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
# MCA_COMPONENT_COMPILE_MODE(framework_name (1),
|
||||||
|
# component_name (2), compile_mode_variable (3))
|
||||||
|
# -------------------------------------------------------------------------
|
||||||
|
# set compile_mode_variable to the compile mode for the given component
|
||||||
|
#
|
||||||
|
# NOTE: component_name may not be determined until runtime....
|
||||||
|
AC_DEFUN([MCA_COMPONENT_COMPILE_MODE],[
|
||||||
|
SHARED_FRAMEWORK="$DSO_$1"
|
||||||
|
AS_LITERAL_IF([$2],
|
||||||
|
[SHARED_COMPONENT="$DSO_$1_$2"],
|
||||||
|
[str="SHARED_COMPONENT=\$DSO_$1_$2"
|
||||||
|
eval $str])
|
||||||
|
|
||||||
|
STATIC_FRAMEWORK="$STATIC_$1"
|
||||||
|
AS_LITERAL_IF([$2],
|
||||||
|
[STATIC_COMPONENT="$STATIC_$1_$2"],
|
||||||
|
[str="STATIC_COMPONENT=\$STATIC_$1_$2"
|
||||||
|
eval $str])
|
||||||
|
|
||||||
|
shared_mode_override=static
|
||||||
|
|
||||||
|
# Setup for either shared or static
|
||||||
|
if test "$STATIC_FRAMEWORK" = "1" || \
|
||||||
|
test "$STATIC_COMPONENT" = "1" || \
|
||||||
|
test "$STATIC_all" = "1" ; then
|
||||||
|
$3="static"
|
||||||
|
elif test "$shared_mode_override" = "dso" || \
|
||||||
|
test "$SHARED_FRAMEWORK" = "1" || \
|
||||||
|
test "$SHARED_COMPONENT" = "1" || \
|
||||||
|
test "$DSO_all" = "1"; then
|
||||||
|
$3="dso"
|
||||||
|
else
|
||||||
|
$3="static"
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for MCA component $1:$2 compile mode])
|
||||||
|
if test "$DIRECT_$1" = "$2" ; then
|
||||||
|
AC_MSG_RESULT([$$3 - direct])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([$$3])
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
# MCA_PROCESS_COMPONENT(framework_name (1), component_name (2),
|
||||||
|
# all_components_variable (3), static_components_variable (4)
|
||||||
|
# dso_components_variable (5), static_ltlibs_variable (6),
|
||||||
|
# compile_mode_variable (7))
|
||||||
|
#---------------------------------------------------------------------
|
||||||
|
# Final setup work for a given component. It should be known before
|
||||||
|
# calling that this component can build properly (and exists)
|
||||||
|
#
|
||||||
|
# NOTE: component_name may not be determined until runtime....
|
||||||
|
AC_DEFUN([MCA_PROCESS_COMPONENT],[
|
||||||
|
AC_REQUIRE([AC_PROG_GREP])
|
||||||
|
|
||||||
|
# See if it dropped an output file for us to pick up some
|
||||||
|
# shell variables in.
|
||||||
|
infile="$srcdir/src/mca/$1/$2/post_configure.sh"
|
||||||
|
|
||||||
|
# Add this subdir to the mast list of all MCA component subdirs
|
||||||
|
$3="$$3 $2"
|
||||||
|
|
||||||
|
if test "$7" = "dso" ; then
|
||||||
|
$5="$$5 $2"
|
||||||
|
else
|
||||||
|
if test "$1" = "common"; then
|
||||||
|
# Static libraries in "common" frameworks are installed, and
|
||||||
|
# therefore must obey the $FRAMEWORK_LIB_PREFIX that was
|
||||||
|
# set.
|
||||||
|
$6="mca/$1/$2/lib${m4_translit([pmix], [a-z], [A-Z])_LIB_PREFIX}mca_$1_$2.la $$6"
|
||||||
|
else
|
||||||
|
# Other frameworks do not have to obey the
|
||||||
|
# $FRAMEWORK_LIB_PREFIX prefix.
|
||||||
|
$6="mca/$1/$2/libmca_$1_$2.la $$6"
|
||||||
|
fi
|
||||||
|
echo "extern const pmix_mca_base_component_t mca_$1_$2_component;" >> $outfile.extern
|
||||||
|
echo " &mca_$1_$2_component, " >> $outfile.struct
|
||||||
|
$4="$$4 $2"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Output pretty results
|
||||||
|
AC_MSG_CHECKING([if MCA component $1:$2 can compile])
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
|
||||||
|
dnl BWB: FIX ME: We still use the post_configure.sh for frameworks that use the direct call infrastructure.
|
||||||
|
dnl All other uses we can ignore here, because config_components will have read it in and set all the
|
||||||
|
dnl proper environment variables. At some point, we should handle the direct call stuff the same way we
|
||||||
|
dnl handle the headers for static components like timers in PMIx, ie, have a framework level configure.m4 that
|
||||||
|
dnl does the right thing
|
||||||
|
if test -f $infile; then
|
||||||
|
# check for direct call header to include. This will be
|
||||||
|
# AC_SUBSTed later.
|
||||||
|
if test "$DIRECT_$1" = "$2" ; then
|
||||||
|
if test "`$GREP DIRECT_CALL_HEADER $infile`" != "" ; then
|
||||||
|
line="`$GREP DIRECT_CALL_HEADER $infile | cut -d= -f2-`"
|
||||||
|
str="MCA_pmix_$1_DIRECT_CALL_HEADER=$line"
|
||||||
|
eval $str
|
||||||
|
else
|
||||||
|
AC_MSG_ERROR([*** $1 component $2 was supposed to be direct-called, but
|
||||||
|
*** does not appear to support direct calling.
|
||||||
|
*** Aborting])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# were we supposed to have found something in the
|
||||||
|
# post_configure.sh, but the file didn't exist?
|
||||||
|
if test "$DIRECT_$1" = "$2" ; then
|
||||||
|
AC_MSG_ERROR([*** $1 component $2 was supposed to be direct-called, but
|
||||||
|
*** does not appear to support direct calling.
|
||||||
|
*** Aborting])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if the component is building, add it's WRAPPER_EXTRA_LDFLAGS and
|
||||||
|
# WRAPPER_EXTRA_LIBS. If the component doesn't specify it's
|
||||||
|
# WRAPPER_EXTRA_LIBS and WRAPPER_EXTRA_LDFLAGS, try using LDFLAGS and LIBS if
|
||||||
|
# component didn't have it's own configure script (in which case,
|
||||||
|
# we know it didn't set LDFLAGS and LIBS because it can't) Don't
|
||||||
|
# have to do this if the component is building dynamically,
|
||||||
|
# because it will link against these (without a dependency from
|
||||||
|
# libmpi.so to these flags)
|
||||||
|
if test "$7" = "static"; then
|
||||||
|
AS_LITERAL_IF([$2],
|
||||||
|
[m4_foreach(flags, [LDFLAGS, LIBS],
|
||||||
|
[AS_IF([test "$$1_$2_WRAPPER_EXTRA_]flags[" = ""],
|
||||||
|
[PMIX_FLAGS_APPEND_UNIQ([mca_wrapper_extra_]m4_tolower(flags), [$$1_$2_]flags)],
|
||||||
|
[PMIX_FLAGS_APPEND_UNIQ([mca_wrapper_extra_]m4_tolower(flags), [$$1_$2_WRAPPER_EXTRA_]flags)])
|
||||||
|
])],
|
||||||
|
[m4_foreach(flags, [LDFLAGS, LIBS],
|
||||||
|
[[str="line=\$$1_$2_WRAPPER_EXTRA_]flags["]
|
||||||
|
eval "$str"
|
||||||
|
PMIX_FLAGS_APPEND_UNIQ([mca_wrapper_extra_]m4_tolower(flags), [$line])])])
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if needed, copy over WRAPPER_EXTRA_CPPFLAGS. Since a configure script
|
||||||
|
# component can never be used in a STOP_AT_FIRST framework, we
|
||||||
|
# don't have to implement the else clause in the literal check...
|
||||||
|
AS_LITERAL_IF([$2],
|
||||||
|
[AS_IF([test "$$1_$2_WRAPPER_EXTRA_CPPFLAGS" != ""],
|
||||||
|
[m4_if(PMIX_EVAL_ARG([MCA_pmix_$1_CONFIGURE_MODE]), [STOP_AT_FIRST], [stop_at_first=1], [stop_at_first=0])
|
||||||
|
AS_IF([test "$7" = "static" && test "$stop_at_first" = "1"],
|
||||||
|
[AS_IF([test "$with_devel_headers" = "yes"],
|
||||||
|
[PMIX_FLAGS_APPEND_UNIQ([mca_wrapper_extra_cppflags], [$$1_$2_WRAPPER_EXTRA_CPPFLAGS])])],
|
||||||
|
[AC_MSG_WARN([ignoring $1_$2_WRAPPER_EXTRA_CPPFLAGS ($$1_$2_WRAPPER_EXTRA_CPPFLAGS): component conditions not met])])])])
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
# MCA_PROCESS_DEAD_COMPONENT(framework_name (1),
|
||||||
|
# component_name (2))
|
||||||
|
# ----------------------------------------------------------------
|
||||||
|
# Finall setup work for a component that can not be built. Do the
|
||||||
|
# last minute checks to make sure the user isn't doing something
|
||||||
|
# stupid.
|
||||||
|
#
|
||||||
|
# NOTE: component_name may not be determined until runtime....
|
||||||
|
AC_DEFUN([MCA_PROCESS_DEAD_COMPONENT],[
|
||||||
|
AC_MSG_CHECKING([if MCA component $1:$2 can compile])
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
|
||||||
|
# If this component was requested as the default for this
|
||||||
|
# type, then abort.
|
||||||
|
if test "$with_$1" = "$2" ; then
|
||||||
|
AC_MSG_WARN([MCA component "$2" failed to configure properly])
|
||||||
|
AC_MSG_WARN([This component was selected as the default])
|
||||||
|
AC_MSG_ERROR([Cannot continue])
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test ! -z "$DIRECT_$1" ; then
|
||||||
|
if test "$DIRECT_$1" = "$2" ; then
|
||||||
|
AC_MSG_WARN([MCA component "$2" failed to configure properly])
|
||||||
|
AC_MSG_WARN([This component was selected as the default (direct call)])
|
||||||
|
AC_MSG_ERROR([Cannot continue])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
# MCA_COMPONENT_BUILD_CHECK(framework_name(1),
|
||||||
|
# component_name (2), action-if-build (3)
|
||||||
|
# action-if-not-build (4)
|
||||||
|
# -----------------------------------------------------------------
|
||||||
|
# checks the standard rules of component building to see if the
|
||||||
|
# given component should be built.
|
||||||
|
#
|
||||||
|
# Note: component_name may not be determined until runtime....
|
||||||
|
AC_DEFUN([MCA_COMPONENT_BUILD_CHECK],[
|
||||||
|
AC_REQUIRE([AC_PROG_GREP])
|
||||||
|
|
||||||
|
component_path="$srcdir/src/mca/$1/$2"
|
||||||
|
want_component=0
|
||||||
|
|
||||||
|
# build if:
|
||||||
|
# - the component type is direct and we are that component
|
||||||
|
# - there is no pmix_ignore file
|
||||||
|
# - there is an pmix_ignore, but there is an empty pmix_unignore
|
||||||
|
# - there is an pmix_ignore, but username is in pmix_unignore
|
||||||
|
if test -d $component_path ; then
|
||||||
|
# decide if we want the component to be built or not. This
|
||||||
|
# is spread out because some of the logic is a little complex
|
||||||
|
# and test's syntax isn't exactly the greatest. We want to
|
||||||
|
# build the component by default.
|
||||||
|
want_component=1
|
||||||
|
if test -f $component_path/.pmix_ignore ; then
|
||||||
|
# If there is an pmix_ignore file, don't build
|
||||||
|
# the component. Note that this decision can be
|
||||||
|
# overridden by the unignore logic below.
|
||||||
|
want_component=0
|
||||||
|
fi
|
||||||
|
if test -f $component_path/.pmix_unignore ; then
|
||||||
|
# if there is an empty pmix_unignore, that is
|
||||||
|
# equivalent to having your userid in the unignore file.
|
||||||
|
# If userid is in the file, unignore the ignore file.
|
||||||
|
if test ! -s $component_path/.pmix_unignore ; then
|
||||||
|
want_component=1
|
||||||
|
elif test ! -z "`$GREP $PMIX_CONFIGURE_USER $component_path/.pmix_unignore`" ; then
|
||||||
|
want_component=1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
# if this component type is direct and we are not it, we don't want
|
||||||
|
# to be built. Otherwise, we do want to be built.
|
||||||
|
if test ! -z "$DIRECT_$1" ; then
|
||||||
|
if test "$DIRECT_$1" = "$2" ; then
|
||||||
|
want_component=1
|
||||||
|
else
|
||||||
|
want_component=0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if we were explicitly disabled, don't build :)
|
||||||
|
AS_IF([test "$DISABLE_$1" = "1"], [want_component=0])
|
||||||
|
AS_LITERAL_IF([$2],
|
||||||
|
[AS_IF([test "$DISABLE_$1_$2" = "1"], [want_component=0])],
|
||||||
|
[str="DISABLED_COMPONENT_CHECK=\$DISABLE_$1_$2"
|
||||||
|
eval $str
|
||||||
|
if test "$DISABLED_COMPONENT_CHECK" = "1" ; then
|
||||||
|
want_component=0
|
||||||
|
fi])
|
||||||
|
|
||||||
|
AS_IF([test "$want_component" = "1"], [$3], [$4])
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
# MCA_SETUP_DIRECT_CALL(framework_name (1))
|
||||||
|
# -------------------------------------------------------------
|
||||||
|
AC_DEFUN([MCA_SETUP_DIRECT_CALL],[
|
||||||
|
if test ! -z "$DIRECT_$1" ; then
|
||||||
|
MCA_pmix_$1_DIRECT_CALL_COMPONENT=$DIRECT_$1
|
||||||
|
MCA_pmix_$1_DIRECT_CALL=1
|
||||||
|
else
|
||||||
|
MCA_pmix_$1_DIRECT_CALL_COMPONENT=
|
||||||
|
MCA_pmix_$1_DIRECT_CALL=0
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_SUBST(MCA_pmix_$1_DIRECT_CALL_HEADER)
|
||||||
|
AC_DEFINE_UNQUOTED([MCA_pmix_$2_DIRECT_CALL], [$MCA_pmix_$1_DIRECT_CALL],
|
||||||
|
[Defined to 1 if PMIx:$1 should use direct calls instead of components])
|
||||||
|
AC_DEFINE_UNQUOTED([MCA_pmix_$1_DIRECT_CALL_COMPONENT], [$MCA_pmix_$1_DIRECT_CALL_COMPONENT],
|
||||||
|
[name of component to use for direct calls, if MCA_pmix_$1_DIRECT_CALL is 1])
|
||||||
|
AC_DEFINE_UNQUOTED([MCA_pmix_$1_DIRECT_CALL_HEADER],
|
||||||
|
["[$MCA_pmix_]$1[_DIRECT_CALL_HEADER]"],
|
||||||
|
[Header PMIx:$1 includes to be direct called])
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
# PMIX_MCA_MAKE_DIR_LIST(subst'ed variable, framework, shell list)
|
||||||
|
# -------------------------------------------------------------------------
|
||||||
|
AC_DEFUN([PMIX_MCA_MAKE_DIR_LIST],[
|
||||||
|
$1=
|
||||||
|
for item in $3 ; do
|
||||||
|
$1="$$1 mca/$2/$item"
|
||||||
|
done
|
||||||
|
AC_SUBST($1)
|
||||||
|
])
|
31
opal/mca/pmix/pmix2x/pmix/config/pmix_mca_priority_sort.pl
Исполняемый файл
31
opal/mca/pmix/pmix2x/pmix/config/pmix_mca_priority_sort.pl
Исполняемый файл
@ -0,0 +1,31 @@
|
|||||||
|
#!/usr/bin/env perl
|
||||||
|
#
|
||||||
|
# Copyright (c) 2010 Sandia National Laboratories. All rights reserved.
|
||||||
|
#
|
||||||
|
# $COPYRIGHT$
|
||||||
|
#
|
||||||
|
# Additional copyrights may follow
|
||||||
|
#
|
||||||
|
# $HEADER$
|
||||||
|
#
|
||||||
|
|
||||||
|
my $components;
|
||||||
|
my @result;
|
||||||
|
|
||||||
|
while (@ARGV) {
|
||||||
|
my $component;
|
||||||
|
$component->{"name"} = shift(@ARGV);
|
||||||
|
$component->{"value"} = shift(@ARGV);
|
||||||
|
push(@{$components}, $component);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach my $component (sort { $b->{value} <=> $a->{value} } @{$components}) {
|
||||||
|
push(@result, $component->{name});
|
||||||
|
}
|
||||||
|
sub commify_series {
|
||||||
|
(@_ == 0) ? '' :
|
||||||
|
(@_ == 1) ? $_[0] :
|
||||||
|
join(", ", @_[0 .. ($#_-1)], "$_[-1]");
|
||||||
|
}
|
||||||
|
|
||||||
|
print commify_series(@result);
|
@ -10,7 +10,7 @@
|
|||||||
# University of Stuttgart. All rights reserved.
|
# University of Stuttgart. All rights reserved.
|
||||||
# Copyright (c) 2004-2005 The Regents of the University of California.
|
# Copyright (c) 2004-2005 The Regents of the University of California.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
# Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved.
|
# Copyright (c) 2006-2016 Cisco Systems, Inc. All rights reserved.
|
||||||
# Copyright (c) 2006-2008 Sun Microsystems, Inc. All rights reserved.
|
# Copyright (c) 2006-2008 Sun Microsystems, Inc. All rights reserved.
|
||||||
# Copyright (c) 2006-2011 Los Alamos National Security, LLC. All rights
|
# Copyright (c) 2006-2011 Los Alamos National Security, LLC. All rights
|
||||||
# reserved.
|
# reserved.
|
||||||
@ -33,14 +33,21 @@
|
|||||||
# Initialization, version number, and other random setup/init stuff
|
# Initialization, version number, and other random setup/init stuff
|
||||||
############################################################################
|
############################################################################
|
||||||
|
|
||||||
|
# Load in everything found by autogen.pl
|
||||||
|
m4_include([config/autogen_found_items.m4])
|
||||||
|
|
||||||
|
# We don't have the version number to put in here yet, and we can't
|
||||||
|
# call PMIX_GET_VERSION (etc.) before AC_INIT. So use the shell
|
||||||
|
# version.
|
||||||
|
|
||||||
AC_INIT([pmix],
|
AC_INIT([pmix],
|
||||||
[m4_normalize(esyscmd([config/pmix_get_version.sh VERSION --tarball]))],
|
[m4_normalize(esyscmd([config/pmix_get_version.sh VERSION --tarball]))],
|
||||||
[http://www.open-mpi.org/projects/pmix/], [pmix])
|
[http://pmix.github.io/master], [pmix])
|
||||||
AC_PREREQ(2.69)
|
AC_PREREQ(2.69)
|
||||||
AC_CONFIG_AUX_DIR(./config)
|
AC_CONFIG_AUX_DIR(./config)
|
||||||
# Note that this directory must *exactly* match what was specified via
|
# Note that this directory must *exactly* match what was specified via
|
||||||
# -I in ACLOCAL_AMFLAGS in the top-level Makefile.am.
|
# -I in ACLOCAL_AMFLAGS in the top-level Makefile.am.
|
||||||
AC_CONFIG_MACRO_DIR(./config)
|
AC_CONFIG_MACRO_DIRS(./config)
|
||||||
|
|
||||||
# Get our platform support file. This has to be done very, very early
|
# Get our platform support file. This has to be done very, very early
|
||||||
# because it twiddles random bits of autoconf
|
# because it twiddles random bits of autoconf
|
||||||
@ -103,11 +110,11 @@ AH_TOP([/* -*- c -*-
|
|||||||
#ifndef PMIX_CONFIG_H
|
#ifndef PMIX_CONFIG_H
|
||||||
#define PMIX_CONFIG_H
|
#define PMIX_CONFIG_H
|
||||||
|
|
||||||
#include <pmix/autogen/pmix_config_top.h>
|
#include <src/include/pmix_config_top.h>
|
||||||
|
|
||||||
])
|
])
|
||||||
AH_BOTTOM([
|
AH_BOTTOM([
|
||||||
#include <pmix/autogen/pmix_config_bottom.h>
|
#include <src/include/pmix_config_bottom.h>
|
||||||
#endif /* PMIX_CONFIG_H */
|
#endif /* PMIX_CONFIG_H */
|
||||||
])
|
])
|
||||||
|
|
||||||
@ -137,6 +144,7 @@ AM_DISABLE_STATIC
|
|||||||
# This did not exist pre AM 1.11.x (where x is somewhere >0 and <3),
|
# This did not exist pre AM 1.11.x (where x is somewhere >0 and <3),
|
||||||
# but it is necessary in AM 1.12.x.
|
# but it is necessary in AM 1.12.x.
|
||||||
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
|
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
|
||||||
|
AM_PROG_LEX
|
||||||
|
|
||||||
LT_INIT()
|
LT_INIT()
|
||||||
LT_LANG([C])
|
LT_LANG([C])
|
||||||
@ -160,7 +168,7 @@ AS_IF([test "$pmix_debug" = "1"],
|
|||||||
############################################################################
|
############################################################################
|
||||||
|
|
||||||
# Setup the pmix core
|
# Setup the pmix core
|
||||||
PMIX_SETUP_CORE([])
|
PMIX_SETUP_CORE()
|
||||||
|
|
||||||
# Run the AM_CONDITIONALs
|
# Run the AM_CONDITIONALs
|
||||||
PMIX_DO_AM_CONDITIONALS
|
PMIX_DO_AM_CONDITIONALS
|
||||||
@ -209,6 +217,7 @@ AC_SUBST([CONFIGURE_DEPENDENCIES], ['$(top_srcdir)/VERSION'])
|
|||||||
AC_SUBST([libpmix_so_version])
|
AC_SUBST([libpmix_so_version])
|
||||||
|
|
||||||
AC_CONFIG_FILES(pmix_config_prefix[examples/Makefile]
|
AC_CONFIG_FILES(pmix_config_prefix[examples/Makefile]
|
||||||
|
pmix_config_prefix[man/Makefile]
|
||||||
pmix_config_prefix[test/Makefile]
|
pmix_config_prefix[test/Makefile]
|
||||||
pmix_config_prefix[test/simple/Makefile])
|
pmix_config_prefix[test/simple/Makefile])
|
||||||
|
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
enable_mem_debug=no
|
|
||||||
enable_mem_profile=no
|
|
||||||
enable_debug=no
|
|
@ -25,27 +25,27 @@ noinst_PROGRAMS = client dmodex dynamic fault pub tool
|
|||||||
|
|
||||||
client_SOURCES = client.c
|
client_SOURCES = client.c
|
||||||
client_LDFLAGS = $(PMIX_PKG_CONFIG_LDFLAGS)
|
client_LDFLAGS = $(PMIX_PKG_CONFIG_LDFLAGS)
|
||||||
client_LDADD = $(top_builddir)/libpmix.la
|
client_LDADD = $(top_builddir)/src/libpmix.la
|
||||||
|
|
||||||
dmodex_SOURCES = dmodex.c
|
dmodex_SOURCES = dmodex.c
|
||||||
dmodex_LDFLAGS = $(PMIX_PKG_CONFIG_LDFLAGS)
|
dmodex_LDFLAGS = $(PMIX_PKG_CONFIG_LDFLAGS)
|
||||||
dmodex_LDADD = $(top_builddir)/libpmix.la
|
dmodex_LDADD = $(top_builddir)/src/libpmix.la
|
||||||
|
|
||||||
dynamic_SOURCES = dynamic.c
|
dynamic_SOURCES = dynamic.c
|
||||||
dynamic_LDFLAGS = $(PMIX_PKG_CONFIG_LDFLAGS)
|
dynamic_LDFLAGS = $(PMIX_PKG_CONFIG_LDFLAGS)
|
||||||
dynamic_LDADD = $(top_builddir)/libpmix.la
|
dynamic_LDADD = $(top_builddir)/src/libpmix.la
|
||||||
|
|
||||||
fault_SOURCES = fault.c
|
fault_SOURCES = fault.c
|
||||||
fault_LDFLAGS = $(PMIX_PKG_CONFIG_LDFLAGS)
|
fault_LDFLAGS = $(PMIX_PKG_CONFIG_LDFLAGS)
|
||||||
fault_LDADD = $(top_builddir)/libpmix.la
|
fault_LDADD = $(top_builddir)/src/libpmix.la
|
||||||
|
|
||||||
pub_SOURCES = pub.c
|
pub_SOURCES = pub.c
|
||||||
pub_LDFLAGS = $(PMIX_PKG_CONFIG_LDFLAGS)
|
pub_LDFLAGS = $(PMIX_PKG_CONFIG_LDFLAGS)
|
||||||
pub_LDADD = $(top_builddir)/libpmix.la
|
pub_LDADD = $(top_builddir)/src/libpmix.la
|
||||||
|
|
||||||
tool_SOURCES = tool.c
|
tool_SOURCES = tool.c
|
||||||
tool_LDFLAGS = $(PMIX_PKG_CONFIG_LDFLAGS)
|
tool_LDFLAGS = $(PMIX_PKG_CONFIG_LDFLAGS)
|
||||||
tool_LDADD = $(top_builddir)/libpmix.la
|
tool_LDADD = $(top_builddir)/src/libpmix.la
|
||||||
|
|
||||||
distclean-local:
|
distclean-local:
|
||||||
rm -f *.o client dmodex dynamic fault pub server
|
rm -f *.o client dmodex dynamic fault pub server
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
#include <sys/param.h>
|
||||||
|
|
||||||
#include <pmix.h>
|
#include <pmix.h>
|
||||||
|
|
||||||
@ -45,7 +46,7 @@ int main(int argc, char **argv)
|
|||||||
uint32_t nprocs;
|
uint32_t nprocs;
|
||||||
char nsp2[PMIX_MAX_NSLEN+1];
|
char nsp2[PMIX_MAX_NSLEN+1];
|
||||||
pmix_app_t *app;
|
pmix_app_t *app;
|
||||||
char hostname[PMIX_MAXHOSTNAMELEN], dir[1024];
|
char hostname[MAXHOSTNAMELEN], dir[1024];
|
||||||
pmix_proc_t *peers;
|
pmix_proc_t *peers;
|
||||||
size_t npeers, ntmp=0;
|
size_t npeers, ntmp=0;
|
||||||
char *nodelist;
|
char *nodelist;
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright 2015-2016 Intel, Inc. All rights reserved
|
# Copyright 2015-2016 Intel, Inc. All rights reserved
|
||||||
# Copyright (c) 2016 IBM Corporation. All rights reserved.
|
|
||||||
#
|
#
|
||||||
# $COPYRIGHT$
|
# $COPYRIGHT$
|
||||||
#
|
#
|
||||||
@ -11,26 +10,13 @@
|
|||||||
|
|
||||||
# Only install the headers if we're in standalone mode
|
# Only install the headers if we're in standalone mode
|
||||||
|
|
||||||
|
|
||||||
if ! PMIX_EMBEDDED_MODE
|
if ! PMIX_EMBEDDED_MODE
|
||||||
include_HEADERS = \
|
include_HEADERS = \
|
||||||
include/pmix.h \
|
pmix.h \
|
||||||
include/pmix_server.h \
|
pmix_common.h \
|
||||||
include/pmi.h \
|
pmix_server.h \
|
||||||
include/pmi2.h \
|
pmi.h \
|
||||||
include/pmix_tool.h
|
pmi2.h \
|
||||||
|
pmix_tool.h
|
||||||
include_pmixdir = $(includedir)/pmix
|
|
||||||
include_pmix_HEADERS = \
|
|
||||||
include/pmix/rename.h \
|
|
||||||
include/pmix/pmix_common.h
|
|
||||||
|
|
||||||
include_pmix_autogendir = $(includedir)/pmix/autogen
|
|
||||||
include_pmix_autogen_HEADERS = \
|
|
||||||
include/pmix/autogen/pmix_config_top.h \
|
|
||||||
include/pmix/autogen/pmix_config_bottom.h \
|
|
||||||
include/pmix/autogen/pmix_stdint.h
|
|
||||||
nodist_include_pmix_autogen_HEADERS = \
|
|
||||||
include/pmix/autogen/config.h
|
|
||||||
|
|
||||||
endif ! PMIX_EMBEDDED_MODE
|
endif ! PMIX_EMBEDDED_MODE
|
||||||
|
@ -46,16 +46,13 @@
|
|||||||
#ifndef PMIx_H
|
#ifndef PMIx_H
|
||||||
#define PMIx_H
|
#define PMIx_H
|
||||||
|
|
||||||
#include <pmix/autogen/config.h>
|
|
||||||
|
|
||||||
/* Symbol transforms */
|
|
||||||
#include <pmix/rename.h>
|
|
||||||
|
|
||||||
/* Structure and constant definitions */
|
/* Structure and constant definitions */
|
||||||
#include <pmix/pmix_common.h>
|
#include <pmix_common.h>
|
||||||
|
|
||||||
|
|
||||||
BEGIN_C_DECLS
|
#if defined(c_plusplus) || defined(__cplusplus)
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/**** PMIX API ****/
|
/**** PMIX API ****/
|
||||||
|
|
||||||
@ -438,5 +435,10 @@ pmix_status_t PMIx_Query_info_nb(pmix_query_t queries[], size_t nqueries,
|
|||||||
pmix_status_t PMIx_Log_nb(const pmix_info_t data[], size_t ndata,
|
pmix_status_t PMIx_Log_nb(const pmix_info_t data[], size_t ndata,
|
||||||
const pmix_info_t directives[], size_t ndirs,
|
const pmix_info_t directives[], size_t ndirs,
|
||||||
pmix_op_cbfunc_t cbfunc, void *cbdata);
|
pmix_op_cbfunc_t cbfunc, void *cbdata);
|
||||||
END_C_DECLS
|
|
||||||
|
|
||||||
|
#if defined(c_plusplus) || defined(__cplusplus)
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,424 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2015 Intel, Inc. All rights reserved
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef PMIX_RENAME_H
|
|
||||||
#define PMIX_RENAME_H
|
|
||||||
|
|
||||||
#include <pmix/autogen/config.h>
|
|
||||||
|
|
||||||
|
|
||||||
BEGIN_C_DECLS
|
|
||||||
|
|
||||||
|
|
||||||
/* Only enact these defines if we're actually renaming the symbols
|
|
||||||
(i.e., avoid trying to have no-op defines if we're *not*
|
|
||||||
renaming).
|
|
||||||
|
|
||||||
Note that we don't symbol shift if we aren't in embedded mode
|
|
||||||
as that wouldn't make any sense. If we are in embedded mode,
|
|
||||||
then we aren't building the PMI-1/2 APIs as that also doesn't
|
|
||||||
make any sense
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if PMIX_SYM_TRANSFORM
|
|
||||||
|
|
||||||
/* Use a preprocessor two-step in order to get the prefixing right.
|
|
||||||
Make 2 macros: PMIX_NAME and PMIX_NAME_CAPS for renaming
|
|
||||||
things. */
|
|
||||||
|
|
||||||
#define PMIX_MUNGE_NAME(a, b) PMIX_MUNGE_NAME2(a, b)
|
|
||||||
#define PMIX_MUNGE_NAME2(a, b) a ## b
|
|
||||||
#define PMIX_NAME(name) PMIX_MUNGE_NAME(PMIX_SYM_PREFIX, pmix_ ## name)
|
|
||||||
#define PMIX_NAME_CAPS(name) PMIX_MUNGE_NAME(PMIX_SYM_PREFIX_CAPS, PMIx_ ## name)
|
|
||||||
|
|
||||||
/* Now define all the "real" names to be the prefixed names. This
|
|
||||||
allows us to use the real names throughout the code base (i.e.,
|
|
||||||
"pmix_<foo>"); the preprocessor will adjust to have the prefixed
|
|
||||||
name under the covers. */
|
|
||||||
|
|
||||||
/* PMIx APIs */
|
|
||||||
#define PMI2_Abort PMIX_NAME_CAPS(PMI2_Abort)
|
|
||||||
#define PMI2_Finalize PMIX_NAME_CAPS(PMI2_Finalize)
|
|
||||||
#define PMI2_Info_GetJobAttr PMIX_NAME_CAPS(PMI2_Info_GetJobAttr)
|
|
||||||
#define PMI2_Info_GetJobAttrIntArray PMIX_NAME_CAPS(PMI2_Info_GetJobAttrIntArray)
|
|
||||||
#define PMI2_Info_GetNodeAttr PMIX_NAME_CAPS(PMI2_Info_GetNodeAttr)
|
|
||||||
#define PMI2_Info_GetSize PMIX_NAME_CAPS(PMI2_Info_GetSize)
|
|
||||||
#define PMI2_Info_PutNodeAttr PMIX_NAME_CAPS(PMI2_Info_PutNodeAttr)
|
|
||||||
#define PMI2_Init PMIX_NAME_CAPS(PMI2_Init)
|
|
||||||
#define PMI2_Initialized PMIX_NAME_CAPS(PMI2_Initialized)
|
|
||||||
#define PMI2_Job_Connect PMIX_NAME_CAPS(PMI2_Job_Connect)
|
|
||||||
#define PMI2_Job_Disconnect PMIX_NAME_CAPS(PMI2_Job_Disconnect)
|
|
||||||
#define PMI2_Job_GetId PMIX_NAME_CAPS(PMI2_Job_GetId)
|
|
||||||
#define PMI2_Job_GetRank PMIX_NAME_CAPS(PMI2_Job_GetRank)
|
|
||||||
#define PMI2_Job_Spawn PMIX_NAME_CAPS(PMI2_Job_Spawn)
|
|
||||||
#define PMI2_KVS_Fence PMIX_NAME_CAPS(PMI2_KVS_Fence)
|
|
||||||
#define PMI2_KVS_Get PMIX_NAME_CAPS(PMI2_KVS_Get)
|
|
||||||
#define PMI2_KVS_Put PMIX_NAME_CAPS(PMI2_KVS_Put)
|
|
||||||
#define PMI2_Nameserv_lookup PMIX_NAME_CAPS(PMI2_Nameserv_lookup)
|
|
||||||
#define PMI2_Nameserv_publish PMIX_NAME_CAPS(PMI2_Nameserv_publish)
|
|
||||||
#define PMI2_Nameserv_unpublish PMIX_NAME_CAPS(PMI2_Nameserv_unpublish)
|
|
||||||
#define PMI_Abort PMIX_NAME_CAPS(PMI_Abort)
|
|
||||||
#define PMI_Args_to_keyval PMIX_NAME_CAPS(PMI_Args_to_keyval)
|
|
||||||
#define PMI_Barrier PMIX_NAME_CAPS(PMI_Barrier)
|
|
||||||
#define PMI_Finalize PMIX_NAME_CAPS(PMI_Finalize)
|
|
||||||
#define PMI_Free_keyvals PMIX_NAME_CAPS(PMI_Free_keyvals)
|
|
||||||
#define PMI_Get_appnum PMIX_NAME_CAPS(PMI_Get_appnum)
|
|
||||||
#define PMI_Get_clique_ranks PMIX_NAME_CAPS(PMI_Get_clique_ranks)
|
|
||||||
#define PMI_Get_clique_size PMIX_NAME_CAPS(PMI_Get_clique_size)
|
|
||||||
#define PMI_Get_id PMIX_NAME_CAPS(PMI_Get_id)
|
|
||||||
#define PMI_Get_id_length_max PMIX_NAME_CAPS(PMI_Get_id_length_max)
|
|
||||||
#define PMI_Get_kvs_domain_id PMIX_NAME_CAPS(PMI_Get_kvs_domain_id)
|
|
||||||
#define PMI_Get_options PMIX_NAME_CAPS(PMI_Get_options)
|
|
||||||
#define PMI_Get_rank PMIX_NAME_CAPS(PMI_Get_rank)
|
|
||||||
#define PMI_Get_size PMIX_NAME_CAPS(PMI_Get_size)
|
|
||||||
#define PMI_Get_universe_size PMIX_NAME_CAPS(PMI_Get_universe_size)
|
|
||||||
#define PMI_Init PMIX_NAME_CAPS(PMI_Init)
|
|
||||||
#define PMI_Initialized PMIX_NAME_CAPS(PMI_Initialized)
|
|
||||||
#define PMI_KVS_Commit PMIX_NAME_CAPS(PMI_KVS_Commit)
|
|
||||||
#define PMI_KVS_Create PMIX_NAME_CAPS(PMI_KVS_Create)
|
|
||||||
#define PMI_KVS_Destroy PMIX_NAME_CAPS(PMI_KVS_Destroy)
|
|
||||||
#define PMI_KVS_Get PMIX_NAME_CAPS(PMI_KVS_Get)
|
|
||||||
#define PMI_KVS_Get_key_length_max PMIX_NAME_CAPS(PMI_KVS_Get_key_length_max)
|
|
||||||
#define PMI_KVS_Get_my_name PMIX_NAME_CAPS(PMI_KVS_Get_my_name)
|
|
||||||
#define PMI_KVS_Get_name_length_max PMIX_NAME_CAPS(PMI_KVS_Get_name_length_max)
|
|
||||||
#define PMI_KVS_Get_value_length_max PMIX_NAME_CAPS(PMI_KVS_Get_value_length_max)
|
|
||||||
#define PMI_KVS_Iter_first PMIX_NAME_CAPS(PMI_KVS_Iter_first)
|
|
||||||
#define PMI_KVS_Iter_next PMIX_NAME_CAPS(PMI_KVS_Iter_next)
|
|
||||||
#define PMI_KVS_Put PMIX_NAME_CAPS(PMI_KVS_Put)
|
|
||||||
#define PMI_Lookup_name PMIX_NAME_CAPS(PMI_Lookup_name)
|
|
||||||
#define PMI_Parse_option PMIX_NAME_CAPS(PMI_Parse_option)
|
|
||||||
#define PMI_Publish_name PMIX_NAME_CAPS(PMI_Publish_name)
|
|
||||||
#define PMI_Spawn_multiple PMIX_NAME_CAPS(PMI_Spawn_multiple)
|
|
||||||
#define PMI_Unpublish_name PMIX_NAME_CAPS(PMI_Unpublish_name)
|
|
||||||
#define PMIx_Abort PMIX_NAME_CAPS(Abort)
|
|
||||||
#define PMIx_Commit PMIX_NAME_CAPS(Commit)
|
|
||||||
#define PMIx_Connect PMIX_NAME_CAPS(Connect)
|
|
||||||
#define PMIx_Connect_nb PMIX_NAME_CAPS(Connect_nb)
|
|
||||||
#define PMIx_Deregister_errhandler PMIX_NAME_CAPS(Deregister_errhandler)
|
|
||||||
#define PMIx_Disconnect PMIX_NAME_CAPS(Disconnect)
|
|
||||||
#define PMIx_Disconnect_nb PMIX_NAME_CAPS(Disconnect_nb)
|
|
||||||
#define PMIx_Error_string PMIX_NAME_CAPS(Error_string)
|
|
||||||
#define PMIx_Fence PMIX_NAME_CAPS(Fence)
|
|
||||||
#define PMIx_Fence_nb PMIX_NAME_CAPS(Fence_nb)
|
|
||||||
#define PMIx_Finalize PMIX_NAME_CAPS(Finalize)
|
|
||||||
#define PMIx_Get PMIX_NAME_CAPS(Get)
|
|
||||||
#define PMIx_Get_nb PMIX_NAME_CAPS(Get_nb)
|
|
||||||
#define PMIx_Get_version PMIX_NAME_CAPS(Get_version)
|
|
||||||
#define PMIx_Init PMIX_NAME_CAPS(Init)
|
|
||||||
#define PMIx_Initialized PMIX_NAME_CAPS(Initialized)
|
|
||||||
#define PMIx_Lookup PMIX_NAME_CAPS(Lookup)
|
|
||||||
#define PMIx_Lookup_nb PMIX_NAME_CAPS(Lookup_nb)
|
|
||||||
#define PMIx_Notify_error PMIX_NAME_CAPS(Notify_error)
|
|
||||||
#define PMIx_Publish PMIX_NAME_CAPS(Publish)
|
|
||||||
#define PMIx_Publish_nb PMIX_NAME_CAPS(Publish_nb)
|
|
||||||
#define PMIx_Put PMIX_NAME_CAPS(Put)
|
|
||||||
#define PMIx_Register_errhandler PMIX_NAME_CAPS(Register_errhandler)
|
|
||||||
#define PMIx_Resolve_nodes PMIX_NAME_CAPS(Resolve_nodes)
|
|
||||||
#define PMIx_Resolve_peers PMIX_NAME_CAPS(Resolve_peers)
|
|
||||||
#define PMIx_Spawn PMIX_NAME_CAPS(Spawn)
|
|
||||||
#define PMIx_Spawn_nb PMIX_NAME_CAPS(Spawn_nb)
|
|
||||||
#define PMIx_Store_internal PMIX_NAME_CAPS(Store_internal)
|
|
||||||
#define PMIx_Unpublish PMIX_NAME_CAPS(Unpublish)
|
|
||||||
#define PMIx_Unpublish_nb PMIX_NAME_CAPS(Unpublish_nb)
|
|
||||||
#define PMIx_generate_ppn PMIX_NAME_CAPS(generate_ppn)
|
|
||||||
#define PMIx_generate_regex PMIX_NAME_CAPS(generate_regex)
|
|
||||||
#define PMIx_server_deregister_client PMIX_NAME_CAPS(server_deregister_client)
|
|
||||||
#define PMIx_server_deregister_nspace PMIX_NAME_CAPS(server_deregister_nspace)
|
|
||||||
#define PMIx_server_dmodex_request PMIX_NAME_CAPS(server_dmodex_request)
|
|
||||||
#define PMIx_server_finalize PMIX_NAME_CAPS(server_finalize)
|
|
||||||
#define PMIx_server_init PMIX_NAME_CAPS(server_init)
|
|
||||||
#define PMIx_server_register_client PMIX_NAME_CAPS(server_register_client)
|
|
||||||
#define PMIx_server_register_nspace PMIX_NAME_CAPS(server_register_nspace)
|
|
||||||
#define PMIx_server_setup_fork PMIX_NAME_CAPS(server_setup_fork)
|
|
||||||
|
|
||||||
/* internal functions */
|
|
||||||
#define pmix_argv_append PMIX_NAME(argv_append)
|
|
||||||
#define pmix_argv_append_nosize PMIX_NAME(argv_append_nosize)
|
|
||||||
#define pmix_argv_append_unique_nosize PMIX_NAME(argv_append_unique_nosize)
|
|
||||||
#define pmix_argv_copy PMIX_NAME(argv_copy)
|
|
||||||
#define pmix_argv_count PMIX_NAME(argv_count)
|
|
||||||
#define pmix_argv_delete PMIX_NAME(argv_delete)
|
|
||||||
#define pmix_argv_free PMIX_NAME(argv_free)
|
|
||||||
#define pmix_argv_insert PMIX_NAME(argv_insert)
|
|
||||||
#define pmix_argv_insert_element PMIX_NAME(argv_insert_element)
|
|
||||||
#define pmix_argv_join PMIX_NAME(argv_join)
|
|
||||||
#define pmix_argv_join_range PMIX_NAME(argv_join_range)
|
|
||||||
#define pmix_argv_len PMIX_NAME(argv_len)
|
|
||||||
#define pmix_argv_prepend_nosize PMIX_NAME(argv_prepend_nosize)
|
|
||||||
#define pmix_argv_split PMIX_NAME(argv_split)
|
|
||||||
#define pmix_argv_split_with_empty PMIX_NAME(argv_split_with_empty)
|
|
||||||
#define pmix_asprintf PMIX_NAME(asprintf)
|
|
||||||
#define pmix_basename PMIX_NAME(basename)
|
|
||||||
#define pmix_bcopy_csum_partial PMIX_NAME(bcopy_csum_partial)
|
|
||||||
#define pmix_bcopy_uicrc_partial PMIX_NAME(bcopy_uicrc_partial)
|
|
||||||
#define pmix_bcopy_uicsum_partial PMIX_NAME(bcopy_uicsum_partial)
|
|
||||||
#define pmix_bfrop PMIX_NAME(bfrop)
|
|
||||||
#define pmix_bfrop_buffer_extend PMIX_NAME(bfrop_buffer_extend)
|
|
||||||
#define pmix_bfrop_close PMIX_NAME(bfrop_close)
|
|
||||||
#define pmix_bfrop_copy PMIX_NAME(bfrop_copy)
|
|
||||||
#define pmix_bfrop_copy_app PMIX_NAME(bfrop_copy_app)
|
|
||||||
#define pmix_bfrop_copy_array PMIX_NAME(bfrop_copy_array)
|
|
||||||
#define pmix_bfrop_copy_bo PMIX_NAME(bfrop_copy_bo)
|
|
||||||
#define pmix_bfrop_copy_buf PMIX_NAME(bfrop_copy_buf)
|
|
||||||
#define pmix_bfrop_copy_info PMIX_NAME(bfrop_copy_info)
|
|
||||||
#define pmix_bfrop_copy_kval PMIX_NAME(bfrop_copy_kval)
|
|
||||||
#define pmix_bfrop_copy_modex PMIX_NAME(bfrop_copy_modex)
|
|
||||||
#define pmix_bfrop_copy_payload PMIX_NAME(bfrop_copy_payload)
|
|
||||||
#define pmix_bfrop_copy_pdata PMIX_NAME(bfrop_copy_pdata)
|
|
||||||
#define pmix_bfrop_copy_persist PMIX_NAME(bfrop_copy_persist)
|
|
||||||
#define pmix_bfrop_copy_proc PMIX_NAME(bfrop_copy_proc)
|
|
||||||
#define pmix_bfrop_copy_string PMIX_NAME(bfrop_copy_string)
|
|
||||||
#define pmix_bfrop_copy_topo PMIX_NAME(bfrop_copy_topo)
|
|
||||||
#define pmix_bfrop_copy_value PMIX_NAME(bfrop_copy_value)
|
|
||||||
#define pmix_bfrop_get_data_type PMIX_NAME(bfrop_get_data_type)
|
|
||||||
#define pmix_bfrop_initial_size PMIX_NAME(pmix_bfrop_initial_size)
|
|
||||||
#define pmix_bfrop_initialized PMIX_NAME(bfrop_initialized)
|
|
||||||
#define pmix_bfrop_num_reg_types PMIX_NAME(pmix_bfrop_num_reg_types)
|
|
||||||
#define pmix_bfrop_open PMIX_NAME(bfrop_open)
|
|
||||||
#define pmix_bfrop_pack PMIX_NAME(bfrop_pack)
|
|
||||||
#define pmix_bfrop_pack_app PMIX_NAME(bfrop_pack_app)
|
|
||||||
#define pmix_bfrop_pack_array PMIX_NAME(bfrop_pack_array)
|
|
||||||
#define pmix_bfrop_pack_bo PMIX_NAME(bfrop_pack_bo)
|
|
||||||
#define pmix_bfrop_pack_bool PMIX_NAME(bfrop_pack_bool)
|
|
||||||
#define pmix_bfrop_pack_buf PMIX_NAME(bfrop_pack_buf)
|
|
||||||
#define pmix_bfrop_pack_buffer PMIX_NAME(bfrop_pack_buffer)
|
|
||||||
#define pmix_bfrop_pack_byte PMIX_NAME(bfrop_pack_byte)
|
|
||||||
#define pmix_bfrop_pack_datatype PMIX_NAME(bfrop_pack_datatype)
|
|
||||||
#define pmix_bfrop_pack_double PMIX_NAME(bfrop_pack_double)
|
|
||||||
#define pmix_bfrop_pack_float PMIX_NAME(bfrop_pack_float)
|
|
||||||
#define pmix_bfrop_pack_info PMIX_NAME(bfrop_pack_info)
|
|
||||||
#define pmix_bfrop_pack_int PMIX_NAME(bfrop_pack_int)
|
|
||||||
#define pmix_bfrop_pack_int16 PMIX_NAME(bfrop_pack_int16)
|
|
||||||
#define pmix_bfrop_pack_int32 PMIX_NAME(bfrop_pack_int32)
|
|
||||||
#define pmix_bfrop_pack_int64 PMIX_NAME(bfrop_pack_int64)
|
|
||||||
#define pmix_bfrop_pack_kval PMIX_NAME(bfrop_pack_kval)
|
|
||||||
#define pmix_bfrop_pack_modex PMIX_NAME(bfrop_pack_modex)
|
|
||||||
#define pmix_bfrop_pack_pdata PMIX_NAME(bfrop_pack_pdata)
|
|
||||||
#define pmix_bfrop_pack_persist PMIX_NAME(bfrop_pack_persist)
|
|
||||||
#define pmix_bfrop_pack_pid PMIX_NAME(bfrop_pack_pid)
|
|
||||||
#define pmix_bfrop_pack_proc PMIX_NAME(bfrop_pack_proc)
|
|
||||||
#define pmix_bfrop_pack_sizet PMIX_NAME(bfrop_pack_sizet)
|
|
||||||
#define pmix_bfrop_pack_string PMIX_NAME(bfrop_pack_string)
|
|
||||||
#define pmix_bfrop_pack_time PMIX_NAME(bfrop_pack_time)
|
|
||||||
#define pmix_bfrop_pack_timeval PMIX_NAME(bfrop_pack_timeval)
|
|
||||||
#define pmix_bfrop_pack_topo PMIX_NAME(bfrop_pack_topo)
|
|
||||||
#define pmix_bfrop_pack_value PMIX_NAME(bfrop_pack_value)
|
|
||||||
#define pmix_bfrop_print PMIX_NAME(bfrop_print)
|
|
||||||
#define pmix_bfrop_print_app PMIX_NAME(bfrop_print_app)
|
|
||||||
#define pmix_bfrop_print_array PMIX_NAME(bfrop_print_array)
|
|
||||||
#define pmix_bfrop_print_bo PMIX_NAME(bfrop_print_bo)
|
|
||||||
#define pmix_bfrop_print_bool PMIX_NAME(bfrop_print_bool)
|
|
||||||
#define pmix_bfrop_print_buf PMIX_NAME(bfrop_print_buf)
|
|
||||||
#define pmix_bfrop_print_byte PMIX_NAME(bfrop_print_byte)
|
|
||||||
#define pmix_bfrop_print_double PMIX_NAME(bfrop_print_double)
|
|
||||||
#define pmix_bfrop_print_float PMIX_NAME(bfrop_print_float)
|
|
||||||
#define pmix_bfrop_print_info PMIX_NAME(bfrop_print_info)
|
|
||||||
#define pmix_bfrop_print_int PMIX_NAME(bfrop_print_int)
|
|
||||||
#define pmix_bfrop_print_int16 PMIX_NAME(bfrop_print_int16)
|
|
||||||
#define pmix_bfrop_print_int32 PMIX_NAME(bfrop_print_int32)
|
|
||||||
#define pmix_bfrop_print_int64 PMIX_NAME(bfrop_print_int64)
|
|
||||||
#define pmix_bfrop_print_int8 PMIX_NAME(bfrop_print_int8)
|
|
||||||
#define pmix_bfrop_print_kval PMIX_NAME(bfrop_print_kval)
|
|
||||||
#define pmix_bfrop_print_modex PMIX_NAME(bfrop_print_modex)
|
|
||||||
#define pmix_bfrop_print_pdata PMIX_NAME(bfrop_print_pdata)
|
|
||||||
#define pmix_bfrop_print_persist PMIX_NAME(bfrop_print_persist)
|
|
||||||
#define pmix_bfrop_print_pid PMIX_NAME(bfrop_print_pid)
|
|
||||||
#define pmix_bfrop_print_proc PMIX_NAME(bfrop_print_proc)
|
|
||||||
#define pmix_bfrop_print_size PMIX_NAME(bfrop_print_size)
|
|
||||||
#define pmix_bfrop_print_string PMIX_NAME(bfrop_print_string)
|
|
||||||
#define pmix_bfrop_print_time PMIX_NAME(bfrop_print_time)
|
|
||||||
#define pmix_bfrop_print_timeval PMIX_NAME(bfrop_print_timeval)
|
|
||||||
#define pmix_bfrop_print_topo PMIX_NAME(bfrop_print_topo)
|
|
||||||
#define pmix_bfrop_print_uint PMIX_NAME(bfrop_print_uint)
|
|
||||||
#define pmix_bfrop_print_uint16 PMIX_NAME(bfrop_print_uint16)
|
|
||||||
#define pmix_bfrop_print_uint32 PMIX_NAME(bfrop_print_uint32)
|
|
||||||
#define pmix_bfrop_print_uint64 PMIX_NAME(bfrop_print_uint64)
|
|
||||||
#define pmix_bfrop_print_uint8 PMIX_NAME(bfrop_print_uint8)
|
|
||||||
#define pmix_bfrop_print_value PMIX_NAME(bfrop_print_value)
|
|
||||||
#define pmix_bfrop_std_copy PMIX_NAME(bfrop_std_copy)
|
|
||||||
#define pmix_bfrop_store_data_type PMIX_NAME(bfrop_store_data_type)
|
|
||||||
#define pmix_bfrop_threshold_size PMIX_NAME(pmix_bfrop_threshold_size)
|
|
||||||
#define pmix_bfrop_too_small PMIX_NAME(bfrop_too_small)
|
|
||||||
#define pmix_bfrop_types PMIX_NAME(bfrop_types)
|
|
||||||
#define pmix_bfrop_type_info_t_class PMIX_NAME(bfrop_type_info_t_class)
|
|
||||||
#define pmix_bfrop_unpack PMIX_NAME(bfrop_unpack)
|
|
||||||
#define pmix_bfrop_unpack_app PMIX_NAME(bfrop_unpack_app)
|
|
||||||
#define pmix_bfrop_unpack_array PMIX_NAME(bfrop_unpack_array)
|
|
||||||
#define pmix_bfrop_unpack_bo PMIX_NAME(bfrop_unpack_bo)
|
|
||||||
#define pmix_bfrop_unpack_bool PMIX_NAME(bfrop_unpack_bool)
|
|
||||||
#define pmix_bfrop_unpack_buf PMIX_NAME(bfrop_unpack_buf)
|
|
||||||
#define pmix_bfrop_unpack_buffer PMIX_NAME(bfrop_unpack_buffer)
|
|
||||||
#define pmix_bfrop_unpack_byte PMIX_NAME(bfrop_unpack_byte)
|
|
||||||
#define pmix_bfrop_unpack_datatype PMIX_NAME(bfrop_unpack_datatype)
|
|
||||||
#define pmix_bfrop_unpack_double PMIX_NAME(bfrop_unpack_double)
|
|
||||||
#define pmix_bfrop_unpack_float PMIX_NAME(bfrop_unpack_float)
|
|
||||||
#define pmix_bfrop_unpack_info PMIX_NAME(bfrop_unpack_info)
|
|
||||||
#define pmix_bfrop_unpack_int PMIX_NAME(bfrop_unpack_int)
|
|
||||||
#define pmix_bfrop_unpack_int16 PMIX_NAME(bfrop_unpack_int16)
|
|
||||||
#define pmix_bfrop_unpack_int32 PMIX_NAME(bfrop_unpack_int32)
|
|
||||||
#define pmix_bfrop_unpack_int64 PMIX_NAME(bfrop_unpack_int64)
|
|
||||||
#define pmix_bfrop_unpack_kval PMIX_NAME(bfrop_unpack_kval)
|
|
||||||
#define pmix_bfrop_unpack_modex PMIX_NAME(bfrop_unpack_modex)
|
|
||||||
#define pmix_bfrop_unpack_pdata PMIX_NAME(bfrop_unpack_pdata)
|
|
||||||
#define pmix_bfrop_unpack_persist PMIX_NAME(bfrop_unpack_persist)
|
|
||||||
#define pmix_bfrop_unpack_pid PMIX_NAME(bfrop_unpack_pid)
|
|
||||||
#define pmix_bfrop_unpack_proc PMIX_NAME(bfrop_unpack_proc)
|
|
||||||
#define pmix_bfrop_unpack_sizet PMIX_NAME(bfrop_unpack_sizet)
|
|
||||||
#define pmix_bfrop_unpack_string PMIX_NAME(bfrop_unpack_string)
|
|
||||||
#define pmix_bfrop_unpack_time PMIX_NAME(bfrop_unpack_time)
|
|
||||||
#define pmix_bfrop_unpack_timeval PMIX_NAME(bfrop_unpack_timeval)
|
|
||||||
#define pmix_bfrop_unpack_topo PMIX_NAME(bfrop_unpack_topo)
|
|
||||||
#define pmix_bfrop_unpack_value PMIX_NAME(bfrop_unpack_value)
|
|
||||||
#define pmix_buffer_t_class PMIX_NAME(buffer_t_class)
|
|
||||||
#define pmix_cb_t_class PMIX_NAME(cb_t_class)
|
|
||||||
#define pmix_class_finalize PMIX_NAME(class_finalize)
|
|
||||||
#define pmix_class_initialize PMIX_NAME(class_initialize)
|
|
||||||
#define pmix_client_globals PMIX_NAME(pmix_client_globals)
|
|
||||||
#define pmix_client_process_nspace_blob PMIX_NAME(client_process_nspace_blob)
|
|
||||||
#define pmix_csum_partial PMIX_NAME(csum_partial)
|
|
||||||
#define pmix_dirname PMIX_NAME(dirname)
|
|
||||||
#define pmix_dmdx_local_t_class PMIX_NAME(dmdx_local_t_class)
|
|
||||||
#define pmix_dmdx_remote_t_class PMIX_NAME(dmdx_remote_t_class)
|
|
||||||
#define pmix_dmdx_reply_caddy_t_class PMIX_NAME(dmdx_reply_caddy_t_class)
|
|
||||||
#define pmix_dmdx_request_t_class PMIX_NAME(dmdx_request_t_class)
|
|
||||||
#define pmix_environ_merge PMIX_NAME(environ_merge)
|
|
||||||
#define pmix_errhandler_invoke PMIX_NAME(errhandler_invoke)
|
|
||||||
#define pmix_fd_read PMIX_NAME(fd_read)
|
|
||||||
#define pmix_fd_set_cloexec PMIX_NAME(fd_set_cloexec)
|
|
||||||
#define pmix_fd_write PMIX_NAME(fd_write)
|
|
||||||
#define pmix_globals PMIX_NAME(globals)
|
|
||||||
#define pmix_globals_finalize PMIX_NAME(globals_finalize)
|
|
||||||
#define pmix_globals_init PMIX_NAME(globals_init)
|
|
||||||
#define pmix_hash_fetch PMIX_NAME(hash_fetch)
|
|
||||||
#define pmix_hash_remove_data PMIX_NAME(hash_remove_data)
|
|
||||||
#define pmix_hash_store PMIX_NAME(hash_store)
|
|
||||||
#define pmix_hash_table_get_first_key_uint32 PMIX_NAME(hash_table_get_first_key_uint32)
|
|
||||||
#define pmix_hash_table_get_first_key_uint64 PMIX_NAME(hash_table_get_first_key_uint64)
|
|
||||||
#define pmix_hash_table_get_next_key_uint32 PMIX_NAME(hash_table_get_next_key_uint32)
|
|
||||||
#define pmix_hash_table_get_next_key_uint64 PMIX_NAME(hash_table_get_next_key_uint64)
|
|
||||||
#define pmix_hash_table_get_value_ptr PMIX_NAME(hash_table_get_value_ptr)
|
|
||||||
#define pmix_hash_table_get_value_uint32 PMIX_NAME(hash_table_get_value_uint32)
|
|
||||||
#define pmix_hash_table_get_value_uint64 PMIX_NAME(hash_table_get_value_uint64)
|
|
||||||
#define pmix_hash_table_init PMIX_NAME(hash_table_init)
|
|
||||||
#define pmix_hash_table_remove_all PMIX_NAME(hash_table_remove_all)
|
|
||||||
#define pmix_hash_table_remove_value_ptr PMIX_NAME(hash_table_remove_value_ptr)
|
|
||||||
#define pmix_hash_table_remove_value_uint32 PMIX_NAME(hash_table_remove_value_uint32)
|
|
||||||
#define pmix_hash_table_remove_value_uint64 PMIX_NAME(hash_table_remove_value_uint64)
|
|
||||||
#define pmix_hash_table_set_value_ptr PMIX_NAME(hash_table_set_value_ptr)
|
|
||||||
#define pmix_hash_table_set_value_uint32 PMIX_NAME(hash_table_set_value_uint32)
|
|
||||||
#define pmix_hash_table_set_value_uint64 PMIX_NAME(hash_table_set_value_uint64)
|
|
||||||
#define pmix_hash_table_t_class PMIX_NAME(hash_table_t_class)
|
|
||||||
#define pmix_home_directory PMIX_NAME(home_directory)
|
|
||||||
#define pmix_host_server PMIX_NAME(pmix_host_server)
|
|
||||||
#define pmix_initialize_crc_table PMIX_NAME(initialize_crc_table)
|
|
||||||
#define pmix_kval_t_class PMIX_NAME(kval_t_class)
|
|
||||||
#define pmix_list_insert PMIX_NAME(list_insert)
|
|
||||||
#define pmix_list_item_t_class PMIX_NAME(list_item_t_class)
|
|
||||||
#define pmix_list_join PMIX_NAME(list_join)
|
|
||||||
#define pmix_list_sort PMIX_NAME(list_sort)
|
|
||||||
#define pmix_list_splice PMIX_NAME(list_splice)
|
|
||||||
#define pmix_list_t_class PMIX_NAME(list_t_class)
|
|
||||||
#define pmix_munge_module PMIX_NAME(munge_module)
|
|
||||||
#define pmix_native_module PMIX_NAME(native_module)
|
|
||||||
#define pmix_notify_caddy_t_class PMIX_NAME(notify_caddy_t_class)
|
|
||||||
#define pmix_nrec_t_class PMIX_NAME(nrec_t_class)
|
|
||||||
#define pmix_nspace_t_class PMIX_NAME(nspace_t_class)
|
|
||||||
#define pmix_object_t_class PMIX_NAME(object_t_class)
|
|
||||||
#define pmix_os_path PMIX_NAME(os_path)
|
|
||||||
#define pmix_output PMIX_NAME(output)
|
|
||||||
#define pmix_output_close PMIX_NAME(output_close)
|
|
||||||
#define pmix_output_finalize PMIX_NAME(output_finalize)
|
|
||||||
#define pmix_output_get_verbosity PMIX_NAME(output_get_verbosity)
|
|
||||||
#define pmix_output_init PMIX_NAME(output_init)
|
|
||||||
#define pmix_output_open PMIX_NAME(output_open)
|
|
||||||
#define pmix_output_redirected_syslog_pri PMIX_NAME(pmix_output_redirected_syslog_pri)
|
|
||||||
#define pmix_output_redirected_to_syslog PMIX_NAME(output_redirected_to_syslog)
|
|
||||||
#define pmix_output_reopen PMIX_NAME(output_reopen)
|
|
||||||
#define pmix_output_reopen_all PMIX_NAME(output_reopen_all)
|
|
||||||
#define pmix_output_set_output_file_info PMIX_NAME(output_set_output_file_info)
|
|
||||||
#define pmix_output_set_verbosity PMIX_NAME(output_set_verbosity)
|
|
||||||
#define pmix_output_stream_t_class PMIX_NAME(output_stream_t_class)
|
|
||||||
#define pmix_output_string PMIX_NAME(output_string)
|
|
||||||
#define pmix_output_switch PMIX_NAME(output_switch)
|
|
||||||
#define pmix_output_verbose PMIX_NAME(output_verbose)
|
|
||||||
#define pmix_output_vstring PMIX_NAME(output_vstring)
|
|
||||||
#define pmix_output_vverbose PMIX_NAME(output_vverbose)
|
|
||||||
#define pmix_pack_proc_map PMIX_NAME(pack_proc_map)
|
|
||||||
#define pmix_peer_t_class PMIX_NAME(peer_t_class)
|
|
||||||
#define pmix_pending_connection_t_class PMIX_NAME(pending_connection_t_class)
|
|
||||||
#define pmix_pending_nspace_requests PMIX_NAME(pending_nspace_requests)
|
|
||||||
#define pmix_pending_resolve PMIX_NAME(pending_resolve)
|
|
||||||
#define pmix_pointer_array_add PMIX_NAME(pointer_array_add)
|
|
||||||
#define pmix_pointer_array_init PMIX_NAME(pointer_array_init)
|
|
||||||
#define pmix_pointer_array_set_item PMIX_NAME(pointer_array_set_item)
|
|
||||||
#define pmix_pointer_array_set_size PMIX_NAME(pointer_array_set_size)
|
|
||||||
#define pmix_pointer_array_t_class PMIX_NAME(pointer_array_t_class)
|
|
||||||
#define pmix_pointer_array_test_and_set_item PMIX_NAME(pointer_array_test_and_set_item)
|
|
||||||
#define pmix_rank_info_t_class PMIX_NAME(rank_info_t_class)
|
|
||||||
#define pmix_regex_parse_nodes PMIX_NAME(regex_parse_nodes)
|
|
||||||
#define pmix_regex_parse_procs PMIX_NAME(regex_parse_procs)
|
|
||||||
#define pmix_regex_range_t_class PMIX_NAME(regex_range_t_class)
|
|
||||||
#define pmix_regex_value_t_class PMIX_NAME(regex_value_t_class)
|
|
||||||
#define pmix_sec PMIX_NAME(pmix_sec)
|
|
||||||
#define pmix_sec_finalize PMIX_NAME(sec_finalize)
|
|
||||||
#define pmix_sec_init PMIX_NAME(sec_init)
|
|
||||||
#define pmix_server_abort PMIX_NAME(server_abort)
|
|
||||||
#define pmix_server_caddy_t_class PMIX_NAME(server_caddy_t_class)
|
|
||||||
#define pmix_server_commit PMIX_NAME(server_commit)
|
|
||||||
#define pmix_server_connect PMIX_NAME(server_connect)
|
|
||||||
#define pmix_server_deregister_errhandler PMIX_NAME(server_deregister_errhandler)
|
|
||||||
#define pmix_server_fence PMIX_NAME(server_fence)
|
|
||||||
#define pmix_server_get PMIX_NAME(server_get)
|
|
||||||
#define pmix_server_globals PMIX_NAME(pmix_server_globals)
|
|
||||||
#define pmix_server_lookup PMIX_NAME(server_lookup)
|
|
||||||
#define pmix_server_notify_error PMIX_NAME(server_notify_error)
|
|
||||||
#define pmix_server_nspace_t_class PMIX_NAME(server_nspace_t_class)
|
|
||||||
#define pmix_server_publish PMIX_NAME(server_publish)
|
|
||||||
#define pmix_server_register_errhandler PMIX_NAME(server_register_errhandler)
|
|
||||||
#define pmix_server_spawn PMIX_NAME(server_spawn)
|
|
||||||
#define pmix_server_trkr_t_class PMIX_NAME(server_trkr_t_class)
|
|
||||||
#define pmix_server_unpublish PMIX_NAME(server_unpublish)
|
|
||||||
#define pmix_setenv PMIX_NAME(setenv)
|
|
||||||
#define pmix_setup_caddy_t_class PMIX_NAME(setup_caddy_t_class)
|
|
||||||
#define pmix_shift_caddy_t_class PMIX_NAME(shift_caddy_t_class)
|
|
||||||
#define pmix_snd_caddy_t_class PMIX_NAME(snd_caddy_t_class)
|
|
||||||
#define pmix_snprintf PMIX_NAME(snprintf)
|
|
||||||
#define pmix_start_listening PMIX_NAME(start_listening)
|
|
||||||
#define pmix_start_progress_thread PMIX_NAME(start_progress_thread)
|
|
||||||
#define pmix_stop_listening PMIX_NAME(stop_listening)
|
|
||||||
#define pmix_stop_progress_thread PMIX_NAME(stop_progress_thread)
|
|
||||||
#define pmix_timer_t_class PMIX_NAME(timer_t_class)
|
|
||||||
#define pmix_tmp_directory PMIX_NAME(tmp_directory)
|
|
||||||
#define pmix_trkr_caddy_t_class PMIX_NAME(trkr_caddy_t_class)
|
|
||||||
#define pmix_uicrc_partial PMIX_NAME(uicrc_partial)
|
|
||||||
#define pmix_uicsum_partial PMIX_NAME(uicsum_partial)
|
|
||||||
#define pmix_unsetenv PMIX_NAME(unsetenv)
|
|
||||||
#define pmix_usock_finalize PMIX_NAME(usock_finalize)
|
|
||||||
#define pmix_usock_globals PMIX_NAME(pmix_usock_globals)
|
|
||||||
#define pmix_usock_init PMIX_NAME(usock_init)
|
|
||||||
#define pmix_usock_posted_recv_t_class PMIX_NAME(usock_posted_recv_t_class)
|
|
||||||
#define pmix_usock_process_msg PMIX_NAME(usock_process_msg)
|
|
||||||
#define pmix_usock_queue_t_class PMIX_NAME(usock_queue_t_class)
|
|
||||||
#define pmix_usock_recv_blocking PMIX_NAME(usock_recv_blocking)
|
|
||||||
#define pmix_usock_recv_handler PMIX_NAME(usock_recv_handler)
|
|
||||||
#define pmix_usock_recv_t_class PMIX_NAME(usock_recv_t_class)
|
|
||||||
#define pmix_usock_send_blocking PMIX_NAME(usock_send_blocking)
|
|
||||||
#define pmix_usock_send_handler PMIX_NAME(usock_send_handler)
|
|
||||||
#define pmix_usock_send_recv PMIX_NAME(usock_send_recv)
|
|
||||||
#define pmix_usock_send_t_class PMIX_NAME(usock_send_t_class)
|
|
||||||
#define pmix_usock_set_blocking PMIX_NAME(usock_set_blocking)
|
|
||||||
#define pmix_usock_set_nonblocking PMIX_NAME(usock_set_nonblocking)
|
|
||||||
#define pmix_usock_sr_t_class PMIX_NAME(usock_sr_t_class)
|
|
||||||
#define pmix_value_load PMIX_NAME(value_load)
|
|
||||||
#define pmix_value_unload PMIX_NAME(value_unload)
|
|
||||||
#define pmix_value_xfer PMIX_NAME(value_xfer)
|
|
||||||
#define pmix_vasprintf PMIX_NAME(vasprintf)
|
|
||||||
#define pmix_vsnprintf PMIX_NAME(vsnprintf)
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* PMIX_SYM_TRANSFORM */
|
|
||||||
|
|
||||||
END_C_DECLS
|
|
||||||
|
|
||||||
#endif /* PMIX_RENAME_H */
|
|
@ -51,9 +51,6 @@
|
|||||||
#ifndef PMIx_COMMON_H
|
#ifndef PMIx_COMMON_H
|
||||||
#define PMIx_COMMON_H
|
#define PMIx_COMMON_H
|
||||||
|
|
||||||
#include <pmix/autogen/config.h>
|
|
||||||
#include <pmix/rename.h>
|
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@ -68,7 +65,9 @@
|
|||||||
#include <sys/types.h> /* for uid_t and gid_t */
|
#include <sys/types.h> /* for uid_t and gid_t */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
BEGIN_C_DECLS
|
#if defined(c_plusplus) || defined(__cplusplus)
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/**** PMIX CONSTANTS ****/
|
/**** PMIX CONSTANTS ****/
|
||||||
|
|
||||||
@ -127,6 +126,7 @@ typedef uint32_t pmix_rank_t;
|
|||||||
/* identification attributes */
|
/* identification attributes */
|
||||||
#define PMIX_USERID "pmix.euid" // (uint32_t) effective user id
|
#define PMIX_USERID "pmix.euid" // (uint32_t) effective user id
|
||||||
#define PMIX_GRPID "pmix.egid" // (uint32_t) effective group id
|
#define PMIX_GRPID "pmix.egid" // (uint32_t) effective group id
|
||||||
|
#define PMIX_DSTPATH "pmix.dstpath" // (char*) path to dstore files
|
||||||
|
|
||||||
/* attributes for the rendezvous socket */
|
/* attributes for the rendezvous socket */
|
||||||
#define PMIX_SOCKET_MODE "pmix.sockmode" // (uint32_t) POSIX mode_t (9 bits valid)
|
#define PMIX_SOCKET_MODE "pmix.sockmode" // (uint32_t) POSIX mode_t (9 bits valid)
|
||||||
@ -1336,5 +1336,8 @@ pmix_status_t PMIx_Store_internal(const pmix_proc_t *proc,
|
|||||||
#define PMIX_VAL_FREE(_v) \
|
#define PMIX_VAL_FREE(_v) \
|
||||||
PMIx_free_value_data(_v)
|
PMIx_free_value_data(_v)
|
||||||
|
|
||||||
END_C_DECLS
|
#if defined(c_plusplus) || defined(__cplusplus)
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
@ -59,15 +59,12 @@
|
|||||||
#ifndef PMIx_SERVER_API_H
|
#ifndef PMIx_SERVER_API_H
|
||||||
#define PMIx_SERVER_API_H
|
#define PMIx_SERVER_API_H
|
||||||
|
|
||||||
#include <pmix/autogen/config.h>
|
|
||||||
|
|
||||||
/* Symbol transforms */
|
|
||||||
#include <pmix/rename.h>
|
|
||||||
|
|
||||||
/* Structure and constant definitions */
|
/* Structure and constant definitions */
|
||||||
#include <pmix/pmix_common.h>
|
#include <pmix_common.h>
|
||||||
|
|
||||||
BEGIN_C_DECLS
|
#if defined(c_plusplus) || defined(__cplusplus)
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/**** SERVER FUNCTION-SHIPPED APIs ****/
|
/**** SERVER FUNCTION-SHIPPED APIs ****/
|
||||||
/* NOTE: for performance purposes, the host server is required to
|
/* NOTE: for performance purposes, the host server is required to
|
||||||
@ -81,7 +78,6 @@ BEGIN_C_DECLS
|
|||||||
* by the host server via callback function is owned by the host
|
* by the host server via callback function is owned by the host
|
||||||
* server, which is free to release it upon return from the callback */
|
* server, which is free to release it upon return from the callback */
|
||||||
|
|
||||||
|
|
||||||
/* Notify the host server that a client connected to us - note
|
/* Notify the host server that a client connected to us - note
|
||||||
* that the client will be in a blocked state until the host server
|
* that the client will be in a blocked state until the host server
|
||||||
* executes the callback function, thus allowing the PMIx server support
|
* executes the callback function, thus allowing the PMIx server support
|
||||||
@ -487,6 +483,8 @@ pmix_status_t PMIx_server_dmodex_request(const pmix_proc_t *proc,
|
|||||||
pmix_dmodex_response_fn_t cbfunc,
|
pmix_dmodex_response_fn_t cbfunc,
|
||||||
void *cbdata);
|
void *cbdata);
|
||||||
|
|
||||||
END_C_DECLS
|
#if defined(c_plusplus) || defined(__cplusplus)
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -59,18 +59,12 @@
|
|||||||
#ifndef PMIx_TOOL_API_H
|
#ifndef PMIx_TOOL_API_H
|
||||||
#define PMIx_TOOL_API_H
|
#define PMIx_TOOL_API_H
|
||||||
|
|
||||||
#include <pmix/autogen/config.h>
|
|
||||||
|
|
||||||
/* Symbol transforms */
|
|
||||||
#include <pmix/rename.h>
|
|
||||||
|
|
||||||
/* Structure and constant definitions */
|
|
||||||
#include <pmix/pmix_common.h>
|
|
||||||
|
|
||||||
/* provide access to the rest of the client functions */
|
/* provide access to the rest of the client functions */
|
||||||
#include <pmix.h>
|
#include <pmix.h>
|
||||||
|
|
||||||
BEGIN_C_DECLS
|
#if defined(c_plusplus) || defined(__cplusplus)
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/**** TOOL INIT/FINALIZE FUNCTIONS ****/
|
/**** TOOL INIT/FINALIZE FUNCTIONS ****/
|
||||||
|
|
||||||
@ -104,6 +98,8 @@ pmix_status_t PMIx_tool_init(pmix_proc_t *proc,
|
|||||||
* operation. */
|
* operation. */
|
||||||
pmix_status_t PMIx_tool_finalize(void);
|
pmix_status_t PMIx_tool_finalize(void);
|
||||||
|
|
||||||
END_C_DECLS
|
#if defined(c_plusplus) || defined(__cplusplus)
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
60
opal/mca/pmix/pmix2x/pmix/man/Makefile.am
Обычный файл
60
opal/mca/pmix/pmix2x/pmix/man/Makefile.am
Обычный файл
@ -0,0 +1,60 @@
|
|||||||
|
#
|
||||||
|
# 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-2009 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) 2006-2016 Cisco Systems, Inc. All rights reserved.
|
||||||
|
# Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved.
|
||||||
|
# Copyright (c) 2013-2016 Intel, Inc. All rights reserved
|
||||||
|
# $COPYRIGHT$
|
||||||
|
#
|
||||||
|
# Additional copyrights may follow
|
||||||
|
#
|
||||||
|
# $HEADER$
|
||||||
|
#
|
||||||
|
|
||||||
|
if !PMIX_EMBEDDED_MODE
|
||||||
|
|
||||||
|
man_MANS = \
|
||||||
|
man3/pmix_init.3 \
|
||||||
|
man3/pmix_finalize.3 \
|
||||||
|
man3/pmix_initialized.3 \
|
||||||
|
man3/pmix_abort.3 \
|
||||||
|
man3/pmix_put.3 \
|
||||||
|
man3/pmix_commit.3 \
|
||||||
|
man7/pmix.7 \
|
||||||
|
man7/pmix_constants.7
|
||||||
|
|
||||||
|
EXTRA_DIST = $(man_MANS)
|
||||||
|
|
||||||
|
man3/pmix_init.3:
|
||||||
|
$(top_srcdir)/contrib/md2nroff.pl --source=pmix_init.3.md;
|
||||||
|
|
||||||
|
man3/pmix_finalize.3:
|
||||||
|
$(top_srcdir)/contrib/md2nroff.pl --source=pmix_finalize.3.md;
|
||||||
|
|
||||||
|
man3/pmix_initialized.3:
|
||||||
|
$(top_srcdir)/contrib/md2nroff.pl --source=pmix_initialized.3.md;
|
||||||
|
|
||||||
|
man3/pmix_abort.3:
|
||||||
|
$(top_srcdir)/contrib/md2nroff.pl --source=pmix_abort.3.md;
|
||||||
|
|
||||||
|
man3/pmix_put.3:
|
||||||
|
$(top_srcdir)/contrib/md2nroff.pl --source=pmix_put.3.md;
|
||||||
|
|
||||||
|
man3/pmix_commit.3:
|
||||||
|
$(top_srcdir)/contrib/md2nroff.pl --source=pmix_commit.3.md;
|
||||||
|
|
||||||
|
man7/pmix.7:
|
||||||
|
$(top_srcdir)/contrib/md2nroff.pl --source=pmix.7.md;
|
||||||
|
|
||||||
|
man7/pmix_constants.7:
|
||||||
|
$(top_srcdir)/contrib/md2nroff.pl --source=pmix_constants.7.md;
|
||||||
|
|
||||||
|
endif # !PMIX_EMBEDDED_MODE
|
186
opal/mca/pmix/pmix2x/pmix/man/README
Обычный файл
186
opal/mca/pmix/pmix2x/pmix/man/README
Обычный файл
@ -0,0 +1,186 @@
|
|||||||
|
This file describes how the developer side of man pages work in PMIx.
|
||||||
|
|
||||||
|
The Definitive Source Of Truth man pages are the Markdown man pages in
|
||||||
|
this directory (i.e., the files ending in .<digit>.md. If you want to
|
||||||
|
edit man pages, you need to edit the .<digit>.md pages. Do NOT edit
|
||||||
|
the .<digit> nroff man pages directly; these files are automatically
|
||||||
|
generated -- you will lose any manual edits the next time those files
|
||||||
|
are generated.
|
||||||
|
|
||||||
|
The Markdown web pages are rendered in two different ways:
|
||||||
|
|
||||||
|
1. Nroff man pages. These man pages are put into the `master` branch
|
||||||
|
and later included in PMIx distribution tarballs.
|
||||||
|
|
||||||
|
2. HTML. The http://open-mpi.github.io/pmix/ web site (which is
|
||||||
|
served by the Github web servers) automatically renders the content
|
||||||
|
of the `gh-pages` branch of the PMIx repo.
|
||||||
|
|
||||||
|
Markdown syntax
|
||||||
|
===============
|
||||||
|
|
||||||
|
The definitive man pages are the Markdown man pages. To edit them,
|
||||||
|
you need to understand the syntax used in these files.
|
||||||
|
|
||||||
|
The canonical reference for Markdown is here:
|
||||||
|
|
||||||
|
http://daringfireball.net/projects/markdown/syntax
|
||||||
|
|
||||||
|
Note, however, that the PMIx Markdown man pages are served via
|
||||||
|
the Github Pages web servers, which use a system called Jekyll to
|
||||||
|
render the Markdown into HTML (https://github.com/jekyll/jekyll).
|
||||||
|
As such, there are a few Jekyll annotations in the PMIx Markdown
|
||||||
|
pages (so that they can be served up properly from Github's web
|
||||||
|
servers).
|
||||||
|
|
||||||
|
If you're familiar with Markdown, you should be ok. But there are a
|
||||||
|
small number differences and quirks with which you should be familiar:
|
||||||
|
|
||||||
|
1. The first few lines of each file are a YAML header and include
|
||||||
|
directive for Jekyll. DO NOT REMOVE THIS HEADER (or the file will
|
||||||
|
not render to HTML properly when served up from Github's web
|
||||||
|
servers). Here's a sample YAML header from pmix.7.md:
|
||||||
|
|
||||||
|
---
|
||||||
|
layout: page
|
||||||
|
title: PMIx(7)
|
||||||
|
tagline: PMIx Programmer's Manual
|
||||||
|
---
|
||||||
|
{% include JB/setup %}
|
||||||
|
|
||||||
|
The whole block is needed, and it must be the first input in the
|
||||||
|
file.
|
||||||
|
|
||||||
|
2. In Github-flavored Markdown, you may be used to using "fenced
|
||||||
|
blocks" for multi-line code blocks, like this:
|
||||||
|
|
||||||
|
```c
|
||||||
|
void my_c_code(void) {
|
||||||
|
int i;
|
||||||
|
/* Hello, world */
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Such fenced blocks will not work in Jekyll. Instead, you must
|
||||||
|
delineate your code blocks with Jekyll delimiters:
|
||||||
|
|
||||||
|
{% highlight c %}
|
||||||
|
void my_c_code(void) {
|
||||||
|
int i;
|
||||||
|
/* Hello, world */
|
||||||
|
}
|
||||||
|
{% endhighlight %}
|
||||||
|
|
||||||
|
This will result in a pretty code box in the rendered HTML output,
|
||||||
|
and it will be syntax highlighted for the C language. Leave the
|
||||||
|
"c" out of the first directive if your multi-line block is not C
|
||||||
|
code, and then it won't do C syntax highlighting.
|
||||||
|
|
||||||
|
3. The PMIx man pages are full of 2-level lists of things. E.g.,
|
||||||
|
lists of functions, and then in some of the functions, there is a
|
||||||
|
sub-list of flags that can be used with that function.
|
||||||
|
|
||||||
|
The convention used in the PMIx man pages is to highlight a
|
||||||
|
word/phrase representing each list item. Then use a ":" to start
|
||||||
|
the next line that describes that item. For example:
|
||||||
|
|
||||||
|
*PMIX_FLOAT*
|
||||||
|
: A single-precision floating point value (IEEE 754).
|
||||||
|
|
||||||
|
This will make the token "PMIX_FLOAT" be highlighted in both
|
||||||
|
HTML and nroff output, and then the paragraph that comes after it
|
||||||
|
will be properly delimited and indented.
|
||||||
|
|
||||||
|
To make a sub-list inside an item, use the same format, but prefix
|
||||||
|
the sub-list items with "-", like this:
|
||||||
|
|
||||||
|
*scope*
|
||||||
|
: Flag that controls the visible scope of the data.
|
||||||
|
|
||||||
|
- *PMIX_GLOBAL*
|
||||||
|
: Indicates that the data is to be visible to all applications executed
|
||||||
|
by this user.
|
||||||
|
|
||||||
|
4. There may be a small number of places in the PMIx man pages where
|
||||||
|
there are unnumbered lists with deliberate line breaks. For
|
||||||
|
example:
|
||||||
|
|
||||||
|
foo / bar
|
||||||
|
baz / goo
|
||||||
|
: Something really intelligent
|
||||||
|
|
||||||
|
Note the first line is "foo / bar", and then there is
|
||||||
|
a deliberate line break, and then the second line is "baz / goo".
|
||||||
|
|
||||||
|
To effect the deliberate line break, you have to put two blank
|
||||||
|
spaces after "bar". To show that graphically (showing "_"
|
||||||
|
for " "):
|
||||||
|
|
||||||
|
foo / bar__
|
||||||
|
baz / goo
|
||||||
|
: Something really intelligent
|
||||||
|
|
||||||
|
5. The "SEE ALSO" items at the end of each man page are linked to
|
||||||
|
their corresponding man pages. Note that the links are made to
|
||||||
|
".html" files -- *not* ".md" files. If you care, the reason is
|
||||||
|
because the Github web servers statically generate .html files from
|
||||||
|
the .md files when you git push to the gh-pages branch. Hence, the
|
||||||
|
man pages are actually served from static .html files on the Github
|
||||||
|
web servers.
|
||||||
|
|
||||||
|
Also, since links are meaningless in nroff, they are effectively
|
||||||
|
ignored in the resulting nroff output.
|
||||||
|
|
||||||
|
Workflow
|
||||||
|
========
|
||||||
|
|
||||||
|
The workflow is like this:
|
||||||
|
|
||||||
|
1. Developer edits .<digit>.md files for new changes.
|
||||||
|
|
||||||
|
2. In a perfect world, the developer makes perfect edits and pushes
|
||||||
|
the changes up to `master`. An automated cron job will eventually
|
||||||
|
notice the new pages, and do two things:
|
||||||
|
|
||||||
|
2a. Copy the modified Markdown pages to the `gh-master` branch (so
|
||||||
|
that they go live on the web site).
|
||||||
|
|
||||||
|
2b. Re-generate any relevant nroff man pages in `master`.
|
||||||
|
|
||||||
|
The automated cron job actually does exist and does these things,
|
||||||
|
but it should only be relied upon once a developer is sure that
|
||||||
|
their changes to the Markdown man pages are correct.
|
||||||
|
|
||||||
|
3. To check that the changes will render properly, developers should
|
||||||
|
do two things:
|
||||||
|
|
||||||
|
3a. Run "make nroff". This will convert all the Markdown man pages
|
||||||
|
into nroff man pages (in the man/ directory). Check to ensure
|
||||||
|
that your changes look appropriate in the rendered nroff
|
||||||
|
output.
|
||||||
|
|
||||||
|
*CAUTION* The "pandoc" utility is used to generate the nroff
|
||||||
|
files from the Markdown source. Different versions of pandoc
|
||||||
|
will generate slightly different nroff output. Meaning: when
|
||||||
|
you run "make nroff", you might end up changing every nroff man
|
||||||
|
page, simply because your version of pandoc is different than
|
||||||
|
the last person who ran it. Please only check in your changes,
|
||||||
|
if possible.
|
||||||
|
|
||||||
|
3b. Check out the `gh-pages` branch from PMIx and copy any
|
||||||
|
modified Markdown pages into the "master/man" directory (i.e.,
|
||||||
|
the directory for man pages from the master development
|
||||||
|
branch).
|
||||||
|
|
||||||
|
Then run the "jekyll serve" command from the top-level
|
||||||
|
directory in `gh-pages`. This runs a local web server on your
|
||||||
|
computer and renders the Markdown files into HTML such that you
|
||||||
|
can point a browser to http://127.0.0.1:4000 and see the web
|
||||||
|
site.
|
||||||
|
|
||||||
|
If you make any changes to files in the tree where "jekyll" is
|
||||||
|
running, Jekyll will notice the changes and automatically
|
||||||
|
re-generate the relevant HTML. Meaning: you can just refresh
|
||||||
|
the page from http://127.0.0.1:4000 in your browser and you'll
|
||||||
|
see your changes -- there's no need to restart Jekyll to force
|
||||||
|
it to notice new changes.
|
@ -1,95 +0,0 @@
|
|||||||
.TH "pmix_fence" "3" "2016\-03\-01" "PMIx Programmer\[aq]s Manual" "\@VERSION\@"
|
|
||||||
.SH NAME
|
|
||||||
.PP
|
|
||||||
PMIx_Fence[_nb] \- Execute a blocking[non\-blocking] barrier across the
|
|
||||||
processes identified in the specified array.
|
|
||||||
.SH SYNOPSIS
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include\ <pmix.h>
|
|
||||||
|
|
||||||
pmix\\_status\\_t\ PMIx\\_Fence(const\ pmix\\_proc\\_t\ procs[],\ size_t\ nprocs,
|
|
||||||
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ const\ pmix\\_info\\_t\ info[],\ size_t\ ninfo);
|
|
||||||
|
|
||||||
pmix\\_status\\_t\ PMIx\\_Fence\\_nb(const\ pmix\\_proc\\_t\ procs[],\ size_t\ nprocs,
|
|
||||||
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ const\ pmix\\_info\\_t\ info[],\ size_t\ ninfo,
|
|
||||||
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ pmix_op_cbfunc_t\ cbfunc,\ void\ *cbdata);
|
|
||||||
\f[]
|
|
||||||
.fi
|
|
||||||
.SH ARGUMENTS
|
|
||||||
.PP
|
|
||||||
\f[I]procs\f[] : An array of pmix_proc_t structures defining the
|
|
||||||
processes that will be participating in the fence collective operation.
|
|
||||||
.PP
|
|
||||||
\f[I]nprocs\f[] : Number of pmix_proc_t structures in the \f[I]procs\f[]
|
|
||||||
array
|
|
||||||
.PP
|
|
||||||
\f[I]info\f[] : An optional array of pmix_info_t structures
|
|
||||||
.PP
|
|
||||||
\f[I]ninfo\f[] : Number of pmix_info_t structures in the pmix_info_t
|
|
||||||
array
|
|
||||||
.SH DESCRIPTION
|
|
||||||
.PP
|
|
||||||
Execute a blocking[non\-blocking] barrier across the processes
|
|
||||||
identified in the specified array.
|
|
||||||
Passing a \f[I]NULL\f[] pointer as the \f[I]procs\f[] parameter
|
|
||||||
indicates that the barrier is to span all processes in the client\[aq]s
|
|
||||||
namespace.
|
|
||||||
Each provided pmix_proc_t struct can pass PMIX_RANK_WILDCARD to indicate
|
|
||||||
that all processes in the given namespace are participating.
|
|
||||||
.PP
|
|
||||||
The info array is used to pass user requests regarding the fence
|
|
||||||
operation.
|
|
||||||
This can include:
|
|
||||||
.IP "(a)" 4
|
|
||||||
PMIX_COLLECT_DATA \- a boolean indicating whether or not the barrier
|
|
||||||
operation is to return the \f[I]put\f[] data from all participating
|
|
||||||
processes.
|
|
||||||
A value of \f[I]false\f[] indicates that the callback is just used as a
|
|
||||||
release and no data is to be returned at that time.
|
|
||||||
A value of \f[I]true\f[] indicates that all \f[I]put\f[] data is to be
|
|
||||||
collected by the barrier.
|
|
||||||
Returned data is cached at the server to reduce memory footprint, and
|
|
||||||
can be retrieved as needed by calls to PMIx_Get(nb).
|
|
||||||
.RS 4
|
|
||||||
.PP
|
|
||||||
Note that for scalability reasons, the default behavior for PMIx_Fence
|
|
||||||
is to \f[I]not\f[] collect the data.
|
|
||||||
.RE
|
|
||||||
.IP "(b)" 4
|
|
||||||
PMIX_COLLECTIVE_ALGO \- a comma\-delimited string indicating the algos
|
|
||||||
to be used for executing the barrier, in priority order.
|
|
||||||
Note that PMIx itself does not contain any internode communication
|
|
||||||
support.
|
|
||||||
Thus, execution of the \f[I]fence\f[] collective is deferred to the host
|
|
||||||
resource manager, which are free to implement whatever algorithms they
|
|
||||||
choose.
|
|
||||||
Thus, different resource managers may or may not be able to comply with
|
|
||||||
a request for a specific algorithm, or set of algorithms.
|
|
||||||
Marking this info key as \f[I]required\f[] instructs the host RM that it
|
|
||||||
should return an error if none of the specified algos are available.
|
|
||||||
Otherwise, the RM is to use one of the specified algos if possible, but
|
|
||||||
is free to use any of its available methods to execute the operation if
|
|
||||||
none of the specified algos are available.
|
|
||||||
.IP "(c)" 4
|
|
||||||
PMIX_TIMEOUT \- maximum time for the fence to execute before declaring
|
|
||||||
an error.
|
|
||||||
By default, the RM shall terminate the operation and notify participants
|
|
||||||
if one or more of the indicated procs fails during the fence.
|
|
||||||
However, the timeout parameter can help avoid "hangs" due to programming
|
|
||||||
errors that prevent one or more procs from reaching the "fence".
|
|
||||||
.SH RETURN VALUE
|
|
||||||
.PP
|
|
||||||
Returns PMIX_SUCCESS on success.
|
|
||||||
On error, a negative value corresponding to a PMIx errno is returned.
|
|
||||||
.SH ERRORS
|
|
||||||
.PP
|
|
||||||
PMIx errno values are defined in \f[C]pmix_common.h\f[].
|
|
||||||
.SH NOTES
|
|
||||||
.SH SEE ALSO
|
|
||||||
.PP
|
|
||||||
\f[C]PMIx_Put\f[](3), \f[C]PMIx_Commit\f[](3),
|
|
||||||
\f[C]PMIx_Constants\f[](7)
|
|
||||||
.SH AUTHORS
|
|
||||||
PMIx.
|
|
@ -1,87 +0,0 @@
|
|||||||
.TH "pmix_get" "3" "2016\-03\-01" "PMIx Programmer\[aq]s Manual" "\@VERSION\@"
|
|
||||||
.SH NAME
|
|
||||||
.PP
|
|
||||||
PMIx_Get[_nb] \- Retrieve data that was pushed into the PMIx key\-value
|
|
||||||
store via calls to \f[I]PMIx_Put\f[] and \f[I]PMIx_Commit\f[].
|
|
||||||
.SH SYNOPSIS
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include\ <pmix.h>
|
|
||||||
|
|
||||||
pmix\\_status\\_t\ PMIx\\_Get(const\ pmix\\_proc\\_t\ *proc,\ const\ char\ key[],
|
|
||||||
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ const\ pmix\\_info\\_t\ info[],\ size_t\ ninfo,
|
|
||||||
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ pmix\\_value\\_t\ **val);
|
|
||||||
|
|
||||||
pmix\\_status\\_t\ PMIx_Get_nb(const\ pmix\\_proc\\_t\ *proc,\ const\ char\ key[],
|
|
||||||
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ const\ pmix\\_info\\_t\ info[],\ size_t\ ninfo,
|
|
||||||
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ pmix\\_value\\_cbfunc_t\ cbfunc,\ void\ *cbdata);
|
|
||||||
\f[]
|
|
||||||
.fi
|
|
||||||
.SH ARGUMENTS
|
|
||||||
.PP
|
|
||||||
\f[I]proc\f[] : A pointer to a pmix_proc_t structure identifying the
|
|
||||||
namespace and rank of the proc whose data is being requested.
|
|
||||||
Note that a \f[I]NULL\f[] value is permitted if the specified
|
|
||||||
\f[I]key\f[] is unique within the PMIx key\-value store.
|
|
||||||
This is provided for use by the backward compatibility APIs and is
|
|
||||||
\f[I]not\f[] recommended for use by native PMIx applications.
|
|
||||||
.PP
|
|
||||||
\f[I]key\f[] : String key identifying the information.
|
|
||||||
This can be either one of the PMIx defined attributes, or a
|
|
||||||
user\-defined value
|
|
||||||
.PP
|
|
||||||
\f[I]info\f[] : An optional array of pmix_info_t structures
|
|
||||||
.PP
|
|
||||||
\f[I]ninfo\f[] : The number of pmix_info_t structures in the specified
|
|
||||||
\f[I]info\f[] array.
|
|
||||||
.PP
|
|
||||||
\f[I]val\f[] : Address where the pointer to a pmix_value_t structure
|
|
||||||
containing the data to be returned can be placed.
|
|
||||||
Note that the caller is responsible for releasing the malloc\[aq]d
|
|
||||||
storage.
|
|
||||||
The \f[I]PMIX_VALUE_FREE\f[] macro is provided for this purpose.
|
|
||||||
.SH DESCRIPTION
|
|
||||||
.PP
|
|
||||||
Retrieve information for the specified \f[I]key\f[] as published by the
|
|
||||||
process identified in the given pmix_proc_t, returning a pointer to the
|
|
||||||
value in the given address.
|
|
||||||
.PP
|
|
||||||
The blocking form of this function will block until the specified data
|
|
||||||
has been pushed into the PMIx key\-value store via a call to
|
|
||||||
\f[I]PMIx_Commit\f[] by the specified process.
|
|
||||||
The caller is responsible for freeing all memory associated with the
|
|
||||||
returned value when no longer required.
|
|
||||||
.PP
|
|
||||||
The non\-blocking form will execute the callback function once the
|
|
||||||
specified data becomes available and has been retrieved by the local
|
|
||||||
server.
|
|
||||||
Note that failure of the specified process to \f[I]put\f[] and
|
|
||||||
\f[I]commit\f[] the requested data can result in the callback function
|
|
||||||
never being executed.
|
|
||||||
.PP
|
|
||||||
The info array is used to pass user requests regarding the get
|
|
||||||
operation.
|
|
||||||
This can include:
|
|
||||||
.IP "(a)" 4
|
|
||||||
PMIX_TIMEOUT \- maximum time for the get to execute before declaring an
|
|
||||||
error.
|
|
||||||
The timeout parameter can help avoid "hangs" due to programming errors
|
|
||||||
that prevent the target proc from ever exposing its data.
|
|
||||||
.SH RETURN VALUE
|
|
||||||
.PP
|
|
||||||
Returns PMIX_SUCCESS on success.
|
|
||||||
On error, a negative value corresponding to a PMIx errno is returned.
|
|
||||||
.SH ERRORS
|
|
||||||
.PP
|
|
||||||
PMIx errno values are defined in \f[C]pmix_common.h\f[].
|
|
||||||
.SH NOTES
|
|
||||||
.PP
|
|
||||||
See \[aq]_pmix_common.h\[aq] for definition of the pmix_value_t
|
|
||||||
structure.
|
|
||||||
.SH SEE ALSO
|
|
||||||
.PP
|
|
||||||
\f[C]PMIx_Put\f[](3), \f[C]PMIx_Commit\f[](3),
|
|
||||||
\f[C]PMIx_Constants\f[](7), \f[C]PMIx_Structures\f[](7)
|
|
||||||
.SH AUTHORS
|
|
||||||
PMIx.
|
|
81
opal/mca/pmix/pmix2x/pmix/src/Makefile.am
Обычный файл
81
opal/mca/pmix/pmix2x/pmix/src/Makefile.am
Обычный файл
@ -0,0 +1,81 @@
|
|||||||
|
#
|
||||||
|
# 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-2009 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) 2006-2016 Cisco Systems, Inc. All rights reserved.
|
||||||
|
# Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved.
|
||||||
|
# Copyright (c) 2013-2016 Intel, Inc. All rights reserved
|
||||||
|
# $COPYRIGHT$
|
||||||
|
#
|
||||||
|
# Additional copyrights may follow
|
||||||
|
#
|
||||||
|
# $HEADER$
|
||||||
|
#
|
||||||
|
|
||||||
|
# Note that the -I directory must *exactly* match what was specified
|
||||||
|
# via AC_CONFIG_MACRO_DIR in configure.ac.
|
||||||
|
ACLOCAL_AMFLAGS = -I ./config
|
||||||
|
|
||||||
|
SUBDIRS = \
|
||||||
|
util/keyval \
|
||||||
|
mca/base \
|
||||||
|
$(MCA_pmix_FRAMEWORKS_SUBDIRS) \
|
||||||
|
$(MCA_pmix_FRAMEWORK_COMPONENT_STATIC_SUBDIRS) \
|
||||||
|
. \
|
||||||
|
$(MCA_pmix_FRAMEWORK_COMPONENT_DSO_SUBDIRS)
|
||||||
|
|
||||||
|
DIST_SUBDIRS = \
|
||||||
|
util/keyval \
|
||||||
|
mca/base \
|
||||||
|
$(MCA_pmix_FRAMEWORKS_SUBDIRS) \
|
||||||
|
$(MCA_pmix_FRAMEWORK_COMPONENT_ALL_SUBDIRS)
|
||||||
|
|
||||||
|
headers =
|
||||||
|
sources =
|
||||||
|
nodist_headers =
|
||||||
|
EXTRA_DIST =
|
||||||
|
dist_pmixdata_DATA =
|
||||||
|
|
||||||
|
libpmix_la_LIBADD = \
|
||||||
|
mca/base/libpmix_mca_base.la \
|
||||||
|
$(MCA_pmix_FRAMEWORK_LIBS)
|
||||||
|
libpmix_la_DEPENDENCIES = $(libpmix_la_LIBADD)
|
||||||
|
|
||||||
|
if PMIX_EMBEDDED_MODE
|
||||||
|
noinst_LTLIBRARIES = libpmix.la
|
||||||
|
libpmix_la_SOURCES = $(headers) $(sources)
|
||||||
|
libpmix_la_LDFLAGS =
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
lib_LTLIBRARIES = libpmix.la
|
||||||
|
libpmix_la_SOURCES = $(headers) $(sources)
|
||||||
|
libpmix_la_LDFLAGS = -version-info $(libpmix_so_version)
|
||||||
|
|
||||||
|
endif !PMIX_EMBEDDED_MODE
|
||||||
|
|
||||||
|
include class/Makefile.include
|
||||||
|
include event/Makefile.include
|
||||||
|
include include/Makefile.include
|
||||||
|
include mca/Makefile.include
|
||||||
|
include util/Makefile.include
|
||||||
|
include client/Makefile.include
|
||||||
|
include server/Makefile.include
|
||||||
|
include runtime/Makefile.include
|
||||||
|
include tool/Makefile.include
|
||||||
|
include common/Makefile.include
|
||||||
|
include buffer_ops/Makefile.am
|
||||||
|
include usock/Makefile.am
|
||||||
|
include sec/Makefile.am
|
||||||
|
|
||||||
|
MAINTAINERCLEANFILES = Makefile.in config.h config.h.in
|
||||||
|
DISTCLEANFILES = Makefile
|
||||||
|
CLEANFILES = core.* *~
|
||||||
|
AM_CFLAGS = -Wall
|
@ -11,7 +11,7 @@
|
|||||||
# Copyright (c) 2004-2005 The Regents of the University of California.
|
# Copyright (c) 2004-2005 The Regents of the University of California.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
# Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved.
|
# Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved.
|
||||||
# Copyright (c) 2013-2015 Intel, Inc. All rights reserved
|
# Copyright (c) 2013-2016 Intel, Inc. All rights reserved
|
||||||
# $COPYRIGHT$
|
# $COPYRIGHT$
|
||||||
#
|
#
|
||||||
# Additional copyrights may follow
|
# Additional copyrights may follow
|
||||||
@ -23,14 +23,14 @@
|
|||||||
# src/Makefile.am
|
# src/Makefile.am
|
||||||
|
|
||||||
headers += \
|
headers += \
|
||||||
src/buffer_ops/buffer_ops.h \
|
buffer_ops/buffer_ops.h \
|
||||||
src/buffer_ops/types.h \
|
buffer_ops/types.h \
|
||||||
src/buffer_ops/internal.h
|
buffer_ops/internal.h
|
||||||
|
|
||||||
sources += \
|
sources += \
|
||||||
src/buffer_ops/copy.c \
|
buffer_ops/copy.c \
|
||||||
src/buffer_ops/internal_functions.c \
|
buffer_ops/internal_functions.c \
|
||||||
src/buffer_ops/open_close.c \
|
buffer_ops/open_close.c \
|
||||||
src/buffer_ops/pack.c \
|
buffer_ops/pack.c \
|
||||||
src/buffer_ops/print.c \
|
buffer_ops/print.c \
|
||||||
src/buffer_ops/unpack.c
|
buffer_ops/unpack.c
|
||||||
|
@ -533,6 +533,7 @@ pmix_status_t pmix_value_xfer(pmix_value_t *p, pmix_value_t *src)
|
|||||||
sv = (pmix_value_t*)src->data.darray.array;
|
sv = (pmix_value_t*)src->data.darray.array;
|
||||||
for (n=0; n < src->data.darray.size; n++) {
|
for (n=0; n < src->data.darray.size; n++) {
|
||||||
if (PMIX_SUCCESS != (rc = pmix_value_xfer(&pv[n], &sv[n]))) {
|
if (PMIX_SUCCESS != (rc = pmix_value_xfer(&pv[n], &sv[n]))) {
|
||||||
|
PMIX_VALUE_FREE(pv, src->data.darray.size);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -566,6 +567,7 @@ pmix_status_t pmix_value_xfer(pmix_value_t *p, pmix_value_t *src)
|
|||||||
if (0 < sa[n].ninfo && NULL != sa[n].info) {
|
if (0 < sa[n].ninfo && NULL != sa[n].info) {
|
||||||
PMIX_INFO_CREATE(pa[n].info, sa[n].ninfo);
|
PMIX_INFO_CREATE(pa[n].info, sa[n].ninfo);
|
||||||
if (NULL == pa[n].info) {
|
if (NULL == pa[n].info) {
|
||||||
|
PMIX_APP_FREE(pa, src->data.darray.size);
|
||||||
return PMIX_ERR_NOMEM;
|
return PMIX_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
pa[n].ninfo = sa[n].ninfo;
|
pa[n].ninfo = sa[n].ninfo;
|
||||||
@ -638,6 +640,7 @@ pmix_status_t pmix_value_xfer(pmix_value_t *p, pmix_value_t *src)
|
|||||||
if (NULL != sk[n].value) {
|
if (NULL != sk[n].value) {
|
||||||
PMIX_VALUE_CREATE(pk[n].value, 1);
|
PMIX_VALUE_CREATE(pk[n].value, 1);
|
||||||
if (NULL == pk[n].value) {
|
if (NULL == pk[n].value) {
|
||||||
|
free(p->data.darray.array);
|
||||||
return PMIX_ERR_NOMEM;
|
return PMIX_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
if (PMIX_SUCCESS != (rc = pmix_value_xfer(pk[n].value, sk[n].value))) {
|
if (PMIX_SUCCESS != (rc = pmix_value_xfer(pk[n].value, sk[n].value))) {
|
||||||
@ -676,7 +679,7 @@ pmix_status_t pmix_value_xfer(pmix_value_t *p, pmix_value_t *src)
|
|||||||
memcpy(p->data.darray.array, src->data.darray.array, src->data.darray.size * sizeof(pmix_persistence_t));
|
memcpy(p->data.darray.array, src->data.darray.array, src->data.darray.size * sizeof(pmix_persistence_t));
|
||||||
break;
|
break;
|
||||||
case PMIX_POINTER:
|
case PMIX_POINTER:
|
||||||
p->data.darray.array = (void*)malloc(src->data.darray.size * sizeof(void*));
|
p->data.darray.array = (void**)malloc(src->data.darray.size * sizeof(void*));
|
||||||
if (NULL == p->data.darray.array) {
|
if (NULL == p->data.darray.array) {
|
||||||
return PMIX_ERR_NOMEM;
|
return PMIX_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
@ -750,6 +753,7 @@ pmix_status_t pmix_value_xfer(pmix_value_t *p, pmix_value_t *src)
|
|||||||
if (NULL != sq[n].qualifiers && 0 < sq[n].nqual) {
|
if (NULL != sq[n].qualifiers && 0 < sq[n].nqual) {
|
||||||
PMIX_INFO_CREATE(pq[n].qualifiers, sq[n].nqual);
|
PMIX_INFO_CREATE(pq[n].qualifiers, sq[n].nqual);
|
||||||
if (NULL == pq[n].qualifiers) {
|
if (NULL == pq[n].qualifiers) {
|
||||||
|
PMIX_QUERY_FREE(pq, src->data.darray.size);
|
||||||
return PMIX_ERR_NOMEM;
|
return PMIX_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
for (m=0; m < sq[n].nqual; m++) {
|
for (m=0; m < sq[n].nqual; m++) {
|
||||||
@ -1002,6 +1006,7 @@ pmix_status_t pmix_bfrop_copy_darray(pmix_data_array_t **dest,
|
|||||||
case PMIX_BYTE:
|
case PMIX_BYTE:
|
||||||
p->array = (char*)malloc(src->size);
|
p->array = (char*)malloc(src->size);
|
||||||
if (NULL == p->array) {
|
if (NULL == p->array) {
|
||||||
|
free(p);
|
||||||
return PMIX_ERR_NOMEM;
|
return PMIX_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
memcpy(p->array, src->array, src->size);
|
memcpy(p->array, src->array, src->size);
|
||||||
@ -1010,6 +1015,7 @@ pmix_status_t pmix_bfrop_copy_darray(pmix_data_array_t **dest,
|
|||||||
case PMIX_INT16:
|
case PMIX_INT16:
|
||||||
p->array = (char*)malloc(src->size * sizeof(uint16_t));
|
p->array = (char*)malloc(src->size * sizeof(uint16_t));
|
||||||
if (NULL == p->array) {
|
if (NULL == p->array) {
|
||||||
|
free(p);
|
||||||
return PMIX_ERR_NOMEM;
|
return PMIX_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
memcpy(p->array, src->array, src->size * sizeof(uint16_t));
|
memcpy(p->array, src->array, src->size * sizeof(uint16_t));
|
||||||
@ -1018,6 +1024,7 @@ pmix_status_t pmix_bfrop_copy_darray(pmix_data_array_t **dest,
|
|||||||
case PMIX_INT32:
|
case PMIX_INT32:
|
||||||
p->array = (char*)malloc(src->size * sizeof(uint32_t));
|
p->array = (char*)malloc(src->size * sizeof(uint32_t));
|
||||||
if (NULL == p->array) {
|
if (NULL == p->array) {
|
||||||
|
free(p);
|
||||||
return PMIX_ERR_NOMEM;
|
return PMIX_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
memcpy(p->array, src->array, src->size * sizeof(uint32_t));
|
memcpy(p->array, src->array, src->size * sizeof(uint32_t));
|
||||||
@ -1026,6 +1033,7 @@ pmix_status_t pmix_bfrop_copy_darray(pmix_data_array_t **dest,
|
|||||||
case PMIX_INT64:
|
case PMIX_INT64:
|
||||||
p->array = (char*)malloc(src->size * sizeof(uint64_t));
|
p->array = (char*)malloc(src->size * sizeof(uint64_t));
|
||||||
if (NULL == p->array) {
|
if (NULL == p->array) {
|
||||||
|
free(p);
|
||||||
return PMIX_ERR_NOMEM;
|
return PMIX_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
memcpy(p->array, src->array, src->size * sizeof(uint64_t));
|
memcpy(p->array, src->array, src->size * sizeof(uint64_t));
|
||||||
@ -1033,6 +1041,7 @@ pmix_status_t pmix_bfrop_copy_darray(pmix_data_array_t **dest,
|
|||||||
case PMIX_BOOL:
|
case PMIX_BOOL:
|
||||||
p->array = (char*)malloc(src->size * sizeof(bool));
|
p->array = (char*)malloc(src->size * sizeof(bool));
|
||||||
if (NULL == p->array) {
|
if (NULL == p->array) {
|
||||||
|
free(p);
|
||||||
return PMIX_ERR_NOMEM;
|
return PMIX_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
memcpy(p->array, src->array, src->size * sizeof(bool));
|
memcpy(p->array, src->array, src->size * sizeof(bool));
|
||||||
@ -1040,6 +1049,7 @@ pmix_status_t pmix_bfrop_copy_darray(pmix_data_array_t **dest,
|
|||||||
case PMIX_SIZE:
|
case PMIX_SIZE:
|
||||||
p->array = (char*)malloc(src->size * sizeof(size_t));
|
p->array = (char*)malloc(src->size * sizeof(size_t));
|
||||||
if (NULL == p->array) {
|
if (NULL == p->array) {
|
||||||
|
free(p);
|
||||||
return PMIX_ERR_NOMEM;
|
return PMIX_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
memcpy(p->array, src->array, src->size * sizeof(size_t));
|
memcpy(p->array, src->array, src->size * sizeof(size_t));
|
||||||
@ -1047,6 +1057,7 @@ pmix_status_t pmix_bfrop_copy_darray(pmix_data_array_t **dest,
|
|||||||
case PMIX_PID:
|
case PMIX_PID:
|
||||||
p->array = (char*)malloc(src->size * sizeof(pid_t));
|
p->array = (char*)malloc(src->size * sizeof(pid_t));
|
||||||
if (NULL == p->array) {
|
if (NULL == p->array) {
|
||||||
|
free(p);
|
||||||
return PMIX_ERR_NOMEM;
|
return PMIX_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
memcpy(p->array, src->array, src->size * sizeof(pid_t));
|
memcpy(p->array, src->array, src->size * sizeof(pid_t));
|
||||||
@ -1054,6 +1065,7 @@ pmix_status_t pmix_bfrop_copy_darray(pmix_data_array_t **dest,
|
|||||||
case PMIX_STRING:
|
case PMIX_STRING:
|
||||||
p->array = (char**)malloc(src->size * sizeof(char*));
|
p->array = (char**)malloc(src->size * sizeof(char*));
|
||||||
if (NULL == p->array) {
|
if (NULL == p->array) {
|
||||||
|
free(p);
|
||||||
return PMIX_ERR_NOMEM;
|
return PMIX_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
prarray = (char**)p->array;
|
prarray = (char**)p->array;
|
||||||
@ -1068,6 +1080,7 @@ pmix_status_t pmix_bfrop_copy_darray(pmix_data_array_t **dest,
|
|||||||
case PMIX_UINT:
|
case PMIX_UINT:
|
||||||
p->array = (char*)malloc(src->size * sizeof(int));
|
p->array = (char*)malloc(src->size * sizeof(int));
|
||||||
if (NULL == p->array) {
|
if (NULL == p->array) {
|
||||||
|
free(p);
|
||||||
return PMIX_ERR_NOMEM;
|
return PMIX_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
memcpy(p->array, src->array, src->size * sizeof(int));
|
memcpy(p->array, src->array, src->size * sizeof(int));
|
||||||
@ -1075,6 +1088,7 @@ pmix_status_t pmix_bfrop_copy_darray(pmix_data_array_t **dest,
|
|||||||
case PMIX_FLOAT:
|
case PMIX_FLOAT:
|
||||||
p->array = (char*)malloc(src->size * sizeof(float));
|
p->array = (char*)malloc(src->size * sizeof(float));
|
||||||
if (NULL == p->array) {
|
if (NULL == p->array) {
|
||||||
|
free(p);
|
||||||
return PMIX_ERR_NOMEM;
|
return PMIX_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
memcpy(p->array, src->array, src->size * sizeof(float));
|
memcpy(p->array, src->array, src->size * sizeof(float));
|
||||||
@ -1082,6 +1096,7 @@ pmix_status_t pmix_bfrop_copy_darray(pmix_data_array_t **dest,
|
|||||||
case PMIX_DOUBLE:
|
case PMIX_DOUBLE:
|
||||||
p->array = (char*)malloc(src->size * sizeof(double));
|
p->array = (char*)malloc(src->size * sizeof(double));
|
||||||
if (NULL == p->array) {
|
if (NULL == p->array) {
|
||||||
|
free(p);
|
||||||
return PMIX_ERR_NOMEM;
|
return PMIX_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
memcpy(p->array, src->array, src->size * sizeof(double));
|
memcpy(p->array, src->array, src->size * sizeof(double));
|
||||||
@ -1089,6 +1104,7 @@ pmix_status_t pmix_bfrop_copy_darray(pmix_data_array_t **dest,
|
|||||||
case PMIX_TIMEVAL:
|
case PMIX_TIMEVAL:
|
||||||
p->array = (struct timeval*)malloc(src->size * sizeof(struct timeval));
|
p->array = (struct timeval*)malloc(src->size * sizeof(struct timeval));
|
||||||
if (NULL == p->array) {
|
if (NULL == p->array) {
|
||||||
|
free(p);
|
||||||
return PMIX_ERR_NOMEM;
|
return PMIX_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
memcpy(p->array, src->array, src->size * sizeof(struct timeval));
|
memcpy(p->array, src->array, src->size * sizeof(struct timeval));
|
||||||
@ -1096,6 +1112,7 @@ pmix_status_t pmix_bfrop_copy_darray(pmix_data_array_t **dest,
|
|||||||
case PMIX_TIME:
|
case PMIX_TIME:
|
||||||
p->array = (time_t*)malloc(src->size * sizeof(time_t));
|
p->array = (time_t*)malloc(src->size * sizeof(time_t));
|
||||||
if (NULL == p->array) {
|
if (NULL == p->array) {
|
||||||
|
free(p);
|
||||||
return PMIX_ERR_NOMEM;
|
return PMIX_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
memcpy(p->array, src->array, src->size * sizeof(time_t));
|
memcpy(p->array, src->array, src->size * sizeof(time_t));
|
||||||
@ -1103,6 +1120,7 @@ pmix_status_t pmix_bfrop_copy_darray(pmix_data_array_t **dest,
|
|||||||
case PMIX_STATUS:
|
case PMIX_STATUS:
|
||||||
p->array = (pmix_status_t*)malloc(src->size * sizeof(pmix_status_t));
|
p->array = (pmix_status_t*)malloc(src->size * sizeof(pmix_status_t));
|
||||||
if (NULL == p->array) {
|
if (NULL == p->array) {
|
||||||
|
free(p);
|
||||||
return PMIX_ERR_NOMEM;
|
return PMIX_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
memcpy(p->array, src->array, src->size * sizeof(pmix_status_t));
|
memcpy(p->array, src->array, src->size * sizeof(pmix_status_t));
|
||||||
@ -1110,6 +1128,7 @@ pmix_status_t pmix_bfrop_copy_darray(pmix_data_array_t **dest,
|
|||||||
case PMIX_VALUE:
|
case PMIX_VALUE:
|
||||||
PMIX_VALUE_CREATE(p->array, src->size);
|
PMIX_VALUE_CREATE(p->array, src->size);
|
||||||
if (NULL == p->array) {
|
if (NULL == p->array) {
|
||||||
|
free(p);
|
||||||
return PMIX_ERR_NOMEM;
|
return PMIX_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
pv = (pmix_value_t*)p->array;
|
pv = (pmix_value_t*)p->array;
|
||||||
@ -1123,6 +1142,7 @@ pmix_status_t pmix_bfrop_copy_darray(pmix_data_array_t **dest,
|
|||||||
case PMIX_PROC:
|
case PMIX_PROC:
|
||||||
PMIX_PROC_CREATE(p->array, src->size);
|
PMIX_PROC_CREATE(p->array, src->size);
|
||||||
if (NULL == p->array) {
|
if (NULL == p->array) {
|
||||||
|
free(p);
|
||||||
return PMIX_ERR_NOMEM;
|
return PMIX_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
memcpy(p->array, src->array, src->size * sizeof(pmix_proc_t));
|
memcpy(p->array, src->array, src->size * sizeof(pmix_proc_t));
|
||||||
@ -1130,6 +1150,7 @@ pmix_status_t pmix_bfrop_copy_darray(pmix_data_array_t **dest,
|
|||||||
case PMIX_PROC_RANK:
|
case PMIX_PROC_RANK:
|
||||||
p->array = (char*)malloc(src->size * sizeof(pmix_rank_t));
|
p->array = (char*)malloc(src->size * sizeof(pmix_rank_t));
|
||||||
if (NULL == p->array) {
|
if (NULL == p->array) {
|
||||||
|
free(p);
|
||||||
return PMIX_ERR_NOMEM;
|
return PMIX_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
memcpy(p->array, src->array, src->size * sizeof(pmix_proc_t));
|
memcpy(p->array, src->array, src->size * sizeof(pmix_proc_t));
|
||||||
@ -1137,6 +1158,7 @@ pmix_status_t pmix_bfrop_copy_darray(pmix_data_array_t **dest,
|
|||||||
case PMIX_APP:
|
case PMIX_APP:
|
||||||
PMIX_APP_CREATE(p->array, src->size);
|
PMIX_APP_CREATE(p->array, src->size);
|
||||||
if (NULL == p->array) {
|
if (NULL == p->array) {
|
||||||
|
free(p);
|
||||||
return PMIX_ERR_NOMEM;
|
return PMIX_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
pa = (pmix_app_t*)p->array;
|
pa = (pmix_app_t*)p->array;
|
||||||
@ -1156,6 +1178,8 @@ pmix_status_t pmix_bfrop_copy_darray(pmix_data_array_t **dest,
|
|||||||
if (0 < sa[n].ninfo && NULL != sa[n].info) {
|
if (0 < sa[n].ninfo && NULL != sa[n].info) {
|
||||||
PMIX_INFO_CREATE(pa[n].info, sa[n].ninfo);
|
PMIX_INFO_CREATE(pa[n].info, sa[n].ninfo);
|
||||||
if (NULL == pa[n].info) {
|
if (NULL == pa[n].info) {
|
||||||
|
PMIX_APP_FREE(pa, p->size);
|
||||||
|
free(p);
|
||||||
return PMIX_ERR_NOMEM;
|
return PMIX_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
pa[n].ninfo = sa[n].ninfo;
|
pa[n].ninfo = sa[n].ninfo;
|
||||||
@ -1167,6 +1191,10 @@ pmix_status_t pmix_bfrop_copy_darray(pmix_data_array_t **dest,
|
|||||||
break;
|
break;
|
||||||
case PMIX_INFO:
|
case PMIX_INFO:
|
||||||
PMIX_INFO_CREATE(p->array, src->size);
|
PMIX_INFO_CREATE(p->array, src->size);
|
||||||
|
if (NULL == p->array) {
|
||||||
|
free(p);
|
||||||
|
return PMIX_ERR_NOMEM;
|
||||||
|
}
|
||||||
p1 = (pmix_info_t*)p->array;
|
p1 = (pmix_info_t*)p->array;
|
||||||
s1 = (pmix_info_t*)src->array;
|
s1 = (pmix_info_t*)src->array;
|
||||||
for (n=0; n < src->size; n++) {
|
for (n=0; n < src->size; n++) {
|
||||||
@ -1176,6 +1204,7 @@ pmix_status_t pmix_bfrop_copy_darray(pmix_data_array_t **dest,
|
|||||||
case PMIX_PDATA:
|
case PMIX_PDATA:
|
||||||
PMIX_PDATA_CREATE(p->array, src->size);
|
PMIX_PDATA_CREATE(p->array, src->size);
|
||||||
if (NULL == p->array) {
|
if (NULL == p->array) {
|
||||||
|
free(p);
|
||||||
return PMIX_ERR_NOMEM;
|
return PMIX_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
pd = (pmix_pdata_t*)p->array;
|
pd = (pmix_pdata_t*)p->array;
|
||||||
@ -1187,6 +1216,7 @@ pmix_status_t pmix_bfrop_copy_darray(pmix_data_array_t **dest,
|
|||||||
case PMIX_BUFFER:
|
case PMIX_BUFFER:
|
||||||
p->array = (pmix_buffer_t*)malloc(src->size * sizeof(pmix_buffer_t));
|
p->array = (pmix_buffer_t*)malloc(src->size * sizeof(pmix_buffer_t));
|
||||||
if (NULL == p->array) {
|
if (NULL == p->array) {
|
||||||
|
free(p);
|
||||||
return PMIX_ERR_NOMEM;
|
return PMIX_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
pb = (pmix_buffer_t*)p->array;
|
pb = (pmix_buffer_t*)p->array;
|
||||||
@ -1199,6 +1229,7 @@ pmix_status_t pmix_bfrop_copy_darray(pmix_data_array_t **dest,
|
|||||||
case PMIX_BYTE_OBJECT:
|
case PMIX_BYTE_OBJECT:
|
||||||
p->array = (pmix_byte_object_t*)malloc(src->size * sizeof(pmix_byte_object_t));
|
p->array = (pmix_byte_object_t*)malloc(src->size * sizeof(pmix_byte_object_t));
|
||||||
if (NULL == p->array) {
|
if (NULL == p->array) {
|
||||||
|
free(p);
|
||||||
return PMIX_ERR_NOMEM;
|
return PMIX_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
pbo = (pmix_byte_object_t*)p->array;
|
pbo = (pmix_byte_object_t*)p->array;
|
||||||
@ -1217,6 +1248,7 @@ pmix_status_t pmix_bfrop_copy_darray(pmix_data_array_t **dest,
|
|||||||
case PMIX_KVAL:
|
case PMIX_KVAL:
|
||||||
p->array = (pmix_kval_t*)calloc(src->size , sizeof(pmix_kval_t));
|
p->array = (pmix_kval_t*)calloc(src->size , sizeof(pmix_kval_t));
|
||||||
if (NULL == p->array) {
|
if (NULL == p->array) {
|
||||||
|
free(p);
|
||||||
return PMIX_ERR_NOMEM;
|
return PMIX_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
pk = (pmix_kval_t*)p->array;
|
pk = (pmix_kval_t*)p->array;
|
||||||
@ -1228,6 +1260,8 @@ pmix_status_t pmix_bfrop_copy_darray(pmix_data_array_t **dest,
|
|||||||
if (NULL != sk[n].value) {
|
if (NULL != sk[n].value) {
|
||||||
PMIX_VALUE_CREATE(pk[n].value, 1);
|
PMIX_VALUE_CREATE(pk[n].value, 1);
|
||||||
if (NULL == pk[n].value) {
|
if (NULL == pk[n].value) {
|
||||||
|
PMIX_VALUE_FREE(pk[n].value, 1);
|
||||||
|
free(p);
|
||||||
return PMIX_ERR_NOMEM;
|
return PMIX_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
if (PMIX_SUCCESS != (rc = pmix_value_xfer(pk[n].value, sk[n].value))) {
|
if (PMIX_SUCCESS != (rc = pmix_value_xfer(pk[n].value, sk[n].value))) {
|
||||||
@ -1239,6 +1273,7 @@ pmix_status_t pmix_bfrop_copy_darray(pmix_data_array_t **dest,
|
|||||||
case PMIX_MODEX:
|
case PMIX_MODEX:
|
||||||
PMIX_MODEX_CREATE(p->array, src->size);
|
PMIX_MODEX_CREATE(p->array, src->size);
|
||||||
if (NULL == p->array) {
|
if (NULL == p->array) {
|
||||||
|
free(p);
|
||||||
return PMIX_ERR_NOMEM;
|
return PMIX_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
pm = (pmix_modex_data_t*)p->array;
|
pm = (pmix_modex_data_t*)p->array;
|
||||||
@ -1248,6 +1283,7 @@ pmix_status_t pmix_bfrop_copy_darray(pmix_data_array_t **dest,
|
|||||||
if (NULL != sm[n].blob && 0 < sm[n].size) {
|
if (NULL != sm[n].blob && 0 < sm[n].size) {
|
||||||
pm[n].blob = (uint8_t*)malloc(sm[n].size);
|
pm[n].blob = (uint8_t*)malloc(sm[n].size);
|
||||||
if (NULL == pm[n].blob) {
|
if (NULL == pm[n].blob) {
|
||||||
|
free(p);
|
||||||
return PMIX_ERR_NOMEM;
|
return PMIX_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
memcpy(pm[n].blob, sm[n].blob, sm[n].size);
|
memcpy(pm[n].blob, sm[n].blob, sm[n].size);
|
||||||
@ -1261,13 +1297,15 @@ pmix_status_t pmix_bfrop_copy_darray(pmix_data_array_t **dest,
|
|||||||
case PMIX_PERSIST:
|
case PMIX_PERSIST:
|
||||||
p->array = (pmix_persistence_t*)malloc(src->size * sizeof(pmix_persistence_t));
|
p->array = (pmix_persistence_t*)malloc(src->size * sizeof(pmix_persistence_t));
|
||||||
if (NULL == p->array) {
|
if (NULL == p->array) {
|
||||||
|
free(p);
|
||||||
return PMIX_ERR_NOMEM;
|
return PMIX_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
memcpy(p->array, src->array, src->size * sizeof(pmix_persistence_t));
|
memcpy(p->array, src->array, src->size * sizeof(pmix_persistence_t));
|
||||||
break;
|
break;
|
||||||
case PMIX_POINTER:
|
case PMIX_POINTER:
|
||||||
p->array = (void*)malloc(src->size * sizeof(void*));
|
p->array = (void**)malloc(src->size * sizeof(void*));
|
||||||
if (NULL == p->array) {
|
if (NULL == p->array) {
|
||||||
|
free(p);
|
||||||
return PMIX_ERR_NOMEM;
|
return PMIX_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
memcpy(p->array, src->array, src->size * sizeof(void*));
|
memcpy(p->array, src->array, src->size * sizeof(void*));
|
||||||
@ -1275,6 +1313,7 @@ pmix_status_t pmix_bfrop_copy_darray(pmix_data_array_t **dest,
|
|||||||
case PMIX_SCOPE:
|
case PMIX_SCOPE:
|
||||||
p->array = (pmix_scope_t*)malloc(src->size * sizeof(pmix_scope_t));
|
p->array = (pmix_scope_t*)malloc(src->size * sizeof(pmix_scope_t));
|
||||||
if (NULL == p->array) {
|
if (NULL == p->array) {
|
||||||
|
free(p);
|
||||||
return PMIX_ERR_NOMEM;
|
return PMIX_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
memcpy(p->array, src->array, src->size * sizeof(pmix_scope_t));
|
memcpy(p->array, src->array, src->size * sizeof(pmix_scope_t));
|
||||||
@ -1282,6 +1321,7 @@ pmix_status_t pmix_bfrop_copy_darray(pmix_data_array_t **dest,
|
|||||||
case PMIX_DATA_RANGE:
|
case PMIX_DATA_RANGE:
|
||||||
p->array = (pmix_data_range_t*)malloc(src->size * sizeof(pmix_data_range_t));
|
p->array = (pmix_data_range_t*)malloc(src->size * sizeof(pmix_data_range_t));
|
||||||
if (NULL == p->array) {
|
if (NULL == p->array) {
|
||||||
|
free(p);
|
||||||
return PMIX_ERR_NOMEM;
|
return PMIX_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
memcpy(p->array, src->array, src->size * sizeof(pmix_data_range_t));
|
memcpy(p->array, src->array, src->size * sizeof(pmix_data_range_t));
|
||||||
@ -1289,6 +1329,7 @@ pmix_status_t pmix_bfrop_copy_darray(pmix_data_array_t **dest,
|
|||||||
case PMIX_COMMAND:
|
case PMIX_COMMAND:
|
||||||
p->array = (pmix_cmd_t*)malloc(src->size * sizeof(pmix_cmd_t));
|
p->array = (pmix_cmd_t*)malloc(src->size * sizeof(pmix_cmd_t));
|
||||||
if (NULL == p->array) {
|
if (NULL == p->array) {
|
||||||
|
free(p);
|
||||||
return PMIX_ERR_NOMEM;
|
return PMIX_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
memcpy(p->array, src->array, src->size * sizeof(pmix_cmd_t));
|
memcpy(p->array, src->array, src->size * sizeof(pmix_cmd_t));
|
||||||
@ -1296,6 +1337,7 @@ pmix_status_t pmix_bfrop_copy_darray(pmix_data_array_t **dest,
|
|||||||
case PMIX_INFO_DIRECTIVES:
|
case PMIX_INFO_DIRECTIVES:
|
||||||
p->array = (pmix_info_directives_t*)malloc(src->size * sizeof(pmix_info_directives_t));
|
p->array = (pmix_info_directives_t*)malloc(src->size * sizeof(pmix_info_directives_t));
|
||||||
if (NULL == p->array) {
|
if (NULL == p->array) {
|
||||||
|
free(p);
|
||||||
return PMIX_ERR_NOMEM;
|
return PMIX_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
memcpy(p->array, src->array, src->size * sizeof(pmix_info_directives_t));
|
memcpy(p->array, src->array, src->size * sizeof(pmix_info_directives_t));
|
||||||
@ -1303,6 +1345,7 @@ pmix_status_t pmix_bfrop_copy_darray(pmix_data_array_t **dest,
|
|||||||
case PMIX_PROC_INFO:
|
case PMIX_PROC_INFO:
|
||||||
PMIX_PROC_INFO_CREATE(p->array, src->size);
|
PMIX_PROC_INFO_CREATE(p->array, src->size);
|
||||||
if (NULL == p->array) {
|
if (NULL == p->array) {
|
||||||
|
free(p);
|
||||||
return PMIX_ERR_NOMEM;
|
return PMIX_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
pi = (pmix_proc_info_t*)p->array;
|
pi = (pmix_proc_info_t*)p->array;
|
||||||
@ -1325,10 +1368,12 @@ pmix_status_t pmix_bfrop_copy_darray(pmix_data_array_t **dest,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PMIX_DATA_ARRAY:
|
case PMIX_DATA_ARRAY:
|
||||||
|
free(p);
|
||||||
return PMIX_ERR_NOT_SUPPORTED; // don't support iterative arrays
|
return PMIX_ERR_NOT_SUPPORTED; // don't support iterative arrays
|
||||||
case PMIX_QUERY:
|
case PMIX_QUERY:
|
||||||
PMIX_QUERY_CREATE(p->array, src->size);
|
PMIX_QUERY_CREATE(p->array, src->size);
|
||||||
if (NULL == p->array) {
|
if (NULL == p->array) {
|
||||||
|
free(p);
|
||||||
return PMIX_ERR_NOMEM;
|
return PMIX_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
pq = (pmix_query_t*)p->array;
|
pq = (pmix_query_t*)p->array;
|
||||||
@ -1340,6 +1385,8 @@ pmix_status_t pmix_bfrop_copy_darray(pmix_data_array_t **dest,
|
|||||||
if (NULL != sq[n].qualifiers && 0 < sq[n].nqual) {
|
if (NULL != sq[n].qualifiers && 0 < sq[n].nqual) {
|
||||||
PMIX_INFO_CREATE(pq[n].qualifiers, sq[n].nqual);
|
PMIX_INFO_CREATE(pq[n].qualifiers, sq[n].nqual);
|
||||||
if (NULL == pq[n].qualifiers) {
|
if (NULL == pq[n].qualifiers) {
|
||||||
|
PMIX_INFO_FREE(pq[n].qualifiers, sq[n].nqual);
|
||||||
|
free(p);
|
||||||
return PMIX_ERR_NOMEM;
|
return PMIX_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
for (m=0; m < sq[n].nqual; m++) {
|
for (m=0; m < sq[n].nqual; m++) {
|
||||||
@ -1353,6 +1400,7 @@ pmix_status_t pmix_bfrop_copy_darray(pmix_data_array_t **dest,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
free(p);
|
||||||
return PMIX_ERR_UNKNOWN_DATA_TYPE;
|
return PMIX_ERR_UNKNOWN_DATA_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1373,6 +1421,7 @@ pmix_status_t pmix_bfrop_copy_query(pmix_query_t **dest,
|
|||||||
(*dest)->nqual = src->nqual;
|
(*dest)->nqual = src->nqual;
|
||||||
if (NULL != src->qualifiers) {
|
if (NULL != src->qualifiers) {
|
||||||
if (PMIX_SUCCESS != (rc = pmix_bfrop_copy_info(&((*dest)->qualifiers), src->qualifiers, PMIX_INFO))) {
|
if (PMIX_SUCCESS != (rc = pmix_bfrop_copy_info(&((*dest)->qualifiers), src->qualifiers, PMIX_INFO))) {
|
||||||
|
free(*dest);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
*/
|
*/
|
||||||
#include <src/include/pmix_config.h>
|
#include <src/include/pmix_config.h>
|
||||||
|
|
||||||
#include <pmix/pmix_common.h>
|
#include <pmix_common.h>
|
||||||
|
|
||||||
#ifdef HAVE_STRING_H
|
#ifdef HAVE_STRING_H
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include <src/include/pmix_config.h>
|
#include <src/include/pmix_config.h>
|
||||||
|
|
||||||
#include <pmix/autogen/pmix_stdint.h>
|
#include <src/include/pmix_stdint.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#ifdef HAVE_TIME_H
|
#ifdef HAVE_TIME_H
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
#include "src/class/pmix_object.h"
|
#include "src/class/pmix_object.h"
|
||||||
#include "src/class/pmix_pointer_array.h"
|
#include "src/class/pmix_pointer_array.h"
|
||||||
#include "src/class/pmix_list.h"
|
#include "src/class/pmix_list.h"
|
||||||
#include <pmix/pmix_common.h>
|
#include <pmix_common.h>
|
||||||
|
|
||||||
BEGIN_C_DECLS
|
BEGIN_C_DECLS
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
# Copyright (c) 2004-2005 The Regents of the University of California.
|
# Copyright (c) 2004-2005 The Regents of the University of California.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
# Copyright (c) 2013-2016 Intel, Inc. All rights reserved
|
# Copyright (c) 2013-2016 Intel, Inc. All rights reserved
|
||||||
|
# Copyright (c) 2016 Cisco Systems, Inc. All rights reserved.
|
||||||
# $COPYRIGHT$
|
# $COPYRIGHT$
|
||||||
#
|
#
|
||||||
# Additional copyrights may follow
|
# Additional copyrights may follow
|
||||||
@ -19,21 +20,23 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
# This makefile.am does not stand on its own - it is included from
|
# This makefile.am does not stand on its own - it is included from
|
||||||
# src/Makefile.am
|
# Makefile.am
|
||||||
|
|
||||||
# Source code files
|
# Source code files
|
||||||
headers += \
|
headers += \
|
||||||
src/class/pmix_object.h \
|
class/pmix_object.h \
|
||||||
src/class/pmix_list.h \
|
class/pmix_list.h \
|
||||||
src/class/pmix_pointer_array.h \
|
class/pmix_pointer_array.h \
|
||||||
src/class/pmix_hash_table.h \
|
class/pmix_hash_table.h \
|
||||||
src/class/pmix_hotel.h \
|
class/pmix_hotel.h \
|
||||||
src/class/pmix_ring_buffer.h
|
class/pmix_ring_buffer.h \
|
||||||
|
class/pmix_value_array.h
|
||||||
|
|
||||||
sources += \
|
sources += \
|
||||||
src/class/pmix_object.c \
|
class/pmix_object.c \
|
||||||
src/class/pmix_list.c \
|
class/pmix_list.c \
|
||||||
src/class/pmix_pointer_array.c \
|
class/pmix_pointer_array.c \
|
||||||
src/class/pmix_hash_table.c \
|
class/pmix_hash_table.c \
|
||||||
src/class/pmix_hotel.c \
|
class/pmix_hotel.c \
|
||||||
src/class/pmix_ring_buffer.c
|
class/pmix_ring_buffer.c \
|
||||||
|
class/pmix_value_array.c
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
@ -9,12 +9,12 @@
|
|||||||
* University of Stuttgart. All rights reserved.
|
* University of Stuttgart. All rights reserved.
|
||||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
* Copyright (c) 2015 Intel, Inc. All rights reserved.
|
* Copyright (c) 2015-2016 Intel, Inc. All rights reserved.
|
||||||
* Copyright (c) 2015 Research Organization for Information Science
|
* Copyright (c) 2015 Research Organization for Information Science
|
||||||
* and Technology (RIST). All rights reserved.
|
* and Technology (RIST). All rights reserved.
|
||||||
* Copyright (c) 2016 Mellanox Technologies, Inc.
|
* Copyright (c) 2016 Mellanox Technologies, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
* Copyright (c) 2016 IBM Corporation. All rights reserved.
|
*
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
@ -43,20 +43,22 @@
|
|||||||
|
|
||||||
#include "src/class/pmix_list.h"
|
#include "src/class/pmix_list.h"
|
||||||
|
|
||||||
#include <pmix/pmix_common.h>
|
#include <pmix_common.h>
|
||||||
|
|
||||||
BEGIN_C_DECLS
|
BEGIN_C_DECLS
|
||||||
|
|
||||||
PMIX_DECLSPEC PMIX_CLASS_DECLARATION(pmix_hash_table_t);
|
PMIX_CLASS_DECLARATION(pmix_hash_table_t);
|
||||||
|
|
||||||
struct pmix_hash_table_t
|
struct pmix_hash_table_t
|
||||||
{
|
{
|
||||||
pmix_object_t super; /**< subclass of pmix_object_t */
|
pmix_object_t super; /**< subclass of pmix_object_t */
|
||||||
pmix_list_t ht_nodes; /**< free list of hash nodes */
|
struct pmix_hash_element_t * ht_table; /**< table of elements (opaque to users) */
|
||||||
pmix_list_t *ht_table; /**< each item is an array of pmix_fhnode_t nodes */
|
size_t ht_capacity; /**< allocated size (capacity) of table */
|
||||||
size_t ht_table_size; /**< size of table */
|
size_t ht_size; /**< number of extant entries */
|
||||||
size_t ht_size; /**< number of values on table */
|
size_t ht_growth_trigger; /**< size hits this and table is grown */
|
||||||
size_t ht_mask;
|
int ht_density_numer, ht_density_denom; /**< max allowed density of table */
|
||||||
|
int ht_growth_numer, ht_growth_denom; /**< growth factor when grown */
|
||||||
|
const struct pmix_hash_type_methods_t * ht_type_methods;
|
||||||
};
|
};
|
||||||
typedef struct pmix_hash_table_t pmix_hash_table_t;
|
typedef struct pmix_hash_table_t pmix_hash_table_t;
|
||||||
|
|
||||||
@ -73,12 +75,10 @@ typedef struct pmix_hash_table_t pmix_hash_table_t;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PMIX_DECLSPEC pmix_status_t pmix_hash_table_init(pmix_hash_table_t* ht, size_t table_size);
|
int pmix_hash_table_init(pmix_hash_table_t* ht, size_t table_size);
|
||||||
|
|
||||||
/**
|
/* this could be the new init if people wanted a more general API */
|
||||||
* Alternative form
|
int pmix_hash_table_init2(pmix_hash_table_t* ht, size_t estimated_max_size,
|
||||||
*/
|
|
||||||
PMIX_DECLSPEC pmix_status_t pmix_hash_table_init2(pmix_hash_table_t* ht, size_t estimated_max_size,
|
|
||||||
int density_numer, int density_denom,
|
int density_numer, int density_denom,
|
||||||
int growth_numer, int growth_denom);
|
int growth_numer, int growth_denom);
|
||||||
|
|
||||||
@ -103,7 +103,7 @@ static inline size_t pmix_hash_table_get_size(pmix_hash_table_t *ht)
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PMIX_DECLSPEC pmix_status_t pmix_hash_table_remove_all(pmix_hash_table_t *ht);
|
int pmix_hash_table_remove_all(pmix_hash_table_t *ht);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve value via uint32_t key.
|
* Retrieve value via uint32_t key.
|
||||||
@ -118,7 +118,7 @@ PMIX_DECLSPEC pmix_status_t pmix_hash_table_remove_all(pmix_hash_table_t *ht);
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PMIX_DECLSPEC pmix_status_t pmix_hash_table_get_value_uint32(pmix_hash_table_t* table, uint32_t key,
|
int pmix_hash_table_get_value_uint32(pmix_hash_table_t* table, uint32_t key,
|
||||||
void** ptr);
|
void** ptr);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -131,7 +131,7 @@ PMIX_DECLSPEC pmix_status_t pmix_hash_table_get_value_uint32(pmix_hash_table_t*
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PMIX_DECLSPEC pmix_status_t pmix_hash_table_set_value_uint32(pmix_hash_table_t* table, uint32_t key, void* value);
|
int pmix_hash_table_set_value_uint32(pmix_hash_table_t* table, uint32_t key, void* value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove value based on uint32_t key.
|
* Remove value based on uint32_t key.
|
||||||
@ -142,7 +142,7 @@ PMIX_DECLSPEC pmix_status_t pmix_hash_table_set_value_uint32(pmix_hash_table_t*
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PMIX_DECLSPEC pmix_status_t pmix_hash_table_remove_value_uint32(pmix_hash_table_t* table, uint32_t key);
|
int pmix_hash_table_remove_value_uint32(pmix_hash_table_t* table, uint32_t key);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve value via uint64_t key.
|
* Retrieve value via uint64_t key.
|
||||||
@ -157,7 +157,7 @@ PMIX_DECLSPEC pmix_status_t pmix_hash_table_remove_value_uint32(pmix_hash_table_
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PMIX_DECLSPEC pmix_status_t pmix_hash_table_get_value_uint64(pmix_hash_table_t *table, uint64_t key,
|
int pmix_hash_table_get_value_uint64(pmix_hash_table_t *table, uint64_t key,
|
||||||
void **ptr);
|
void **ptr);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -170,7 +170,7 @@ PMIX_DECLSPEC pmix_status_t pmix_hash_table_get_value_uint64(pmix_hash_table_t *
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PMIX_DECLSPEC pmix_status_t pmix_hash_table_set_value_uint64(pmix_hash_table_t *table, uint64_t key, void* value);
|
int pmix_hash_table_set_value_uint64(pmix_hash_table_t *table, uint64_t key, void* value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove value based on uint64_t key.
|
* Remove value based on uint64_t key.
|
||||||
@ -181,7 +181,7 @@ PMIX_DECLSPEC pmix_status_t pmix_hash_table_set_value_uint64(pmix_hash_table_t *
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PMIX_DECLSPEC pmix_status_t pmix_hash_table_remove_value_uint64(pmix_hash_table_t *table, uint64_t key);
|
int pmix_hash_table_remove_value_uint64(pmix_hash_table_t *table, uint64_t key);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve value via arbitrary length binary key.
|
* Retrieve value via arbitrary length binary key.
|
||||||
@ -196,7 +196,7 @@ PMIX_DECLSPEC pmix_status_t pmix_hash_table_remove_value_uint64(pmix_hash_table_
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PMIX_DECLSPEC pmix_status_t pmix_hash_table_get_value_ptr(pmix_hash_table_t *table, const void* key,
|
int pmix_hash_table_get_value_ptr(pmix_hash_table_t *table, const void* key,
|
||||||
size_t keylen, void **ptr);
|
size_t keylen, void **ptr);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -209,7 +209,7 @@ PMIX_DECLSPEC pmix_status_t pmix_hash_table_get_value_ptr(pmix_hash_table_t *tab
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PMIX_DECLSPEC pmix_status_t pmix_hash_table_set_value_ptr(pmix_hash_table_t *table, const void* key, size_t keylen, void* value);
|
int pmix_hash_table_set_value_ptr(pmix_hash_table_t *table, const void* key, size_t keylen, void* value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove value based on arbitrary length binary key.
|
* Remove value based on arbitrary length binary key.
|
||||||
@ -220,7 +220,7 @@ PMIX_DECLSPEC pmix_status_t pmix_hash_table_set_value_ptr(pmix_hash_table_t *tab
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PMIX_DECLSPEC pmix_status_t pmix_hash_table_remove_value_ptr(pmix_hash_table_t *table, const void* key, size_t keylen);
|
int pmix_hash_table_remove_value_ptr(pmix_hash_table_t *table, const void* key, size_t keylen);
|
||||||
|
|
||||||
|
|
||||||
/** The following functions are only for allowing iterating through
|
/** The following functions are only for allowing iterating through
|
||||||
@ -245,7 +245,7 @@ PMIX_DECLSPEC pmix_status_t pmix_hash_table_remove_value_ptr(pmix_hash_table_t *
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PMIX_DECLSPEC pmix_status_t pmix_hash_table_get_first_key_uint32(pmix_hash_table_t *table, uint32_t *key,
|
int pmix_hash_table_get_first_key_uint32(pmix_hash_table_t *table, uint32_t *key,
|
||||||
void **value, void **node);
|
void **value, void **node);
|
||||||
|
|
||||||
|
|
||||||
@ -263,7 +263,7 @@ PMIX_DECLSPEC pmix_status_t pmix_hash_table_get_first_key_uint32(pmix_hash_table
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PMIX_DECLSPEC pmix_status_t pmix_hash_table_get_next_key_uint32(pmix_hash_table_t *table, uint32_t *key,
|
int pmix_hash_table_get_next_key_uint32(pmix_hash_table_t *table, uint32_t *key,
|
||||||
void **value, void *in_node,
|
void **value, void *in_node,
|
||||||
void **out_node);
|
void **out_node);
|
||||||
|
|
||||||
@ -281,7 +281,7 @@ PMIX_DECLSPEC pmix_status_t pmix_hash_table_get_next_key_uint32(pmix_hash_table_
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PMIX_DECLSPEC pmix_status_t pmix_hash_table_get_first_key_uint64(pmix_hash_table_t *table, uint64_t *key,
|
int pmix_hash_table_get_first_key_uint64(pmix_hash_table_t *table, uint64_t *key,
|
||||||
void **value, void **node);
|
void **value, void **node);
|
||||||
|
|
||||||
|
|
||||||
@ -299,10 +299,49 @@ PMIX_DECLSPEC pmix_status_t pmix_hash_table_get_first_key_uint64(pmix_hash_table
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PMIX_DECLSPEC pmix_status_t pmix_hash_table_get_next_key_uint64(pmix_hash_table_t *table, uint64_t *key,
|
int pmix_hash_table_get_next_key_uint64(pmix_hash_table_t *table, uint64_t *key,
|
||||||
void **value, void *in_node,
|
void **value, void *in_node,
|
||||||
void **out_node);
|
void **out_node);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the first ptr bit key from the hash table, which can be used later to
|
||||||
|
* get the next key
|
||||||
|
* @param table The hash table pointer (IN)
|
||||||
|
* @param key The first key (OUT)
|
||||||
|
* @param key_size The first key size (OUT)
|
||||||
|
* @param value The value corresponding to this key (OUT)
|
||||||
|
* @param node The pointer to the hash table internal node which stores
|
||||||
|
* the key-value pair (this is required for subsequent calls
|
||||||
|
* to get_next_key) (OUT)
|
||||||
|
* @return PMIX error code
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
int pmix_hash_table_get_first_key_ptr(pmix_hash_table_t *table, void* *key,
|
||||||
|
size_t *key_size, void **value, void **node);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the next ptr bit key from the hash table, knowing the current key
|
||||||
|
* @param table The hash table pointer (IN)
|
||||||
|
* @param key The key (OUT)
|
||||||
|
* @param key_size The key size (OUT)
|
||||||
|
* @param value The value corresponding to this key (OUT)
|
||||||
|
* @param in_node The node pointer from previous call to either get_first
|
||||||
|
or get_next (IN)
|
||||||
|
* @param out_node The pointer to the hash table internal node which stores
|
||||||
|
* the key-value pair (this is required for subsequent calls
|
||||||
|
* to get_next_key) (OUT)
|
||||||
|
* @return PMIX error code
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
int pmix_hash_table_get_next_key_ptr(pmix_hash_table_t *table, void* *key,
|
||||||
|
size_t *key_size, void **value,
|
||||||
|
void *in_node, void **out_node);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns next power-of-two of the given value.
|
* @brief Returns next power-of-two of the given value.
|
||||||
*
|
*
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
#include <src/include/pmix_config.h>
|
#include <src/include/pmix_config.h>
|
||||||
#include "src/include/types.h"
|
#include "src/include/types.h"
|
||||||
#include "src/include/prefetch.h"
|
#include "src/include/prefetch.h"
|
||||||
#include "pmix/pmix_common.h"
|
#include "pmix_common.h"
|
||||||
#include "src/class/pmix_object.h"
|
#include "src/class/pmix_object.h"
|
||||||
#include PMIX_EVENT_HEADER
|
#include PMIX_EVENT_HEADER
|
||||||
|
|
||||||
@ -157,7 +157,7 @@ PMIX_CLASS_DECLARATION(pmix_hotel_t);
|
|||||||
* @return PMIX_SUCCESS if all initializations were succesful. Otherwise,
|
* @return PMIX_SUCCESS if all initializations were succesful. Otherwise,
|
||||||
* the error indicate what went wrong in the function.
|
* the error indicate what went wrong in the function.
|
||||||
*/
|
*/
|
||||||
PMIX_DECLSPEC int pmix_hotel_init(pmix_hotel_t *hotel, int num_rooms,
|
int pmix_hotel_init(pmix_hotel_t *hotel, int num_rooms,
|
||||||
pmix_event_base_t *evbase,
|
pmix_event_base_t *evbase,
|
||||||
uint32_t eviction_timeout,
|
uint32_t eviction_timeout,
|
||||||
int eviction_event_priority,
|
int eviction_event_priority,
|
||||||
|
@ -20,9 +20,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <src/include/pmix_config.h>
|
#include <src/include/pmix_config.h>
|
||||||
|
#include "include/pmix_common.h"
|
||||||
#include "src/class/pmix_list.h"
|
#include "src/class/pmix_list.h"
|
||||||
#include <pmix.h>
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* List classes
|
* List classes
|
||||||
|
@ -83,13 +83,13 @@ BEGIN_C_DECLS
|
|||||||
*
|
*
|
||||||
* The class for the list container.
|
* The class for the list container.
|
||||||
*/
|
*/
|
||||||
PMIX_DECLSPEC PMIX_CLASS_DECLARATION(pmix_list_t);
|
PMIX_CLASS_DECLARATION(pmix_list_t);
|
||||||
/**
|
/**
|
||||||
* \internal
|
* \internal
|
||||||
*
|
*
|
||||||
* Base class for items that are put in list (pmix_list_t) containers.
|
* Base class for items that are put in list (pmix_list_t) containers.
|
||||||
*/
|
*/
|
||||||
PMIX_DECLSPEC PMIX_CLASS_DECLARATION(pmix_list_item_t);
|
PMIX_CLASS_DECLARATION(pmix_list_item_t);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -807,7 +807,7 @@ static inline void pmix_list_insert_pos(pmix_list_t *list, pmix_list_item_t *pos
|
|||||||
* If index is greater than the length of the list, no action is
|
* If index is greater than the length of the list, no action is
|
||||||
* performed and false is returned.
|
* performed and false is returned.
|
||||||
*/
|
*/
|
||||||
PMIX_DECLSPEC bool pmix_list_insert(pmix_list_t *list, pmix_list_item_t *item,
|
bool pmix_list_insert(pmix_list_t *list, pmix_list_item_t *item,
|
||||||
long long idx);
|
long long idx);
|
||||||
|
|
||||||
|
|
||||||
@ -828,7 +828,7 @@ static inline void pmix_list_insert_pos(pmix_list_t *list, pmix_list_item_t *pos
|
|||||||
* containers remain valid, including those that point to elements
|
* containers remain valid, including those that point to elements
|
||||||
* in \c xlist.
|
* in \c xlist.
|
||||||
*/
|
*/
|
||||||
PMIX_DECLSPEC void pmix_list_join(pmix_list_t *thislist, pmix_list_item_t *pos,
|
void pmix_list_join(pmix_list_t *thislist, pmix_list_item_t *pos,
|
||||||
pmix_list_t *xlist);
|
pmix_list_t *xlist);
|
||||||
|
|
||||||
|
|
||||||
@ -855,7 +855,7 @@ static inline void pmix_list_insert_pos(pmix_list_t *list, pmix_list_item_t *pos
|
|||||||
* This is an O(N) operation because the length of both lists must
|
* This is an O(N) operation because the length of both lists must
|
||||||
* be recomputed.
|
* be recomputed.
|
||||||
*/
|
*/
|
||||||
PMIX_DECLSPEC void pmix_list_splice(pmix_list_t *thislist, pmix_list_item_t *pos,
|
void pmix_list_splice(pmix_list_t *thislist, pmix_list_item_t *pos,
|
||||||
pmix_list_t *xlist, pmix_list_item_t *first,
|
pmix_list_t *xlist, pmix_list_item_t *first,
|
||||||
pmix_list_item_t *last);
|
pmix_list_item_t *last);
|
||||||
|
|
||||||
@ -902,7 +902,7 @@ static inline void pmix_list_insert_pos(pmix_list_t *list, pmix_list_item_t *pos
|
|||||||
* whatever the underlying type is). See the documentation of
|
* whatever the underlying type is). See the documentation of
|
||||||
* pmix_list_item_compare_fn_t for an example).
|
* pmix_list_item_compare_fn_t for an example).
|
||||||
*/
|
*/
|
||||||
PMIX_DECLSPEC int pmix_list_sort(pmix_list_t* list, pmix_list_item_compare_fn_t compare);
|
int pmix_list_sort(pmix_list_t* list, pmix_list_item_compare_fn_t compare);
|
||||||
|
|
||||||
END_C_DECLS
|
END_C_DECLS
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ BEGIN_C_DECLS
|
|||||||
|
|
||||||
#if PMIX_ENABLE_DEBUG
|
#if PMIX_ENABLE_DEBUG
|
||||||
/* Any kind of unique ID should do the job */
|
/* Any kind of unique ID should do the job */
|
||||||
#define PMIX_PMIX_MAGIC_ID ((0xdeafbeedULL << 32) + 0xdeafbeedULL)
|
#define PMIX_OBJ_MAGIC_ID ((0xdeafbeedULL << 32) + 0xdeafbeedULL)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* typedefs ***********************************************************/
|
/* typedefs ***********************************************************/
|
||||||
@ -169,9 +169,9 @@ struct pmix_class_t {
|
|||||||
* @param NAME Name of the class to initialize
|
* @param NAME Name of the class to initialize
|
||||||
*/
|
*/
|
||||||
#if PMIX_ENABLE_DEBUG
|
#if PMIX_ENABLE_DEBUG
|
||||||
#define PMIX_PMIX_STATIC_INIT(BASE_CLASS) { PMIX_PMIX_MAGIC_ID, PMIX_CLASS(BASE_CLASS), 1, __FILE__, __LINE__ }
|
#define PMIX_OBJ_STATIC_INIT(BASE_CLASS) { PMIX_OBJ_MAGIC_ID, PMIX_CLASS(BASE_CLASS), 1, __FILE__, __LINE__ }
|
||||||
#else
|
#else
|
||||||
#define PMIX_PMIX_STATIC_INIT(BASE_CLASS) { PMIX_CLASS(BASE_CLASS), 1 }
|
#define PMIX_OBJ_STATIC_INIT(BASE_CLASS) { PMIX_CLASS(BASE_CLASS), 1 }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -249,7 +249,7 @@ static inline pmix_object_t *pmix_obj_new(pmix_class_t * cls);
|
|||||||
static inline pmix_object_t *pmix_obj_new_debug(pmix_class_t* type, const char* file, int line)
|
static inline pmix_object_t *pmix_obj_new_debug(pmix_class_t* type, const char* file, int line)
|
||||||
{
|
{
|
||||||
pmix_object_t* object = pmix_obj_new(type);
|
pmix_object_t* object = pmix_obj_new(type);
|
||||||
object->obj_magic_id = PMIX_PMIX_MAGIC_ID;
|
object->obj_magic_id = PMIX_OBJ_MAGIC_ID;
|
||||||
object->cls_init_file_name = file;
|
object->cls_init_file_name = file;
|
||||||
object->cls_init_lineno = line;
|
object->cls_init_lineno = line;
|
||||||
return object;
|
return object;
|
||||||
@ -270,7 +270,7 @@ static inline pmix_object_t *pmix_obj_new_debug(pmix_class_t* type, const char*
|
|||||||
#define PMIX_RETAIN(object) \
|
#define PMIX_RETAIN(object) \
|
||||||
do { \
|
do { \
|
||||||
assert(NULL != ((pmix_object_t *) (object))->obj_class); \
|
assert(NULL != ((pmix_object_t *) (object))->obj_class); \
|
||||||
assert(PMIX_PMIX_MAGIC_ID == ((pmix_object_t *) (object))->obj_magic_id); \
|
assert(PMIX_OBJ_MAGIC_ID == ((pmix_object_t *) (object))->obj_magic_id); \
|
||||||
pmix_obj_update((pmix_object_t *) (object), 1); \
|
pmix_obj_update((pmix_object_t *) (object), 1); \
|
||||||
assert(((pmix_object_t *) (object))->obj_reference_count >= 0); \
|
assert(((pmix_object_t *) (object))->obj_reference_count >= 0); \
|
||||||
} while (0)
|
} while (0)
|
||||||
@ -311,7 +311,7 @@ static inline pmix_object_t *pmix_obj_new_debug(pmix_class_t* type, const char*
|
|||||||
#define PMIX_RELEASE(object) \
|
#define PMIX_RELEASE(object) \
|
||||||
do { \
|
do { \
|
||||||
assert(NULL != ((pmix_object_t *) (object))->obj_class); \
|
assert(NULL != ((pmix_object_t *) (object))->obj_class); \
|
||||||
assert(PMIX_PMIX_MAGIC_ID == ((pmix_object_t *) (object))->obj_magic_id); \
|
assert(PMIX_OBJ_MAGIC_ID == ((pmix_object_t *) (object))->obj_magic_id); \
|
||||||
if (0 == pmix_obj_update((pmix_object_t *) (object), -1)) { \
|
if (0 == pmix_obj_update((pmix_object_t *) (object), -1)) { \
|
||||||
PMIX_SET_MAGIC_ID((object), 0); \
|
PMIX_SET_MAGIC_ID((object), 0); \
|
||||||
pmix_obj_run_destructors((pmix_object_t *) (object)); \
|
pmix_obj_run_destructors((pmix_object_t *) (object)); \
|
||||||
@ -346,7 +346,7 @@ do { \
|
|||||||
|
|
||||||
#define PMIX_CONSTRUCT_INTERNAL(object, type) \
|
#define PMIX_CONSTRUCT_INTERNAL(object, type) \
|
||||||
do { \
|
do { \
|
||||||
PMIX_SET_MAGIC_ID((object), PMIX_PMIX_MAGIC_ID); \
|
PMIX_SET_MAGIC_ID((object), PMIX_OBJ_MAGIC_ID); \
|
||||||
if (0 == (type)->cls_initialized) { \
|
if (0 == (type)->cls_initialized) { \
|
||||||
pmix_class_initialize((type)); \
|
pmix_class_initialize((type)); \
|
||||||
} \
|
} \
|
||||||
@ -365,7 +365,7 @@ do { \
|
|||||||
#if PMIX_ENABLE_DEBUG
|
#if PMIX_ENABLE_DEBUG
|
||||||
#define PMIX_DESTRUCT(object) \
|
#define PMIX_DESTRUCT(object) \
|
||||||
do { \
|
do { \
|
||||||
assert(PMIX_PMIX_MAGIC_ID == ((pmix_object_t *) (object))->obj_magic_id); \
|
assert(PMIX_OBJ_MAGIC_ID == ((pmix_object_t *) (object))->obj_magic_id); \
|
||||||
PMIX_SET_MAGIC_ID((object), 0); \
|
PMIX_SET_MAGIC_ID((object), 0); \
|
||||||
pmix_obj_run_destructors((pmix_object_t *) (object)); \
|
pmix_obj_run_destructors((pmix_object_t *) (object)); \
|
||||||
PMIX_REMEMBER_FILE_AND_LINENO( object, __FILE__, __LINE__ ); \
|
PMIX_REMEMBER_FILE_AND_LINENO( object, __FILE__, __LINE__ ); \
|
||||||
@ -378,7 +378,7 @@ do { \
|
|||||||
} while (0)
|
} while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
PMIX_DECLSPEC PMIX_CLASS_DECLARATION(pmix_object_t);
|
PMIX_CLASS_DECLARATION(pmix_object_t);
|
||||||
|
|
||||||
/* declarations *******************************************************/
|
/* declarations *******************************************************/
|
||||||
|
|
||||||
@ -390,7 +390,7 @@ PMIX_DECLSPEC PMIX_CLASS_DECLARATION(pmix_object_t);
|
|||||||
*
|
*
|
||||||
* @param class Pointer to class descriptor
|
* @param class Pointer to class descriptor
|
||||||
*/
|
*/
|
||||||
PMIX_DECLSPEC void pmix_class_initialize(pmix_class_t *);
|
void pmix_class_initialize(pmix_class_t *);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shut down the class system and release all memory
|
* Shut down the class system and release all memory
|
||||||
@ -401,7 +401,7 @@ PMIX_DECLSPEC void pmix_class_initialize(pmix_class_t *);
|
|||||||
* tools like valgrind and purify don't report still-reachable memory
|
* tools like valgrind and purify don't report still-reachable memory
|
||||||
* upon process termination.
|
* upon process termination.
|
||||||
*/
|
*/
|
||||||
PMIX_DECLSPEC int pmix_class_finalize(void);
|
int pmix_class_finalize(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run the hierarchy of class constructors for this object, in a
|
* Run the hierarchy of class constructors for this object, in a
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
#include "src/class/pmix_pointer_array.h"
|
#include "src/class/pmix_pointer_array.h"
|
||||||
#include "src/util/output.h"
|
#include "src/util/output.h"
|
||||||
#include <pmix.h>
|
#include "include/pmix_common.h"
|
||||||
|
|
||||||
enum { TABLE_INIT = 1, TABLE_GROW = 2 };
|
enum { TABLE_INIT = 1, TABLE_GROW = 2 };
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "src/class/pmix_object.h"
|
#include "src/class/pmix_object.h"
|
||||||
#include <pmix/pmix_common.h>
|
#include <pmix_common.h>
|
||||||
|
|
||||||
BEGIN_C_DECLS
|
BEGIN_C_DECLS
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ typedef struct pmix_pointer_array_t pmix_pointer_array_t;
|
|||||||
/**
|
/**
|
||||||
* Class declaration
|
* Class declaration
|
||||||
*/
|
*/
|
||||||
PMIX_DECLSPEC PMIX_CLASS_DECLARATION(pmix_pointer_array_t);
|
PMIX_CLASS_DECLARATION(pmix_pointer_array_t);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize the pointer array with an initial size of initial_allocation.
|
* Initialize the pointer array with an initial size of initial_allocation.
|
||||||
@ -79,7 +79,7 @@ PMIX_DECLSPEC PMIX_CLASS_DECLARATION(pmix_pointer_array_t);
|
|||||||
* @return PMIX_SUCCESS if all initializations were succesfull. Otherwise,
|
* @return PMIX_SUCCESS if all initializations were succesfull. Otherwise,
|
||||||
* the error indicate what went wrong in the function.
|
* the error indicate what went wrong in the function.
|
||||||
*/
|
*/
|
||||||
PMIX_DECLSPEC pmix_status_t pmix_pointer_array_init(pmix_pointer_array_t* array,
|
pmix_status_t pmix_pointer_array_init(pmix_pointer_array_t* array,
|
||||||
int initial_allocation,
|
int initial_allocation,
|
||||||
int max_size, int block_size );
|
int max_size, int block_size );
|
||||||
|
|
||||||
@ -92,7 +92,7 @@ PMIX_DECLSPEC pmix_status_t pmix_pointer_array_init(pmix_pointer_array_t* array,
|
|||||||
* @return Index of inserted array element. Return value of
|
* @return Index of inserted array element. Return value of
|
||||||
* (-1) indicates an error.
|
* (-1) indicates an error.
|
||||||
*/
|
*/
|
||||||
PMIX_DECLSPEC int pmix_pointer_array_add(pmix_pointer_array_t *array, void *ptr);
|
int pmix_pointer_array_add(pmix_pointer_array_t *array, void *ptr);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the value of an element in array
|
* Set the value of an element in array
|
||||||
@ -104,7 +104,7 @@ PMIX_DECLSPEC int pmix_pointer_array_add(pmix_pointer_array_t *array, void *ptr)
|
|||||||
* @return PMIX_SUCCESS if item was inserted. Otherwise,
|
* @return PMIX_SUCCESS if item was inserted. Otherwise,
|
||||||
* the error indicate what went wrong in the function.
|
* the error indicate what went wrong in the function.
|
||||||
*/
|
*/
|
||||||
PMIX_DECLSPEC pmix_status_t pmix_pointer_array_set_item(pmix_pointer_array_t *array,
|
pmix_status_t pmix_pointer_array_set_item(pmix_pointer_array_t *array,
|
||||||
int index, void *value);
|
int index, void *value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -157,7 +157,7 @@ static inline int pmix_pointer_array_get_size(pmix_pointer_array_t *array)
|
|||||||
* Simple function to set the size of the array in order to
|
* Simple function to set the size of the array in order to
|
||||||
* hide the member field from external users.
|
* hide the member field from external users.
|
||||||
*/
|
*/
|
||||||
PMIX_DECLSPEC pmix_status_t pmix_pointer_array_set_size(pmix_pointer_array_t *array, int size);
|
pmix_status_t pmix_pointer_array_set_size(pmix_pointer_array_t *array, int size);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test whether a certain element is already in use. If not yet
|
* Test whether a certain element is already in use. If not yet
|
||||||
@ -173,7 +173,7 @@ PMIX_DECLSPEC pmix_status_t pmix_pointer_array_set_size(pmix_pointer_array_t *ar
|
|||||||
* In contrary to array_set, this function does not allow to overwrite
|
* In contrary to array_set, this function does not allow to overwrite
|
||||||
* a value, unless the previous value is NULL ( equiv. to free ).
|
* a value, unless the previous value is NULL ( equiv. to free ).
|
||||||
*/
|
*/
|
||||||
PMIX_DECLSPEC bool pmix_pointer_array_test_and_set_item (pmix_pointer_array_t *table,
|
bool pmix_pointer_array_test_and_set_item (pmix_pointer_array_t *table,
|
||||||
int index,
|
int index,
|
||||||
void *value);
|
void *value);
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#include "pmix/pmix_common.h"
|
#include "pmix_common.h"
|
||||||
#include "src/class/pmix_ring_buffer.h"
|
#include "src/class/pmix_ring_buffer.h"
|
||||||
#include "src/util/output.h"
|
#include "src/util/output.h"
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ typedef struct pmix_ring_buffer_t pmix_ring_buffer_t;
|
|||||||
/**
|
/**
|
||||||
* Class declaration
|
* Class declaration
|
||||||
*/
|
*/
|
||||||
PMIX_DECLSPEC PMIX_CLASS_DECLARATION(pmix_ring_buffer_t);
|
PMIX_CLASS_DECLARATION(pmix_ring_buffer_t);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize the ring buffer, defining its size.
|
* Initialize the ring buffer, defining its size.
|
||||||
@ -64,7 +64,7 @@ PMIX_DECLSPEC PMIX_CLASS_DECLARATION(pmix_ring_buffer_t);
|
|||||||
* @return PMIX_SUCCESS if all initializations were succesful. Otherwise,
|
* @return PMIX_SUCCESS if all initializations were succesful. Otherwise,
|
||||||
* the error indicate what went wrong in the function.
|
* the error indicate what went wrong in the function.
|
||||||
*/
|
*/
|
||||||
PMIX_DECLSPEC int pmix_ring_buffer_init(pmix_ring_buffer_t* ring, int size);
|
int pmix_ring_buffer_init(pmix_ring_buffer_t* ring, int size);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Push an item onto the ring buffer, displacing the oldest
|
* Push an item onto the ring buffer, displacing the oldest
|
||||||
@ -76,7 +76,7 @@ PMIX_DECLSPEC int pmix_ring_buffer_init(pmix_ring_buffer_t* ring, int size);
|
|||||||
* @return Pointer to displaced item, NULL if ring
|
* @return Pointer to displaced item, NULL if ring
|
||||||
* is not yet full
|
* is not yet full
|
||||||
*/
|
*/
|
||||||
PMIX_DECLSPEC void* pmix_ring_buffer_push(pmix_ring_buffer_t *ring, void *ptr);
|
void* pmix_ring_buffer_push(pmix_ring_buffer_t *ring, void *ptr);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -88,14 +88,14 @@ PMIX_DECLSPEC void* pmix_ring_buffer_push(pmix_ring_buffer_t *ring, void *ptr);
|
|||||||
* @return Error code. NULL indicates an error.
|
* @return Error code. NULL indicates an error.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PMIX_DECLSPEC void* pmix_ring_buffer_pop(pmix_ring_buffer_t *ring);
|
void* pmix_ring_buffer_pop(pmix_ring_buffer_t *ring);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Access an element of the ring, without removing it, indexed
|
* Access an element of the ring, without removing it, indexed
|
||||||
* starting at the tail - a value of -1 will return the element
|
* starting at the tail - a value of -1 will return the element
|
||||||
* at the head of the ring
|
* at the head of the ring
|
||||||
*/
|
*/
|
||||||
PMIX_DECLSPEC void* pmix_ring_buffer_poke(pmix_ring_buffer_t *ring, int i);
|
void* pmix_ring_buffer_poke(pmix_ring_buffer_t *ring, int i);
|
||||||
|
|
||||||
END_C_DECLS
|
END_C_DECLS
|
||||||
|
|
||||||
|
67
opal/mca/pmix/pmix2x/pmix/src/class/pmix_value_array.c
Обычный файл
67
opal/mca/pmix/pmix2x/pmix/src/class/pmix_value_array.c
Обычный файл
@ -0,0 +1,67 @@
|
|||||||
|
/*
|
||||||
|
* 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-2007 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) 2016 Intel, Inc. All rights reserved
|
||||||
|
* $COPYRIGHT$
|
||||||
|
*
|
||||||
|
* Additional copyrights may follow
|
||||||
|
*
|
||||||
|
* $HEADER$
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <src/include/pmix_config.h>
|
||||||
|
|
||||||
|
#include "src/class/pmix_value_array.h"
|
||||||
|
|
||||||
|
|
||||||
|
static void pmix_value_array_construct(pmix_value_array_t* array)
|
||||||
|
{
|
||||||
|
array->array_items = NULL;
|
||||||
|
array->array_size = 0;
|
||||||
|
array->array_item_sizeof = 0;
|
||||||
|
array->array_alloc_size = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void pmix_value_array_destruct(pmix_value_array_t* array)
|
||||||
|
{
|
||||||
|
if (NULL != array->array_items)
|
||||||
|
free(array->array_items);
|
||||||
|
}
|
||||||
|
|
||||||
|
PMIX_CLASS_INSTANCE(
|
||||||
|
pmix_value_array_t,
|
||||||
|
pmix_object_t,
|
||||||
|
pmix_value_array_construct,
|
||||||
|
pmix_value_array_destruct
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
int pmix_value_array_set_size(pmix_value_array_t* array, size_t size)
|
||||||
|
{
|
||||||
|
#if PMIX_ENABLE_DEBUG
|
||||||
|
if(array->array_item_sizeof == 0) {
|
||||||
|
pmix_output(0, "pmix_value_array_set_size: item size must be initialized");
|
||||||
|
return PMIX_ERR_BAD_PARAM;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if(size > array->array_alloc_size) {
|
||||||
|
while(array->array_alloc_size < size)
|
||||||
|
array->array_alloc_size <<= 1;
|
||||||
|
array->array_items = (unsigned char *)realloc(array->array_items,
|
||||||
|
array->array_alloc_size * array->array_item_sizeof);
|
||||||
|
if (NULL == array->array_items)
|
||||||
|
return PMIX_ERR_OUT_OF_RESOURCE;
|
||||||
|
}
|
||||||
|
array->array_size = size;
|
||||||
|
return PMIX_SUCCESS;
|
||||||
|
}
|
||||||
|
|
281
opal/mca/pmix/pmix2x/pmix/src/class/pmix_value_array.h
Обычный файл
281
opal/mca/pmix/pmix2x/pmix/src/class/pmix_value_array.h
Обычный файл
@ -0,0 +1,281 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
|
||||||
|
* University Research and Technology
|
||||||
|
* Corporation. All rights reserved.
|
||||||
|
* Copyright (c) 2004-2006 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) 2016 Intel, Inc. All rights reserved
|
||||||
|
* $COPYRIGHT$
|
||||||
|
*
|
||||||
|
* Additional copyrights may follow
|
||||||
|
*
|
||||||
|
* $HEADER$
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef PMIX_VALUE_ARRAY_H
|
||||||
|
#define PMIX_VALUE_ARRAY_H
|
||||||
|
|
||||||
|
#include <src/include/pmix_config.h>
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
#ifdef HAVE_STRINGS_H
|
||||||
|
#include <strings.h>
|
||||||
|
#endif /* HAVE_STRINGS_H */
|
||||||
|
|
||||||
|
#include "src/class/pmix_object.h"
|
||||||
|
#if PMIX_ENABLE_DEBUG
|
||||||
|
#include "src/util/output.h"
|
||||||
|
#endif
|
||||||
|
#include "pmix_common.h"
|
||||||
|
|
||||||
|
BEGIN_C_DECLS
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @file Array of elements maintained by value.
|
||||||
|
*/
|
||||||
|
|
||||||
|
struct pmix_value_array_t
|
||||||
|
{
|
||||||
|
pmix_object_t super;
|
||||||
|
unsigned char* array_items;
|
||||||
|
size_t array_item_sizeof;
|
||||||
|
size_t array_size;
|
||||||
|
size_t array_alloc_size;
|
||||||
|
};
|
||||||
|
typedef struct pmix_value_array_t pmix_value_array_t;
|
||||||
|
|
||||||
|
PMIX_CLASS_DECLARATION(pmix_value_array_t);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize the array to hold items by value. This routine must
|
||||||
|
* be called prior to using the array.
|
||||||
|
*
|
||||||
|
* @param array The array to initialize (IN).
|
||||||
|
* @param item_size The sizeof each array element (IN).
|
||||||
|
* @return PMIX error code
|
||||||
|
*
|
||||||
|
* Note that there is no corresponding "finalize" function -- use
|
||||||
|
* OBJ_DESTRUCT (for stack arrays) or OBJ_RELEASE (for heap arrays) to
|
||||||
|
* delete it.
|
||||||
|
*/
|
||||||
|
|
||||||
|
static inline int pmix_value_array_init(pmix_value_array_t *array, size_t item_sizeof)
|
||||||
|
{
|
||||||
|
array->array_item_sizeof = item_sizeof;
|
||||||
|
array->array_alloc_size = 1;
|
||||||
|
array->array_size = 0;
|
||||||
|
array->array_items = (unsigned char*)realloc(array->array_items, item_sizeof * array->array_alloc_size);
|
||||||
|
return (NULL != array->array_items) ? PMIX_SUCCESS : PMIX_ERR_OUT_OF_RESOURCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reserve space in the array for new elements, but do not change the size.
|
||||||
|
*
|
||||||
|
* @param array The input array (IN).
|
||||||
|
* @param size The anticipated size of the array (IN).
|
||||||
|
* @return PMIX error code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
static inline int pmix_value_array_reserve(pmix_value_array_t* array, size_t size)
|
||||||
|
{
|
||||||
|
if(size > array->array_alloc_size) {
|
||||||
|
array->array_items = (unsigned char*)realloc(array->array_items, array->array_item_sizeof * size);
|
||||||
|
if(NULL == array->array_items) {
|
||||||
|
array->array_size = 0;
|
||||||
|
array->array_alloc_size = 0;
|
||||||
|
return PMIX_ERR_OUT_OF_RESOURCE;
|
||||||
|
}
|
||||||
|
array->array_alloc_size = size;
|
||||||
|
}
|
||||||
|
return PMIX_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retreives the number of elements in the array.
|
||||||
|
*
|
||||||
|
* @param array The input array (IN).
|
||||||
|
* @return The number of elements currently in use.
|
||||||
|
*/
|
||||||
|
|
||||||
|
static inline size_t pmix_value_array_get_size(pmix_value_array_t* array)
|
||||||
|
{
|
||||||
|
return array->array_size;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the number of elements in the array.
|
||||||
|
*
|
||||||
|
* @param array The input array (IN).
|
||||||
|
* @param size The new array size.
|
||||||
|
*
|
||||||
|
* @return PMIX error code.
|
||||||
|
*
|
||||||
|
* Note that resizing the array to a smaller size may not change
|
||||||
|
* the underlying memory allocated by the array. However, setting
|
||||||
|
* the size larger than the current allocation will grow it. In either
|
||||||
|
* case, if the routine is successful, pmix_value_array_get_size() will
|
||||||
|
* return the new size.
|
||||||
|
*/
|
||||||
|
|
||||||
|
int pmix_value_array_set_size(pmix_value_array_t* array, size_t size);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Macro to retrieve an item from the array by value.
|
||||||
|
*
|
||||||
|
* @param array The input array (IN).
|
||||||
|
* @param item_type The C datatype of the array item (IN).
|
||||||
|
* @param item_index The array index (IN).
|
||||||
|
*
|
||||||
|
* @returns item The requested item.
|
||||||
|
*
|
||||||
|
* Note that this does not change the size of the array - this macro is
|
||||||
|
* strictly for performance - the user assumes the responsibility of
|
||||||
|
* ensuring the array index is valid (0 <= item index < array size).
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define PMIX_VALUE_ARRAY_GET_ITEM(array, item_type, item_index) \
|
||||||
|
((item_type*)((array)->array_items))[item_index]
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve an item from the array by reference.
|
||||||
|
*
|
||||||
|
* @param array The input array (IN).
|
||||||
|
* @param item_index The array index (IN).
|
||||||
|
*
|
||||||
|
* @return ptr Pointer to the requested item.
|
||||||
|
*
|
||||||
|
* Note that if the specified item_index is larger than the current
|
||||||
|
* array size, the array is grown to satisfy the request.
|
||||||
|
*/
|
||||||
|
|
||||||
|
static inline void* pmix_value_array_get_item(pmix_value_array_t *array, size_t item_index)
|
||||||
|
{
|
||||||
|
if(item_index >= array->array_size && pmix_value_array_set_size(array, item_index+1) != PMIX_SUCCESS)
|
||||||
|
return NULL;
|
||||||
|
return array->array_items + (item_index * array->array_item_sizeof);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Macro to set an array element by value.
|
||||||
|
*
|
||||||
|
* @param array The input array (IN).
|
||||||
|
* @param item_type The C datatype of the array item (IN).
|
||||||
|
* @param item_index The array index (IN).
|
||||||
|
* @param item_value The new value for the specified index (IN).
|
||||||
|
*
|
||||||
|
* Note that this does not change the size of the array - this macro is
|
||||||
|
* strictly for performance - the user assumes the responsibility of
|
||||||
|
* ensuring the array index is valid (0 <= item index < array size).
|
||||||
|
*
|
||||||
|
* It is safe to free the item after returning from this call; it is
|
||||||
|
* copied into the array by value.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define PMIX_VALUE_ARRAY_SET_ITEM(array, item_type, item_index, item_value) \
|
||||||
|
(((item_type*)((array)->array_items))[item_index] = item_value)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set an array element by value.
|
||||||
|
*
|
||||||
|
* @param array The input array (IN).
|
||||||
|
* @param item_index The array index (IN).
|
||||||
|
* @param item_value A pointer to the item, which is copied into
|
||||||
|
* the array.
|
||||||
|
*
|
||||||
|
* @return PMIX error code.
|
||||||
|
*
|
||||||
|
* It is safe to free the item after returning from this call; it is
|
||||||
|
* copied into the array by value.
|
||||||
|
*/
|
||||||
|
|
||||||
|
static inline int pmix_value_array_set_item(pmix_value_array_t *array, size_t item_index, const void* item)
|
||||||
|
{
|
||||||
|
int rc;
|
||||||
|
if(item_index >= array->array_size &&
|
||||||
|
(rc = pmix_value_array_set_size(array, item_index+1)) != PMIX_SUCCESS)
|
||||||
|
return rc;
|
||||||
|
memcpy(array->array_items + (item_index * array->array_item_sizeof), item, array->array_item_sizeof);
|
||||||
|
return PMIX_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Appends an item to the end of the array.
|
||||||
|
*
|
||||||
|
* @param array The input array (IN).
|
||||||
|
* @param item A pointer to the item to append, which is copied
|
||||||
|
* into the array.
|
||||||
|
*
|
||||||
|
* @return PMIX error code
|
||||||
|
*
|
||||||
|
* This will grow the array if it is not large enough to contain the
|
||||||
|
* item. It is safe to free the item after returning from this call;
|
||||||
|
* it is copied by value into the array.
|
||||||
|
*/
|
||||||
|
|
||||||
|
static inline int pmix_value_array_append_item(pmix_value_array_t *array, const void *item)
|
||||||
|
{
|
||||||
|
return pmix_value_array_set_item(array, array->array_size, item);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove a specific item from the array.
|
||||||
|
*
|
||||||
|
* @param array The input array (IN).
|
||||||
|
* @param item_index The index to remove, which must be less than
|
||||||
|
* the current array size (IN).
|
||||||
|
*
|
||||||
|
* @return PMIX error code.
|
||||||
|
*
|
||||||
|
* All elements following this index are shifted down.
|
||||||
|
*/
|
||||||
|
|
||||||
|
static inline int pmix_value_array_remove_item(pmix_value_array_t *array, size_t item_index)
|
||||||
|
{
|
||||||
|
#if PMIX_ENABLE_DEBUG
|
||||||
|
if (item_index >= array->array_size) {
|
||||||
|
pmix_output(0, "pmix_value_array_remove_item: invalid index %lu\n", (unsigned long)item_index);
|
||||||
|
return PMIX_ERR_BAD_PARAM;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
memmove(array->array_items+(array->array_item_sizeof * item_index),
|
||||||
|
array->array_items+(array->array_item_sizeof * (item_index+1)),
|
||||||
|
array->array_item_sizeof * (array->array_size - item_index - 1));
|
||||||
|
array->array_size--;
|
||||||
|
return PMIX_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the base pointer of the underlying array.
|
||||||
|
*
|
||||||
|
* @param array The input array (IN).
|
||||||
|
* @param array_type The C datatype of the array (IN).
|
||||||
|
*
|
||||||
|
* @returns ptr Pointer to the actual array.
|
||||||
|
*
|
||||||
|
* This function is helpful when you need to iterate through an
|
||||||
|
* entire array; simply get the base value of the array and use native
|
||||||
|
* C to iterate through it manually. This can have better performance
|
||||||
|
* than looping over PMIX_VALUE_ARRAY_GET_ITEM() and
|
||||||
|
* PMIX_VALUE_ARRAY_SET_ITEM() because it will [potentially] reduce the
|
||||||
|
* number of pointer dereferences.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define PMIX_VALUE_ARRAY_GET_BASE(array, item_type) \
|
||||||
|
((item_type*) ((array)->array_items))
|
||||||
|
|
||||||
|
END_C_DECLS
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -1,27 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
|
|
||||||
# Copyright (c) 2014 Artem Y. Polyakov <artpol84@gmail.com>.
|
|
||||||
# All rights reserved.
|
|
||||||
# $COPYRIGHT$
|
|
||||||
#
|
|
||||||
# Additional copyrights may follow
|
|
||||||
#
|
|
||||||
# $HEADER$
|
|
||||||
#
|
|
||||||
|
|
||||||
headers += \
|
|
||||||
src/client/pmix_client_ops.h
|
|
||||||
|
|
||||||
sources += \
|
|
||||||
src/client/pmix_client.c \
|
|
||||||
src/client/pmix_client_fence.c \
|
|
||||||
src/client/pmix_client_get.c \
|
|
||||||
src/client/pmix_client_pub.c \
|
|
||||||
src/client/pmix_client_spawn.c \
|
|
||||||
src/client/pmix_client_connect.c
|
|
||||||
|
|
||||||
if !PMIX_EMBEDDED_MODE
|
|
||||||
sources += \
|
|
||||||
src/client/pmi1.c \
|
|
||||||
src/client/pmi2.c
|
|
||||||
endif
|
|
29
opal/mca/pmix/pmix2x/pmix/src/client/Makefile.include
Обычный файл
29
opal/mca/pmix/pmix2x/pmix/src/client/Makefile.include
Обычный файл
@ -0,0 +1,29 @@
|
|||||||
|
# -*- makefile -*-
|
||||||
|
#
|
||||||
|
# Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
|
||||||
|
# Copyright (c) 2014 Artem Y. Polyakov <artpol84@gmail.com>.
|
||||||
|
# All rights reserved.
|
||||||
|
# Copyright (c) 2016 Cisco Systems, Inc. All rights reserved.
|
||||||
|
# $COPYRIGHT$
|
||||||
|
#
|
||||||
|
# Additional copyrights may follow
|
||||||
|
#
|
||||||
|
# $HEADER$
|
||||||
|
#
|
||||||
|
|
||||||
|
headers += \
|
||||||
|
client/pmix_client_ops.h
|
||||||
|
|
||||||
|
sources += \
|
||||||
|
client/pmix_client.c \
|
||||||
|
client/pmix_client_fence.c \
|
||||||
|
client/pmix_client_get.c \
|
||||||
|
client/pmix_client_pub.c \
|
||||||
|
client/pmix_client_spawn.c \
|
||||||
|
client/pmix_client_connect.c
|
||||||
|
|
||||||
|
if !PMIX_EMBEDDED_MODE
|
||||||
|
sources += \
|
||||||
|
client/pmi1.c \
|
||||||
|
client/pmi2.c
|
||||||
|
endif
|
@ -18,7 +18,7 @@
|
|||||||
#include <src/include/pmix_config.h>
|
#include <src/include/pmix_config.h>
|
||||||
|
|
||||||
#include <src/include/types.h>
|
#include <src/include/types.h>
|
||||||
#include <pmix/autogen/pmix_stdint.h>
|
#include <src/include/pmix_stdint.h>
|
||||||
#include <src/include/pmix_socket_errno.h>
|
#include <src/include/pmix_socket_errno.h>
|
||||||
|
|
||||||
#include <pmix.h>
|
#include <pmix.h>
|
||||||
@ -61,7 +61,7 @@
|
|||||||
#include "src/util/error.h"
|
#include "src/util/error.h"
|
||||||
#include "src/util/hash.h"
|
#include "src/util/hash.h"
|
||||||
#include "src/util/output.h"
|
#include "src/util/output.h"
|
||||||
#include "src/util/progress_threads.h"
|
#include "src/runtime/pmix_progress_threads.h"
|
||||||
#include "src/usock/usock.h"
|
#include "src/usock/usock.h"
|
||||||
#include "src/sec/pmix_sec.h"
|
#include "src/sec/pmix_sec.h"
|
||||||
#include "src/include/pmix_globals.h"
|
#include "src/include/pmix_globals.h"
|
||||||
@ -183,6 +183,8 @@ static void job_data(struct pmix_peer_t *pr, pmix_usock_hdr_t *hdr,
|
|||||||
* unpack it to maintain sequence */
|
* unpack it to maintain sequence */
|
||||||
if (PMIX_SUCCESS != (rc = pmix_bfrop.unpack(buf, &nspace, &cnt, PMIX_STRING))) {
|
if (PMIX_SUCCESS != (rc = pmix_bfrop.unpack(buf, &nspace, &cnt, PMIX_STRING))) {
|
||||||
PMIX_ERROR_LOG(rc);
|
PMIX_ERROR_LOG(rc);
|
||||||
|
cb->status = PMIX_ERROR;
|
||||||
|
cb->active = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* decode it */
|
/* decode it */
|
||||||
@ -374,8 +376,11 @@ PMIX_EXPORT pmix_status_t PMIx_Init(pmix_proc_t *proc,
|
|||||||
|
|
||||||
/* setup the support */
|
/* setup the support */
|
||||||
#if defined(PMIX_ENABLE_DSTORE) && (PMIX_ENABLE_DSTORE == 1)
|
#if defined(PMIX_ENABLE_DSTORE) && (PMIX_ENABLE_DSTORE == 1)
|
||||||
if (PMIX_SUCCESS != (rc = pmix_dstore_init())) {
|
if (PMIX_SUCCESS != (rc = pmix_dstore_init(NULL, 0))) {
|
||||||
return rc;
|
pmix_output_close(pmix_globals.debug_output);
|
||||||
|
pmix_output_finalize();
|
||||||
|
pmix_class_finalize();
|
||||||
|
return PMIX_ERR_DATA_VALUE_NOT_FOUND;
|
||||||
}
|
}
|
||||||
#endif /* PMIX_ENABLE_DSTORE */
|
#endif /* PMIX_ENABLE_DSTORE */
|
||||||
pmix_bfrop_open();
|
pmix_bfrop_open();
|
||||||
@ -384,7 +389,7 @@ PMIX_EXPORT pmix_status_t PMIx_Init(pmix_proc_t *proc,
|
|||||||
|
|
||||||
if (!pmix_globals.external_evbase) {
|
if (!pmix_globals.external_evbase) {
|
||||||
/* create an event base and progress thread for us */
|
/* create an event base and progress thread for us */
|
||||||
if (NULL == (pmix_globals.evbase = pmix_start_progress_thread())) {
|
if (NULL == (pmix_globals.evbase = pmix_progress_thread_init(NULL))) {
|
||||||
pmix_sec_finalize();
|
pmix_sec_finalize();
|
||||||
pmix_usock_finalize();
|
pmix_usock_finalize();
|
||||||
pmix_bfrop_close();
|
pmix_bfrop_close();
|
||||||
@ -402,7 +407,7 @@ PMIX_EXPORT pmix_status_t PMIx_Init(pmix_proc_t *proc,
|
|||||||
/* connect to the server - returns job info if successful */
|
/* connect to the server - returns job info if successful */
|
||||||
if (PMIX_SUCCESS != (rc = connect_to_server(&address, &cb))){
|
if (PMIX_SUCCESS != (rc = connect_to_server(&address, &cb))){
|
||||||
PMIX_DESTRUCT(&cb);
|
PMIX_DESTRUCT(&cb);
|
||||||
pmix_stop_progress_thread(pmix_globals.evbase);
|
pmix_progress_thread_finalize(NULL);
|
||||||
pmix_sec_finalize();
|
pmix_sec_finalize();
|
||||||
pmix_usock_finalize();
|
pmix_usock_finalize();
|
||||||
pmix_bfrop_close();
|
pmix_bfrop_close();
|
||||||
@ -498,7 +503,10 @@ PMIX_EXPORT pmix_status_t PMIx_Finalize(const pmix_info_t info[], size_t ninfo)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!pmix_globals.external_evbase) {
|
if (!pmix_globals.external_evbase) {
|
||||||
pmix_stop_progress_thread(pmix_globals.evbase);
|
#ifdef HAVE_LIBEVENT_GLOBAL_SHUTDOWN
|
||||||
|
libevent_global_shutdown();
|
||||||
|
#endif
|
||||||
|
pmix_progress_thread_finalize(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
pmix_usock_finalize();
|
pmix_usock_finalize();
|
||||||
@ -508,10 +516,7 @@ PMIX_EXPORT pmix_status_t PMIx_Finalize(const pmix_info_t info[], size_t ninfo)
|
|||||||
if (0 <= pmix_client_globals.myserver.sd) {
|
if (0 <= pmix_client_globals.myserver.sd) {
|
||||||
CLOSE_THE_SOCKET(pmix_client_globals.myserver.sd);
|
CLOSE_THE_SOCKET(pmix_client_globals.myserver.sd);
|
||||||
}
|
}
|
||||||
event_base_free(pmix_globals.evbase);
|
|
||||||
#ifdef HAVE_LIBEVENT_GLOBAL_SHUTDOWN
|
|
||||||
libevent_global_shutdown();
|
|
||||||
#endif
|
|
||||||
pmix_bfrop_close();
|
pmix_bfrop_close();
|
||||||
pmix_sec_finalize();
|
pmix_sec_finalize();
|
||||||
#if defined(PMIX_ENABLE_DSTORE) && (PMIX_ENABLE_DSTORE == 1)
|
#if defined(PMIX_ENABLE_DSTORE) && (PMIX_ENABLE_DSTORE == 1)
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#include <src/include/pmix_config.h>
|
#include <src/include/pmix_config.h>
|
||||||
|
|
||||||
#include <src/include/types.h>
|
#include <src/include/types.h>
|
||||||
#include <pmix/autogen/pmix_stdint.h>
|
#include <src/include/pmix_stdint.h>
|
||||||
|
|
||||||
#include <pmix.h>
|
#include <pmix.h>
|
||||||
|
|
||||||
@ -50,7 +50,6 @@
|
|||||||
#include "src/util/argv.h"
|
#include "src/util/argv.h"
|
||||||
#include "src/util/error.h"
|
#include "src/util/error.h"
|
||||||
#include "src/util/output.h"
|
#include "src/util/output.h"
|
||||||
#include "src/util/progress_threads.h"
|
|
||||||
#include "src/usock/usock.h"
|
#include "src/usock/usock.h"
|
||||||
#include "src/sec/pmix_sec.h"
|
#include "src/sec/pmix_sec.h"
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#include <src/include/pmix_config.h>
|
#include <src/include/pmix_config.h>
|
||||||
|
|
||||||
#include <src/include/types.h>
|
#include <src/include/types.h>
|
||||||
#include <pmix/autogen/pmix_stdint.h>
|
#include <src/include/pmix_stdint.h>
|
||||||
|
|
||||||
#include <pmix.h>
|
#include <pmix.h>
|
||||||
|
|
||||||
@ -51,7 +51,6 @@
|
|||||||
#include "src/util/error.h"
|
#include "src/util/error.h"
|
||||||
#include "src/util/hash.h"
|
#include "src/util/hash.h"
|
||||||
#include "src/util/output.h"
|
#include "src/util/output.h"
|
||||||
#include "src/util/progress_threads.h"
|
|
||||||
#include "src/usock/usock.h"
|
#include "src/usock/usock.h"
|
||||||
#include "src/sec/pmix_sec.h"
|
#include "src/sec/pmix_sec.h"
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#include <src/include/pmix_config.h>
|
#include <src/include/pmix_config.h>
|
||||||
|
|
||||||
#include <src/include/types.h>
|
#include <src/include/types.h>
|
||||||
#include <pmix/autogen/pmix_stdint.h>
|
#include <src/include/pmix_stdint.h>
|
||||||
|
|
||||||
#include <pmix.h>
|
#include <pmix.h>
|
||||||
|
|
||||||
@ -51,7 +51,6 @@
|
|||||||
#include "src/util/error.h"
|
#include "src/util/error.h"
|
||||||
#include "src/util/hash.h"
|
#include "src/util/hash.h"
|
||||||
#include "src/util/output.h"
|
#include "src/util/output.h"
|
||||||
#include "src/util/progress_threads.h"
|
|
||||||
#include "src/usock/usock.h"
|
#include "src/usock/usock.h"
|
||||||
#include "src/sec/pmix_sec.h"
|
#include "src/sec/pmix_sec.h"
|
||||||
#if defined(PMIX_ENABLE_DSTORE) && (PMIX_ENABLE_DSTORE == 1)
|
#if defined(PMIX_ENABLE_DSTORE) && (PMIX_ENABLE_DSTORE == 1)
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#include <src/include/pmix_config.h>
|
#include <src/include/pmix_config.h>
|
||||||
|
|
||||||
#include <src/include/types.h>
|
#include <src/include/types.h>
|
||||||
#include <pmix/autogen/pmix_stdint.h>
|
#include <src/include/pmix_stdint.h>
|
||||||
|
|
||||||
#include <pmix.h>
|
#include <pmix.h>
|
||||||
|
|
||||||
@ -50,7 +50,6 @@
|
|||||||
#include "src/util/argv.h"
|
#include "src/util/argv.h"
|
||||||
#include "src/util/error.h"
|
#include "src/util/error.h"
|
||||||
#include "src/util/output.h"
|
#include "src/util/output.h"
|
||||||
#include "src/util/progress_threads.h"
|
|
||||||
#include "src/usock/usock.h"
|
#include "src/usock/usock.h"
|
||||||
#include "src/sec/pmix_sec.h"
|
#include "src/sec/pmix_sec.h"
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#include <src/include/pmix_config.h>
|
#include <src/include/pmix_config.h>
|
||||||
|
|
||||||
#include <src/include/types.h>
|
#include <src/include/types.h>
|
||||||
#include <pmix/autogen/pmix_stdint.h>
|
#include <src/include/pmix_stdint.h>
|
||||||
|
|
||||||
#include <pmix.h>
|
#include <pmix.h>
|
||||||
|
|
||||||
@ -50,7 +50,6 @@
|
|||||||
#include "src/util/argv.h"
|
#include "src/util/argv.h"
|
||||||
#include "src/util/error.h"
|
#include "src/util/error.h"
|
||||||
#include "src/util/output.h"
|
#include "src/util/output.h"
|
||||||
#include "src/util/progress_threads.h"
|
|
||||||
#include "src/usock/usock.h"
|
#include "src/usock/usock.h"
|
||||||
#include "src/sec/pmix_sec.h"
|
#include "src/sec/pmix_sec.h"
|
||||||
|
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 2015-2016 Intel, Inc. All rights reserved.
|
|
||||||
# $COPYRIGHT$
|
|
||||||
#
|
|
||||||
# Additional copyrights may follow
|
|
||||||
#
|
|
||||||
# $HEADER$
|
|
||||||
#
|
|
||||||
|
|
||||||
sources += \
|
|
||||||
src/common/pmix_query.c \
|
|
||||||
src/common/pmix_strings.c \
|
|
||||||
src/common/pmix_log.c
|
|
15
opal/mca/pmix/pmix2x/pmix/src/common/Makefile.include
Обычный файл
15
opal/mca/pmix/pmix2x/pmix/src/common/Makefile.include
Обычный файл
@ -0,0 +1,15 @@
|
|||||||
|
# -*- makefile -*-
|
||||||
|
#
|
||||||
|
# Copyright (c) 2015 Intel, Inc. All rights reserved.
|
||||||
|
# Copyright (c) 2016 Cisco Systems, Inc. All rights reserved.
|
||||||
|
# $COPYRIGHT$
|
||||||
|
#
|
||||||
|
# Additional copyrights may follow
|
||||||
|
#
|
||||||
|
# $HEADER$
|
||||||
|
#
|
||||||
|
|
||||||
|
sources += \
|
||||||
|
common/pmix_query.c \
|
||||||
|
common/pmix_strings.c \
|
||||||
|
common/pmix_log.c
|
@ -13,11 +13,11 @@
|
|||||||
#include <src/include/pmix_config.h>
|
#include <src/include/pmix_config.h>
|
||||||
|
|
||||||
#include <src/include/types.h>
|
#include <src/include/types.h>
|
||||||
#include <pmix/autogen/pmix_stdint.h>
|
#include <src/include/pmix_stdint.h>
|
||||||
#include <src/include/pmix_socket_errno.h>
|
#include <src/include/pmix_socket_errno.h>
|
||||||
|
|
||||||
#include <pmix.h>
|
#include <pmix.h>
|
||||||
#include <pmix/pmix_common.h>
|
#include <pmix_common.h>
|
||||||
#include <pmix_server.h>
|
#include <pmix_server.h>
|
||||||
|
|
||||||
#include "src/util/argv.h"
|
#include "src/util/argv.h"
|
||||||
|
@ -13,11 +13,11 @@
|
|||||||
#include <src/include/pmix_config.h>
|
#include <src/include/pmix_config.h>
|
||||||
|
|
||||||
#include <src/include/types.h>
|
#include <src/include/types.h>
|
||||||
#include <pmix/autogen/pmix_stdint.h>
|
#include <src/include/pmix_stdint.h>
|
||||||
#include <src/include/pmix_socket_errno.h>
|
#include <src/include/pmix_socket_errno.h>
|
||||||
|
|
||||||
#include <pmix.h>
|
#include <pmix.h>
|
||||||
#include <pmix/pmix_common.h>
|
#include <pmix_common.h>
|
||||||
#include <pmix_server.h>
|
#include <pmix_server.h>
|
||||||
|
|
||||||
#include "src/util/argv.h"
|
#include "src/util/argv.h"
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <pmix/pmix_common.h>
|
#include <pmix_common.h>
|
||||||
#include "src/buffer_ops/internal.h"
|
#include "src/buffer_ops/internal.h"
|
||||||
#include "src/include/pmix_globals.h"
|
#include "src/include/pmix_globals.h"
|
||||||
|
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
# Copyright (c) 2015-2016 Mellanox Technologies, Inc.
|
|
||||||
# All rights reserved.
|
|
||||||
# $COPYRIGHT$
|
|
||||||
#
|
|
||||||
# Additional copyrights may follow
|
|
||||||
#
|
|
||||||
# $HEADER$
|
|
||||||
|
|
||||||
|
|
||||||
headers += \
|
|
||||||
src/dstore/pmix_dstore.h \
|
|
||||||
src/dstore/pmix_esh.h
|
|
||||||
|
|
||||||
sources += \
|
|
||||||
src/dstore/pmix_dstore.c \
|
|
||||||
src/dstore/pmix_esh.c
|
|
@ -1,73 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2016 Mellanox Technologies, Inc.
|
|
||||||
* All rights reserved.
|
|
||||||
* $COPYRIGHT$
|
|
||||||
*
|
|
||||||
* Additional copyrights may follow
|
|
||||||
*
|
|
||||||
* $HEADER$
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <src/include/pmix_config.h>
|
|
||||||
#include <pmix/pmix_common.h>
|
|
||||||
#include "src/include/pmix_globals.h"
|
|
||||||
|
|
||||||
#include "pmix_dstore.h"
|
|
||||||
#include "pmix_esh.h"
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Array of all possible DSTOREs
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**** ENSURE THE FOLLOWING VALUE IS AT LEAST AS
|
|
||||||
**** LARGE AS THE TOTAL NUMBER OF SUPPORTED SPCs
|
|
||||||
**** IN THE ARRAY BELOW
|
|
||||||
*/
|
|
||||||
|
|
||||||
static pmix_dstore_base_module_t *all[] = {
|
|
||||||
&pmix_dstore_esh_module,
|
|
||||||
|
|
||||||
/* Always end the array with a NULL */
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
pmix_dstore_base_module_t pmix_dstore = {0};
|
|
||||||
|
|
||||||
int pmix_dstore_init(void)
|
|
||||||
{
|
|
||||||
pmix_dstore = *all[0];
|
|
||||||
|
|
||||||
if (!pmix_dstore.init) {
|
|
||||||
return PMIX_ERR_NOT_SUPPORTED;
|
|
||||||
}
|
|
||||||
|
|
||||||
return pmix_dstore.init();
|
|
||||||
}
|
|
||||||
|
|
||||||
void pmix_dstore_finalize(void)
|
|
||||||
{
|
|
||||||
if (!pmix_dstore.finalize) {
|
|
||||||
pmix_dstore.finalize();
|
|
||||||
}
|
|
||||||
|
|
||||||
return ;
|
|
||||||
}
|
|
||||||
|
|
||||||
int pmix_dstore_store(const char *nspace, int rank, pmix_kval_t *kv)
|
|
||||||
{
|
|
||||||
if (!pmix_dstore.store) {
|
|
||||||
return PMIX_ERR_NOT_SUPPORTED;
|
|
||||||
}
|
|
||||||
|
|
||||||
return pmix_dstore.store(nspace, rank, kv);
|
|
||||||
}
|
|
||||||
|
|
||||||
int pmix_dstore_fetch(const char *nspace, int rank, const char *key, pmix_value_t **kvs)
|
|
||||||
{
|
|
||||||
if (!pmix_dstore.fetch) {
|
|
||||||
return PMIX_ERR_NOT_SUPPORTED;
|
|
||||||
}
|
|
||||||
|
|
||||||
return pmix_dstore.fetch(nspace, rank, key, kvs);
|
|
||||||
}
|
|
@ -1,89 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2016 Mellanox Technologies, Inc.
|
|
||||||
* All rights reserved.
|
|
||||||
* Copyright (c) 2016 Intel, Inc. All rights reserved.
|
|
||||||
* $COPYRIGHT$
|
|
||||||
*
|
|
||||||
* Additional copyrights may follow
|
|
||||||
*
|
|
||||||
* $HEADER$
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef PMIX_DSTORE_H
|
|
||||||
#define PMIX_DSTORE_H
|
|
||||||
|
|
||||||
#include <src/include/pmix_config.h>
|
|
||||||
|
|
||||||
|
|
||||||
#include <pmix/pmix_common.h>
|
|
||||||
#include "src/buffer_ops/buffer_ops.h"
|
|
||||||
|
|
||||||
|
|
||||||
BEGIN_C_DECLS
|
|
||||||
|
|
||||||
|
|
||||||
int pmix_dstore_init(void);
|
|
||||||
void pmix_dstore_finalize(void);
|
|
||||||
int pmix_dstore_store(const char *nspace,
|
|
||||||
int rank, pmix_kval_t *kv);
|
|
||||||
int pmix_dstore_fetch(const char *nspace, int rank,
|
|
||||||
const char *key, pmix_value_t **kvs);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Initialize the module. Returns an error if the module cannot
|
|
||||||
* run, success if it can and wants to be used.
|
|
||||||
*/
|
|
||||||
typedef int (*pmix_dstore_base_module_init_fn_t)(void);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Finalize the module. Tear down any allocated storage, disconnect
|
|
||||||
* from any system support.
|
|
||||||
*/
|
|
||||||
typedef int (*pmix_dstore_base_module_fini_fn_t)(void);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* store key/value pair in datastore.
|
|
||||||
*
|
|
||||||
* @param nspace namespace string
|
|
||||||
*
|
|
||||||
* @param rank rank.
|
|
||||||
*
|
|
||||||
* @param kv key/value pair.
|
|
||||||
*
|
|
||||||
* @return PMIX_SUCCESS on success.
|
|
||||||
*/
|
|
||||||
typedef int (*pmix_dstore_base_module_store_fn_t)(const char *nspace,
|
|
||||||
pmix_rank_t rank,
|
|
||||||
pmix_kval_t *kv);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* fetch value in datastore.
|
|
||||||
*
|
|
||||||
* @param nspace namespace string
|
|
||||||
*
|
|
||||||
* @param rank rank.
|
|
||||||
*
|
|
||||||
* @param key key.
|
|
||||||
*
|
|
||||||
* @return kvs(key/value pair) and PMIX_SUCCESS on success.
|
|
||||||
*/
|
|
||||||
typedef int (*pmix_dstrore_base_module_fetch_fn_t)(const char *nspace,
|
|
||||||
pmix_rank_t rank,
|
|
||||||
const char *key,
|
|
||||||
pmix_value_t **kvs);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* structure for dstore modules
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
const char *name;
|
|
||||||
pmix_dstore_base_module_init_fn_t init;
|
|
||||||
pmix_dstore_base_module_fini_fn_t finalize;
|
|
||||||
pmix_dstore_base_module_store_fn_t store;
|
|
||||||
pmix_dstrore_base_module_fetch_fn_t fetch;
|
|
||||||
} pmix_dstore_base_module_t;
|
|
||||||
|
|
||||||
END_C_DECLS
|
|
||||||
|
|
||||||
#endif /* PMIX_DSTORE_H */
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
@ -1,83 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2015-2016 Mellanox Technologies, Inc.
|
|
||||||
* All rights reserved.
|
|
||||||
* $COPYRIGHT$
|
|
||||||
*
|
|
||||||
* Additional copyrights may follow
|
|
||||||
*
|
|
||||||
* $HEADER$
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef PMIX_DSTORE_ESH_H
|
|
||||||
#define PMIX_DSTORE_ESH_H
|
|
||||||
|
|
||||||
#include <src/include/pmix_config.h>
|
|
||||||
|
|
||||||
|
|
||||||
#include "pmix_dstore.h"
|
|
||||||
#include "src/sm/pmix_sm.h"
|
|
||||||
|
|
||||||
BEGIN_C_DECLS
|
|
||||||
|
|
||||||
#define INITIAL_SEG_SIZE 4096
|
|
||||||
#define NS_META_SEG_SIZE (1<<22)
|
|
||||||
#define NS_DATA_SEG_SIZE (1<<22)
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
INITIAL_SEGMENT,
|
|
||||||
NS_META_SEGMENT,
|
|
||||||
NS_DATA_SEGMENT
|
|
||||||
} segment_type;
|
|
||||||
|
|
||||||
/* initial segment format:
|
|
||||||
* size_t num_elems;
|
|
||||||
* int full; //indicate to client that it needs to attach to the next segment
|
|
||||||
* ns_seg_info_t ns_seg_info[max_ns_num];
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
char ns_name[PMIX_MAX_NSLEN+1];
|
|
||||||
size_t num_meta_seg;/* read by clients to attach to this number of segments. */
|
|
||||||
size_t num_data_seg;
|
|
||||||
} ns_seg_info_t;
|
|
||||||
|
|
||||||
/* meta segment format:
|
|
||||||
* size_t num_elems;
|
|
||||||
* rank_meta_info meta_info[max_meta_elems];
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
size_t rank;
|
|
||||||
size_t offset;
|
|
||||||
size_t count;
|
|
||||||
} rank_meta_info;
|
|
||||||
|
|
||||||
/* this structs are used to store information about
|
|
||||||
* shared segments addresses locally at each process,
|
|
||||||
* so they are common for different types of segments
|
|
||||||
* and don't have a specific content (namespace's info,
|
|
||||||
* rank's meta info, ranks's data). */
|
|
||||||
|
|
||||||
typedef struct seg_desc_t seg_desc_t;
|
|
||||||
struct seg_desc_t {
|
|
||||||
segment_type type;
|
|
||||||
pmix_sm_seg_t seg_info;
|
|
||||||
uint32_t id;
|
|
||||||
seg_desc_t *next;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
pmix_list_item_t super;
|
|
||||||
char ns_name[PMIX_MAX_NSLEN+1];
|
|
||||||
size_t num_meta_seg;
|
|
||||||
size_t num_data_seg;
|
|
||||||
seg_desc_t *meta_seg;
|
|
||||||
seg_desc_t *data_seg;
|
|
||||||
} ns_track_elem_t;
|
|
||||||
PMIX_CLASS_DECLARATION(ns_track_elem_t);
|
|
||||||
|
|
||||||
extern pmix_dstore_base_module_t pmix_dstore_esh_module;
|
|
||||||
|
|
||||||
END_C_DECLS
|
|
||||||
|
|
||||||
#endif /* PMIX_DSTORE_ESH_H */
|
|
@ -1,15 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 2015-2016 Intel, Inc. All rights reserved.
|
|
||||||
# $COPYRIGHT$
|
|
||||||
#
|
|
||||||
# Additional copyrights may follow
|
|
||||||
#
|
|
||||||
# $HEADER$
|
|
||||||
#
|
|
||||||
|
|
||||||
headers += \
|
|
||||||
src/event/pmix_event.h
|
|
||||||
|
|
||||||
sources += \
|
|
||||||
src/event/pmix_event_registration.c \
|
|
||||||
src/event/pmix_event_notification.c
|
|
16
opal/mca/pmix/pmix2x/pmix/src/event/Makefile.include
Обычный файл
16
opal/mca/pmix/pmix2x/pmix/src/event/Makefile.include
Обычный файл
@ -0,0 +1,16 @@
|
|||||||
|
# -*- makefile -*-
|
||||||
|
#
|
||||||
|
# Copyright (c) 2016 Intel, Inc. All rights reserved.
|
||||||
|
# $COPYRIGHT$
|
||||||
|
#
|
||||||
|
# Additional copyrights may follow
|
||||||
|
#
|
||||||
|
# $HEADER$
|
||||||
|
|
||||||
|
|
||||||
|
headers += \
|
||||||
|
event/pmix_event.h
|
||||||
|
|
||||||
|
sources += \
|
||||||
|
event/pmix_event_notification.c \
|
||||||
|
event/pmix_event_registration.c
|
@ -22,9 +22,9 @@
|
|||||||
#define PMIX_EVENT_H
|
#define PMIX_EVENT_H
|
||||||
|
|
||||||
#include <src/include/pmix_config.h>
|
#include <src/include/pmix_config.h>
|
||||||
#include <pmix/rename.h>
|
#include <src/include/rename.h>
|
||||||
|
|
||||||
#include <pmix/pmix_common.h>
|
#include <pmix_common.h>
|
||||||
#include "src/class/pmix_list.h"
|
#include "src/class/pmix_list.h"
|
||||||
#include "src/util/output.h"
|
#include "src/util/output.h"
|
||||||
|
|
||||||
|
@ -8,11 +8,11 @@
|
|||||||
* $HEADER$
|
* $HEADER$
|
||||||
*/
|
*/
|
||||||
#include <src/include/pmix_config.h>
|
#include <src/include/pmix_config.h>
|
||||||
#include <pmix/rename.h>
|
#include <src/include/rename.h>
|
||||||
|
|
||||||
#include <pmix.h>
|
#include "include/pmix.h"
|
||||||
#include <pmix/pmix_common.h>
|
#include "include/pmix_common.h"
|
||||||
#include <pmix_server.h>
|
#include "include/pmix_server.h"
|
||||||
|
|
||||||
#include "src/util/error.h"
|
#include "src/util/error.h"
|
||||||
#include "src/util/output.h"
|
#include "src/util/output.h"
|
||||||
@ -321,15 +321,22 @@ void pmix_invoke_local_event_hdlr(pmix_event_chain_t *chain)
|
|||||||
pmix_single_event_t *sing;
|
pmix_single_event_t *sing;
|
||||||
pmix_multi_event_t *multi;
|
pmix_multi_event_t *multi;
|
||||||
pmix_default_event_t *def;
|
pmix_default_event_t *def;
|
||||||
|
pmix_status_t rc = PMIX_SUCCESS;
|
||||||
|
|
||||||
|
/* sanity check */
|
||||||
|
if (NULL == chain->info) {
|
||||||
|
/* should never happen as the return object must
|
||||||
|
* at least be there, even if it is NULL */
|
||||||
|
rc = PMIX_ERR_BAD_PARAM;
|
||||||
|
goto complete;
|
||||||
|
}
|
||||||
|
|
||||||
/* check for directives */
|
/* check for directives */
|
||||||
if (NULL != chain->info) {
|
|
||||||
for (i=0; i < chain->ninfo; i++) {
|
for (i=0; i < chain->ninfo; i++) {
|
||||||
if (0 == strncmp(chain->info[i].key, PMIX_EVENT_NON_DEFAULT, PMIX_MAX_KEYLEN)) {
|
if (0 == strncmp(chain->info[i].key, PMIX_EVENT_NON_DEFAULT, PMIX_MAX_KEYLEN)) {
|
||||||
chain->nondefault = true;
|
chain->nondefault = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* cycle thru the single-event registrations first */
|
/* cycle thru the single-event registrations first */
|
||||||
PMIX_LIST_FOREACH(sing, &pmix_globals.events.single_events, pmix_single_event_t) {
|
PMIX_LIST_FOREACH(sing, &pmix_globals.events.single_events, pmix_single_event_t) {
|
||||||
@ -401,7 +408,7 @@ void pmix_invoke_local_event_hdlr(pmix_event_chain_t *chain)
|
|||||||
complete:
|
complete:
|
||||||
/* we still have to call their final callback */
|
/* we still have to call their final callback */
|
||||||
if (NULL != chain->final_cbfunc) {
|
if (NULL != chain->final_cbfunc) {
|
||||||
chain->final_cbfunc(PMIX_SUCCESS, chain->final_cbdata);
|
chain->final_cbfunc(rc, chain->final_cbdata);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -8,10 +8,10 @@
|
|||||||
* $HEADER$
|
* $HEADER$
|
||||||
*/
|
*/
|
||||||
#include <src/include/pmix_config.h>
|
#include <src/include/pmix_config.h>
|
||||||
#include <pmix/rename.h>
|
#include <src/include/rename.h>
|
||||||
|
|
||||||
#include <pmix.h>
|
#include <pmix.h>
|
||||||
#include <pmix/pmix_common.h>
|
#include <pmix_common.h>
|
||||||
#include <pmix_server.h>
|
#include <pmix_server.h>
|
||||||
|
|
||||||
#include "src/util/error.h"
|
#include "src/util/error.h"
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
# -*- makefile -*-
|
||||||
#
|
#
|
||||||
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||||
# University Research and Technology
|
# University Research and Technology
|
||||||
@ -9,9 +10,8 @@
|
|||||||
# University of Stuttgart. All rights reserved.
|
# University of Stuttgart. All rights reserved.
|
||||||
# Copyright (c) 2004-2005 The Regents of the University of California.
|
# Copyright (c) 2004-2005 The Regents of the University of California.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
# Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
|
|
||||||
# Copyright (c) 2013-2016 Intel, Inc. All rights reserved
|
# Copyright (c) 2013-2016 Intel, Inc. All rights reserved
|
||||||
# Copyright (c) 2016 IBM Corporation. All rights reserved.
|
# Copyright (c) 2007-2016 Cisco Systems, Inc. All rights reserved.
|
||||||
# $COPYRIGHT$
|
# $COPYRIGHT$
|
||||||
#
|
#
|
||||||
# Additional copyrights may follow
|
# Additional copyrights may follow
|
||||||
@ -20,22 +20,29 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
# This makefile.am does not stand on its own - it is included from
|
# This makefile.am does not stand on its own - it is included from
|
||||||
# src/Makefile.am
|
# Makefile.am
|
||||||
|
|
||||||
headers += \
|
headers += \
|
||||||
src/include/pmix_globals.h
|
include/pmix_globals.h
|
||||||
|
|
||||||
sources += \
|
sources += \
|
||||||
src/include/pmix_globals.c
|
include/pmix_globals.c
|
||||||
|
|
||||||
if ! PMIX_EMBEDDED_MODE
|
if ! PMIX_EMBEDDED_MODE
|
||||||
headers += \
|
headers += \
|
||||||
src/include/pmix_config.h \
|
include/align.h \
|
||||||
src/include/align.h \
|
include/hash_string.h \
|
||||||
src/include/hash_string.h \
|
include/pmix_socket_errno.h \
|
||||||
src/include/pmix_socket_errno.h \
|
include/pmix_stdint.h \
|
||||||
src/include/prefetch.h \
|
include/prefetch.h \
|
||||||
src/include/types.h
|
include/types.h \
|
||||||
|
include/pmix_config_top.h \
|
||||||
|
include/pmix_config_bottom.h \
|
||||||
|
include/rename.h
|
||||||
|
|
||||||
#noinst_include_private_autogen_HEADERS =
|
|
||||||
endif ! PMIX_EMBEDDED_MODE
|
endif ! PMIX_EMBEDDED_MODE
|
||||||
|
|
||||||
|
if WANT_INSTALL_HEADERS
|
||||||
|
headers += \
|
||||||
|
include/pmix_config.h
|
||||||
|
endif
|
@ -1,18 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2016 Mellanox Technologies, Inc.
|
|
||||||
* All rights reserved.
|
|
||||||
* Copyright (c) 2016 IBM Corporation. All rights reserved.
|
|
||||||
* $COPYRIGHT$
|
|
||||||
*
|
|
||||||
* Additional copyrights may follow
|
|
||||||
*
|
|
||||||
* $HEADER$
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef PMIX_INCLUDE_CONFIG_H
|
|
||||||
#define PMIX_INCLUDE_CONFIG_H
|
|
||||||
|
|
||||||
#include <pmix/autogen/config.h>
|
|
||||||
#include <pmix/rename.h>
|
|
||||||
|
|
||||||
#endif /* PMIX_INCLUDE_CONFIG_H */
|
|
683
opal/mca/pmix/pmix2x/pmix/src/include/pmix_config.h.in
Обычный файл
683
opal/mca/pmix/pmix2x/pmix/src/include/pmix_config.h.in
Обычный файл
@ -0,0 +1,683 @@
|
|||||||
|
/* src/include/pmix_config.h.in. Generated from configure.ac by autoheader. */
|
||||||
|
|
||||||
|
/* -*- c -*-
|
||||||
|
*
|
||||||
|
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
||||||
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||||
|
* 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) 2013-2015 Intel, Inc. All rights reserved
|
||||||
|
* Copyright (c) 2016 IBM Corporation. All rights reserved.
|
||||||
|
* $COPYRIGHT$
|
||||||
|
*
|
||||||
|
* Additional copyrights may follow
|
||||||
|
*
|
||||||
|
* $HEADER$
|
||||||
|
*
|
||||||
|
* This file is automatically generated by configure. Edits will be lost
|
||||||
|
* the next time you run configure!
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef PMIX_CONFIG_H
|
||||||
|
#define PMIX_CONFIG_H
|
||||||
|
|
||||||
|
#include <src/include/pmix_config_top.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Define if building universal (internal helper macro) */
|
||||||
|
#undef AC_APPLE_UNIVERSAL_BUILD
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||||
|
#undef HAVE_ARPA_INET_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `asprintf' function. */
|
||||||
|
#undef HAVE_ASPRINTF
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <crt_externs.h> header file. */
|
||||||
|
#undef HAVE_CRT_EXTERNS_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the declaration of `AF_INET6', and to 0 if you
|
||||||
|
don't. */
|
||||||
|
#undef HAVE_DECL_AF_INET6
|
||||||
|
|
||||||
|
/* Define to 1 if you have the declaration of `AF_UNSPEC', and to 0 if you
|
||||||
|
don't. */
|
||||||
|
#undef HAVE_DECL_AF_UNSPEC
|
||||||
|
|
||||||
|
/* Define to 1 if you have the declaration of `PF_INET6', and to 0 if you
|
||||||
|
don't. */
|
||||||
|
#undef HAVE_DECL_PF_INET6
|
||||||
|
|
||||||
|
/* Define to 1 if you have the declaration of `PF_UNSPEC', and to 0 if you
|
||||||
|
don't. */
|
||||||
|
#undef HAVE_DECL_PF_UNSPEC
|
||||||
|
|
||||||
|
/* Define to 1 if you have the declaration of `__func__', and to 0 if you
|
||||||
|
don't. */
|
||||||
|
#undef HAVE_DECL___FUNC__
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <dirent.h> header file. */
|
||||||
|
#undef HAVE_DIRENT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||||
|
#undef HAVE_DLFCN_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <event.h> header file. */
|
||||||
|
#undef HAVE_EVENT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||||
|
#undef HAVE_FCNTL_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `getpeereid' function. */
|
||||||
|
#undef HAVE_GETPEEREID
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <hostLib.h> header file. */
|
||||||
|
#undef HAVE_HOSTLIB_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <hwloc.h> header file. */
|
||||||
|
#undef HAVE_HWLOC_H
|
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `int16_t'. */
|
||||||
|
#undef HAVE_INT16_T
|
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `int32_t'. */
|
||||||
|
#undef HAVE_INT32_T
|
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `int64_t'. */
|
||||||
|
#undef HAVE_INT64_T
|
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `int8_t'. */
|
||||||
|
#undef HAVE_INT8_T
|
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `intptr_t'. */
|
||||||
|
#undef HAVE_INTPTR_T
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||||
|
#undef HAVE_INTTYPES_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <ioLib.h> header file. */
|
||||||
|
#undef HAVE_IOLIB_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `event' library (-levent). */
|
||||||
|
#undef HAVE_LIBEVENT
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `libevent_global_shutdown' function. */
|
||||||
|
#undef HAVE_LIBEVENT_GLOBAL_SHUTDOWN
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `event_pthreads' library (-levent_pthreads). */
|
||||||
|
#undef HAVE_LIBEVENT_PTHREADS
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <libgen.h> header file. */
|
||||||
|
#undef HAVE_LIBGEN_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <limits.h> header file. */
|
||||||
|
#undef HAVE_LIMITS_H
|
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `long long'. */
|
||||||
|
#undef HAVE_LONG_LONG
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <memory.h> header file. */
|
||||||
|
#undef HAVE_MEMORY_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <munge.h> header file. */
|
||||||
|
#undef HAVE_MUNGE_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||||
|
#undef HAVE_NETINET_IN_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <net/uio.h> header file. */
|
||||||
|
#undef HAVE_NET_UIO_H
|
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `ptrdiff_t'. */
|
||||||
|
#undef HAVE_PTRDIFF_T
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sasl/sasl.h> header file. */
|
||||||
|
#undef HAVE_SASL_SASL_H
|
||||||
|
|
||||||
|
/* Define to 1 if `si_band' is a member of `siginfo_t'. */
|
||||||
|
#undef HAVE_SIGINFO_T_SI_BAND
|
||||||
|
|
||||||
|
/* Define to 1 if `si_fd' is a member of `siginfo_t'. */
|
||||||
|
#undef HAVE_SIGINFO_T_SI_FD
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <signal.h> header file. */
|
||||||
|
#undef HAVE_SIGNAL_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `snprintf' function. */
|
||||||
|
#undef HAVE_SNPRINTF
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `socketpair' function. */
|
||||||
|
#undef HAVE_SOCKETPAIR
|
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `socklen_t'. */
|
||||||
|
#undef HAVE_SOCKLEN_T
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sockLib.h> header file. */
|
||||||
|
#undef HAVE_SOCKLIB_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `statfs' function. */
|
||||||
|
#undef HAVE_STATFS
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `statvfs' function. */
|
||||||
|
#undef HAVE_STATVFS
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdarg.h> header file. */
|
||||||
|
#undef HAVE_STDARG_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdbool.h> header file. */
|
||||||
|
#undef HAVE_STDBOOL_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stddef.h> header file. */
|
||||||
|
#undef HAVE_STDDEF_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdint.h> header file. */
|
||||||
|
#undef HAVE_STDINT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||||
|
#undef HAVE_STDLIB_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <strings.h> header file. */
|
||||||
|
#undef HAVE_STRINGS_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <string.h> header file. */
|
||||||
|
#undef HAVE_STRING_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `strncpy_s' function. */
|
||||||
|
#undef HAVE_STRNCPY_S
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `strnlen' function. */
|
||||||
|
#undef HAVE_STRNLEN
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `strsignal' function. */
|
||||||
|
#undef HAVE_STRSIGNAL
|
||||||
|
|
||||||
|
/* Define to 1 if `d_type' is a member of `struct dirent'. */
|
||||||
|
#undef HAVE_STRUCT_DIRENT_D_TYPE
|
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `struct sockaddr_in'. */
|
||||||
|
#undef HAVE_STRUCT_SOCKADDR_IN
|
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `struct sockaddr_in6'. */
|
||||||
|
#undef HAVE_STRUCT_SOCKADDR_IN6
|
||||||
|
|
||||||
|
/* Define to 1 if `sa_len' is a member of `struct sockaddr'. */
|
||||||
|
#undef HAVE_STRUCT_SOCKADDR_SA_LEN
|
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `struct sockaddr_storage'. */
|
||||||
|
#undef HAVE_STRUCT_SOCKADDR_STORAGE
|
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `struct sockaddr_un'. */
|
||||||
|
#undef HAVE_STRUCT_SOCKADDR_UN
|
||||||
|
|
||||||
|
/* Define to 1 if `uid' is a member of `struct sockpeercred'. */
|
||||||
|
#undef HAVE_STRUCT_SOCKPEERCRED_UID
|
||||||
|
|
||||||
|
/* Define to 1 if `f_fstypename' is a member of `struct statfs'. */
|
||||||
|
#undef HAVE_STRUCT_STATFS_F_FSTYPENAME
|
||||||
|
|
||||||
|
/* Define to 1 if `f_type' is a member of `struct statfs'. */
|
||||||
|
#undef HAVE_STRUCT_STATFS_F_TYPE
|
||||||
|
|
||||||
|
/* Define to 1 if `f_basetype' is a member of `struct statvfs'. */
|
||||||
|
#undef HAVE_STRUCT_STATVFS_F_BASETYPE
|
||||||
|
|
||||||
|
/* Define to 1 if `f_fstypename' is a member of `struct statvfs'. */
|
||||||
|
#undef HAVE_STRUCT_STATVFS_F_FSTYPENAME
|
||||||
|
|
||||||
|
/* Define to 1 if `cr_uid' is a member of `struct ucred'. */
|
||||||
|
#undef HAVE_STRUCT_UCRED_CR_UID
|
||||||
|
|
||||||
|
/* Define to 1 if `uid' is a member of `struct ucred'. */
|
||||||
|
#undef HAVE_STRUCT_UCRED_UID
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <syslog.h> header file. */
|
||||||
|
#undef HAVE_SYSLOG_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||||
|
#undef HAVE_SYS_PARAM_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/select.h> header file. */
|
||||||
|
#undef HAVE_SYS_SELECT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||||
|
#undef HAVE_SYS_SOCKET_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/statfs.h> header file. */
|
||||||
|
#undef HAVE_SYS_STATFS_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/statvfs.h> header file. */
|
||||||
|
#undef HAVE_SYS_STATVFS_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||||
|
#undef HAVE_SYS_STAT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||||
|
#undef HAVE_SYS_TIME_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||||
|
#undef HAVE_SYS_TYPES_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/uio.h> header file. */
|
||||||
|
#undef HAVE_SYS_UIO_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/un.h> header file. */
|
||||||
|
#undef HAVE_SYS_UN_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/wait.h> header file. */
|
||||||
|
#undef HAVE_SYS_WAIT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <time.h> header file. */
|
||||||
|
#undef HAVE_TIME_H
|
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `uint16_t'. */
|
||||||
|
#undef HAVE_UINT16_T
|
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `uint32_t'. */
|
||||||
|
#undef HAVE_UINT32_T
|
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `uint64_t'. */
|
||||||
|
#undef HAVE_UINT64_T
|
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `uint8_t'. */
|
||||||
|
#undef HAVE_UINT8_T
|
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `uintptr_t'. */
|
||||||
|
#undef HAVE_UINTPTR_T
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <unistd.h> header file. */
|
||||||
|
#undef HAVE_UNISTD_H
|
||||||
|
|
||||||
|
/* whether unix byteswap routines -- htonl, htons, nothl, ntohs -- are
|
||||||
|
available */
|
||||||
|
#undef HAVE_UNIX_BYTESWAP
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `usleep' function. */
|
||||||
|
#undef HAVE_USLEEP
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `vasprintf' function. */
|
||||||
|
#undef HAVE_VASPRINTF
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `vsnprintf' function. */
|
||||||
|
#undef HAVE_VSNPRINTF
|
||||||
|
|
||||||
|
/* Define to the sub-directory where libtool stores uninstalled libraries. */
|
||||||
|
#undef LT_OBJDIR
|
||||||
|
|
||||||
|
/* Define to the address where bug reports for this package should be sent. */
|
||||||
|
#undef PACKAGE_BUGREPORT
|
||||||
|
|
||||||
|
/* Define to the full name of this package. */
|
||||||
|
#undef PACKAGE_NAME
|
||||||
|
|
||||||
|
/* Define to the full name and version of this package. */
|
||||||
|
#undef PACKAGE_STRING
|
||||||
|
|
||||||
|
/* Define to the one symbol short name of this package. */
|
||||||
|
#undef PACKAGE_TARNAME
|
||||||
|
|
||||||
|
/* Define to the home page for this package. */
|
||||||
|
#undef PACKAGE_URL
|
||||||
|
|
||||||
|
/* Define to the version of this package. */
|
||||||
|
#undef PACKAGE_VERSION
|
||||||
|
|
||||||
|
/* Alignment of type bool */
|
||||||
|
#undef PMIX_ALIGNMENT_BOOL
|
||||||
|
|
||||||
|
/* Alignment of type char */
|
||||||
|
#undef PMIX_ALIGNMENT_CHAR
|
||||||
|
|
||||||
|
/* Alignment of type double */
|
||||||
|
#undef PMIX_ALIGNMENT_DOUBLE
|
||||||
|
|
||||||
|
/* Alignment of type float */
|
||||||
|
#undef PMIX_ALIGNMENT_FLOAT
|
||||||
|
|
||||||
|
/* Alignment of type int */
|
||||||
|
#undef PMIX_ALIGNMENT_INT
|
||||||
|
|
||||||
|
/* Alignment of type int16_t */
|
||||||
|
#undef PMIX_ALIGNMENT_INT16
|
||||||
|
|
||||||
|
/* Alignment of type int32_t */
|
||||||
|
#undef PMIX_ALIGNMENT_INT32
|
||||||
|
|
||||||
|
/* Alignment of type int64_t */
|
||||||
|
#undef PMIX_ALIGNMENT_INT64
|
||||||
|
|
||||||
|
/* Alignment of type int8_t */
|
||||||
|
#undef PMIX_ALIGNMENT_INT8
|
||||||
|
|
||||||
|
/* Alignment of type long */
|
||||||
|
#undef PMIX_ALIGNMENT_LONG
|
||||||
|
|
||||||
|
/* Alignment of type long double */
|
||||||
|
#undef PMIX_ALIGNMENT_LONG_DOUBLE
|
||||||
|
|
||||||
|
/* Alignment of type long long */
|
||||||
|
#undef PMIX_ALIGNMENT_LONG_LONG
|
||||||
|
|
||||||
|
/* Alignment of type short */
|
||||||
|
#undef PMIX_ALIGNMENT_SHORT
|
||||||
|
|
||||||
|
/* Alignment of type size_t */
|
||||||
|
#undef PMIX_ALIGNMENT_SIZE_T
|
||||||
|
|
||||||
|
/* Alignment of type void * */
|
||||||
|
#undef PMIX_ALIGNMENT_VOID_P
|
||||||
|
|
||||||
|
/* Alignment of type wchar_t */
|
||||||
|
#undef PMIX_ALIGNMENT_WCHAR
|
||||||
|
|
||||||
|
/* The compiler $lower which PMIx was built with */
|
||||||
|
#undef PMIX_BUILD_PLATFORM_COMPILER_FAMILYID
|
||||||
|
|
||||||
|
/* The compiler $lower which PMIX was built with */
|
||||||
|
#undef PMIX_BUILD_PLATFORM_COMPILER_FAMILYNAME
|
||||||
|
|
||||||
|
/* The compiler $lower which PMIx was built with */
|
||||||
|
#undef PMIX_BUILD_PLATFORM_COMPILER_VERSION
|
||||||
|
|
||||||
|
/* The compiler $lower which PMIX was built with */
|
||||||
|
#undef PMIX_BUILD_PLATFORM_COMPILER_VERSION_STR
|
||||||
|
|
||||||
|
/* PMIx underlying C compiler */
|
||||||
|
#undef PMIX_CC
|
||||||
|
|
||||||
|
/* Use static const char[] strings for C files */
|
||||||
|
#undef PMIX_CC_USE_CONST_CHAR_IDENT
|
||||||
|
|
||||||
|
/* Use #ident strings for C files */
|
||||||
|
#undef PMIX_CC_USE_IDENT
|
||||||
|
|
||||||
|
/* Use #pragma comment for C files */
|
||||||
|
#undef PMIX_CC_USE_PRAGMA_COMMENT
|
||||||
|
|
||||||
|
/* Use #pragma ident strings for C files */
|
||||||
|
#undef PMIX_CC_USE_PRAGMA_IDENT
|
||||||
|
|
||||||
|
/* Whether C compiler supports __builtin_clz */
|
||||||
|
#undef PMIX_C_HAVE_BUILTIN_CLZ
|
||||||
|
|
||||||
|
/* Whether C compiler supports __builtin_expect */
|
||||||
|
#undef PMIX_C_HAVE_BUILTIN_EXPECT
|
||||||
|
|
||||||
|
/* Whether C compiler supports __builtin_prefetch */
|
||||||
|
#undef PMIX_C_HAVE_BUILTIN_PREFETCH
|
||||||
|
|
||||||
|
/* Whether C compiler supports symbol visibility or not */
|
||||||
|
#undef PMIX_C_HAVE_VISIBILITY
|
||||||
|
|
||||||
|
/* Whether we are in debugging mode or not */
|
||||||
|
#undef PMIX_ENABLE_DEBUG
|
||||||
|
|
||||||
|
/* Whether we want developer-level timing support or not */
|
||||||
|
#undef PMIX_ENABLE_TIMING
|
||||||
|
|
||||||
|
/* Location of event2/thread.h */
|
||||||
|
#undef PMIX_EVENT2_THREAD_HEADER
|
||||||
|
|
||||||
|
/* Location of event.h */
|
||||||
|
#undef PMIX_EVENT_HEADER
|
||||||
|
|
||||||
|
/* Whether your compiler has __attribute__ or not */
|
||||||
|
#undef PMIX_HAVE_ATTRIBUTE
|
||||||
|
|
||||||
|
/* Whether your compiler has __attribute__ aligned or not */
|
||||||
|
#undef PMIX_HAVE_ATTRIBUTE_ALIGNED
|
||||||
|
|
||||||
|
/* Whether your compiler has __attribute__ always_inline or not */
|
||||||
|
#undef PMIX_HAVE_ATTRIBUTE_ALWAYS_INLINE
|
||||||
|
|
||||||
|
/* Whether your compiler has __attribute__ cold or not */
|
||||||
|
#undef PMIX_HAVE_ATTRIBUTE_COLD
|
||||||
|
|
||||||
|
/* Whether your compiler has __attribute__ const or not */
|
||||||
|
#undef PMIX_HAVE_ATTRIBUTE_CONST
|
||||||
|
|
||||||
|
/* Whether your compiler has __attribute__ deprecated or not */
|
||||||
|
#undef PMIX_HAVE_ATTRIBUTE_DEPRECATED
|
||||||
|
|
||||||
|
/* Whether your compiler has __attribute__ deprecated with optional argument
|
||||||
|
*/
|
||||||
|
#undef PMIX_HAVE_ATTRIBUTE_DEPRECATED_ARGUMENT
|
||||||
|
|
||||||
|
/* Whether your compiler has __attribute__ destructor or not */
|
||||||
|
#undef PMIX_HAVE_ATTRIBUTE_DESTRUCTOR
|
||||||
|
|
||||||
|
/* Whether your compiler has __attribute__ format or not */
|
||||||
|
#undef PMIX_HAVE_ATTRIBUTE_FORMAT
|
||||||
|
|
||||||
|
/* Whether your compiler has __attribute__ format and it works on function
|
||||||
|
pointers */
|
||||||
|
#undef PMIX_HAVE_ATTRIBUTE_FORMAT_FUNCPTR
|
||||||
|
|
||||||
|
/* Whether your compiler has __attribute__ hot or not */
|
||||||
|
#undef PMIX_HAVE_ATTRIBUTE_HOT
|
||||||
|
|
||||||
|
/* Whether your compiler has __attribute__ malloc or not */
|
||||||
|
#undef PMIX_HAVE_ATTRIBUTE_MALLOC
|
||||||
|
|
||||||
|
/* Whether your compiler has __attribute__ may_alias or not */
|
||||||
|
#undef PMIX_HAVE_ATTRIBUTE_MAY_ALIAS
|
||||||
|
|
||||||
|
/* Whether your compiler has __attribute__ nonnull or not */
|
||||||
|
#undef PMIX_HAVE_ATTRIBUTE_NONNULL
|
||||||
|
|
||||||
|
/* Whether your compiler has __attribute__ noreturn or not */
|
||||||
|
#undef PMIX_HAVE_ATTRIBUTE_NORETURN
|
||||||
|
|
||||||
|
/* Whether your compiler has __attribute__ noreturn and it works on function
|
||||||
|
pointers */
|
||||||
|
#undef PMIX_HAVE_ATTRIBUTE_NORETURN_FUNCPTR
|
||||||
|
|
||||||
|
/* Whether your compiler has __attribute__ no_instrument_function or not */
|
||||||
|
#undef PMIX_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION
|
||||||
|
|
||||||
|
/* Whether your compiler has __attribute__ packed or not */
|
||||||
|
#undef PMIX_HAVE_ATTRIBUTE_PACKED
|
||||||
|
|
||||||
|
/* Whether your compiler has __attribute__ pure or not */
|
||||||
|
#undef PMIX_HAVE_ATTRIBUTE_PURE
|
||||||
|
|
||||||
|
/* Whether your compiler has __attribute__ sentinel or not */
|
||||||
|
#undef PMIX_HAVE_ATTRIBUTE_SENTINEL
|
||||||
|
|
||||||
|
/* Whether your compiler has __attribute__ unused or not */
|
||||||
|
#undef PMIX_HAVE_ATTRIBUTE_UNUSED
|
||||||
|
|
||||||
|
/* Whether your compiler has __attribute__ visibility or not */
|
||||||
|
#undef PMIX_HAVE_ATTRIBUTE_VISIBILITY
|
||||||
|
|
||||||
|
/* Whether your compiler has __attribute__ warn unused result or not */
|
||||||
|
#undef PMIX_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT
|
||||||
|
|
||||||
|
/* Whether your compiler has __attribute__ weak alias or not */
|
||||||
|
#undef PMIX_HAVE_ATTRIBUTE_WEAK_ALIAS
|
||||||
|
|
||||||
|
/* whether qsort is broken or not */
|
||||||
|
#undef PMIX_HAVE_BROKEN_QSORT
|
||||||
|
|
||||||
|
/* whether ceil is found and available */
|
||||||
|
#undef PMIX_HAVE_CEIL
|
||||||
|
|
||||||
|
/* whether dirname is found and available */
|
||||||
|
#undef PMIX_HAVE_DIRNAME
|
||||||
|
|
||||||
|
/* Whether we have hwloc support or not */
|
||||||
|
#undef PMIX_HAVE_HWLOC
|
||||||
|
|
||||||
|
/* Whether the PMIX PDL framework is functional or not */
|
||||||
|
#undef PMIX_HAVE_PDL_SUPPORT
|
||||||
|
|
||||||
|
/* Whether we have sasl support or not */
|
||||||
|
#undef PMIX_HAVE_SASL
|
||||||
|
|
||||||
|
/* Whether we have SA_RESTART in <signal.h> or not */
|
||||||
|
#undef PMIX_HAVE_SA_RESTART
|
||||||
|
|
||||||
|
/* whether socket is found and available */
|
||||||
|
#undef PMIX_HAVE_SOCKET
|
||||||
|
|
||||||
|
/* Whether we have __va_copy or not */
|
||||||
|
#undef PMIX_HAVE_UNDERSCORE_VA_COPY
|
||||||
|
|
||||||
|
/* Whether we have va_copy or not */
|
||||||
|
#undef PMIX_HAVE_VA_COPY
|
||||||
|
|
||||||
|
/* Location of hwloc.h */
|
||||||
|
#undef PMIX_HWLOC_HEADER
|
||||||
|
|
||||||
|
/* ident string for PMIX */
|
||||||
|
#undef PMIX_IDENT_STRING
|
||||||
|
|
||||||
|
/* The library major version is always available, contrary to VERSION */
|
||||||
|
#undef PMIX_MAJOR_VERSION
|
||||||
|
|
||||||
|
/* The library minor version is always available, contrary to VERSION */
|
||||||
|
#undef PMIX_MINOR_VERSION
|
||||||
|
|
||||||
|
/* Whether the C compiler supports "bool" without any other help (such as
|
||||||
|
<stdbool.h>) */
|
||||||
|
#undef PMIX_NEED_C_BOOL
|
||||||
|
|
||||||
|
/* Whether libraries can be configured with destructor functions */
|
||||||
|
#undef PMIX_NO_LIB_DESTRUCTOR
|
||||||
|
|
||||||
|
/* type to use for ptrdiff_t */
|
||||||
|
#undef PMIX_PTRDIFF_TYPE
|
||||||
|
|
||||||
|
/* The library release version is always available, contrary to VERSION */
|
||||||
|
#undef PMIX_RELEASE_VERSION
|
||||||
|
|
||||||
|
/* The pmix symbol rename include directive */
|
||||||
|
#undef PMIX_SYMBOL_RENAME
|
||||||
|
|
||||||
|
/* Whether to use <stdbool.h> or not */
|
||||||
|
#undef PMIX_USE_STDBOOL_H
|
||||||
|
|
||||||
|
/* The library version is always available, contrary to VERSION */
|
||||||
|
#undef PMIX_VERSION
|
||||||
|
|
||||||
|
/* Enable per-user config files */
|
||||||
|
#undef PMIX_WANT_HOME_CONFIG_FILES
|
||||||
|
|
||||||
|
/* Whether we want munge support or not */
|
||||||
|
#undef PMIX_WANT_MUNGE
|
||||||
|
|
||||||
|
/* if want pretty-print stack trace feature */
|
||||||
|
#undef PMIX_WANT_PRETTY_PRINT_STACKTRACE
|
||||||
|
|
||||||
|
/* The size of `char', as computed by sizeof. */
|
||||||
|
#undef SIZEOF_CHAR
|
||||||
|
|
||||||
|
/* The size of `double', as computed by sizeof. */
|
||||||
|
#undef SIZEOF_DOUBLE
|
||||||
|
|
||||||
|
/* The size of `float', as computed by sizeof. */
|
||||||
|
#undef SIZEOF_FLOAT
|
||||||
|
|
||||||
|
/* The size of `int', as computed by sizeof. */
|
||||||
|
#undef SIZEOF_INT
|
||||||
|
|
||||||
|
/* The size of `long', as computed by sizeof. */
|
||||||
|
#undef SIZEOF_LONG
|
||||||
|
|
||||||
|
/* The size of `long long', as computed by sizeof. */
|
||||||
|
#undef SIZEOF_LONG_LONG
|
||||||
|
|
||||||
|
/* The size of `pid_t', as computed by sizeof. */
|
||||||
|
#undef SIZEOF_PID_T
|
||||||
|
|
||||||
|
/* The size of `ptrdiff_t', as computed by sizeof. */
|
||||||
|
#undef SIZEOF_PTRDIFF_T
|
||||||
|
|
||||||
|
/* The size of `short', as computed by sizeof. */
|
||||||
|
#undef SIZEOF_SHORT
|
||||||
|
|
||||||
|
/* The size of `size_t', as computed by sizeof. */
|
||||||
|
#undef SIZEOF_SIZE_T
|
||||||
|
|
||||||
|
/* The size of `ssize_t', as computed by sizeof. */
|
||||||
|
#undef SIZEOF_SSIZE_T
|
||||||
|
|
||||||
|
/* The size of `void *', as computed by sizeof. */
|
||||||
|
#undef SIZEOF_VOID_P
|
||||||
|
|
||||||
|
/* The size of `wchar_t', as computed by sizeof. */
|
||||||
|
#undef SIZEOF_WCHAR_T
|
||||||
|
|
||||||
|
/* The size of `_Bool', as computed by sizeof. */
|
||||||
|
#undef SIZEOF__BOOL
|
||||||
|
|
||||||
|
/* Define to 1 if you have the ANSI C header files. */
|
||||||
|
#undef STDC_HEADERS
|
||||||
|
|
||||||
|
/* Enable extensions on AIX 3, Interix. */
|
||||||
|
#ifndef _ALL_SOURCE
|
||||||
|
# undef _ALL_SOURCE
|
||||||
|
#endif
|
||||||
|
/* Enable GNU extensions on systems that have them. */
|
||||||
|
#ifndef _GNU_SOURCE
|
||||||
|
# undef _GNU_SOURCE
|
||||||
|
#endif
|
||||||
|
/* Enable threading extensions on Solaris. */
|
||||||
|
#ifndef _POSIX_PTHREAD_SEMANTICS
|
||||||
|
# undef _POSIX_PTHREAD_SEMANTICS
|
||||||
|
#endif
|
||||||
|
/* Enable extensions on HP NonStop. */
|
||||||
|
#ifndef _TANDEM_SOURCE
|
||||||
|
# undef _TANDEM_SOURCE
|
||||||
|
#endif
|
||||||
|
/* Enable general extensions on Solaris. */
|
||||||
|
#ifndef __EXTENSIONS__
|
||||||
|
# undef __EXTENSIONS__
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
|
||||||
|
significant byte first (like Motorola and SPARC, unlike Intel). */
|
||||||
|
#if defined AC_APPLE_UNIVERSAL_BUILD
|
||||||
|
# if defined __BIG_ENDIAN__
|
||||||
|
# define WORDS_BIGENDIAN 1
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
# ifndef WORDS_BIGENDIAN
|
||||||
|
# undef WORDS_BIGENDIAN
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
|
||||||
|
`char[]'. */
|
||||||
|
#undef YYTEXT_POINTER
|
||||||
|
|
||||||
|
/* Enable GNU extensions on systems that have them. */
|
||||||
|
#ifndef _GNU_SOURCE
|
||||||
|
# undef _GNU_SOURCE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Define to 1 if on MINIX. */
|
||||||
|
#undef _MINIX
|
||||||
|
|
||||||
|
/* Define to 2 if the system does not provide POSIX.1 features except with
|
||||||
|
this defined. */
|
||||||
|
#undef _POSIX_1_SOURCE
|
||||||
|
|
||||||
|
/* Define to 1 if you need to in order for `stat' and other things to work. */
|
||||||
|
#undef _POSIX_SOURCE
|
||||||
|
|
||||||
|
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||||
|
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||||
|
#ifndef __cplusplus
|
||||||
|
#undef inline
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#include <src/include/pmix_config_bottom.h>
|
||||||
|
#endif /* PMIX_CONFIG_H */
|
||||||
|
|
@ -343,26 +343,14 @@
|
|||||||
# define __pmix_attribute_destructor__
|
# define __pmix_attribute_destructor__
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef PMIX_DECLSPEC
|
|
||||||
# define PMIX_DECLSPEC
|
|
||||||
#ifdef PMIX_C_HAVE_VISIBILITY
|
#ifdef PMIX_C_HAVE_VISIBILITY
|
||||||
# if PMIX_C_HAVE_VISIBILITY
|
# if PMIX_C_HAVE_VISIBILITY
|
||||||
# define PMIX_EXPORT __attribute__((__visibility__("default")))
|
|
||||||
# else
|
|
||||||
# define PMIX_EXPORT
|
|
||||||
# endif
|
|
||||||
#else
|
|
||||||
# define PMIX_EXPORT
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef PMIX_DECLSPEC
|
|
||||||
#define PMIX_DECLSPEC
|
|
||||||
# if PMIX_C_HAVE_VISIBILITY
|
|
||||||
# define PMIX_EXPORT __pmix_attribute_visibility__("default")
|
# define PMIX_EXPORT __pmix_attribute_visibility__("default")
|
||||||
# else
|
# else
|
||||||
# define PMIX_EXPORT
|
# define PMIX_EXPORT
|
||||||
# endif
|
# endif
|
||||||
|
#else
|
||||||
|
# define PMIX_EXPORT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -375,10 +363,10 @@
|
|||||||
including stdint.h */
|
including stdint.h */
|
||||||
#define __STDC_LIMIT_MACROS
|
#define __STDC_LIMIT_MACROS
|
||||||
#endif
|
#endif
|
||||||
#include <pmix/autogen/config.h>
|
#include <src/include/pmix_config.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#else
|
#else
|
||||||
#include <pmix/autogen/pmix_stdint.h>
|
#include <src/include/pmix_stdint.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
@ -18,7 +18,7 @@
|
|||||||
#include <src/include/pmix_config.h>
|
#include <src/include/pmix_config.h>
|
||||||
|
|
||||||
#include <src/include/types.h>
|
#include <src/include/types.h>
|
||||||
#include <pmix/autogen/pmix_stdint.h>
|
#include <src/include/pmix_stdint.h>
|
||||||
#include <src/include/pmix_socket_errno.h>
|
#include <src/include/pmix_socket_errno.h>
|
||||||
|
|
||||||
#include "src/include/pmix_globals.h"
|
#include "src/include/pmix_globals.h"
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#include PMIX_EVENT_HEADER
|
#include PMIX_EVENT_HEADER
|
||||||
|
|
||||||
#include <pmix/pmix_common.h>
|
#include <pmix_common.h>
|
||||||
|
|
||||||
#include "src/buffer_ops/types.h"
|
#include "src/buffer_ops/types.h"
|
||||||
#include "src/class/pmix_hash_table.h"
|
#include "src/class/pmix_hash_table.h"
|
||||||
@ -82,6 +82,14 @@ typedef enum {
|
|||||||
PMIX_COLLECT_MAX
|
PMIX_COLLECT_MAX
|
||||||
} pmix_collect_t;
|
} pmix_collect_t;
|
||||||
|
|
||||||
|
/* define a process type */
|
||||||
|
typedef enum {
|
||||||
|
PMIX_PROC_UNDEF,
|
||||||
|
PMIX_PROC_CLIENT,
|
||||||
|
PMIX_PROC_SERVER,
|
||||||
|
PMIX_PROC_TOOL
|
||||||
|
} pmix_proc_type_t;
|
||||||
|
|
||||||
|
|
||||||
/**** MESSAGING STRUCTURES ****/
|
/**** MESSAGING STRUCTURES ****/
|
||||||
/* header for messages */
|
/* header for messages */
|
||||||
|
14
opal/mca/pmix/pmix2x/pmix/src/include/rename.h
Обычный файл
14
opal/mca/pmix/pmix2x/pmix/src/include/rename.h
Обычный файл
@ -0,0 +1,14 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2016 Intel, Inc. All rights reserved
|
||||||
|
* $COPYRIGHT$
|
||||||
|
*
|
||||||
|
* Additional copyrights may follow
|
||||||
|
*
|
||||||
|
* $HEADER$
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef PMIX_RENAME_H
|
||||||
|
#define PMIX_RENAME_H
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -215,7 +215,47 @@ static inline uint64_t pmix_swap_bytes8(uint64_t val)
|
|||||||
#define pmix_swap_bytes8 hton64
|
#define pmix_swap_bytes8 hton64
|
||||||
#endif /* WORDS_BIGENDIAN || !HAVE_UNIX_BYTESWAP */
|
#endif /* WORDS_BIGENDIAN || !HAVE_UNIX_BYTESWAP */
|
||||||
|
|
||||||
|
#define PMIX_EV_TIMEOUT EV_TIMEOUT
|
||||||
|
#define PMIX_EV_READ EV_READ
|
||||||
|
#define PMIX_EV_WRITE EV_WRITE
|
||||||
|
#define PMIX_EV_SIGNAL EV_SIGNAL
|
||||||
|
/* Persistent event: won't get removed automatically when activated. */
|
||||||
|
#define PMIX_EV_PERSIST EV_PERSIST
|
||||||
|
|
||||||
|
#define PMIX_EVLOOP_ONCE EVLOOP_ONCE /**< Block at most once. */
|
||||||
|
#define PMIX_EVLOOP_NONBLOCK EVLOOP_NONBLOCK /**< Do not block. */
|
||||||
|
|
||||||
typedef struct event_base pmix_event_base_t;
|
typedef struct event_base pmix_event_base_t;
|
||||||
typedef struct event pmix_event_t;
|
typedef struct event pmix_event_t;
|
||||||
|
|
||||||
|
#define pmix_event_base_create() event_base_new()
|
||||||
|
|
||||||
|
#define pmix_event_base_free(b) event_base_free(b)
|
||||||
|
|
||||||
|
#define pmix_event_base_loopbreak(b) event_base_loopbreak(b)
|
||||||
|
|
||||||
|
#define pmix_event_base_loopexit(b) event_base_loopexit(b, NULL)
|
||||||
|
|
||||||
|
/* thread support APIs */
|
||||||
|
#define pmix_event_use_threads() evthread_use_pthreads()
|
||||||
|
|
||||||
|
/* Basic event APIs */
|
||||||
|
#define pmix_event_enable_debug_mode() event_enable_debug_mode()
|
||||||
|
|
||||||
|
#define pmix_event_set(b, x, fd, fg, cb, arg) event_assign((x), (b), (fd), (fg), (event_callback_fn) (cb), (arg))
|
||||||
|
|
||||||
|
#define pmix_event_add(ev, tv) event_add((ev), (tv))
|
||||||
|
|
||||||
|
#define pmix_event_del(ev) event_del((ev))
|
||||||
|
|
||||||
|
#define pmix_event_active(x, y, z) event_active((x), (y), (z))
|
||||||
|
|
||||||
|
#define pmix_event_new(b, fd, fg, cb, arg) event_new((b), (fd), (fg), (event_callback_fn) (cb), (arg))
|
||||||
|
|
||||||
|
#define pmix_event_loop(b, fg) event_base_loop((b), (fg))
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBEVENT_GLOBAL_SHUTDOWN
|
||||||
|
#define pmix_libevent_global_shutdown() libevent_global_shutdown()
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* PMIX_TYPES_H */
|
#endif /* PMIX_TYPES_H */
|
||||||
|
26
opal/mca/pmix/pmix2x/pmix/src/mca/Makefile.include
Обычный файл
26
opal/mca/pmix/pmix2x/pmix/src/mca/Makefile.include
Обычный файл
@ -0,0 +1,26 @@
|
|||||||
|
# -*- makefile -*-
|
||||||
|
#
|
||||||
|
# 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) 2016 Intel, Inc. All rights reserved.
|
||||||
|
# Copyright (c) 2016 Cisco Systems, Inc. All rights reserved.
|
||||||
|
# $COPYRIGHT$
|
||||||
|
#
|
||||||
|
# Additional copyrights may follow
|
||||||
|
#
|
||||||
|
# $HEADER$
|
||||||
|
#
|
||||||
|
|
||||||
|
# This makefile.am does not stand on its own - it is included from src/Makefile.am
|
||||||
|
|
||||||
|
# Source code files
|
||||||
|
headers += \
|
||||||
|
mca/mca.h
|
66
opal/mca/pmix/pmix2x/pmix/src/mca/base/Makefile.am
Обычный файл
66
opal/mca/pmix/pmix2x/pmix/src/mca/base/Makefile.am
Обычный файл
@ -0,0 +1,66 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2004-2008 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) 2010-2016 Cisco Systems, Inc. All rights reserved.
|
||||||
|
# $COPYRIGHT$
|
||||||
|
#
|
||||||
|
# Additional copyrights may follow
|
||||||
|
#
|
||||||
|
# $HEADER$
|
||||||
|
#
|
||||||
|
|
||||||
|
# Need this so that the base knows where to load dynamic components from
|
||||||
|
# (by default)
|
||||||
|
|
||||||
|
AM_CPPFLAGS = \
|
||||||
|
$(LTDLINCL)
|
||||||
|
|
||||||
|
noinst_LTLIBRARIES = libpmix_mca_base.la
|
||||||
|
|
||||||
|
dist_pmixdata_DATA = help-mca-base.txt help-mca-var.txt
|
||||||
|
|
||||||
|
# Source code files
|
||||||
|
|
||||||
|
headers = \
|
||||||
|
base.h \
|
||||||
|
pmix_mca_base_component_repository.h \
|
||||||
|
pmix_mca_base_var.h \
|
||||||
|
pmix_mca_base_var_enum.h \
|
||||||
|
pmix_mca_base_var_group.h \
|
||||||
|
pmix_mca_base_vari.h \
|
||||||
|
pmix_mca_base_framework.h
|
||||||
|
|
||||||
|
# Library
|
||||||
|
|
||||||
|
libpmix_mca_base_la_SOURCES = \
|
||||||
|
$(headers) \
|
||||||
|
pmix_mca_base_close.c \
|
||||||
|
pmix_mca_base_component_compare.c \
|
||||||
|
pmix_mca_base_component_find.c \
|
||||||
|
pmix_mca_base_component_repository.c \
|
||||||
|
pmix_mca_base_components_open.c \
|
||||||
|
pmix_mca_base_components_close.c \
|
||||||
|
pmix_mca_base_components_select.c \
|
||||||
|
pmix_mca_base_list.c \
|
||||||
|
pmix_mca_base_open.c \
|
||||||
|
pmix_mca_base_var.c \
|
||||||
|
pmix_mca_base_var_enum.c \
|
||||||
|
pmix_mca_base_var_group.c \
|
||||||
|
pmix_mca_base_parse_paramfile.c \
|
||||||
|
pmix_mca_base_components_register.c \
|
||||||
|
pmix_mca_base_framework.c
|
||||||
|
|
||||||
|
# Conditionally install the header files
|
||||||
|
|
||||||
|
if WANT_INSTALL_HEADERS
|
||||||
|
pmixdir = $(pmixincludedir)/$(subdir)
|
||||||
|
pmix_HEADERS = $(headers)
|
||||||
|
endif
|
246
opal/mca/pmix/pmix2x/pmix/src/mca/base/base.h
Обычный файл
246
opal/mca/pmix/pmix2x/pmix/src/mca/base/base.h
Обычный файл
@ -0,0 +1,246 @@
|
|||||||
|
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2004-2008 The Trustees of Indiana University and Indiana
|
||||||
|
* University Research and Technology
|
||||||
|
* Corporation. All rights reserved.
|
||||||
|
* Copyright (c) 2004-2007 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) 2009 Cisco Systems, Inc. All rights reserved.
|
||||||
|
* Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights
|
||||||
|
* reserved.
|
||||||
|
* Copyright (c) 2015 Research Organization for Information Science
|
||||||
|
* and Technology (RIST). All rights reserved.
|
||||||
|
* Copyright (c) 2016 Intel, Inc. All rights reserved.
|
||||||
|
* $COPYRIGHT$
|
||||||
|
*
|
||||||
|
* Additional copyrights may follow
|
||||||
|
*
|
||||||
|
* $HEADER$
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MCA_BASE_H
|
||||||
|
#define MCA_BASE_H
|
||||||
|
|
||||||
|
#include <src/include/pmix_config.h>
|
||||||
|
|
||||||
|
#include "src/class/pmix_object.h"
|
||||||
|
#include "src/class/pmix_list.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* These units are large enough to warrant their own .h files
|
||||||
|
*/
|
||||||
|
#include "src/mca/mca.h"
|
||||||
|
#include "src/mca/base/pmix_mca_base_var.h"
|
||||||
|
#include "src/mca/base/pmix_mca_base_framework.h"
|
||||||
|
#include "src/util/output.h"
|
||||||
|
|
||||||
|
BEGIN_C_DECLS
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Structure for making plain lists of components
|
||||||
|
*/
|
||||||
|
struct pmix_mca_base_component_list_item_t {
|
||||||
|
pmix_list_item_t super;
|
||||||
|
const pmix_mca_base_component_t *cli_component;
|
||||||
|
};
|
||||||
|
typedef struct pmix_mca_base_component_list_item_t pmix_mca_base_component_list_item_t;
|
||||||
|
PMIX_CLASS_DECLARATION(pmix_mca_base_component_list_item_t);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Structure for making priority lists of components
|
||||||
|
*/
|
||||||
|
struct pmix_mca_base_component_priority_list_item_t {
|
||||||
|
pmix_mca_base_component_list_item_t super;
|
||||||
|
int cpli_priority;
|
||||||
|
};
|
||||||
|
typedef struct pmix_mca_base_component_priority_list_item_t
|
||||||
|
pmix_mca_base_component_priority_list_item_t;
|
||||||
|
|
||||||
|
PMIX_CLASS_DECLARATION(pmix_mca_base_component_priority_list_item_t);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Public variables
|
||||||
|
*/
|
||||||
|
extern char *pmix_mca_base_component_path;
|
||||||
|
extern bool pmix_mca_base_component_show_load_errors;
|
||||||
|
extern bool pmix_mca_base_component_disable_dlopen;
|
||||||
|
extern char *pmix_mca_base_system_default_path;
|
||||||
|
extern char *pmix_mca_base_user_default_path;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Standard verbosity levels
|
||||||
|
*/
|
||||||
|
enum {
|
||||||
|
/** total silence */
|
||||||
|
PMIX_MCA_BASE_VERBOSE_NONE = -1,
|
||||||
|
/** only errors are printed */
|
||||||
|
PMIX_MCA_BASE_VERBOSE_ERROR = 0,
|
||||||
|
/** emit messages about component selection, open, and unloading */
|
||||||
|
PMIX_MCA_BASE_VERBOSE_COMPONENT = 10,
|
||||||
|
/** also emit warnings */
|
||||||
|
PMIX_MCA_BASE_VERBOSE_WARN = 20,
|
||||||
|
/** also emit general, user-relevant information, such as rationale as to why certain choices
|
||||||
|
* or code paths were taken, information gleaned from probing the local system, etc. */
|
||||||
|
PMIX_MCA_BASE_VERBOSE_INFO = 40,
|
||||||
|
/** also emit relevant tracing information (e.g., which functions were invoked /
|
||||||
|
* call stack entry/exit info) */
|
||||||
|
PMIX_MCA_BASE_VERBOSE_TRACE = 60,
|
||||||
|
/** also emit PMIX-developer-level (i.e,. highly detailed) information */
|
||||||
|
PMIX_MCA_BASE_VERBOSE_DEBUG = 80,
|
||||||
|
/** also output anything else that might be useful */
|
||||||
|
PMIX_MCA_BASE_VERBOSE_MAX = 100,
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Public functions
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* First function called in the MCA.
|
||||||
|
*
|
||||||
|
* @return PMIX_SUCCESS Upon success
|
||||||
|
* @return PMIX_ERROR Upon failure
|
||||||
|
*
|
||||||
|
* This function starts up the entire MCA. It initializes a bunch
|
||||||
|
* of built-in MCA parameters, and initialized the MCA component
|
||||||
|
* repository.
|
||||||
|
*
|
||||||
|
* It must be the first MCA function invoked. It is normally
|
||||||
|
* invoked during the initialization stage and specifically
|
||||||
|
* invoked in the special case of the *_info command.
|
||||||
|
*/
|
||||||
|
int pmix_mca_base_open(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Last function called in the MCA
|
||||||
|
*
|
||||||
|
* @return PMIX_SUCCESS Upon success
|
||||||
|
* @return PMIX_ERROR Upon failure
|
||||||
|
*
|
||||||
|
* This function closes down the entire MCA. It clears all MCA
|
||||||
|
* parameters and closes down the MCA component respository.
|
||||||
|
*
|
||||||
|
* It must be the last MCA function invoked. It is normally invoked
|
||||||
|
* during the finalize stage.
|
||||||
|
*/
|
||||||
|
int pmix_mca_base_close(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A generic select function
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
int pmix_mca_base_select(const char *type_name, int output_id,
|
||||||
|
pmix_list_t *components_available,
|
||||||
|
pmix_mca_base_module_t **best_module,
|
||||||
|
pmix_mca_base_component_t **best_component,
|
||||||
|
int *priority_out);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A function for component query functions to discover if they have
|
||||||
|
* been explicitly required to or requested to be selected.
|
||||||
|
*
|
||||||
|
* exclusive: If the specified component is the only component that is
|
||||||
|
* available for selection.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
int pmix_mca_base_is_component_required(pmix_list_t *components_available,
|
||||||
|
pmix_mca_base_component_t *component,
|
||||||
|
bool exclusive,
|
||||||
|
bool *is_required);
|
||||||
|
|
||||||
|
/* pmix_mca_base_component_compare.c */
|
||||||
|
|
||||||
|
int pmix_mca_base_component_compare_priority(pmix_mca_base_component_priority_list_item_t *a,
|
||||||
|
pmix_mca_base_component_priority_list_item_t *b);
|
||||||
|
int pmix_mca_base_component_compare(const pmix_mca_base_component_t *a,
|
||||||
|
const pmix_mca_base_component_t *b);
|
||||||
|
int pmix_mca_base_component_compatible(const pmix_mca_base_component_t *a,
|
||||||
|
const pmix_mca_base_component_t *b);
|
||||||
|
char * pmix_mca_base_component_to_string(const pmix_mca_base_component_t *a);
|
||||||
|
|
||||||
|
/* pmix_mca_base_component_find.c */
|
||||||
|
|
||||||
|
int pmix_mca_base_component_find (const char *directory, pmix_mca_base_framework_t *framework,
|
||||||
|
bool ignore_requested, bool open_dso_components);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parse the requested component string and return an pmix_argv of the requested
|
||||||
|
* (or not requested) components.
|
||||||
|
*/
|
||||||
|
int pmix_mca_base_component_parse_requested (const char *requested, bool *include_mode,
|
||||||
|
char ***requested_component_names);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter a list of components based on a comma-delimted list of names and/or
|
||||||
|
* a set of meta-data flags.
|
||||||
|
*
|
||||||
|
* @param[in,out] components List of components to filter
|
||||||
|
* @param[in] output_id Output id to write to for error/warning/debug messages
|
||||||
|
* @param[in] filter_names Comma delimited list of components to use. Negate with ^.
|
||||||
|
* May be NULL.
|
||||||
|
* @param[in] filter_flags Metadata flags components are required to have set (CR ready)
|
||||||
|
*
|
||||||
|
* @returns PMIX_SUCCESS On success
|
||||||
|
* @returns PMIX_ERR_NOT_FOUND If some component in {filter_names} is not found in
|
||||||
|
* {components}. Does not apply to negated filters.
|
||||||
|
* @returns pmix error code On other error.
|
||||||
|
*
|
||||||
|
* This function closes and releases any components that do not match the filter_name and
|
||||||
|
* filter flags.
|
||||||
|
*/
|
||||||
|
int pmix_mca_base_components_filter (pmix_mca_base_framework_t *framework, uint32_t filter_flags);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Safely release some memory allocated by pmix_mca_base_component_find()
|
||||||
|
(i.e., is safe to call even if you never called
|
||||||
|
pmix_mca_base_component_find()). */
|
||||||
|
int pmix_mca_base_component_find_finalize(void);
|
||||||
|
|
||||||
|
/* pmix_mca_base_components_register.c */
|
||||||
|
int pmix_mca_base_framework_components_register (struct pmix_mca_base_framework_t *framework,
|
||||||
|
pmix_mca_base_register_flag_t flags);
|
||||||
|
|
||||||
|
/* pmix_mca_base_components_open.c */
|
||||||
|
int pmix_mca_base_framework_components_open (struct pmix_mca_base_framework_t *framework,
|
||||||
|
pmix_mca_base_open_flag_t flags);
|
||||||
|
|
||||||
|
int pmix_mca_base_components_open(const char *type_name, int output_id,
|
||||||
|
const pmix_mca_base_component_t **static_components,
|
||||||
|
pmix_list_t *components_available,
|
||||||
|
bool open_dso_components);
|
||||||
|
|
||||||
|
/* pmix_mca_base_components_close.c */
|
||||||
|
/**
|
||||||
|
* Close and release a component.
|
||||||
|
*
|
||||||
|
* @param[in] component Component to close
|
||||||
|
* @param[in] output_id Output id for debugging output
|
||||||
|
*
|
||||||
|
* After calling this function the component may no longer be used.
|
||||||
|
*/
|
||||||
|
void pmix_mca_base_component_close (const pmix_mca_base_component_t *component, int output_id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Release a component without closing it.
|
||||||
|
* @param[in] component Component to close
|
||||||
|
* @param[in] output_id Output id for debugging output
|
||||||
|
*
|
||||||
|
* After calling this function the component may no longer be used.
|
||||||
|
*/
|
||||||
|
void pmix_mca_base_component_unload (const pmix_mca_base_component_t *component, int output_id);
|
||||||
|
|
||||||
|
int pmix_mca_base_components_close(int output_id, pmix_list_t *components_available,
|
||||||
|
const pmix_mca_base_component_t *skip);
|
||||||
|
|
||||||
|
int pmix_mca_base_framework_components_close (struct pmix_mca_base_framework_t *framework,
|
||||||
|
const pmix_mca_base_component_t *skip);
|
||||||
|
|
||||||
|
END_C_DECLS
|
||||||
|
|
||||||
|
#endif /* MCA_BASE_H */
|
61
opal/mca/pmix/pmix2x/pmix/src/mca/base/help-mca-base.txt
Обычный файл
61
opal/mca/pmix/pmix2x/pmix/src/mca/base/help-mca-base.txt
Обычный файл
@ -0,0 +1,61 @@
|
|||||||
|
# -*- text -*-
|
||||||
|
#
|
||||||
|
# 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) 2008-2014 Cisco Systems, Inc. All rights reserved.
|
||||||
|
# $COPYRIGHT$
|
||||||
|
#
|
||||||
|
# Additional copyrights may follow
|
||||||
|
#
|
||||||
|
# $HEADER$
|
||||||
|
#
|
||||||
|
# This is the US/English help file for PMIX MCA error messages.
|
||||||
|
#
|
||||||
|
[find-available:not-valid]
|
||||||
|
A requested component was not found, or was unable to be opened. This
|
||||||
|
means that this component is either not installed or is unable to be
|
||||||
|
used on your system (e.g., sometimes this means that shared libraries
|
||||||
|
that the component requires are unable to be found/loaded). Note that
|
||||||
|
PMIX stopped checking at the first component that it did not find.
|
||||||
|
|
||||||
|
Host: %s
|
||||||
|
Framework: %s
|
||||||
|
Component: %s
|
||||||
|
#
|
||||||
|
[find-available:none found]
|
||||||
|
No components were able to be opened in the %s framework.
|
||||||
|
|
||||||
|
This typically means that either no components of this type were
|
||||||
|
installed, or none of the installed componnets can be loaded.
|
||||||
|
Sometimes this means that shared libraries required by these
|
||||||
|
components are unable to be found/loaded.
|
||||||
|
|
||||||
|
Host: %s
|
||||||
|
Framework: %s
|
||||||
|
#
|
||||||
|
[framework-param:too-many-negates]
|
||||||
|
MCA framework parameters can only take a single negation operator
|
||||||
|
("^"), and it must be at the beginning of the value. The following
|
||||||
|
value violates this rule:
|
||||||
|
|
||||||
|
%s
|
||||||
|
|
||||||
|
When used, the negation operator sets the "exclusive" behavior mode,
|
||||||
|
meaning that it will exclude all specified components (and implicitly
|
||||||
|
include all others). If the negation operator is not specified, the
|
||||||
|
"inclusive" mode is assumed, meaning that all specified components
|
||||||
|
will be included (and implicitly exclude all others).
|
||||||
|
|
||||||
|
For example, "^a,b" specifies the exclusive behavior and means "use
|
||||||
|
all components *except* a and b", while "c,d" specifies the inclusive
|
||||||
|
behavior and means "use *only* components c and d."
|
||||||
|
|
||||||
|
You cannot mix inclusive and exclusive behavior.
|
139
opal/mca/pmix/pmix2x/pmix/src/mca/base/help-mca-var.txt
Обычный файл
139
opal/mca/pmix/pmix2x/pmix/src/mca/base/help-mca-var.txt
Обычный файл
@ -0,0 +1,139 @@
|
|||||||
|
# -*- text -*-
|
||||||
|
#
|
||||||
|
# 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) 2008-2011 Cisco Systems, Inc. All rights reserved.
|
||||||
|
# Copyright (c) 2013 Los Alamos National Security, LLC. All rights
|
||||||
|
# reserved.
|
||||||
|
# $COPYRIGHT$
|
||||||
|
#
|
||||||
|
# Additional copyrights may follow
|
||||||
|
#
|
||||||
|
# $HEADER$
|
||||||
|
#
|
||||||
|
# This is the US/English help file for PMIX MCA error messages.
|
||||||
|
#
|
||||||
|
[invalid-flag-combination]
|
||||||
|
ERROR: An invalid combination of flags was passed to pmix_mca_base_var_register.
|
||||||
|
|
||||||
|
Variable: %s
|
||||||
|
Flags: %s %s
|
||||||
|
#
|
||||||
|
[default-only-param-set]
|
||||||
|
WARNING: A user-supplied value attempted to override the default-only MCA
|
||||||
|
variable named "%s".
|
||||||
|
|
||||||
|
The user-supplied value was ignored.
|
||||||
|
#
|
||||||
|
[missing-param-file]
|
||||||
|
Process %d Unable to locate the variable file "%s" in the following search path:
|
||||||
|
%s
|
||||||
|
#
|
||||||
|
[deprecated-mca-env]
|
||||||
|
A deprecated MCA variable value was specified in the environment or
|
||||||
|
on the command line. Deprecated MCA variables should be avoided;
|
||||||
|
they may disappear in future releases.
|
||||||
|
|
||||||
|
Deprecated variable: %s
|
||||||
|
New variable: %s
|
||||||
|
#
|
||||||
|
[deprecated-mca-cli]
|
||||||
|
A deprecated MCA variable value was specified on the command line. Deprecated
|
||||||
|
MCA variables should be avoided; they may disappear in future releases.
|
||||||
|
|
||||||
|
Deprecated variable: %s
|
||||||
|
New variable: %s
|
||||||
|
#
|
||||||
|
[deprecated-mca-file]
|
||||||
|
A deprecated MCA variable value was specified in an MCA variable
|
||||||
|
file. Deprecated MCA variables should be avoided; they may disappear
|
||||||
|
in future releases.
|
||||||
|
|
||||||
|
Deprecated variable: %s
|
||||||
|
Source file: %s
|
||||||
|
New variable: %s
|
||||||
|
#
|
||||||
|
[mutually-exclusive-vars]
|
||||||
|
Two mutually-exclusive MCA variables were specified. This can result
|
||||||
|
in undefined behavior, such as ignoring the components that the MCA
|
||||||
|
variables are supposed to affect.
|
||||||
|
|
||||||
|
1st MCA variable: %s
|
||||||
|
Source of value: %s
|
||||||
|
2nd MCA variable: %s
|
||||||
|
Source of value: %s
|
||||||
|
#
|
||||||
|
[re-register-with-different-type]
|
||||||
|
An MCA variable was re-registered with a different type (i.e., it was
|
||||||
|
either originally registered as an INT and re-registered as a STRING,
|
||||||
|
or it was originially registered as a STRING and re-registered as an
|
||||||
|
INT). This a developer error; your job may abort.
|
||||||
|
|
||||||
|
MCA variable name: %s
|
||||||
|
#
|
||||||
|
[var-name-conflict]
|
||||||
|
A name collision was detected on an MCA variable name. This can happen
|
||||||
|
if two components try to register the same variable with slightly
|
||||||
|
different name components. The conflicting variables are listed below:
|
||||||
|
|
||||||
|
MCA variable name: %s
|
||||||
|
New name: %s %s %s
|
||||||
|
Existing name: %s %s %s
|
||||||
|
#
|
||||||
|
[overridden-param-set]
|
||||||
|
WARNING: A user-supplied value attempted to set a variable that is set
|
||||||
|
in the override variable file (pmix-mca-params-override.conf).
|
||||||
|
|
||||||
|
Variable: %s
|
||||||
|
|
||||||
|
The user-supplied value was ignored.
|
||||||
|
#
|
||||||
|
[invalid-value]
|
||||||
|
An invalid value was supplied for an MCA variable.
|
||||||
|
|
||||||
|
Variable : %s
|
||||||
|
Value : %s
|
||||||
|
#
|
||||||
|
[invalid-value-enum]
|
||||||
|
An invalid value was supplied for an enum variable.
|
||||||
|
|
||||||
|
Variable : %s
|
||||||
|
Value : %s
|
||||||
|
Valid values : %s
|
||||||
|
#
|
||||||
|
[environment-only-param]
|
||||||
|
WARNING: The special MCA parameter "%s" was set in
|
||||||
|
an unexpected way, and is likely not working the way you want it to.
|
||||||
|
|
||||||
|
Specifically, this MCA parameter is "special" in that it can *only* be
|
||||||
|
set in the environment. Setting this value in a file -- and sometimes
|
||||||
|
even on the command line -- will not work as intended. The *only* way
|
||||||
|
to set this value is to set "PMIX_MCA_%s" in the environment before
|
||||||
|
starting your job.
|
||||||
|
|
||||||
|
Value: %s
|
||||||
|
Source: %s
|
||||||
|
#
|
||||||
|
[incorrect-env-list-param]
|
||||||
|
WARNING: The format of "pmix_mca_base_env_list" parameter is a delimited list of VAR=VAL or
|
||||||
|
VAR instances. By default, the delimiter is a semicolon: VAR1=VAL1;VAR2;VAR3=VAL3;...
|
||||||
|
You can set other via "pmix_mca_base_env_list_delimiter" parameter. If the delimiter is a
|
||||||
|
semicolon, the value of "pmix_mca_base_env_list" variable should be quoted to not interfere
|
||||||
|
with SHELL command line parsing. In the case where a value is not assigned to variable
|
||||||
|
VAR, the value will be taken from the current environment.
|
||||||
|
The following environment variable was not found in the environment:
|
||||||
|
Variable: %s
|
||||||
|
MCA variable value: %s
|
||||||
|
#
|
||||||
|
[incorrect-env-list-sep]
|
||||||
|
An invalid value was supplied for an MCA variable "pmix_mca_base_env_list_delimiter".
|
||||||
|
The "pmix_mca_base_env_list" variable will be ignored.
|
||||||
|
Value: %s
|
68
opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_close.c
Обычный файл
68
opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_close.c
Обычный файл
@ -0,0 +1,68 @@
|
|||||||
|
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
||||||
|
/*
|
||||||
|
* 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) 2009 Cisco Systems, Inc. All rights reserved.
|
||||||
|
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
|
||||||
|
* reserved.
|
||||||
|
* Copyright (c) 2016 Intel, Inc. All rights reserved.
|
||||||
|
* $COPYRIGHT$
|
||||||
|
*
|
||||||
|
* Additional copyrights may follow
|
||||||
|
*
|
||||||
|
* $HEADER$
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <src/include/pmix_config.h>
|
||||||
|
|
||||||
|
#include "src/util/output.h"
|
||||||
|
#include "src/mca/mca.h"
|
||||||
|
#include "src/mca/base/base.h"
|
||||||
|
#include "src/mca/base/pmix_mca_base_component_repository.h"
|
||||||
|
#include "pmix_common.h"
|
||||||
|
|
||||||
|
extern int pmix_mca_base_opened;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Main MCA shutdown.
|
||||||
|
*/
|
||||||
|
int pmix_mca_base_close(void)
|
||||||
|
{
|
||||||
|
assert (pmix_mca_base_opened);
|
||||||
|
if (!--pmix_mca_base_opened) {
|
||||||
|
/* deregister all MCA base parameters */
|
||||||
|
int group_id = pmix_mca_base_var_group_find ("pmix", "mca", "base");
|
||||||
|
|
||||||
|
if (-1 < group_id) {
|
||||||
|
pmix_mca_base_var_group_deregister (group_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* release the default paths */
|
||||||
|
if (NULL != pmix_mca_base_system_default_path) {
|
||||||
|
free(pmix_mca_base_system_default_path);
|
||||||
|
}
|
||||||
|
if (NULL != pmix_mca_base_user_default_path) {
|
||||||
|
free(pmix_mca_base_user_default_path);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Close down the component repository */
|
||||||
|
pmix_mca_base_component_repository_finalize();
|
||||||
|
|
||||||
|
/* Shut down the dynamic component finder */
|
||||||
|
pmix_mca_base_component_find_finalize();
|
||||||
|
|
||||||
|
/* Close pmix output stream 0 */
|
||||||
|
pmix_output_close(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* All done */
|
||||||
|
return PMIX_SUCCESS;
|
||||||
|
}
|
@ -0,0 +1,152 @@
|
|||||||
|
/*
|
||||||
|
* 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) 2016 Intel, Inc. All rights reserved
|
||||||
|
* $COPYRIGHT$
|
||||||
|
*
|
||||||
|
* Additional copyrights may follow
|
||||||
|
*
|
||||||
|
* $HEADER$
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <src/include/pmix_config.h>
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "src/mca/mca.h"
|
||||||
|
#include "src/mca/base/base.h"
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Function for comparing two pmix_mca_base_component_priority_t structs so
|
||||||
|
* that we can build prioritized listss of them. This assumed that
|
||||||
|
* the types of the modules are the same. Sort first by priority,
|
||||||
|
* second by module name, third by module version.
|
||||||
|
*
|
||||||
|
* Note that we acutally want a *reverse* ordering here -- the al_*
|
||||||
|
* functions will put "smaller" items at the head, and "larger" items
|
||||||
|
* at the tail. Since we want the highest priority at the head, it
|
||||||
|
* may help the gentle reader to consider this an inverse comparison.
|
||||||
|
* :-)
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
pmix_mca_base_component_compare_priority(pmix_mca_base_component_priority_list_item_t *a,
|
||||||
|
pmix_mca_base_component_priority_list_item_t *b)
|
||||||
|
{
|
||||||
|
/* First, compare the priorties */
|
||||||
|
|
||||||
|
if (a->cpli_priority > b->cpli_priority) {
|
||||||
|
return -1;
|
||||||
|
} else if (a->cpli_priority < b->cpli_priority) {
|
||||||
|
return 1;
|
||||||
|
} else {
|
||||||
|
return pmix_mca_base_component_compare(a->super.cli_component,
|
||||||
|
b->super.cli_component);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int pmix_mca_base_component_compare(const pmix_mca_base_component_t* aa,
|
||||||
|
const pmix_mca_base_component_t* bb)
|
||||||
|
{
|
||||||
|
int val;
|
||||||
|
|
||||||
|
val = strncmp(aa->pmix_mca_type_name, bb->pmix_mca_type_name,
|
||||||
|
PMIX_MCA_BASE_MAX_TYPE_NAME_LEN);
|
||||||
|
if (val != 0) {
|
||||||
|
return -val;
|
||||||
|
}
|
||||||
|
|
||||||
|
val = strncmp(aa->pmix_mca_component_name, bb->pmix_mca_component_name,
|
||||||
|
PMIX_MCA_BASE_MAX_COMPONENT_NAME_LEN);
|
||||||
|
if (val != 0) {
|
||||||
|
return -val;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The names were equal, so compare the versions */
|
||||||
|
|
||||||
|
if (aa->pmix_mca_component_major_version >
|
||||||
|
bb->pmix_mca_component_major_version) {
|
||||||
|
return -1;
|
||||||
|
} else if (aa->pmix_mca_component_major_version <
|
||||||
|
bb->pmix_mca_component_major_version) {
|
||||||
|
return 1;
|
||||||
|
} else if (aa->pmix_mca_component_minor_version >
|
||||||
|
bb->pmix_mca_component_minor_version) {
|
||||||
|
return -1;
|
||||||
|
} else if (aa->pmix_mca_component_minor_version <
|
||||||
|
bb->pmix_mca_component_minor_version) {
|
||||||
|
return 1;
|
||||||
|
} else if (aa->pmix_mca_component_release_version >
|
||||||
|
bb->pmix_mca_component_release_version) {
|
||||||
|
return -1;
|
||||||
|
} else if (aa->pmix_mca_component_release_version <
|
||||||
|
bb->pmix_mca_component_release_version) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* compare but exclude the release version - declare compatible
|
||||||
|
* if the major/minor version are the same.
|
||||||
|
*/
|
||||||
|
int pmix_mca_base_component_compatible(const pmix_mca_base_component_t* aa,
|
||||||
|
const pmix_mca_base_component_t* bb)
|
||||||
|
{
|
||||||
|
int val;
|
||||||
|
|
||||||
|
val = strncmp(aa->pmix_mca_type_name, bb->pmix_mca_type_name,
|
||||||
|
PMIX_MCA_BASE_MAX_TYPE_NAME_LEN);
|
||||||
|
if (val != 0) {
|
||||||
|
return -val;
|
||||||
|
}
|
||||||
|
|
||||||
|
val = strncmp(aa->pmix_mca_component_name, bb->pmix_mca_component_name,
|
||||||
|
PMIX_MCA_BASE_MAX_COMPONENT_NAME_LEN);
|
||||||
|
if (val != 0) {
|
||||||
|
return -val;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The names were equal, so compare the versions */
|
||||||
|
|
||||||
|
if (aa->pmix_mca_component_major_version >
|
||||||
|
bb->pmix_mca_component_major_version) {
|
||||||
|
return -1;
|
||||||
|
} else if (aa->pmix_mca_component_major_version <
|
||||||
|
bb->pmix_mca_component_major_version) {
|
||||||
|
return 1;
|
||||||
|
} else if (aa->pmix_mca_component_minor_version >
|
||||||
|
bb->pmix_mca_component_minor_version) {
|
||||||
|
return -1;
|
||||||
|
} else if (aa->pmix_mca_component_minor_version <
|
||||||
|
bb->pmix_mca_component_minor_version) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a string which represents the component name and version.
|
||||||
|
* Has the form: comp_type.comp_name.major_version.minor_version
|
||||||
|
*/
|
||||||
|
char * pmix_mca_base_component_to_string(const pmix_mca_base_component_t *a) {
|
||||||
|
char * str = NULL;
|
||||||
|
if(0 > asprintf(&str, "%s.%s.%d.%d", a->pmix_mca_type_name,
|
||||||
|
a->pmix_mca_component_name, a->pmix_mca_component_major_version,
|
||||||
|
a->pmix_mca_component_minor_version)) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,389 @@
|
|||||||
|
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||||
|
* University Research and Technology
|
||||||
|
* Corporation. All rights reserved.
|
||||||
|
* Copyright (c) 2004-2007 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) 2008-2015 Cisco Systems, Inc. All rights reserved.
|
||||||
|
* Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
|
||||||
|
* Copyright (c) 2015 Research Organization for Information Science
|
||||||
|
* and Technology (RIST). All rights reserved.
|
||||||
|
* Copyright (c) 2014-2015 Los Alamos National Security, LLC. All rights
|
||||||
|
* reserved.
|
||||||
|
* Copyright (c) 2016 Intel, Inc. All rights reserved.
|
||||||
|
* $COPYRIGHT$
|
||||||
|
*
|
||||||
|
* Additional copyrights may follow
|
||||||
|
*
|
||||||
|
* $HEADER$
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <src/include/pmix_config.h>
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
|
#include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_STAT_H
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_PARAM_H
|
||||||
|
#include <sys/param.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_NETDB_H
|
||||||
|
#include <netdb.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "src/mca/pinstalldirs/pinstalldirs.h"
|
||||||
|
#include "src/util/pmix_environ.h"
|
||||||
|
#include "src/util/output.h"
|
||||||
|
#include "src/util/argv.h"
|
||||||
|
#include "src/util/show_help.h"
|
||||||
|
#include "src/class/pmix_list.h"
|
||||||
|
#include "src/mca/mca.h"
|
||||||
|
#include "src/mca/base/base.h"
|
||||||
|
#include "src/mca/base/pmix_mca_base_component_repository.h"
|
||||||
|
#include "pmix_common.h"
|
||||||
|
#include "src/mca/pdl/base/base.h"
|
||||||
|
|
||||||
|
#if PMIX_HAVE_PDL_SUPPORT
|
||||||
|
/*
|
||||||
|
* Private functions
|
||||||
|
*/
|
||||||
|
static void find_dyn_components(const char *path, pmix_mca_base_framework_t *framework,
|
||||||
|
const char **names, bool include_mode);
|
||||||
|
|
||||||
|
#endif /* PMIX_HAVE_PDL_SUPPORT */
|
||||||
|
|
||||||
|
static int component_find_check (pmix_mca_base_framework_t *framework, char **requested_component_names);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Dummy structure for casting for open_only logic
|
||||||
|
*/
|
||||||
|
struct pmix_mca_base_open_only_dummy_component_t {
|
||||||
|
/** MCA base component */
|
||||||
|
pmix_mca_base_component_t version;
|
||||||
|
/** MCA base data */
|
||||||
|
pmix_mca_base_component_data_t data;
|
||||||
|
};
|
||||||
|
typedef struct pmix_mca_base_open_only_dummy_component_t pmix_mca_base_open_only_dummy_component_t;
|
||||||
|
|
||||||
|
static char negate[] = "^";
|
||||||
|
|
||||||
|
static bool use_component(const bool include_mode,
|
||||||
|
const char **requested_component_names,
|
||||||
|
const char *component_name);
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Function to find as many components of a given type as possible. This
|
||||||
|
* includes statically-linked in components as well as opening up a
|
||||||
|
* directory and looking for shared-library MCA components of the
|
||||||
|
* appropriate type (load them if available).
|
||||||
|
*
|
||||||
|
* Return one consolidated array of (pmix_mca_base_component_t*) pointing to all
|
||||||
|
* available components.
|
||||||
|
*/
|
||||||
|
int pmix_mca_base_component_find (const char *directory, pmix_mca_base_framework_t *framework,
|
||||||
|
bool ignore_requested, bool open_dso_components)
|
||||||
|
{
|
||||||
|
const pmix_mca_base_component_t **static_components = framework->framework_static_components;
|
||||||
|
char **requested_component_names = NULL;
|
||||||
|
pmix_mca_base_component_list_item_t *cli;
|
||||||
|
bool include_mode = true;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
pmix_output_verbose (PMIX_MCA_BASE_VERBOSE_COMPONENT, framework->framework_output,
|
||||||
|
"mca: base: component_find: searching %s for %s components",
|
||||||
|
directory, framework->framework_name);
|
||||||
|
|
||||||
|
if (!ignore_requested) {
|
||||||
|
ret = pmix_mca_base_component_parse_requested (framework->framework_selection, &include_mode,
|
||||||
|
&requested_component_names);
|
||||||
|
if (PMIX_SUCCESS != ret) {
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Find all the components that were statically linked in */
|
||||||
|
if (static_components) {
|
||||||
|
for (int i = 0 ; NULL != static_components[i]; ++i) {
|
||||||
|
if ( use_component(include_mode,
|
||||||
|
(const char**)requested_component_names,
|
||||||
|
static_components[i]->pmix_mca_component_name) ) {
|
||||||
|
cli = PMIX_NEW(pmix_mca_base_component_list_item_t);
|
||||||
|
if (NULL == cli) {
|
||||||
|
ret = PMIX_ERR_OUT_OF_RESOURCE;
|
||||||
|
goto component_find_out;
|
||||||
|
}
|
||||||
|
cli->cli_component = static_components[i];
|
||||||
|
pmix_list_append(&framework->framework_components, (pmix_list_item_t *) cli);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#if PMIX_HAVE_PDL_SUPPORT
|
||||||
|
/* Find any available dynamic components in the specified directory */
|
||||||
|
if (open_dso_components && !pmix_mca_base_component_disable_dlopen) {
|
||||||
|
find_dyn_components(directory, framework, (const char**)requested_component_names,
|
||||||
|
include_mode);
|
||||||
|
} else {
|
||||||
|
pmix_output_verbose (PMIX_MCA_BASE_VERBOSE_INFO, 0,
|
||||||
|
"pmix:mca: base: component_find: dso loading for %s MCA components disabled",
|
||||||
|
framework->framework_name);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (include_mode) {
|
||||||
|
ret = component_find_check (framework, requested_component_names);
|
||||||
|
} else {
|
||||||
|
ret = PMIX_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
component_find_out:
|
||||||
|
|
||||||
|
if (NULL != requested_component_names) {
|
||||||
|
pmix_argv_free(requested_component_names);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* All done */
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
int pmix_mca_base_component_find_finalize(void)
|
||||||
|
{
|
||||||
|
return PMIX_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
int pmix_mca_base_components_filter (pmix_mca_base_framework_t *framework, uint32_t filter_flags)
|
||||||
|
{
|
||||||
|
pmix_list_t *components = &framework->framework_components;
|
||||||
|
int output_id = framework->framework_output;
|
||||||
|
pmix_mca_base_component_list_item_t *cli, *next;
|
||||||
|
char **requested_component_names = NULL;
|
||||||
|
bool include_mode, can_use;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
assert (NULL != components);
|
||||||
|
|
||||||
|
if (0 == filter_flags && NULL == framework->framework_selection) {
|
||||||
|
return PMIX_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = pmix_mca_base_component_parse_requested (framework->framework_selection, &include_mode,
|
||||||
|
&requested_component_names);
|
||||||
|
if (PMIX_SUCCESS != ret) {
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
PMIX_LIST_FOREACH_SAFE(cli, next, components, pmix_mca_base_component_list_item_t) {
|
||||||
|
const pmix_mca_base_component_t *component = cli->cli_component;
|
||||||
|
pmix_mca_base_open_only_dummy_component_t *dummy =
|
||||||
|
(pmix_mca_base_open_only_dummy_component_t *) cli->cli_component;
|
||||||
|
|
||||||
|
can_use = use_component(include_mode, (const char **) requested_component_names,
|
||||||
|
cli->cli_component->pmix_mca_component_name);
|
||||||
|
|
||||||
|
if (!can_use || (filter_flags & dummy->data.param_field) != filter_flags) {
|
||||||
|
if (can_use && (filter_flags & PMIX_MCA_BASE_METADATA_PARAM_CHECKPOINT) &&
|
||||||
|
!(PMIX_MCA_BASE_METADATA_PARAM_CHECKPOINT & dummy->data.param_field)) {
|
||||||
|
pmix_output_verbose(PMIX_MCA_BASE_VERBOSE_COMPONENT, output_id,
|
||||||
|
"pmix:mca: base: components_filter: "
|
||||||
|
"(%s) Component %s is *NOT* Checkpointable - Disabled",
|
||||||
|
component->reserved,
|
||||||
|
component->pmix_mca_component_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
pmix_list_remove_item(components, &cli->super);
|
||||||
|
|
||||||
|
pmix_mca_base_component_unload(component, output_id);
|
||||||
|
|
||||||
|
PMIX_RELEASE(cli);
|
||||||
|
} else if (filter_flags & PMIX_MCA_BASE_METADATA_PARAM_CHECKPOINT) {
|
||||||
|
pmix_output_verbose(PMIX_MCA_BASE_VERBOSE_COMPONENT, output_id,
|
||||||
|
"pmix:mca: base: components_filter: "
|
||||||
|
"(%s) Component %s is Checkpointable",
|
||||||
|
component->reserved,
|
||||||
|
component->pmix_mca_component_name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (include_mode) {
|
||||||
|
ret = component_find_check(framework, requested_component_names);
|
||||||
|
} else {
|
||||||
|
ret = PMIX_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (NULL != requested_component_names) {
|
||||||
|
pmix_argv_free(requested_component_names);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if PMIX_HAVE_PDL_SUPPORT
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Open up all directories in a given path and search for components of
|
||||||
|
* the specified type (and possibly of a given name).
|
||||||
|
*
|
||||||
|
* Note that we use our own path iteration functionality because we
|
||||||
|
* need to look at companion .ompi_info files in the same directory as
|
||||||
|
* the library to generate dependencies, etc.
|
||||||
|
*/
|
||||||
|
static void find_dyn_components(const char *path, pmix_mca_base_framework_t *framework,
|
||||||
|
const char **names, bool include_mode)
|
||||||
|
{
|
||||||
|
pmix_mca_base_component_repository_item_t *ri;
|
||||||
|
pmix_list_t *dy_components;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
pmix_output_verbose (PMIX_MCA_BASE_VERBOSE_COMPONENT, framework->framework_output,
|
||||||
|
"mca: base: find_dyn_components: checking %s for %s components",
|
||||||
|
path, framework->framework_name);
|
||||||
|
|
||||||
|
if (NULL != path) {
|
||||||
|
ret = pmix_mca_base_component_repository_add(path);
|
||||||
|
if (PMIX_SUCCESS != ret) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = pmix_mca_base_component_repository_get_components(framework, &dy_components);
|
||||||
|
if (PMIX_SUCCESS != ret) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Iterate through the repository and find components that can be included */
|
||||||
|
PMIX_LIST_FOREACH(ri, dy_components, pmix_mca_base_component_repository_item_t) {
|
||||||
|
if (use_component(include_mode, names, ri->ri_name)) {
|
||||||
|
pmix_mca_base_component_repository_open(framework, ri);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* PMIX_HAVE_PDL_SUPPORT */
|
||||||
|
|
||||||
|
static bool use_component(const bool include_mode,
|
||||||
|
const char **requested_component_names,
|
||||||
|
const char *component_name)
|
||||||
|
{
|
||||||
|
bool found = false;
|
||||||
|
const char **req_comp_name = requested_component_names;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If no selection is specified then we use all components
|
||||||
|
* we can find.
|
||||||
|
*/
|
||||||
|
if (NULL == req_comp_name) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
while ( *req_comp_name != NULL ) {
|
||||||
|
if ( strcmp(component_name, *req_comp_name) == 0 ) {
|
||||||
|
found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
req_comp_name++;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* include_mode found | use
|
||||||
|
* --------------------+------
|
||||||
|
* 0 0 | true
|
||||||
|
* 0 1 | false
|
||||||
|
* 1 0 | false
|
||||||
|
* 1 1 | true
|
||||||
|
*
|
||||||
|
* -> inverted xor
|
||||||
|
* As xor is a binary operator let's implement it manually before
|
||||||
|
* a compiler screws it up.
|
||||||
|
*/
|
||||||
|
|
||||||
|
return (include_mode && found) || !(include_mode || found);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Ensure that *all* requested components exist. Print a warning
|
||||||
|
and abort if they do not. */
|
||||||
|
static int component_find_check (pmix_mca_base_framework_t *framework, char **requested_component_names)
|
||||||
|
{
|
||||||
|
pmix_list_t *components = &framework->framework_components;
|
||||||
|
pmix_mca_base_component_list_item_t *cli;
|
||||||
|
|
||||||
|
if (NULL == requested_component_names) {
|
||||||
|
return PMIX_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; NULL != requested_component_names[i]; ++i) {
|
||||||
|
bool found = false;
|
||||||
|
|
||||||
|
PMIX_LIST_FOREACH(cli, components, pmix_mca_base_component_list_item_t) {
|
||||||
|
if (0 == strcmp(requested_component_names[i],
|
||||||
|
cli->cli_component->pmix_mca_component_name)) {
|
||||||
|
found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!found) {
|
||||||
|
char h[MAXHOSTNAMELEN];
|
||||||
|
gethostname(h, sizeof(h));
|
||||||
|
pmix_show_help("help-mca-base.txt",
|
||||||
|
"find-available:not-valid", true,
|
||||||
|
h, framework->framework_name, requested_component_names[i]);
|
||||||
|
return PMIX_ERR_NOT_FOUND;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return PMIX_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
int pmix_mca_base_component_parse_requested (const char *requested, bool *include_mode,
|
||||||
|
char ***requested_component_names)
|
||||||
|
{
|
||||||
|
const char *requested_orig = requested;
|
||||||
|
|
||||||
|
*requested_component_names = NULL;
|
||||||
|
*include_mode = true;
|
||||||
|
|
||||||
|
/* See if the user requested anything */
|
||||||
|
if (NULL == requested || 0 == strlen (requested)) {
|
||||||
|
return PMIX_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Are we including or excluding? We only allow the negate
|
||||||
|
character to be the *first* character of the value (but be nice
|
||||||
|
and allow any number of negate characters in the beginning). */
|
||||||
|
*include_mode = requested[0] != negate[0];
|
||||||
|
|
||||||
|
/* skip over all negate symbols at the beginning */
|
||||||
|
requested += strspn (requested, negate);
|
||||||
|
|
||||||
|
/* Double check to ensure that the user did not specify the negate
|
||||||
|
character anywhere else in the value. */
|
||||||
|
if (NULL != strstr (requested, negate)) {
|
||||||
|
pmix_show_help("help-mca-base.txt",
|
||||||
|
"framework-param:too-many-negates",
|
||||||
|
true, requested_orig);
|
||||||
|
return PMIX_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Split up the value into individual component names */
|
||||||
|
*requested_component_names = pmix_argv_split(requested, ',');
|
||||||
|
|
||||||
|
/* All done */
|
||||||
|
return PMIX_SUCCESS;
|
||||||
|
}
|
@ -0,0 +1,572 @@
|
|||||||
|
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
||||||
|
/*
|
||||||
|
* 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) 2008-2015 Cisco Systems, Inc. All rights reserved.
|
||||||
|
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
|
||||||
|
* reserved.
|
||||||
|
* Copyright (c) 2015 Research Organization for Information Science
|
||||||
|
* and Technology (RIST). All rights reserved.
|
||||||
|
* Copyright (c) 2016 Intel, Inc. All rights reserved.
|
||||||
|
* $COPYRIGHT$
|
||||||
|
*
|
||||||
|
* Additional copyrights may follow
|
||||||
|
*
|
||||||
|
* $HEADER$
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include <src/include/pmix_config.h>
|
||||||
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
|
#include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "src/class/pmix_list.h"
|
||||||
|
#include "src/mca/mca.h"
|
||||||
|
#include "src/mca/base/base.h"
|
||||||
|
#include "src/mca/base/pmix_mca_base_component_repository.h"
|
||||||
|
#include "src/mca/pdl/base/base.h"
|
||||||
|
#include "pmix_common.h"
|
||||||
|
#include "src/class/pmix_hash_table.h"
|
||||||
|
#include "src/util/basename.h"
|
||||||
|
|
||||||
|
#if PMIX_HAVE_PDL_SUPPORT
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Private types
|
||||||
|
*/
|
||||||
|
static void ri_constructor(pmix_mca_base_component_repository_item_t *ri);
|
||||||
|
static void ri_destructor(pmix_mca_base_component_repository_item_t *ri);
|
||||||
|
PMIX_CLASS_INSTANCE(pmix_mca_base_component_repository_item_t, pmix_list_item_t,
|
||||||
|
ri_constructor, ri_destructor);
|
||||||
|
|
||||||
|
#endif /* PMIX_HAVE_PDL_SUPPORT */
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Private variables
|
||||||
|
*/
|
||||||
|
static bool initialized = false;
|
||||||
|
|
||||||
|
|
||||||
|
#if PMIX_HAVE_PDL_SUPPORT
|
||||||
|
|
||||||
|
static pmix_hash_table_t pmix_mca_base_component_repository;
|
||||||
|
|
||||||
|
/* two-level macro for stringifying a number */
|
||||||
|
#define STRINGIFYX(x) #x
|
||||||
|
#define STRINGIFY(x) STRINGIFYX(x)
|
||||||
|
|
||||||
|
static int process_repository_item (const char *filename, void *data)
|
||||||
|
{
|
||||||
|
char name[PMIX_MCA_BASE_MAX_COMPONENT_NAME_LEN + 1];
|
||||||
|
char type[PMIX_MCA_BASE_MAX_TYPE_NAME_LEN + 1];
|
||||||
|
pmix_mca_base_component_repository_item_t *ri;
|
||||||
|
pmix_list_t *component_list;
|
||||||
|
char *base;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
base = pmix_basename (filename);
|
||||||
|
if (NULL == base) {
|
||||||
|
return PMIX_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* check if the plugin has the appropriate prefix */
|
||||||
|
if (0 != strncmp (base, "mca_", 4)) {
|
||||||
|
free (base);
|
||||||
|
return PMIX_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* read framework and component names. framework names may not include an _
|
||||||
|
* but component names may */
|
||||||
|
ret = sscanf(base, "mca_%" STRINGIFY(PMIX_MCA_BASE_MAX_TYPE_NAME_LEN) "[^_]_%"
|
||||||
|
STRINGIFY(PMIX_MCA_BASE_MAX_COMPONENT_NAME_LEN) "s", type, name);
|
||||||
|
if (0 > ret) {
|
||||||
|
/* does not patch the expected template. skip */
|
||||||
|
free(base);
|
||||||
|
return PMIX_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* lookup the associated framework list and create if it doesn't already exist */
|
||||||
|
ret = pmix_hash_table_get_value_ptr(&pmix_mca_base_component_repository, type,
|
||||||
|
strlen (type), (void **) &component_list);
|
||||||
|
if (PMIX_SUCCESS != ret) {
|
||||||
|
component_list = PMIX_NEW(pmix_list_t);
|
||||||
|
if (NULL == component_list) {
|
||||||
|
free (base);
|
||||||
|
/* OOM. nothing to do but fail */
|
||||||
|
return PMIX_ERR_OUT_OF_RESOURCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = pmix_hash_table_set_value_ptr(&pmix_mca_base_component_repository, type,
|
||||||
|
strlen (type), (void *) component_list);
|
||||||
|
if (PMIX_SUCCESS != ret) {
|
||||||
|
free (base);
|
||||||
|
PMIX_RELEASE(component_list);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* check for duplicate components */
|
||||||
|
PMIX_LIST_FOREACH(ri, component_list, pmix_mca_base_component_repository_item_t) {
|
||||||
|
if (0 == strcmp (ri->ri_name, name)) {
|
||||||
|
/* already scanned this component */
|
||||||
|
free (base);
|
||||||
|
return PMIX_SUCCESS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ri = PMIX_NEW(pmix_mca_base_component_repository_item_t);
|
||||||
|
if (NULL == ri) {
|
||||||
|
free (base);
|
||||||
|
return PMIX_ERR_OUT_OF_RESOURCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
ri->ri_base = base;
|
||||||
|
|
||||||
|
ri->ri_path = strdup (filename);
|
||||||
|
if (NULL == ri->ri_path) {
|
||||||
|
PMIX_RELEASE(ri);
|
||||||
|
return PMIX_ERR_OUT_OF_RESOURCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* strncpy does not guarantee a \0 */
|
||||||
|
ri->ri_type[PMIX_MCA_BASE_MAX_TYPE_NAME_LEN] = '\0';
|
||||||
|
strncpy (ri->ri_type, type, PMIX_MCA_BASE_MAX_TYPE_NAME_LEN);
|
||||||
|
|
||||||
|
ri->ri_name[PMIX_MCA_BASE_MAX_TYPE_NAME_LEN] = '\0';
|
||||||
|
strncpy (ri->ri_name, name, PMIX_MCA_BASE_MAX_COMPONENT_NAME_LEN);
|
||||||
|
|
||||||
|
pmix_list_append (component_list, &ri->super);
|
||||||
|
|
||||||
|
return PMIX_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int file_exists(const char *filename, const char *ext)
|
||||||
|
{
|
||||||
|
char *final;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
if (NULL == ext) {
|
||||||
|
return access (filename, F_OK) == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = asprintf(&final, "%s.%s", filename, ext);
|
||||||
|
if (0 > ret || NULL == final) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = access (final, F_OK);
|
||||||
|
free(final);
|
||||||
|
return (0 == ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* PMIX_HAVE_PDL_SUPPORT */
|
||||||
|
|
||||||
|
int pmix_mca_base_component_repository_add (const char *path)
|
||||||
|
{
|
||||||
|
#if PMIX_HAVE_PDL_SUPPORT
|
||||||
|
char *path_to_use = NULL, *dir, *ctx;
|
||||||
|
const char sep[] = {PMIX_ENV_SEP, '\0'};
|
||||||
|
|
||||||
|
if (NULL == path) {
|
||||||
|
/* nothing to do */
|
||||||
|
return PMIX_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
path_to_use = strdup (path);
|
||||||
|
|
||||||
|
dir = strtok_r (path_to_use, sep, &ctx);
|
||||||
|
do {
|
||||||
|
if ((0 == strcmp(dir, "USER_DEFAULT") || 0 == strcmp(dir, "USR_DEFAULT"))
|
||||||
|
&& NULL != pmix_mca_base_user_default_path) {
|
||||||
|
dir = pmix_mca_base_user_default_path;
|
||||||
|
} else if (0 == strcmp(dir, "SYS_DEFAULT") ||
|
||||||
|
0 == strcmp(dir, "SYSTEM_DEFAULT")) {
|
||||||
|
dir = pmix_mca_base_system_default_path;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (0 != pmix_pdl_foreachfile(dir, process_repository_item, NULL)) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} while (NULL != (dir = strtok_r (NULL, sep, &ctx)));
|
||||||
|
|
||||||
|
free (path_to_use);
|
||||||
|
|
||||||
|
#endif /* PMIX_HAVE_PDL_SUPPORT */
|
||||||
|
|
||||||
|
return PMIX_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Initialize the repository
|
||||||
|
*/
|
||||||
|
int pmix_mca_base_component_repository_init(void)
|
||||||
|
{
|
||||||
|
/* Setup internal structures */
|
||||||
|
|
||||||
|
if (!initialized) {
|
||||||
|
#if PMIX_HAVE_PDL_SUPPORT
|
||||||
|
|
||||||
|
/* Initialize the dl framework */
|
||||||
|
int ret = pmix_mca_base_framework_open(&pmix_pdl_base_framework, 0);
|
||||||
|
if (PMIX_SUCCESS != ret) {
|
||||||
|
pmix_output(0, "%s %d:%s failed -- process will likely abort (open the dl framework returned %d instead of PMIX_SUCCESS)\n",
|
||||||
|
__FILE__, __LINE__, __func__, ret);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
pmix_pdl_base_select();
|
||||||
|
|
||||||
|
PMIX_CONSTRUCT(&pmix_mca_base_component_repository, pmix_hash_table_t);
|
||||||
|
ret = pmix_hash_table_init (&pmix_mca_base_component_repository, 128);
|
||||||
|
if (PMIX_SUCCESS != ret) {
|
||||||
|
(void) pmix_mca_base_framework_close(&pmix_pdl_base_framework);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = pmix_mca_base_component_repository_add(pmix_mca_base_component_path);
|
||||||
|
if (PMIX_SUCCESS != ret) {
|
||||||
|
PMIX_DESTRUCT(&pmix_mca_base_component_repository);
|
||||||
|
(void) pmix_mca_base_framework_close(&pmix_pdl_base_framework);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
initialized = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* All done */
|
||||||
|
|
||||||
|
return PMIX_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
int pmix_mca_base_component_repository_get_components (pmix_mca_base_framework_t *framework,
|
||||||
|
pmix_list_t **framework_components)
|
||||||
|
{
|
||||||
|
*framework_components = NULL;
|
||||||
|
#if PMIX_HAVE_PDL_SUPPORT
|
||||||
|
return pmix_hash_table_get_value_ptr (&pmix_mca_base_component_repository, framework->framework_name,
|
||||||
|
strlen (framework->framework_name), (void **) framework_components);
|
||||||
|
#endif
|
||||||
|
return PMIX_ERR_NOT_FOUND;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if PMIX_HAVE_PDL_SUPPORT
|
||||||
|
static void pmix_mca_base_component_repository_release_internal(pmix_mca_base_component_repository_item_t *ri) {
|
||||||
|
int group_id;
|
||||||
|
|
||||||
|
group_id = pmix_mca_base_var_group_find (NULL, ri->ri_type, ri->ri_name);
|
||||||
|
if (0 <= group_id) {
|
||||||
|
/* ensure all variables are deregistered before we dlclose the component */
|
||||||
|
pmix_mca_base_var_group_deregister (group_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Close the component (and potentially unload it from memory */
|
||||||
|
if (ri->ri_dlhandle) {
|
||||||
|
pmix_pdl_close(ri->ri_dlhandle);
|
||||||
|
ri->ri_dlhandle = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if PMIX_HAVE_PDL_SUPPORT
|
||||||
|
static pmix_mca_base_component_repository_item_t *find_component(const char *type, const char *name)
|
||||||
|
{
|
||||||
|
pmix_mca_base_component_repository_item_t *ri;
|
||||||
|
pmix_list_t *component_list;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
ret = pmix_hash_table_get_value_ptr (&pmix_mca_base_component_repository, type,
|
||||||
|
strlen (type), (void **) &component_list);
|
||||||
|
if (PMIX_SUCCESS != ret) {
|
||||||
|
/* component does not exist in the repository */
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
PMIX_LIST_FOREACH(ri, component_list, pmix_mca_base_component_repository_item_t) {
|
||||||
|
if (0 == strcmp (ri->ri_name, name)) {
|
||||||
|
return ri;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void pmix_mca_base_component_repository_release(const pmix_mca_base_component_t *component)
|
||||||
|
{
|
||||||
|
#if PMIX_HAVE_PDL_SUPPORT
|
||||||
|
pmix_mca_base_component_repository_item_t *ri;
|
||||||
|
|
||||||
|
ri = find_component (component->pmix_mca_type_name, component->pmix_mca_component_name);
|
||||||
|
if (NULL != ri && !(--ri->ri_refcnt)) {
|
||||||
|
pmix_mca_base_component_repository_release_internal (ri);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
int pmix_mca_base_component_repository_retain_component(const char *type, const char *name)
|
||||||
|
{
|
||||||
|
#if PMIX_HAVE_PDL_SUPPORT
|
||||||
|
pmix_mca_base_component_repository_item_t *ri = find_component(type, name);
|
||||||
|
|
||||||
|
if (NULL != ri) {
|
||||||
|
++ri->ri_refcnt;
|
||||||
|
return PMIX_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
return PMIX_ERR_NOT_FOUND;
|
||||||
|
#else
|
||||||
|
return PMIX_ERR_NOT_SUPPORTED;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
int pmix_mca_base_component_repository_open(pmix_mca_base_framework_t *framework,
|
||||||
|
pmix_mca_base_component_repository_item_t *ri)
|
||||||
|
{
|
||||||
|
#if PMIX_HAVE_PDL_SUPPORT
|
||||||
|
pmix_mca_base_component_t *component_struct;
|
||||||
|
pmix_mca_base_component_list_item_t *mitem = NULL;
|
||||||
|
char *struct_name = NULL;
|
||||||
|
int vl, ret;
|
||||||
|
|
||||||
|
pmix_output_verbose(PMIX_MCA_BASE_VERBOSE_INFO, 0, "pmix_mca_base_component_repository_open: examining dynamic "
|
||||||
|
"%s MCA component \"%s\" at path %s", ri->ri_type, ri->ri_name, ri->ri_path);
|
||||||
|
|
||||||
|
vl = pmix_mca_base_component_show_load_errors ? PMIX_MCA_BASE_VERBOSE_ERROR : PMIX_MCA_BASE_VERBOSE_INFO;
|
||||||
|
|
||||||
|
/* Ensure that this component is not already loaded (should only happen
|
||||||
|
if it was statically loaded). It's an error if it's already
|
||||||
|
loaded because we're evaluating this file -- not this component.
|
||||||
|
Hence, returning PMIX_ERR_PARAM indicates that the *file* failed
|
||||||
|
to load, not the component. */
|
||||||
|
|
||||||
|
PMIX_LIST_FOREACH(mitem, &framework->framework_components, pmix_mca_base_component_list_item_t) {
|
||||||
|
if (0 == strcmp(mitem->cli_component->pmix_mca_component_name, ri->ri_name)) {
|
||||||
|
pmix_output_verbose (PMIX_MCA_BASE_VERBOSE_INFO, 0, "pmix_mca_base_component_repository_open: already loaded (ignored)");
|
||||||
|
return PMIX_ERR_BAD_PARAM;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* silence coverity issue (invalid free) */
|
||||||
|
mitem = NULL;
|
||||||
|
|
||||||
|
if (NULL != ri->ri_dlhandle) {
|
||||||
|
pmix_output_verbose (PMIX_MCA_BASE_VERBOSE_INFO, 0, "pmix_mca_base_component_repository_open: already loaded. returning cached component");
|
||||||
|
mitem = PMIX_NEW(pmix_mca_base_component_list_item_t);
|
||||||
|
if (NULL == mitem) {
|
||||||
|
return PMIX_ERR_OUT_OF_RESOURCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
mitem->cli_component = ri->ri_component_struct;
|
||||||
|
pmix_list_append (&framework->framework_components, &mitem->super);
|
||||||
|
|
||||||
|
return PMIX_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (0 != strcmp (ri->ri_type, framework->framework_name)) {
|
||||||
|
/* shouldn't happen. attempting to open a component belonging to
|
||||||
|
* another framework. if this happens it is likely a MCA base
|
||||||
|
* bug so assert */
|
||||||
|
assert (0);
|
||||||
|
return PMIX_ERR_NOT_SUPPORTED;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Now try to load the component */
|
||||||
|
|
||||||
|
char *err_msg = NULL;
|
||||||
|
if (PMIX_SUCCESS != pmix_pdl_open(ri->ri_path, true, false, &ri->ri_dlhandle, &err_msg)) {
|
||||||
|
if (NULL == err_msg) {
|
||||||
|
err_msg = "pmix_dl_open() error message was NULL!";
|
||||||
|
}
|
||||||
|
/* Because libltdl erroneously says "file not found" for any
|
||||||
|
type of error -- which is especially misleading when the file
|
||||||
|
is actually there but cannot be opened for some other reason
|
||||||
|
(e.g., missing symbol) -- do some simple huersitics and if
|
||||||
|
the file [probably] does exist, print a slightly better error
|
||||||
|
message. */
|
||||||
|
if (0 == strcasecmp("file not found", err_msg) &&
|
||||||
|
(file_exists(ri->ri_path, "lo") ||
|
||||||
|
file_exists(ri->ri_path, "so") ||
|
||||||
|
file_exists(ri->ri_path, "dylib") ||
|
||||||
|
file_exists(ri->ri_path, "dll"))) {
|
||||||
|
err_msg = "perhaps a missing symbol, or compiled for a different version of Open MPI?";
|
||||||
|
}
|
||||||
|
pmix_output_verbose(vl, 0, "pmix_mca_base_component_repository_open: unable to open %s: %s (ignored)",
|
||||||
|
ri->ri_base, err_msg);
|
||||||
|
return PMIX_ERR_BAD_PARAM;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Successfully opened the component; now find the public struct.
|
||||||
|
Malloc out enough space for it. */
|
||||||
|
|
||||||
|
do {
|
||||||
|
ret = asprintf (&struct_name, "mca_%s_%s_component", ri->ri_type, ri->ri_name);
|
||||||
|
if (0 > ret) {
|
||||||
|
ret = PMIX_ERR_OUT_OF_RESOURCE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
mitem = PMIX_NEW(pmix_mca_base_component_list_item_t);
|
||||||
|
if (NULL == mitem) {
|
||||||
|
ret = PMIX_ERR_OUT_OF_RESOURCE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
err_msg = NULL;
|
||||||
|
ret = pmix_pdl_lookup(ri->ri_dlhandle, struct_name, (void**) &component_struct, &err_msg);
|
||||||
|
if (PMIX_SUCCESS != ret || NULL == component_struct) {
|
||||||
|
if (NULL == err_msg) {
|
||||||
|
err_msg = "pmix_dl_loookup() error message was NULL!";
|
||||||
|
}
|
||||||
|
pmix_output_verbose(vl, 0, "pmix_mca_base_component_repository_open: \"%s\" does not appear to be a valid "
|
||||||
|
"%s MCA dynamic component (ignored): %s. ret %d", ri->ri_base, ri->ri_type, err_msg, ret);
|
||||||
|
|
||||||
|
ret = PMIX_ERR_BAD_PARAM;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* done with the structure name */
|
||||||
|
free (struct_name);
|
||||||
|
struct_name = NULL;
|
||||||
|
|
||||||
|
/* We found the public struct. Make sure its MCA major.minor
|
||||||
|
version is the same as ours. TODO -- add checks for project version (from framework) */
|
||||||
|
if (!(PMIX_MCA_BASE_VERSION_MAJOR == component_struct->pmix_mca_major_version &&
|
||||||
|
PMIX_MCA_BASE_VERSION_MINOR == component_struct->pmix_mca_minor_version)) {
|
||||||
|
pmix_output_verbose(vl, 0, "pmix_mca_base_component_repository_open: %s \"%s\" uses an MCA interface that is "
|
||||||
|
"not recognized (component MCA v%d.%d.%d != supported MCA v%d.%d.%d) -- ignored",
|
||||||
|
ri->ri_type, ri->ri_path, component_struct->pmix_mca_major_version,
|
||||||
|
component_struct->pmix_mca_minor_version, component_struct->pmix_mca_release_version,
|
||||||
|
PMIX_MCA_BASE_VERSION_MAJOR, PMIX_MCA_BASE_VERSION_MINOR, PMIX_MCA_BASE_VERSION_RELEASE);
|
||||||
|
ret = PMIX_ERR_BAD_PARAM;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Also check that the component struct framework and component
|
||||||
|
names match the expected names from the filename */
|
||||||
|
if (0 != strcmp(component_struct->pmix_mca_type_name, ri->ri_type) ||
|
||||||
|
0 != strcmp(component_struct->pmix_mca_component_name, ri->ri_name)) {
|
||||||
|
pmix_output_verbose(vl, 0, "Component file data does not match filename: %s (%s / %s) != %s %s -- ignored",
|
||||||
|
ri->ri_path, ri->ri_type, ri->ri_name,
|
||||||
|
component_struct->pmix_mca_type_name,
|
||||||
|
component_struct->pmix_mca_component_name);
|
||||||
|
ret = PMIX_ERR_BAD_PARAM;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Alles gut. Save the component struct, and register this
|
||||||
|
component to be closed later. */
|
||||||
|
|
||||||
|
ri->ri_component_struct = mitem->cli_component = component_struct;
|
||||||
|
ri->ri_refcnt = 1;
|
||||||
|
pmix_list_append(&framework->framework_components, &mitem->super);
|
||||||
|
|
||||||
|
pmix_output_verbose (PMIX_MCA_BASE_VERBOSE_INFO, 0, "pmix_mca_base_component_repository_open: opened dynamic %s MCA "
|
||||||
|
"component \"%s\"", ri->ri_type, ri->ri_name);
|
||||||
|
|
||||||
|
return PMIX_SUCCESS;
|
||||||
|
} while (0);
|
||||||
|
|
||||||
|
if (mitem) {
|
||||||
|
PMIX_RELEASE(mitem);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (struct_name) {
|
||||||
|
free (struct_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
pmix_pdl_close (ri->ri_dlhandle);
|
||||||
|
ri->ri_dlhandle = NULL;
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
#else
|
||||||
|
|
||||||
|
/* no dlopen support */
|
||||||
|
return PMIX_ERR_NOT_SUPPORTED;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Finalize the repository -- close everything that's still open.
|
||||||
|
*/
|
||||||
|
void pmix_mca_base_component_repository_finalize(void)
|
||||||
|
{
|
||||||
|
if (!initialized) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
initialized = false;
|
||||||
|
|
||||||
|
#if PMIX_HAVE_PDL_SUPPORT
|
||||||
|
pmix_list_t *component_list;
|
||||||
|
void *node, *key;
|
||||||
|
size_t key_size;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
ret = pmix_hash_table_get_first_key_ptr (&pmix_mca_base_component_repository, &key, &key_size,
|
||||||
|
(void **) &component_list, &node);
|
||||||
|
while (PMIX_SUCCESS == ret) {
|
||||||
|
PMIX_LIST_RELEASE(component_list);
|
||||||
|
ret = pmix_hash_table_get_next_key_ptr (&pmix_mca_base_component_repository, &key,
|
||||||
|
&key_size, (void **) &component_list,
|
||||||
|
node, &node);
|
||||||
|
}
|
||||||
|
|
||||||
|
(void) pmix_mca_base_framework_close(&pmix_pdl_base_framework);
|
||||||
|
PMIX_DESTRUCT(&pmix_mca_base_component_repository);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#if PMIX_HAVE_PDL_SUPPORT
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Basic sentinel values, and construct the inner list
|
||||||
|
*/
|
||||||
|
static void ri_constructor (pmix_mca_base_component_repository_item_t *ri)
|
||||||
|
{
|
||||||
|
memset(ri->ri_type, 0, sizeof(ri->ri_type));
|
||||||
|
ri->ri_dlhandle = NULL;
|
||||||
|
ri->ri_component_struct = NULL;
|
||||||
|
ri->ri_path = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Close a component
|
||||||
|
*/
|
||||||
|
static void ri_destructor (pmix_mca_base_component_repository_item_t *ri)
|
||||||
|
{
|
||||||
|
/* dlclose the component if it is still open */
|
||||||
|
pmix_mca_base_component_repository_release_internal (ri);
|
||||||
|
|
||||||
|
/* It should be obvious, but I'll state it anyway because it bit me
|
||||||
|
during debugging: after the dlclose(), the pmix_mca_base_component_t
|
||||||
|
pointer is no longer valid because it has [potentially] been
|
||||||
|
unloaded from memory. So don't try to use it. :-) */
|
||||||
|
|
||||||
|
if (ri->ri_path) {
|
||||||
|
free (ri->ri_path);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ri->ri_base) {
|
||||||
|
free (ri->ri_base);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* PMIX_HAVE_PDL_SUPPORT */
|
@ -0,0 +1,133 @@
|
|||||||
|
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
||||||
|
/*
|
||||||
|
* 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) 2015 Cisco Systems, Inc. All rights reserved.
|
||||||
|
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
|
||||||
|
* reserved.
|
||||||
|
* Copyright (c) 2016 Intel, Inc. All rights reserved.
|
||||||
|
* $COPYRIGHT$
|
||||||
|
*
|
||||||
|
* Additional copyrights may follow
|
||||||
|
*
|
||||||
|
* $HEADER$
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file pmix_mca_base_component_repository.h
|
||||||
|
*
|
||||||
|
* This file provide the external interface to our base component
|
||||||
|
* module. Most of the components that depend on it, will use the
|
||||||
|
* retain_component() function to increase the reference count on a
|
||||||
|
* particular component (as opposed to the retain() function, which is
|
||||||
|
* internal to the pmix/mca/base). But it's convenient to have all
|
||||||
|
* the functions exported from one header file rather than to separate
|
||||||
|
* retain_component() and retain() into two separate header files
|
||||||
|
* (i.e., have a separate header file just for retain()).
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MCA_BASE_COMPONENT_REPOSITORY_H
|
||||||
|
#define MCA_BASE_COMPONENT_REPOSITORY_H
|
||||||
|
|
||||||
|
#include <src/include/pmix_config.h>
|
||||||
|
|
||||||
|
#include "src/mca/pdl/pdl.h"
|
||||||
|
#include "src/mca/pdl/base/base.h"
|
||||||
|
|
||||||
|
BEGIN_C_DECLS
|
||||||
|
struct pmix_mca_base_component_repository_item_t {
|
||||||
|
pmix_list_item_t super;
|
||||||
|
|
||||||
|
char ri_type[PMIX_MCA_BASE_MAX_TYPE_NAME_LEN + 1];
|
||||||
|
char ri_name[PMIX_MCA_BASE_MAX_COMPONENT_NAME_LEN + 1];
|
||||||
|
|
||||||
|
char *ri_path;
|
||||||
|
char *ri_base;
|
||||||
|
|
||||||
|
pmix_pdl_handle_t *ri_dlhandle;
|
||||||
|
const pmix_mca_base_component_t *ri_component_struct;
|
||||||
|
|
||||||
|
int ri_refcnt;
|
||||||
|
};
|
||||||
|
typedef struct pmix_mca_base_component_repository_item_t pmix_mca_base_component_repository_item_t;
|
||||||
|
|
||||||
|
PMIX_CLASS_DECLARATION(pmix_mca_base_component_repository_item_t);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief initialize the component repository
|
||||||
|
*
|
||||||
|
* This function must be called before any frameworks are registered or
|
||||||
|
* opened. It is responsible for setting up the repository of dynamically
|
||||||
|
* loaded components. The initial search path is taken from the
|
||||||
|
* pmix_mca_base_component_path MCA parameter. pmix_mca_base_open () is a
|
||||||
|
* prerequisite call as it registers the pmix_mca_base_component_path parameter.
|
||||||
|
*/
|
||||||
|
int pmix_mca_base_component_repository_init(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief add search path for dynamically loaded components
|
||||||
|
*
|
||||||
|
* @param[in] path delimited list of search paths to add
|
||||||
|
*/
|
||||||
|
int pmix_mca_base_component_repository_add(const char *path);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief return the list of components that match a given framework
|
||||||
|
*
|
||||||
|
* @param[in] framework framework to match
|
||||||
|
* @param[out] framework_components components that match this framework
|
||||||
|
*
|
||||||
|
* The list returned in {framework_components} is owned by the component
|
||||||
|
* repository and CAN NOT be modified by the caller.
|
||||||
|
*/
|
||||||
|
int pmix_mca_base_component_repository_get_components(pmix_mca_base_framework_t *framework,
|
||||||
|
pmix_list_t **framework_components);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief finalize the mca component repository
|
||||||
|
*/
|
||||||
|
void pmix_mca_base_component_repository_finalize(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief open the repository item and add it to the framework's component
|
||||||
|
* list
|
||||||
|
*
|
||||||
|
* @param[in] framework framework that matches the component
|
||||||
|
* @param[in] ri dynamic component to open
|
||||||
|
*/
|
||||||
|
int pmix_mca_base_component_repository_open(pmix_mca_base_framework_t *framework,
|
||||||
|
pmix_mca_base_component_repository_item_t *ri);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Reduce the reference count of a component and dlclose it if necessary
|
||||||
|
*/
|
||||||
|
void pmix_mca_base_component_repository_release(const pmix_mca_base_component_t *component);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Increase the reference count of a component
|
||||||
|
*
|
||||||
|
* Each component repository item starts with a reference count of 0. This ensures that
|
||||||
|
* when a framework closes it's components the repository items are all correctly
|
||||||
|
* dlclosed. This function can be used to prevent the dlclose if a component is needed
|
||||||
|
* after its framework has closed the associated component. Users of this function
|
||||||
|
* should call pmix_mca_base_component_repository_release() once they are finished with the
|
||||||
|
* component.
|
||||||
|
*
|
||||||
|
* @note all components are automatically unloaded by the
|
||||||
|
* pmix_mca_base_component_repository_finalize() call.
|
||||||
|
*/
|
||||||
|
int pmix_mca_base_component_repository_retain_component(const char *type, const char *name);
|
||||||
|
|
||||||
|
END_C_DECLS
|
||||||
|
|
||||||
|
#endif /* MCA_BASE_COMPONENT_REPOSITORY_H */
|
@ -0,0 +1,94 @@
|
|||||||
|
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
|
||||||
|
* University Research and Technology
|
||||||
|
* Corporation. All rights reserved.
|
||||||
|
* Copyright (c) 2004-2006 The University of Tennessee and The University
|
||||||
|
* of Tennessee Research Foundation. All rights
|
||||||
|
* reserved.
|
||||||
|
* Copyright (c) 2004-2006 High Performance Computing Center Stuttgart,
|
||||||
|
* University of Stuttgart. All rights reserved.
|
||||||
|
* Copyright (c) 2004-2006 The Regents of the University of California.
|
||||||
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights
|
||||||
|
* reserved.
|
||||||
|
* Copyright (c) 2016 Intel, Inc. All rights reserved.
|
||||||
|
* $COPYRIGHT$
|
||||||
|
*
|
||||||
|
* Additional copyrights may follow
|
||||||
|
*
|
||||||
|
* $HEADER$
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <src/include/pmix_config.h>
|
||||||
|
|
||||||
|
#include "src/class/pmix_list.h"
|
||||||
|
#include "src/util/output.h"
|
||||||
|
#include "src/mca/mca.h"
|
||||||
|
#include "src/mca/base/base.h"
|
||||||
|
#include "src/mca/base/pmix_mca_base_component_repository.h"
|
||||||
|
#include "pmix_common.h"
|
||||||
|
|
||||||
|
void pmix_mca_base_component_unload (const pmix_mca_base_component_t *component, int output_id)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
/* Unload */
|
||||||
|
pmix_output_verbose (PMIX_MCA_BASE_VERBOSE_COMPONENT, output_id,
|
||||||
|
"mca: base: close: unloading component %s",
|
||||||
|
component->pmix_mca_component_name);
|
||||||
|
|
||||||
|
ret = pmix_mca_base_var_group_find (component->pmix_mca_project_name, component->pmix_mca_type_name,
|
||||||
|
component->pmix_mca_component_name);
|
||||||
|
if (0 <= ret) {
|
||||||
|
pmix_mca_base_var_group_deregister (ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
pmix_mca_base_component_repository_release (component);
|
||||||
|
}
|
||||||
|
|
||||||
|
void pmix_mca_base_component_close (const pmix_mca_base_component_t *component, int output_id)
|
||||||
|
{
|
||||||
|
/* Close */
|
||||||
|
if (NULL != component->pmix_mca_close_component) {
|
||||||
|
component->pmix_mca_close_component();
|
||||||
|
pmix_output_verbose (PMIX_MCA_BASE_VERBOSE_COMPONENT, output_id,
|
||||||
|
"mca: base: close: component %s closed",
|
||||||
|
component->pmix_mca_component_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
pmix_mca_base_component_unload (component, output_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
int pmix_mca_base_framework_components_close (pmix_mca_base_framework_t *framework,
|
||||||
|
const pmix_mca_base_component_t *skip)
|
||||||
|
{
|
||||||
|
return pmix_mca_base_components_close (framework->framework_output,
|
||||||
|
&framework->framework_components,
|
||||||
|
skip);
|
||||||
|
}
|
||||||
|
|
||||||
|
int pmix_mca_base_components_close(int output_id, pmix_list_t *components,
|
||||||
|
const pmix_mca_base_component_t *skip)
|
||||||
|
{
|
||||||
|
pmix_mca_base_component_list_item_t *cli, *next;
|
||||||
|
|
||||||
|
/* Close and unload all components in the available list, except the
|
||||||
|
"skip" item. This is handy to close out all non-selected
|
||||||
|
components. It's easier to simply remove the entire list and
|
||||||
|
then simply re-add the skip entry when done. */
|
||||||
|
|
||||||
|
PMIX_LIST_FOREACH_SAFE(cli, next, components, pmix_mca_base_component_list_item_t) {
|
||||||
|
if (skip == cli->cli_component) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
pmix_mca_base_component_close (cli->cli_component, output_id);
|
||||||
|
pmix_list_remove_item (components, &cli->super);
|
||||||
|
|
||||||
|
PMIX_RELEASE(cli);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* All done */
|
||||||
|
return PMIX_SUCCESS;
|
||||||
|
}
|
@ -0,0 +1,164 @@
|
|||||||
|
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2004-2008 The Trustees of Indiana University and Indiana
|
||||||
|
* University Research and Technology
|
||||||
|
* Corporation. All rights reserved.
|
||||||
|
* Copyright (c) 2004-2013 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) 2008-2012 Cisco Systems, Inc. All rights reserved.
|
||||||
|
* Copyright (c) 2011-2015 Los Alamos National Security, LLC.
|
||||||
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2014 Hochschule Esslingen. All rights reserved.
|
||||||
|
* Copyright (c) 2016 Intel, Inc. All rights reserved.
|
||||||
|
* $COPYRIGHT$
|
||||||
|
*
|
||||||
|
* Additional copyrights may follow
|
||||||
|
*
|
||||||
|
* $HEADER$
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <src/include/pmix_config.h>
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include "src/class/pmix_list.h"
|
||||||
|
#include "src/util/argv.h"
|
||||||
|
#include "src/util/error.h"
|
||||||
|
#include "src/util/output.h"
|
||||||
|
#include "src/mca/mca.h"
|
||||||
|
#include "src/mca/base/base.h"
|
||||||
|
#include "pmix_common.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Local functions
|
||||||
|
*/
|
||||||
|
static int open_components(pmix_mca_base_framework_t *framework);
|
||||||
|
|
||||||
|
struct pmix_mca_base_dummy_framework_list_item_t {
|
||||||
|
pmix_list_item_t super;
|
||||||
|
pmix_mca_base_framework_t framework;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function for finding and opening either all MCA components, or the
|
||||||
|
* one that was specifically requested via a MCA parameter.
|
||||||
|
*/
|
||||||
|
int pmix_mca_base_framework_components_open (pmix_mca_base_framework_t *framework,
|
||||||
|
pmix_mca_base_open_flag_t flags)
|
||||||
|
{
|
||||||
|
/* Open flags are not used at this time. Suppress compiler warning. */
|
||||||
|
if (flags & PMIX_MCA_BASE_OPEN_FIND_COMPONENTS) {
|
||||||
|
bool open_dso_components = !(flags & PMIX_MCA_BASE_OPEN_STATIC_ONLY);
|
||||||
|
/* Find and load requested components */
|
||||||
|
int ret = pmix_mca_base_component_find(NULL, framework, false, open_dso_components);
|
||||||
|
if (PMIX_SUCCESS != ret) {
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Open all registered components */
|
||||||
|
return open_components (framework);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Traverse the entire list of found components (a list of
|
||||||
|
* pmix_mca_base_component_t instances). If the requested_component_names
|
||||||
|
* array is empty, or the name of each component in the list of found
|
||||||
|
* components is in the requested_components_array, try to open it.
|
||||||
|
* If it opens, add it to the components_available list.
|
||||||
|
*/
|
||||||
|
static int open_components(pmix_mca_base_framework_t *framework)
|
||||||
|
{
|
||||||
|
pmix_list_t *components = &framework->framework_components;
|
||||||
|
uint32_t open_only_flags = PMIX_MCA_BASE_METADATA_PARAM_NONE;
|
||||||
|
int output_id = framework->framework_output;
|
||||||
|
pmix_mca_base_component_list_item_t *cli, *next;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Pre-process the list with parameter constraints
|
||||||
|
* e.g., If requested to select only CR enabled components
|
||||||
|
* then only make available those components.
|
||||||
|
*
|
||||||
|
* JJH Note: Currently checkpoint/restart is the only user of this
|
||||||
|
* functionality. If other component constraint options are
|
||||||
|
* added, then this logic can be used for all contraint
|
||||||
|
* options.
|
||||||
|
*
|
||||||
|
* NTH: Logic moved to pmix_mca_base_components_filter.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* If pmix_mca_base_framework_register_components was called with the MCA_BASE_COMPONENTS_ALL flag
|
||||||
|
we need to trim down and close any extra components we do not want open */
|
||||||
|
ret = pmix_mca_base_components_filter (framework, open_only_flags);
|
||||||
|
if (PMIX_SUCCESS != ret) {
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Announce */
|
||||||
|
pmix_output_verbose (PMIX_MCA_BASE_VERBOSE_COMPONENT, output_id,
|
||||||
|
"mca: base: components_open: opening %s components",
|
||||||
|
framework->framework_name);
|
||||||
|
|
||||||
|
/* Traverse the list of components */
|
||||||
|
PMIX_LIST_FOREACH_SAFE(cli, next, components, pmix_mca_base_component_list_item_t) {
|
||||||
|
const pmix_mca_base_component_t *component = cli->cli_component;
|
||||||
|
|
||||||
|
pmix_output_verbose (PMIX_MCA_BASE_VERBOSE_COMPONENT, output_id,
|
||||||
|
"mca: base: components_open: found loaded component %s",
|
||||||
|
component->pmix_mca_component_name);
|
||||||
|
|
||||||
|
if (NULL != component->pmix_mca_open_component) {
|
||||||
|
/* Call open if register didn't call it already */
|
||||||
|
ret = component->pmix_mca_open_component();
|
||||||
|
|
||||||
|
if (PMIX_SUCCESS == ret) {
|
||||||
|
pmix_output_verbose (PMIX_MCA_BASE_VERBOSE_COMPONENT, output_id,
|
||||||
|
"mca: base: components_open: "
|
||||||
|
"component %s open function successful",
|
||||||
|
component->pmix_mca_component_name);
|
||||||
|
} else {
|
||||||
|
if (PMIX_ERR_NOT_AVAILABLE != ret) {
|
||||||
|
/* If the component returns PMIX_ERR_NOT_AVAILABLE,
|
||||||
|
it's a cue to "silently ignore me" -- it's not a
|
||||||
|
failure, it's just a way for the component to say
|
||||||
|
"nope!".
|
||||||
|
|
||||||
|
Otherwise, however, display an error. We may end
|
||||||
|
up displaying this twice, but it may go to separate
|
||||||
|
streams. So better to be redundant than to not
|
||||||
|
display the error in the stream where it was
|
||||||
|
expected. */
|
||||||
|
|
||||||
|
if (pmix_mca_base_component_show_load_errors) {
|
||||||
|
pmix_output_verbose (PMIX_MCA_BASE_VERBOSE_ERROR, output_id,
|
||||||
|
"mca: base: components_open: component %s "
|
||||||
|
"/ %s open function failed",
|
||||||
|
component->pmix_mca_type_name,
|
||||||
|
component->pmix_mca_component_name);
|
||||||
|
}
|
||||||
|
pmix_output_verbose (PMIX_MCA_BASE_VERBOSE_COMPONENT, output_id,
|
||||||
|
"mca: base: components_open: "
|
||||||
|
"component %s open function failed",
|
||||||
|
component->pmix_mca_component_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
pmix_mca_base_component_close (component, output_id);
|
||||||
|
|
||||||
|
pmix_list_remove_item (components, &cli->super);
|
||||||
|
PMIX_RELEASE(cli);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* All done */
|
||||||
|
|
||||||
|
return PMIX_SUCCESS;
|
||||||
|
}
|
@ -0,0 +1,163 @@
|
|||||||
|
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2004-2008 The Trustees of Indiana University and Indiana
|
||||||
|
* University Research and Technology
|
||||||
|
* Corporation. All rights reserved.
|
||||||
|
* Copyright (c) 2004-2012 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) 2008-2012 Cisco Systems, Inc. All rights reserved.
|
||||||
|
* Copyright (c) 2011-2015 Los Alamos National Security, LLC.
|
||||||
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2016 Intel, Inc. All rights reserved.
|
||||||
|
* $COPYRIGHT$
|
||||||
|
*
|
||||||
|
* Additional copyrights may follow
|
||||||
|
*
|
||||||
|
* $HEADER$
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <src/include/pmix_config.h>
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include "src/class/pmix_list.h"
|
||||||
|
#include "src/util/argv.h"
|
||||||
|
#include "src/util/error.h"
|
||||||
|
#include "src/util/output.h"
|
||||||
|
#include "src/util/show_help.h"
|
||||||
|
#include "src/mca/mca.h"
|
||||||
|
#include "src/mca/base/base.h"
|
||||||
|
#include "src/mca/base/pmix_mca_base_framework.h"
|
||||||
|
#include "src/mca/base/pmix_mca_base_component_repository.h"
|
||||||
|
#include "pmix_common.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Local functions
|
||||||
|
*/
|
||||||
|
static int register_components(pmix_mca_base_framework_t *framework);
|
||||||
|
/**
|
||||||
|
* Function for finding and opening either all MCA components, or the
|
||||||
|
* one that was specifically requested via a MCA parameter.
|
||||||
|
*/
|
||||||
|
int pmix_mca_base_framework_components_register (pmix_mca_base_framework_t *framework,
|
||||||
|
pmix_mca_base_register_flag_t flags)
|
||||||
|
{
|
||||||
|
bool open_dso_components = !(flags & PMIX_MCA_BASE_REGISTER_STATIC_ONLY);
|
||||||
|
bool ignore_requested = !!(flags & PMIX_MCA_BASE_REGISTER_ALL);
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
/* Find and load requested components */
|
||||||
|
ret = pmix_mca_base_component_find(NULL, framework, ignore_requested, open_dso_components);
|
||||||
|
if (PMIX_SUCCESS != ret) {
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Register all remaining components */
|
||||||
|
return register_components(framework);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Traverse the entire list of found components (a list of
|
||||||
|
* pmix_mca_base_component_t instances). If the requested_component_names
|
||||||
|
* array is empty, or the name of each component in the list of found
|
||||||
|
* components is in the requested_components_array, try to open it.
|
||||||
|
* If it opens, add it to the components_available list.
|
||||||
|
*/
|
||||||
|
static int register_components(pmix_mca_base_framework_t *framework)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
pmix_mca_base_component_t *component;
|
||||||
|
pmix_mca_base_component_list_item_t *cli, *next;
|
||||||
|
int output_id = framework->framework_output;
|
||||||
|
|
||||||
|
/* Announce */
|
||||||
|
pmix_output_verbose (PMIX_MCA_BASE_VERBOSE_COMPONENT, output_id,
|
||||||
|
"pmix:mca: base: components_register: registering framework %s components",
|
||||||
|
framework->framework_name);
|
||||||
|
|
||||||
|
/* Traverse the list of found components */
|
||||||
|
|
||||||
|
PMIX_LIST_FOREACH_SAFE(cli, next, &framework->framework_components, pmix_mca_base_component_list_item_t) {
|
||||||
|
component = (pmix_mca_base_component_t *)cli->cli_component;
|
||||||
|
|
||||||
|
pmix_output_verbose(PMIX_MCA_BASE_VERBOSE_COMPONENT, output_id,
|
||||||
|
"pmix:mca: base: components_register: found loaded component %s",
|
||||||
|
component->pmix_mca_component_name);
|
||||||
|
|
||||||
|
/* Call the component's MCA parameter registration function (or open if register doesn't exist) */
|
||||||
|
if (NULL == component->pmix_mca_register_component_params) {
|
||||||
|
pmix_output_verbose (PMIX_MCA_BASE_VERBOSE_COMPONENT, output_id,
|
||||||
|
"pmix:mca: base: components_register: "
|
||||||
|
"component %s has no register or open function",
|
||||||
|
component->pmix_mca_component_name);
|
||||||
|
ret = PMIX_SUCCESS;
|
||||||
|
} else {
|
||||||
|
ret = component->pmix_mca_register_component_params();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (PMIX_SUCCESS != ret) {
|
||||||
|
if (PMIX_ERR_NOT_AVAILABLE != ret) {
|
||||||
|
/* If the component returns PMIX_ERR_NOT_AVAILABLE,
|
||||||
|
it's a cue to "silently ignore me" -- it's not a
|
||||||
|
failure, it's just a way for the component to say
|
||||||
|
"nope!".
|
||||||
|
|
||||||
|
Otherwise, however, display an error. We may end
|
||||||
|
up displaying this twice, but it may go to separate
|
||||||
|
streams. So better to be redundant than to not
|
||||||
|
display the error in the stream where it was
|
||||||
|
expected. */
|
||||||
|
|
||||||
|
if (pmix_mca_base_component_show_load_errors) {
|
||||||
|
pmix_output_verbose (PMIX_MCA_BASE_VERBOSE_ERROR, output_id,
|
||||||
|
"pmix:mca: base: components_register: component %s "
|
||||||
|
"/ %s register function failed",
|
||||||
|
component->pmix_mca_type_name,
|
||||||
|
component->pmix_mca_component_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
pmix_output_verbose (PMIX_MCA_BASE_VERBOSE_COMPONENT, output_id,
|
||||||
|
"pmix:mca: base: components_register: "
|
||||||
|
"component %s register function failed",
|
||||||
|
component->pmix_mca_component_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
pmix_list_remove_item (&framework->framework_components, &cli->super);
|
||||||
|
|
||||||
|
/* Release this list item */
|
||||||
|
PMIX_RELEASE(cli);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (NULL != component->pmix_mca_register_component_params) {
|
||||||
|
pmix_output_verbose (PMIX_MCA_BASE_VERBOSE_COMPONENT, output_id, "pmix:mca: base: components_register: "
|
||||||
|
"component %s register function successful",
|
||||||
|
component->pmix_mca_component_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Register this component's version */
|
||||||
|
pmix_mca_base_component_var_register (component, "major_version", NULL, PMIX_MCA_BASE_VAR_TYPE_INT, NULL,
|
||||||
|
0, PMIX_MCA_BASE_VAR_FLAG_DEFAULT_ONLY | PMIX_MCA_BASE_VAR_FLAG_INTERNAL,
|
||||||
|
PMIX_INFO_LVL_9, PMIX_MCA_BASE_VAR_SCOPE_CONSTANT,
|
||||||
|
&component->pmix_mca_component_major_version);
|
||||||
|
pmix_mca_base_component_var_register (component, "minor_version", NULL, PMIX_MCA_BASE_VAR_TYPE_INT, NULL,
|
||||||
|
0, PMIX_MCA_BASE_VAR_FLAG_DEFAULT_ONLY | PMIX_MCA_BASE_VAR_FLAG_INTERNAL,
|
||||||
|
PMIX_INFO_LVL_9, PMIX_MCA_BASE_VAR_SCOPE_CONSTANT,
|
||||||
|
&component->pmix_mca_component_minor_version);
|
||||||
|
pmix_mca_base_component_var_register (component, "release_version", NULL, PMIX_MCA_BASE_VAR_TYPE_INT, NULL,
|
||||||
|
0, PMIX_MCA_BASE_VAR_FLAG_DEFAULT_ONLY | PMIX_MCA_BASE_VAR_FLAG_INTERNAL,
|
||||||
|
PMIX_INFO_LVL_9, PMIX_MCA_BASE_VAR_SCOPE_CONSTANT,
|
||||||
|
&component->pmix_mca_component_release_version);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* All done */
|
||||||
|
|
||||||
|
return PMIX_SUCCESS;
|
||||||
|
}
|
@ -0,0 +1,147 @@
|
|||||||
|
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2004-2008 The Trustees of Indiana University and Indiana
|
||||||
|
* University Research and Technology
|
||||||
|
* Corporation. All rights reserved.
|
||||||
|
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
|
||||||
|
* reserved.
|
||||||
|
* Copyright (c) 2015-2016 Intel, Inc. All rights reserved.
|
||||||
|
* $COPYRIGHT$
|
||||||
|
*
|
||||||
|
* Additional copyrights may follow
|
||||||
|
*
|
||||||
|
* $HEADER$
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <src/include/pmix_config.h>
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
|
#include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "src/class/pmix_list.h"
|
||||||
|
#include "src/util/error.h"
|
||||||
|
#include "src/util/output.h"
|
||||||
|
#include "src/mca/mca.h"
|
||||||
|
#include "src/mca/base/base.h"
|
||||||
|
#include "src/mca/base/pmix_mca_base_component_repository.h"
|
||||||
|
#include "pmix_common.h"
|
||||||
|
|
||||||
|
|
||||||
|
int pmix_mca_base_select(const char *type_name, int output_id,
|
||||||
|
pmix_list_t *components_available,
|
||||||
|
pmix_mca_base_module_t **best_module,
|
||||||
|
pmix_mca_base_component_t **best_component,
|
||||||
|
int *priority_out)
|
||||||
|
{
|
||||||
|
pmix_mca_base_component_list_item_t *cli = NULL;
|
||||||
|
pmix_mca_base_component_t *component = NULL;
|
||||||
|
pmix_mca_base_module_t *module = NULL;
|
||||||
|
int priority = 0, best_priority = INT32_MIN;
|
||||||
|
int rc;
|
||||||
|
|
||||||
|
*best_module = NULL;
|
||||||
|
*best_component = NULL;
|
||||||
|
|
||||||
|
pmix_output_verbose (PMIX_MCA_BASE_VERBOSE_COMPONENT, output_id,
|
||||||
|
"mca:base:select: Auto-selecting %s components",
|
||||||
|
type_name);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Traverse the list of available components.
|
||||||
|
* For each call their 'query' functions to determine relative priority.
|
||||||
|
*/
|
||||||
|
PMIX_LIST_FOREACH(cli, components_available, pmix_mca_base_component_list_item_t) {
|
||||||
|
component = (pmix_mca_base_component_t *) cli->cli_component;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If there is a query function then use it.
|
||||||
|
*/
|
||||||
|
if (NULL == component->pmix_mca_query_component) {
|
||||||
|
pmix_output_verbose (PMIX_MCA_BASE_VERBOSE_COMPONENT, output_id,
|
||||||
|
"mca:base:select:(%5s) Skipping component [%s]. It does not implement a query function",
|
||||||
|
type_name, component->pmix_mca_component_name );
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Query this component for the module and priority
|
||||||
|
*/
|
||||||
|
pmix_output_verbose (PMIX_MCA_BASE_VERBOSE_COMPONENT, output_id,
|
||||||
|
"mca:base:select:(%5s) Querying component [%s]",
|
||||||
|
type_name, component->pmix_mca_component_name);
|
||||||
|
|
||||||
|
rc = component->pmix_mca_query_component(&module, &priority);
|
||||||
|
if (PMIX_ERR_FATAL == rc) {
|
||||||
|
/* a fatal error was detected by this component - e.g., the
|
||||||
|
* user specified a required element and the component could
|
||||||
|
* not find it. In this case, we must not continue as we might
|
||||||
|
* find some other component that could run, causing us to do
|
||||||
|
* something the user didn't want */
|
||||||
|
return rc;
|
||||||
|
} else if (PMIX_SUCCESS != rc) {
|
||||||
|
/* silently skip this component */
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If no module was returned, then skip component
|
||||||
|
*/
|
||||||
|
if (NULL == module) {
|
||||||
|
pmix_output_verbose (PMIX_MCA_BASE_VERBOSE_COMPONENT, output_id,
|
||||||
|
"mca:base:select:(%5s) Skipping component [%s]. Query failed to return a module",
|
||||||
|
type_name, component->pmix_mca_component_name );
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Determine if this is the best module we have seen by looking the priority
|
||||||
|
*/
|
||||||
|
pmix_output_verbose (PMIX_MCA_BASE_VERBOSE_COMPONENT, output_id,
|
||||||
|
"mca:base:select:(%5s) Query of component [%s] set priority to %d",
|
||||||
|
type_name, component->pmix_mca_component_name, priority);
|
||||||
|
if (priority > best_priority) {
|
||||||
|
best_priority = priority;
|
||||||
|
*best_component = component;
|
||||||
|
*best_module = module;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (priority_out) {
|
||||||
|
*priority_out = best_priority;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Finished querying all components.
|
||||||
|
* Make sure we found something in the process.
|
||||||
|
*/
|
||||||
|
if (NULL == *best_component) {
|
||||||
|
pmix_output_verbose (PMIX_MCA_BASE_VERBOSE_COMPONENT, output_id,
|
||||||
|
"mca:base:select:(%5s) No component selected!",
|
||||||
|
type_name);
|
||||||
|
/*
|
||||||
|
* Still close the non-selected components
|
||||||
|
*/
|
||||||
|
pmix_mca_base_components_close(0, /* Pass 0 to keep this from closing the output handle */
|
||||||
|
components_available,
|
||||||
|
NULL);
|
||||||
|
return PMIX_ERR_NOT_FOUND;
|
||||||
|
}
|
||||||
|
|
||||||
|
pmix_output_verbose (PMIX_MCA_BASE_VERBOSE_COMPONENT, output_id,
|
||||||
|
"mca:base:select:(%5s) Selected component [%s]",
|
||||||
|
type_name, (*best_component)->pmix_mca_component_name);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Close the non-selected components
|
||||||
|
*/
|
||||||
|
pmix_mca_base_components_close(output_id,
|
||||||
|
components_available,
|
||||||
|
(pmix_mca_base_component_t *) (*best_component));
|
||||||
|
|
||||||
|
|
||||||
|
return PMIX_SUCCESS;
|
||||||
|
}
|
242
opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_framework.c
Обычный файл
242
opal/mca/pmix/pmix2x/pmix/src/mca/base/pmix_mca_base_framework.c
Обычный файл
@ -0,0 +1,242 @@
|
|||||||
|
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights
|
||||||
|
* reserved.
|
||||||
|
* Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
|
||||||
|
* Copyright (c) 2016 Intel, Inc. All rights reserved
|
||||||
|
* $COPYRIGHT$
|
||||||
|
*
|
||||||
|
* Additional copyrights may follow
|
||||||
|
*
|
||||||
|
* $HEADER$
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <src/include/pmix_config.h>
|
||||||
|
|
||||||
|
#include "pmix_common.h"
|
||||||
|
#include "src/util/output.h"
|
||||||
|
|
||||||
|
#include "pmix_mca_base_framework.h"
|
||||||
|
#include "pmix_mca_base_var.h"
|
||||||
|
#include "src/mca/base/base.h"
|
||||||
|
|
||||||
|
bool pmix_mca_base_framework_is_registered (struct pmix_mca_base_framework_t *framework)
|
||||||
|
{
|
||||||
|
return !!(framework->framework_flags & PMIX_MCA_BASE_FRAMEWORK_FLAG_REGISTERED);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool pmix_mca_base_framework_is_open (struct pmix_mca_base_framework_t *framework)
|
||||||
|
{
|
||||||
|
return !!(framework->framework_flags & PMIX_MCA_BASE_FRAMEWORK_FLAG_OPEN);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void framework_open_output (struct pmix_mca_base_framework_t *framework)
|
||||||
|
{
|
||||||
|
if (0 < framework->framework_verbose) {
|
||||||
|
if (-1 == framework->framework_output) {
|
||||||
|
framework->framework_output = pmix_output_open (NULL);
|
||||||
|
}
|
||||||
|
pmix_output_set_verbosity(framework->framework_output,
|
||||||
|
framework->framework_verbose);
|
||||||
|
} else if (-1 != framework->framework_output) {
|
||||||
|
pmix_output_close (framework->framework_output);
|
||||||
|
framework->framework_output = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void framework_close_output (struct pmix_mca_base_framework_t *framework)
|
||||||
|
{
|
||||||
|
if (-1 != framework->framework_output) {
|
||||||
|
pmix_output_close (framework->framework_output);
|
||||||
|
framework->framework_output = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int pmix_mca_base_framework_register (struct pmix_mca_base_framework_t *framework,
|
||||||
|
pmix_mca_base_register_flag_t flags)
|
||||||
|
{
|
||||||
|
char *desc;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
assert (NULL != framework);
|
||||||
|
|
||||||
|
framework->framework_refcnt++;
|
||||||
|
|
||||||
|
if (pmix_mca_base_framework_is_registered (framework)) {
|
||||||
|
return PMIX_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
PMIX_CONSTRUCT(&framework->framework_components, pmix_list_t);
|
||||||
|
|
||||||
|
if (framework->framework_flags & PMIX_MCA_BASE_FRAMEWORK_FLAG_NO_DSO) {
|
||||||
|
flags |= PMIX_MCA_BASE_REGISTER_STATIC_ONLY;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(PMIX_MCA_BASE_FRAMEWORK_FLAG_NOREGISTER & framework->framework_flags)) {
|
||||||
|
/* register this framework with the MCA variable system */
|
||||||
|
ret = pmix_mca_base_var_group_register (framework->framework_project,
|
||||||
|
framework->framework_name,
|
||||||
|
NULL, framework->framework_description);
|
||||||
|
if (0 > ret) {
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
asprintf (&desc, "Default selection set of components for the %s framework (<none>"
|
||||||
|
" means use all components that can be found)", framework->framework_name);
|
||||||
|
ret = pmix_mca_base_var_register (framework->framework_project, framework->framework_name,
|
||||||
|
NULL, NULL, desc, PMIX_MCA_BASE_VAR_TYPE_STRING, NULL, 0,
|
||||||
|
PMIX_MCA_BASE_VAR_FLAG_SETTABLE, PMIX_INFO_LVL_2,
|
||||||
|
PMIX_MCA_BASE_VAR_SCOPE_ALL_EQ, &framework->framework_selection);
|
||||||
|
free (desc);
|
||||||
|
if (0 > ret) {
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* register a verbosity variable for this framework */
|
||||||
|
ret = asprintf (&desc, "Verbosity level for the %s framework (default: 0)",
|
||||||
|
framework->framework_name);
|
||||||
|
if (0 > ret) {
|
||||||
|
return PMIX_ERR_OUT_OF_RESOURCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
framework->framework_verbose = PMIX_MCA_BASE_VERBOSE_ERROR;
|
||||||
|
ret = pmix_mca_base_framework_var_register (framework, "verbose", desc,
|
||||||
|
PMIX_MCA_BASE_VAR_TYPE_INT,
|
||||||
|
&pmix_mca_base_var_enum_verbose, 0,
|
||||||
|
PMIX_MCA_BASE_VAR_FLAG_SETTABLE,
|
||||||
|
PMIX_INFO_LVL_8,
|
||||||
|
PMIX_MCA_BASE_VAR_SCOPE_LOCAL,
|
||||||
|
&framework->framework_verbose);
|
||||||
|
free(desc);
|
||||||
|
if (0 > ret) {
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* check the initial verbosity and open the output if necessary. we
|
||||||
|
will recheck this on open */
|
||||||
|
framework_open_output (framework);
|
||||||
|
|
||||||
|
/* register framework variables */
|
||||||
|
if (NULL != framework->framework_register) {
|
||||||
|
ret = framework->framework_register (flags);
|
||||||
|
if (PMIX_SUCCESS != ret) {
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* register components variables */
|
||||||
|
ret = pmix_mca_base_framework_components_register (framework, flags);
|
||||||
|
if (PMIX_SUCCESS != ret) {
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
framework->framework_flags |= PMIX_MCA_BASE_FRAMEWORK_FLAG_REGISTERED;
|
||||||
|
|
||||||
|
/* framework did not provide a register function */
|
||||||
|
return PMIX_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
int pmix_mca_base_framework_open (struct pmix_mca_base_framework_t *framework,
|
||||||
|
pmix_mca_base_open_flag_t flags) {
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
assert (NULL != framework);
|
||||||
|
|
||||||
|
/* register this framework before opening it */
|
||||||
|
ret = pmix_mca_base_framework_register (framework, PMIX_MCA_BASE_REGISTER_DEFAULT);
|
||||||
|
if (PMIX_SUCCESS != ret) {
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* check if this framework is already open */
|
||||||
|
if (pmix_mca_base_framework_is_open (framework)) {
|
||||||
|
return PMIX_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (PMIX_MCA_BASE_FRAMEWORK_FLAG_NOREGISTER & framework->framework_flags) {
|
||||||
|
flags |= PMIX_MCA_BASE_OPEN_FIND_COMPONENTS;
|
||||||
|
|
||||||
|
if (PMIX_MCA_BASE_FRAMEWORK_FLAG_NO_DSO & framework->framework_flags) {
|
||||||
|
flags |= PMIX_MCA_BASE_OPEN_STATIC_ONLY;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* lock all of this frameworks's variables */
|
||||||
|
ret = pmix_mca_base_var_group_find (framework->framework_project,
|
||||||
|
framework->framework_name,
|
||||||
|
NULL);
|
||||||
|
pmix_mca_base_var_group_set_var_flag (ret, PMIX_MCA_BASE_VAR_FLAG_SETTABLE, false);
|
||||||
|
|
||||||
|
/* check the verbosity level and open (or close) the output */
|
||||||
|
framework_open_output (framework);
|
||||||
|
|
||||||
|
if (NULL != framework->framework_open) {
|
||||||
|
ret = framework->framework_open (flags);
|
||||||
|
} else {
|
||||||
|
ret = pmix_mca_base_framework_components_open (framework, flags);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (PMIX_SUCCESS != ret) {
|
||||||
|
framework->framework_refcnt--;
|
||||||
|
} else {
|
||||||
|
framework->framework_flags |= PMIX_MCA_BASE_FRAMEWORK_FLAG_OPEN;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
int pmix_mca_base_framework_close (struct pmix_mca_base_framework_t *framework) {
|
||||||
|
bool is_open = pmix_mca_base_framework_is_open (framework);
|
||||||
|
bool is_registered = pmix_mca_base_framework_is_registered (framework);
|
||||||
|
int ret, group_id;
|
||||||
|
|
||||||
|
assert (NULL != framework);
|
||||||
|
|
||||||
|
if (!(is_open || is_registered)) {
|
||||||
|
return PMIX_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
assert (framework->framework_refcnt);
|
||||||
|
if (--framework->framework_refcnt) {
|
||||||
|
return PMIX_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* find and deregister all component groups and variables */
|
||||||
|
group_id = pmix_mca_base_var_group_find (framework->framework_project,
|
||||||
|
framework->framework_name, NULL);
|
||||||
|
if (0 <= group_id) {
|
||||||
|
(void) pmix_mca_base_var_group_deregister (group_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* close the framework and all of its components */
|
||||||
|
if (is_open) {
|
||||||
|
if (NULL != framework->framework_close) {
|
||||||
|
ret = framework->framework_close ();
|
||||||
|
} else {
|
||||||
|
ret = pmix_mca_base_framework_components_close (framework, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (PMIX_SUCCESS != ret) {
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
pmix_list_item_t *item;
|
||||||
|
while (NULL != (item = pmix_list_remove_first (&framework->framework_components))) {
|
||||||
|
pmix_mca_base_component_list_item_t *cli;
|
||||||
|
cli = (pmix_mca_base_component_list_item_t*) item;
|
||||||
|
pmix_mca_base_component_unload(cli->cli_component,
|
||||||
|
framework->framework_output);
|
||||||
|
PMIX_RELEASE(item);
|
||||||
|
}
|
||||||
|
ret = PMIX_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
framework->framework_flags &= ~(PMIX_MCA_BASE_FRAMEWORK_FLAG_REGISTERED | PMIX_MCA_BASE_FRAMEWORK_FLAG_OPEN);
|
||||||
|
|
||||||
|
PMIX_DESTRUCT(&framework->framework_components);
|
||||||
|
|
||||||
|
framework_close_output (framework);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
x
Ссылка в новой задаче
Block a user