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