Hi,
I ran into the very same problem last week. Issuing 'module purge' when
a modulefile is loaded that contains 'module load' instructions, causes
a segfault on
* Ubuntu 10.04 64-bit in ModuleCmd_Load.c:268
(Modules 3.2.8 compiled against Ubuntu 10.04's package
tcl 8.4.19-4)
* On SLES 11 it happens in ModuleCmd_Load.c:213
(compiled against statically and self compiled tcl 8.4.19)
(The segfault does not happen on Ubuntu 10.04 for optimized builds, on
SLES 11 both with optimised and debug builds.)
I found that removing the call to Tcl_DeleteInterp in
ModuleCmd_Load.c:268 can serve as a temporary workaround (no side
effects observed yet). It opens up a (small) memory leak, yes, but I'm
counting on it that the kernel will free up that memory anyway
as soon as 'modulecmd' exits.
--- a/ModuleCmd_Load.c
+++ b/ModuleCmd_Load.c
@@ -265,7 +265,7 @@ int ModuleCmd_Load( Tcl_Interp *interp,
break; /* switch */
}
}
- Tcl_DeleteInterp(tmp_interp);
+ /* Tcl_DeleteInterp(tmp_interp); */
/* do not process any further modulefiles if EM_EXIT */
if (em_return_val == EM_EXIT) break; /* for */
--
Maybe this helps someone else to circumvent the issue.
Sven
Lev Lafayette wrote, On 05.11.2010 06:23:
> Hi modulers,
>
> 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.
>
>
>
> 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.
|