Module -- a software management tool
Often, multiple versions of a compiler -- or other system softwares --
are available on the computer on which a user's program performs computation. Typically,
the system administrator assigns a specific version of a compiler as the
system-wise default. If the user prefers, or are forced due to a myriad of
reasons, to use a specific - older or newer than the current default -
version, then care must be exercised by the user
to point to the appropriate software path. This could be a less than pleasant
undertaking especially if many intertwining, or layered, scripts are involved in running a job.
On the SCV Linux cluster, this
is compounded by the fact that there are not only multiple versions of a
compiler, but that there are compilers provided by multiple vendors.
In order to provide the users flexibility in choosing a compiler
transparently, we have made
available a software management tool called module.
For details on module, please see the manpage.
The usage of module is actually quite straightforward. Examples
of the most essential functionalities are given below.
To find out what compilers are available
skate:~ % module avail
------------------------- /usr/local/Modules/compilers -------------------------
gcc/3.4.5(default) intel/9.0(default)
---------------------------- /usr/local/Modules/mpi ----------------------------
mpichgm/1.2.6..14b_gcc(default:mpich-gcc)
mpichgm/1.2.6..14b_intel(mpich-intel)
--------------------- /usr/local/Modules/3.1.6/modulefiles ---------------------
module-info modules use.own
------------------------- /usr/local/Modules/versions --------------------------
3.1.6
The above list shows multiple versions of Gnu/Intel/PGI compilers are available
on the system, with the system default as marked. Corresponding to each of the compiler vendors, there is a
MPICH setup to go with it.
To see what has been selected by the system
skate:~ % module list
Currently Loaded Modulefiles:
1) gcc/3.4.5(default)
2) intel/9.0(default)
3) mpichgm/1.2.6..14b_gcc(default:mpich-gcc)
Note that there are two MPI runtime environment available : the system default
gcc and intel. It expects an executable
compiled with a gcc compiler. If the executable
for use in an MPI program is generated with an Intel compiler, a corresponding
MPICH runtime environment for Intel must be loaded.
To load a new MPICH runtime environment
skate:~ % module unload mpich-gcc
skate:~ % module list
Currently Loaded Modulefiles:
1) gcc/3.4.5(default) 2) intel/9.0(default)
skate:~ % module load mpich-intel
to load the intel mpich runtime environment.
skate:~ % module list
Currently Loaded Modulefiles:
1) gcc/3.4.5(default)
2) intel/9.0(default)
3) mpichgm/1.2.6..14b_intel(mpich-intel)
Tip:
If the compiler selection is of a permanent nature, you
may want to put it in your .cshrc file to avoid having to do it manually.
|