Well, yes and no.

Yes - the value definitely needs to be computed in all cases since it is used 
later on.

No - the way it is computed is only correct for that one usage. The later usage 
(in the block that starts with 0 < opal_sys_limits.num_procs)) needs a 
completely different value.

The current computation only comes up with the number of procs for the specific 
job being launched. The latter code requires the total number of local procs 
that are alive - a rather different value.

So v1.5 is incorrect in either case. Would you like me to create a patch to 
correct it, or would you like to do it (covering both cases)?


On Jul 12, 2011, at 3:35 PM, Eugene Loh wrote:

> The function orte_odls_base_default_launch_local() has a variable 
> num_procs_alive that is basically initialized like this:
> 
>    if ( oversubscribed ) {
>        ...
>    } else {
>        num_procs_alive = ...;
>    }
> 
> Specifically, if the "oversubscribed" test passes, the variable is not 
> initialized.
> 
> (Strictly speaking, this is true only in v1.5.  In the trunk, the variable is 
> set to 0 when it is declared, but I'm not sure that's very helpful.)
> 
> I'm inclined to move the num_procs_alive computation ahead of the "if" block 
> so that this computation is always performed.
> 
> Sanity check?
> _______________________________________________
> devel mailing list
> de...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/devel


Reply via email to