Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CC8] Sync madgraph 2.7.3 #6758

Merged
merged 2 commits into from
Mar 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
105 changes: 61 additions & 44 deletions madgraph5amcatnlo-config.patch
Original file line number Diff line number Diff line change
@@ -1,144 +1,161 @@
diff --git a/input/.mg5_configuration_default.txt b/input/.mg5_configuration_default.txt
index c089808..11ae192 100644
--- a/input/.mg5_configuration_default.txt
+++ b/input/.mg5_configuration_default.txt
@@ -30,12 +30,14 @@
diff --git a/mg5_configuration.txt b/mg5_configuration.txt
index c5429ae..a749941 100644
--- a/input/mg5_configuration.txt
+++ b/input/mg5_configuration.txt
@@ -28,7 +28,7 @@
#! Prefered Fortran Compiler
#! If None: try to find g77 or gfortran on the system
#!
# fortran_compiler = None
# f2py_compiler = None
-# fortran_compiler = None
+fortran_compiler = gfortran
# f2py_compiler_py2 = None
# f2py_compiler_py3 = None

@@ -36,7 +36,7 @@
#! Prefered C++ Compiler
#! If None: try to find g++ or clang on the system
#!
# cpp_compiler = None
-# cpp_compiler = None
+cpp_compiler = g++

#! Prefered Text Editor
#! Default: use the shell default Editor
@@ -54,12 +56,14 @@
@@ -54,20 +54,20 @@

#! Time allowed to answer question (if no answer takes default value)
#! 0: No time limit
# timeout = 60
-# timeout = 60
+timeout = 0

#! Pythia8 path.
#! Defines the path to the pythia8 installation directory (i.e. the
#! on containing the lib, bin and include directories) .
#! If using a relative path, that starts from the mg5 directory
# pythia8_path = ./HEPTools/pythia8
-# pythia8_path = ./HEPTools/pythia8
+pythia8_path = ${PYTHIA8_ROOT}

#! MG5aMC_PY8_interface path
#! Defines the path of the C++ driver file that is used by MG5_aMC to
@@ -67,6 +71,7 @@
#! steer the Pythia8 shower.
#! Can be installed directly from within MG5_aMC with the following command:
#! MG5_aMC> install mg5amc_py8_interface
# mg5amc_py8_interface_path = ./HEPTools/MG5aMC_PY8_interface
-# mg5amc_py8_interface_path = ./HEPTools/MG5aMC_PY8_interface
+mg5amc_py8_interface_path = @MADGRAPH5AMCATNLO_ROOT@/HEPTools/MG5aMC_PY8_interface

#! Herwig++/Herwig7 paths
#! specify here the paths also to HepMC ant ThePEG
@@ -78,11 +83,15 @@
@@ -77,13 +77,13 @@
#! then please set thepeg_path and hepmc_path to the same value as
#! hwpp_path
# hwpp_path =
# thepeg_path =
# hepmc_path =
-# thepeg_path =
-# hepmc_path =
+thepeg_path = ${THEPEG_ROOT}
+hepmc_path = ${HEPMC_ROOT}
+

#! Control when MG5 checks if he is up-to-date.
#! Enter the number of day between two check (0 means never)
#! A question is always asked before any update
# auto_update = 7
-# auto_update = 7
+auto_update = 0

################################################################################
# INFO FOR MADEVENT / aMC@NLO
@@ -94,13 +103,15 @@
@@ -94,21 +94,20 @@

#! Allow/Forbid the automatic opening of the web browser (on the status page)
#! when launching MadEvent [True/False]
# automatic_html_opening = True
-# automatic_html_opening = True
+automatic_html_opening = False
#! allow notification of finished job in the notification center (Mac Only)
# notification_center = True
-# notification_center = True
-
+notification_center = False

#! Default Running mode
#! 0: single machine/ 1: cluster / 2: multicore
# run_mode = 2
-# run_mode = 2
+run_mode = 1

#! Cluster Type [pbs|sge|condor|lsf|ge|slurm|htcaas|htcaas2] Use for cluster run only
#! And cluster queue (or partition for slurm)
@@ -108,6 +119,9 @@
# cluster_type = condor
# cluster_queue = madgraph
# cluster_size = 150
#! And size of the cluster (some part of the code can adapt splitting accordingly)
-# cluster_type = condor
-# cluster_queue = madgraph
-# cluster_size = 150
+cluster_type = lsf
+cluster_queue = 1nh
+cluster_size = 150

#! Path to a node directory to avoid direct writing on the central disk
#! Note that condor clusters avoid direct writing by default (therefore this
@@ -133,6 +147,7 @@
@@ -133,7 +132,7 @@

#! Nb_core to use (None = all) This is use only for multicore run
#! This correspond also to the number core used for code compilation for cluster mode
# nb_core = None
-# nb_core = None
+nb_core = 4

#! Pythia-PGS Package
#! relative path start from main directory
@@ -162,10 +177,12 @@
#! lhapdf-config
@@ -162,12 +161,12 @@

#! lhapdf-config --can be specify differently depending of your python version
#! If None: try to find one available on the system
# lhapdf = lhapdf-config
+lhapdf = ${LHAPDF_ROOT}/bin/lhapdf-config
-# lhapdf_py2 = lhapdf-config
-# lhapdf_py3 = lhapdf-config
+lhapdf_py2 = ${LHAPDF_ROOT}/bin/lhapdf-config
+lhapdf_py3 = ${LHAPDF_ROOT}/bin/lhapdf-config

#! fastjet-config
#! If None: try to find one available on the system
# fastjet = fastjet-config
-# fastjet = fastjet-config
+fastjet = ${FASTJET_ROOT}/bin/fastjet-config

#! MCatNLO-utilities
#! relative path starting from main directory
@@ -179,6 +196,7 @@
@@ -180,14 +179,14 @@
#! if auto: try to find it automatically on the system (default)
#! if '' or None: disabling pjfry
#! if pjfry=/PATH/TO/pjfry/lib: use that specific installation path for PJFry++
# pjfry = auto
+pjfry = None
-# pjfry = auto
+pjfry = None #

#! Set the Golem95 directory containing golem's library
#! It only supports version higher than 1.3.0
@@ -186,6 +204,7 @@
#! if auto: try to find it automatically on the system (default)
#! if '' or None: disabling Golem95
#! if golem=/PATH/TO/golem/lib: use that speficif installation path for Golem95
# golem = auto
+golem = ${GOSAMCONTRIB_ROOT}/lib
-# golem = auto
+golem = ${GOSAMCONTRIB_ROOT}/lib #

#! Set the samurai directory containing samurai's library
#! It only supports version higher than 2.0.0
@@ -198,18 +217,21 @@
@@ -199,19 +198,19 @@
#! Set the Ninja directory containing ninja's library
#! if '' or None: disabling ninja
#! if ninja=/PATH/TO/ninja/lib: use that specific installation path for ninja
# ninja = ./HEPTools/lib
-# ninja = ./HEPTools/lib
+ninja = @MADGRAPH5AMCATNLO_ROOT@/HEPTools/lib

#! Set the COLLIER directory containing COLLIER's library
#! if '' or None: disabling COLLIER
#! if ninja=/PATH/TO/ninja/lib: use that specific installation path for COLLIER
# Note that it is necessary that you have generated a static library for COLLIER
# collier = ./HEPTools/lib
-# collier = ./HEPTools/lib
+collier = @MADGRAPH5AMCATNLO_ROOT@/HEPTools/lib

#! Set how MadLoop dependencies (such as CutTools) should be handled
#! > external : ML5 places a link to the MG5_aMC-wide libraries
#! > internal : ML5 copies all dependencies in the output so that it is independent
#! > environment_paths : ML5 searches for the dependencies in your environment path
# output_dependencies = external
-# output_dependencies = external
+output_dependencies = internal

#! SysCalc PATH
#! Path to the directory containing syscalc executables
@@ -222,4 +221,3 @@
# applgrid = applgrid-config
# amcfast = amcfast-config

-
36 changes: 18 additions & 18 deletions madgraph5amcatnlo.spec
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
### RPM external madgraph5amcatnlo 2.6.7
%define versiontag 2_6_7
%define commit 307
### RPM external madgraph5amcatnlo 2.7.3
%define versiontag 2_7_3
Provides: perl(Compress::Zlib)
Provides: perl(List::Util)
Source: http://cmsrep.cern.ch/cmssw/download/%{n}-%{realversion}.tgz
#Source: https://launchpad.net/mg5amcnlo/2.0/2.5.x/+download/MG5_aMC_v%{realversion}.tar.gz
#Source: https://launchpad.net/mg5amcnlo/2.0/2.6.x/+download/MG5_aMC_v%{realversion}.tar.gz
Source: https://launchpad.net/mg5amcnlo/2.0/2.7.x/+download/MG5_aMC_v%{realversion}.py3.tar.gz
Patch0: madgraph5amcatnlo-config
# Compile and install internal and external packages
#Patch1: madgraph5amcatnlo-compile
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mrodozov , what is this patch and why it is not needed for cc8?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

followed your example on how to build it on cc8 from here:
5b24f9e
the patch is a script that is used to compile madgraph

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need this patch for cc7? I thought the newer madgraph version did not need it that is why I had dropped it. So now if cc7 also has the newer version then do we need this patch?

Copy link
Contributor Author

@mrodozov mrodozov Mar 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll check if it works without it and remove it if it runs

Copy link
Contributor Author

@mrodozov mrodozov Mar 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's segfaulting. looks like this script is creating something that is needed for slc7. in short we need this patch. the log says

determining subprocesses for p p j j 
building matrix elements.
0%   10   20   30   40   50   60   70   80   90   100%
|----|----|----|----|----|----|----|----|----|----|
*/Herwig/Vertices/HGGVertex has inconsistent number of external particles and coupling order = 3 for a perturbative interaction. Either it's an effective vertex or something is wrong.
**************************************************
created 176 subprocesses.
---------------------------------------------------
preparing Born matrix elements.
Initializing external amplitudes.

>>> Compiling MadGraph amplitudes. This may take some time -- please be patient.
>>> In case of problems see ./Herwig-cache/Build/MadGraphAmplitudes/MG.log for details.

*** MadGraph build failed, check logfile for details ***Error: Failed to initialize amplitude 'MadGraph'
determining subprocesses for p p j j 
building matrix elements.
0%   10   20   30   40   50   60   70   80   90   100%
|----|----|----|----|----|----|----|----|----|----|
*/Herwig/Vertices/HGGVertex has inconsistent number of external particles and coupling order = 3 for a perturbative interaction. Either it's an effective vertex or something is wrong.
**************************************************
created 176 subprocesses.
---------------------------------------------------
preparing Born matrix elements.
Initializing external amplitudes.

>>> Compiling MadGraph amplitudes. This may take some time -- please be patient.
>>> In case of problems see ./Herwig-cache/Build/MadGraphAmplitudes/MG.log for details.

*** MadGraph build failed, check logfile for details ***Error: Failed to initialize amplitude 'MadGraph'
Error: The object '/Herwig/EventHandlers/Luminosity' was not created as another object with that name already exists.
Error: The object '/Herwig/Analysis/HepMC' was not created as another object with that name already exists.
determining subprocesses for p p j j 
building matrix elements.
0%   10   20   30   40   50   60   70   80   90   100%
|----|----|----|----|----|----|----|----|----|----|
*/Herwig/Vertices/HGGVertex has inconsistent number of external particles and coupling order = 3 for a perturbative interaction. Either it's an effective vertex or something is wrong.
**************************************************
created 176 subprocesses.
---------------------------------------------------
determining subprocesses for p p j j 
building matrix elements.
0%   10   20   30   40   50   60   70   80   90   100%
|----|----|----|----|----|----|----|----|----|----|
***************************************************
Error: MatchboxFactory: Matrix element ME[d,d->d,d] already existing.
Herwig: EventGenerator not available.
Check if 'InterfaceMatchboxTest.run' is a valid run file.


Requires: python
Requires: python3 py2-six
Requires: hepmc
# Needed for ExRoot analysis package
Requires: root
Expand All @@ -18,18 +17,19 @@ Requires: gosamcontrib
Requires: fastjet
Requires: pythia8
Requires: thepeg

%prep
%setup -n %{n}-%{realversion}
%setup -n MG5_aMC_v%{versiontag}_py3
%patch0 -p1
#%patch1 -p1

sed -i -e "s|\${HEPMC_ROOT}|${HEPMC_ROOT}|g" input/.mg5_configuration_default.txt
sed -i -e "s|\${PYTHIA8_ROOT}|${PYTHIA8_ROOT}|g" input/.mg5_configuration_default.txt
sed -i -e "s|\${LHAPDF_ROOT}|${LHAPDF_ROOT}|g" input/.mg5_configuration_default.txt
sed -i -e "s|\${FASTJET_ROOT}|${FASTJET_ROOT}|g" input/.mg5_configuration_default.txt
sed -i -e "s|\${GOSAMCONTRIB_ROOT}|${GOSAMCONTRIB_ROOT}|g" input/.mg5_configuration_default.txt
sed -i -e "s|\${THEPEG_ROOT}|${THEPEG_ROOT}|g" input/.mg5_configuration_default.txt
sed -i -e "s|@MADGRAPH5AMCATNLO_ROOT@|%{i}|g" input/.mg5_configuration_default.txt
sed -i -e "s|\${HEPMC_ROOT}|${HEPMC_ROOT}|g" input/mg5_configuration.txt
sed -i -e "s|\${PYTHIA8_ROOT}|${PYTHIA8_ROOT}|g" input/mg5_configuration.txt
sed -i -e "s|\${LHAPDF_ROOT}|${LHAPDF_ROOT}|g" input/mg5_configuration.txt
sed -i -e "s|\${FASTJET_ROOT}|${FASTJET_ROOT}|g" input/mg5_configuration.txt
sed -i -e "s|\${GOSAMCONTRIB_ROOT}|${GOSAMCONTRIB_ROOT}|g" input/mg5_configuration.txt
sed -i -e "s|\${THEPEG_ROOT}|${THEPEG_ROOT}|g" input/mg5_configuration.txt
sed -i -e "s|@MADGRAPH5AMCATNLO_ROOT@|%{i}|g" input/mg5_configuration.txt
sed -i -e "s|SHFLAG = \-fPIC|SHFLAG = \-fPIC \-fcommon|g" vendor/StdHEP/src/stdhep_arch

%build
Expand All @@ -48,11 +48,11 @@ EOF
find . -type f -name '*.tgz' -delete

%install
rsync -avh %{_builddir}/%{n}-%{realversion}/ %{i}/
rsync -avh %{_builddir}/MG5_aMC_v%{versiontag}_py3/ %{i}/
sed -ideleteme 's|#!.*/bin/python|#!/usr/bin/env python|' \
%{i}/Template/LO/bin/internal/addmasses_optional.py \
%{i}/madgraph/various/progressbar.py
find %{i} -name '*deleteme' -delete

%post
%{relocateConfig}input/.mg5_configuration_default.txt
%{relocateConfig}input/mg5_configuration.txt