1
1

Add flags to direct PMIx to only use one listener, but without directing which one (tcp or usock) to use. This allows the user to set PMIX_MCA_ptl in their environment to select the transport method.

Signed-off-by: Ralph Castain <rhc@open-mpi.org>
Этот коммит содержится в:
Ralph Castain 2017-01-04 09:13:37 -08:00
родитель f355fb926d
Коммит 91d714fe93
4 изменённых файлов: 24 добавлений и 4 удалений

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

@ -134,6 +134,8 @@ typedef uint32_t pmix_rank_t;
/* attributes for the USOCK rendezvous socket */
#define PMIX_USOCK_DISABLE "pmix.usock.disable" // (bool) disable legacy usock support
#define PMIX_SOCKET_MODE "pmix.sockmode" // (uint32_t) POSIX mode_t (9 bits valid)
#define PMIX_SINGLE_LISTENER "pmix.sing.listnr" // (bool) use only one rendezvous socket, letting priorities and/or
// MCA param select the active transport
/* attributes for TCP connections */
#define PMIX_TCP_URI "pmix.tcp.uri" // (char*) URI of server to connect to

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

@ -1,6 +1,6 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
* Copyright (c) 2014-2017 Intel, Inc. All rights reserved.
* Copyright (c) 2014-2016 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2014-2015 Artem Y. Polyakov <artpol84@gmail.com>.
@ -69,17 +69,33 @@ static pmix_status_t setup_listeners(pmix_info_t *info, size_t ninfo, bool *need
{
pmix_ptl_base_active_t *active;
pmix_status_t rc;
size_t n;
bool single = false;
if (!pmix_ptl_globals.initialized) {
return PMIX_ERR_INIT;
}
/* scan the directives to see if they want only one listener setup */
if (NULL != info) {
for (n=0; n < ninfo; n++) {
if (0 == strncmp(info[n].key, PMIX_SINGLE_LISTENER, PMIX_MAX_KEYLEN) &&
(PMIX_UNDEF == info[n].value.type || info[n].value.data.flag)) {
single = true;
break;
}
}
}
PMIX_LIST_FOREACH(active, &pmix_ptl_globals.actives, pmix_ptl_base_active_t) {
if (NULL != active->component->setup_listener) {
rc = active->component->setup_listener(info, ninfo, need_listener);
if (PMIX_SUCCESS != rc && PMIX_ERR_NOT_AVAILABLE != rc) {
return rc;
}
if (single) {
return PMIX_SUCCESS;
}
}
}
/* we must have at least one listener */

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

@ -64,6 +64,8 @@ BEGIN_C_DECLS
/* attributes for the rendezvous socket */
#define OPAL_PMIX_USOCK_DISABLE "pmix.usock.disable" // (bool) disable legacy usock support
#define OPAL_PMIX_SOCKET_MODE "pmix.sockmode" // (uint32_t) POSIX mode_t (9 bits valid)
#define OPAL_PMIX_SINGLE_LISTENER "pmix.sing.listnr" // (bool) use only one rendezvous socket, letting priorities and/or
// MCA param select the active transport
/* attributes for TCP connections */
#define OPAL_PMIX_TCP_URI "pmix.tcp.uri" // (char*) URI of server to connect to

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

@ -13,7 +13,7 @@
* All rights reserved.
* Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2011 Oak Ridge National Labs. All rights reserved.
* Copyright (c) 2013-2016 Intel, Inc. All rights reserved.
* Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
* Copyright (c) 2014 Mellanox Technologies, Inc.
* All rights reserved.
* Copyright (c) 2014-2015 Research Organization for Information Science
@ -272,9 +272,9 @@ int pmix_server_init(void)
kv->type = OPAL_STRING;
kv->data.string = strdup(orte_process_info.tmpdir_base);
opal_list_append(&info, &kv->super);
/* disable usock */
/* use only one listener */
kv = OBJ_NEW(opal_value_t);
kv->key = strdup(OPAL_PMIX_USOCK_DISABLE);
kv->key = strdup(OPAL_PMIX_SINGLE_LISTENER);
kv->type = OPAL_BOOL;
kv->data.flag = true;
opal_list_append(&info, &kv->super);