From 5fec96a5a859270961a5dd83a2f83d10429739b7 Mon Sep 17 00:00:00 2001
From: Klaus Rabbertz <klaus.rabbertz@cern.ch>
Date: Fri, 14 Jun 2024 15:05:14 +0200
Subject: [PATCH] Update paths to new installation in /cvmfs/etp.kit.edu

---
 ...ET_modules2_rev6591_bridge-1.0.1_202406.sh | 48 +++++++++++++++++++
 luigi.cfg.template                            |  2 +-
 setup_law_c7_v2.sh                            |  7 ++-
 3 files changed, 52 insertions(+), 5 deletions(-)
 create mode 100644 analysis/bootstrap_NNLOJET_modules2_rev6591_bridge-1.0.1_202406.sh

diff --git a/analysis/bootstrap_NNLOJET_modules2_rev6591_bridge-1.0.1_202406.sh b/analysis/bootstrap_NNLOJET_modules2_rev6591_bridge-1.0.1_202406.sh
new file mode 100644
index 0000000..2778742
--- /dev/null
+++ b/analysis/bootstrap_NNLOJET_modules2_rev6591_bridge-1.0.1_202406.sh
@@ -0,0 +1,48 @@
+#!/usr/bin/env bash
+
+# Bootstrap file for batch jobs that is sent with all jobs and
+# automatically called by the law remote job wrapper script to find the
+# setup.sh file of this example which sets up software and some environment
+# variables. The "{{analysis_path}}" variable is defined in the workflow
+# base tasks in analysis/framework.py.
+
+action() {
+
+    # law + luigi env variables
+    local base="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+    export LAW_HOME="$base/.law"
+    export LAW_CONFIG_FILE="$base/law.cfg"
+    export LUIGI_CONFIG_PATH="$base/luigi.cfg"
+    export ANALYSIS_PATH="$base"
+    export ANALYSIS_DATA_PATH="$ANALYSIS_PATH/data"
+
+    # luigi + law
+    export PATH="$base/law/bin:$base/luigi/bin:$PATH"
+    export PYTHONPATH="$base/law:$base/luigi:$base/six:$base/python-dateutil-2.8.2:$base:$PYTHONPATH"
+
+    # lcg software stack with python3 and gcc11 (use the same one as for cvmfs install of NNLOJET & APPLfast)
+    source /cvmfs/sft.cern.ch/lcg/views/LCG_105/x86_64-centos7-gcc11-opt/setup.sh
+
+    # grid storage interface with gfal2, if required
+    # C7 with python3
+    source /cvmfs/grid.cern.ch/centos7-ui-200122/etc/profile.d/setup-c7-ui-python3-example.sh
+
+    # NNLOJET + APPLfast (cvmfs)
+    applfastpath="/cvmfs/etp.kit.edu/fastnnlo-3034_bridge-1.0.1_202406_lcg105-c7-gcc11"
+    #applfastpath="/eos/theory/project/applfast/local"
+    # LCG not needed here since source'd already above!
+    # NNLOJET & APPLfast
+    source $applfastpath/src/fnlosrc_source.sh
+    # Rivet
+    source $applfastpath/src/rivetenv.sh
+    # If fastNLO version of grid install in /cvmfs/etp.kit.edu not new enough for evaluation,
+    # then use local install for plotting etc, but keep scripts of NNLOJET in PATH
+    #export PATH="$applfastpath/src/NNLOJET_rev6591/driver/bin:$PATH"
+
+    #export PYTHONPATH="$PWD:$PYTHONPATH" ???
+
+    tar -xzf analysis*.tar.gz
+    rm analysis*.tar.gz
+
+}
+action
diff --git a/luigi.cfg.template b/luigi.cfg.template
index c876103..8b23a3d 100644
--- a/luigi.cfg.template
+++ b/luigi.cfg.template
@@ -91,7 +91,7 @@ only_missing = True
 retries = 2
 
 # Bootstrap file to be sourced at beginning of htcondor jobs
-bootstrap_file = bootstrap_NNLOJET_modules2_rev6591_bridge-1.0.0_202309.sh
+bootstrap_file = bootstrap_NNLOJET_modules2_rev6591_bridge-1.0.1_202406.sh
 
 # Local directories, defaults are 'grids', 'plots', 'tags', 'warmups'
 # - unpacking and merging of grids in local directories $merge_dir/$name/[$channel|Combined]
diff --git a/setup_law_c7_v2.sh b/setup_law_c7_v2.sh
index 40a13eb..10268b0 100644
--- a/setup_law_c7_v2.sh
+++ b/setup_law_c7_v2.sh
@@ -36,7 +36,7 @@ action() {
     export PATH="$gitpath/tools:$gitpath/tools/plotting:$PATH"
 
     # NNLOJET + APPLfast (cvmfs)
-    applfastpath="/cvmfs/etp.kit.edu/fastnnlo-3000_bridge-1.0.0_202309_lcg102-c7-gcc11"
+    applfastpath="/cvmfs/etp.kit.edu/fastnnlo-3034_bridge-1.0.1_202406_lcg105-c7-gcc11"
     #applfastpath="/eos/theory/project/applfast/local"
     # LCG not needed here since source'd already above!
     # NNLOJET & APPLfast
@@ -56,10 +56,9 @@ action() {
     # --> Either use your more modern Desktop PC e.g. with Ubuntu and properly set PATH and PYTHONPATH
     # --> or use install with lcg software stack from /cvmfs/sft.cern.ch/lcg/views
     # Here, lcg environment and PATH, PYTHONPATH are set from local installation file
-    #fnlopath="/storage/9/rabbertz/local.lcg102-c8"
+    #fnlopath="/work/rabbertz/local.lcg105-c7"
     #fnlopath="/eos/theory/project/applfast/local.py3"
-    #fnlopath="/work/rabbertz/local.lcg102-c7"
-    #source $fnlopath/src/lcg102_source.sh   # LCG software stack
+    #source $fnlopath/src/lcg105_source.sh   # LCG software stack
     #source $fnlopath/src/fnlosrc_source.sh  # fastNLO
     #source $fnlopath/src/rivetenv.sh        # Rivet
 
-- 
GitLab