Release Setup

Last update: 11 Mar 2024 [History] [Edit]

For your own work you are by no means required to work on the machines discussed previously (indeed it is recommended to work on your own machine). And even this tutorial can be done on a different machine, but especially for beginners it is simpler to do the tutorial on one of them instead of copying all required files to their own machine.

If you are not working on lxplus: you will need to define these variables:

export ATLAS_LOCAL_ROOT_BASE=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase
alias setupATLAS='source ${ATLAS_LOCAL_ROOT_BASE}/user/atlasLocalSetup.sh'

tip Put these commands in your .bashrc file (or the equivalent for the shell you are using) so they get set on every login.

Let’s set up the ATLAS software environment:

setupATLAS

tip The ATLAS resources on lxplus have recently been migrated to use AlmaLinux 9, which some releases are incompatible with. Whenever this is an issue, you can set up a CentOS 7 container using the command:

setupATLAS -c centos7

If you attempt to set up a release that is compatibly with AlmaLinux 9, you will see a message suggesting that you use a container.

Setting up a container will create a new prompt and you can continue to use your regular workflow and bash commands. Whenever you want to leave the container, you can do so with the exit command.

You will see a list of commands you can type to set up various ATLAS computing tools.

Setting up an ATLAS software release will set up your environment and ensure that specific versions of various tools are used. This is important to avoid issues arising from using tools that have incompatible versions or versions that are not recommended by CP groups. You can use ATLAS releases if you have access to cvmfs (lxplus, local clusters, machines, and the Grid).

There are several types of ATLAS releases that you can use, depending on what you are trying to do. Each one includes a subset of the Athena codebase. The types of releases that are relevant for this tutorial are:

It is also possible to checkout all software in a given release and manually compile them on your working machine. This alternative setup is described in a later section. But for this tutorial we recommend you just use the release from cvmfs on lxplus.

To set up a release of type <ReleaseType> and version <version>, call:

asetup <ReleaseType>,<version>

e.g.,

asetup AnalysisBase,25.2.2

tip You also have the option to check out the latest version of the release instead of a numbered release:

asetup AnalysisBase,main,latest

This is useful if you really need the latest and greatest version of the software. However, it is usually better to stick to a numbered release as it is otherwise difficult to document which version of the software you are using, and thereby for others to reproduce what you have done. In rare cases, it is also possible for the latest release to not work properly. All numbered releases are thoroughly tested and can be counted on to work out of the box.

The asetup command creates a file called .asetup.save in the current directory, which you can use by calling asetup --restore to set up the same release again. If you plan to use multiple releases in the same work area, asetup should be called in different directories within your work area. If you plan to only use one release, it may be better to call asetup in your main work directory in case you need to delete any of the child directories.

tip It is useful to create a script (such as setup.sh) that includes the setupATLAS and asetup --restore commands as well as any other commands you need to call to set up your environment each time you log in with a new shell. This will allow you to easily run the setup without needing to remember every necessary command.

tip Note that .asetup.save is a hidden file due to the filename beginning with ".". To see the file from a shell, use ls -a.

It is also possible to use Docker to set up a release. This can be a very useful tool for local code development.