Skip to content

Commit a291917

Browse files
author
Ralph Castain
committed
Bring the RML modifications across. This is the first step in a revamp of the ORTE messaging subsystem to support fabric-based communications during launch and wireup phases. When completed, the grpcomm and plm frameworks will each have their own "conduit" for communication - each conduit corresponds to a particular RML messaging transport. This can be the active OOB-based component, or a provider from within the RML/OFI component. Messages sent down the conduit will flow across the associated transport.
Multiple conduits can exist at the same time, and can even point to the same base transport. Each conduit can have its own characteristics (e.g., flow control) based on the info keys provided to the "open_conduit" call. For ease during the transition period, the "legacy" RML interfaces remain as wrappers over the new conduit-based APIs using a default conduit opened during orte_init - this default conduit is tied to the OOB framework so that current behaviors are preserved. Once the transition has been completed, a one-time cleanup will be done to update all RML calls to the new APIs and the "legacy" interfaces will be deleted. While we are at it: Remove oob/usock component to eliminate the TMPDIR length problem - get all working, including oob_stress
1 parent 432d790 commit a291917

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+3702
-4635
lines changed

config/ltmain_nag_pthread.diff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
+++ config/ltmain.sh
33
@@ -6417,8 +6417,14 @@
44
func_source "$lib"
5-
5+
66
# Convert "-framework foo" to "foo.ltframework"
77
+ # and "-pthread" to "-Wl,-pthread" if NAG compiler
88
if test -n "$inherited_linker_flags"; then

config/ompi_check_psm.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ dnl and Technology (RIST). All rights reserved.
1717
dnl Copyright (c) 2016 Los Alamos National Security, LLC. All rights
1818
dnl reserved.
1919
dnl Copyright (c) 2016 Intel Corporation. All rights reserved.
20-
dnl
20+
dnl
2121
dnl $COPYRIGHT$
2222
dnl
2323
dnl Additional copyrights may follow

config/ompi_check_ucx.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
# OMPI_CHECK_UCX(prefix, [action-if-found], [action-if-not-found])
1717
# --------------------------------------------------------
18-
# check if UCX support can be found. sets prefix_{CPPFLAGS,
18+
# check if UCX support can be found. sets prefix_{CPPFLAGS,
1919
# LDFLAGS, LIBS} as needed and runs action-if-found if there is
2020
# support, otherwise executes action-if-not-found
2121
AC_DEFUN([OMPI_CHECK_UCX],[

config/opal_check_xpmem.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
# --------------------------------------------------------
3131
AC_DEFUN([OPAL_CHECK_CRAY_XPMEM],[
3232
if test -z "$opal_check_cray_xpmem_happy" ; then
33-
AC_ARG_WITH([cray_xpmem],
33+
AC_ARG_WITH([cray_xpmem],
3434
[AC_HELP_STRING([--with-cray-xpmem(=yes/no)],
3535
[Build Cray XPMEM support(default: auto)])],
3636
[], with_cray_xpmem=auto)

config/opal_setup_wrappers.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ EOF
263263
chmod +x $rpath_script
264264
wl_fc=`./$rpath_script`
265265
rm -f $rpath_script
266-
266+
267267
LDFLAGS="$LDFLAGS_save ${wl_fc}--enable-new-dtags"
268268
AC_LANG_PUSH([Fortran])
269269
AC_LINK_IFELSE([AC_LANG_SOURCE([[program test

contrib/ompi-time.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -287,10 +287,10 @@ function do_analysis() {
287287
288288
if [ ! -e $tesdir ]; then
289289
do_err "can not find testdir: $testdir"
290-
fi
290+
fi
291291
if [ -z $basefile -o ! -f $basefile ]; then
292292
do_err "can not find basefile: $basefile"
293-
fi
293+
fi
294294
if [ -z $outfile -o ! -f $outfile ]; then
295295
do_err "can not find outfile: $outfile"
296296
fi
@@ -323,7 +323,7 @@ function do_analysis() {
323323
max_line=`sort -n $outfile1 | tail -n1`
324324
if [ -z "$min_line" -o -z "$max_line" ]; then
325325
do_err "can not find max/min lines in : $outfile1"
326-
fi
326+
fi
327327
min_t=$( echo "$min_line" | cut -f1 -d$'\t')
328328
max_t=$( echo "$max_line" | cut -f1 -d$'\t')
329329
echo -e "`bc -l <<< "scale=3; (($min_t - $start_t) / 1000000)"`\t`echo "$min_line" | cut -f4 -d$'\t'`\t`echo "$min_line" | cut -f5 -d$'\t'`" >> $resultfile 2>&1
@@ -341,7 +341,7 @@ function do_report() {
341341
342342
if [ -z $resultfile -o ! -f $resultfile ]; then
343343
do_err "can not find resultfile: $resultfile"
344-
fi
344+
fi
345345
min_t=`awk -F $'\t' '{ if (NR == 1) print $1 }' $resultfile`
346346
max_t=`awk -F $'\t' '{ if (NR == 2) print $1 }' $resultfile`
347347
echo -e "${nodes}\t${ppn}\t${min_t}\t${max_t}" >> $reportfile 2>&1
@@ -374,7 +374,7 @@ static inline void timestamp(FILE *file)
374374
int procid = -1;
375375
char *str = NULL;
376376
377-
gettimeofday(&tv, NULL);
377+
gettimeofday(&tv, NULL);
378378
379379
if (gethostname(name, sizeof(name)) != 0)
380380
strcpy(name, "localhost");
@@ -485,7 +485,7 @@ function do_parse() {
485485
test_list="${test_list} ${test}"
486486
done
487487
done
488-
488+
489489
result_list=`echo $result_list | tr " " "\n" | sort | uniq | tr "\n" " "`
490490
test_list=`echo $test_list | tr " " "\n" | sort | uniq | tr "\n" " "`
491491
@@ -994,7 +994,7 @@ int orte_rml_base_update_contact_info(void * data)
994994
FILE *fd = NULL;
995995
char filename[1024];
996996
char *str = getenv("SLURM_PROCID");
997-
997+
998998
if (str) {
999999
sprintf(filename, "%s.%s", "$outfile", str);
10001000
fd = fopen(filename, "a");
@@ -1070,7 +1070,7 @@ int orte_rml_base_update_contact_info(void * data)
10701070
FILE *fd = NULL;
10711071
char filename[1024];
10721072
char *str = getenv("SLURM_PROCID");
1073-
1073+
10741074
if (str) {
10751075
sprintf(filename, "%s.%s", "$outfile", str);
10761076
fd = fopen(filename, "a");

ompi/communicator/comm_cid.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ static int ompi_comm_allreduce_getnextcid (ompi_comm_request_t *request)
340340
if (flag) {
341341
opal_pointer_array_test_and_set_item(&ompi_mpi_communicators, context->nextlocal_cid, NULL);
342342
}
343-
343+
344344
ompi_comm_cid_lowest_id = INT64_MAX;
345345
OPAL_THREAD_UNLOCK(&ompi_cid_lock);
346346
return OMPI_ERR_OUT_OF_RESOURCE;

orte/include/orte/constants.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,8 @@ enum {
154154
ORTE_ERR_OUT_OF_ORDER_MSG = (ORTE_ERR_BASE - 55),
155155
ORTE_ERR_OPEN_CHANNEL_DUPLICATE = (ORTE_ERR_BASE - 56),
156156
ORTE_ERR_FORCE_SELECT = (ORTE_ERR_BASE - 57),
157-
ORTE_ERR_JOB_CANCELLED = (ORTE_ERR_BASE - 58)
157+
ORTE_ERR_JOB_CANCELLED = (ORTE_ERR_BASE - 58),
158+
ORTE_ERR_CONDUIT_SEND_FAIL = (ORTE_ERR_BASE - 59)
158159
};
159160

160161
#define ORTE_ERR_MAX (ORTE_ERR_BASE - 100)

orte/mca/ess/base/ess_base_std_app.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* Copyright (c) 2013-2016 Intel, Inc. All rights reserved.
1616
* Copyright (c) 2014 Research Organization for Information Science
1717
* and Technology (RIST). All rights reserved.
18-
* Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
18+
* Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
1919
* $COPYRIGHT$
2020
*
2121
* Additional copyrights may follow
@@ -201,12 +201,6 @@ int orte_ess_base_app_setup(bool db_restrict_local)
201201
error = "orte_grpcomm_base_select";
202202
goto error;
203203
}
204-
/* enable communication via the rml */
205-
if (ORTE_SUCCESS != (ret = orte_rml.enable_comm())) {
206-
ORTE_ERROR_LOG(ret);
207-
error = "orte_rml.enable_comm";
208-
goto error;
209-
}
210204
/* setup the routed info */
211205
if (ORTE_SUCCESS != (ret = orte_routed.init_routes(ORTE_PROC_MY_NAME->jobid, NULL))) {
212206
ORTE_ERROR_LOG(ret);

orte/mca/ess/base/ess_base_std_orted.c

Lines changed: 45 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,29 @@ int orte_ess_base_orted_setup(char **hosts)
356356
/* obviously, we have "reported" */
357357
jdata->num_reported = 1;
358358

359+
/* setup the PMIx framework - ensure it skips all non-PMIx components,
360+
* but do not override anything we were given */
361+
opal_setenv("OMPI_MCA_pmix", "^s1,s2,cray,isolated", false, &environ);
362+
if (OPAL_SUCCESS != (ret = mca_base_framework_open(&opal_pmix_base_framework, 0))) {
363+
ORTE_ERROR_LOG(ret);
364+
error = "orte_pmix_base_open";
365+
goto error;
366+
}
367+
if (ORTE_SUCCESS != (ret = opal_pmix_base_select())) {
368+
ORTE_ERROR_LOG(ret);
369+
error = "opal_pmix_base_select";
370+
goto error;
371+
}
372+
/* set the event base */
373+
opal_pmix_base_set_evbase(orte_event_base);
374+
/* setup the PMIx server */
375+
if (ORTE_SUCCESS != (ret = pmix_server_init())) {
376+
/* the server code already barked, so let's be quiet */
377+
ret = ORTE_ERR_SILENT;
378+
error = "pmix_server_init";
379+
goto error;
380+
}
381+
359382
/* Setup the communication infrastructure */
360383
if (ORTE_SUCCESS != (ret = mca_base_framework_open(&orte_oob_base_framework, 0))) {
361384
ORTE_ERROR_LOG(ret);
@@ -380,6 +403,13 @@ int orte_ess_base_orted_setup(char **hosts)
380403
/* add our contact info */
381404
proc->rml_uri = orte_rml.get_contact_info();
382405

406+
/* setup the PMIx server */
407+
if (ORTE_SUCCESS != (ret = pmix_server_init())) {
408+
ORTE_ERROR_LOG(ret);
409+
error = "pmix server init";
410+
goto error;
411+
}
412+
383413
/* select the errmgr */
384414
if (ORTE_SUCCESS != (ret = orte_errmgr_base_select())) {
385415
ORTE_ERROR_LOG(ret);
@@ -440,49 +470,7 @@ int orte_ess_base_orted_setup(char **hosts)
440470
error = "orte_rtc_base_select";
441471
goto error;
442472
}
443-
/* enable communication with the rml */
444-
if (ORTE_SUCCESS != (ret = orte_rml.enable_comm())) {
445-
ORTE_ERROR_LOG(ret);
446-
error = "orte_rml.enable_comm";
447-
goto error;
448-
}
449-
/* Now provide a chance for the PLM
450-
* to perform any module-specific init functions. This
451-
* needs to occur AFTER the communications are setup
452-
* as it may involve starting a non-blocking recv
453-
* Do this only if a specific PLM was given to us - the
454-
* orted has no need of the proxy PLM at all
455-
*/
456-
if (plm_in_use) {
457-
if (ORTE_SUCCESS != (ret = orte_plm.init())) {
458-
ORTE_ERROR_LOG(ret);
459-
error = "orte_plm_init";
460-
goto error;
461-
}
462-
}
463473

464-
/* setup the PMIx framework - ensure it skips all non-PMIx components,
465-
* but do not override anything we were given */
466-
opal_setenv("OMPI_MCA_pmix", "^s1,s2,cray,isolated", false, &environ);
467-
if (OPAL_SUCCESS != (ret = mca_base_framework_open(&opal_pmix_base_framework, 0))) {
468-
ORTE_ERROR_LOG(ret);
469-
error = "orte_pmix_base_open";
470-
goto error;
471-
}
472-
if (ORTE_SUCCESS != (ret = opal_pmix_base_select())) {
473-
ORTE_ERROR_LOG(ret);
474-
error = "opal_pmix_base_select";
475-
goto error;
476-
}
477-
/* set the event base */
478-
opal_pmix_base_set_evbase(orte_event_base);
479-
/* setup the PMIx server */
480-
if (ORTE_SUCCESS != (ret = pmix_server_init())) {
481-
/* the server code already barked, so let's be quiet */
482-
ret = ORTE_ERR_SILENT;
483-
error = "pmix_server_init";
484-
goto error;
485-
}
486474
#if ORTE_ENABLE_STATIC_PORTS
487475
/* if we are using static ports, then we need to setup
488476
* the daemon info so the RML can function properly
@@ -511,6 +499,21 @@ int orte_ess_base_orted_setup(char **hosts)
511499
*/
512500
orte_routed.update_routing_plan();
513501

502+
/* Now provide a chance for the PLM
503+
* to perform any module-specific init functions. This
504+
* needs to occur AFTER the communications are setup
505+
* as it may involve starting a non-blocking recv
506+
* Do this only if a specific PLM was given to us - the
507+
* orted has no need of the proxy PLM at all
508+
*/
509+
if (plm_in_use) {
510+
if (ORTE_SUCCESS != (ret = orte_plm.init())) {
511+
ORTE_ERROR_LOG(ret);
512+
error = "orte_plm_init";
513+
goto error;
514+
}
515+
}
516+
514517
/* setup the routed info - the selected routed component
515518
* will know what to do.
516519
*/

orte/mca/ess/base/ess_base_std_tool.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,7 @@ int orte_ess_base_tool_setup(void)
134134
* to which I want to communicate and setting up a route for
135135
* that link is my responsibility
136136
*/
137-
/* enable communication via the rml */
138-
if (ORTE_SUCCESS != (ret = orte_rml.enable_comm())) {
139-
ORTE_ERROR_LOG(ret);
140-
error = "orte_rml.enable_comm";
141-
goto error;
142-
}
137+
143138
/* we -may- need to know the name of the head
144139
* of our session directory tree, particularly the
145140
* tmp base where any other session directories on

orte/mca/ess/hnp/ess_hnp_module.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -551,12 +551,7 @@ static int rte_init(void)
551551
error = "orte_rtc_base_select";
552552
goto error;
553553
}
554-
/* enable communication with the rml */
555-
if (ORTE_SUCCESS != (ret = orte_rml.enable_comm())) {
556-
ORTE_ERROR_LOG(ret);
557-
error = "orte_rml.enable_comm";
558-
goto error;
559-
}
554+
560555
/* we are an hnp, so update the contact info field for later use */
561556
orte_process_info.my_hnp_uri = orte_rml.get_contact_info();
562557
proc->rml_uri = strdup(orte_process_info.my_hnp_uri);

orte/mca/iof/hnp/iof_hnp.c

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@
5656
/* LOCAL FUNCTIONS */
5757
static void stdin_write_handler(int fd, short event, void *cbdata);
5858

59-
static void
60-
orte_iof_hnp_exception_handler(orte_process_name_t* peer, orte_rml_exception_t reason);
61-
6259
/* API FUNCTIONS */
6360
static int init(void);
6461

@@ -94,8 +91,6 @@ orte_iof_base_module_t orte_iof_hnp_module = {
9491
/* Initialize the module */
9592
static int init(void)
9693
{
97-
int rc;
98-
9994
/* post non-blocking recv to catch forwarded IO from
10095
* the orteds
10196
*/
@@ -105,12 +100,6 @@ static int init(void)
105100
orte_iof_hnp_recv,
106101
NULL);
107102

108-
if (ORTE_SUCCESS != (rc = orte_rml.add_exception_handler(orte_iof_hnp_exception_handler))) {
109-
ORTE_ERROR_LOG(rc);
110-
orte_rml.recv_cancel(ORTE_NAME_WILDCARD, ORTE_RML_TAG_IOF_HNP);
111-
return rc;
112-
}
113-
114103
OBJ_CONSTRUCT(&mca_iof_hnp_component.procs, opal_list_t);
115104
mca_iof_hnp_component.stdinev = NULL;
116105

@@ -610,37 +599,3 @@ static void stdin_write_handler(int fd, short event, void *cbdata)
610599
}
611600
}
612601
}
613-
614-
/**
615-
* Callback when peer is disconnected
616-
*/
617-
618-
static void
619-
orte_iof_hnp_exception_handler(orte_process_name_t* peer, orte_rml_exception_t reason)
620-
{
621-
#if 0
622-
orte_iof_base_endpoint_t *endpoint;
623-
opal_output_verbose(1, orte_iof_base_framework.framework_output,
624-
"iof svc exception handler! %s\n",
625-
ORTE_NAME_PRINT((orte_process_name_t*)peer));
626-
627-
/* If we detect an exception on the RML connection to a peer,
628-
delete all of its subscriptions and publications. Note that
629-
exceptions can be detected during a normal RML shutdown; they
630-
are recoverable events (no need to abort). */
631-
orte_iof_hnp_sub_delete_all(peer);
632-
orte_iof_hnp_pub_delete_all(peer);
633-
opal_output_verbose(1, orte_iof_base_framework.framework_output, "deleted all pubs and subs\n");
634-
635-
/* Find any streams on any endpoints for this peer and close them */
636-
while (NULL !=
637-
(endpoint = orte_iof_base_endpoint_match(peer, ORTE_NS_CMP_ALL,
638-
ORTE_IOF_ANY))) {
639-
orte_iof_base_endpoint_closed(endpoint);
640-
641-
/* Delete the endpoint that we just matched */
642-
orte_iof_base_endpoint_delete(peer, ORTE_NS_CMP_ALL, ORTE_IOF_ANY);
643-
}
644-
#endif
645-
opal_output_verbose(1, orte_iof_base_framework.framework_output, "done with exception handler\n");
646-
}

orte/mca/oob/base/base.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,12 @@ OBJ_CLASS_DECLARATION(mca_oob_uri_req_t);
181181
}while(0);
182182
ORTE_DECLSPEC void orte_oob_base_set_addr(int fd, short args, void *cbdata);
183183

184+
185+
/* Get the available transports and their attributes */
186+
#define ORTE_OOB_GET_TRANSPORTS(u) orte_oob_base_get_transports(u)
187+
ORTE_DECLSPEC void orte_oob_base_get_transports(opal_list_t *transports);
188+
189+
184190
#if OPAL_ENABLE_FT_CR == 1
185191
ORTE_DECLSPEC void orte_oob_base_ft_event(int fd, short args, void *cbdata);
186192
#endif

0 commit comments

Comments
 (0)