Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't generate working Tcl modulefiles with Modules 4.2.3+ #3396

Closed
welucas2 opened this issue Aug 4, 2020 · 0 comments · Fixed by #3397
Closed

Can't generate working Tcl modulefiles with Modules 4.2.3+ #3396

welucas2 opened this issue Aug 4, 2020 · 0 comments · Fixed by #3397
Milestone

Comments

@welucas2
Copy link
Contributor

welucas2 commented Aug 4, 2020

Using EasyBuild with newer versions of EnvironmentModules fails as it generates Tcl modules that can't load. Changes to Modules in 4.2.3 mean that modules unloaded as part of a swap/switch operation are now flagged as conflicting with the module, so when an EasyBuild module does e.g. module swap gcc gcc/9.3.0, 'gcc' becomes conflicting with the main module, 'gcc/9.3.0' can't be loaded, and the main module fails to load.

The problem appeared for me while setting up a new CrayGNU toolchain on a system with Modules 4.3.1. The modulefile generated has several swap statements to ensure the correct module versions are loaded. Installing the toolchain fails at the sanity check stage when the module can't be loaded.

Modulefiles with the simple following form will fail to load for the same reason:

#%Module
module swap some_module some_module/x.y.z

The Modules 4.2.3 release notes also state 'If module switch has only one argument, do not define a conflict toward switched-off modulefile.' If EasyBuild generates Tcl modulefiles with swap statements like this, the problem should be resolved. However, it also states 'it is not recommended to use module switch command in modulefiles' so there might be more to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants