Installation and Issues With Environment Modules Compiled Under 64 Bit

The Modules Package is a set of commands and information files that provides a simple command interface for modifying the environment. Each module in The Modules Package is a file containing the information needed to initialize the environment for a particular application (or any environment information). It's awesome, and installation is easy. But there is a bug...

To install, download the latest package from the sourceforge repository (linked above) and extract in /usr/local/src/MODULES. Change to the directory and run the ../config, then make and make install. Create a symbolic link in /usr/local/Modules. Note that a 64-bit install breaks `module purge` with modules that load other modules so 32-bit CFLAGS are parsed. e.g.,


tar xvjf modules-3.2.8a.tar.bz2
cd modules-3.2.8
../config
make
make install
cd /usr/local/Modules
rm default
ln -s 3.2.8 default

The config file consists of a single line i.e.,


CFLAGS=-m32 ./configure --with-module-path=/usr/local/Modules/modulefiles --with-tcl-lib=/usr/lib64 --with-tcl-inc=/usr/include

In the previous version of Modules, compiled as 64 bit, it indicated an error from module purge if a module loaded another module. For example, in Example #1, the gcc module below also loads gmp and mpfr. When one attempts to do a module purge, it fails. Module gcc must be unloaded in order for module purge to work.

This bug seems to have been replicated in modules 3.2.8, except no error message is received. See Example #2

However if modules are compiled as 32 bit, rather than 64 bit, i.e.,

CFLAGS=-m32 ./configure --with-module-path=/usr/local/Modules/modulefiles --with-tcl-lib=/usr/lib64 --with-tcl-inc=/usr/include

.. the error is not reproduced. See example #3.

Example #1: Purging Modules, 64 bit, 3.2.7


[lev@wexstan ~]$ module display modules
-------------------------------------------------------------------
/usr/local/Modules/3.2.7/modulefiles/modules:
module-whatis loads the modules environment
setenv MODULESHOME /usr/local/Modules/3.2.7
prepend-path PATH /usr/local/Modules/3.2.7/bin
prepend-path MANPATH /usr/local/Modules/3.2.7/man
module use /usr/local/Modules/versions
-------------------------------------------------------------------
[lev@wexstan ~]$ module list
Currently Loaded Modulefiles:
1) modules 2) pgi/10.8 3) gmp/4.3.1
4) mpfr/2.4.1 5) gcc/4.4.5 6) intel/11.1 7)
openmpi-pgi/1.4.1 8) vpac/config
[lev@wexstan ~]$ module purge
gcc/4.4.5(10):ERROR:102: Tcl command execution failed: module-whatis
"Set environment variables to use $name version $ver"
[lev@wexstan ~]$ module list
Currently Loaded Modulefiles:
1) modules 2) pgi/10.8 3) gmp/4.3.1
4) mpfr/2.4.1 5) gcc/4.4.5 6) intel/11.1 7)
openmpi-pgi/1.4.1 8) vpac/config
[lev@wexstan ~]$ module unload gcc
[lev@wexstan ~]$ module purge
[lev@wexstan ~]$ module list
No Modulefiles Currently Loaded.

Example #2: Purging Modules, 64 bit, 3.2.8


[lev@wexstan ~]$ module display modules
-------------------------------------------------------------------
/usr/local/Modules/3.2.8/modulefiles/modules:
module-whatis loads the modules environment
setenv MODULESHOME /usr/local/Modules/3.2.8
prepend-path PATH /usr/local/Modules/3.2.8/bin
prepend-path MANPATH /usr/local/Modules/3.2.8/share/man
module use /usr/local/Modules/versions
-------------------------------------------------------------------
[lev@wexstan ~]$ module list
Currently Loaded Modulefiles:
1) modules 2) pgi/10.8 3) gmp/4.3.1
4) mpfr/2.4.1 5) gcc/4.4.5 6) intel/11.1 7)
openmpi-pgi/1.4.1 8) vpac/config
[lev@wexstan ~]$ module purge
[lev@wexstan ~]$ module list
Currently Loaded Modulefiles:
1) modules 2) pgi/10.8 3) gmp/4.3.1
4) mpfr/2.4.1 5) gcc/4.4.5 6) intel/11.1 7)
openmpi-pgi/1.4.1 8) vpac/config
[lev@wexstan ~]$ module unload gcc
[lev@wexstan ~]$ module purge
[lev@wexstan ~]$ module list
No Modulefiles Currently Loaded.

Example #3: Purging Modules, 32 bit, 3.2.8


[lev@wexstan ~]$ module display modules
-------------------------------------------------------------------
/usr/local/Modules/3.2.8/modulefiles/modules:
module-whatis loads the modules environment
setenv MODULESHOME /usr/local/Modules/3.2.8
prepend-path PATH /usr/local/Modules/3.2.8/bin
prepend-path MANPATH /usr/local/Modules/3.2.8/share/man
module use /usr/local/Modules/versions
-------------------------------------------------------------------
[lev@wexstan ~]$ module list
Currently Loaded Modulefiles:
1) modules 2) pgi/10.8 3) gmp/4.3.1 4) mpfr/2.4.1 5) gcc/4.4.5 6) intel/11.1 7) openmpi-pgi/1.4.1 8) vpac/config
[lev@wexstan ~]$ module purge
[lev@wexstan ~]$ module list
No Modulefiles Currently Loaded.