Skip to content
Snippets Groups Projects
Commit a5baf072 authored by Wouter Deconinck's avatar Wouter Deconinck
Browse files

feat: remove spack repository

parent 65adb21c
No related branches found
No related tags found
No related merge requests found
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version
# control.
# However, in case of collaboration, if having platform-specific dependencies or
# dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or
# not
# install all needed dependencies.
#Pipfile.lock
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
# Custom Spack Repository
Extra spack repository with EIC-related packages and overrides.
## How to load this repository
To load the repository, clone and then load with spack:
```bash
spack clone https://eicweb.phy.anl.gov/containers/eic_container.git
spack repo add eic_contaienr/spack
```
Then use spack as you normally would.
## Packages
* New packages
- `dawn`: A tool to visualize detector geometries.
- `dawncut`: A tool to edit detector visualizations.
* Package overrides
* `acts`: Patch bug for simple disk geometries
* `dd4hep`: Fix package hash which somehow is wrong in spack...
* `Geant4`: Add extra hardcoded materials with Birks constant
* `fmt`: Modified compiler flags to build shared library version.
* `madx`: Add madx package
* `podio`: add v0.13.1, also patch issue in cmake setup to allow build under /tmp/root, as needed by spack
* `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.
diff --git a/DAWN_GUI_menu.header2 b/DAWN_GUI_menu.header2
index ef35492..7fa067b 100644
--- a/DAWN_GUI_menu.header2
+++ b/DAWN_GUI_menu.header2
@@ -1 +1 @@
-exec wish "$0" "$@"
+exec wish "$0" ${1+"$@"}
diff --git a/Makefile b/Makefile
index 96e42e7..c9bb589 100644
--- a/Makefile
+++ b/Makefile
@@ -267,6 +267,7 @@ clean:
### install
install:
+ mkdir -p $(INSTALL_DIR)
cp -p ./$(EXEC) $(INSTALL_DIR)/$(EXEC)
cp -p ./$(GUI_MENU) $(INSTALL_DIR)/$(GUI_MENU)
cp -p ./$(EXEC)unixd $(INSTALL_DIR)/$(EXEC)unixd
# 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 Dawn(MakefilePackage):
""" Fukui Renderer DAWN (Drawer for Academic WritiNgs)
is a renderer, which reads 3D geometrical data and visualize them.
It is a vectorized 3D PostScript processor with analytical
hidden line/surface removal.
It aims at precise technical drawing of complex geometries.
It performs geometrical hidden line/surface removal and calculates
out all visible parts of the 3D data before drawing. This drawing
algorithm realizes device-independent technical high quality of
vectorized graphics.
3D Data files should be generated by a modeler or by hands
separately. If you use DAWN as a visualizer of,
say, a simulator of physical experiments,
the simulator application itself is recognized as a modeler.
An important feature of DAWN is that
it has been developed to visualize 3D data generated by
a high-energy experimental detector simulator "GEANT4"
( http://geant4.web.cern.ch/geant4 , http://geant4.kek.jp ).
Note: we set 'gv' as default pdf/ps viewer, assuming this is
installed on your system.
"""
# Note: Dawn homepage not available anymore...
homepage = "https://geant4.kek.jp/~tanaka"
url = "http://geant4.kek.jp/~tanaka/src/dawn_3_91a.tgz"
maintainers = ['sly2j']
version('3_91a', sha256='81d855ead1117681b188242dd0be3a24e005d9bd4063fd2bda9a7a794ebcf5f4')
depends_on('tcl')
depends_on('tk')
## Patch to ensure wish is called correctly
patch('exec.patch')
patch('install.patch')
def edit(self, spec, prefix):
makefile = FileFilter("Makefile")
makefile.filter('CC= .*', 'CC = ' + env['CC'])
makefile.filter('CXX = .*', 'CXX = ' + env['CXX'])
makefile.filter('INSTALL_DIR = .*', 'INSTALL_DIR = {}/bin'.format(prefix))
os.environ['DAWN_PS_PREVIEWER'] = 'gv'
diff --git a/Makefile b/Makefile
index 1dda775..e8a567f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
include ./Makefile.architecture
TARGET = dawncut
+INSTALL_DIR ?= /usr/local/bin
SRC_DIR = src
@@ -44,3 +45,7 @@ clean :
$(RM) $(TARGET) core
$(RM) *~ \#*
+### install
+install:
+ mkdir -p $(INSTALL_DIR)
+ cp -p ./$(TARGET) $(INSTALL_DIR)/$(TARGET)
# Copyright 203-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 Dawncut(MakefilePackage):
"""DAWNCUT is a tool to generate a 3D scene data clipped with an arbitrary plane.
It reads a source DAWN-format file and outputs a new DAWN-format data,
describing a plane-clipped 3D scene. The output DAWN-format data can be
visualized with Fukui Renderer DAWN.
"""
# dawn webpage not available anymore
homepage = "https://geant4.kek.jp/~tanaka"
url = "http://geant4.kek.jp/~tanaka/src/dawncut_1_54a.taz"
maintainers = ['sly2j']
version('1_54a',
url='http://geant4.kek.jp/~tanaka/src/dawncut_1_54a.taz',
sha256='531e1f0e2ed35de3e2b1803108c0efb732d83a0c676f14083bd41a71346b4fa9',
expand=False)
phases = ['unpack', 'repatch', 'edit', 'build', 'install']
def unpack(self, spec, prefix):
# Untar inner tar files
def members(tf, tld):
l = len(tld)
for member in tf.getmembers():
if member.path.startswith(tld):
member.path = member.path[l:]
yield member
with working_dir(self.stage.source_path):
import tarfile
install_tar = tarfile.open('dawncut_1_54a.taz')
install_tar.extractall(members=members(install_tar, 'dawncut_1_54a/'))
def repatch(self, spec, prefix):
# Patch to add install directive to Makefile
src = self.stage.source_path
patches = self.package_dir
which('patch')('-N', '-l', '-p1',
'-i', join_path(patches, 'install.patch'))
def edit(self, spec, prefix):
makefile = FileFilter("Makefile")
makefile.filter('CC= .*', 'CC = ' + env['CC'])
makefile.filter('CXX = .*', 'CXX = ' + env['CXX'])
os.environ['INSTALL_DIR'] = '{}/bin'.format(prefix)
# Copyright 2013-2022 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 Farmhash(AutotoolsPackage):
"""FarmHash is a family of hash functions."""
homepage = "https://github.com/google/farmhash"
url = "https://github.com/google/farmhash"
git = "https://github.com/google/farmhash"
maintainers = ['wdconinc']
version('master', branch='master')
depends_on('autoconf', type='build', when='@master')
depends_on('automake', type='build', when='@master')
depends_on('libtool', type='build', when='@master')
force_autoreconf = True
patch('https://github.com/google/farmhash/pull/25.patch',sha256='cbb6709d51d8d517d5df8a47e5c1867610dc5352152e78b64dec75620f95cc97')
from spack import *
from spack.pkg.builtin.gaudi import Gaudi as BuiltinGaudi
class Gaudi(BuiltinGaudi):
patch('https://gitlab.cern.ch/gaudi/Gaudi/-/commit/03db151003d5207795ae8ec96aaf2f5f8a9ea008.diff',
sha256='e73f45f10ea4a143a05c53a468233ceaad1a8ec22dee9877d178a3c9ee46c70f',
when='@:36.5')
diff --git a/source/processes/electromagnetic/utils/src/G4EmSaturation.cc b/source/processes/electromagnetic/utils/src/G4EmSaturation.cc
index 9fb850dd7..f47c56c02 100644
--- a/source/processes/electromagnetic/utils/src/G4EmSaturation.cc
+++ b/source/processes/electromagnetic/utils/src/G4EmSaturation.cc
@@ -269,7 +269,7 @@ void G4EmSaturation::DumpG4BirksCoefficients()
void G4EmSaturation::InitialiseG4materials()
{
- nG4Birks = 4;
+ nG4Birks = 13;
g4MatData.reserve(nG4Birks);
// M.Hirschberg et al., IEEE Trans. Nuc. Sci. 39 (1992) 511
@@ -305,6 +305,30 @@ void G4EmSaturation::InitialiseG4materials()
//G4_PbWO4 - CMS value
g4MatNames.push_back("G4_PbWO4");
g4MatData.push_back(0.0333333*mm/MeV);
+ // PbWO4 used in HybdriCalorimeter
+ g4MatNames.push_back("PbWO4");
+ g4MatData.push_back(0.0333333*mm/MeV);
+ // Estimate SciGlass to be similar to PbWO4 as it still has to be measured
+ g4MatNames.push_back("SciGlass");
+ g4MatData.push_back(0.0333333*mm/MeV);
+
+ // Various plastic scintillator materials
+ g4MatNames.push_back("PlasticScint079");
+ g4MatData.push_back(0.07943*mm/MeV);
+
+ g4MatNames.push_back("polystyrene");
+ g4MatData.push_back(0.126*mm/MeV);
+ g4MatNames.push_back("Polystyrene");
+ g4MatData.push_back(0.126*mm/MeV);
+ g4MatNames.push_back("PlasticScint");
+ g4MatData.push_back(0.126*mm/MeV);
+ g4MatNames.push_back("PlasticScint126");
+ g4MatData.push_back(0.126*mm/MeV);
+ g4MatNames.push_back("PlasticScintillator");
+ g4MatData.push_back(0.126*mm/MeV);
+
+ g4MatNames.push_back("PlasticScint153");
+ g4MatData.push_back(0.153*mm/MeV);
//G4_Lucite
from spack import *
from spack.pkg.builtin.geant4 import Geant4 as BuiltinGeant4
class Geant4(BuiltinGeant4):
## Add to the hardcoded GEANT4 Birk's constants
patch('birks.patch', when='@10.7.0:')
# 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 Jana2(CMakePackage):
"""Multi-threaded HENP Event Reconstruction."""
homepage = "https://jeffersonlab.github.io/JANA2/"
url = "https://github.com/JeffersonLab/JANA2/archive/v2.0.3.tar.gz"
list_url = "https://github.com/JeffersonLab/JANA2/releases"
git = "https://github.com/JeffersonLab/JANA2.git"
maintainer = ["wdconinc"]
tags = ['eic']
version('2.0.5', sha256='2e7297dfb0bd7f4a2f2fa3bca6b1c10b2553d321dec6060e48b0d75a5ed6717d')
version('2.0.4', sha256='848adffcb881beb7835d01ce47a58991bb4f92664c9477196960ce8cfd94a3ca')
version('2.0.3', sha256='fd34c40e2d6660ec08aca9208999dd9c8fe17de21c144ac68b6211070463e415')
version('2.0.2', sha256='161d29c2b1efbfb36ec783734b45dff178b0c6bd77a2044d5a8829ba5b389b14')
version('2.0.1', sha256='1471cc9c3f396dc242f8bd5b9c8828b68c3c0b72dbd7f0cfb52a95e7e9a8cf31')
variant('root',
default=False,
description='Use ROOT for janarate.')
variant('zmq',
default=False,
description='Use zeroMQ for janacontrol.')
depends_on('cmake@3.9:', type='build')
depends_on('cppzmq', when='+zmq')
depends_on('root', when='+root')
depends_on('xerces-c')
def cmake_args(self):
args = []
# ZeroMQ directory
if '+zmq' in self.spec:
args.append('-DZEROMQ_DIR=%s'
% self.spec['cppzmq'].prefix)
# C++ Standard
if '+root' in self.spec:
args.append('-DCMAKE_CXX_STANDARD=%s'
% self.spec['root'].variants['cxxstd'].value)
else:
args.append('-DCMAKE_CXX_STANDARD=11')
return args
def setup_run_environment(self, env):
import os
env.append_path('JANA_PLUGIN_PATH', os.path.join(self.prefix, 'plugins'))
env.set('JANA_HOME', self.prefix)
# Copyright 2013-2022 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 TensorflowLite(CMakePackage):
"""TensorFlow Lite is TensorFlow's lightweight solution for mobile and
embedded devices. It enables low-latency inference of on-device machine
learning models with a small binary size and fast performance supporting
hardware acceleration."""
homepage = "https://www.tensorflow.org/lite/"
url = "https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.8.0.tar.gz"
maintainers = ['wdconinc']
version('2.8.0', sha256='66b953ae7fba61fd78969a2e24e350b26ec116cf2e6a7eb93d02c63939c6f9f7')
variant('gpu', default=False, description='Enable GPU support')
variant('metal', default=False, description='Enable Metal support')
variant('xnnpack', default=True, description='Enable XNNPACK support')
variant('shared', default=False, description='Build shared libraries')
depends_on('cmake@3.16:', type='build')
# TODO this package still overrides the upstream software with its own FetchContent
depends_on('abseil-cpp')
depends_on('eigen')
depends_on('flatbuffers')
depends_on('fp16')
depends_on('gemmlowp')
depends_on('psimd')
depends_on('pthreadpool')
depends_on('farmhash')
#depends_on(fft2d REQUIRED)
#depends_on(neon2sse REQUIRED)
depends_on('cpuinfo')
#depends_on(ruy REQUIRED)
# GPU variant dependencies
depends_on('opencl', when='gpu')
#find_package(vulkan_headers REQUIRED)
#find_package(fp16_headers REQUIRED)
#find_package(opengl_headers REQUIRED)
#find_package(egl_headers REQUIRED)
# XNNPACK variant dependencies
depends_on('xnnpack', when='xnnpack')
root_cmakelists_dir = 'tensorflow/lite'
def patch(self):
# Two utilities in subdirectory pull headers from outside lite
filter_file("^add_subdirectory",
"#add_subdirectory",
"tensorflow/lite/CMakeLists.txt")
def cmake_args(self):
args = [
self.define_from_variant('TFLITE_ENABLE_GPU', 'gpu'),
self.define_from_variant('TFLITE_ENABLE_METAL', 'metal'),
self.define_from_variant('TFLITE_ENABLE_XNNPACK', 'xnnpack'),
self.define_from_variant('BUILD_SHARED_LIBS', 'shared'),
self.define('TFLITE_KERNEL_TEST', self.run_tests),
]
return args
def install(self, spec, prefix):
# Currently no install target is defined, but allowing for future
super().install(spec, prefix)
# Instal library
mkdirp(self.prefix.lib)
with working_dir(self.build_directory):
for l in find('.', 'libtensorflow-lite.*', recursive=False):
install(l, self.prefix.lib)
# Install headers for tensorflow itself
mkdirp(self.prefix.include)
for h in find(join_path(self.stage.source_path, 'tensorflow/lite'),
'*.h', recursive=True):
relpath = os.path.relpath(h)
dirname = os.path.dirname(relpath)
installdir = join_path(self.prefix.include, dirname)
mkdirp(installdir)
install(h, installdir)
# Install headers for vendored dependencies
for d in ['flatbuffers']:
install_tree(
join_path(self.build_directory, d, 'include'),
self.prefix.include
)
repo:
namespace: 'np-spack'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment