Skip to content
Snippets Groups Projects
Commit 37fc252a authored by Sylvester Joosten's avatar Sylvester Joosten
Browse files

Merge branch 'dd4hep_v1.16.1' into 'master'

Upgrade to dd4hep 1.16.1

See merge request !34
parents 0387f5a0 f160cf8c
Branches
Tags
1 merge request!34Upgrade to dd4hep 1.16.1
Showing
with 27 additions and 702 deletions
2.7.0 2.9.0
# Builder with Argonne EIC software # Builder with Argonne EIC software
# #
FROM eicweb.phy.anl.gov:4567/containers/image_recipes/debian_spack:snapshot-20210111 FROM eicweb.phy.anl.gov:4567/containers/image_recipes/debian_spack:snapshot-20210408
LABEL maintainer="Sylvester Joosten <sjoosten@anl.gov>" \ LABEL maintainer="Sylvester Joosten <sjoosten@anl.gov>" \
name="eic_builder" \ name="eic_builder" \
...@@ -11,7 +11,7 @@ LABEL maintainer="Sylvester Joosten <sjoosten@anl.gov>" \ ...@@ -11,7 +11,7 @@ LABEL maintainer="Sylvester Joosten <sjoosten@anl.gov>" \
ENV DOCKERFILE_BASE=debian \ ENV DOCKERFILE_BASE=debian \
DOCKERFILE_DISTRO=debian \ DOCKERFILE_DISTRO=debian \
DOCKERFILE_DISTRO_VERSION=20210111-testing \ DOCKERFILE_DISTRO_VERSION=20210408-testing \
SPACK_ROOT=/opt/spack \ SPACK_ROOT=/opt/spack \
DEBIAN_FRONTEND=noninteractive \ DEBIAN_FRONTEND=noninteractive \
CURRENTLY_BUILDING_DOCKER_IMAGE=1 \ CURRENTLY_BUILDING_DOCKER_IMAGE=1 \
......
spack: spack:
specs: specs:
- madx@5.06.1 - madx@5.06.1
- cmake@3.18.1 - cmake@3.20.0
- fmt@7.1.2 cxxstd=17 - fmt@7.1.2 cxxstd=17
- spdlog@1.5.0 - spdlog@1.8.1
- nlohmann-json@3.9.1 - nlohmann-json@3.9.1
- heppdt@3.04.01 - heppdt@3.04.01
- clhep@2.4.1.3 cxxstd=17 - clhep@2.4.4.0 cxxstd=17
- eigen@3.3.8 - eigen@3.3.9
- python@3.7.8 - python@3.7.8
- py-pip - py-pip
- py-numpy - py-numpy
- py-pyyaml - py-pyyaml
- xrootd@4.12.3 cxxstd=17 +python - xrootd@5.1.0 cxxstd=17 +python
- root@6.22.06 cxxstd=17 - root@6.22.08 cxxstd=17
+fftw +fortran +gdml +http +mlp +pythia8 +fftw +fortran +gdml +http +mlp +pythia8
+root7 +tmva +vc +xrootd +ssl ^mesa+opengl +root7 +tmva +vc +xrootd +ssl ^mesa+opengl
-llvm -osmesa -llvm -osmesa
...@@ -22,8 +22,8 @@ spack: ...@@ -22,8 +22,8 @@ spack:
- stow@2.3.1 - stow@2.3.1
- cairo+fc+ft+X+pdf+gobject - cairo+fc+ft+X+pdf+gobject
- podio@0.13 - podio@0.13
- geant4@10.6.2 cxxstd=17 +opengl +vecgeom +x11 +qt ^qt +opengl - geant4@10.7.1 cxxstd=17 +opengl +vecgeom +x11 +qt ^qt +opengl
- dd4hep@1.14.1 +geant4 +assimp +hepmc3 +ipo - dd4hep@1.16.1 +geant4 +assimp +hepmc3 +ipo
- acts@5.00.0 +dd4hep +digitization +identification +json +tgeo +ipo - acts@5.00.0 +dd4hep +digitization +identification +json +tgeo +ipo
- gaudi@34.0 - gaudi@34.0
- dawn@3_91a - dawn@3_91a
......
...@@ -12,7 +12,7 @@ RUN find -L /usr/local/* -type f -exec readlink -f '{}' \; | \ ...@@ -12,7 +12,7 @@ RUN find -L /usr/local/* -type f -exec readlink -f '{}' \; | \
grep 'x-executable\|x-archive\|x-sharedlib' | \ grep 'x-executable\|x-archive\|x-sharedlib' | \
awk -F: '{print $1}' | xargs strip -s awk -F: '{print $1}' | xargs strip -s
FROM eicweb.phy.anl.gov:4567/containers/image_recipes/debian_minimal:testing-20210111 FROM eicweb.phy.anl.gov:4567/containers/image_recipes/debian_minimal:testing-20210408
LABEL maintainer="Sylvester Joosten <sjoosten@anl.gov>" \ LABEL maintainer="Sylvester Joosten <sjoosten@anl.gov>" \
name="eic" \ name="eic" \
group="eic" \ group="eic" \
...@@ -23,7 +23,7 @@ LABEL maintainer="Sylvester Joosten <sjoosten@anl.gov>" \ ...@@ -23,7 +23,7 @@ LABEL maintainer="Sylvester Joosten <sjoosten@anl.gov>" \
## @ENV@ will be automatically expanded to auto-load the ## @ENV@ will be automatically expanded to auto-load the
## runtime environment ## runtime environment
ENV DOCKERFILE_DISTRO=debian \ ENV DOCKERFILE_DISTRO=debian \
DOCKERFILE_DISTRO_VERSION=20210111-testing \ DOCKERFILE_DISTRO_VERSION=20210408-testing \
DEBIAN_FRONTEND=noninteractive \ DEBIAN_FRONTEND=noninteractive \
@ENV@ @ENV@
......
...@@ -16,11 +16,10 @@ Then use spack as you normally would. ...@@ -16,11 +16,10 @@ Then use spack as you normally would.
- `dawn`: A tool to visualize detector geometries. - `dawn`: A tool to visualize detector geometries.
- `dawncut`: A tool to edit detector visualizations. - `dawncut`: A tool to edit detector visualizations.
* Package overrides * Package overrides
* `acts`: Added version 3.00.0 which is still missing in the main repo. * `dd4hep`: REMOVED Disabled use of the Ninja backend for cmake as it was running into dependency issues building assymp
* `dd4hep`: Disabled use of the Ninja backend for cmake as it was running into dependency issues building assymp
* `fmt`: Modified compiler flags to build shared library version. * `fmt`: Modified compiler flags to build shared library version.
* `geant4`: Added explicit glu dependency for OpenGL * `madx`: Add madx package
* `graphviz`: Set upper version limit to stop applying implicit.patch to the newest version * `mesa`: fix issue in meson step
* `qt`: Added gcc10.patch to fix issues compiling QT with gcc10 * `qt`: Added gcc10.patch to fix issues compiling QT with gcc10
* `root`: Re-enabled http module as this builds fine on modern Linux systems and we use this heavily. * `root`: Re-enabled http module as this builds fine on modern Linux systems and we use this heavily.
......
Same as develop version at 2021-1-17, except that I added acts version 4.1
# Copyright 2013-2021 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 Acts(CMakePackage, CudaPackage):
"""
A Common Tracking Software (Acts)
This project contains an experiment-independent set of track reconstruction
tools. The main philosophy is to provide high-level track reconstruction
modules that can be used for any tracking detector. The description of the
tracking detector's geometry is optimized for efficient navigation and
quick extrapolation of tracks. Converters for several common geometry
description languages exist. Having a highly performant, yet largely
customizable implementation of track reconstruction algorithms was a
primary objective for the design of this toolset. Additionally, the
applicability to real-life HEP experiments plays major role in the
development process. Apart from algorithmic code, this project also
provides an event data model for the description of track parameters and
measurements.
Key features of this project include: tracking geometry description which
can be constructed from TGeo, DD4Hep, or GDML input, simple and efficient
event data model, performant and highly flexible algorithms for track
propagation and fitting, basic seed finding algorithms.
"""
homepage = "http://acts.web.cern.ch/ACTS/"
git = "https://github.com/acts-project/acts.git"
maintainers = ['HadrienG2']
tags = ['hep']
# Supported Acts versions
version('master', branch='master')
version('5.00.0', commit='df77b91a7d37b8db6ed028a4d737014b5ad86bb7')
version('4.01.0', commit='c383bf434ef69939b47e840e0eac0ba632e6af9f')
version('4.00.0', commit='ed64b4b88d366b63adc4a8d1afe5bc97aa5751eb')
version('3.00.0', commit='e20260fccb469f4253519d3f0ddb3191b7046db3')
version('2.00.0', commit='8708eae2b2ccdf57ab7b451cfbba413daa1fc43c')
version('1.02.1', commit='f6ebeb9a28297ba8c54fd08b700057dd4ff2a311')
version('1.02.0', commit='e69b95acc9a264e63aded7d1714632066e090542')
version('1.01.0', commit='836fddd02c3eff33825833ff97d6abda5b5c20a0')
version('1.00.0', commit='ec9ce0bcdc837f568d42a12ddf3fc9c80db62f5d')
version('0.32.0', commit='a4cedab7e727e1327f2835db29d147cc86b21054')
version('0.31.0', commit='cfbd901555579a2f32f4efe2b76a7048442b42c3')
version('0.30.0', commit='a71ef0a9c742731611645214079884585a92b15e')
version('0.29.0', commit='33aa3e701728112e8908223c4a7fd521907c8ea4')
version('0.28.0', commit='55626b7401eeb93fc562e79bcf385f0ad0ac48bf')
version('0.27.1', commit='8ba3010a532137bc0ab6cf83a38b483cef646a01')
version('0.27.0', commit='f7b1a1c27d5a95d08bb67236ad0e117fcd1c679f')
version('0.26.0', commit='cf542b108b31fcc349fc18fb0466f889e4e42aa6')
version('0.25.2', commit='76bf1f3e4be51d4d27126b473a2caa8d8a72b320')
version('0.25.1', commit='6e8a1ea6d2c7385a78e3e190efb2a8a0c1fa957f')
version('0.25.0', commit='0aca171951a214299e8ff573682b1c5ecec63d42')
version('0.24.0', commit='ef4699c8500bfea59a5fe88bed67fde2f00f0adf')
version('0.23.0', commit='dc443dd7e663bc4d7fb3c1e3f1f75aaf57ffd4e4')
version('0.22.1', commit='ca1b8b1645db6b552f44c48d2ff34c8c29618f3a')
version('0.22.0', commit='2c8228f5843685fc0ae69a8b95dd8fc001139efb')
version('0.21.0', commit='10b719e68ddaca15b28ac25b3daddce8c0d3368d')
version('0.20.0', commit='1d37a849a9c318e8ca4fa541ef8433c1f004637b')
version('0.19.0', commit='408335636486c421c6222a64372250ef12544df6')
version('0.18.0', commit='d58a68cf75b52a5e0f563bc237f09250aa9da80c')
version('0.17.0', commit='0789f654ff484b013fd27e5023cf342785ea8d97')
version('0.16.0', commit='b3d965fe0b8ae335909d79114ef261c6b996773a')
version('0.15.0', commit='267c28f69c561e64369661a6235b03b5a610d6da')
version('0.14.0', commit='38d678fcb205b77d60326eae913fbb1b054acea1')
version('0.13.0', commit='b33f7270ddbbb33050b7ec60b4fa255dc2bfdc88')
version('0.12.1', commit='a8b3d36e7c6cb86487637589e0eff7bbe626054a')
version('0.12.0', commit='f9cda77299606d78c889fb1db2576c1971a271c4')
version('0.11.1', commit='c21196cd6c3ecc6da0f14d0a9ef227a274be584b')
version('0.11.0', commit='22bcea1f19adb0021ca61b843b95cfd2462dd31d')
version('0.10.5', commit='b6f7234ca8f18ee11e57709d019c14bf41cf9b19')
version('0.10.4', commit='42cbc359c209f5cf386e620b5a497192c024655e')
version('0.10.3', commit='a3bb86b79a65b3d2ceb962b60411fd0df4cf274c')
version('0.10.2', commit='64cbf28c862d8b0f95232b00c0e8c38949d5015d')
version('0.10.1', commit='0692dcf7824efbc504fb16f7aa00a50df395adbc')
version('0.10.0', commit='30ef843cb00427f9959b7de4d1b9843413a13f02')
version('0.09.5', commit='12b11fe8b0d428ccb8e92dda7dc809198f828672')
version('0.09.4', commit='e5dd9fbe179201e70347d1a3b9fa1899c226798f')
version('0.09.3', commit='a8f31303ee8720ed2946bfe2d59e81d0f70e307e')
version('0.09.2', commit='4e1f7fa73ffe07457080d787e206bf6466fe1680')
version('0.09.1', commit='69c451035516cb683b8f7bc0bab1a25893e9113d')
version('0.09.0', commit='004888b0a412f5bbaeef2ffaaeaf2aa182511494')
version('0.08.2', commit='c5d7568714e69e7344582b93b8d24e45d6b81bf9')
version('0.08.1', commit='289bdcc320f0b3ff1d792e29e462ec2d3ea15df6')
version('0.08.0', commit='99eedb38f305e3a1cd99d9b4473241b7cd641fa9')
# Variants that affect the core Acts library
variant('benchmarks', default=False, description='Build the performance benchmarks')
variant('examples', default=False, description='Build the examples')
variant('integration_tests', default=False, description='Build the integration tests')
variant('unit_tests', default=False, description='Build the unit tests')
# Variants that enable / disable Acts plugins
variant('autodiff', default=False, description='Build the auto-differentiation plugin')
variant('dd4hep', default=False, description='Build the DD4hep plugin')
variant('digitization', default=False, description='Build the geometric digitization plugin')
variant('fatras', default=False, description='Build the FAst TRAcking Simulation package')
variant('identification', default=False, description='Build the Identification plugin')
variant('json', default=False, description='Build the Json plugin')
variant('legacy', default=False, description='Build the Legacy package')
# FIXME: Cannot build ONNX plugin as Spack doesn't have an ONNX runtime
# FIXME: Cannot build SyCL plugin yet as Spack doesn't have SyCL support
variant('tgeo', default=False, description='Build the TGeo plugin')
# Variants that only affect Acts examples for now
variant('geant4', default=False, description='Build the Geant4-based examples')
variant('hepmc3', default=False, description='Build the HepMC3-based examples')
variant('pythia8', default=False, description='Build the Pythia8-based examples')
# Build dependencies
# FIXME: Use spack's autodiff package once there is one
depends_on('boost @1.62:1.69.99 +program_options +test', when='@:0.10.3')
depends_on('boost @1.69: +filesystem +program_options +test', when='@0.10.4:')
depends_on('cmake @3.11:', type='build')
depends_on('dd4hep @1.10:', when='+dd4hep')
depends_on('dd4hep @1.10: +geant4', when='+dd4hep +geant4')
depends_on('eigen @3.2.9:', type='build')
depends_on('geant4', when='+geant4')
depends_on('hepmc3@3.1:', when='+hepmc3')
depends_on('heppdt', when='+hepmc3')
depends_on('intel-tbb', when='+examples')
depends_on('nlohmann-json @3.2.0:', when='@0.14: +json')
depends_on('pythia8', when='+pythia8')
depends_on('root @6.10: cxxstd=14', when='+tgeo @:0.8.0')
depends_on('root @6.10: cxxstd=17', when='+tgeo @0.8.1:')
# Some variant combinations do not make sense
conflicts('+autodiff', when='@:1.01')
conflicts('+benchmarks', when='@:0.15')
conflicts('+dd4hep', when='-tgeo')
conflicts('+examples', when='@:0.22')
conflicts('+examples', when='-digitization')
conflicts('+examples', when='-fatras')
conflicts('+examples', when='-identification')
conflicts('+examples', when='-json')
conflicts('+examples', when='-tgeo')
conflicts('+fatras', when='@:0.15')
conflicts('+geant4', when='@:0.22')
conflicts('+geant4', when='-examples')
conflicts('+hepmc3', when='@:0.22')
conflicts('+hepmc3', when='-examples')
conflicts('+pythia8', when='@:0.22')
conflicts('+pythia8', when='-examples')
conflicts('+tgeo', when='-identification')
conflicts('%gcc@:7', when='@0.23:')
def cmake_args(self):
spec = self.spec
def cmake_variant(cmake_label, spack_variant):
enabled = spec.satisfies('+' + spack_variant)
return "-DACTS_BUILD_{0}={1}".format(cmake_label, enabled)
def example_cmake_variant(cmake_label, spack_variant):
enabled = spec.satisfies('+examples +' + spack_variant)
return "-DACTS_BUILD_EXAMPLES_{0}={1}".format(cmake_label, enabled)
def plugin_label(plugin_name):
if spec.satisfies('@0.33:'):
return "PLUGIN_" + plugin_name
else:
return plugin_name + "_PLUGIN"
def plugin_cmake_variant(plugin_name, spack_variant):
return cmake_variant(plugin_label(plugin_name), spack_variant)
integration_tests_label = "INTEGRATIONTESTS"
unit_tests_label = "UNITTESTS"
legacy_plugin_label = "LEGACY_PLUGIN"
if spec.satisfies('@:0.15'):
integration_tests_label = "INTEGRATION_TESTS"
unit_tests_label = "TESTS"
if spec.satisfies('@:0.32'):
legacy_plugin_label = "LEGACY"
args = [
plugin_cmake_variant("AUTODIFF", "autodiff"),
cmake_variant("BENCHMARKS", "benchmarks"),
plugin_cmake_variant("CUDA", "cuda"),
plugin_cmake_variant("DD4HEP", "dd4hep"),
plugin_cmake_variant("DIGITIZATION", "digitization"),
cmake_variant("EXAMPLES", "examples"),
example_cmake_variant("DD4HEP", "dd4hep"),
example_cmake_variant("GEANT4", "geant4"),
example_cmake_variant("HEPMC3", "hepmc3"),
example_cmake_variant("PYTHIA8", "pythia8"),
cmake_variant("FATRAS", "fatras"),
plugin_cmake_variant("IDENTIFICATION", "identification"),
cmake_variant(integration_tests_label, "integration_tests"),
plugin_cmake_variant("JSON", "json"),
cmake_variant(unit_tests_label, "unit_tests"),
cmake_variant(legacy_plugin_label, "legacy"),
plugin_cmake_variant("TGEO", "tgeo")
]
cuda_arch = spec.variants['cuda_arch'].value
if cuda_arch != 'none':
args.append('-DCUDA_FLAGS=-arch=sm_{0}'.format(cuda_arch[0]))
if 'root' in spec:
cxxstd = spec['root'].variants['cxxstd'].value
args.append("-DCMAKE_CXX_STANDARD={0}".format(cxxstd))
# FIXME: Once we can use spack's autodiff package, set
# ACTS_USE_SYSTEM_AUTODIFF too.
if spec.satisfies('@0.33: +json'):
args.append("-DACTS_USE_SYSTEM_NLOHMANN_JSON=ON")
elif spec.satisfies('@0.14.0: +json'):
args.append("-DACTS_USE_BUNDLED_NLOHMANN_JSON=OFF")
return args
...@@ -30,8 +30,11 @@ class Dawn(MakefilePackage): ...@@ -30,8 +30,11 @@ class Dawn(MakefilePackage):
installed on your system. installed on your system.
""" """
# Note: Dawn homepage not available anymore...
homepage = "https://geant4.kek.jp/~tanaka" homepage = "https://geant4.kek.jp/~tanaka"
url = "http://geant4.kek.jp/~tanaka/src/dawn_3_91a.tgz" #url = "http://geant4.kek.jp/~tanaka/src/dawn_3_91a.tgz"
url = "http://10.10.241.24/software/dawn_3_91a.tgz"
maintainers = ['sly2j'] maintainers = ['sly2j']
version('3_91a', sha256='81d855ead1117681b188242dd0be3a24e005d9bd4063fd2bda9a7a794ebcf5f4') version('3_91a', sha256='81d855ead1117681b188242dd0be3a24e005d9bd4063fd2bda9a7a794ebcf5f4')
......
...@@ -13,8 +13,9 @@ class Dawncut(MakefilePackage): ...@@ -13,8 +13,9 @@ class Dawncut(MakefilePackage):
visualized with Fukui Renderer DAWN. visualized with Fukui Renderer DAWN.
""" """
# dawn webpage not available anymore
homepage = "https://geant4.kek.jp/~tanaka" homepage = "https://geant4.kek.jp/~tanaka"
url = "http://10.10.241.20/software/dawncut_1_54a.tar.gz" url = "http://10.10.241.24/software/dawncut_1_54a.tar.gz"
maintainers = ['sly2j'] maintainers = ['sly2j']
version('1_54a', version('1_54a',
......
# 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 Dd4hep(CMakePackage):
"""DD4hep is a software framework for providing a complete solution for
full detector description (geometry, materials, visualization, readout,
alignment, calibration, etc.) for the full experiment life cycle
(detector concept development, detector optimization, construction,
operation). It offers a consistent description through a single source
of detector information for simulation, reconstruction, analysis, etc.
It distributed under the LGPLv3 License."""
homepage = "https://dd4hep.web.cern.ch/dd4hep/"
url = "https://github.com/AIDASoft/DD4hep/archive/v01-12-01.tar.gz"
git = "https://github.com/AIDASoft/DD4hep.git"
maintainers = ['vvolkl', 'drbenmorgan']
version('master', branch='master')
version('1.14.1', sha256='5b5742f1e23c2b36d3174cca95f810ce909c0eb66f3d6d7acb0ba657819e6717')
version('1.14.0', sha256='b603aa3c0db8dda392253aa71fa4a0f0c3c9715d47df0b895d45c1e8849f4895')
version('1.13.1', sha256='83fa70cd74ce93b2f52f098388dff58d179f05ace5b50aea3f408bb8abf7cb73')
version('1.13.0', sha256='0b1f9d902ebe21a9178c1e41204c066b29f68c8836fd1d03a9ce979811ddb295')
version('1.12.1', sha256='85e8c775ec03c499ce10911e228342e757c81ce9ef2a9195cb253b85175a2e93')
version('1.12.0', sha256='133a1fb8ce0466d2482f3ebb03e60b3bebb9b2d3e33d14ba15c8fbb91706b398')
version('1.11.2', sha256='96a53dd26cb8df11c6dae54669fbc9cc3c90dd47c67e07b24be9a1341c95abc4')
version('1.11.1', sha256='d7902dd7f6744bbda92f6e303ad5a3410eec4a0d2195cdc86f6c1167e72893f0')
version('1.11.0', sha256='25643296f15f9d11ad4ad550b7c3b92e8974fc56f1ee8e4455501010789ae7b6')
version('1.10.0', sha256='1d6b5d1c368dc8bcedd9c61b7c7e1a44bad427f8bd34932516aff47c88a31d95')
# Workarounds for various TBB issues in DD4hep v1.11
# See https://github.com/AIDASoft/DD4hep/pull/613 .
patch('tbb-workarounds.patch', when='@1.11.0')
patch('tbb2.patch', when='@1.12.1')
variant('xercesc', default=False, description="Enable 'Detector Builders' based on XercesC")
variant('geant4', default=False, description="Enable the simulation part based on Geant4")
variant('assimp', default=False, description="Enable CAD interface based on Assimp")
variant('hepmc3', default=False, description="Enable build with hepmc3")
variant('lcio', default=False, description="Enable build with lcio")
variant('debug', default=False, description="Enable debug build")
depends_on('cmake @3.12:', type='build')
depends_on('boost @1.49:')
depends_on('root @6.08: +gdml +math +opengl +python +x')
extends('python')
depends_on('xerces-c', when='+xercesc')
depends_on('geant4@10.2.2:', when='+geant4')
depends_on('assimp', when='+assimp')
depends_on('hepmc3', when="+hepmc3")
depends_on('lcio', when="+lcio")
def cmake_args(self):
spec = self.spec
cxxstd = spec['root'].variants['cxxstd'].value
# root can be built with cxxstd=11, but dd4hep requires 14
if cxxstd == "11":
cxxstd = "14"
args = [
"-DCMAKE_CXX_STANDARD={0}".format(cxxstd),
"-DDD4HEP_USE_XERCESC={0}".format(spec.satisfies('+xercesc')),
"-DDD4HEP_USE_GEANT4={0}".format(spec.satisfies('+geant4')),
"-DDD4HEP_USE_LCIO={0}".format(spec.satisfies('+lcio')),
"-DDD4HEP_LOAD_ASSIMP={0}".format(spec.satisfies('+assimp')),
"-DDD4HEP_USE_HEPMC3={0}".format(spec.satisfies('+hepmc3')),
"-DDD4HEP_BUILD_DEBUG={0}".format(spec.satisfies('+debug')),
"-DBUILD_TESTING={0}".format(self.run_tests),
"-DBOOST_ROOT={0}".format(spec['boost'].prefix),
"-DBoost_NO_BOOST_CMAKE=ON",
"-DPYTHON_EXECUTABLE={0}".format(spec['python'].command.path),
]
return args
def setup_run_environment(self, env):
# used p.ex. in ddsim to find DDDetectors dir
env.set("DD4hepINSTALL", self.prefix)
env.set("DD4hep_DIR", self.prefix)
env.set("DD4hep_ROOT", self.prefix)
def url_for_version(self, version):
# dd4hep releases are dashes and padded with a leading zero
# the patch version is omitted when 0
# so for example v01-12-01, v01-12 ...
major = (str(version[0]).zfill(2))
minor = (str(version[1]).zfill(2))
patch = (str(version[2]).zfill(2))
if version[2] == 0:
url = "https://github.com/AIDASoft/DD4hep/archive/v%s-%s.tar.gz" % (major, minor)
else:
url = "https://github.com/AIDASoft/DD4hep/archive/v%s-%s-%s.tar.gz" % (major, minor, patch)
return url
diff --git a/DDDigi/CMakeLists.txt b/DDDigi/CMakeLists.txt
index e6fb1096..88eb5c92 100644
--- a/DDDigi/CMakeLists.txt
+++ b/DDDigi/CMakeLists.txt
@@ -34,12 +34,10 @@ target_include_directories(DDDigi
FIND_PACKAGE(TBB QUIET)
if(TBB_FOUND)
- dd4hep_print( "|++> TBB_INCLUDE_DIR --> ${TBB_INCLUDE_DIR}")
- dd4hep_print( "|++> TBB_LIBRARY --> ${TBB_LIBRARY}")
+ dd4hep_print( "|++> TBB_IMPORTED_TARGETS --> ${TBB_IMPORTED_TARGETS}")
dd4hep_print( "|++> TBB found. DDDigi will run multi threaded.")
target_compile_definitions(DDDigi PUBLIC DD4HEP_USE_TBB)
- target_link_libraries(DDDigi ${TBB_LIBRARY})
- target_include_directories(DDDigi ${TBB_INCLUDE_DIRS})
+ target_link_libraries(DDDigi PUBLIC ${TBB_IMPORTED_TARGETS})
else()
dd4hep_print( "|++> TBB not found. DDDigi will only work single threaded.")
endif()
diff --git a/DDDigi/src/DigiKernel.cpp b/DDDigi/src/DigiKernel.cpp
index d62c6694..f2c2e86c 100644
--- a/DDDigi/src/DigiKernel.cpp
+++ b/DDDigi/src/DigiKernel.cpp
@@ -91,7 +91,7 @@ public:
DigiEventAction* action = 0;
Wrapper(DigiContext& c, DigiEventAction* a)
: context(c), action(a) {}
- Wrapper(Wrapper&& copy) = delete;
+ Wrapper(Wrapper&& copy) = default;
Wrapper(const Wrapper& copy) = default;
Wrapper& operator=(Wrapper&& copy) = delete;
Wrapper& operator=(const Wrapper& copy) = delete;
@@ -111,7 +111,7 @@ class DigiKernel::Processor {
DigiKernel& kernel;
public:
Processor(DigiKernel& k) : kernel(k) {}
- Processor(Processor&& l) = delete;
+ Processor(Processor&& l) = default;
Processor(const Processor& l) = default;
void operator()() const {
int todo = 1;
diff --git a/DDDigi/src/DigiKernel.cpp b/DDDigi/src/DigiKernel.cpp
index f2c2e86c..f168ef9b 100644
--- a/DDDigi/src/DigiKernel.cpp
+++ b/DDDigi/src/DigiKernel.cpp
@@ -273,7 +273,7 @@ void DigiKernel::submit(const DigiAction::Actors<DigiEventAction>& actions, Digi
if ( parallel ) {
tbb::task_group que;
for ( auto* i : actions )
- que.run(Wrapper(context, *i));
+ que.run(Wrapper(context, i));
que.wait();
goto print_stamp;
}
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details. # Spack Project Developers. See the top-level COPYRIGHT file for details.
# #
# SPDX-License-Identifier: (Apache-2.0 OR MIT) # SPDX-License-Identifier: (Apache-2.0 OR MIT)
...@@ -11,9 +11,10 @@ class Fmt(CMakePackage): ...@@ -11,9 +11,10 @@ class Fmt(CMakePackage):
It can be used as a safe alternative to printf or as a fast alternative It can be used as a safe alternative to printf or as a fast alternative
to C++ IOStreams.""" to C++ IOStreams."""
homepage = "http://fmtlib.net/latest/index.html" homepage = "https://fmt.dev/"
url = "https://github.com/fmtlib/fmt/releases/download/7.1.2/fmt-7.1.2.zip" url = "https://github.com/fmtlib/fmt/releases/download/7.1.3/fmt-7.1.3.zip"
version('7.1.3', sha256='5d98c504d0205f912e22449ecdea776b78ce0bb096927334f80781e720084c9f')
version('7.1.2', sha256='4d6968ab7c01e95cc76df136755703defb985105a117b83057e4fd5d53680ea7') version('7.1.2', sha256='4d6968ab7c01e95cc76df136755703defb985105a117b83057e4fd5d53680ea7')
version('7.1.0', sha256='308af4e36ee3ab527b51014a2a5d862682c84f5d16f7a597aea34c84853cbcb0') version('7.1.0', sha256='308af4e36ee3ab527b51014a2a5d862682c84f5d16f7a597aea34c84853cbcb0')
version('6.1.2', sha256='63650f3c39a96371f5810c4e41d6f9b0bb10305064e6faf201cbafe297ea30e8') version('6.1.2', sha256='63650f3c39a96371f5810c4e41d6f9b0bb10305064e6faf201cbafe297ea30e8')
...@@ -73,6 +74,7 @@ class Fmt(CMakePackage): ...@@ -73,6 +74,7 @@ class Fmt(CMakePackage):
# compiler supports the selected standard. # compiler supports the selected standard.
args.append('-DCMAKE_CXX_STANDARD_REQUIRED=ON') args.append('-DCMAKE_CXX_STANDARD_REQUIRED=ON')
# S. Joosten --> hard build shared library version
args.append('-DBUILD_SHARED_LIBS=TRUE') args.append('-DBUILD_SHARED_LIBS=TRUE')
# When cxxstd is 98, must disable FMT_USE_CPP11 # When cxxstd is 98, must disable FMT_USE_CPP11
......
diff --git a/cmake/Modules/FindCLHEP.cmake b/cmake/Modules/FindCLHEP.cmake
index 8b59f1c0a..f616d678e 100644
--- a/cmake/Modules/FindCLHEP.cmake
+++ b/cmake/Modules/FindCLHEP.cmake
@@ -180,7 +180,10 @@ if(UNIX)
execute_process(COMMAND ${CLHEP_CONFIG_EXECUTABLE} --prefix
OUTPUT_VARIABLE _clhep_config_prefix
OUTPUT_STRIP_TRAILING_WHITESPACE)
-
+ if (_clhep_config_prefix)
+ # Remove wrapping double quotes.
+ string(REGEX REPLACE "\"(.*)\"" "\\1" _clhep_config_prefix "${_clhep_config_prefix}")
+ endif()
list(APPEND _clhep_root_hints ${_clhep_config_prefix})
endif()
elseif(WIN32 AND NOT UNIX)
diff --git a/cmake/Templates/Geant4Config.cmake.in b/cmake/Templates/Geant4Config.cmake.in
index d6fe408b3..f355be2af 100644
--- a/cmake/Templates/Geant4Config.cmake.in
+++ b/cmake/Templates/Geant4Config.cmake.in
@@ -268,13 +268,7 @@ set(Geant4_builtin_clhep_FOUND @GEANT4_USE_BUILTIN_CLHEP@)
if(NOT Geant4_builtin_clhep_FOUND)
set(Geant4_system_clhep_ISGRANULAR @GEANT4_USE_SYSTEM_CLHEP_GRANULAR@)
- set(CLHEP_ROOT_DIR "@CLHEP_ROOT_DIR@")
- set(__GEANT4_OLD_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
- set(CMAKE_MODULE_PATH "${_geant4_thisdir}/Modules" ${CMAKE_MODULE_PATH})
find_package(CLHEP @CLHEP_VERSION@ REQUIRED @__g4_clhep_components@)
- set(CMAKE_MODULE_PATH ${__GEANT4_OLD_CMAKE_MODULE_PATH})
- unset(CLHEP_ROOT_DIR)
- unset(__GEANT4_OLD_CMAKE_MODULE_PATH)
#CLHEP doesn't use target properties fully yet, so always include_directories
include_directories(${CLHEP_INCLUDE_DIRS})
endif()
diff -Naur geant4.10.03.p03/cmake/Modules/Geant4LibraryBuildOptions.cmake geant4.10.03.p03/cmake/Modules/Geant4LibraryBuildOptions.cmake
--- geant4.10.03.p03/cmake/Modules/Geant4LibraryBuildOptions.cmake 2017-10-20 06:30:46.000000000 -0500
+++ geant4.10.03.p03/cmake/Modules/Geant4LibraryBuildOptions.cmake 2018-04-16 16:48:02.194321171 -0500
@@ -76,7 +76,7 @@
# Mark as advanced because most users will not need it
enum_option(GEANT4_BUILD_CXXSTD
DOC "C++ Standard to compile against"
- VALUES 11 14 c++11 c++14
+ VALUES 11 14 17 c++11 c++14 c++17
CASE_INSENSITIVE
)
@@ -106,6 +106,9 @@
# Add Definition to flags for temporary back compatibility
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DG4USE_STD11")
+if(GEANT4_BUILD_CXXSTD GREATER 14)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES=1")
+endif()
# Hold any appropriate compile flag(s) in variable for later export to
# config files. Needed to support late CMake 2.8 where compile features
diff -Naur geant4/cmake/Modules/G4BuildSettings.cmake geant4/cmake/Modules/G4BuildSettings.cmake
--- geant4/cmake/Modules/G4BuildSettings.cmake 2017-10-20 06:30:46.000000000 -0500
+++ geant4/cmake/Modules/G4BuildSettings.cmake 2018-04-16 16:48:02.194321171 -0500
@@ -76,7 +76,7 @@
# Mark as advanced because most users will not need it
enum_option(GEANT4_BUILD_CXXSTD
DOC "C++ Standard to compile against"
- VALUES 11 14 c++11 c++14
+ VALUES 11 14 17 c++11 c++14 c++17
CASE_INSENSITIVE
)
@@ -106,6 +106,9 @@
# Add Definition to flags for temporary back compatibility
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DG4USE_STD11")
+if(GEANT4_BUILD_CXXSTD GREATER 14)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES=1")
+endif()
# Hold any appropriate compile flag(s) in variable for later export to
# config files. Needed to support late CMake 2.8 where compile features
diff --git a/cmake/Modules/G4BuildSettings.cmake b/cmake/Modules/G4BuildSettings.cmake
index f68cb0a44..6bf4b6948 100644
--- a/cmake/Modules/G4BuildSettings.cmake
+++ b/cmake/Modules/G4BuildSettings.cmake
@@ -205,6 +205,13 @@ endif()
# Add Definition to flags for temporary back compatibility
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DG4USE_STD11")
+# Spack patch to support use of C++ features deprecated/removed in C++17
+# Only checked on AppleClang for now
+if(GEANT4_BUILD_CXXSTD GREATER 14)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES=1")
+endif()
+#----
+
# Hold any appropriate compile flag(s) in variable for later export to
# config files. Needed to support clients using late CMake 2.8 where compile features
# are not available.
# 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 Geant4(CMakePackage):
"""Geant4 is a toolkit for the simulation of the passage of particles
through matter. Its areas of application include high energy, nuclear
and accelerator physics, as well as studies in medical and space
science."""
homepage = "http://geant4.cern.ch/"
url = "https://gitlab.cern.ch/geant4/geant4/-/archive/v10.6.0/geant4-v10.6.0.tar.gz"
maintainers = ['drbenmorgan']
version('10.6.2', sha256='e381e04c02aeade1ed8cdd9fdbe7dcf5d6f0f9b3837a417976b839318a005dbd')
version('10.6.1', sha256='4fd64149ae26952672a81ce5579d3806fda4bd251d486897093ac57633a42b7e')
version('10.6.0', sha256='eebe6a170546064ff81ab3b00f513ccd1d4122a026514982368d503ac55a4ee4')
version('10.5.1', sha256='2397eb859dc4de095ff66059d8bda9f060fdc42e10469dd7890946293eeb0e39')
version('10.4.3', sha256='67f3bb6405a2c77e573936c2b933f5a4a33915aa379626a2eb3012009b91e1da')
version('10.4.0', sha256='e919b9b0a88476e00c0b18ab65d40e6a714b55ee4778f66bac32a5396c22aa74')
version('10.3.3', sha256='bcd36a453da44de9368d1d61b0144031a58e4b43a6d2d875e19085f2700a89d8')
_cxxstd_values = ('11', '14', '17')
variant('cxxstd',
default=_cxxstd_values[0],
values=_cxxstd_values,
multi=False,
description='Use the specified C++ standard when building.')
variant('threads', default=True, description='Build with multithreading')
variant('vecgeom', default=False, description='Enable vecgeom support')
variant('opengl', default=False, description='Optional OpenGL support')
variant('x11', default=False, description='Optional X11 support')
variant('motif', default=False, description='Optional motif support')
variant('qt', default=False, description='Enable Qt support')
variant('python', default=False, description='Enable Python bindings')
depends_on('cmake@3.5:', type='build')
depends_on('cmake@3.8:', type='build', when='@10.6.0:')
depends_on('geant4-data@10.6.2', when='@10.6.2')
depends_on('geant4-data@10.6.1', when='@10.6.1')
depends_on('geant4-data@10.6.0', when='@10.6.0')
depends_on('geant4-data@10.5.1', when='@10.5.1')
depends_on('geant4-data@10.4.3', when='@10.4.3')
depends_on('geant4-data@10.4.0', when='@10.4.0')
depends_on('geant4-data@10.3.3', when='@10.3.3')
depends_on("expat")
depends_on("zlib")
# Python, with boost requirement dealt with in cxxstd section
depends_on('python@3:', when='+python')
extends('python', when='+python')
conflicts('+python', when='@:10.6.1',
msg='Geant4 <= 10.6.1 cannont be built with Python bindings')
for std in _cxxstd_values:
# CLHEP version requirements to be reviewed
depends_on('clhep@2.3.3.0: cxxstd=' + std,
when='@10.3.3: cxxstd=' + std)
# Spack only supports Xerces-c 3 and above, so no version req
depends_on('xerces-c cxxstd=' + std, when='cxxstd=' + std)
# Vecgeom specific versions for each Geant4 version
depends_on('vecgeom@1.1.5 cxxstd=' + std,
when='@10.6.0:10.6.99 +vecgeom cxxstd=' + std)
depends_on('vecgeom@1.1.0 cxxstd=' + std,
when='@10.5.0:10.5.99 +vecgeom cxxstd=' + std)
depends_on('vecgeom@0.5.2 cxxstd=' + std,
when='@10.4.0:10.4.99 +vecgeom cxxstd=' + std)
depends_on('vecgeom@0.3rc cxxstd=' + std,
when='@10.3.0:10.3.99 +vecgeom cxxstd=' + std)
# Boost.python, conflict handled earlier
depends_on('boost@1.70: +python cxxstd=' + std,
when='+python cxxstd=' + std)
# Visualization driver dependencies
depends_on("gl", when='+opengl')
depends_on("glu", when='+opengl')
depends_on("glx", when='+opengl+x11')
depends_on("libx11", when='+x11')
depends_on("libxmu", when='+x11')
depends_on("motif", when='+motif')
depends_on("qt@5: +opengl", when="+qt")
# As released, 10.03.03 has issues with respect to using external
# CLHEP.
patch('CLHEP-10.03.03.patch', level=1, when='@10.3.3')
# These patches can be applied independent of the cxxstd value?
patch('cxx17.patch', when='@:10.3.99 cxxstd=17')
patch('cxx17_geant4_10_0.patch', level=1, when='@10.4.0 cxxstd=17')
patch('geant4-10.4.3-cxx17-removed-features.patch',
level=1, when='@10.4.3 cxxstd=17')
def cmake_args(self):
spec = self.spec
# Core options
options = [
'-DGEANT4_BUILD_CXXSTD=c++{0}'.format(
self.spec.variants['cxxstd'].value),
'-DGEANT4_USE_SYSTEM_CLHEP=ON',
'-DGEANT4_USE_SYSTEM_EXPAT=ON',
'-DGEANT4_USE_SYSTEM_ZLIB=ON',
'-DGEANT4_USE_G3TOG4=ON',
'-DGEANT4_USE_GDML=ON',
'-DXERCESC_ROOT_DIR={0}'.format(spec['xerces-c'].prefix)
]
# Multithreading
options.append(self.define_from_variant('GEANT4_BUILD_MULTITHREADED',
'threads'))
if '+threads' in spec:
# Locked at global-dynamic to allow use cases that load the
# geant4 libs at application runtime
options.append('-DGEANT4_BUILD_TLS_MODEL=global-dynamic')
# install the data with geant4
datadir = spec['geant4-data'].prefix.share
dataver = '{0}-{1}'.format(spec['geant4-data'].name,
spec['geant4-data'].version.dotted)
datapath = join_path(datadir, dataver)
options.append('-DGEANT4_INSTALL_DATADIR={0}'.format(datapath))
# Vecgeom
if '+vecgeom' in spec:
options.append('-DGEANT4_USE_USOLIDS=ON')
options.append('-DUSolids_DIR=%s' % spec[
'vecgeom'].prefix.lib.CMake.USolids)
# Visualization options
if 'platform=darwin' not in spec:
if "+x11" in spec and "+opengl" in spec:
options.append('-DGEANT4_USE_OPENGL_X11=ON')
if "+motif" in spec and "+opengl" in spec:
options.append('-DGEANT4_USE_XM=ON')
if "+x11" in spec:
options.append('-DGEANT4_USE_RAYTRACER_X11=ON')
if '+qt' in spec:
options.append('-DGEANT4_USE_QT=ON')
options.append(
'-DQT_QMAKE_EXECUTABLE=%s' %
spec['qt'].prefix.bin.qmake)
# Python
if spec.version > Version('10.6.1'):
options.append(self.define_from_variant('GEANT4_USE_PYTHON',
'python'))
return options
--- a/configure.ac 2019-04-08 12:14:26.000000000 -0400
+++ b/configure.ac 2019-04-08 12:15:03.000000000 -0400
@@ -170,16 +170,8 @@
BROWSER="open"
JSHEXT=jnilib
AC_DEFINE_UNQUOTED(DARWIN_DYLIB,"$DARWIN_DYLIB",[Define for Darwin-style shared library names.])
- case "${host_os}" in
- *darwin9*)
- DARWIN9=yes
- ;;
- esac
- case "${host_os}" in
- *darwin9.4* | *darwin9.5* )
- EXTRA_SMYRNA_LDFLAGS="-dylib_file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"
- ;;
- esac
+ DARWIN9=yes
+ EXTRA_SMYRNA_LDFLAGS="-dylib_file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"
;;
* ) # This sucks! Whatever happened to standards for file system layout? (Good job its no longer used unless fontconfig is unavailable.)
DEFAULT_FONTPATH="/usr/share/fonts/sun/TrueType:/usr/share/fonts/TrueType:/usr/X11/lib/X11/fonts/TrueType:/usr/share/fonts/sun/Type1:/usr/openwin/lib/X11/fonts/Type1:/usr/share/fonts/X11/Type1:/usr/share/fonts/default/Type1:/usr/X11R6/lib/X11/fonts/TrueType:/usr/X11R6/lib/X11/fonts/truetype:/usr/X11R6/lib/X11/fonts/TTF:/usr/share/fonts/truetype:/usr/openwin/lib/X11/fonts/TrueType:/usr/X11R6/lib/X11/fonts/Type1:/usr/common/share/fonts/ttf";
--- a/plugin/quartz/Makefile.am 2019-04-06 08:33:24.000000000 -0400
+++ b/plugin/quartz/Makefile.am 2019-04-08 12:32:41.000000000 -0400
@@ -39,5 +39,5 @@
if WITH_DARWIN9
libgvplugin_quartz_la_LDFLAGS += -Wl,-exported_symbol,_gvplugin_quartz_LTX_library
-AM_LIBTOOLSFLAGS = --tag=CC
+AM_LIBTOOLFLAGS = --tag=CC
endif
Fix "error: implicit declaration of function 'makeTetrix'" and another
problem fixed by the same upstream commit.
https://gitlab.com/graphviz/graphviz/-/commit/b4947d67a4ebd48ca0105d44f92e47f044e51600
--- cmd/lefty/dot2l/dotlex.c.orig 2016-08-09 16:02:09.000000000 -0500
+++ cmd/lefty/dot2l/dotlex.c 2020-08-27 14:45:45.000000000 -0500
@@ -252,7 +252,7 @@
char *q;
q = lexbuf;
- if (p == '\0')
+ if (!p || *p == '\0')
return NULL;
while (isalnum (*p) || (*p == '_') || (!isascii (*p)))
*q++ = *p++;
--- cmd/tools/gvgen.c.orig 2016-11-22 23:43:56.000000000 -0600
+++ cmd/tools/gvgen.c 2020-08-27 14:45:45.000000000 -0500
@@ -458,6 +458,8 @@
fprintf(opts.outfile, "}\ngraph {\n");
}
+extern void makeTetrix(int depth, edgefn ef);
+
int main(int argc, char *argv[])
{
GraphType graphType;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment