Skip to content

Commit

Permalink
Merge pull request #7378 from cms-sw/madgraph5amcatnlo-drop-compile-p…
Browse files Browse the repository at this point in the history
…atch

madgraph5amcatnlo: backport changes from cc8 branch
  • Loading branch information
smuzaffar authored Oct 11, 2021
2 parents 795c8f3 + b48519e commit 0e7274f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 283 deletions.
266 changes: 0 additions & 266 deletions madgraph5amcatnlo-compile.patch

This file was deleted.

18 changes: 1 addition & 17 deletions madgraph5amcatnlo.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ Provides: perl(Compress::Zlib)
Provides: perl(List::Util)
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
#Python 3.9, use of math.gcd instead of fractions.gcd
Patch2: madgraph5amcatnlo-py39
Patch1: madgraph5amcatnlo-py39

Requires: python3 py3-six
Requires: hepmc
Expand All @@ -24,7 +22,6 @@ Requires: thepeg
%setup -n MG5_aMC_v%{versiontag}_py3
%patch0 -p1
%patch1 -p1
%patch2 -p1

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
Expand All @@ -37,18 +34,6 @@ sed -i -e "s|SHFLAG = \-fPIC|SHFLAG = \-fPIC \-fcommon|g" vendor/StdHEP/src/stdh

%build
export FC="$(which gfortran) -std=legacy"
# Save patched config
cp input/mg5_configuration.txt input/mg5_configuration_patched.txt

# Compile in advance
chmod +x bin/compile.py
./bin/compile.py
# Remove compile script after compilation
rm bin/compile.py

# Add back patched config after compilation since its get overwritten
# Save patched config
mv input/mg5_configuration_patched.txt input/mg5_configuration.txt

# Start small NLO event generation to make sure that all additional packages are compiled
cat <<EOF > basiceventgeneration.txt
Expand All @@ -63,7 +48,6 @@ EOF
find . -type f -name '*.tgz' -delete

%install
sed -i -e "s|@MADGRAPH5AMCATNLO_ROOT@|%{i}|g" input/mg5_configuration.txt
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 \
Expand Down

0 comments on commit 0e7274f

Please sign in to comment.