Skip to content

Commit 2d94845

Browse files
author
rhc54
authored
Merge pull request #2257 from rhc54/topic/pmixext3
Cleanup external PMIx v3 component for copy/paste errors - component and module require unique names
2 parents 9538f4d + 2f966bf commit 2d94845

File tree

7 files changed

+192
-93
lines changed

7 files changed

+192
-93
lines changed

contrib/platform/intel/bend/ext

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
enable_orterun_prefix_by_default=yes
2+
enable_mpi_thread_multiple=no
3+
enable_mem_debug=no
4+
enable_mem_profile=no
5+
enable_debug_symbols=yes
6+
enable_binaries=yes
7+
enable_heterogeneous=no
8+
enable_picky=yes
9+
enable_debug=yes
10+
enable_shared=yes
11+
enable_static=no
12+
enable_memchecker=no
13+
enable_ipv6=no
14+
enable_mpi_fortran=yes
15+
enable_mpi_cxx=no
16+
enable_mpi_cxx_seek=no
17+
enable_cxx_exceptions=no
18+
enable_mpi_java=no
19+
enable_io_romio=no
20+
enable_contrib_no_build=libnbc
21+
with_memory_manager=no
22+
with_tm=no
23+
with_devel_headers=yes
24+
with_portals=no
25+
with_valgrind=no
26+
if [ -n "$SLURMHOME" ] ; then
27+
with_slurm=$SLURMHOME
28+
with_pmi=$SLURMHOME
29+
else
30+
with_slurm=no
31+
fi
32+
with_libevent=/home/common/local
33+
with_hwloc=/home/common/local
34+
with_pmix=/home/common/pmix/build/ompi

contrib/platform/intel/bend/ext.conf

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
#
2+
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
3+
# University Research and Technology
4+
# Corporation. All rights reserved.
5+
# Copyright (c) 2004-2005 The University of Tennessee and The University
6+
# of Tennessee Research Foundation. All rights
7+
# reserved.
8+
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
9+
# University of Stuttgart. All rights reserved.
10+
# Copyright (c) 2004-2005 The Regents of the University of California.
11+
# All rights reserved.
12+
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
13+
# Copyright (c) 2016 Intel, Inc. All rights reserved.
14+
# $COPYRIGHT$
15+
#
16+
# Additional copyrights may follow
17+
#
18+
# $HEADER$
19+
#
20+
21+
# This is the default system-wide MCA parameters defaults file.
22+
# Specifically, the MCA parameter "mca_param_files" defaults to a
23+
# value of
24+
# "$HOME/.openmpi/mca-params.conf:$sysconf/openmpi-mca-params.conf"
25+
# (this file is the latter of the two). So if the default value of
26+
# mca_param_files is not changed, this file is used to set system-wide
27+
# MCA parameters. This file can therefore be used to set system-wide
28+
# default MCA parameters for all users. Of course, users can override
29+
# these values if they want, but this file is an excellent location
30+
# for setting system-specific MCA parameters for those users who don't
31+
# know / care enough to investigate the proper values for them.
32+
33+
# Note that this file is only applicable where it is visible (in a
34+
# filesystem sense). Specifically, MPI processes each read this file
35+
# during their startup to determine what default values for MCA
36+
# parameters should be used. mpirun does not bundle up the values in
37+
# this file from the node where it was run and send them to all nodes;
38+
# the default value decisions are effectively distributed. Hence,
39+
# these values are only applicable on nodes that "see" this file. If
40+
# $sysconf is a directory on a local disk, it is likely that changes
41+
# to this file will need to be propagated to other nodes. If $sysconf
42+
# is a directory that is shared via a networked filesystem, changes to
43+
# this file will be visible to all nodes that share this $sysconf.
44+
45+
# The format is straightforward: one per line, mca_param_name =
46+
# rvalue. Quoting is ignored (so if you use quotes or escape
47+
# characters, they'll be included as part of the value). For example:
48+
49+
# Disable run-time MPI parameter checking
50+
# mpi_param_check = 0
51+
52+
# Note that the value "~/" will be expanded to the current user's home
53+
# directory. For example:
54+
55+
# Change component loading path
56+
# component_path = /usr/local/lib/openmpi:~/my_openmpi_components
57+
58+
# See "ompi_info --param all all" for a full listing of Open MPI MCA
59+
# parameters available and their default values.
60+
#
61+
62+
# Basic behavior to smooth startup
63+
mca_base_component_show_load_errors = 1
64+
orte_abort_timeout = 10
65+
hwloc_base_mem_bind_failure_action = silent

