cea-hpc / modules

Environment Modules: provides dynamic modification of a user's environment
http://modules.sourceforge.net/
GNU General Public License v2.0
668 stars 102 forks source link

Error message reported about an indirect dependency issue whereas module is correctly loaded #509

Closed xdelaruelle closed 9 months ago

xdelaruelle commented 9 months ago

A requirement error message appears when loading a module whereas an alternative dependency has been successfully loaded, thus loaded environment satisfies all dependency constraints.

$ cat modulefiles/cuda/11.6
#%Module
conflict cuda 
$ cat modulefiles/cuda/12.2
#%Module
conflict cuda 
$ cat modulefiles/hwloc/2.2.0
#%Module
conflict hwloc
$ cat modulefiles/hwloc/2.9.2
#%Module
prereq cuda/12
conflict hwloc
$ cat modulefiles/hwloc/.modulerc
#%Module
module-version hwloc/2.2.0 default
$ cat modulefiles/openmpi/4.1.5
#%Module
prereq hwloc/2.9.2 hwloc

$ ml cuda/11
$ ml openmpi
Loading openmpi/4.1.5
  ERROR: Load of requirement cuda/12 failed
  Loading requirement: hwloc/2.2.0
$ ml
Currently Loaded Modulefiles:
 1) cuda/11.6   2) hwloc/2.2.0   3) openmpi/4.1.5  

In the above example, an attempt to load hwloc/2.9.2 is done which fails as its dependency cuda/12 cannot be loaded (cuda/11 is already loaded). Main module openmpi/4.1.5 successfully loads as hwloc/2.2.0 is loaded instead of version 2.9.2.

The error message on openmpi loading block message about cuda/12 is disturbing:

Thanks to @adrien-cotte and his team for the bug report.

xdelaruelle commented 9 months ago

@adrien-cotte This fix will be shipped in v5.4. If you want to quickly deploy it on your v5.2+ setup, I am confident that 39c7cdc could apply on a v5.2+ version.

adrien-cotte commented 9 months ago

Thank you for anticipating my question 🙂👌