GPC uses software environment modules to allow users to quickly switch between software environment settings. Environment variables and path settings can be modified using a single command.
Listing available environments
[ks347@gpc ~]$ module avail
--------------- /etc/modulefiles --------------- cluster-tools/7.1 cmd cmsub gcc/5.1.0
---------- /usr/global/Modules --------------- blacs/openmpi/gcc/64/1.1patch03 fftw3/openmpi/open64/64/3.3.4 netcdf/gcc/64/4.3.3.1
[ks347@gpc ~]$
|
The $ module avail command will show a list of all available environments under the /usr/global/Modules section. If multiple versions of a software package are installed, they will show up as SOFTWARE_NAME/VERSION.
Listing enabled environments
[ks347@gpc ~]$ module list Currently Loaded Modulefiles: 3) cmsh 4) cmd 5) cluster-tools/7.1 6) sge/2011.11p1
[ks347@gpc ~]$ |
The $ module list command will show a list of all environments that are currently loaded.
Loading an environment
[ks347@gpc ~]$ module list Currently Loaded Modulefiles: 1) SGE/8.1.8 [ks347@gpc ~]$ module load blas/gcc/64/3.5.0 [ks347@gpc ~]$ module load lapack/gcc/64/3.5.0 [ks347@gpc ~]$ module list Currently Loaded Modulefiles: 1) SGE/8.1.8 2) blas/gcc/64/3.5.0 3) lapack/gcc/64/3.5.0 [ks347@gpc ~]$ |
The $ module load SOFTWARE_NAME/VERSION command will load an environment if it is available.
Unloading an environment
[ks347@gpc ~]$ module list Currently Loaded Modulefiles: 1) SGE/8.1.8 2) blas/gcc/64/3.5.0 3) lapack/gcc/64/3.5.0 [ks347@gpc ~]$ module unload lapack [ks347@gpc ~]$ module list Currently Loaded Modulefiles: 1) SGE/8.1.8 2) blas/gcc/64/3.5.0 [ks347@gpc ~]$ |
The $ module unload SOFTWARE_NAME/VERSION command will unload an environment if it is currently loaded.
Inspect an environment
[ks347@gpc ~]$ module show openmpi/gcc/64/1.8.5 ------------------------------------------------------------------- /cm/shared/modulefiles/openmpi/gcc/64/1.8.5:
module-whatis adds OpenMPI to your environment variables prepend-path PATH /cm/shared/apps/openmpi/gcc/64/1.8.5/bin prepend-path MANPATH /cm/shared/apps/openmpi/gcc/64/1.8.5/share/man/ setenv MPI_HOME /cm/shared/apps/openmpi/gcc/64/1.8.5 setenv MPI_RUN /cm/shared/apps/openmpi/gcc/64/1.8.5/bin/mpirun prepend-path LD_RUN_PATH /cm/shared/apps/openmpi/gcc/64/1.8.5/lib64 prepend-path LD_LIBRARY_PATH /cm/shared/apps/openmpi/gcc/64/1.8.5/lib64 prepend-path CPATH /cm/shared/apps/openmpi/gcc/64/1.8.5/include -------------------------------------------------------------------
[ks347@gpc ~]$ |
The $ module show SOFTWARE_NAME command shows a list of all environment variables and path settings that are added when the module is loaded.