Skip to main content

New to Dartmouth?

Resources for:

Information Security

Connect with Computing

Andes Environment

 

Connecting to Andes.Dartmouth.Edu (You need an ssh-client)
 

ssh username@andes.dartmouth.edu

Andes and Polaris environment:
You have a HOME directory with 20 GB of space.  This directory is housed on Dartmouth's AFS cell and can be accessed from anywhere if you have an AFS-client.

 
Introduction

  • Modules provides an easy mechanism for updating a user's environment especially the PATH, MANPATH, and LD_LIBRARY_PATH environment variables to name a few.
  • When you get an account on Andes or Polaris, your dot-files should be set up correctly to use modules.  
  • You can modify your environment so that certain modules are loaded whenever you log in.
  • Use this command to have a module automatically loaded each time you log into the system:
    • module initadd modulename
    • where modulename is the name of the module you want loaded.

Module commands

  • module help
    • Get a usage list of module options
    • The listing has been abbreviated to only show those commands discussed in this page.

$ module help

Available Commands and Usage:

+  add|load       modulefile [modulefile ...]
+  rm|unload     modulefile [modulefile ...]
+  switch          modulefile1 modulefile2
+  display          modulefile [modulefile ...]
+  avail             path [path]
+  list
+  initadd          modulefile [modulefile ...]
+  help             modulefile [modulefile ...]
+  initrm           modulefile [modulefile ...]
+  initswitch      modulefile1 modulefile2

  • module list
    • This lists all the modules which are currently loaded into the users environment.

$ module list

Currently Loaded Modulefiles:

1) modules/3.2.6 6) totalview/8.8
2) matlab/2010a 7) maple/14.0
3) intel-compilers/11.1 8) mathematica/7.0
4) pgi-compilers/10.5 9) opendx/4.4.0
5) mpich/1.2.7p1-intel 10) mkl/10.1

 

  • module avail
    • This option lists all the modules which are available to be loaded.
    • Notice that many of them have version numbers associated with them.
    • Modules makes it easy to switch compiler application versions.
    • The default version is identified in the listing.

$module avail

---------------------- /afs/northstar/common/apps/Modules/3.2.6/modulefiles ---------------------------

dot maple/14(default)) modules/3.2.6 pgi-compilers/6.2
ecce/6.0(default) mathematica/6.0.2 mpich/1.2.7p1-gcc pgi-compilers/8.0-2
gaussian/g03 mathematica/7.0(default) mpich/1.2.7p1-gcc-p4 pgi-compilers/9.0-3
gaussian/g09(default) matlab/2007b mpich/1.2.7p1-intel(default) totalview/8.04
idl/6.4(default) matlab/2008a netcdf/4.0-gfortran4.1.2(default) totalview/8.6
idl/7.0 matlab/2008b null totalview/8.8(default)
intel-compilers/11.0 matlab/2010a(default) opendx/4.4.0(default) visit/2.0(default)
intel-compilers/11.1(default) mkl/10.1(default) paraview/3.2.1  
intel-compilers/9.1 module-cvs paraview/3.8(default)  
maple/11.0 module-info pgi-compilers/10.5(default)  

 

  •   module help modulefile* 
    • To retrieve more information about a module, use this command to display the help information contained within the given module file.

$ module help netcdf

----------- Module Specific Help for 'netcdf/4.0-gfortran4.1.2' ---------------

Sets up the environment to use the netCDf libraries
Sets up the netCDF libraries, include files, binaries and man pages.
Add $NETCDF_LIB to include the netcdf library when linking your program.
Example: ifort -o myprog myproc.f $NETCDF_LIB
Add $NETCDF_INCLUDE to include the netcdf include files when compiling.
Example: ifort $NETCDF_INCLUDE -c myproc.f

  • module display modulefile 
    • Use this command to see exactly what a given modulefile will do to your environment, such as what will be added to the PATH, MANPATH, and other environment variables.

$ module display matlab
-------------------------------------------------------------------
/afs/northstar/common/apps/Modules/3.2.6/modulefiles/matlab/r2010a:

module-whatis    loads Matlab  version R2010a
prepend-path     PATH /afs/northstar/common/apps/matlab/Matlab-R2010a/bin
-------------------------------------------------------------------

  • module load modulefile 
    •   This adds one or more modulefiles to the user's current environment. 
    •  It does so silently, unless there is a problem with a modulefile. 
    •  If you load the generic name of a module, you will get the default version. 
    •  To load a specific version, load the module using its full specification.

                + module load matlab/r2007b

  • module unload modulefile
    • This removes any listed modules from the user's current environment.
    • The modules can be removed in any order.

                + module unload matlab/r2007b

  • module switch  old_modulefile  new_modulefile
    • This command demonstrates the true advantages of modules.
    • Different versions of entire software packages can be replaced with a single module command.
  • module initadd modulefile
    • This command modifies your environment so the module is loaded automatically whenever you log in 
  • module initrm modulefile
    • This command modifies your environment so the module will not be loaded automatically when you log into the system.
  •  module initswitch modulefile1 modulefile2
    • This command modifies your environment so the modulefile2  will be loaded automatically instead of modulefile1.

Last Updated: 3/4/11