TACC / Lmod

Lmod: An Environment Module System based on Lua, Reads TCL Modules, Supports a Software Hierarchy
http://lmod.readthedocs.org
Other
499 stars 128 forks source link

module restore is not purging correctly #717

Closed rtmclay closed 3 months ago

rtmclay commented 3 months ago

When restoring a collection, the previously loaded module are not being purged correctly.

rtmclay commented 3 months ago

Hey Matt. I was able to reproduce your problem and it was a bug in Lmod. The issue was that the previously loaded modules were purged. However the changes to the environment were lost when the collection was being restored.

I have uploaded to github the branch named IS717-restore. Please test this branch out to see if it solves the issue for you.

mathomp4 commented 3 months ago

Ooh. Thanks! Will do.

Note: might be a bit. Turns out I need lua-devel installed on the machine so I've asked my sysadmins. I guess this is the first lua code I've tried to build there!

mathomp4 commented 3 months ago

@rtmclay Sorry for the wait. My sysadmins got lmod-devel on my node and, huzzah!, it works!

> ml purge
> ml restore
Restoring modules from user's default
> echo $FC

> ml gcc
> echo $FC
/ford1/share/gmao_SIteam/gcc/gcc-13.3.0/bin/gfortran
> ml restore
Restoring modules from user's default
> echo $FC
rtmclay commented 3 months ago

Great! Thanks for working with me to fix this bug. Closing this issue.

rtmclay commented 2 months ago

Note that this branch has been merged onto the main branch. It has been released as Lmod 8.7.48.