Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: [OMPI users] default num_procs of round_robin_mapper with cpus-per-proc option
From: tmishima_at_[hidden]
Date: 2014-01-22 19:28:02


Hi Ralph, I want to ask you one more thing about default setting of
num_procs
when we don't specify the -np option and we set the cpus-per-proc > 1.

In this case, the round_robin_mapper sets num_procs = num_slots as below:

rmaps_rr.c:
130 if (0 == app->num_procs) {
131 /* set the num_procs to equal the number of slots on these
mapped nodes */
132 app->num_procs = num_slots;
133 }

However, because of cpus_per_rank > 1, this num_procs will be refused at
the
line 61 in rmaps_rr_mappers.c as below, unless we switch on the
oversubscribe
directive.

rmaps_rr_mappers.c:
61 if (num_slots < ((int)app->num_procs *
orte_rmaps_base.cpus_per_rank)) {
62 if (ORTE_MAPPING_NO_OVERSUBSCRIBE & ORTE_GET_MAPPING_DIRECTIVE
(jdata->map->mapping)) {
63 orte_show_help("help-orte-rmaps-base.txt",
"orte-rmaps-base:alloc-error",
64 true, app->num_procs, app->app);
65 return ORTE_ERR_SILENT;
66 }
67 }

Therefore, I think the default num_procs should be equal to the number of
num_slots divided by cpus/rank:

           app->num_procs = num_slots / orte_rmaps_base.cpus_per_rank;

This would be more convinient for most of people who want to use the
-cpus-per-proc option. I already confirmed it worked well. Please consider
to apply this fix to 1.7.4.

Regards,
Tetsuya Mishima