Go to the U of M home page
School of Physics & Astronomy
School of Physics and Astronomy Wiki

User Tools


computing:department:unix:software:modules

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
computing:department:unix:software:modules [2015/09/09 19:12] allancomputing:department:unix:software:modules [2015/09/09 19:25] (current) allan
Line 77: Line 77:
  
 The command to unload a package is ''module unload <package name>''. This command will also remove any prerequisites for the package being removed. The command to unload a package is ''module unload <package name>''. This command will also remove any prerequisites for the package being removed.
 +
 +===== Adding modules to your login scripts =====
 +
 +The previous changes will allow you to manage your environment in the current shell environment, but will not affect other shells, or new shells.  Thus running something like mpirun may not capture these settings, since the new shells spawned by mpirun may not get the same environment as the original shell.
 +
 +To manage your default environment through modules, begin by adding to the end of your ~/.bashrc or ~/.cshrc startup script the line
 +  module load null
 +  
 +The "null" module actually does nothing in and of itself; it merely provides a placeholder for the following commands to operate on.
 +
 +Next, to add a module to your default environment, use the command
 +  module initadd [module name]
 +
 +This will alter the "module load" line in your startup script to load this module at each shell invocation. In this way you can manage your default environment through the modules package without editing your startup scripts.
 +
 +To disable a default module, use "initrm"
 +  module initrm [module name]
 +
 +This removes that module from the module line in your startup script.
computing/department/unix/software/modules.1441843924.txt.gz · Last modified: 2015/09/09 19:12 by allan