-
Notifications
You must be signed in to change notification settings - Fork 128
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
depends_on doesn't survive module swap #604
Comments
Thanks for the detailed bug report. It will really speed up the opportunity to look at this bug if you would follow the instructions give in the bug report template and provide an actual modulefile tree that shows the issue you are having. If you are having an issue with a moduletree that is using the hierarchy consider using the moduletree provided in the source repo:
$ env -i LMOD_ROOT=$LMOD_ROOT USER=$USER ./bug_report_template.sh |
Hi @rtmclay - just to be clear... do you prefer that I use the "gcc" and "mpich" modules in the bug_report_template instead the modules I've created above, or are you just asking that I copy my test modules into the |
Feel free to use your modules that you have created. What I want is be able to reproduce the bug. I do not care what the module names are. The gcc and mpich modules are there to make it to make it easy for sites to build a test hierarchical module layout. |
@rtmclay I have put my modules and commands into the desired form. |
…" module has been a direct user load
Thanks for using the bug report guidelines! It was a big help. This was a difficult bug to track-down although the code changes were small. I had to completely re-think how dependency work. I have updated the testing branch which has fixed this issue for me. Please test this branch and let me know if this fixes the bug for you. |
Awesome. I will give this a try early next week and get back to you. |
Finally had a chance to test this and it looks good in the testing branch. Thanks! |
Great! This bug fix will be part of Lmod 8.7.14. This will be available next week. |
It turns out that there were more issues with depends_on() and the software hierarchy. If you get a chance, please test Lmod 8.7.14 |
Hi @rtmclay - thanks for the robust addition. Version 8.7.14 gives us the behavior we want. |
@vanderwb - You are very welcome. This was a big deal to fix. |
The documented behavior for
depends_on
suggests that a listed dependency will only be unloaded when the original package is unloaded if the dependency was not already loaded before loading the package. This works well in normal situations. However, if you perform a module swap on a package higher in the hierarchy (e.g., a compiler), the packages are reloaded explicitly and the fact that the dependency was loaded as such is lost. This means that unloading the package will not unload the dependency in situations when it should, after such a swap.To Reproduce
Consider the following module tree:
Here, package
depends_on
dependency.Let's run though some commands:
Here is what we get:
Expected behavior
I'm not sure what the expected behavior is here. However, the desired behavior would be for the knowledge that dependency was loaded because of a
depends_on
condition in package to survive the swap operation, and thus cause the unload behavior to be consistent.Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: