Re: Enhancements
Manage your shell environment variables and aliases
Brought to you by:
leomania,
xdelaruelle
From: Edward A. <ed...@ul...> - 2002-02-21 20:19:30
|
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 |