1
1

Cleanup external PMIx v3 component for copy/paste errors - component and module require unique names

Этот коммит содержится в:
Ralph Castain 2016-10-20 09:11:46 -07:00
родитель 9538f4d715
Коммит 2f966bf3bf
7 изменённых файлов: 192 добавлений и 93 удалений

34
contrib/platform/intel/bend/ext Обычный файл
Просмотреть файл

@ -0,0 +1,34 @@
enable_orterun_prefix_by_default=yes
enable_mpi_thread_multiple=no
enable_mem_debug=no
enable_mem_profile=no
enable_debug_symbols=yes
enable_binaries=yes
enable_heterogeneous=no
enable_picky=yes
enable_debug=yes
enable_shared=yes
enable_static=no
enable_memchecker=no
enable_ipv6=no
enable_mpi_fortran=yes
enable_mpi_cxx=no
enable_mpi_cxx_seek=no
enable_cxx_exceptions=no
enable_mpi_java=no
enable_io_romio=no
enable_contrib_no_build=libnbc
with_memory_manager=no
with_tm=no
with_devel_headers=yes
with_portals=no
with_valgrind=no
if [ -n "$SLURMHOME" ] ; then
with_slurm=$SLURMHOME
with_pmi=$SLURMHOME
else
with_slurm=no
fi
with_libevent=/home/common/local
with_hwloc=/home/common/local
with_pmix=/home/common/pmix/build/ompi

65
contrib/platform/intel/bend/ext.conf Обычный файл
Просмотреть файл

@ -0,0 +1,65 @@
#
# 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) 2006 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2016 Intel, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# This is the default system-wide MCA parameters defaults file.
# Specifically, the MCA parameter "mca_param_files" defaults to a
# value of
# "$HOME/.openmpi/mca-params.conf:$sysconf/openmpi-mca-params.conf"
# (this file is the latter of the two). So if the default value of
# mca_param_files is not changed, this file is used to set system-wide
# MCA parameters. This file can therefore be used to set system-wide
# default MCA parameters for all users. Of course, users can override
# these values if they want, but this file is an excellent location
# for setting system-specific MCA parameters for those users who don't
# know / care enough to investigate the proper values for them.
# Note that this file is only applicable where it is visible (in a
# filesystem sense). Specifically, MPI processes each read this file
# during their startup to determine what default values for MCA
# parameters should be used. mpirun does not bundle up the values in
# this file from the node where it was run and send them to all nodes;
# the default value decisions are effectively distributed. Hence,
# these values are only applicable on nodes that "see" this file. If
# $sysconf is a directory on a local disk, it is likely that changes
# to this file will need to be propagated to other nodes. If $sysconf
# is a directory that is shared via a networked filesystem, changes to
# this file will be visible to all nodes that share this $sysconf.
# The format is straightforward: one per line, mca_param_name =
# rvalue. Quoting is ignored (so if you use quotes or escape
# characters, they'll be included as part of the value). For example:
# Disable run-time MPI parameter checking
# mpi_param_check = 0
# Note that the value "~/" will be expanded to the current user's home
# directory. For example:
# Change component loading path
# component_path = /usr/local/lib/openmpi:~/my_openmpi_components
# See "ompi_info --param all all" for a full listing of Open MPI MCA
# parameters available and their default values.
#
# Basic behavior to smooth startup
mca_base_component_show_load_errors = 1
orte_abort_timeout = 10
hwloc_base_mem_bind_failure_action = silent

Просмотреть файл

@ -67,7 +67,7 @@ static void pmix3x_query(opal_list_t *queries,
static void pmix3x_log(opal_list_t *info,
opal_pmix_op_cbfunc_t cbfunc, void *cbdata);
const opal_pmix_base_module_t opal_pmix_pmix3x_module = {
const opal_pmix_base_module_t opal_pmix_ext3x_module = {
/* client APIs */
.init = pmix3x_client_init,
.finalize = pmix3x_client_finalize,
@ -121,7 +121,7 @@ static const char *pmix3x_get_nspace(opal_jobid_t jobid)
{
opal_pmix3x_jobid_trkr_t *jptr;
OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
OPAL_LIST_FOREACH(jptr, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
if (jptr->jobid == jobid) {
return jptr->nspace;
}
@ -134,7 +134,7 @@ static void pmix3x_register_jobid(opal_jobid_t jobid, const char *nspace)
opal_pmix3x_jobid_trkr_t *jptr;
/* if we don't already have it, add this to our jobid tracker */
OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
OPAL_LIST_FOREACH(jptr, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
if (jptr->jobid == jobid) {
return;
}
@ -142,7 +142,7 @@ static void pmix3x_register_jobid(opal_jobid_t jobid, const char *nspace)
jptr = OBJ_NEW(opal_pmix3x_jobid_trkr_t);
(void)strncpy(jptr->nspace, nspace, PMIX_MAX_NSLEN);
jptr->jobid = jobid;
opal_list_append(&mca_pmix_pmix3x_component.jobids, &jptr->super);
opal_list_append(&mca_pmix_ext3x_component.jobids, &jptr->super);
}
static void completion_handler(int status, void *cbdata)
@ -181,7 +181,7 @@ static void progress_local_event_hdlr(int status,
if (NULL != chain->sing) {
/* the last handler was for a single code - see if there are
* any others that match this event */
while (opal_list_get_end(&mca_pmix_pmix3x_component.single_events) != (nxt = opal_list_get_next(&chain->sing->super))) {
while (opal_list_get_end(&mca_pmix_ext3x_component.single_events) != (nxt = opal_list_get_next(&chain->sing->super))) {
sing = (opal_pmix3x_single_event_t*)nxt;
if (sing->code == chain->status) {
OBJ_RETAIN(chain);
@ -199,14 +199,14 @@ static void progress_local_event_hdlr(int status,
* events that match */
chain->sing = NULL;
/* pickup the beginning of the multi-code event list */
if (0 < opal_list_get_size(&mca_pmix_pmix3x_component.multi_events)) {
chain->multi = (opal_pmix3x_multi_event_t*)opal_list_get_begin(&mca_pmix_pmix3x_component.multi_events);
if (0 < opal_list_get_size(&mca_pmix_ext3x_component.multi_events)) {
chain->multi = (opal_pmix3x_multi_event_t*)opal_list_get_begin(&mca_pmix_ext3x_component.multi_events);
}
}
/* see if we need to continue with the multi code events */
if (NULL != chain->multi) {
while (opal_list_get_end(&mca_pmix_pmix3x_component.multi_events) != (nxt = opal_list_get_next(&chain->multi->super))) {
while (opal_list_get_end(&mca_pmix_ext3x_component.multi_events) != (nxt = opal_list_get_next(&chain->multi->super))) {
multi = (opal_pmix3x_multi_event_t*)nxt;
for (n=0; n < multi->ncodes; n++) {
if (multi->codes[n] == chain->status) {
@ -228,8 +228,8 @@ static void progress_local_event_hdlr(int status,
* events that match */
chain->multi = NULL;
/* pickup the beginning of the default event list */
if (0 < opal_list_get_size(&mca_pmix_pmix3x_component.default_events)) {
chain->def = (opal_pmix3x_default_event_t*)opal_list_get_begin(&mca_pmix_pmix3x_component.default_events);
if (0 < opal_list_get_size(&mca_pmix_ext3x_component.default_events)) {
chain->def = (opal_pmix3x_default_event_t*)opal_list_get_begin(&mca_pmix_ext3x_component.default_events);
}
}
@ -239,7 +239,7 @@ static void progress_local_event_hdlr(int status,
}
if (NULL != chain->def) {
if (opal_list_get_end(&mca_pmix_pmix3x_component.default_events) != (nxt = opal_list_get_next(&chain->def->super))) {
if (opal_list_get_end(&mca_pmix_ext3x_component.default_events) != (nxt = opal_list_get_next(&chain->def->super))) {
def = (opal_pmix3x_default_event_t*)nxt;
OBJ_RETAIN(chain);
chain->def = def;
@ -290,7 +290,7 @@ static void _event_hdlr(int sd, short args, void *cbdata)
chain->nondefault = cd->nondefault;
/* cycle thru the single-event registrations first */
OPAL_LIST_FOREACH(sing, &mca_pmix_pmix3x_component.single_events, opal_pmix3x_single_event_t) {
OPAL_LIST_FOREACH(sing, &mca_pmix_ext3x_component.single_events, opal_pmix3x_single_event_t) {
if (sing->code == chain->status) {
/* found it - invoke the handler, pointing its
* callback function to our progression function */
@ -308,7 +308,7 @@ static void _event_hdlr(int sd, short args, void *cbdata)
/* if we didn't find any match in the single-event registrations,
* then cycle thru the multi-event registrations next */
OPAL_LIST_FOREACH(multi, &mca_pmix_pmix3x_component.multi_events, opal_pmix3x_multi_event_t) {
OPAL_LIST_FOREACH(multi, &mca_pmix_ext3x_component.multi_events, opal_pmix3x_multi_event_t) {
for (n=0; n < multi->ncodes; n++) {
if (multi->codes[n] == chain->status) {
/* found it - invoke the handler, pointing its
@ -330,7 +330,7 @@ static void _event_hdlr(int sd, short args, void *cbdata)
if (chain->nondefault) {
/* if we get here, then we need to cache this event in case they
* register for it later - we cannot lose individual events */
opal_list_append(&mca_pmix_pmix3x_component.cache, &chain->super);
opal_list_append(&mca_pmix_ext3x_component.cache, &chain->super);
return;
}
@ -338,8 +338,8 @@ static void _event_hdlr(int sd, short args, void *cbdata)
OBJ_RELEASE(cd);
/* finally, pass it to any default handlers */
if (0 < opal_list_get_size(&mca_pmix_pmix3x_component.default_events)) {
def = (opal_pmix3x_default_event_t*)opal_list_get_first(&mca_pmix_pmix3x_component.default_events);
if (0 < opal_list_get_size(&mca_pmix_ext3x_component.default_events)) {
def = (opal_pmix3x_default_event_t*)opal_list_get_first(&mca_pmix_ext3x_component.default_events);
OBJ_RETAIN(chain);
chain->def = def;
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
@ -1045,35 +1045,35 @@ static void _reg_hdlr(int sd, short args, void *cbdata)
/* this is a default handler */
def = OBJ_NEW(opal_pmix3x_default_event_t);
def->handler = cd->evhandler;
def->index = mca_pmix_pmix3x_component.evindex;
def->index = mca_pmix_ext3x_component.evindex;
if (prepend) {
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
"%s PREPENDING TO DEFAULT EVENTS",
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME));
opal_list_prepend(&mca_pmix_pmix3x_component.default_events, &def->super);
opal_list_prepend(&mca_pmix_ext3x_component.default_events, &def->super);
} else {
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
"%s APPENDING TO DEFAULT EVENTS",
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME));
opal_list_append(&mca_pmix_pmix3x_component.default_events, &def->super);
opal_list_append(&mca_pmix_ext3x_component.default_events, &def->super);
}
} else if (1 == opal_list_get_size(cd->event_codes)) {
/* single handler */
sing = OBJ_NEW(opal_pmix3x_single_event_t);
kv = (opal_value_t*)opal_list_get_first(cd->event_codes);
sing->code = kv->data.integer;
sing->index = mca_pmix_pmix3x_component.evindex;
sing->index = mca_pmix_ext3x_component.evindex;
sing->handler = cd->evhandler;
if (prepend) {
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
"%s PREPENDING TO SINGLE EVENTS WITH CODE %d",
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), sing->code);
opal_list_prepend(&mca_pmix_pmix3x_component.single_events, &sing->super);
opal_list_prepend(&mca_pmix_ext3x_component.single_events, &sing->super);
} else {
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
"%s APPENDING TO SINGLE EVENTS WITH CODE %d",
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), sing->code);
opal_list_append(&mca_pmix_pmix3x_component.single_events, &sing->super);
opal_list_append(&mca_pmix_ext3x_component.single_events, &sing->super);
}
} else {
multi = OBJ_NEW(opal_pmix3x_multi_event_t);
@ -1084,35 +1084,35 @@ static void _reg_hdlr(int sd, short args, void *cbdata)
multi->codes[i] = kv->data.integer;
++i;
}
multi->index = mca_pmix_pmix3x_component.evindex;
multi->index = mca_pmix_ext3x_component.evindex;
multi->handler = cd->evhandler;
if (prepend) {
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
"%s PREPENDING TO MULTI EVENTS",
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME));
opal_list_prepend(&mca_pmix_pmix3x_component.multi_events, &multi->super);
opal_list_prepend(&mca_pmix_ext3x_component.multi_events, &multi->super);
} else {
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
"%s APPENDING TO MULTI EVENTS",
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME));
opal_list_append(&mca_pmix_pmix3x_component.multi_events, &multi->super);
opal_list_append(&mca_pmix_ext3x_component.multi_events, &multi->super);
}
}
/* release the caller */
if (NULL != cd->cbfunc) {
cd->cbfunc(OPAL_SUCCESS, mca_pmix_pmix3x_component.evindex, cd->cbdata);
cd->cbfunc(OPAL_SUCCESS, mca_pmix_ext3x_component.evindex, cd->cbdata);
}
mca_pmix_pmix3x_component.evindex++;
mca_pmix_ext3x_component.evindex++;
/* check if any matching notifications have been cached - only nondefault
* events will have been cached*/
if (NULL == def) {
/* check single code registrations */
if (NULL != sing) {
OPAL_LIST_FOREACH(chain, &mca_pmix_pmix3x_component.cache, opal_pmix3x_event_chain_t) {
OPAL_LIST_FOREACH(chain, &mca_pmix_ext3x_component.cache, opal_pmix3x_event_chain_t) {
if (sing->code == chain->status) {
opal_list_remove_item(&mca_pmix_pmix3x_component.cache, &chain->super);
opal_list_remove_item(&mca_pmix_ext3x_component.cache, &chain->super);
chain->sing = sing;
sing->handler(chain->status, &chain->source,
chain->info, &chain->results,
@ -1123,10 +1123,10 @@ static void _reg_hdlr(int sd, short args, void *cbdata)
}
} else if (NULL != multi) {
/* check for multi code registrations */
OPAL_LIST_FOREACH(chain, &mca_pmix_pmix3x_component.cache, opal_pmix3x_event_chain_t) {
OPAL_LIST_FOREACH(chain, &mca_pmix_ext3x_component.cache, opal_pmix3x_event_chain_t) {
for (n=0; n < multi->ncodes; n++) {
if (multi->codes[n] == chain->status) {
opal_list_remove_item(&mca_pmix_pmix3x_component.cache, &chain->super);
opal_list_remove_item(&mca_pmix_ext3x_component.cache, &chain->super);
chain->multi = multi;
multi->handler(chain->status, &chain->source,
chain->info, &chain->results,
@ -1163,25 +1163,25 @@ static void _dereg_hdlr(int sd, short args, void *cbdata)
opal_pmix3x_default_event_t *def;
/* check the single events first */
OPAL_LIST_FOREACH(sing, &mca_pmix_pmix3x_component.single_events, opal_pmix3x_single_event_t) {
OPAL_LIST_FOREACH(sing, &mca_pmix_ext3x_component.single_events, opal_pmix3x_single_event_t) {
if (cd->handler == sing->index) {
opal_list_remove_item(&mca_pmix_pmix3x_component.single_events, &sing->super);
opal_list_remove_item(&mca_pmix_ext3x_component.single_events, &sing->super);
OBJ_RELEASE(sing);
goto release;
}
}
/* check multi events */
OPAL_LIST_FOREACH(multi, &mca_pmix_pmix3x_component.multi_events, opal_pmix3x_multi_event_t) {
OPAL_LIST_FOREACH(multi, &mca_pmix_ext3x_component.multi_events, opal_pmix3x_multi_event_t) {
if (cd->handler == multi->index) {
opal_list_remove_item(&mca_pmix_pmix3x_component.multi_events, &multi->super);
opal_list_remove_item(&mca_pmix_ext3x_component.multi_events, &multi->super);
OBJ_RELEASE(multi);
goto release;
}
}
/* check default events */
OPAL_LIST_FOREACH(def, &mca_pmix_pmix3x_component.default_events, opal_pmix3x_default_event_t) {
OPAL_LIST_FOREACH(def, &mca_pmix_ext3x_component.default_events, opal_pmix3x_default_event_t) {
if (cd->handler == def->index) {
opal_list_remove_item(&mca_pmix_pmix3x_component.default_events, &def->super);
opal_list_remove_item(&mca_pmix_ext3x_component.default_events, &def->super);
OBJ_RELEASE(def);
break;
}
@ -1214,7 +1214,7 @@ static void _notify_event(int sd, short args, void *cbdata)
opal_pmix3x_event_chain_t *chain;
/* check the single events first */
OPAL_LIST_FOREACH(sing, &mca_pmix_pmix3x_component.single_events, opal_pmix3x_single_event_t) {
OPAL_LIST_FOREACH(sing, &mca_pmix_ext3x_component.single_events, opal_pmix3x_single_event_t) {
if (cd->status == sing->code) {
/* found it - invoke the handler, pointing its
* callback function to our progression function */
@ -1237,7 +1237,7 @@ static void _notify_event(int sd, short args, void *cbdata)
}
}
/* check multi events */
OPAL_LIST_FOREACH(multi, &mca_pmix_pmix3x_component.multi_events, opal_pmix3x_multi_event_t) {
OPAL_LIST_FOREACH(multi, &mca_pmix_ext3x_component.multi_events, opal_pmix3x_multi_event_t) {
for (i=0; i < multi->ncodes; i++) {
if (cd->status == multi->codes[i]) {
/* found it - invoke the handler, pointing its
@ -1262,8 +1262,8 @@ static void _notify_event(int sd, short args, void *cbdata)
}
}
/* check default events */
if (0 < opal_list_get_size(&mca_pmix_pmix3x_component.default_events)) {
def = (opal_pmix3x_default_event_t*)opal_list_get_first(&mca_pmix_pmix3x_component.default_events);
if (0 < opal_list_get_size(&mca_pmix_ext3x_component.default_events)) {
def = (opal_pmix3x_default_event_t*)opal_list_get_first(&mca_pmix_ext3x_component.default_events);
chain = OBJ_NEW(opal_pmix3x_event_chain_t);
chain->status = cd->status;
chain->range = pmix3x_convert_opalrange(cd->range);

Просмотреть файл

@ -44,11 +44,11 @@ typedef struct {
opal_list_t default_events;
int cache_size;
opal_list_t cache;
} mca_pmix_pmix3x_component_t;
} mca_pmix_ext3x_component_t;
OPAL_DECLSPEC extern mca_pmix_pmix3x_component_t mca_pmix_pmix3x_component;
OPAL_DECLSPEC extern mca_pmix_ext3x_component_t mca_pmix_ext3x_component;
OPAL_DECLSPEC extern const opal_pmix_base_module_t opal_pmix_pmix3x_module;
OPAL_DECLSPEC extern const opal_pmix_base_module_t opal_pmix_ext3x_module;
/**** INTERNAL OBJECTS ****/
typedef struct {

Просмотреть файл

@ -80,7 +80,7 @@ int pmix3x_client_init(void)
if (NULL != getenv(OPAL_MCA_PREFIX"orte_launch")) {
/* if we were launched by the OMPI RTE, then
* the jobid is in a special format - so get it */
mca_pmix_pmix3x_component.native_launch = true;
mca_pmix_ext3x_component.native_launch = true;
opal_convert_string_to_jobid(&pname.jobid, my_proc.nspace);
} else {
/* we were launched by someone else, so make the
@ -92,7 +92,7 @@ int pmix3x_client_init(void)
job = OBJ_NEW(opal_pmix3x_jobid_trkr_t);
(void)strncpy(job->nspace, my_proc.nspace, PMIX_MAX_NSLEN);
job->jobid = pname.jobid;
opal_list_append(&mca_pmix_pmix3x_component.jobids, &job->super);
opal_list_append(&mca_pmix_ext3x_component.jobids, &job->super);
pname.vpid = pmix3x_convert_rank(my_proc.rank);
opal_proc_set_name(&pname);
@ -146,7 +146,7 @@ int pmix3x_abort(int flag, const char *msg,
/* look thru our list of jobids and find the
* corresponding nspace */
job = NULL;
OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
OPAL_LIST_FOREACH(jptr, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
if (jptr->jobid == ptr->name.jobid) {
job = jptr;
break;
@ -185,7 +185,7 @@ int pmix3x_store_local(const opal_process_name_t *proc, opal_value_t *val)
/* look thru our list of jobids and find the
* corresponding nspace */
job = NULL;
OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
OPAL_LIST_FOREACH(jptr, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
if (jptr->jobid == proc->jobid) {
job = jptr;
break;
@ -251,7 +251,7 @@ int pmix3x_fence(opal_list_t *procs, int collect_data)
/* look thru our list of jobids and find the
* corresponding nspace */
job = NULL;
OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
OPAL_LIST_FOREACH(jptr, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
if (jptr->jobid == ptr->name.jobid) {
job = jptr;
break;
@ -317,7 +317,7 @@ int pmix3x_fencenb(opal_list_t *procs, int collect_data,
/* look thru our list of jobids and find the
* corresponding nspace */
job = NULL;
OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
OPAL_LIST_FOREACH(jptr, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
if (jptr->jobid == ptr->name.jobid) {
job = jptr;
break;
@ -403,7 +403,7 @@ int pmix3x_get(const opal_process_name_t *proc, const char *key,
/* look thru our list of jobids and find the
* corresponding nspace */
job = NULL;
OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
OPAL_LIST_FOREACH(jptr, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
if (jptr->jobid == proc->jobid) {
job = jptr;
break;
@ -512,7 +512,7 @@ int pmix3x_getnb(const opal_process_name_t *proc, const char *key,
/* look thru our list of jobids and find the
* corresponding nspace */
job = NULL;
OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
OPAL_LIST_FOREACH(jptr, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
if (jptr->jobid == proc->jobid) {
job = jptr;
break;
@ -666,7 +666,7 @@ int pmix3x_lookup(opal_list_t *data, opal_list_t *info)
/* transfer the data back */
n=0;
OPAL_LIST_FOREACH(d, data, opal_pmix_pdata_t) {
if (mca_pmix_pmix3x_component.native_launch) {
if (mca_pmix_ext3x_component.native_launch) {
/* if we were launched by the OMPI RTE, then
* the jobid is in a special format - so get it */
opal_convert_string_to_jobid(&d->proc.jobid, pdata[n].proc.nspace);
@ -677,7 +677,7 @@ int pmix3x_lookup(opal_list_t *data, opal_list_t *info)
}
/* if we don't already have it, add this to our jobid tracker */
job = NULL;
OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
OPAL_LIST_FOREACH(jptr, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
if (jptr->jobid == d->proc.jobid) {
job = jptr;
break;
@ -687,7 +687,7 @@ int pmix3x_lookup(opal_list_t *data, opal_list_t *info)
job = OBJ_NEW(opal_pmix3x_jobid_trkr_t);
(void)strncpy(job->nspace, pdata[n].proc.nspace, PMIX_MAX_NSLEN);
job->jobid = d->proc.jobid;
opal_list_append(&mca_pmix_pmix3x_component.jobids, &job->super);
opal_list_append(&mca_pmix_ext3x_component.jobids, &job->super);
}
d->proc.vpid = pmix3x_convert_rank(pdata[n].proc.rank);
rc = pmix3x_value_unload(&d->value, &pdata[n].value);
@ -729,7 +729,7 @@ static void lk_cbfunc(pmix_status_t status,
for (n=0; n < ndata; n++) {
d = OBJ_NEW(opal_pmix_pdata_t);
opal_list_append(&results, &d->super);
if (mca_pmix_pmix3x_component.native_launch) {
if (mca_pmix_ext3x_component.native_launch) {
/* if we were launched by the OMPI RTE, then
* the jobid is in a special format - so get it */
opal_convert_string_to_jobid(&d->proc.jobid, data[n].proc.nspace);
@ -740,7 +740,7 @@ static void lk_cbfunc(pmix_status_t status,
}
/* if we don't already have it, add this to our jobid tracker */
job = NULL;
OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
OPAL_LIST_FOREACH(jptr, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
if (jptr->jobid == d->proc.jobid) {
job = jptr;
break;
@ -750,7 +750,7 @@ static void lk_cbfunc(pmix_status_t status,
job = OBJ_NEW(opal_pmix3x_jobid_trkr_t);
(void)strncpy(job->nspace, data[n].proc.nspace, PMIX_MAX_NSLEN);
job->jobid = d->proc.jobid;
opal_list_append(&mca_pmix_pmix3x_component.jobids, &job->super);
opal_list_append(&mca_pmix_ext3x_component.jobids, &job->super);
}
d->proc.vpid = pmix3x_convert_rank(data[n].proc.rank);
d->value.key = strdup(data[n].key);
@ -910,7 +910,7 @@ int pmix3x_spawn(opal_list_t *job_info, opal_list_t *apps, opal_jobid_t *jobid)
ret = PMIx_Spawn(pinfo, ninfo, papps, napps, nspace);
if (PMIX_SUCCESS == ret) {
if (mca_pmix_pmix3x_component.native_launch) {
if (mca_pmix_ext3x_component.native_launch) {
/* if we were launched by the OMPI RTE, then
* the jobid is in a special format - so get it */
opal_convert_string_to_jobid(jobid, nspace);
@ -923,7 +923,7 @@ int pmix3x_spawn(opal_list_t *job_info, opal_list_t *apps, opal_jobid_t *jobid)
job = OBJ_NEW(opal_pmix3x_jobid_trkr_t);
(void)strncpy(job->nspace, nspace, PMIX_MAX_NSLEN);
job->jobid = *jobid;
opal_list_append(&mca_pmix_pmix3x_component.jobids, &job->super);
opal_list_append(&mca_pmix_ext3x_component.jobids, &job->super);
}
PMIX_APP_FREE(papps, napps);
@ -944,7 +944,7 @@ static void spcbfunc(pmix_status_t status,
rc = pmix3x_convert_rc(status);
if (PMIX_SUCCESS == status) {
if (mca_pmix_pmix3x_component.native_launch) {
if (mca_pmix_ext3x_component.native_launch) {
/* if we were launched by the OMPI RTE, then
* the jobid is in a special format - so get it */
opal_convert_string_to_jobid(&jobid, nspace);
@ -957,7 +957,7 @@ static void spcbfunc(pmix_status_t status,
job = OBJ_NEW(opal_pmix3x_jobid_trkr_t);
(void)strncpy(job->nspace, nspace, PMIX_MAX_NSLEN);
job->jobid = jobid;
opal_list_append(&mca_pmix_pmix3x_component.jobids, &job->super);
opal_list_append(&mca_pmix_ext3x_component.jobids, &job->super);
}
op->spcbfunc(rc, jobid, op->cbdata);
@ -1035,7 +1035,7 @@ int pmix3x_connect(opal_list_t *procs)
/* look thru our list of jobids and find the
* corresponding nspace */
job = NULL;
OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
OPAL_LIST_FOREACH(jptr, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
if (jptr->jobid == ptr->name.jobid) {
job = jptr;
break;
@ -1088,7 +1088,7 @@ int pmix3x_connectnb(opal_list_t *procs,
OPAL_LIST_FOREACH(ptr, procs, opal_namelist_t) {
/* look thru our list of jobids and find the
* corresponding nspace */
OPAL_LIST_FOREACH(job, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
OPAL_LIST_FOREACH(job, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
if (job->jobid == ptr->name.jobid) {
(void)strncpy(op->procs[n].nspace, job->nspace, PMIX_MAX_NSLEN);
break;
@ -1123,7 +1123,7 @@ int pmix3x_disconnect(opal_list_t *procs)
OPAL_LIST_FOREACH(ptr, procs, opal_namelist_t) {
/* look thru our list of jobids and find the
* corresponding nspace */
OPAL_LIST_FOREACH(job, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
OPAL_LIST_FOREACH(job, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
if (job->jobid == ptr->name.jobid) {
(void)strncpy(parray[n].nspace, job->nspace, PMIX_MAX_NSLEN);
break;
@ -1170,7 +1170,7 @@ int pmix3x_disconnectnb(opal_list_t *procs,
OPAL_LIST_FOREACH(ptr, procs, opal_namelist_t) {
/* look thru our list of jobids and find the
* corresponding nspace */
OPAL_LIST_FOREACH(job, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
OPAL_LIST_FOREACH(job, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
if (job->jobid == ptr->name.jobid) {
(void)strncpy(op->procs[n].nspace, job->nspace, PMIX_MAX_NSLEN);
break;
@ -1204,7 +1204,7 @@ int pmix3x_resolve_peers(const char *nodename, opal_jobid_t jobid,
nspace = NULL;
} else {
job = NULL;
OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
OPAL_LIST_FOREACH(jptr, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
if (jptr->jobid == jobid) {
job = jptr;
break;
@ -1223,7 +1223,7 @@ int pmix3x_resolve_peers(const char *nodename, opal_jobid_t jobid,
for (n=0; n < nprocs; n++) {
nm = OBJ_NEW(opal_namelist_t);
opal_list_append(procs, &nm->super);
if (mca_pmix_pmix3x_component.native_launch) {
if (mca_pmix_ext3x_component.native_launch) {
/* if we were launched by the OMPI RTE, then
* the jobid is in a special format - so get it */
opal_convert_string_to_jobid(&nm->name.jobid, array[n].nspace);
@ -1234,7 +1234,7 @@ int pmix3x_resolve_peers(const char *nodename, opal_jobid_t jobid,
}
/* if we don't already have it, add this to our jobid tracker */
job = NULL;
OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
OPAL_LIST_FOREACH(jptr, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
if (jptr->jobid == nm->name.jobid) {
job = jptr;
break;
@ -1244,7 +1244,7 @@ int pmix3x_resolve_peers(const char *nodename, opal_jobid_t jobid,
job = OBJ_NEW(opal_pmix3x_jobid_trkr_t);
(void)strncpy(job->nspace, nspace, PMIX_MAX_NSLEN);
job->jobid = jobid;
opal_list_append(&mca_pmix_pmix3x_component.jobids, &job->super);
opal_list_append(&mca_pmix_ext3x_component.jobids, &job->super);
}
nm->name.vpid = pmix3x_convert_rank(array[n].rank);
}
@ -1267,7 +1267,7 @@ int pmix3x_resolve_nodes(opal_jobid_t jobid, char **nodelist)
/* look thru our list of jobids and find the
* corresponding nspace */
job = NULL;
OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
OPAL_LIST_FOREACH(jptr, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
if (jptr->jobid == jobid) {
job = jptr;
break;

Просмотреть файл

@ -44,7 +44,7 @@ static int external_register(void);
* and pointers to our public functions in it
*/
mca_pmix_pmix3x_component_t mca_pmix_pmix3x_component = {
mca_pmix_ext3x_component_t mca_pmix_ext3x_component = {
{
/* First, the mca_component_t struct containing meta information
about the component itself */
@ -57,7 +57,7 @@ mca_pmix_pmix3x_component_t mca_pmix_pmix3x_component = {
/* Component name and version */
.mca_component_name = "pmix3x",
.mca_component_name = "ext3x",
MCA_BASE_MAKE_VERSION(component, OPAL_MAJOR_VERSION, OPAL_MINOR_VERSION,
OPAL_RELEASE_VERSION),
@ -79,12 +79,12 @@ mca_pmix_pmix3x_component_t mca_pmix_pmix3x_component = {
static int external_register(void)
{
mca_pmix_pmix3x_component.cache_size = 256;
mca_base_component_var_register(&mca_pmix_pmix3x_component.super.base_version,
mca_pmix_ext3x_component.cache_size = 256;
mca_base_component_var_register(&mca_pmix_ext3x_component.super.base_version,
"cache_size", "Size of the ring buffer cache for events",
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, OPAL_INFO_LVL_5,
MCA_BASE_VAR_SCOPE_CONSTANT,
&mca_pmix_pmix3x_component.cache_size);
&mca_pmix_ext3x_component.cache_size);
return OPAL_SUCCESS;
}
@ -92,23 +92,23 @@ static int external_register(void)
static int external_open(void)
{
mca_pmix_pmix3x_component.evindex = 0;
OBJ_CONSTRUCT(&mca_pmix_pmix3x_component.jobids, opal_list_t);
OBJ_CONSTRUCT(&mca_pmix_pmix3x_component.single_events, opal_list_t);
OBJ_CONSTRUCT(&mca_pmix_pmix3x_component.multi_events, opal_list_t);
OBJ_CONSTRUCT(&mca_pmix_pmix3x_component.default_events, opal_list_t);
OBJ_CONSTRUCT(&mca_pmix_pmix3x_component.cache, opal_list_t);
mca_pmix_ext3x_component.evindex = 0;
OBJ_CONSTRUCT(&mca_pmix_ext3x_component.jobids, opal_list_t);
OBJ_CONSTRUCT(&mca_pmix_ext3x_component.single_events, opal_list_t);
OBJ_CONSTRUCT(&mca_pmix_ext3x_component.multi_events, opal_list_t);
OBJ_CONSTRUCT(&mca_pmix_ext3x_component.default_events, opal_list_t);
OBJ_CONSTRUCT(&mca_pmix_ext3x_component.cache, opal_list_t);
return OPAL_SUCCESS;
}
static int external_close(void)
{
OPAL_LIST_DESTRUCT(&mca_pmix_pmix3x_component.jobids);
OPAL_LIST_DESTRUCT(&mca_pmix_pmix3x_component.single_events);
OPAL_LIST_DESTRUCT(&mca_pmix_pmix3x_component.multi_events);
OPAL_LIST_DESTRUCT(&mca_pmix_pmix3x_component.default_events);
OPAL_LIST_DESTRUCT(&mca_pmix_pmix3x_component.cache);
OPAL_LIST_DESTRUCT(&mca_pmix_ext3x_component.jobids);
OPAL_LIST_DESTRUCT(&mca_pmix_ext3x_component.single_events);
OPAL_LIST_DESTRUCT(&mca_pmix_ext3x_component.multi_events);
OPAL_LIST_DESTRUCT(&mca_pmix_ext3x_component.default_events);
OPAL_LIST_DESTRUCT(&mca_pmix_ext3x_component.cache);
return OPAL_SUCCESS;
}
@ -126,6 +126,6 @@ static int external_component_query(mca_base_module_t **module, int *priority)
/* we could be a server, so we still need to be considered */
*priority = 5;
}
*module = (mca_base_module_t *)&opal_pmix_pmix3x_module;
*module = (mca_base_module_t *)&opal_pmix_ext3x_module;
return OPAL_SUCCESS;
}

Просмотреть файл

@ -107,7 +107,7 @@ int pmix3x_server_init(opal_pmix_server_module_t *module,
job = OBJ_NEW(opal_pmix3x_jobid_trkr_t);
(void)opal_snprintf_jobid(job->nspace, PMIX_MAX_NSLEN, OPAL_PROC_MY_NAME.jobid);
job->jobid = OPAL_PROC_MY_NAME.jobid;
opal_list_append(&mca_pmix_pmix3x_component.jobids, &job->super);
opal_list_append(&mca_pmix_ext3x_component.jobids, &job->super);
if (PMIX_SUCCESS != (rc = PMIx_server_init(&mymodule, pinfo, sz))) {
PMIX_INFO_FREE(pinfo, sz);
@ -200,7 +200,7 @@ static void _reg_nspace(int sd, short args, void *cbdata)
job = OBJ_NEW(opal_pmix3x_jobid_trkr_t);
(void)strncpy(job->nspace, nspace, PMIX_MAX_NSLEN);
job->jobid = cd->jobid;
opal_list_append(&mca_pmix_pmix3x_component.jobids, &job->super);
opal_list_append(&mca_pmix_ext3x_component.jobids, &job->super);
/* convert the list to an array of pmix_info_t */
if (NULL != cd->info) {
@ -305,7 +305,7 @@ static void _dereg_nspace(int sd, short args, void *cbdata)
opal_pmix3x_jobid_trkr_t *jptr;
/* if we don't already have it, we can ignore this */
OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
OPAL_LIST_FOREACH(jptr, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
if (jptr->jobid == cd->jobid) {
/* found it - tell the server to deregister */
cd->active = true;
@ -313,7 +313,7 @@ static void _dereg_nspace(int sd, short args, void *cbdata)
PMIX_WAIT_FOR_COMPLETION(cd->active);
OBJ_RELEASE(cd);
/* now get rid of it from our list */
opal_list_remove_item(&mca_pmix_pmix3x_component.jobids, &jptr->super);
opal_list_remove_item(&mca_pmix_ext3x_component.jobids, &jptr->super);
OBJ_RELEASE(jptr);
return;
}
@ -376,7 +376,7 @@ static void _dereg_client(int sd, short args, void *cbdata)
pmix_proc_t p;
/* if we don't already have it, we can ignore this */
OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
OPAL_LIST_FOREACH(jptr, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
if (jptr->jobid == cd->source->jobid) {
/* found it - tell the server to deregister */
(void)strncpy(p.nspace, jptr->nspace, PMIX_MAX_NSLEN);