Re: [hwloc-devel] Priority of env vars vs. application options

2009-10-27 Thread Samuel Thibault
Brice Goglin, le Wed 28 Oct 2009 00:04:48 +0100, a écrit :
> So I am not sure which order is the best.

Maybe provide the two possibilities, i.e. two series of en vars, one
that comes before the application configuration and the other that comes
after?

Samuel


Re: [hwloc-devel] Priority of env vars vs. application options

2009-10-27 Thread Brice Goglin
Samuel Thibault wrote:
> Hello,
>
> At the moment, the HWLOC_FSROOT and HWLOC_XMLFILE environment variables
> override tool options and application configuration.  Is it really the
> behavior we should have?  I'd tend to think that the priority order
> should be:
>
> - application options/configuration
> - environment variable
> - default OS backend.
>
> i.e. basically move the HWLOC_FSROOT/HWLOC_XMLFILE interpretation to
> hwloc_topology_init, before the application can override them through
> configuration calls. Similarly, HWLOCK_THISSYSTEM would be overriden by
> HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM.
>   

For things like lstopo, we talked about it with Guillaume, and it seems
clear that --xml should override HWLOC_XMLFILE. For other applications,
I am not sure. I added HWLOC_XMLFILE to be able to dynamically switch to
another topology for debugging purpose. If the application loads a XML
file and the user finds that there is something wrong going on, being
able to force-load another XML file might still be helpful. It's not
clear that applications will let you change the XML file they load. For
instance, it could be internal to the MPI process manager without ever
exposing it to the user (process manager loads the topology once at
startup, saves it as XML, and all MPI processes reload it from XML). In
this case, being able to override with the env variable might be
helpful. So I am not sure which order is the best.

Brice



[hwloc-devel] Priority of env vars vs. application options

2009-10-27 Thread Samuel Thibault
Hello,

At the moment, the HWLOC_FSROOT and HWLOC_XMLFILE environment variables
override tool options and application configuration.  Is it really the
behavior we should have?  I'd tend to think that the priority order
should be:

- application options/configuration
- environment variable
- default OS backend.

i.e. basically move the HWLOC_FSROOT/HWLOC_XMLFILE interpretation to
hwloc_topology_init, before the application can override them through
configuration calls. Similarly, HWLOCK_THISSYSTEM would be overriden by
HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM.

What do people think?
(At least we should probably settle that clearly in the documentation)
(and document these environment variables, I didn't know about
HWLOC_XMLFILE).

Samuel