Skip to content
Snippets Groups Projects
environment-and-modules.md 2.86 KiB
Newer Older
  • Learn to ignore specific revisions
  • Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    Environment and Modules
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    =======================
    
    ### Environment Customization
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    After logging in, you may want to configure the environment. Write your preferred path definitions, aliases, functions and module loads in the .bashrc file
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ```bash
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    # ./bashrc
    
    # Source global definitions
    if [ -f /etc/bashrc ]; then
          . /etc/bashrc
    fi
    
    # User specific aliases and functions
    alias qs='qstat -a'
    module load PrgEnv-gnu
    
    # Display informations to standard output - only in interactive ssh session
    if [ -n "$SSH_TTY" ]
    then
     module list # Display loaded modules
    fi
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ```
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    >Do not run commands outputing to standard output (echo, module list, etc) in .bashrc  for non-interactive SSH sessions. It breaks fundamental functionality (scp, PBS) of your account! Take care for SSH session interactivity for such commands as stated in the previous example.
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    ### Application Modules
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    In order to configure your shell for  running particular application on Anselm we use Module package interface.
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    >The modules set up the application paths, library paths and environment variables for running particular application.
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    >We have also second modules repository. This modules repository is created using tool called EasyBuild. On Salomon cluster, all modules will be build by this tool. If you want to use software from this modules repository, please follow instructions in section [Application Modules Path Expansion](environment-and-modules/#EasyBuild).
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    The modules may be loaded, unloaded and switched, according to momentary needs.
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    To check available modules use
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ```bash
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    $ module avail
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ```
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    To load a module, for example the octave module  use
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ```bash
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    $ module load octave
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ```
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    loading the octave module will set up paths and environment variables of your active shell such that you are ready to run the octave software
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    To check loaded modules use
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ```bash
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    $ module list
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ```
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
     To unload a module, for example the octave module use
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ```bash
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    $ module unload octave
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ```
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    Learn more on modules by reading the module man page
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ```bash
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    $ man module
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ```
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    Following modules set up the development environment
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    PrgEnv-gnu sets up the GNU development environment in conjunction with the bullx MPI library
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    PrgEnv-intel sets up the INTEL development environment in conjunction with the Intel MPI library
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    ### Application Modules Path Expansion
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    All application modules on Salomon cluster (and further) will be build using tool called [EasyBuild](http://hpcugent.github.io/easybuild/ "EasyBuild"). In case that you want to use some applications that are build by EasyBuild already, you have to modify your MODULEPATH environment variable.
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ```bash
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    export MODULEPATH=$MODULEPATH:/apps/easybuild/modules/all/
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ```
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    
    
    Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    This command expands your searched paths to modules. You can also add this command to the .bashrc file to expand paths permanently. After this command, you can use same commands to list/add/remove modules as is described above.