Re: [Lmod-users] Global cache?
A Lua based environment module system that reads TCL modulefiles.
Brought to you by:
rtmclay
|
From: Oleksandr M. <om...@hp...> - 2012-12-12 23:28:59
|
On Dec 12, 2012, at 3:35 PM, Robert McLay <mc...@ta...> wrote:
>
> On one of our systems, where spider takes longer than 2 minutes, we do exactly that. Namely we have a cron job that run every night that builds a system cache file. In the contrib directory there is an example shell script that uses the spider command. This is different from "module spider". See contrib/BuildSystemCacheFile/createSystemCacheFile.sh It will have to be tailored to your environment.
>
> I am planning to improve this. The cache file really only needs to be updated when the system changes. I am thinking about a function or a file that can be checked to say that the system has been updated, please rebuild the cache. Also if there is some software manager used, it could be used to rebuilt the cache file.
>
> R.
Robert,
Thanks for the reply. I adapted the script. There was one issue though. Setting LMOD_SPIDER_CACHE_DIR="/real/location/of/the/cache" in the user's environment doesn't work despite the os.getenv call in the libexec/lmod as Lmod still tries to regenerate individual user cache on the next "module spider" invocation. Patching lmod/libexec/lmod to change
sysCacheDir = os.getenv("LMOD_SPIDER_CACHE_DIR") or ""
to
sysCacheDir = os.getenv("LMOD_SPIDER_CACHE_DIR") or "/real/location/of/the/cache"
works fine, but has the disadvantage of creating another upgrade QA step.
Regards,
Alex |