diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6cf7b45936e84755b490240277047c266b043334..d2fa0f63ff1432c9217243441bc63c026de48189 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,14 +8,19 @@ variables: EICD_VERSION: "v2.0.0" AFTERBURNER_VERSION: "v0.1.2" - ## Spack github version, v0.18.1 - SPACK_VERSION: "13e6f87ef6527954b152eaea303841978e83b992" + ## Spack github version, e.g. v0.18.1 or commit hash + SPACK_VERSION: "v0.18.1" ## Space-separated list of spack cherry-picks SPACK_CHERRYPICKS: "adc9f887eac78a81bb8189d603f4dc45ed3509c1 5bd44a795c76a61f0f9fbfeedcf7e917a0bf40b0" ## Ref: https://github.com/spack/spack/commit/[hash] ## adc9f887eac78a81bb8189d603f4dc45ed3509c1: acts-dd4hep: new package; acts: new version ## 5bd44a795c76a61f0f9fbfeedcf7e917a0bf40b0: lcio, podio, edm4hep: add latest versions + ## Spack github version, e.g. v0.18 or commit hash + EICSPACK_VERSION: "d7606f67a36708dcc0c045a269621f4189345aad" + ## Space-separated list of eic=spack cherry-picks + EICSPACK_CHERRYPICKS: "" + ## We need to enable Docker Buildkit to use cache mounts and better ## build performance overall DOCKER_BUILDKIT: 1 @@ -232,11 +237,10 @@ oneapi_jug_dev:default: ## calculate a hash based on the spack.yaml file and the spack directory ## and use this spack as a docker variable to force a rebuild when there ## is a change (versus rerun from cache) - - PACKAGE_HASH=$(tar cf - spack* | sha1sum | head -c40) + - PACKAGE_HASH=$(sha1sum spack.yaml | head -c40) - echo "PACKAGE_HASH= ${PACKAGE_HASH}" - ## Copy spack directory and spack.yaml into build context - - cp -r spack containers/oneapi/ - - cp spack.yaml containers/oneapi/spack/spack.yaml + ## Copy spack.yaml into build context + - cp spack.yaml containers/oneapi/spack.yaml - CACHE_FLAG="" - | if [ $FORCE_NOCACHE = 1 ]; then @@ -249,6 +253,8 @@ oneapi_jug_dev:default: -f containers/oneapi/onedev.Dockerfile --build-arg SPACK_VERSION="${SPACK_VERSION}" --build-arg SPACK_CHERRYPICKS="${SPACK_CHERRYPICKS}" + --build-arg EICSPACK_VERSION="${EICSPACK_VERSION}" + --build-arg EICSPACK_CHERRYPICKS="${EICSPACK_CHERRYPICKS}" --build-arg CACHE_BUST=${PACKAGE_HASH} --build-arg INTERNAL_TAG=${INTERNAL_TAG} --build-arg JUG_VERSION=${INTERNAL_TAG}-$(git rev-parse HEAD) @@ -333,11 +339,10 @@ jug_dev:default: ## calculate a hash based on the spack.yaml file and the spack directory ## and use this spack as a docker variable to force a rebuild when there ## is a change (versus rerun from cache) - - PACKAGE_HASH=$(tar cf - spack* | sha1sum | head -c40) - - echo "PACKAGE_HASH= ${PACKAGE_HASH}" - ## move spack directory and spack.yaml into the container build directory - - cp -r spack containers/jug - - cp -r spack.yaml containers/jug/spack/spack.yaml + - PACKAGE_HASH=$(sha1sum spack.yaml | head -c40) + - echo "PACKAGE_HASH=${PACKAGE_HASH}" + ## move spack.yaml into the container build directory + - cp -r spack.yaml containers/jug - CACHE_FLAG="" - | if [ $FORCE_NOCACHE = 1 ]; then @@ -351,6 +356,8 @@ jug_dev:default: -f containers/jug/dev.Dockerfile --build-arg SPACK_VERSION="${SPACK_VERSION}" --build-arg SPACK_CHERRYPICKS="${SPACK_CHERRYPICKS}" + --build-arg EICSPACK_VERSION="${EICSPACK_VERSION}" + --build-arg EICSPACK_CHERRYPICKS="${EICSPACK_CHERRYPICKS}" --build-arg CACHE_BUST=${PACKAGE_HASH} --build-arg INTERNAL_TAG=${INTERNAL_TAG} --build-arg JUG_VERSION=${INTERNAL_TAG}-$(git rev-parse HEAD) @@ -360,6 +367,8 @@ jug_dev:default: -f containers/jug/dev.Dockerfile --build-arg SPACK_VERSION="${SPACK_VERSION}" --build-arg SPACK_CHERRYPICKS="${SPACK_CHERRYPICKS}" + --build-arg EICSPACK_VERSION="${EICSPACK_VERSION}" + --build-arg EICSPACK_CHERRYPICKS="${EICSPACK_CHERRYPICKS}" --build-arg CACHE_BUST=${PACKAGE_HASH} --build-arg INTERNAL_TAG=${INTERNAL_TAG} --build-arg JUG_VERSION=${INTERNAL_TAG}-$(git rev-parse HEAD) diff --git a/containers/jug/dev.Dockerfile b/containers/jug/dev.Dockerfile index 31471367bc9bc30a38a41327e6864960730eef5b..637eec672e5870f2667bb572ddfb3886a5690cd2 100644 --- a/containers/jug/dev.Dockerfile +++ b/containers/jug/dev.Dockerfile @@ -78,14 +78,20 @@ RUN --mount=type=cache,target=/var/cache/spack-mirror \ ARG CACHE_BUST="hash" ARG CACHE_NUKE="" -## Setup our custom environment and package overrides -COPY spack $SPACK_ROOT/eic-spack -RUN spack repo add --scope site "$SPACK_ROOT/eic-spack" \ - && mkdir /opt/spack-environment \ - && cd /opt/spack-environment \ - && mv $SPACK_ROOT/eic-spack/spack.yaml . \ - && rm -r /usr/local \ - && spack env activate . \ +## Setup our custom package overrides +ENV EICSPACK_ROOT=$SPACK_ROOT/var/spack/repos/eic-spack +ARG EICSPACK_VERSION="$SPACK_VERSION" +RUN git clone https://github.com/eic/eic-spack.git ${EICSPACK_ROOT} \ + && git -C ${EICSPACK_ROOT} checkout ${EICSPACK_VERSION} \ + && if [ -n "${EICSPACK_CHERRYPICKS}" ] ; then \ + git -C ${EICSPACK_ROOT} cherry-pick -n ${EICSPACK_CHERRYPICKS} ; \ + fi \ + && spack repo add --scope site "${EICSPACK_ROOT}" + +## Setup our custom environment +COPY spack.yaml /opt/spack-environment/ +RUN rm -r /usr/local \ + && spack env activate /opt/spack-environment/ \ && spack concretize diff --git a/containers/oneapi/onedev.Dockerfile b/containers/oneapi/onedev.Dockerfile index bdc29037e80b9605776e7217d25f3a8e5f252a31..e2eb45cbbf09c272ff8f17183aeded9b95d985eb 100644 --- a/containers/oneapi/onedev.Dockerfile +++ b/containers/oneapi/onedev.Dockerfile @@ -88,14 +88,20 @@ RUN --mount=type=cache,target=/var/cache/spack-mirror \ ARG CACHE_BUST="hash" ARG CACHE_NUKE="" -## Setup our custom environment and package overrides -COPY spack $SPACK_ROOT/eic-spack -RUN spack repo add --scope site "$SPACK_ROOT/eic-spack" \ - && mkdir /opt/spack-environment \ - && cd /opt/spack-environment \ - && mv $SPACK_ROOT/eic-spack/spack.yaml . \ - && rm -r /usr/local \ - && spack env activate . \ +## Setup our custom package overrides +ENV EICSPACK_ROOT=$SPACK_ROOT/var/spack/repos/eic-spack +ARG EICSPACK_VERSION="$SPACK_VERSION" +RUN git clone https://github.com/eic/eic-spack.git ${EICSPACK_ROOT} \ + && git -C ${EICSPACK_ROOT} checkout ${EICSPACK_VERSION} \ + && if [ -n "${EICSPACK_CHERRYPICKS}" ] ; then \ + git -C ${EICSPACK_ROOT} cherry-pick -n ${EICSPACK_CHERRYPICKS} ; \ + fi \ + && spack repo add --scope site "${EICSPACK_ROOT}" + +## Setup our custom environment +COPY spack.yaml /opt/spack-environment/ +RUN rm -r /usr/local \ + && spack env activate /opt/spack-environment/ \ && spack concretize diff --git a/spack/.gitignore b/spack/.gitignore deleted file mode 100644 index 2927022e8adab3e4c21ffcd949f9938171979b27..0000000000000000000000000000000000000000 --- a/spack/.gitignore +++ /dev/null @@ -1,141 +0,0 @@ -# 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/ diff --git a/spack/README.md b/spack/README.md deleted file mode 100644 index aae04684fe93b58f21a260c3d1ebdf177dca100a..0000000000000000000000000000000000000000 --- a/spack/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# 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/spack/packages/dawn/exec.patch b/spack/packages/dawn/exec.patch deleted file mode 100644 index f0b939a65cdda159a9c6d10d32ae19c042a2f37f..0000000000000000000000000000000000000000 --- a/spack/packages/dawn/exec.patch +++ /dev/null @@ -1,7 +0,0 @@ -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/spack/packages/dawn/install.patch b/spack/packages/dawn/install.patch deleted file mode 100644 index 961dfde2bf4611976994263ce087261dc6b14dfa..0000000000000000000000000000000000000000 --- a/spack/packages/dawn/install.patch +++ /dev/null @@ -1,12 +0,0 @@ -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 diff --git a/spack/packages/dawn/package.py b/spack/packages/dawn/package.py deleted file mode 100644 index 52da825cc628d06a437a6c88b961dd29a4e5c2ed..0000000000000000000000000000000000000000 --- a/spack/packages/dawn/package.py +++ /dev/null @@ -1,53 +0,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 * -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/spack/packages/dawncut/install.patch b/spack/packages/dawncut/install.patch deleted file mode 100644 index 3f939a4eced20b5607cbc508bc7c1e8789a23c98..0000000000000000000000000000000000000000 --- a/spack/packages/dawncut/install.patch +++ /dev/null @@ -1,20 +0,0 @@ -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) diff --git a/spack/packages/dawncut/package.py b/spack/packages/dawncut/package.py deleted file mode 100644 index ffe9adfa32f4f133391e3610f073dfa0d3173007..0000000000000000000000000000000000000000 --- a/spack/packages/dawncut/package.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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) diff --git a/spack/packages/farmhash/package.py b/spack/packages/farmhash/package.py deleted file mode 100644 index a11c5ee06f3b95da5c14526fa77729e6617d6a2d..0000000000000000000000000000000000000000 --- a/spack/packages/farmhash/package.py +++ /dev/null @@ -1,26 +0,0 @@ -# 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') diff --git a/spack/packages/gaudi/package.py b/spack/packages/gaudi/package.py deleted file mode 100644 index ddf96ac873c070b5a3cace1926e50df2e4983b8e..0000000000000000000000000000000000000000 --- a/spack/packages/gaudi/package.py +++ /dev/null @@ -1,6 +0,0 @@ -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/spack/packages/geant4/birks.patch b/spack/packages/geant4/birks.patch deleted file mode 100644 index 903ac6fcceff16d261264cc734262165ef10a299..0000000000000000000000000000000000000000 --- a/spack/packages/geant4/birks.patch +++ /dev/null @@ -1,44 +0,0 @@ -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 - diff --git a/spack/packages/geant4/package.py b/spack/packages/geant4/package.py deleted file mode 100644 index 5e1ae42f56fcd97849b22bb8a81b645d9c7017ee..0000000000000000000000000000000000000000 --- a/spack/packages/geant4/package.py +++ /dev/null @@ -1,7 +0,0 @@ -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:') diff --git a/spack/packages/jana2/package.py b/spack/packages/jana2/package.py deleted file mode 100644 index d9f91c78157a5c4c2a348e4b26ea117d4c7acc45..0000000000000000000000000000000000000000 --- a/spack/packages/jana2/package.py +++ /dev/null @@ -1,59 +0,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('master', branch='master') - version('2.0.6', sha256='122ceba6e9541949803073b6e51fb594500132cf7535808d635bdc193e95a9e2') - 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) diff --git a/spack/packages/tensorflow-lite/package.py b/spack/packages/tensorflow-lite/package.py deleted file mode 100644 index 58ef88f0e8af03c4df6b62e40d18ca84b710ec57..0000000000000000000000000000000000000000 --- a/spack/packages/tensorflow-lite/package.py +++ /dev/null @@ -1,97 +0,0 @@ -# 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 - ) diff --git a/spack/repo.yaml b/spack/repo.yaml deleted file mode 100644 index 6cde3b536a3aa094cb663026280909c73ca6c430..0000000000000000000000000000000000000000 --- a/spack/repo.yaml +++ /dev/null @@ -1,2 +0,0 @@ -repo: - namespace: 'np-spack'