Skip to content

failed evaluation is attempted multiple times #264

@xdelaruelle

Description

@xdelaruelle

Taking the following modulefiles as example:

$ cat /path/to/modulefiles/rea
#%Module
$ cat /path/to/modulefiles/reb
#%Module
$ cat /path/to/modulefiles/red
#%Module
prereq rea reb
if {[module-info mode unload]} {
    break
}

With following situation as starting point (rea and red modules loaded):

$ module load --auto red
Loading red
  Loading requirement: rea
$ module list
Currently Loaded Modulefiles:
 1) rea   2) red  

When switching from rea to reb, an unload attempt of red occurs which fails as this modulefile breaks when it is unloaded. The unload of red is tried twice: once when rea is unloaded and a second time when reb is loaded. Second attempt could be spared.

$ module switch --auto rea reb
Unloading rea
  ERROR: Reload of dependent red failed
$ module list
Currently Loaded Modulefiles:
 1) rea   2) red  
$ module switch --auto --force rea reb
Unloading rea
  WARNING: Reload of dependent red failed

Loading reb
  WARNING: Reload of dependent red failed
$ module list
Currently Loaded Modulefiles:
 1) red   2) reb

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions