diff --git a/env/merlin/ffbidx/packages/ffbidx/package.py b/env/merlin/ffbidx/packages/ffbidx/package.py new file mode 100644 index 0000000..fddc9f3 --- /dev/null +++ b/env/merlin/ffbidx/packages/ffbidx/package.py @@ -0,0 +1,92 @@ +# 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) + +# ---------------------------------------------------------------------------- +# If you submit this package back to Spack as a pull request, +# please first remove this boilerplate and all FIXME comments. +# +# This is a template package file for Spack. We've put "FIXME" +# next to all the things you'll want to change. Once you've handled +# them, you can save this file and test your package like this: +# +# spack install ffbidx +# +# You can edit this file again by typing: +# +# spack edit ffbidx +# +# See the Spack documentation for more information on packaging. +# ---------------------------------------------------------------------------- + +from spack.package import * + + +class Ffbidx(CMakePackage, CudaPackage): + """Develop an indexer for fast feedback""" + + homepage = "https://github.com/paulscherrerinstitute/fast-feedback-indexer.git" + git = "https://github.com/paulscherrerinstitute/fast-feedback-indexer.git" + + maintainers = ["hcstadler"] + + version('main') + + variant('build_type', default='Release', + description='CMake build type', + values=('Debug', 'Release', 'RelWithDebInfo', 'MinSizeRel')) + variant("cuda", default=True, description="Build with CUDA") + variant("fast_indexer", default=True, description="Build the fast indexer" ) + variant("python", default=False, description="Build python modules") + variant("simple_data_files", default=False, description="Install simple data files") + variant("simple_data_indexer", default=False, description="Build simple data indexer") + variant("test_all", default=False, description="Enable testing") + + depends_on("python@3.1.5:", when='+python') + depends_on("py-numpy", when='+python') + depends_on("eigen@3.4.0:", type=('build', 'link'), when='+simple_data_indexer') + depends_on("cmake@3.21.0:", type='build') + + conflicts('cuda_arch=none', when='+fast_indexer', + msg='CUDA architecture is required when building the fast indexer!') + conflicts("~cuda", when='+fast_indexer', msg="Ffbidx requires CUDA!'") + + conflicts('+python', when='~fast_indexer', + msg='PYTHON_MODULE needs -DBUILD_FAST_INDEXER=1 as a cmake argument') + conflicts('+test_all', when='~simple_data_indexer~fast_indexer', + msg='Tests need the build of both indexers') + + # Conflicts for compilers without C++17 support + conflicts('gcc@:6.5.0') + conflicts('intel@:18.0.5') + + # Add ctest stage if +test_all in spec + @run_after('build') + def test(self): + if '+test_all' in self.spec: + with working_dir(self.build_directory): + ctest = Executable("ctest") + ctest() + + def cmake_args(self): + args = [ + self.define_from_variant('BUILD_FAST_INDEXER', 'fast_indexer'), + self.define_from_variant('BUILD_SIMPLE_DATA_INDEXER', 'simple_data_indexer'), + self.define_from_variant('BUILD_SIMPLE_DATA_READER', 'simple_data_indexer'), + self.define_from_variant('CMAKE_CUDA_ARCHITECTURES', 'cuda_arch'), + self.define_from_variant('INSTALL_SIMPLE_DATA_FILES', 'simple_data_files'), + self.define_from_variant('PYTHON_MODULE', 'python'), + self.define_from_variant('TEST_ALL', 'test_all'), + ] + + return args + + # Set PATHS for run time + def setup_run_environment(self, env): + env.append_path('CPATH', self.prefix.include) + env.append_path('LD_LIBRARY_PATH', self.prefix.lib64) + env.append_path('LIBRARY_PATH', self.prefix.lib64) + env.append_path('PKG_CONFIG_PATH', self.prefix.share.ffbidx.pkgconfig) + if '+python' in self.spec: + env.append_path('PYTHONPATH', self.prefix.lib64.ffbidx) diff --git a/env/merlin/ffbidx/repo.yaml b/env/merlin/ffbidx/repo.yaml new file mode 100644 index 0000000..ec0f4c1 --- /dev/null +++ b/env/merlin/ffbidx/repo.yaml @@ -0,0 +1,2 @@ +repo: + namespace: ffibdx \ No newline at end of file diff --git a/env/merlin/ffbidx/spack.yaml b/env/merlin/ffbidx/spack.yaml new file mode 100644 index 0000000..ba338e6 --- /dev/null +++ b/env/merlin/ffbidx/spack.yaml @@ -0,0 +1,11 @@ +spack: + concretizer: + unify: when_possible + include: + - sysconfigs/config.yaml + - sysconfigs/compilers.yaml + - sysconfigs/packages.yaml + repos: + - . + specs: + - ffbidx@main cuda_arch=60 +python +simple_data_indexer +simple_data_files +test_all ^openblas diff --git a/env/merlin/ffbidx/sysconfigs/compilers.yaml b/env/merlin/ffbidx/sysconfigs/compilers.yaml new file mode 100644 index 0000000..00c322e --- /dev/null +++ b/env/merlin/ffbidx/sysconfigs/compilers.yaml @@ -0,0 +1,93 @@ +--- +compilers: + - compiler: + environment: {} + extra_rpaths: [] + flags: {} + modules: [] + operating_system: rhel7 + paths: + cc: /opt/psi/Programming/intel/22.2/compiler/2022.1.0/linux/bin/icx + cxx: /opt/psi/Programming/intel/22.2/compiler/2022.1.0/linux/bin/dpcpp + f77: /opt/psi/Programming/intel/22.2/compiler/2022.1.0/linux/bin/ifx + fc: /opt/psi/Programming/intel/22.2/compiler/2022.1.0/linux/bin/ifx + spec: dpcpp@2022.1.0 + target: x86_64 + - compiler: + environment: {} + extra_rpaths: [] + flags: {} + modules: [] + operating_system: rhel7 + paths: + cc: /opt/psi/Programming/intel/22.2/compiler/2022.1.0/linux/bin/intel64/icc + cxx: /opt/psi/Programming/intel/22.2/compiler/2022.1.0/linux/bin/intel64/icpc + f77: /opt/psi/Programming/intel/22.2/compiler/2022.1.0/linux/bin/intel64/ifort + fc: /opt/psi/Programming/intel/22.2/compiler/2022.1.0/linux/bin/intel64/ifort + spec: intel@2021.6.0 + target: x86_64 + - compiler: + environment: {} + extra_rpaths: [] + flags: {} + modules: [] + operating_system: rhel7 + paths: + cc: /opt/psi/Programming/intel/22.2/compiler/2022.1.0/linux/bin/icx + cxx: /opt/psi/Programming/intel/22.2/compiler/2022.1.0/linux/bin/icpx + f77: /opt/psi/Programming/intel/22.2/compiler/2022.1.0/linux/bin/ifx + fc: /opt/psi/Programming/intel/22.2/compiler/2022.1.0/linux/bin/ifx + spec: oneapi@2022.1.0 + target: x86_64 + - compiler: + environment: {} + extra_rpaths: [] + flags: {} + modules: [] + operating_system: rhel7 + paths: + cc: /opt/psi/Programming/gcc/9.5.0/bin/gcc + cxx: /opt/psi/Programming/gcc/9.5.0/bin/g++ + f77: /opt/psi/Programming/gcc/9.5.0/bin/gfortran + fc: /opt/psi/Programming/gcc/9.5.0/bin/gfortran + spec: gcc@9.5.0 + target: x86_64 + - compiler: + environment: {} + extra_rpaths: [] + flags: {} + modules: [] + operating_system: rhel7 + paths: + cc: /opt/psi/Programming/gcc/12.1.0/bin/gcc + cxx: /opt/psi/Programming/gcc/12.1.0/bin/g++ + f77: /opt/psi/Programming/gcc/12.1.0/bin/gfortran + fc: /opt/psi/Programming/gcc/12.1.0/bin/gfortran + spec: gcc@12.1.0 + target: x86_64 + - compiler: + environment: {} + extra_rpaths: [] + flags: {} + modules: [] + operating_system: rhel7 + paths: + cc: /opt/psi/Programming/clang/12.0.0_rhel7/bin/clang + cxx: /opt/psi/Programming/clang/12.0.0_rhel7/bin/clang++ + f77: null + fc: null + spec: clang@12.0.0 + target: x86_64 + - compiler: + environment: {} + extra_rpaths: [] + flags: {} + modules: [] + operating_system: rhel7 + paths: + cc: /opt/psi/Programming/pgi/21.5/Linux_x86_64/21.5/compilers/bin/nvc + cxx: /opt/psi/Programming/pgi/21.5/Linux_x86_64/21.5/compilers/bin/nvc++ + f77: /opt/psi/Programming/pgi/21.5/Linux_x86_64/21.5/compilers/bin/nvfortran + fc: /opt/psi/Programming/pgi/21.5/Linux_x86_64/21.5/compilers/bin/nvfortran + spec: nvhpc@21.5 + target: x86_64 \ No newline at end of file diff --git a/env/merlin/ffbidx/sysconfigs/config.yaml b/env/merlin/ffbidx/sysconfigs/config.yaml new file mode 100644 index 0000000..84981bf --- /dev/null +++ b/env/merlin/ffbidx/sysconfigs/config.yaml @@ -0,0 +1,4 @@ +config: + build_stage: + - /scratch/$USER/spack/spack-stages + source_cache: /scratch/$USER/spack/spack-source_cache diff --git a/env/merlin/ffbidx/sysconfigs/packages.yaml b/env/merlin/ffbidx/sysconfigs/packages.yaml new file mode 100644 index 0000000..06db280 --- /dev/null +++ b/env/merlin/ffbidx/sysconfigs/packages.yaml @@ -0,0 +1,282 @@ +--- +packages: + all: + compiler: + - gcc@12.1.0 + target: + - haswell + providers: + pkgconfig: [pkg-config] + permissions: + read: user + write: user + binutils: + buildable: false + externals: + - prefix: /usr + spec: binutils@2.38 + bzip2: + buildable: false + externals: + - prefix: /usr + spec: bzip2@1.0.6 + cmake: + buildable: false + externals: + - prefix: /opt/psi/Programming/cmake/3.23.2 + spec: cmake@3.23.2 + cpio: + buildable: false + externals: + - prefix: /usr + spec: cpio@2.11 + curl: + buildable: false + externals: + - prefix: /usr + spec: curl@7.29.0 + cvs: + buildable: false + externals: + - prefix: /usr + spec: cvs@1.11.23 + diffutils: + buildable: false + externals: + - prefix: /usr + spec: diffutils@3.3 + doxygen: + buildable: false + externals: + - prefix: /usr + spec: doxygen@1.8.5 + expat: + buildable: false + externals: + - prefix: /usr + spec: expat@1.6.0 + file: + externals: + - prefix: /usr + spec: file@5.11 + findutils: + buildable: false + externals: + - prefix: /usr + spec: findutils@4.5.11 + # E.G: only available from already downloaded source, so I put it here + gams: + externals: + - prefix: /opt/psi/Tools/GAMS/31.1.1/gams31.1_linux_x64_64_sfx + spec: gams@31.1.1 + gawk: + buildable: false + externals: + - prefix: /usr + spec: gawk@4.0.2 + ghostscript: + buildable: false + externals: + - prefix: /usr + spec: ghostscript@9.25 + git: + buildable: false + externals: + - prefix: /usr + spec: git@1.8.3.1~tcltk + glew: + buildable: false + externals: + - prefix: /usr + spec: glew@1.10.0 + gmake: + buildable: false + externals: + - prefix: /usr + spec: gmake@3.82 + groff: + buildable: false + externals: + - prefix: /usr + spec: groff@1.22.2 + hcoll: + buildable: false + externals: + - prefix: /opt/mellanox/hcoll + spec: hcoll@3.9.1927 + fftw: + buildable: false + externals: + - prefix: /usr + spec: fftw@3.3.3 + intel-oneapi-mkl: + buildable: false + externals: + - prefix: /opt/psi/Programming/intel/22.2 + spec: intel-oneapi-mkl@2022.1.0 + intel-oneapi-mpi: + buildable: false + externals: + - prefix: /opt/psi/Programming/intel/22.2 + spec: intel-oneapi-mpi@2021.6.0 + libcroco: + buildable: false + externals: + - prefix: /usr + spec: libcroco@0.6.13 + libfuse: + buildable: false + externals: + - prefix: /usr + spec: libfuse@3.6.1 + libice: + buildable: false + externals: + - prefix: /usr + spec: libice@6.3.0 + libjpeg-turbo: + buildable: false + externals: + - prefix: /usr + spec: libjpeg-turbo@62.1.0 + libpthread: + buildable: false + externals: + - prefix: /usr + spec: libpthread@2.17 + libpthread-stubs: + buildable: false + externals: + - prefix: /usr + spec: libpthread-stubs@0.4 + libreadline: + buildable: false + externals: + - prefix: /usr + spec: libreadline@6.2 + libtiff: + buildable: false + externals: + - prefix: /usr + spec: libtiff@5.2.0 + libx11: + buildable: false + externals: + - prefix: /usr + spec: libx11@6.3.0 + libxext: + buildable: false + externals: + - prefix: /usr + spec: libxext@6.4.0 + libxft: + buildable: false + externals: + - prefix: /usr + spec: libxft@2.3.2 + libxpm: + buildable: false + externals: + - prefix: /usr + spec: libxpm@4.11.0 + libxt: + buildable: false + externals: + - prefix: /usr + spec: libxt@6.0.0 + m4: + buildable: false + externals: + - prefix: /usr + spec: m4@1.4.16 + # E.G: only available from already downloaded source, so I put it here + mxm: + buildable: false + externals: + - prefix: /opt/psi/System/mxm/3.6.3104 + spec: mxm@3.6.3104 + ncurses: + buildable: false + externals: + - prefix: /usr + spec: ncurses@5.9.20130511 + nlohmann-json: + buildable: false + externals: + - prefix: /usr + spec: nlohmann-json@3.10.5 + numactl: + buildable: false + externals: + - prefix: /usr + spec: numactl@2.0.14 + openssh: + buildable: false + externals: + - prefix: /usr + spec: openssh@7.4p1 + openssl: + buildable: false + externals: + - prefix: /usr + spec: openssl@1.0.2k-fips + pcre: + buildable: false + externals: + - prefix: /usr + spec: pcre@8.32 + pkg-config: + buildable: false + externals: + - prefix: /usr + spec: pkg-config@0.27.1 + rsync: + buildable: false + externals: + - prefix: /usr + spec: rsync@3.1.2 + ruby: + buildable: false + externals: + - prefix: /usr + spec: ruby@2.0.0p648 + sed: + buildable: false + externals: + - prefix: /usr + spec: sed@4.2.2 + slurm: + buildable: false + externals: + - prefix: /usr + spec: slurm@21-08-8-2 + sqlite: + buildable: false + externals: + - prefix: /usr + spec: sqlite@3.7.17 + subversion: + buildable: false + externals: + - prefix: /usr + spec: subversion@1.7.14 + tar: + buildable: false + externals: + - prefix: /usr + spec: tar@1.26 + texinfo: + buildable: false + externals: + - prefix: /usr + spec: texinfo@5.1 + xerces-c: + buildable: false + externals: + - prefix: /usr + spec: xerces-c@3.1 + xz: + buildable: false + externals: + - prefix: /usr + spec: xz@5.2.2 \ No newline at end of file