Installation and Usage - comrademarvin/SA-ALICE-O2 GitHub Wiki
There are a variety of ways in which O2 can be installed/accessed, where the choice will depend on the usage requirements of the user. As already mentioned, a build of O2 Core is always required and needs to be installed/accessed in some manner. Here are some of the installation/access options, where some advantages/drawbacks are identified:
- Local Build
A full local build will always be the most versatile, but is only recommended for Unix machines (Linux or MacOS) that have 16GB or more RAM, as the O2 software is computationally expensive. A detailed guide on using AliBuild for a local installation can be found at Installation via AliBuild.
It is strongly recommend to fork the O2 github repositories (as linked in What is O2?) and then clone from your forked instance. This is also strictly required when doing development, where you will need to make your own branches.
The O2 framework is dependant on many libraries (such as ROOT, Pythia and GEANT) which need to be installed with the compatible versions. In principle, AliBuild should completely take care of this, but yet conflicts can arise during the installation process. Thus, when encountering errors during the installation process it is recommend to start by checking the list and versions of libraries installed on your machine - on MacOS this can be done with brew list
.
- CernVM File System (CVMFS)
The CernVM File System (CVMFS) can be used to access daily precompiled builds of the O2 software. The easiest way to access CVMFS is through your lxplus (via SSH) account - details can be found at Precompiled O2. It is also possible to install CVMFS in a container, but this is not recommended for first time users - details for this can be found at Container Images and CernVM-FS.
This method is especially useful when running simulations, as this only requires the set-up and configuration of bash scripts - for which O2 does not need to be recompiled. When changes need to be made to the source code of O2 and then recompiled, this method will not be suitable.
The is also a method of developing and running O2 Physics analysis tasks with CVMFS, without having to recompile O2 Physics - developed by Martin Vala. The repository and usage instructions can be found at O2 Physics with CVMFS. This is probably the quickest and easiest way to run a physics analysis task, but is not very versatile.
- High Performance Computing Cluster
It is also possible to install O2 software on a HPC cluster environment - such as the UCT HPC or CHPC. Installation on the clusters needs to be done via containers such as Singularity or Docker - more details on using a singularity container for O2 installation can be found at O2 on the HPC (the example is for the UCT HPC specifically, but the usage of singularity should remain the same across HPC platforms). A tutorial on using Singularity on a HPC environment can be found at UL HPC Tutorial: HPC Containers with Singularity.
NB: This method is not recommended for first time users, as there are many unexpected errors that can arise - such as library conflicts or storage issues (O2 builds take up a lot of storage!).
- Virtual Machine
In the case of using a Windows machine, the Windows Subsystem for Linux (WSL) implementation can be used to launch a local Linux virtual machine environment. This is only recommended if your machine has more than 16GB of RAM and has a powerful CPU. The builds will also take up a lot of local storage.
A virtual machine environment can also be accessed on a cloud computing platform. NB: The SA-ALICE group has access to computing resources on the CHPC Sebowa Cloud Service, where some VM instances will be available to students that require a "local" build set-up - in the case where your personal machine is not powerful enough. Contact Stephan ([email protected]) if interested in using these VM resources.