Closed steverweber closed 5 months ago
<<EOF cat > /usr/share/lmod/lmod/modulefiles/A.lua execute {cmd="echo A-LOAD", modeA={"load"}} execute {cmd="echo A-UNLOAD", modeA={"unload"}} EOF <<EOF cat > /usr/share/lmod/lmod/modulefiles/B.lua depends_on('A') execute {cmd="echo B-LOAD", modeA={"load"}} execute {cmd="echo B-UNLOAD", modeA={"unload"}} EOF # module load B A-LOAD B-LOAD # module unload B A-UNLOAD B-UNLOAD
I expected when using module unload B to have B unloaded before A
module unload B
B-UNLOAD A-UNLOAD
One hacky workaround I found is to drop using depends_on and force the order during execute
<<EOF cat > /usr/share/lmod/lmod/modulefiles/B.lua execute {cmd="module load A; echo B-LOAD", modeA={"load"}} execute {cmd="echo B-UNLOAD; module unload A", modeA={"unload"}} EOF
Is there a modeA that happens during unload before unloading the depends_on ? perhaps a modeA={"pre-unload"}
depends_on
modeA={"pre-unload"}
thanks!
ah disregard ...
<<EOF cat > /usr/share/lmod/lmod/modulefiles/B.lua execute {cmd="echo B-UNLOAD", modeA={"unload"}} depends_on('A') execute {cmd="echo B-LOAD", modeA={"load"}} EOF
I expected when using
module unload B
to have B unloaded before AOne hacky workaround I found is to drop using depends_on and force the order during execute
Is there a modeA that happens during unload before unloading the
depends_on
? perhaps amodeA={"pre-unload"}
thanks!