From 0394a4884d2c565e1a08c313faca486a514e67c2 Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Sun, 30 Aug 2009 14:30:36 +0000 Subject: [PATCH] Setup cpus-per-proc and cpus-per-rank as synonyms, both in mca params and on mpirun cmd line This commit was SVN r21914. --- orte/mca/rmaps/base/rmaps_base_open.c | 4 +++- orte/tools/orterun/orterun.c | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/orte/mca/rmaps/base/rmaps_base_open.c b/orte/mca/rmaps/base/rmaps_base_open.c index 5aadc70dd3..e16c6c3f97 100644 --- a/orte/mca/rmaps/base/rmaps_base_open.c +++ b/orte/mca/rmaps/base/rmaps_base_open.c @@ -151,7 +151,9 @@ int orte_rmaps_base_open(void) /* #cpus/rank to use */ param = mca_base_param_reg_int_name("rmaps", "base_cpus_per_rank", "Number of cpus to use for each rank [1-2**15 (default=1)]", - false, false, 1, &value); + false, false, 1, NULL); + mca_base_param_reg_syn_name(param, "rmaps", "base_cpus_per_rank", false); + mca_base_param_lookup_int(param, &value); orte_rmaps_base.cpus_per_rank = value; /* if the cpus/rank > 1, then we have to bind to cores UNLESS the binding has * already been set to something else diff --git a/orte/tools/orterun/orterun.c b/orte/tools/orterun/orterun.c index 1210c54ff9..0cfed39141 100644 --- a/orte/tools/orterun/orterun.c +++ b/orte/tools/orterun/orterun.c @@ -293,9 +293,12 @@ static opal_cmd_line_init_t cmd_line_init[] = { { "rmaps", "base", "no_schedule_local", '\0', "nolocal", "nolocal", 0, NULL, OPAL_CMD_LINE_TYPE_BOOL, "Do not run any MPI applications on the local node" }, + { "rmaps", "base", "cpus_per_rank", '\0', "cpus-per-proc", "cpus-per-proc", 1, + NULL, OPAL_CMD_LINE_TYPE_INT, + "Number of cpus to use for each process [default=1]" }, { "rmaps", "base", "cpus_per_rank", '\0', "cpus-per-rank", "cpus-per-rank", 1, NULL, OPAL_CMD_LINE_TYPE_INT, - "Number of cpus to use for each rank [default=1]" }, + "Synonym for cpus-per-proc" }, { "rmaps", "base", "n_perboard", '\0', "nperboard", "nperboard", 1, NULL, OPAL_CMD_LINE_TYPE_INT, "Launch n processes per board on all allocated nodes" },