Skip to content
Snippets Groups Projects
Commit 6562bb12 authored by Louis Moureaux's avatar Louis Moureaux
Browse files

Merge branch 'migration' into 'master'

adapting the installer after the migration

See merge request DasAnalysisSystem/gitlab-profile!12
parents 09a73ef6 256bf04d
No related branches found
No related tags found
1 merge request!12adapting the installer after the migration
Pipeline #6769673 passed
...@@ -18,8 +18,16 @@ cmake: ...@@ -18,8 +18,16 @@ cmake:
stage: build stage: build
tags: tags:
- cvmfs - cvmfs
before_script:
- cd /lib64
- ln -s libssl.so.1.1.1k libssl.so
- ln -s libcrypto.so.1.1.1k libcrypto.so
- cd -
script: script:
- source /cvmfs/cms.cern.ch/cmsset_default.sh - source /cvmfs/cms.cern.ch/cmsset_default.sh
- yum install -y cmake3 python3 zsh - yum install -y cmake3 python3 zsh
- ./install.sh - ./install.sh
- cd CMSSW*/
- shopt -s expand_aliases # allows aliases like cmsenv to be used
- cmsenv
- scram b -j$(nproc)
...@@ -13,31 +13,29 @@ The `Campaigns` subgroup contains actual repos corresponding to different analys ...@@ -13,31 +13,29 @@ The `Campaigns` subgroup contains actual repos corresponding to different analys
## Installation ## Installation
### From scratch ### From scratch with the default installer
In general, it is recommended that you install the software on a fast disk to ensure fast compilation (e.g. AFS), but that you process the heavy n-tuples on a dedicated area (e.g. NFS at DESY, EOS at CERN). In general, it is recommended that you install the software on a fast disk to ensure fast compilation (e.g. AFS), but that you process the heavy n-tuples on a dedicated area (e.g. NFS at DESY, EOS at CERN). Keeping the software neat and clean is important for reproducibility.
First clone the `Installer`. Then source the minimal environment for CMSSW, CRAB, and RUCIO: 1. Clone the `Installer`. Then source the minimal environment for CMSSW, CRAB, and RUCIO:
``` ```
cd DasAnalysisSystem cd DasAnalysisSystem
source ./setup source ./setup
``` ```
It is currently working at CERN (CH), at DESY (DE), at IIHE (BE), and for GitLab CI. Feel free to make a merge request to include your favourite facility. It is currently working at CERN (CH), at DESY (DE), at IIHE (BE), and for GitLab CI. Feel free to make a merge request to include your favourite facility.
2. Run the installation:
Finally, the installation is trivial:
``` ```
make ./install.sh
``` ```
This takes a few minutes, then you're all set. *Remark*: if a CMSSW release has already been sourced, it will use that one instead of installing a new one.
3. Then change to the directory of the CMSSW release (by default, it is created in the local directory) and compile as follows:
#### Remarks ```
cmsenv
1. You may overwrite (at your own risks) the CMSSW release by running `make CMSSW=CMSSW_X_Y_Z` where you tune `X`, `Y`, and `Z` to the values of the release that you want to test. This may be necessary to run over certain data sets; however, we cannot guarantee that the code will compile nor provide the same result as in the default release. scram b -j$(nproc)
2. `git-cms-init` is not run, since it is a priori not useful for the framework to run, takes 100MB of space, and makes the installation slower. If it may happen to be useful, you have to add it in the Makefile. It must be run right after setting up the release, when it is locally still empty. ```
3. To use SSH instead of HTTPS, run `make GITLAB=ssh://git@gitlab.cern.ch:7999`. 4. After a few minutes, you're all set. You may have to rerun `cmsenv` to actually see the commands in the shell.
4. The `PlottingHelper` is not cloned by default as it is only useful for plotting purposes.
### From an existing CMSSW release or from an existing installation. ### By hand, step by step
In the following, we explain the installation of the framework step by step. A few packages external to CMSSW are necessary (e.g. TUnfold), which you will need to tell CMSSW how to find them with `scram setup`. In the following, we explain the installation of the framework step by step. A few packages external to CMSSW are necessary (e.g. TUnfold), which you will need to tell CMSSW how to find them with `scram setup`.
...@@ -58,27 +56,20 @@ mv -f TUnfoldV17Dict_rdict.pcm lib/ ...@@ -58,27 +56,20 @@ mv -f TUnfoldV17Dict_rdict.pcm lib/
``` ```
(cd $CMSSW_BASE && scram setup $OLDPWD/libgit2.xml) (cd $CMSSW_BASE && scram setup $OLDPWD/libgit2.xml)
``` ```
3. Install ProtoDarwin: 3. Install Darwin:
``` ```
git clone $(GITLAB)/paconnor/ProtoDarwin.git git clone https://gitlab.cern.ch/Proto/Darwin.git
cmake3 -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/build/install cmake3 -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/build/install
cmake3 --build build -j`nproc` cmake3 --build build -j`nproc`
cmake3 --build build --target install cmake3 --build build --target install
(cd $CMSSW_BASE && scram setup $OLDPWD/../protodarwin.xml) (cd $CMSSW_BASE && scram setup $OLDPWD/../darwin.xml)
```
4. Clone the `Tables` wherever you like and the `Core` in CMSSW, and compile as usual with `scram b -j`.
#### Remark
If you want to rerun jet clustering (e.g. to have AK8 jets at a low transverse momentum), you need to clone the [JetToolbox](https://github.com/cms-jet/JetToolbox.git):
```
git clone https://github.com/cms-jet/JetToolbox.git $CMSSW_BASE/JMEAnalysis/JetToolbox -b jetToolbox_120X
``` ```
That version needs a minor patch: 4. If you want to rerun jet clustering (e.g. to have AK8 jets at a low transverse momentum), you need to clone the branch `jetToolbox_120X` from the [JetToolbox](https://github.com/cms-jet/JetToolbox.git), and apply a minor patch with the following commands:
``` ```
cd $CMSSW_BASE/src/JMEAnalysis/JetToolbox cd $CMSSW_BASE/src/JMEAnalysis/JetToolbox
patch -p1 $OLDPWD/jetToolbox_120X.patch patch -p1 $OLDPWD/jetToolbox_120X.patch
``` ```
5. Clone the `Tables` wherever you like and the `Core` in CMSSW, and compile as usual with `scram b -j`.
## Setting up the environment ## Setting up the environment
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment