Logging in and running a job

We perform the exercises on the Alex alex.nhr.fau.de cluster

Login to the Alex cluster

Depending on your IP connection you have to options to connect to Alex:

  • With IPv4 you can log in to one of the Alex frontends using proxy jump:

    ssh -J YOUR_USERNAME@cshpc.rrze.fau.de YOUR_USERNAME@alex.nhr.fau.de
    If you do not get asked for a password try:

    ssh -o PreferredAuthentications=password -o PasswordAuthentication=yes -J YOUR_USERNAME@cshpc.rrze.fau.de YOUR_USERNAME@alex.nhr.fau.de

    If you don't know what proxy jump is, you can also just log in to cshpc.rrze.fau.de first and then connect to alex.nhr.fau.de from there.

  • If you use IPv6, you should be able to log in directly from anywhere to alex.nhr.fau.de:

    ssh YOUR_USERNAME@alex.nhr.fau.de
    If you do not get asked for a password try:

    ssh -o PreferredAuthentications=password -o PasswordAuthentication=yes YOUR_USERNAME@alex.nhr.fau.de

You can also use one of our GUI dialog servers and use SSH from there:


Frontends and batch jobs


Alex uses the "SLURM" batch system. In the course we will be using interactive batch jobs. On the frontend you have several editors (vim, nano, emacs) for working on code, on the nodes only vim.


It is a good idea to have at least two shells open on the frontend, one for editing and one for running jobs (see below). You can also use "screen" or "tmux" to run persistent sessions.

Start an interactive batch job:


$ salloc --gres=gpu:a40:2 --time=4:0:0

This requests two A40 GPUs on a compute node for 4 hours.

After the job is started, you will get a shell on one of the compute nodes. Only run benchmarks within a batch job since the frontends will not give you a "quiet" environment.

Compiling and running code


Several compilers are available through the environment modules system and must explicitly loaded to be used. Note, some cannot be loaded at the same time.

  • Load an Intel compiler module:
    $ module load intel
  • Load a recent gcc compiler:
    $ module load gcc
  • Load nvhpc compiler:
    $ module load nvhpc cuda/12.3.0
  • To list all loaded modules:
    $ module list
  • To remove a module:
    $ module remove <name of a loaded module>
  • To remove all loaded modules:
    $ module purge

Fixing the clock frequency


For most benchmarks you want to fix the clock speed of the CPUs as by default "Turbo Mode" is active.

To fix the clock frequency run your binary within the batch job using the srun command as a wrapper:

$ srun --cpu-freq=2000000-2000000:performance ./a.out

This sets the clock speed to 2 GHz, chooses the "performance" governor, and then runs your binary as usual. Note that you must specify a minimum and a maximum value, and these are in kHz (!).
Last modified: Monday, 11 March 2024, 1:55 PM