quick fix so module dependencies get automatically unloaded when doing "module unload"#830
Conversation
Signed-off-by: Fotis Georgatos <fotis.georgatos@uni.lu>
Signed-off-by: Fotis Georgatos <fotis.georgatos@uni.lu>
Signed-off-by: Fotis Georgatos <fotis.georgatos@uni.lu>
…o contrib_builtbanner
Signed-off-by: Fotis Georgatos <fotis.georgatos@uni.lu>
Signed-off-by: Fotis Georgatos <fotis.georgatos@uni.lu>
…g "module unload"
Signed-off-by: Fotis Georgatos <fotis.georgatos@uni.lu>
Signed-off-by: Fotis Georgatos <fotis.georgatos@uni.lu>
|
Automatic reply from Jenkins: Can I test this? |
…mework into typecheck_format2
|
Jenkins: ok to test |
|
@JensTimmerman @boegel as this changes current behaviour, shouldn't this come with an option to turn on/off? |
…mework into typecheck_format2
…sed by Convert instance
…parse dependencies in format v2 using parse_dependency/Dependency
…btain name/version/versionsuffix/toolchain
…lation to dict to _parse_dependency method in EasyConfig class
|
@pescobar: Yes, since this changes default behavior, so we need an option to enable this. To add an option, see You will then need to add a Once that is done, pass this build option down to the Make sure that this is very well documented (with comments in If you add a new option, make sure it gets unit tested. You'll need to add a new test to Let us know if you need any help with this. I'll tag this PR for EB v1.12, since this'll need some work before it's ready to be merged in. @rtmclay: Is it a common feature of module tools to automatically unload dependency modules on an |
|
I'm not quite sure what you are asking. With Lmod, you must wrap the call with mode() because unloading a module file while unloading another module doesn't make sense. How do you reverse an unload? You can always unload a module even if it is not loaded. That is it is not an error to try to unload a module that is not loaded. But maybe that is not the question you are asking. If you have a module FOO: If you load FOO, then BAR will be loaded. If you unload FOO then BAR will be unloaded. Have I answered your question? |
|
@rtmclay: The way we have been generating module files is such that unloading a module does not trigger unloading of dependencies. One major reason there is toolchains that are loaded as modules as well, so as soon as you have two separate modules loaded, unloading one of them will probably break the functionality of the other (since the toolchain will be unloaded). In Tcl modules, you can specify conditional loads in two ways: (i) one that triggers unloading (when the module name is wrapped in quotes) (ii) one that doesn't trigger unloading (no single quotes) Does Lmod support both ways? |
|
Lmod always requires quotes. if (not isloaded("foo/1.2.3")) then Without quotes, Lua would treat them as variables. You could do: mfile="foo/1.2.3" In the above case mfile is a variable and "mfile" is a string. |
properly parse dependencies in easyconfig format v2
…eorgatos/easybuild-framework into 800_contrib_built-banner-andor-footer Conflicts: easybuild/tools/repository.py
update with develop (to fix conflict), finish implementation of --modules-footer and add unit test for it
…-banner-andor-footer 800 contrib built banner and/or footer
Modules version
…ramework into modules-unload-deps
…d_module act on it
make generating recursive unloading modules configurable (and non-default)
don't include 'if is-loaded' guard when recursive module unloading is requested
|
Jenkins: test this please |
|
@boegel I have tried this and its working fine for me. When using --recursive-module-unload the modulefiles are generated without the "if is-loaded" sentence for the dependencies and it unload dependencies when doing unload (Lmod 5.2) |
|
Jenkins is happy, and thus so am I. Thanks for initiating and testing this @pescobar! |
quick fix so module dependencies get automatically unloaded when doing "module unload"
I don't know if you are interested in this "feature". I do the PR just in case so you can decide about it
You can read details about this here:
#714 (comment)