views:

166

answers:

0

We use the environment modules system to manage unix environment variable setting for our platform zoo (irix, solaris, suse, cygwin and others), and to manage different software version sets.

The environment modules package uses the $HOME/.modulesbeginenv to capture the initial state of the environment, but if the home directory is shared across different systems, then the file gets overwritten when a login with a module init takes place. This happens for login subshells too I guess.

I think this issue may be at the heart of an error message that one of our users is getting:

ModuleCmd_Use.c(132):WARN:53: Cannot close file '/usr/people/dres/.modulesbeginenv'

which may arise from a race between near-simultaneous logins/module inits.

I thought I could set the MODULESBEGINENV environment variable to something else like .modulesbeginenv.$HOST but my experiments seem to show that the initial environment is not being captured there.

If you have dealt with this problem before, how did you do it?

Thanks