1

I get an error loading environment modules (4.2.4) I do not understand. With three modules A, B and C where B depends on A and C and C depends only on A:

A

#%Module1.0

B

#%Module1.0
module load A C

C

#%Module1.0
module load A

it is not possible to load the modules in the following manner:

module load A B

The error that is printed to stdout is:

Error: B cannot be loaded due to missing prereq.
  HINT: the following modules must be loaded first: C

A module load A C B is working.

Is this a bug of the module environment or am I missing something?

Woltan
  • 13,723
  • 15
  • 78
  • 104

1 Answers1

1

You clearly hit a bug. module load A B should work as you expect.

I have reported it to the project on GitHub

As a work-around, you could also pass the --auto command-line switch:

$ module load --auto A B
Loading B
  Loading requirement: C
$ module list
Currently Loaded Modulefiles:
 1) A   2) C   3) B 

Another work-around is to write B modulefile with 2 separate module load commands:

#%Module1.0
module load A
module load C

UPDATE: Environment Modules 4.2.5 is now released and includes a fix for this issue. So module load A C command in B modulefile correctly loads A and C modulefiles.

  • 1
    Thank you for reporting it. I thought that such a fundamental feature could not be buggy. I tried your work around with loading modules in separate lines and it works for me. Thank you for your help! – Woltan Jul 05 '19 at 13:58