Skip to content

Where to run

At Milan, tier3 used by the ATLAS group is called proof. It is similar to lxplus at CERN. For some tasks, it may be more convenient to use your laptop.

Remote machines and SSH

A common way to interact with remote Linux machines is ssh. A ssh-server must run on the remote machine (by default on the machines we are using) and you need a ssh-client on the machine you use to connect (e.g. your laptop.)

How to install a ssh-client

  • Linux distribution: use your package manager to install OpenSSH. The right package should be ssh or ssh-client.

  • Mac: You can install many packages similarly to Linux with brew.

  • Windows: the most famous client is putty. It has a graphical and command line interface.

Tip

If you want to have a similar experience to Linux on Windows 10 try the Windows Subsystem for Linux

If you have OpenSSH (default on Linux) you can connect to a remote machine with:

ssh username@hostname

Try to connect to the hostname proof-10.mi.infn.it, you have to use the username provided by INFN and the relative password which will be asked. Answer yes to the questions (you trust the remote domain). You will get a new shell into a Linux machine. The commands you execute are executed on the remote machine. Proof and lxplus are made by several machines, so each time you will be connected to a different one. Nevertheless, all machines share the same filesystem, so you should not notice any difference.

Familiarize with the shell commands

Here some examples

pwd check the current path
ls list the content of the current directory
hostname the name of the host
uname -a the operating system
cat /proc/cpuinfo cpu information
cat /proc/meminfo memory information
who who is connected
top monitor running processes (q to exit)

You have very limited software installed after the login. For example, you can use emacs or vi to edit text files.

To close the session you can use exit or Ctrl+d

Tip

If the system becomes unresponsive you can use an escape sequence to terminate the ssh session from the client side. By default, it is ~ . Enter (press them one after the other)

Login with a key

The default method to authenticate is with the password, but there are other ways. You can generate a private/public key and copy the public one to the remote server.

This doesn't work on lxplus

Login with Kerberos token

On lxplus you can authenticate with a Kerberos ticket. To get one kinit username@CERN.CH. You have to use your CERN credential.

.ssh/config

You can create host aliases and set domain configuration in the .ssh/config file so that you can connect with ssh proof instead of ssh user@proof-10.mi.infn.it

Authenticity of host and SOMEONE IS DOING SOMETHING NASTY message

This message may appear from time to time, for example when machines are reinstalled and they get a new key. You can run ssh-keygen -R <host>. Of course, there is the remote possibility that someone is doing something nasty...

If you want to copy a file to the remote machine you can use scp from your computer:

scp -R mydirectory username@proof-10.mi.infn.it:

this will copy the local directory mydirectory to proof. Since you haven't specified a path after : it will be copied in your $HOME.

On the contrary

scp username@proof-10.mi.infn.it:myfile.txt .

will copy the remote file myfile.txt into the current directory (.).

Terminal multiplexer

One problem with ssh is that the programs running in a session are usually terminated if the session is ended. For example, you would like to open a ssh session, run a command, close the session and then see the output of the command. To this, you have to tell the system to don't halt the processes when the SSH session is over. There are many ways to do that (e.g. nohup) but using a terminal multiplexer has many other advantages other than detach/attaching sessions.

Try screen

Screen is already installed on lxplus and proof.

You can try. Login into proof, then start screen just executing screen. Now you should be inside the screen session, that doesn't look different from the usual. Start a command, for example:

for i in $( ls /etc ); do
    echo $i
    sleep 1
done

It should start to print slowly the directory in /etc. Now you can detach the session with control+A d (use Control+A ? for help). You can logoff proof and then you can reconnect with ssh. Take into account that you have to reconnect exactly to the same machine (e.g. proof-01.mi.infn.it). You can reattach session with screen -RR. You should see that the program continued to run when you were logged off.

tmux is a younger project that gives you advanced possibilities. You have to install it manually (you can use this script to change the version to the latest one).

Proof and lxplus

Proof (the name comes from this technology that was popular in 2010) is the main local computing resource dedicated to the ATLAS group in Milan provided by INFN. You have to connect to a specific machine, the most powerful is proof-10

ssh username@proof-10.mi.infn.it

lxplus is similar to proof but it is provided by CERN. It is available at lxplus.cern.ch. You have to use your username/password provided by CERN.

The setups are very similar, for example, both provide cvmfs.

Pro Cons
proof
  • It is a local resource, used only by the ATLAS group in Milan
  • Local storage under /storage_tmp
lxplus
  • mount eos storage
  • File system shared with all CERN users
  • Can be quite heavily loaded

Using container (ssh to old machine)

It is possible to connect to a host and to run a container automatically. Presently the operating system installed in proof is centos7, which is old and in some cases it is considered as deprecated (e.g. vscode). You can change your ssh configuration (~/.ssh/config) creating a new hostname, for example

Host el9-proof-10
     RemoteCommand bash -c 'export ATLAS_LOCAL_ROOT_BASE=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase; source ${ATLAS_LOCAL_ROOT_BASE}/user/atlasLocalSetup.sh -c el9 -m /storage_tmp:/storage_tmp -m /cnfs/homes_fs/home/your-username:/cnfs/homes_fs/home/your-username -m /users2:/users2'
     HostName proof-10.mi.infn.it
     User your-username
     RequestTTY yes

You have to modify the above setup with the mounting points you need (e.g. your home, i.e. /cnfs/homes_fs/home/your-username). You can connect to it with ssh el9-proof-10.

Your laptop

Your laptop can be convenient to develop and test the code. If you want to use the software that is available on the removal machine there are three ways:

  • install the software on your machine, for example, you can install ROOT or Python packages in virtualenv using pip. You can also consider the package manager of your system.
  • mount cmvfs (use CVMFS_HTTP_PROXY=DIRECT even if not optimal) and source that software as you do on remote machines
  • user docker on your laptop
Pro Cons
installing locally
  • It is local, once installed you don't need a connection
  • It is tedious, you need to install all the dependencies
  • Not trivial to instal different version of the same software
cvmfs
  • You have the same software it is available on tier3 and on grid
  • Zero installation, you have a lot of software already installed with different versions
  • You need to read remotely, need quite good connection
  • A cache is used, you need a decent hd
  • Can be stale if your connection is not stable
docker
  • If the software is completely contenerized you don't need a connection
  • Zero installation, just run the image
  • The images can be quite heavy (~GB)

Batch system: HT condor

When you connect to proof or lxplus you get an interactive terminal. Batch systems work in different ways. Usually they are a set of machines where you can submit your jobs. The jobs are executed following specific rules, that take into account your priority and the resource availability. Batch systems are used for heavy jobs. Since they provide many cpus they are well suited when the task can be splitted in many jobs that can run in parallel.

Both lxplus and proof implement the HT condor batch system](https://research.cs.wisc.edu/htcondor/). A complete guide is provided by CERN: https://batchdocs.web.cern.ch/. The description of the Milano cluster is here: https://calcolo.mi.infn.it/?page_id=4582.