Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux_environment_modules [2020/06/12 15:45]
pgh5a [Environment Modules]
linux_environment_modules [2022/01/31 19:22] (current)
Line 1: Line 1:
-====== Software Modules ​======+==== Software Modules ====
  
-[[http://​modules.sourceforge.net|Software Modules]] ​are designed ​to manage ​software installed on our Linux systems. ​This allows us to provide a wide range of software across all our servers so that you don't have to install software on your own.  We also offer different versions of software, letting users choose which they want to use.+[[http://​modules.sourceforge.net|Software Modules]] ​make it easy for you to use software installed on our Linux systems. ​We provide a wide range of software across all our servers so that you don't have to install software on your own.  We also offer different versions of software, letting users choose which they want to use. 
  
-===== Using Modules ​=====+\\ 
 + 
 +=== Module Requests ​=== 
 +If a module is needed but not listed, please send an email to cshelpdesk@virginia.edu with the following:​\\ 
 +1. In the subject line, write "​Software Module Request: // software name and the version //"​\\ 
 +2. In the body of the email, please include information about the software being requested (version and any associated links) 
 + 
 +\\ 
 + 
 +=== Using Modules ​===
  
 Type ''​%%module avail%%''​ to get a list of available software. Type ''​%%module avail%%''​ to get a list of available software.
 +
 +//(this list is just an example, more may be available)//​
  
 <​code>​ <​code>​
-[pgh5a@portal04 ~]$ module avail+[abc1de@portal04 ~]$ module avail
 ------------------------------- /​sw/​centos/​Modules/​systemModfiles ------------------------------------------------------------- ------------------------------- /​sw/​centos/​Modules/​systemModfiles -------------------------------------------------------------
 slurm-client ​        ​slurm-client-testing slurm-client ​        ​slurm-client-testing
Line 36: Line 47:
  
 <​code>​ <​code>​
-pgh5a@portal04 ~ $ module load python3 ​             # Load the module for use in your current session +abc1de@portal04 ~ $ module load python3 ​             # Load the module for use in your current session 
-pgh5a@portal04 ~ $ which python+abc1de@portal04 ~ $ which python
 /​sw/​centos/​python/​3.6.2/​bin/​python /​sw/​centos/​python/​3.6.2/​bin/​python
-pgh5a@portal04 ~ $ python ​                          # When you run `python` you get the version that has been loaded+abc1de@portal04 ~ $ python ​                          # When you run `python` you get the version that has been loaded
 Python 3.6.2 (default, Oct  6 2017, 13:​03:​05) ​ Python 3.6.2 (default, Oct  6 2017, 13:​03:​05) ​
 [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux
Line 49: Line 60:
  
 <​code>​ <​code>​
-pgh5a@portal ~ $ module load matlab +abc1de@portal ~ $ module load matlab 
-pgh5a@portal ~ $ module load php +abc1de@portal ~ $ module load php 
-pgh5a@portal ~ $ module list+abc1de@portal ~ $ module list
 Currently Loaded Modulefiles:​ Currently Loaded Modulefiles:​
   1) matlab ​   2) python3 ​  3) php   1) matlab ​   2) python3 ​  3) php
Line 59: Line 70:
  
 <​code>​ <​code>​
-pgh5a@portal ~ $ module display python+abc1de@portal ~ $ module display python
 ------------------------------------------------------------------- -------------------------------------------------------------------
 /​sw/​centos/​Modules/​modulefiles/​python:​ /​sw/​centos/​Modules/​modulefiles/​python:​
Line 69: Line 80:
 prepend-path MANPATH /​sw/​centos/​python/​current/​share/​man ​ prepend-path MANPATH /​sw/​centos/​python/​current/​share/​man ​
 ------------------------------------------------------------------- -------------------------------------------------------------------
-pgh5a@portal ~ $ echo $LD_LIBRARY_PATH ​+abc1de@portal ~ $ echo $LD_LIBRARY_PATH ​
 /​sw/​centos/​python/​3.6.2/​lib /​sw/​centos/​python/​3.6.2/​lib
 </​code>​ </​code>​
Line 76: Line 87:
  
 <​code>​ <​code>​
-pgh5a@portal ~ $ module switch python3 python2 +abc1de@portal ~ $ module switch python3 python2 
-pgh5a@portal ~ $ module unload php +abc1de@portal ~ $ module unload php 
-</​code>​+</​code>​\\
  
-===== Things to keep in mind =====+=== Shell Scripting/​Slurm Batch ===
  
-==== Shell Scripting/​Slurm Batch ====+If you write shell scripts or slurm batch files that make use of these software packages, remember that you must still load modules from inside of your script. ​ For example, your script must contain the line ''​%%module load python3%%''​ before you can use python from inside of your script. ​
  
-If you write shell scripts or slurm batch files that make use of these software packages, remember that you must still load modules from inside of your script. ​ For example, your script must contain the line ''​%%module load python3%%''​ before you can use python from inside of your script.+\\
  
 === Initialize Modules System === === Initialize Modules System ===
Line 92: Line 103:
 <code bash> <code bash>
 source /​etc/​profile.d/​modules.sh source /​etc/​profile.d/​modules.sh
-</​code>​+</​code>​\\ 
 + 
 +=== Virtual Environments === 
 +For most Python related packages (i.e. pip install ...), it is often more applicable to utilize a virtual environment. This can be done with [[ https://​docs.conda.io/​projects/​conda/​en/​latest/​user-guide/​tasks/​manage-environments.html | Anaconda]] 
 +or [[ https://​docs.python.org/​3/​library/​venv.html | venv ]]. The former requires loading an anaconda module, and the latter requires the python3 module. 
  • linux_environment_modules.1591976700.txt.gz
  • Last modified: 2020/06/12 15:45
  • by pgh5a