Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] [OMPI svn] svn:open-mpi r32163 - in trunk: opal/mca/base orte/tools/orterun
From: Dave Goodell (dgoodell) (dgoodell_at_[hidden])
Date: 2014-07-16 12:22:24


On Jul 15, 2014, at 2:03 PM, Mike Dubman <miked_at_[hidden]> wrote:

> these are two separate issues:
>
> 1. -x var=val (or -mca opal_base_envlist var=val) will work in the same way
> opal_base_envlist does the same as "-x" and can be used in the very same fashion as -x
>
> 2. When list of vars is passed with help of opal_base_envlist, the escaping is possible but escaped char should differ from delimiter char.

That would be my preference (use something like "\" as the escape char). Though we could always go with a scheme where a doubled delimiter means "literal delimiter", sort of like "$$" in a Makefile.

> I think -x should stay as shotrt-form alias for -mca opal_base_envlist var=val and -mca opal_base_envlist var.
> on dev meeting it was decided to deprecate it as some point.

Can we revisit this decision? Mike and I both seem to be in favor of retaining "-x", at least for non-conflicting uses. Would someone who is against retaining "-x" please speak up in favor of that position?

Also, Mike, I just looked again at the code and I don't think it is robustly checking for conflict cases. It's possible to do this and you won't get an error with the current code, right?

----8<----
$ mpirun -mca mca_base_env_list foo=bar -x foo=baz ...
----8<----

See this code, which only looks at the environment when looking for "mca_base_env_list":

> Modified: trunk/orte/tools/orterun/orterun.c
> ==============================================================================
> --- trunk/orte/tools/orterun/orterun.c Tue Jul 8 20:10:04 2014 (r32162)
> +++ trunk/orte/tools/orterun/orterun.c 2014-07-08 20:38:25 EDT (Tue, 08 Jul 2014) (r32163)
> @@ -1722,6 +1722,13 @@
>
> /* Did the user request to export any environment variables on the cmd line? */
> if (opal_cmd_line_is_taken(&cmd_line, "x")) {
> + char* env_set_flag = getenv("OMPI_MCA_mca_base_env_list");
> + if (NULL != env_set_flag) {
> + orte_show_help("help-orterun.txt", "orterun:conflict-env-set", false);
> + return ORTE_ERR_FATAL;
> + } else {
> + orte_show_help("help-orterun.txt", "orterun:deprecated-env-set", false);
> + }
> j = opal_cmd_line_get_ninsts(&cmd_line, "x");
> for (i = 0; i < j; ++i) {
> param = opal_cmd_line_get_param(&cmd_line, "x", i, 0);

-Dave