I have exactly the same problem. One wish-list item I would like, which
might solve this problem, is that the 'switch' command can take only one
argument (the new module) and determine the old module from what is
currently loaded. i.e.
module load Synopsys/1999.10
module switch Synopsys/1999.05
This makes the assumption that the module in question has the naming
convention "tool/version", which I think is common practice for vendor
tools. The switch command will do a pattern match in the 'module list'
for Synopsys/*, unload that and then load the requested module. In fact,
this already happens to some extent, since you can do
module switch Synopsys Synopsys/1999.05
Mark Lakata
MIPS Technologies
1225 Charleston Road
Mountain View, CA 94043
phone 650-567-5170
fax 650-567-5002
email la...@mi...
On Wed, 15 Mar 2000, Leo Butler wrote:
> G'day, all.
>
> I've set up modulefiles for all of the CAD applications in
> use at my company, and I've set up a couple of modulefiles
> for two separate projects that load the correct versions of
> applications for that project. I want users to be able to
> switch between two (or any number of) projects and have any
> interactive changes they may have made to approved versions
> not mess up the module unload (or switch).
>
> For instance, say I do a
>
> % module load Projects/proj1
>
> which in turn loads up modules for Synopsys/1999.05, VCS/5.0
> and Apollo/3.3.0.EA9. But I'm evaluating Synopsys/1999.10 on
> this project, so I
>
> % module switch Synopsys/1999.05 Synopsys/1999.10
>
> Okay, so far so good. But now I want to load up another
> project, so I do a
>
> % module switch Projects/proj1 Projects/proj2
>
> and I get an error because proj1 wants to unload Synopsys/1999.05
> but I've secretly replaced this version since proj1 was loaded.
>
> What's the correct way to manage this sort of situation? It
> is very real-world but I may be approaching it incorrectly.
> I do know that I want the user to not worry about what they
> may have done interactively and I don't want them to have to
> effectively do a
>
> % module purge (or clear)
> % module load dot GNU system admin user local
> % module load X11 CDE
> % module load Projects/proj2
>
> even by hiding this away in another modulefile.
>
> I then looked for a mechanism to figure out if a particular
> module was loaded from inside a modulefile so I could do a
> "if (exists any_version_of_Synopsys) then module unload Synopsys"
> but none of the commands seem to support this.
>
> Thanks in advance for any assistance on this!
>
> Regards,
>
> - Leo
>
> ----------------------------------------------------------------------
> Leo Butler Senior Engineer
> Brocade Communications Phone: (408) 487-8096
> 1901 Guadalupe Parkway Fax: (408) 487-8090
> San Jose, CA 95131 mailto:lb...@br...
>
|