plm/base: add the orte_plm_base_node_regex_threshold MCA parameter
This parameter can be used to set the node regex max length that can be passed to the orted command line. For testing purpose, it can be set to zero in order to force the node regex being retrieved by orted from its parent. Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
Этот коммит содержится в:
родитель
f7e29127bc
Коммит
799152e7fb
@ -11,7 +11,7 @@
|
|||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
* Copyright (c) 2011-2013 Los Alamos National Security, LLC.
|
* Copyright (c) 2011-2013 Los Alamos National Security, LLC.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
* Copyright (c) 2015 Research Organization for Information Science
|
* Copyright (c) 2015-2017 Research Organization for Information Science
|
||||||
* and Technology (RIST). All rights reserved.
|
* and Technology (RIST). All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
@ -52,6 +52,19 @@ orte_plm_globals_t orte_plm_globals = {0};
|
|||||||
orte_plm_base_module_t orte_plm = {0};
|
orte_plm_base_module_t orte_plm = {0};
|
||||||
|
|
||||||
|
|
||||||
|
static int mca_plm_base_register(mca_base_register_flag_t flags)
|
||||||
|
{
|
||||||
|
orte_plm_globals.node_regex_threshold = 1024;
|
||||||
|
(void) mca_base_var_register("orte", "pml", "base", "node_regex_threshold",
|
||||||
|
"Only pass the node regex on the orted command line if smaller than this threshold",
|
||||||
|
MCA_BASE_VAR_TYPE_SIZE_T, NULL, 0,
|
||||||
|
MCA_BASE_VAR_FLAG_INTERNAL,
|
||||||
|
OPAL_INFO_LVL_9,
|
||||||
|
MCA_BASE_VAR_SCOPE_READONLY,
|
||||||
|
&orte_plm_globals.node_regex_threshold);
|
||||||
|
return ORTE_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
static int orte_plm_base_close(void)
|
static int orte_plm_base_close(void)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
@ -88,5 +101,5 @@ static int orte_plm_base_open(mca_base_open_flag_t flags)
|
|||||||
return mca_base_framework_components_open(&orte_plm_base_framework, flags);
|
return mca_base_framework_components_open(&orte_plm_base_framework, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
MCA_BASE_FRAMEWORK_DECLARE(orte, plm, NULL, NULL, orte_plm_base_open, orte_plm_base_close,
|
MCA_BASE_FRAMEWORK_DECLARE(orte, plm, NULL, mca_plm_base_register, orte_plm_base_open, orte_plm_base_close,
|
||||||
mca_plm_base_static_components, 0);
|
mca_plm_base_static_components, 0);
|
||||||
|
@ -1567,7 +1567,7 @@ int orte_plm_base_orted_append_basic_args(int *argc, char ***argv,
|
|||||||
}
|
}
|
||||||
/* if this is too long, then we'll have to do it with
|
/* if this is too long, then we'll have to do it with
|
||||||
* a phone home operation instead */
|
* a phone home operation instead */
|
||||||
if (strlen(param) < ORTE_MAX_REGEX_CMD_LENGTH) {
|
if (strlen(param) < orte_plm_globals.node_regex_threshold) {
|
||||||
opal_argv_append(argc, argv, "-"OPAL_MCA_CMD_LINE_ID);
|
opal_argv_append(argc, argv, "-"OPAL_MCA_CMD_LINE_ID);
|
||||||
opal_argv_append(argc, argv, "orte_node_regex");
|
opal_argv_append(argc, argv, "orte_node_regex");
|
||||||
opal_argv_append(argc, argv, param);
|
opal_argv_append(argc, argv, param);
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
* Copyright (c) 2011-2013 Los Alamos National Security, LLC.
|
* Copyright (c) 2011-2013 Los Alamos National Security, LLC.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
* Copyright (c) 2017 Intel, Inc. All rights reserved.
|
* Copyright (c) 2017 Intel, Inc. All rights reserved.
|
||||||
|
* Copyright (c) 2017 Research Organization for Information Science
|
||||||
|
* and Technology (RIST). All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
@ -59,6 +61,7 @@ typedef struct {
|
|||||||
opal_buffer_t tree_spawn_cmd;
|
opal_buffer_t tree_spawn_cmd;
|
||||||
/* daemon nodes assigned at launch */
|
/* daemon nodes assigned at launch */
|
||||||
bool daemon_nodes_assigned_at_launch;
|
bool daemon_nodes_assigned_at_launch;
|
||||||
|
size_t node_regex_threshold;
|
||||||
} orte_plm_globals_t;
|
} orte_plm_globals_t;
|
||||||
/**
|
/**
|
||||||
* Global instance of PLM framework data
|
* Global instance of PLM framework data
|
||||||
|
@ -10,6 +10,8 @@
|
|||||||
* 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) 2014-2017 Intel, Inc. All rights reserved.
|
* Copyright (c) 2014-2017 Intel, Inc. All rights reserved.
|
||||||
|
* Copyright (c) 2017 Research Organization for Information Science
|
||||||
|
* and Technology (RIST). All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
@ -37,8 +39,6 @@
|
|||||||
|
|
||||||
BEGIN_C_DECLS
|
BEGIN_C_DECLS
|
||||||
|
|
||||||
#define ORTE_MAX_REGEX_CMD_LENGTH 1024
|
|
||||||
|
|
||||||
#define ORTE_MAX_NODE_PREFIX 50
|
#define ORTE_MAX_NODE_PREFIX 50
|
||||||
#define ORTE_CONTIG_NODE_CMD 0x01
|
#define ORTE_CONTIG_NODE_CMD 0x01
|
||||||
#define ORTE_NON_CONTIG_NODE_CMD 0x02
|
#define ORTE_NON_CONTIG_NODE_CMD 0x02
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user