CSC 5001– High Performance Systems

Portail informatique

Software configuration

During this course, you will have to use several pieces of software whose configuration may be complex. We provide you with a working installation of these software.

You are free to install these pieces of software on your machine, but:

  • Please do not do that during the class (instead, focus on the content of the course!)
  • In case of a problem, please contact François Trahay after the class.

Setting your environment to use the needed software

We provide a script that sets up your environment so that you can use the need software easily. At the beginning of each lab, just connect (with ssh) to one of the lab machines, and run the following command:

source /netfs/inf/trahay_f/opt/

This sets up your environment so that you can use:

  • MPICH (version 3.4)
  • Clang (version 12) with a full support for OpenMP
  • EZTrace (version 2.0)
  • Vite
  • CUDA

Initializing SSH

SSH key

First, you need an ssh key. If you don't have one, generate it with:

$ ssh-keygen$ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/home/student/.ssh/id_rsa): Created directory '/home/student/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/student/.ssh/id_rsa Your public key has been saved in /home/student/.ssh/ The key fingerprint is: SHA256:9a0YRBGllulLZFnbb+nRycVZRIxJbItVoq9/fQYIGcM student@9b380233fc88 The key's randomart image is: +---[RSA 3072]----+ | .++oooB=| | .E* +*o+| | @+o+.oo| | Bo..oo.=| | S +...o=+| | . +.oo..| | o o o.| | . =| | .o.| +----[SHA256]-----+

This generates a pair of ssh keys that consist of:

  • /home/student/.ssh/id_rsa: a private key (that you should never share !)
  • /home/student/.ssh/ a public key (that you can share)

Connection from a laptop to the lab machines

The lab machines are only accessible from the TSP network. To connect directly to one of the lab machines, set up a SSH proxy jump. Add the following lines to the file $HOME/.ssh/config (you may need to create this file).

ServerAliveInterval 300 SendEnv LANG LC_* Host * ForwardAgent yes ForwardX11 yes ForwardX11Trusted yes Host tsp User trahay_f Hostname Host 3a401* User trahay_f ProxyJump tsp

Of course, you have to replace trahay_f with your TSP login.

Now, you should be able to connect to any lab machine by running ssh 3a401-08. If the machine asks for your password, you should copy your ssh public key with the following command:

$ ssh-copy-id tsp /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/student/.ssh/" /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys's password: Number of key(s) added: 1 Now try logging into the machine, with: "ssh 'tsp'" and check to make sure that only the key(s) you wanted were added.

Connection between the lab machines

When running an MPI application, MPI will connect (using ssh) to several of the lab machines. You need to run the following command to accept the ssh fingerprint of all the lab machines:

$ for n in 01 02 03 04 05 06 07 08 09 10 11 12 13; do \ ssh-keygen -f "$HOME/.ssh/known_hosts" -R "3a401-$n"; \ ssh-keyscan "3a401-$n" >> "$HOME/.ssh/known_hosts"; \ done

To check if your installation is working, run the following commands:

$ wget $ wget $ mpirun -np 13 -f ./hosts ./mpi_hello [3/13] Hello from 3a401-04 [12/13] Hello from 3a401-13 [10/13] Hello from 3a401-11 [1/13] Hello from 3a401-02 [2/13] Hello from 3a401-03 [9/13] Hello from 3a401-10 [8/13] Hello from 3a401-09 [11/13] Hello from 3a401-12 [0/13] Hello from 3a401-01 [4/13] Hello from 3a401-05 [6/13] Hello from 3a401-07 [5/13] Hello from 3a401-06 [7/13] Hello from 3a401-08