environment-and-modules.md 2.26 KB
Newer Older
Lukáš Krupčík's avatar
Lukáš Krupčík committed
1 2 3 4 5 6 7 8 9
# Environment and Modules

## Environment Customization

After logging in, you may want to configure the environment. Write your preferred path definitions, aliases, functions and module loads in the .bashrc file

```console
# ./bashrc

10 11
# users compilation path
export MODULEPATH=${MODULEPATH}:/home/$USER/.local/easybuild/modules/all
Lukáš Krupčík's avatar
Lukáš Krupčík committed
12 13 14

# User specific aliases and functions
alias qs='qstat -a'
15 16 17

# load default intel compilator !!! is not recommended !!!
ml intel
Lukáš Krupčík's avatar
Lukáš Krupčík committed
18 19 20 21

# Display information to standard output - only in interactive ssh session
if [ -n "$SSH_TTY" ]
then
22
 ml # Display loaded modules
Lukáš Krupčík's avatar
Lukáš Krupčík committed
23 24 25 26
fi
```

!!! note
Lukáš Krupčík's avatar
Lukáš Krupčík committed
27
    Do not run commands outputting 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
28 29 30

### Application Modules

31
In order to configure your shell for running particular application on clusters we use Module package interface.
Lukáš Krupčík's avatar
Lukáš Krupčík committed
32

David Hrbáč's avatar
David Hrbáč committed
33 34
Application modules on clusters are built using [EasyBuild][1]. The modules are divided into the following structure:

Lukáš Krupčík's avatar
Lukáš Krupčík committed
35
```
Lukáš Krupčík's avatar
Lukáš Krupčík committed
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
 base: Default module class
 bio: Bioinformatics, biology and biomedical
 cae: Computer Aided Engineering (incl. CFD)
 chem: Chemistry, Computational Chemistry and Quantum Chemistry
 compiler: Compilers
 data: Data management & processing tools
 debugger: Debuggers
 devel: Development tools
 geo: Earth Sciences
 ide: Integrated Development Environments (e.g. editors)
 lang: Languages and programming aids
 lib: General purpose libraries
 math: High-level mathematical software
 mpi: MPI stacks
 numlib: Numerical Libraries
 perf: Performance tools
 phys: Physics and physical systems simulations
 system: System utilities (e.g. highly depending on system OS and hardware)
 toolchain: EasyBuild toolchains
 tools: General purpose tools
 vis: Visualization, plotting, documentation and typesetting
57 58
 OS: singularity image
 python: python packages
Lukáš Krupčík's avatar
Lukáš Krupčík committed
59 60 61 62 63
```

!!! note
    The modules set up the application paths, library paths and environment variables for running particular application.

David Hrbáč's avatar
David Hrbáč committed
64 65
The modules may be loaded, unloaded and switched, according to momentary needs. For details see [lmod][2].

David Hrbáč's avatar
David Hrbáč committed
66
[1]: software/tools/easybuild.md
David Hrbáč's avatar
David Hrbáč committed
67
[2]: software/modules/lmod.md