Skip to content
Snippets Groups Projects
Commit 37da14b9 authored by Patrick Louis S Connor's avatar Patrick Louis S Connor
Browse files

Merge branch 'feature/detailed-install' into 'migration'

Add instructions for manual install

See merge request !42
parents 541cf463 e82caaec
No related branches found
No related tags found
2 merge requests!42Add instructions for manual install,!34Migration
Pipeline #7978819 passed
...@@ -42,43 +42,52 @@ source tools/setup.sh ...@@ -42,43 +42,52 @@ source tools/setup.sh
### Method \#2: By hand, step by step ### Method \#2: By hand, step by step
*Work in progress* The instructions below assume that you have an environment with all the required dependencies or that you know how to install them if CMake complains that they are missing. Recent LCG environments do not require additional setup. They build the software without any special flags, so the compiler will use no optimization and include basic debugging information. You can pass additional settings using the `CMAKE_BUILD_TYPE` variable.
<!--- We will install the packages in order, starting with Darwin then following with Core. First, we create two folders, one that will contain the build artifacts and one that will contain the installed software. For convenience, we store their location in variables:
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`. ```sh
# readlink makes the paths absolute
First source your CMSSW release and close to a directory where you want to install the external packages. BUILD_DIR=$(readlink -f ./build)
1. Install TUnfold: INSTALL_DIR=$(readlink -f ./install)
``` mkdir -p $BUILD_DIR $INSTALL_DIR
wget https://www.desy.de/~sschmitt/TUnfold/TUnfold_V17.9.tgz
mkdir -p TUnfold TUnfold/lib
mv TUnfold_V17.9.tgz TUnfold
cd TUnfold
tar xvzf TUnfold_V17.9.tgz
make lib TUNFOLDVERSION='V17' -j
mv -f libunfold.so lib/libtunfold.so
mv -f TUnfoldV17Dict_rdict.pcm lib/
(cd $CMSSW_BASE && scram setup $OLDPWD/../tunfold.xml)
```
2. Tell CMSSW where to find libgit2:
``` ```
(cd $CMSSW_BASE && scram setup $OLDPWD/libgit2.xml)
``` The first step is then to download, compile, and install Darwin:
3. Install Darwin: ```sh
``` git clone https://gitlab.cern.ch/Proto/Darwin.git # download
git clone https://gitlab.cern.ch/Proto/Darwin.git cmake -B $BUILD_DIR/Darwin -S Darwin -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR # configure
cmake3 -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/build/install cmake --build $BUILD_DIR/Darwin --target install -j$(nproc) # build and install
cmake3 --build build -j`nproc`
cmake3 --build build --target install
(cd $CMSSW_BASE && scram setup $OLDPWD/../darwin.xml)
``` ```
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:
We then do the same for Core:
```sh
git clone https://gitlab.cern.ch/cms-analysis/general/DasAnalysisSystem/Core.git # download
cmake -B $BUILD_DIR/Core -S Core -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR # configure
cmake --build $BUILD_DIR/Core --target install -j$(nproc) # build and install
``` ```
cd $CMSSW_BASE/src/JMEAnalysis/JetToolbox
patch -p1 $OLDPWD/jetToolbox_120X.patch Finally, we clone the respository containing scale factors and other corrections:
```sh
git clone --recursive https://gitlab.cern.ch/cms-analysis/general/DasAnalysisSystem/tables.git
``` ```
5. Clone the `Tables` wherever you like and the `Core` in CMSSW, and compile as usual with `scram b -j`.
--> This gives us an installation of both Darwin and Core in the install folder. You need to set a few environment variables before you can use them:
| Variable | Value |
|:-|:-|
| `PATH` | `$BUILD_DIR/bin:$PATH` |
| `LD_LIBRARY_PATH` | `$BUILD_DIR/lib64:$LD_LIBRARY_PATH` (note: can be different on some systems) |
| `PYTHONPATH` | `$BUILD_DIR/python:$PYTHONPATH` |
| `DARWIN_FIRE_AND_FORGET` | `$BUILD_DIR/lib64` (note: can be different on some systems) |
In addition, we recommend setting variables for the location of the various repositories:
| Variable | Value |
|:-|:-|
| `DAS_BASE` | `$PWD` |
| `DARWIN_BASE` | `$PWD/Darwin` |
| `CORE_BASE` | `$PWD/Core` |
| `DARWIN_TABLES` | `$PWD/tables` |
### With `micromamba` ### With `micromamba`
......
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