New packages: madgraph, syscalc, collier, gosam-contrib (#17601)
* Add Collier and SysCalc recipes * Remove extra syscalc version * Build collier with -j1 for @:1.2.4 * Add recipe for gosam-contrib * Update gosam-contrib recipe with 'provides' * Madgraph recipe, first version * Finalize madgraph recipe + flake8 * Make py2 version of madgraph default; fix hash for syscalc; fix patch * Handle virtual packages (#3) * Update package.py * Update packages.yaml * Remove virtual packages - pt. 1 * Remove virtual packages - pt. 2 * Changes from review - pt. 1 * Changes from code review - pt. 2 * Update var/spack/repos/builtin/packages/collier/package.py Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> * Update var/spack/repos/builtin/packages/madgraph5amc/package.py Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> * Add hash for version 2.7.2 (available in our private mirror) * Fixes for 2.7.3 family * Patches for 2.7.3{.py3,}{.atlas,} * Fix hash of syscalc * Hack to fix concretization (2.7.3 matches 2.7.3.py3) * Add conflict statement (reported to devs) * Apply suggestions from code review Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> * Update package.py * Delete madgraph5amc-2.7.2.atlas.patch * Delete madgraph5amc-2.7.2.patch * Update package.py * Apply suggestions from code review Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> Co-authored-by: iarspider <iarpsider@gmail.com> Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
This commit is contained in:
parent
6ececa6976
commit
6fdbdaf5b6
6 changed files with 1238 additions and 0 deletions
30
var/spack/repos/builtin/packages/collier/package.py
Normal file
30
var/spack/repos/builtin/packages/collier/package.py
Normal file
|
@ -0,0 +1,30 @@
|
|||
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack import *
|
||||
|
||||
|
||||
class Collier(CMakePackage):
|
||||
"""COLLIER: A Complex One-Loop LIbrary with Extended Regularizations """
|
||||
|
||||
homepage = "https://collier.hepforge.org"
|
||||
url = "https://collier.hepforge.org/downloads/?f=collier-1.2.5.tar.gz"
|
||||
|
||||
version('1.2.5', sha256='3ec58a975ff0c3b1ca870bc38973476c923ff78fd3dd5850e296037852b94a8b')
|
||||
version('1.2.4', sha256='92ae8f61461b232fbd47a6d8e832e1a726d504f9390b7edc49a68fceedff8857')
|
||||
version('1.2.3', sha256='e6f72df223654df59113b0067a4bebe9f8c20227bb81371d3193e1557bdf56fb')
|
||||
version('1.2.2', sha256='140029e36635565262719124dcda2fa7d66fd468442cb268f6da16d4cbbab29a')
|
||||
version('1.2.1', sha256='7f5bc81a00de071e2451ba3e11cad726df0ae18bd973dba4aeba165897d48c2d')
|
||||
version('1.2.0', sha256='e5b2def953d7f9f4f2cacd4616aa65c77e2b9adf7eed2ca3531b993e529fbafd')
|
||||
version('1.1', sha256='80fd54e2c30029d3d7d646738ae9469ad3a6f5ea7aa1179b951030df048e36bc')
|
||||
version('1.0', sha256='54f40c1ed07a6829230af400abfe48791e74e56eac2709c0947cec3410a4473d')
|
||||
|
||||
@property
|
||||
def parallel(self):
|
||||
return not self.spec.satisfies('@:1.2.4')
|
||||
|
||||
def cmake_args(self):
|
||||
args = ['-Dstatic=ON']
|
||||
return args
|
20
var/spack/repos/builtin/packages/gosam-contrib/package.py
Normal file
20
var/spack/repos/builtin/packages/gosam-contrib/package.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack import *
|
||||
|
||||
|
||||
class GosamContrib(AutotoolsPackage):
|
||||
"""Additional libraries for GoSam MC generator"""
|
||||
|
||||
homepage = "https://gosam.hepforge.org"
|
||||
url = "https://gosam.hepforge.org/downloads/?f=gosam-contrib-2.0.tar.gz"
|
||||
|
||||
version('2.0', sha256='c05beceea74324eb51c1049773095e2cb0c09c8c909093ee913d8b0da659048d')
|
||||
version('1.0', sha256='a29d4232d9190710246abc2ed97fdcd8790ce83580f56a360f3456b0377c40ec')
|
||||
|
||||
def configure_args(self):
|
||||
args = ["FFLAGS=-std=legacy"]
|
||||
return args
|
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,23 @@
|
|||
--- vendor/CutTools/makefile.orig 2018-06-18 13:24:17.164637074 +0200
|
||||
+++ vendor/CutTools/makefile 2018-06-18 13:24:27.756740547 +0200
|
||||
@@ -9,7 +9,7 @@
|
||||
ifeq ($(wildcard ../make_opts), ../make_opts)
|
||||
include ../make_opts
|
||||
else
|
||||
- FFLAGS =
|
||||
+ FFLAGS = -std=legacy
|
||||
FC=gfortran
|
||||
endif
|
||||
|
||||
--- vendor/IREGI/src/makefile_ML5_lib.orig 2018-07-09 13:33:48.546490615 +0200
|
||||
+++ vendor/IREGI/src/makefile_ML5_lib 2018-07-09 13:33:57.238573607 +0200
|
||||
@@ -5,7 +5,7 @@
|
||||
FFDIR=$(qcdlooppath)/ff
|
||||
onelooppath=$(PWD)/oneloop
|
||||
#FFLAGS=-O -g -ggdb -fno-automatic -fbounds-check -I$(onelooppath) # -fbounds-check is very useful in checking mermory error,-g is for debuging,-ggdb is for debuging special in gdb
|
||||
-FFLAGS=-O -g -fPIC -I$(onelooppath)
|
||||
+FFLAGS=-O -g -fPIC -I$(onelooppath) -std=legacy
|
||||
obj= global.o funlib.o linear_algebra.o kinematics.o matrices.o matrix_base.o cmatrix_base.o mis_warp.o special_fun.o pave_reduce.o cpave_reduce.o si_reduce.o csi_reduce.o ti_reduce.o cti_reduce.o gti_reduce.o binary_tree.o IREGI4ML5_interface.o avh_olo_foriregi.o
|
||||
olomod= avh_olo_foriregi.mod avh_olo_foriregi_dp_box.mod avh_olo_foriregi_dp_olog.mod avh_olo_foriregi_units.mod \
|
||||
avh_olo_foriregi_dp.mod avh_olo_foriregi_dp_boxc.mod avh_olo_foriregi_dp_prec.mod avh_olo_foriregi_version.mod \
|
||||
|
111
var/spack/repos/builtin/packages/madgraph5amc/package.py
Normal file
111
var/spack/repos/builtin/packages/madgraph5amc/package.py
Normal file
|
@ -0,0 +1,111 @@
|
|||
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack import *
|
||||
import os
|
||||
|
||||
|
||||
class Madgraph5amc(Package):
|
||||
"""MadGraph5_aMC@NLO is a framework that aims at providing
|
||||
all the elements necessary for SM and BSM phenomenology,
|
||||
such as the computations of cross sections, the generation
|
||||
of hard events and their matching with event generators,
|
||||
and the use of a variety of tools relevant to
|
||||
event manipulation and analysis. """
|
||||
|
||||
homepage = "https://launchpad.net/mg5amcnlo"
|
||||
url = "https://launchpad.net/mg5amcnlo/2.0/2.7.x/+download/MG5_aMC_v2.7.3.tar.gz"
|
||||
|
||||
version('2.7.3.py3', sha256='400c26f9b15b07baaad9bd62091ceea785c2d3a59618fdc27cad213816bc7225')
|
||||
version('2.7.3.py2', sha256='0b665356f4d9359e6e382e0f408dc11db594734567c6b2f0ec0e0697f2dbe099',
|
||||
url="https://launchpad.net/mg5amcnlo/2.0/2.7.x/+download/MG5_aMC_v2.7.3.tar.gz")
|
||||
|
||||
variant('atlas', default=False, description='Apply changes requested by ' +
|
||||
"the ATLAS experimenent on LHC")
|
||||
variant('ninja', default=False, description='Use external installation' +
|
||||
" of Ninja")
|
||||
variant('collier', default=False, description='Use external installation' +
|
||||
' of Collier')
|
||||
|
||||
depends_on('syscalc')
|
||||
depends_on('gosam-contrib', when='+ninja')
|
||||
depends_on('collier', when='+collier')
|
||||
depends_on('lhapdf')
|
||||
depends_on('fastjet')
|
||||
depends_on('py-six', when='@2.7.3.py3', type=('build', 'run'))
|
||||
|
||||
depends_on('python@:2.7.999', when='@2.7.3.py2', type=('build', 'run'))
|
||||
conflicts('%gcc@10:', when='@2.7.3')
|
||||
|
||||
depends_on('python@3:', when='@2.7.3.py3', type=('build', 'run'))
|
||||
|
||||
patch('madgraph5amc-2.7.3.patch', level=0, when='@2.7.3.py2~atlas')
|
||||
patch('madgraph5amc-2.7.3.atlas.patch', level=0, when='@2.7.3.py2+atlas')
|
||||
patch('madgraph5amc-2.7.3.patch', level=0, when='@2.7.3.py3~atlas')
|
||||
patch('madgraph5amc-2.7.3.atlas.patch', level=0, when='@2.7.3.py3+atlas')
|
||||
|
||||
phases = ['edit', 'build', 'install']
|
||||
|
||||
def edit(self, spec, prefix):
|
||||
def set_parameter(name, value):
|
||||
config_files.filter('^#?[ ]*' + name + '[ ]*=.*$',
|
||||
name + ' = ' + value,
|
||||
ignore_absent=True)
|
||||
|
||||
config_files = FileFilter(join_path("input",
|
||||
".mg5_configuration_default.txt"),
|
||||
join_path("input", "mg5_configuration.txt"))
|
||||
|
||||
set_parameter('syscalc_path', spec['syscalc'].prefix.bin)
|
||||
|
||||
if '+ninja' in spec:
|
||||
set_parameter('ninja', spec['gosam-contrib'].prefix)
|
||||
|
||||
if '+collier' in spec:
|
||||
set_parameter('collier', spec['collier'].prefix)
|
||||
|
||||
set_parameter('output_dependencies', 'internal')
|
||||
set_parameter('lhapdf', join_path(spec['lhapdf'].prefix.bin,
|
||||
'lhapdf-config'))
|
||||
set_parameter('fastjet', join_path(spec['fastjet'].prefix.bin,
|
||||
'fastjet-config'))
|
||||
|
||||
set_parameter('automatic_html_opening', 'False')
|
||||
|
||||
def build(self, spec, prefix):
|
||||
with working_dir(join_path('vendor', 'CutTools')):
|
||||
make(parallel=False)
|
||||
|
||||
with working_dir(join_path('vendor', 'StdHEP')):
|
||||
make(parallel=False)
|
||||
|
||||
if '+atlas' in spec:
|
||||
if os.path.exists(join_path('bin', 'compile.py')):
|
||||
compile_py = Executable(join_path('bin', 'compile.py'))
|
||||
else:
|
||||
compile_py = Executable(join_path('bin', '.compile.py'))
|
||||
|
||||
compile_py()
|
||||
|
||||
def install(self, spec, prefix):
|
||||
def installdir(dirname):
|
||||
install_tree(dirname, join_path(prefix, dirname))
|
||||
|
||||
def installfile(filename):
|
||||
install(filename, join_path(prefix, filename))
|
||||
|
||||
for p in os.listdir(self.stage.source_path):
|
||||
if os.path.isdir(p):
|
||||
installdir(p)
|
||||
else:
|
||||
if p != 'doc.tgz':
|
||||
installfile(p)
|
||||
else:
|
||||
mkdirp(prefix.share)
|
||||
install(p, join_path(prefix.share, p))
|
||||
|
||||
install(join_path('Template', 'LO', 'Source', '.make_opts'),
|
||||
join_path(prefix, 'Template', 'LO',
|
||||
'Source', 'make_opts'))
|
29
var/spack/repos/builtin/packages/syscalc/package.py
Normal file
29
var/spack/repos/builtin/packages/syscalc/package.py
Normal file
|
@ -0,0 +1,29 @@
|
|||
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack import *
|
||||
|
||||
|
||||
class Syscalc(MakefilePackage):
|
||||
""" A tool to derive theoretical systematic uncertainties"""
|
||||
|
||||
homepage = "https://cp3.irmp.ucl.ac.be/projects/madgraph/wiki/SysCalc"
|
||||
url = "http://madgraph.phys.ucl.ac.be/Downloads/SysCalc_V1.1.7.tar.gz"
|
||||
|
||||
version('1.1.7', sha256='d33219a525a54733bdfd02d8314288bdecd977fb1e97ddeaf13bf470bbbdd386')
|
||||
|
||||
depends_on('lhapdf@6:')
|
||||
|
||||
def url_for_version(self, version):
|
||||
url = self.url.rsplit('/', 1)[0]
|
||||
url += '/SysCalc_V{0}.tar.gz'
|
||||
|
||||
url = url.format(version)
|
||||
return url
|
||||
|
||||
def install(self, spec, prefix):
|
||||
mkdirp(prefix.bin)
|
||||
install('sys_calc', prefix.bin)
|
||||
install_tree('include', prefix.include)
|
Loading…
Reference in a new issue