opal/mca/pmix/ext3x/pmix3x.c

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ static void pmix3x_query(opal_list_t *queries,
6767
static void pmix3x_log(opal_list_t *info,
6868
opal_pmix_op_cbfunc_t cbfunc, void *cbdata);
6969

70-
const opal_pmix_base_module_t opal_pmix_pmix3x_module = {
70+
const opal_pmix_base_module_t opal_pmix_ext3x_module = {
7171
/* client APIs */
7272
.init = pmix3x_client_init,
7373
.finalize = pmix3x_client_finalize,
@@ -121,7 +121,7 @@ static const char *pmix3x_get_nspace(opal_jobid_t jobid)
121121
{
122122
opal_pmix3x_jobid_trkr_t *jptr;
123123

124-
OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
124+
OPAL_LIST_FOREACH(jptr, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
125125
if (jptr->jobid == jobid) {
126126
return jptr->nspace;
127127
}
@@ -134,15 +134,15 @@ static void pmix3x_register_jobid(opal_jobid_t jobid, const char *nspace)
134134
opal_pmix3x_jobid_trkr_t *jptr;
135135

136136
/* if we don't already have it, add this to our jobid tracker */
137-
OPAL_LIST_FOREACH(jptr, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
137+
OPAL_LIST_FOREACH(jptr, &mca_pmix_ext3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
138138
if (jptr->jobid == jobid) {
139139
return;
140140
}
141141
}
142142
jptr = OBJ_NEW(opal_pmix3x_jobid_trkr_t);
143143
(void)strncpy(jptr->nspace, nspace, PMIX_MAX_NSLEN);
144144
jptr->jobid = jobid;
145-
opal_list_append(&mca_pmix_pmix3x_component.jobids, &jptr->super);
145+
opal_list_append(&mca_pmix_ext3x_component.jobids, &jptr->super);
146146
}
147147

148148
static void completion_handler(int status, void *cbdata)
@@ -181,7 +181,7 @@ static void progress_local_event_hdlr(int status,
181181
if (NULL != chain->sing) {
182182
/* the last handler was for a single code - see if there are
183183
* any others that match this event */
184-
while (opal_list_get_end(&mca_pmix_pmix3x_component.single_events) != (nxt = opal_list_get_next(&chain->sing->super))) {
184+
while (opal_list_get_end(&mca_pmix_ext3x_component.single_events) != (nxt = opal_list_get_next(&chain->sing->super))) {
185185
sing = (opal_pmix3x_single_event_t*)nxt;
186186
if (sing->code == chain->status) {
187187
OBJ_RETAIN(chain);
@@ -199,14 +199,14 @@ static void progress_local_event_hdlr(int status,
199199
* events that match */
200200
chain->sing = NULL;
201201
/* pickup the beginning of the multi-code event list */
202-
if (0 < opal_list_get_size(&mca_pmix_pmix3x_component.multi_events)) {
203-
chain->multi = (opal_pmix3x_multi_event_t*)opal_list_get_begin(&mca_pmix_pmix3x_component.multi_events);
202+
if (0 < opal_list_get_size(&mca_pmix_ext3x_component.multi_events)) {
203+
chain->multi = (opal_pmix3x_multi_event_t*)opal_list_get_begin(&mca_pmix_ext3x_component.multi_events);
204204
}
205205
}
206206

207207
/* see if we need to continue with the multi code events */
208208
if (NULL != chain->multi) {
209-
while (opal_list_get_end(&mca_pmix_pmix3x_component.multi_events) != (nxt = opal_list_get_next(&chain->multi->super))) {
209+
while (opal_list_get_end(&mca_pmix_ext3x_component.multi_events) != (nxt = opal_list_get_next(&chain->multi->super))) {
210210
multi = (opal_pmix3x_multi_event_t*)nxt;
211211
for (n=0; n < multi->ncodes; n++) {
212212
if (multi->codes[n] == chain->status) {
@@ -228,8 +228,8 @@ static void progress_local_event_hdlr(int status,
228228
* events that match */
229229
chain->multi = NULL;
230230
/* pickup the beginning of the default event list */
231-
if (0 < opal_list_get_size(&mca_pmix_pmix3x_component.default_events)) {
232-
chain->def = (opal_pmix3x_default_event_t*)opal_list_get_begin(&mca_pmix_pmix3x_component.default_events);
231+
if (0 < opal_list_get_size(&mca_pmix_ext3x_component.default_events)) {
232+
chain->def = (opal_pmix3x_default_event_t*)opal_list_get_begin(&mca_pmix_ext3x_component.default_events);
233233
}
234234
}
235235

@@ -239,7 +239,7 @@ static void progress_local_event_hdlr(int status,
239239
}
240240

241241
if (NULL != chain->def) {
242-
if (opal_list_get_end(&mca_pmix_pmix3x_component.default_events) != (nxt = opal_list_get_next(&chain->def->super))) {
242+
if (opal_list_get_end(&mca_pmix_ext3x_component.default_events) != (nxt = opal_list_get_next(&chain->def->super))) {
243243
def = (opal_pmix3x_default_event_t*)nxt;
244244
OBJ_RETAIN(chain);
245245
chain->def = def;
@@ -290,7 +290,7 @@ static void _event_hdlr(int sd, short args, void *cbdata)
290290
chain->nondefault = cd->nondefault;
291291

292292
/* cycle thru the single-event registrations first */
293-
OPAL_LIST_FOREACH(sing, &mca_pmix_pmix3x_component.single_events, opal_pmix3x_single_event_t) {
293+
OPAL_LIST_FOREACH(sing, &mca_pmix_ext3x_component.single_events, opal_pmix3x_single_event_t) {
294294
if (sing->code == chain->status) {
295295
/* found it - invoke the handler, pointing its
296296
* callback function to our progression function */
@@ -308,7 +308,7 @@ static void _event_hdlr(int sd, short args, void *cbdata)
308308

309309
/* if we didn't find any match in the single-event registrations,
310310
* then cycle thru the multi-event registrations next */
311-
OPAL_LIST_FOREACH(multi, &mca_pmix_pmix3x_component.multi_events, opal_pmix3x_multi_event_t) {
311+
OPAL_LIST_FOREACH(multi, &mca_pmix_ext3x_component.multi_events, opal_pmix3x_multi_event_t) {
312312
for (n=0; n < multi->ncodes; n++) {
313313
if (multi->codes[n] == chain->status) {
314314
/* found it - invoke the handler, pointing its
@@ -330,16 +330,16 @@ static void _event_hdlr(int sd, short args, void *cbdata)
330330
if (chain->nondefault) {
331331
/* if we get here, then we need to cache this event in case they
332332
* register for it later - we cannot lose individual events */
333-
opal_list_append(&mca_pmix_pmix3x_component.cache, &chain->super);
333+
opal_list_append(&mca_pmix_ext3x_component.cache, &chain->super);
334334
return;
335335
}
336336

337337
/* we are done with the threadshift caddy */
338338
OBJ_RELEASE(cd);
339339

340340
/* finally, pass it to any default handlers */
341-
if (0 < opal_list_get_size(&mca_pmix_pmix3x_component.default_events)) {
342-
def = (opal_pmix3x_default_event_t*)opal_list_get_first(&mca_pmix_pmix3x_component.default_events);
341+
if (0 < opal_list_get_size(&mca_pmix_ext3x_component.default_events)) {
342+
def = (opal_pmix3x_default_event_t*)opal_list_get_first(&mca_pmix_ext3x_component.default_events);
343343
OBJ_RETAIN(chain);
344344
chain->def = def;
345345
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
@@ -1045,35 +1045,35 @@ static void _reg_hdlr(int sd, short args, void *cbdata)
10451045
/* this is a default handler */
10461046
def = OBJ_NEW(opal_pmix3x_default_event_t);
10471047
def->handler = cd->evhandler;
1048-
def->index = mca_pmix_pmix3x_component.evindex;
1048+
def->index = mca_pmix_ext3x_component.evindex;
10491049
if (prepend) {
10501050
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
10511051
"%s PREPENDING TO DEFAULT EVENTS",
10521052
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME));
1053-
opal_list_prepend(&mca_pmix_pmix3x_component.default_events, &def->super);
1053+
opal_list_prepend(&mca_pmix_ext3x_component.default_events, &def->super);
10541054
} else {
10551055
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
10561056
"%s APPENDING TO DEFAULT EVENTS",
10571057
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME));
1058-
opal_list_append(&mca_pmix_pmix3x_component.default_events, &def->super);
1058+
opal_list_append(&mca_pmix_ext3x_component.default_events, &def->super);
10591059
}
10601060
} else if (1 == opal_list_get_size(cd->event_codes)) {
10611061
/* single handler */
10621062
sing = OBJ_NEW(opal_pmix3x_single_event_t);
10631063
kv = (opal_value_t*)opal_list_get_first(cd->event_codes);
10641064
sing->code = kv->data.integer;
1065-
sing->index = mca_pmix_pmix3x_component.evindex;
1065+
sing->index = mca_pmix_ext3x_component.evindex;
10661066
sing->handler = cd->evhandler;
10671067
if (prepend) {
10681068
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
10691069
"%s PREPENDING TO SINGLE EVENTS WITH CODE %d",
10701070
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), sing->code);
1071-
opal_list_prepend(&mca_pmix_pmix3x_component.single_events, &sing->super);
1071+
opal_list_prepend(&mca_pmix_ext3x_component.single_events, &sing->super);
10721072
} else {
10731073
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
10741074
"%s APPENDING TO SINGLE EVENTS WITH CODE %d",
10751075
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), sing->code);
1076-
opal_list_append(&mca_pmix_pmix3x_component.single_events, &sing->super);
1076+
opal_list_append(&mca_pmix_ext3x_component.single_events, &sing->super);
10771077
}
10781078
} else {
10791079
multi = OBJ_NEW(opal_pmix3x_multi_event_t);
@@ -1084,35 +1084,35 @@ static void _reg_hdlr(int sd, short args, void *cbdata)
10841084
multi->codes[i] = kv->data.integer;
10851085
++i;
10861086
}
1087-
multi->index = mca_pmix_pmix3x_component.evindex;
1087+
multi->index = mca_pmix_ext3x_component.evindex;
10881088
multi->handler = cd->evhandler;
10891089
if (prepend) {
10901090
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
10911091
"%s PREPENDING TO MULTI EVENTS",
10921092
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME));
1093-
opal_list_prepend(&mca_pmix_pmix3x_component.multi_events, &multi->super);
1093+
opal_list_prepend(&mca_pmix_ext3x_component.multi_events, &multi->super);
10941094
} else {
10951095
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
10961096
"%s APPENDING TO MULTI EVENTS",
10971097
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME));
1098-
opal_list_append(&mca_pmix_pmix3x_component.multi_events, &multi->super);
1098+
opal_list_append(&mca_pmix_ext3x_component.multi_events, &multi->super);
10991099
}
11001100
}
11011101

11021102
/* release the caller */
11031103
if (NULL != cd->cbfunc) {
1104-
cd->cbfunc(OPAL_SUCCESS, mca_pmix_pmix3x_component.evindex, cd->cbdata);
1104+
cd->cbfunc(OPAL_SUCCESS, mca_pmix_ext3x_component.evindex, cd->cbdata);
11051105
}
1106-
mca_pmix_pmix3x_component.evindex++;
1106+
mca_pmix_ext3x_component.evindex++;
11071107

11081108
/* check if any matching notifications have been cached - only nondefault
11091109
* events will have been cached*/
11101110
if (NULL == def) {
11111111
/* check single code registrations */
11121112
if (NULL != sing) {
1113-
OPAL_LIST_FOREACH(chain, &mca_pmix_pmix3x_component.cache, opal_pmix3x_event_chain_t) {
1113+
OPAL_LIST_FOREACH(chain, &mca_pmix_ext3x_component.cache, opal_pmix3x_event_chain_t) {
11141114
if (sing->code == chain->status) {
1115-
opal_list_remove_item(&mca_pmix_pmix3x_component.cache, &chain->super);
1115+
opal_list_remove_item(&mca_pmix_ext3x_component.cache, &chain->super);
11161116
chain->sing = sing;
11171117
sing->handler(chain->status, &chain->source,
11181118
chain->info, &chain->results,
@@ -1123,10 +1123,10 @@ static void _reg_hdlr(int sd, short args, void *cbdata)
11231123
}
11241124
} else if (NULL != multi) {
11251125
/* check for multi code registrations */
1126-
OPAL_LIST_FOREACH(chain, &mca_pmix_pmix3x_component.cache, opal_pmix3x_event_chain_t) {
1126+
OPAL_LIST_FOREACH(chain, &mca_pmix_ext3x_component.cache, opal_pmix3x_event_chain_t) {
11271127
for (n=0; n < multi->ncodes; n++) {
11281128
if (multi->codes[n] == chain->status) {
1129-
opal_list_remove_item(&mca_pmix_pmix3x_component.cache, &chain->super);
1129+
opal_list_remove_item(&mca_pmix_ext3x_component.cache, &chain->super);
11301130
chain->multi = multi;
11311131
multi->handler(chain->status, &chain->source,
11321132
chain->info, &chain->results,
@@ -1163,25 +1163,25 @@ static void _dereg_hdlr(int sd, short args, void *cbdata)
11631163
opal_pmix3x_default_event_t *def;
11641164

11651165
/* check the single events first */
1166-
OPAL_LIST_FOREACH(sing, &mca_pmix_pmix3x_component.single_events, opal_pmix3x_single_event_t) {
1166+
OPAL_LIST_FOREACH(sing, &mca_pmix_ext3x_component.single_events, opal_pmix3x_single_event_t) {
11671167
if (cd->handler == sing->index) {
1168-
opal_list_remove_item(&mca_pmix_pmix3x_component.single_events, &sing->super);
1168+
opal_list_remove_item(&mca_pmix_ext3x_component.single_events, &sing->super);
11691169
OBJ_RELEASE(sing);
11701170
goto release;
11711171
}
11721172
}
11731173
/* check multi events */
1174-
OPAL_LIST_FOREACH(multi, &mca_pmix_pmix3x_component.multi_events, opal_pmix3x_multi_event_t) {
1174+
OPAL_LIST_FOREACH(multi, &mca_pmix_ext3x_component.multi_events, opal_pmix3x_multi_event_t) {
11751175
if (cd->handler == multi->index) {
1176-
opal_list_remove_item(&mca_pmix_pmix3x_component.multi_events, &multi->super);
1176+
opal_list_remove_item(&mca_pmix_ext3x_component.multi_events, &multi->super);
11771177
OBJ_RELEASE(multi);
11781178
goto release;
11791179
}
11801180
}
11811181
/* check default events */
1182-
OPAL_LIST_FOREACH(def, &mca_pmix_pmix3x_component.default_events, opal_pmix3x_default_event_t) {
1182+
OPAL_LIST_FOREACH(def, &mca_pmix_ext3x_component.default_events, opal_pmix3x_default_event_t) {
11831183
if (cd->handler == def->index) {
1184-
opal_list_remove_item(&mca_pmix_pmix3x_component.default_events, &def->super);
1184+
opal_list_remove_item(&mca_pmix_ext3x_component.default_events, &def->super);
11851185
OBJ_RELEASE(def);
11861186
break;
11871187
}
@@ -1214,7 +1214,7 @@ static void _notify_event(int sd, short args, void *cbdata)
12141214
opal_pmix3x_event_chain_t *chain;
12151215

12161216
/* check the single events first */
1217-
OPAL_LIST_FOREACH(sing, &mca_pmix_pmix3x_component.single_events, opal_pmix3x_single_event_t) {
1217+
OPAL_LIST_FOREACH(sing, &mca_pmix_ext3x_component.single_events, opal_pmix3x_single_event_t) {
12181218
if (cd->status == sing->code) {
12191219
/* found it - invoke the handler, pointing its
12201220
* callback function to our progression function */
@@ -1237,7 +1237,7 @@ static void _notify_event(int sd, short args, void *cbdata)
12371237
}
12381238
}
12391239
/* check multi events */
1240-
OPAL_LIST_FOREACH(multi, &mca_pmix_pmix3x_component.multi_events, opal_pmix3x_multi_event_t) {
1240+
OPAL_LIST_FOREACH(multi, &mca_pmix_ext3x_component.multi_events, opal_pmix3x_multi_event_t) {
12411241
for (i=0; i < multi->ncodes; i++) {
12421242
if (cd->status == multi->codes[i]) {
12431243
/* found it - invoke the handler, pointing its
@@ -1262,8 +1262,8 @@ static void _notify_event(int sd, short args, void *cbdata)
12621262
}
12631263
}
12641264
/* check default events */
1265-
if (0 < opal_list_get_size(&mca_pmix_pmix3x_component.default_events)) {
1266-
def = (opal_pmix3x_default_event_t*)opal_list_get_first(&mca_pmix_pmix3x_component.default_events);
1265+
if (0 < opal_list_get_size(&mca_pmix_ext3x_component.default_events)) {
1266+
def = (opal_pmix3x_default_event_t*)opal_list_get_first(&mca_pmix_ext3x_component.default_events);
12671267
chain = OBJ_NEW(opal_pmix3x_event_chain_t);
12681268
chain->status = cd->status;
12691269
chain->range = pmix3x_convert_opalrange(cd->range);

opal/mca/pmix/ext3x/pmix3x.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ typedef struct {
4444
opal_list_t default_events;
4545
int cache_size;
4646
opal_list_t cache;
47-
} mca_pmix_pmix3x_component_t;
47+
} mca_pmix_ext3x_component_t;
4848

49-
OPAL_DECLSPEC extern mca_pmix_pmix3x_component_t mca_pmix_pmix3x_component;
49+
OPAL_DECLSPEC extern mca_pmix_ext3x_component_t mca_pmix_ext3x_component;
5050

51-
OPAL_DECLSPEC extern const opal_pmix_base_module_t opal_pmix_pmix3x_module;
51+
OPAL_DECLSPEC extern const opal_pmix_base_module_t opal_pmix_ext3x_module;
5252

5353
/**** INTERNAL OBJECTS ****/
5454
typedef struct {

0 commit comments

Comments
 (0)