Re: Enhancements
Manage your shell environment variables and aliases
Brought to you by:
leomania,
xdelaruelle
From: Eric S. <bar...@kn...> - 2002-02-21 20:33:45
|
Ed, I'm not sure what you're asking here. Are you referring to the modulefile code snippet below? If so, that's the way we've chosen to handle a software package not being installed on the calling platform. We prefer to have it fail silently rather than annoy the user with warning messages. That way he/she can also have the same modules load command on every platform. I have implemented a similar check in the ModulesHelp procedure which will tell the user whether the package is available on the calling platform when they issue a 'module help <modulename>' command. With reference to implementing this suggestion, I do have some development background and would be willing to give it a shot. Eric On Thu, Feb 21, 2002 at 01:22:20PM -0500, Edward Arthur wrote: > That's a great suggestion, but I'm a modules user not developer. > We have the same situation here (Linux and Solaris) and probably > the same set of tools.. > > Would you want to "break" or have an error message? > > /Ed > > Eric Stanley wrote: > > > > At our site, we have implemented modulefiles in such a way that there > > is only one set of modulefiles across all platforms. This reduces the > > effort required to keep the modulefiles up to date. In our case the > > platforms are a couple versions of Solaris and a couple versions of > > Linux. This does, however, lead to a problem for which I'd like to > > suggest a solution and get the list's feedback. > > > > The problem arises when doing a 'module avail' command. Since all > > modulefiles are in the modulefiles directory, they are all listed as > > being available even though not every version of software is installed > > on every platform. In the modulefile itself the presence or absence > > of a particular software package is handled by checking for the > > existance of the top level directory of the software package similar > > to the following: > > > > if { [ file isdirectory /tools/gcc/2.95.2 ] } { > > set gcc_home /tools/gcc/2.95.2 > > setenv CC gcc > > prepend-path PATH ${gcc_home}/bin > > prepend-path MANPATH ${gcc_home}/man > > prepend-path LD_LIBRARY_PATH ${gcc_home}/lib > > } else { > > break > > } > > > > What I would like to suggest that the 'module avail' command check for > > the existance of a special procedure with a reserved name in the > > modulefile. The procedure might be named something like 'Avail' and > > would return TRUE if the package was really availble on the platform > > on which 'module avail' was being run and FALSE otherwise. If TRUE > > was returned, 'module avail' would list the modulefile as being > > available, otherwise it would not. If no such procedure existed, > > 'module avail' would use the presence of the modulefile as the only > > indication that the modulefile was available. > > > > I'd be willing to try to hack in this solution unless we come up with > > a better one. Perhaps there is already a good solution and I just > > don't know about it. > > > > Thanks for your feedback. > > > > Eric > |