You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following patch workarounds the problem but is not enough, there are still 2 problems:
duplicated message when sticky_purge is warning
$ module config sticky_purge warning
$ module load main
$ module purgeUnloading main/1.0 WARNING: Unload of super-sticky module skippedUnloading dep/1.0 WARNING: Unload of super-sticky module skipped WARNING: Unload of super-sticky module skipped
get a warning message when purge is forced
$ module config sticky_purge silent
$ module load main
$ module purge -fUnloading dep/1.0 WARNING: Dependent main/1.0 is loaded
diff --git a/tcl/subcmd.tcl.in b/tcl/subcmd.tcl.in
index c83f6af0..1eebd310 100644
--- a/tcl/subcmd.tcl.in+++ b/tcl/subcmd.tcl.in@@ -1543,9 +1543,23 @@ proc cmdModuleUnload {context match auto force onlyureq args} {
reportWarning [getDepLoadedMsg $prereq_list]
}
} else {
- knerror [expr {[isModuleEvaluated any $modnamevr {}\- {*}$prereq_list] ? [getDepLoadedMsg $prereq_list] :\- [getErrPrereqMsg $prereq_list 0]}]+ # Initialize a flag to indicate if any dependent is sticky+ set stickyFound 0+ # Iterate over each module in the prereq_list+ foreach dep $prereq_list {+ if {[skipUnloadIfSticky unload $dep $modfile]} {+ set stickyFound 1+ break+ }+ }+ # If any dependent is sticky, we prevent the unload+ if {$stickyFound} {+ set ret 0+ } else {+ knerror [expr {[isModuleEvaluated any $modnamevr\+ {*}$prereq_list] ? [getDepLoadedMsg $prereq_list] :\+ [getErrPrereqMsg $prereq_list 0]}]+ }
}
}
The text was updated successfully, but these errors were encountered:
Describe the bug
While purging modules, error if a module has a sticky dependent.
To Reproduce
Steps to reproduce the behavior:
#%Module
#%Module conflict main prereq dep
#%Module module-tag super-sticky main module-tag super-sticky dep
(note: stickiness of
dep
does not have any effect for this bug)main
module:$ module load main
$ module config sticky_purge silent
Expected behavior
When a dependent of a module is sticky and sticky_purge value isn't
error
, then module command should not returns an error.Modules version and configuration
Additional context
The following patch workarounds the problem but is not enough, there are still 2 problems:
The text was updated successfully, but these errors were encountered: