Bug 513583 - module unload not working if the modulefile is outside of the modulefiles directory
Summary: module unload not working if the modulefile is outside of the modulefiles dir...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: environment-modules
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Orion Poplawski
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-07-24 11:28 UTC by Milos Jakubicek
Modified: 2009-09-24 06:07 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-23 21:12:22 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Milos Jakubicek 2009-07-24 11:28:25 UTC
Description of problem:

It seems that "module unload <modulefile>" works only if <modulefile> is inside of /usr/share/Modules/modulefiles/ (and probably also /etc/modulefiles, didn't test this)

Version-Release number of selected component (if applicable):

environment-modules-3.2.6-7.fc11.x86_64

How reproducible:

Always

Steps to Reproduce:

>module load /usr/share/mpich2/mpich2.module
>module list
Currently Loaded Modulefiles:
  1) /usr/share/mpich2/mpich2.module
>module unload /usr/share/mpich2/mpich2.module
>module list
Currently Loaded Modulefiles:
  1) /usr/share/mpich2/mpich2.module
>module purge
>module list
No Modulefiles Currently Loaded.
>cp /usr/share/mpich2/mpich2.module /usr/share/Modules/modulefiles/
>module load mpich2.module
>module list
Currently Loaded Modulefiles:
  1) mpich2.module
>module unload mpich2.module
>module list
No Modulefiles Currently Loaded.

Additional info:

Though I'm aware that modulefiles should be present in standard directories, this should imho work too.

Comment 1 Orion Poplawski 2009-09-23 15:05:14 UTC
This works (at least with 3.2.7b):

[orion@orca devel]$ module load /usr/share/mpich2/mpich2-32
[orion@orca devel]$ module list
Currently Loaded Modulefiles:
  1) /usr/share/mpich2/mpich2-32
[orion@orca devel]$ module unload mpich2-32
[orion@orca devel]$ module list
No Modulefiles Currently Loaded.

How's that?

Comment 2 Milos Jakubicek 2009-09-23 17:27:12 UTC
Ah, it reveals that this is not a bug, I pointed to the modulefile via an absolute path when unloading (like when loading it), which doesn't work, one has to pass just the filename as argument as you did.

However, the "module unload <name>" command returns 0 whatever nonsense is passed as <name>, which is not good (it should print an error).

There is another issue with the update to 3.2.7b, namely that the path to modulecmd in /etc/profile.d/modules.sh is now wrong (commented on the update).

Comment 3 Orion Poplawski 2009-09-23 21:12:22 UTC
(In reply to comment #2)
> However, the "module unload <name>" command returns 0 whatever nonsense is
> passed as <name>, which is not good (it should print an error).

True, but this should be filed upstream.
 
> There is another issue with the update to 3.2.7b, namely that the path to
> modulecmd in /etc/profile.d/modules.sh is now wrong (commented on the update).  

Yes, fixed in 3.2.7b-2.  Thanks.

Comment 4 Milos Jakubicek 2009-09-24 06:07:05 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > However, the "module unload <name>" command returns 0 whatever nonsense is
> > passed as <name>, which is not good (it should print an error).
> 
> True, but this should be filed upstream.

Just FYI, I found this already file as:

https://sourceforge.net/tracker/?func=detail&aid=2384340&group_id=15538&atid=115538

...commented on the bug.


Note You need to log in before you can comment on or make changes to this bug.