Skip to content
Snippets Groups Projects

Prace

Merged Lukáš Krupčík requested to merge prace into master
5 files
+ 202
361
Compare changes
  • Side-by-side
  • Inline
Files
5
# 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
$ cat ./bashrc
# ./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 information to standard output - only in interactive ssh session
if [ -n "$SSH_TTY" ]
then
module list # Display loaded modules
fi
```
!!! note
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! Consider utilization of SSH session interactivity for such commands as stated in the previous example.
## Application Modules
In order to configure your shell for running particular application on Anselm we use Module package interface.
!!! note
The modules set up the application paths, library paths and environment variables for running particular application.
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/#application-modules-path-expansion).
The modules may be loaded, unloaded and switched, according to momentary needs.
To check available modules use
```console
$ ml av
```
To load a module, for example the octave module use
```console
$ ml octave
```
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
To check loaded modules use
```console
$ ml
```
To unload a module, for example the octave module use
```console
$ ml -octave
```
Following modules set up the development environment
PrgEnv-gnu sets up the GNU development environment in conjunction with the bullx MPI library
PrgEnv-intel sets up the INTEL development environment in conjunction with the Intel MPI library
## Application Modules Path Expansion
All application modules on Anselm cluster (and further) will be build using tool called [EasyBuild](http://hpcugent.github.io/easybuild/ "EasyBuild").
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.
Loading