configury: new OPAL_SET_MCA_PREFIX/ORTE_SET_MCA_CMD_LINE_ID macros
These two macros set the MCA prefix and MCA cmd line id, respectively. Specifically, MCA parameters will be named PREFIX<foo> in the environment, and the cmd line will use -ID foo bar. These macros must be called during configure.ac and a value supplied. In the case of Open MPI, the values given are PREFIX=OMPI_MCA_ and ID=mca. Other projects (such as ORCM) will call these macros with their own unique values. For example, ORCM uses PREFIX=ORCM_MCA_ and ID=omca This scheme is necessary to allow running Open MPI applications under systems that use their own versions of ORTE and OPAL. For example, when running OMPI applications under ORCM, we need the MCA params passed to the ORCM daemons to be separated from those recognized by the OMPI application.
This commit is contained in:
parent
5059077510
commit
894acb0aa8
41
config/opal_set_mca_prefix.m4
Normal file
41
config/opal_set_mca_prefix.m4
Normal file
@ -0,0 +1,41 @@
|
||||
# -*- shell-script -*-
|
||||
#
|
||||
# Copyright (c) 2014 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2014 Intel, Inc. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
# OPAL_SET_MCA_PREFIX([mca_prefix]
|
||||
#
|
||||
# This macro sets a prefix for the MCA parameter system. Specifically,
|
||||
# OMPI_MCA_<foo> becomes <mca_prefix>_<foo>
|
||||
#
|
||||
# --------------------------------------------------------
|
||||
AC_DEFUN([OPAL_SET_MCA_PREFIX],[
|
||||
AS_IF([test "$opal_mca_prefix_set" = "yes"],
|
||||
[AC_MSG_WARN([OPAL mca prefix was already set!])
|
||||
AC_MSG_WARN([This is a configury programming error])
|
||||
AC_MSG_ERROR([Cannot continue])])
|
||||
|
||||
MCA_PREFIX=$1
|
||||
opal_mca_prefix_set=yes
|
||||
AC_DEFINE_UNQUOTED([OPAL_MCA_PREFIX], ["$MCA_PREFIX"], [MCA prefix string for envars])
|
||||
])dnl
|
||||
|
||||
#
|
||||
# Set the MCA cmd line identifier - i.e., change "-mca" to "-<foo>"
|
||||
#
|
||||
AC_DEFUN([OPAL_SET_MCA_CMD_LINE_ID],[
|
||||
AS_IF([test "$opal_mca_cmd_id_set" = "yes"],
|
||||
[AC_MSG_WARN([OPAL mca cmd line id was already set!])
|
||||
AC_MSG_WARN([This is a configury programming error])
|
||||
AC_MSG_ERROR([Cannot continue])])
|
||||
|
||||
MCA_CMD_LINE_ID=$1
|
||||
opal_mca_cmd_id_set=yes
|
||||
AC_DEFINE_UNQUOTED([OPAL_MCA_CMD_LINE_ID], ["$MCA_CMD_LINE_ID"], [MCA cmd line identifier])
|
||||
])dnl
|
@ -1408,6 +1408,8 @@ AC_SUBST(opallibdir)
|
||||
AC_SUBST(opalincludedir)
|
||||
|
||||
OPAL_SET_LIB_PREFIX([])
|
||||
OPAL_SET_MCA_PREFIX([OMPI_MCA_])
|
||||
OPAL_SET_MCA_CMD_LINE_ID([mca])
|
||||
m4_ifdef([project_orte],
|
||||
[ortedatadir="$opaldatadir"
|
||||
AC_SUBST(ortedatadir)
|
||||
|
@ -49,13 +49,13 @@ int mca_base_cmd_line_setup(opal_cmd_line_t *cmd)
|
||||
{
|
||||
int ret = OPAL_SUCCESS;
|
||||
|
||||
ret = opal_cmd_line_make_opt3(cmd, '\0', "mca", "mca", 2,
|
||||
"Pass context-specific MCA parameters; they are considered global if --gmca is not used and only one context is specified (arg0 is the parameter name; arg1 is the parameter value)");
|
||||
ret = opal_cmd_line_make_opt3(cmd, '\0', OPAL_MCA_CMD_LINE_ID, OPAL_MCA_CMD_LINE_ID, 2,
|
||||
"Pass context-specific MCA parameters; they are considered global if --g"OPAL_MCA_CMD_LINE_ID" is not used and only one context is specified (arg0 is the parameter name; arg1 is the parameter value)");
|
||||
if (OPAL_SUCCESS != ret) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = opal_cmd_line_make_opt3(cmd, '\0', "gmca", "gmca", 2,
|
||||
ret = opal_cmd_line_make_opt3(cmd, '\0', "g"OPAL_MCA_CMD_LINE_ID, "g"OPAL_MCA_CMD_LINE_ID, 2,
|
||||
"Pass global MCA parameters that are applicable to all contexts (arg0 is the parameter name; arg1 is the parameter value)");
|
||||
|
||||
if (OPAL_SUCCESS != ret) {
|
||||
@ -90,18 +90,18 @@ int mca_base_cmd_line_process_args(opal_cmd_line_t *cmd,
|
||||
|
||||
/* If no relevant parameters were given, just return */
|
||||
|
||||
if (!opal_cmd_line_is_taken(cmd, "mca") &&
|
||||
!opal_cmd_line_is_taken(cmd, "gmca")) {
|
||||
if (!opal_cmd_line_is_taken(cmd, OPAL_MCA_CMD_LINE_ID) &&
|
||||
!opal_cmd_line_is_taken(cmd, "g"OPAL_MCA_CMD_LINE_ID)) {
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
/* Handle app context-specific parameters */
|
||||
|
||||
num_insts = opal_cmd_line_get_ninsts(cmd, "mca");
|
||||
num_insts = opal_cmd_line_get_ninsts(cmd, OPAL_MCA_CMD_LINE_ID);
|
||||
params = values = NULL;
|
||||
for (i = 0; i < num_insts; ++i) {
|
||||
if (OPAL_SUCCESS != (rc = process_arg(opal_cmd_line_get_param(cmd, "mca", i, 0),
|
||||
opal_cmd_line_get_param(cmd, "mca", i, 1),
|
||||
if (OPAL_SUCCESS != (rc = process_arg(opal_cmd_line_get_param(cmd, OPAL_MCA_CMD_LINE_ID, i, 0),
|
||||
opal_cmd_line_get_param(cmd, OPAL_MCA_CMD_LINE_ID, i, 1),
|
||||
¶ms, &values))) {
|
||||
return rc;
|
||||
}
|
||||
@ -114,11 +114,11 @@ int mca_base_cmd_line_process_args(opal_cmd_line_t *cmd,
|
||||
|
||||
/* Handle global parameters */
|
||||
|
||||
num_insts = opal_cmd_line_get_ninsts(cmd, "gmca");
|
||||
num_insts = opal_cmd_line_get_ninsts(cmd, "g"OPAL_MCA_CMD_LINE_ID);
|
||||
params = values = NULL;
|
||||
for (i = 0; i < num_insts; ++i) {
|
||||
if (OPAL_SUCCESS != (rc = process_arg(opal_cmd_line_get_param(cmd, "gmca", i, 0),
|
||||
opal_cmd_line_get_param(cmd, "gmca", i, 1),
|
||||
if (OPAL_SUCCESS != (rc = process_arg(opal_cmd_line_get_param(cmd, "g"OPAL_MCA_CMD_LINE_ID, i, 0),
|
||||
opal_cmd_line_get_param(cmd, "g"OPAL_MCA_CMD_LINE_ID, i, 1),
|
||||
¶ms, &values))) {
|
||||
return rc;
|
||||
}
|
||||
@ -191,7 +191,7 @@ static void add_to_env(char **params, char **values, char ***env)
|
||||
char *name;
|
||||
|
||||
/* Loop through all the args that we've gotten and make env
|
||||
vars of the form OMPI_MCA_*=value. */
|
||||
vars of the form OPAL_MCA_PREFIX*=value. */
|
||||
|
||||
for (i = 0; NULL != params && NULL != params[i]; ++i) {
|
||||
(void) mca_base_var_env_name (params[i], &name);
|
||||
@ -206,8 +206,8 @@ void mca_base_cmd_line_wrap_args(char **args)
|
||||
char *tstr;
|
||||
|
||||
for (i=0; NULL != args && NULL != args[i]; i++) {
|
||||
if (0 == strcmp(args[i], "-mca") ||
|
||||
0 == strcmp(args[i], "--mca")) {
|
||||
if (0 == strcmp(args[i], "-"OPAL_MCA_CMD_LINE_ID) ||
|
||||
0 == strcmp(args[i], "--"OPAL_MCA_CMD_LINE_ID)) {
|
||||
if (NULL == args[i+1] || NULL == args[i+2]) {
|
||||
/* this should be impossible as the error would
|
||||
* have been detected well before here, but just
|
||||
|
@ -52,7 +52,7 @@
|
||||
* local variables
|
||||
*/
|
||||
static opal_pointer_array_t mca_base_vars;
|
||||
static const char *mca_prefix = "OMPI_MCA_";
|
||||
static const char *mca_prefix = OPAL_MCA_PREFIX;
|
||||
static char *home = NULL;
|
||||
static char *cwd = NULL;
|
||||
bool mca_base_var_initialized = false;
|
||||
|
@ -780,12 +780,12 @@ void opal_memory_linux_malloc_init_hook(void)
|
||||
(unfortunately, there's really no good way to do this other
|
||||
than this abstraction violation :-( ) */
|
||||
lp = check("OPAL_MCA_leave_pinned");
|
||||
if( RESULT_NOT_FOUND == lp ) lp = check("OMPI_MCA_mpi_leave_pinned");
|
||||
if( RESULT_NOT_FOUND == lp ) lp = check(OPAL_MCA_PREFIX"mpi_leave_pinned");
|
||||
lpp = check("OPAL_MCA_leave_pinned_pipeline");
|
||||
if( RESULT_NOT_FOUND == lpp ) lpp = check("OMPI_MCA_mpi_leave_pinned_pipeline");
|
||||
if( RESULT_NOT_FOUND == lpp ) lpp = check(OPAL_MCA_PREFIX"mpi_leave_pinned_pipeline");
|
||||
|
||||
/* See if we want to disable this component. */
|
||||
r1 = check("OMPI_MCA_memory_linux_disable");
|
||||
r1 = check(OPAL_MCA_PREFIX"memory_linux_disable");
|
||||
if (RESULT_NOT_FOUND != r1 && RESULT_NO != r1) {
|
||||
return;
|
||||
}
|
||||
|
@ -57,9 +57,9 @@ int orte_ess_base_proc_binding(void)
|
||||
opal_value_t kv;
|
||||
|
||||
/* Determine if we were pre-bound or not */
|
||||
if (NULL != getenv("OMPI_MCA_orte_bound_at_launch")) {
|
||||
if (NULL != getenv(OPAL_MCA_PREFIX"orte_bound_at_launch")) {
|
||||
orte_proc_is_bound = true;
|
||||
if (NULL != (map = getenv("OMPI_MCA_orte_base_applied_binding"))) {
|
||||
if (NULL != (map = getenv(OPAL_MCA_PREFIX"orte_base_applied_binding"))) {
|
||||
orte_proc_applied_binding = hwloc_bitmap_alloc();
|
||||
if (0 != (ret = hwloc_bitmap_list_sscanf(orte_proc_applied_binding, map))) {
|
||||
error = "applied_binding parse";
|
||||
|
@ -212,7 +212,7 @@ static int rte_init(void)
|
||||
/* push into the environ for pickup in MPI layer for
|
||||
* MPI-3 required info key
|
||||
*/
|
||||
asprintf(&ev1, "OMPI_MCA_orte_ess_num_procs=%d", orte_process_info.num_procs);
|
||||
asprintf(&ev1, OPAL_MCA_PREFIX"orte_ess_num_procs=%d", orte_process_info.num_procs);
|
||||
putenv(ev1);
|
||||
asprintf(&ev2, "OMPI_APP_CTX_NUM_PROCS=%d", orte_process_info.num_procs);
|
||||
putenv(ev2);
|
||||
@ -401,9 +401,9 @@ static int rte_finalize(void)
|
||||
/* remove the envars that we pushed into environ
|
||||
* so we leave that structure intact
|
||||
*/
|
||||
unsetenv("OMPI_MCA_routed");
|
||||
unsetenv("OMPI_MCA_orte_precondition_transports");
|
||||
unsetenv("OMPI_MCA_orte_ess_num_procs");
|
||||
unsetenv(OPAL_MCA_PREFIX"routed");
|
||||
unsetenv(OPAL_MCA_PREFIX"orte_precondition_transports");
|
||||
unsetenv(OPAL_MCA_PREFIX"orte_ess_num_procs");
|
||||
unsetenv("OMPI_APP_CTX_NUM_PROCS");
|
||||
/* use the default app procedure to finish */
|
||||
if (ORTE_SUCCESS != (ret = orte_ess_base_app_finalize())) {
|
||||
|
@ -129,7 +129,7 @@ static int rte_init(void)
|
||||
/* save the daemon uri - we will process it later */
|
||||
orte_process_info.my_daemon_uri = strdup(orte_process_info.my_hnp_uri);
|
||||
/* for convenience, push the pubsub version of this param into the environ */
|
||||
asprintf(¶m,"OMPI_MCA_pubsub_orte_server=%s",orte_process_info.my_hnp_uri);
|
||||
asprintf(¶m,OPAL_MCA_PREFIX"pubsub_orte_server=%s",orte_process_info.my_hnp_uri);
|
||||
putenv(param);
|
||||
}
|
||||
|
||||
@ -202,7 +202,7 @@ static int rte_init(void)
|
||||
putenv("OMPI_NUM_APP_CTX=1");
|
||||
putenv("OMPI_FIRST_RANKS=0");
|
||||
putenv("OMPI_APP_CTX_NUM_PROCS=1");
|
||||
putenv("OMPI_MCA_orte_ess_num_procs=1");
|
||||
putenv(OPAL_MCA_PREFIX"orte_ess_num_procs=1");
|
||||
|
||||
/* push some required info to our local datastore */
|
||||
OBJ_CONSTRUCT(&kvn, opal_value_t);
|
||||
@ -271,8 +271,8 @@ static int rte_finalize(void)
|
||||
unsetenv("OMPI_NUM_APP_CTX");
|
||||
unsetenv("OMPI_FIRST_RANKS");
|
||||
unsetenv("OMPI_APP_CTX_NUM_PROCS");
|
||||
unsetenv("OMPI_MCA_orte_ess_num_procs");
|
||||
unsetenv("OMPI_MCA_pubsub_orte_server"); // just in case it is there
|
||||
unsetenv(OPAL_MCA_PREFIX"orte_ess_num_procs");
|
||||
unsetenv(OPAL_MCA_PREFIX"pubsub_orte_server"); // just in case it is there
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ static int rte_init(void)
|
||||
*/
|
||||
if (ORTE_PROC_IS_DAEMON) {
|
||||
/* get the list of nodes used for this job */
|
||||
nodelist = getenv("OMPI_MCA_orte_nodelist");
|
||||
nodelist = getenv(OPAL_MCA_PREFIX"orte_nodelist");
|
||||
|
||||
if (NULL != nodelist) {
|
||||
/* split the node list into an argv array */
|
||||
|
@ -751,7 +751,7 @@ static int setup_child(orte_proc_t *child,
|
||||
*/
|
||||
opal_setenv("PWD", param, true, env);
|
||||
/* update the initial wdir value too */
|
||||
opal_setenv("OMPI_MCA_initial_wdir", param, true, env);
|
||||
opal_setenv(OPAL_MCA_PREFIX"initial_wdir", param, true, env);
|
||||
}
|
||||
free(param);
|
||||
return ORTE_SUCCESS;
|
||||
@ -791,7 +791,7 @@ static int setup_path(orte_app_context_t *app)
|
||||
getcwd(dir, sizeof(dir));
|
||||
opal_setenv("PWD", dir, true, &app->env);
|
||||
/* update the initial wdir value too */
|
||||
opal_setenv("OMPI_MCA_initial_wdir", dir, true, &app->env);
|
||||
opal_setenv(OPAL_MCA_PREFIX"initial_wdir", dir, true, &app->env);
|
||||
}
|
||||
|
||||
/* Search for the OMPI_exec_path and PATH settings in the environment. */
|
||||
|
@ -1073,22 +1073,22 @@ int orte_plm_base_orted_append_basic_args(int *argc, char ***argv,
|
||||
|
||||
/* check for debug flags */
|
||||
if (orte_debug_flag) {
|
||||
opal_argv_append(argc, argv, "-mca");
|
||||
opal_argv_append(argc, argv, "-"OPAL_MCA_CMD_LINE_ID);
|
||||
opal_argv_append(argc, argv, "orte_debug");
|
||||
opal_argv_append(argc, argv, "1");
|
||||
}
|
||||
if (orte_debug_daemons_flag) {
|
||||
opal_argv_append(argc, argv, "-mca");
|
||||
opal_argv_append(argc, argv, "-"OPAL_MCA_CMD_LINE_ID);
|
||||
opal_argv_append(argc, argv, "orte_debug_daemons");
|
||||
opal_argv_append(argc, argv, "1");
|
||||
}
|
||||
if (orte_debug_daemons_file_flag) {
|
||||
opal_argv_append(argc, argv, "-mca");
|
||||
opal_argv_append(argc, argv, "-"OPAL_MCA_CMD_LINE_ID);
|
||||
opal_argv_append(argc, argv, "orte_debug_daemons_file");
|
||||
opal_argv_append(argc, argv, "1");
|
||||
}
|
||||
if (orte_leave_session_attached) {
|
||||
opal_argv_append(argc, argv, "-mca");
|
||||
opal_argv_append(argc, argv, "-"OPAL_MCA_CMD_LINE_ID);
|
||||
opal_argv_append(argc, argv, "orte_leave_session_attached");
|
||||
opal_argv_append(argc, argv, "1");
|
||||
}
|
||||
@ -1098,12 +1098,12 @@ int orte_plm_base_orted_append_basic_args(int *argc, char ***argv,
|
||||
}
|
||||
#if OPAL_HAVE_HWLOC
|
||||
if (opal_hwloc_report_bindings) {
|
||||
opal_argv_append(argc, argv, "-mca");
|
||||
opal_argv_append(argc, argv, "-"OPAL_MCA_CMD_LINE_ID);
|
||||
opal_argv_append(argc, argv, "orte_report_bindings");
|
||||
opal_argv_append(argc, argv, "1");
|
||||
}
|
||||
if (orte_hetero_nodes) {
|
||||
opal_argv_append(argc, argv, "-mca");
|
||||
opal_argv_append(argc, argv, "-"OPAL_MCA_CMD_LINE_ID);
|
||||
opal_argv_append(argc, argv, "orte_hetero_nodes");
|
||||
opal_argv_append(argc, argv, "1");
|
||||
}
|
||||
@ -1112,7 +1112,7 @@ int orte_plm_base_orted_append_basic_args(int *argc, char ***argv,
|
||||
opal_argv_append(argc, argv, "--mapreduce");
|
||||
}
|
||||
if (orte_map_stddiag_to_stderr) {
|
||||
opal_argv_append(argc, argv, "-mca");
|
||||
opal_argv_append(argc, argv, "-"OPAL_MCA_CMD_LINE_ID);
|
||||
opal_argv_append(argc, argv, "orte_map_stddiag_to_stderr");
|
||||
opal_argv_append(argc, argv, "1");
|
||||
}
|
||||
@ -1133,13 +1133,13 @@ int orte_plm_base_orted_append_basic_args(int *argc, char ***argv,
|
||||
|
||||
/* tell the orted what ESS component to use */
|
||||
if (NULL != ess) {
|
||||
opal_argv_append(argc, argv, "-mca");
|
||||
opal_argv_append(argc, argv, "-"OPAL_MCA_CMD_LINE_ID);
|
||||
opal_argv_append(argc, argv, "ess");
|
||||
opal_argv_append(argc, argv, ess);
|
||||
}
|
||||
|
||||
/* pass the daemon jobid */
|
||||
opal_argv_append(argc, argv, "-mca");
|
||||
opal_argv_append(argc, argv, "-"OPAL_MCA_CMD_LINE_ID);
|
||||
opal_argv_append(argc, argv, "orte_ess_jobid");
|
||||
if (ORTE_SUCCESS != (rc = orte_util_convert_jobid_to_string(¶m, ORTE_PROC_MY_NAME->jobid))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
@ -1150,7 +1150,7 @@ int orte_plm_base_orted_append_basic_args(int *argc, char ***argv,
|
||||
|
||||
/* setup to pass the vpid */
|
||||
if (NULL != proc_vpid_index) {
|
||||
opal_argv_append(argc, argv, "-mca");
|
||||
opal_argv_append(argc, argv, "-"OPAL_MCA_CMD_LINE_ID);
|
||||
opal_argv_append(argc, argv, "orte_ess_vpid");
|
||||
*proc_vpid_index = *argc;
|
||||
opal_argv_append(argc, argv, "<template>");
|
||||
@ -1163,7 +1163,7 @@ int orte_plm_base_orted_append_basic_args(int *argc, char ***argv,
|
||||
} else {
|
||||
num_procs = orte_process_info.num_procs;
|
||||
}
|
||||
opal_argv_append(argc, argv, "-mca");
|
||||
opal_argv_append(argc, argv, "-"OPAL_MCA_CMD_LINE_ID);
|
||||
opal_argv_append(argc, argv, "orte_ess_num_procs");
|
||||
asprintf(¶m, "%lu", num_procs);
|
||||
opal_argv_append(argc, argv, param);
|
||||
@ -1174,14 +1174,14 @@ int orte_plm_base_orted_append_basic_args(int *argc, char ***argv,
|
||||
rml_uri = orte_rml.get_contact_info();
|
||||
} else {
|
||||
rml_uri = orte_rml.get_contact_info();
|
||||
opal_argv_append(argc, argv, "-mca");
|
||||
opal_argv_append(argc, argv, "-"OPAL_MCA_CMD_LINE_ID);
|
||||
opal_argv_append(argc, argv, "orte_parent_uri");
|
||||
opal_argv_append(argc, argv, rml_uri);
|
||||
free(rml_uri);
|
||||
|
||||
rml_uri = strdup(orte_process_info.my_hnp_uri);
|
||||
}
|
||||
opal_argv_append(argc, argv, "-mca");
|
||||
opal_argv_append(argc, argv, "-"OPAL_MCA_CMD_LINE_ID);
|
||||
opal_argv_append(argc, argv, "orte_hnp_uri");
|
||||
opal_argv_append(argc, argv, rml_uri);
|
||||
free(rml_uri);
|
||||
@ -1193,7 +1193,7 @@ int orte_plm_base_orted_append_basic_args(int *argc, char ***argv,
|
||||
ORTE_ERROR_LOG(rc);
|
||||
return rc;
|
||||
}
|
||||
opal_argv_append(argc, argv, "-mca");
|
||||
opal_argv_append(argc, argv, "-"OPAL_MCA_CMD_LINE_ID);
|
||||
opal_argv_append(argc, argv, "orte_node_regex");
|
||||
opal_argv_append(argc, argv, param);
|
||||
free(param);
|
||||
@ -1208,14 +1208,14 @@ int orte_plm_base_orted_append_basic_args(int *argc, char ***argv,
|
||||
|
||||
/* if output-filename was specified, pass that along */
|
||||
if (NULL != orte_output_filename) {
|
||||
opal_argv_append(argc, argv, "-mca");
|
||||
opal_argv_append(argc, argv, "-"OPAL_MCA_CMD_LINE_ID);
|
||||
opal_argv_append(argc, argv, "orte_output_filename");
|
||||
opal_argv_append(argc, argv, orte_output_filename);
|
||||
}
|
||||
|
||||
/* if --xterm was specified, pass that along */
|
||||
if (NULL != orte_xterm) {
|
||||
opal_argv_append(argc, argv, "-mca");
|
||||
opal_argv_append(argc, argv, "-"OPAL_MCA_CMD_LINE_ID);
|
||||
opal_argv_append(argc, argv, "orte_xterm");
|
||||
opal_argv_append(argc, argv, orte_xterm);
|
||||
}
|
||||
@ -1231,7 +1231,7 @@ int orte_plm_base_orted_append_basic_args(int *argc, char ***argv,
|
||||
/* Could also use the short version '-am'
|
||||
* but being verbose has some value
|
||||
*/
|
||||
opal_argv_append(argc, argv, "-mca");
|
||||
opal_argv_append(argc, argv, "-"OPAL_MCA_CMD_LINE_ID);
|
||||
opal_argv_append(argc, argv, "mca_base_param_file_prefix");
|
||||
opal_argv_append(argc, argv, tmp_value[0]);
|
||||
|
||||
@ -1240,13 +1240,13 @@ int orte_plm_base_orted_append_basic_args(int *argc, char ***argv,
|
||||
loc_id = mca_base_var_find("opal", "mca", "base", "param_file_path");
|
||||
mca_base_var_get_value(loc_id, &tmp_value, NULL, NULL);
|
||||
if( NULL != tmp_value && NULL != tmp_value[0] ) {
|
||||
opal_argv_append(argc, argv, "-mca");
|
||||
opal_argv_append(argc, argv, "-"OPAL_MCA_CMD_LINE_ID);
|
||||
opal_argv_append(argc, argv, "mca_base_param_file_path");
|
||||
opal_argv_append(argc, argv, tmp_value[0]);
|
||||
}
|
||||
|
||||
/* Add the 'path' param */
|
||||
opal_argv_append(argc, argv, "-mca");
|
||||
opal_argv_append(argc, argv, "-"OPAL_MCA_CMD_LINE_ID);
|
||||
opal_argv_append(argc, argv, "mca_base_param_file_path_force");
|
||||
|
||||
tmp_value = NULL;
|
||||
|
@ -289,12 +289,12 @@ int orte_plm_base_fork_hnp(void)
|
||||
}
|
||||
|
||||
/* indicate that it must use the novm state machine */
|
||||
opal_argv_append(&argc, &argv, "-mca");
|
||||
opal_argv_append(&argc, &argv, "-"OPAL_MCA_CMD_LINE_ID);
|
||||
opal_argv_append(&argc, &argv, "state_novm_select");
|
||||
opal_argv_append(&argc, &argv, "1");
|
||||
|
||||
/* pass it a jobid to match my job family */
|
||||
opal_argv_append(&argc, &argv, "-mca");
|
||||
opal_argv_append(&argc, &argv, "-"OPAL_MCA_CMD_LINE_ID);
|
||||
opal_argv_append(&argc, &argv, "ess_base_jobid");
|
||||
jobid = ORTE_DAEMON_JOBID(ORTE_PROC_MY_NAME->jobid);
|
||||
if (ORTE_SUCCESS != (rc = orte_util_convert_jobid_to_string(¶m, jobid))) {
|
||||
|
@ -563,7 +563,7 @@ static int setup_launch(int *argcptr, char ***argvptr,
|
||||
NULL);
|
||||
|
||||
/* ensure that only the ssh plm is selected on the remote daemon */
|
||||
opal_argv_append_nosize(&argv, "-mca");
|
||||
opal_argv_append_nosize(&argv, "-"OPAL_MCA_CMD_LINE_ID);
|
||||
opal_argv_append_nosize(&argv, "plm");
|
||||
opal_argv_append_nosize(&argv, "rsh");
|
||||
|
||||
@ -573,12 +573,12 @@ static int setup_launch(int *argcptr, char ***argvptr,
|
||||
* only if they aren't already present
|
||||
*/
|
||||
for (i = 0; NULL != environ[i]; ++i) {
|
||||
if (0 == strncmp("OMPI_MCA_mca_base_env_list", environ[i],
|
||||
strlen("OMPI_MCA_mca_base_env_list"))) {
|
||||
if (0 == strncmp(OPAL_MCA_PREFIX"mca_base_env_list", environ[i],
|
||||
strlen(OPAL_MCA_PREFIX"mca_base_env_list"))) {
|
||||
/* ignore this one */
|
||||
continue;
|
||||
}
|
||||
if (0 == strncmp("OMPI_MCA", environ[i], 8)) {
|
||||
if (0 == strncmp(OPAL_MCA_PREFIX, environ[i], 9)) {
|
||||
/* check for duplicate in app->env - this
|
||||
* would have been placed there by the
|
||||
* cmd line processor. By convention, we
|
||||
@ -599,7 +599,7 @@ static int setup_launch(int *argcptr, char ***argvptr,
|
||||
}
|
||||
if (!found) {
|
||||
/* add it */
|
||||
opal_argv_append(&argc, &argv, "-mca");
|
||||
opal_argv_append(&argc, &argv, "-"OPAL_MCA_CMD_LINE_ID);
|
||||
opal_argv_append(&argc, &argv, param);
|
||||
opal_argv_append(&argc, &argv, value);
|
||||
}
|
||||
|
@ -296,7 +296,7 @@ int orte_daemon(int argc, char *argv[])
|
||||
orte_launch_environ = opal_argv_copy(environ);
|
||||
|
||||
/* purge any ess flag set in the environ when we were launched */
|
||||
opal_unsetenv("OMPI_MCA_ess", &orte_launch_environ);
|
||||
opal_unsetenv(OPAL_MCA_PREFIX"ess", &orte_launch_environ);
|
||||
|
||||
/* if orte_daemon_debug is set, let someone know we are alive right
|
||||
* away just in case we have a problem along the way
|
||||
@ -600,7 +600,7 @@ int orte_daemon(int argc, char *argv[])
|
||||
* we may start as the result of a comm_spawn
|
||||
*/
|
||||
for (i=0; NULL != environ[i]; i++) {
|
||||
if (0 == strncmp(environ[i], "OMPI_MCA", 8)) {
|
||||
if (0 == strncmp(environ[i], OPAL_MCA_PREFIX, 9)) {
|
||||
/* make a copy to manipulate */
|
||||
tmp = strdup(environ[i]);
|
||||
/* find the equal sign */
|
||||
@ -608,7 +608,7 @@ int orte_daemon(int argc, char *argv[])
|
||||
*nptr = '\0';
|
||||
nptr++;
|
||||
/* add the mca param to the orted cmd line */
|
||||
opal_argv_append_nosize(&orted_cmd_line, "-mca");
|
||||
opal_argv_append_nosize(&orted_cmd_line, "-"OPAL_MCA_CMD_LINE_ID);
|
||||
opal_argv_append_nosize(&orted_cmd_line, &tmp[9]);
|
||||
opal_argv_append_nosize(&orted_cmd_line, nptr);
|
||||
free(tmp);
|
||||
@ -785,8 +785,8 @@ int orte_daemon(int argc, char *argv[])
|
||||
NULL
|
||||
};
|
||||
for (i=0; i < argc; i++) {
|
||||
if (0 == strcmp("-mca", argv[i]) ||
|
||||
0 == strcmp("--mca", argv[i]) ) {
|
||||
if (0 == strcmp("-"OPAL_MCA_CMD_LINE_ID, argv[i]) ||
|
||||
0 == strcmp("--"OPAL_MCA_CMD_LINE_ID, argv[i]) ) {
|
||||
ignore = false;
|
||||
/* see if this is something we cannot pass along */
|
||||
for (k=0; NULL != no_keep[k]; k++) {
|
||||
|
@ -156,7 +156,7 @@ int main(int argc, char *argv[])
|
||||
* code will output
|
||||
*/
|
||||
if (debug) {
|
||||
putenv("OMPI_MCA_orte_debug=1");
|
||||
putenv(OPAL_MCA_PREFIX"orte_debug=1");
|
||||
}
|
||||
|
||||
/* detach from controlling terminal
|
||||
|
@ -835,9 +835,9 @@ int orterun(int argc, char *argv[])
|
||||
orte_launch_environ = opal_argv_copy(environ);
|
||||
|
||||
/* purge any ess flag set externally */
|
||||
opal_unsetenv("OMPI_MCA_ess", &orte_launch_environ);
|
||||
opal_unsetenv(OPAL_MCA_PREFIX"ess", &orte_launch_environ);
|
||||
/* purge the env list, if set */
|
||||
opal_unsetenv("OMPI_MCA_mca_base_env_list", &orte_launch_environ);
|
||||
opal_unsetenv(OPAL_MCA_PREFIX"mca_base_env_list", &orte_launch_environ);
|
||||
|
||||
#if OPAL_ENABLE_FT_CR == 1
|
||||
/* Disable OPAL CR notifications for this tool */
|
||||
@ -1533,8 +1533,8 @@ static int capture_cmd_line_params(int argc, int start, char **argv)
|
||||
};
|
||||
|
||||
for (i = 0; i < (argc-start); ++i) {
|
||||
if (0 == strcmp("-mca", argv[i]) ||
|
||||
0 == strcmp("--mca", argv[i]) ) {
|
||||
if (0 == strcmp("-"OPAL_MCA_CMD_LINE_ID, argv[i]) ||
|
||||
0 == strcmp("--"OPAL_MCA_CMD_LINE_ID, argv[i]) ) {
|
||||
/* ignore this one */
|
||||
if (0 == strcmp(argv[i+1], "mca_base_env_list")) {
|
||||
i += 2;
|
||||
@ -1723,11 +1723,11 @@ static int create_app(int argc, char* argv[],
|
||||
|
||||
/* add the ompi-server, if provided */
|
||||
if (NULL != ompi_server) {
|
||||
opal_setenv("OMPI_MCA_pubsub_orte_server", ompi_server, true, &app->env);
|
||||
opal_setenv(OPAL_MCA_PREFIX"pubsub_orte_server", ompi_server, true, &app->env);
|
||||
}
|
||||
|
||||
/* Did the user request to export any environment variables on the cmd line? */
|
||||
env_set_flag = getenv("OMPI_MCA_mca_base_env_list");
|
||||
env_set_flag = getenv(OPAL_MCA_PREFIX"mca_base_env_list");
|
||||
if (opal_cmd_line_is_taken(&cmd_line, "x")) {
|
||||
if (NULL != env_set_flag) {
|
||||
orte_show_help("help-orterun.txt", "orterun:conflict-env-set", false);
|
||||
|
Loading…
Reference in New Issue
Block a user