summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorPatrick Broderick <50112491+broderickpt@users.noreply.github.com>2022-04-28 01:26:44 -0400
committerGitHub <noreply@github.com>2022-04-27 22:26:44 -0700
commit8b85b33ba509d5f546a8c7394f1452094a5c8872 (patch)
tree3ec7db0d0c17db7a0fe1e251435d2b06dc3393c0 /var
parent90dafdd9f0bf03dd125168b5e1c75b7a06f0c0ae (diff)
downloadspack-8b85b33ba509d5f546a8c7394f1452094a5c8872.tar.gz
spack-8b85b33ba509d5f546a8c7394f1452094a5c8872.tar.bz2
spack-8b85b33ba509d5f546a8c7394f1452094a5c8872.tar.xz
spack-8b85b33ba509d5f546a8c7394f1452094a5c8872.zip
Add spiral fftx (#28583)
* add fftx package; rename spiral to spiral-software and add spiral-package-* * Update year in copyright notice * Add package description to FFTX/package.py * Changes to package files for SPIRAL & FFTX for PR * Update package definitions * remove unnecessary lines
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/fftx/package.py91
-rw-r--r--var/spack/repos/builtin/packages/hcol/package.py25
-rw-r--r--var/spack/repos/builtin/packages/spiral-package-fftx/package.py34
-rw-r--r--var/spack/repos/builtin/packages/spiral-package-hcol/package.py30
-rw-r--r--var/spack/repos/builtin/packages/spiral-package-mpi/package.py29
-rw-r--r--var/spack/repos/builtin/packages/spiral-package-simt/package.py31
-rw-r--r--var/spack/repos/builtin/packages/spiral-software/package.py (renamed from var/spack/repos/builtin/packages/spiral/package.py)49
7 files changed, 244 insertions, 45 deletions
diff --git a/var/spack/repos/builtin/packages/fftx/package.py b/var/spack/repos/builtin/packages/fftx/package.py
new file mode 100644
index 0000000000..ca002c3eff
--- /dev/null
+++ b/var/spack/repos/builtin/packages/fftx/package.py
@@ -0,0 +1,91 @@
+# 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 Fftx(CMakePackage, CudaPackage, ROCmPackage):
+ """FFTX is the exascale follow-on to the FFTW open source discrete FFT
+ package for executing the Fast Fourier Transform as well as higher-level
+ operations composed of linear operations combined with DFT transforms."""
+
+ homepage = "https://spiral.net"
+ url = "https://github.com/spiral-software/fftx/archive/refs/tags/1.0.3.tar.gz"
+ git = "https://github.com/spiral-software/fftx.git"
+
+ maintainers = ['spiralgen']
+
+ version('develop', branch='develop')
+ version('main', branch='main')
+ version('1.0.3', sha256='b5ff275facce4a2fbabd0aecc65dd55b744794f2e07cd8cfa91363001c664896')
+
+ variant('build_type', default='Release',
+ values=('Debug', 'Release', 'RelWithDebInfo', 'MinSizeRel'),
+ description='The build type to build')
+
+ depends_on('spiral-software')
+ depends_on('spiral-package-fftx')
+ depends_on('spiral-package-simt')
+ # depends_on('spiral-package-mpi')
+
+ conflicts('+rocm', when='+cuda', msg='FFTX only supports one GPU backend at a time')
+
+ @run_before('cmake')
+ def create_lib_source_code(self):
+ # What config should be built -- driven by spec
+ spec = self.spec
+ backend = 'CPU'
+ if '+cuda' in spec:
+ backend = 'CUDA'
+ if '+rocm' in spec:
+ backend = 'HIP'
+ self.build_config = '-D_codegen=%s' % backend
+
+ # From directory examples/library run the build-lib-code.sh script
+ with working_dir(join_path(self.stage.source_path, 'src', 'library')):
+ bash = which('bash')
+ bash('./build-lib-code.sh', backend)
+
+ def cmake_args(self):
+ spec = self.spec
+ args = [
+ '-DSPIRAL_HOME:STRING={0}'.format(spec['spiral-software'].prefix)
+ ]
+ args.append('-DCMAKE_INSTALL_PREFIX:PATH={0}'.format(self.stage.source_path))
+ args.append(self.build_config)
+ print('Args = ' + str(args))
+ return args
+
+ @property
+ def build_targets(self):
+ return ['-j1', 'install']
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ mkdirp(prefix.CMakeIncludes)
+ mkdirp(prefix.examples)
+ mkdirp(prefix.include)
+ mkdirp(prefix.lib)
+
+ with working_dir(self.stage.source_path):
+ files = ('License.txt', 'README.md', 'ReleaseNotes.md')
+ for fil in files:
+ install(fil, prefix)
+
+ with working_dir(self.stage.source_path):
+ install_tree('bin', prefix.bin)
+ install_tree('CMakeIncludes', prefix.CMakeIncludes)
+ install_tree('examples', prefix.examples)
+ install_tree('include', prefix.include)
+ install_tree('lib', prefix.lib)
+
+ def setup_dependent_build_environment(self, env, dependent_spec):
+ env.set('FFTX_HOME', self.prefix)
+
+ def setup_dependent_run_environment(self, env, dependent_spec):
+ env.set('FFTX_HOME', self.prefix)
+
+ def setup_run_environment(self, env):
+ env.set('FFTX_HOME', self.prefix)
diff --git a/var/spack/repos/builtin/packages/hcol/package.py b/var/spack/repos/builtin/packages/hcol/package.py
deleted file mode 100644
index 3c519172b6..0000000000
--- a/var/spack/repos/builtin/packages/hcol/package.py
+++ /dev/null
@@ -1,25 +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 Hcol(Package):
- """This is the SPIRAL package for the Hybrid Control Operator Language
- (HCOL)."""
-
- homepage = "https://https://spiral.net"
- url = "https://github.com/spiral-software/spiral-package-hcol/archive/1.0.0.zip"
-
- maintainers = ['spiralgen']
- extends('spiral')
-
- version('1.0.0', sha256='9a95574e2b061d03d264c32dbf733e893017d1644b6486c7a8a55a3b24783f58')
-
- # HCOL package is an extension for Spiral. Install the files in their own
- # prefix, in "namespaces/packages/hcol". This allows 'spack activate' to
- # symlink hcol at the right location for spiral packages.
- def install(self, spec, prefix):
- install_tree('.', prefix.namespaces.packages.hcol)
diff --git a/var/spack/repos/builtin/packages/spiral-package-fftx/package.py b/var/spack/repos/builtin/packages/spiral-package-fftx/package.py
new file mode 100644
index 0000000000..d7dd6603ce
--- /dev/null
+++ b/var/spack/repos/builtin/packages/spiral-package-fftx/package.py
@@ -0,0 +1,34 @@
+# 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 SpiralPackageFftx(Package):
+ """This is the SPIRAL package for FFTX: FFTX is the exascale follow-on to
+ the FFTW open source discrete FFT package for executing the Fast Fourier
+ Transform as well as higher-level operations composed of linear operations
+ combined with DFT transforms."""
+
+ homepage = "https://spiral.net"
+ url = "https://github.com/spiral-software/spiral-package-fftx/archive/refs/tags/1.0.0.tar.gz"
+ git = "https://github.com/spiral-software/spiral-package-fftx.git"
+
+ maintainers = ['spiralgen']
+ extends('spiral-software')
+
+ version('develop', branch='develop')
+ version('main', branch='main')
+ version('1.1.1', sha256='99ec7fab9274d378524b4933917fae23f9590255518c7a124cb46bd5e8d9af37')
+ version('1.1.0', sha256='979d7e59fc39e7e5423bce64628cea467079667d75ce885febee7c42fa7164aa')
+ version('1.0.0', sha256='9ed352049fcaab31a1a898149d16438c95a1656a2d24df6dee14e3b61efacb5c')
+
+ # FFTX package is an extension for Spiral (spec: spiral-software). Spiral finds
+ # extensions in the "namespaces/packages" folder. Install the tree in a similarly
+ # named folder so that when activated it'll get symlinked to the correct place.
+
+ def install(self, spec, prefix):
+ spiral_pkgs = join_path(prefix, 'namespaces', 'packages', 'fftx')
+ install_tree('.', spiral_pkgs)
diff --git a/var/spack/repos/builtin/packages/spiral-package-hcol/package.py b/var/spack/repos/builtin/packages/spiral-package-hcol/package.py
new file mode 100644
index 0000000000..1dbd0385c3
--- /dev/null
+++ b/var/spack/repos/builtin/packages/spiral-package-hcol/package.py
@@ -0,0 +1,30 @@
+# 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 SpiralPackageHcol(Package):
+ """This is the SPIRAL package for the Hybrid Control Operator Language
+ (HCOL)."""
+
+ homepage = "https://spiral.net"
+ url = "https://github.com/spiral-software/spiral-package-hcol/archive/refs/tags/1.0.0.tar.gz"
+ git = "https://github.com/spiral-software/spiral-package-hcol.git"
+
+ maintainers = ['spiralgen']
+ extends('spiral-software')
+
+ version('master', branch='master')
+ version('1.0.0', sha256='18ae6f0a090de03723612a6c91ca17cf62971129540936d8c2738bd8f807a511')
+
+ # HCOL package is an extension for Spiral (spec: spiral-software). Extensions
+ # packages for Spiral are intended to be installed in the spiral-software prefix,
+ # in the "namespaces/packages" folder. Install the tree in that folder under the
+ # name 'hcol'.
+
+ def install(self, spec, prefix):
+ spiral_pkgs = join_path(prefix, 'namespaces', 'packages', 'hcol')
+ install_tree('.', spiral_pkgs)
diff --git a/var/spack/repos/builtin/packages/spiral-package-mpi/package.py b/var/spack/repos/builtin/packages/spiral-package-mpi/package.py
new file mode 100644
index 0000000000..8ee226ceb7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/spiral-package-mpi/package.py
@@ -0,0 +1,29 @@
+# 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 SpiralPackageMpi(Package):
+ """This is the SPIRAL package for MPI."""
+
+ homepage = "https://spiral.net"
+ url = "https://github.com/spiral-software/spiral-package-mpi/archive/refs/tags/1.0.0.tar.gz"
+ git = "https://github.com/spiral-software/spiral-package-mpi.git"
+
+ maintainers = ['spiralgen']
+ extends('spiral-software')
+
+ version('develop', branch='develop')
+ version('main', branch='main')
+ version('1.0.0', sha256='64896a82aacce9cc8abe88b921e09ba7a5fceb8262e490f60a7088583c2c2151')
+
+ # MPI package is an extension for Spiral (spec: spiral-software). Spiral finds
+ # extensions in the "namespaces/packages" folder. Install the tree in a similarly
+ # named folder so that when activated it'll get symlinked to the correct place.
+
+ def install(self, spec, prefix):
+ spiral_pkgs = join_path(prefix, 'namespaces', 'packages', 'mpi')
+ install_tree('.', spiral_pkgs)
diff --git a/var/spack/repos/builtin/packages/spiral-package-simt/package.py b/var/spack/repos/builtin/packages/spiral-package-simt/package.py
new file mode 100644
index 0000000000..1e8c1eb472
--- /dev/null
+++ b/var/spack/repos/builtin/packages/spiral-package-simt/package.py
@@ -0,0 +1,31 @@
+# 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 SpiralPackageSimt(Package):
+ """This is the SPIRAL package for SIMT: SIMT, single instruction multiple
+ threads, is used to generate code for GPUs and multi-threading aplications."""
+
+ homepage = "https://spiral.net"
+ url = "https://github.com/spiral-software/spiral-package-simt/archive/refs/tags/1.0.0.tar.gz"
+ git = "https://github.com/spiral-software/spiral-package-simt.git"
+
+ maintainers = ['spiralgen']
+ extends('spiral-software')
+
+ version('develop', branch='develop')
+ version('main', branch='main')
+ version('1.1.0', sha256='4d6a5e586889b9e000968c99f3068ba86a12cc389665c6deadc4734117ef7a95')
+ version('1.0.0', sha256='888ca01aa8fd5df80d6ae1bd64eb1b1e70240b6a36bc3437eb48f5a4b59c2d07')
+
+ # SIMT package is an extension for Spiral (spec: spiral-software). Spiral finds
+ # extensions in the "namespaces/packages" folder. Install the tree in a similarly
+ # named folder so that when activated it'll get symlinked to the correct place.
+
+ def install(self, spec, prefix):
+ spiral_pkgs = join_path(prefix, 'namespaces', 'packages', 'simt')
+ install_tree('.', spiral_pkgs)
diff --git a/var/spack/repos/builtin/packages/spiral/package.py b/var/spack/repos/builtin/packages/spiral-software/package.py
index 6413be8f21..e44cb35e03 100644
--- a/var/spack/repos/builtin/packages/spiral/package.py
+++ b/var/spack/repos/builtin/packages/spiral-software/package.py
@@ -6,18 +6,27 @@
from spack import *
-class Spiral(CMakePackage):
+class SpiralSoftware(CMakePackage):
"""SPIRAL is a program generation system for linear transforms and other
mathematical functions that produces very high performance code for a wide
spectrum of hardware platforms."""
homepage = "https://spiral.net"
- url = "https://github.com/spiral-software/spiral-software/archive/8.1.2.tar.gz"
+ url = "https://github.com/spiral-software/spiral-software/archive/refs/tags/8.4.0.tar.gz"
+ git = "https://github.com/spiral-software/spiral-software.git"
maintainers = ['spiralgen']
- version('8.2.0', sha256='983f38d270ae2cb753c88cbce3f412e307c773807ad381acedeb9275afc0be32')
- version('8.1.2', sha256='506f1dbf923aa1c9f19f05444fa947085715eef37c9d2494d133fcaaa1dd50bc')
+ version('develop', branch='develop')
+ version('master', branch='master')
+ version('8.4.0', sha256='d0c58de65c678130eeee6b8b8b48061bbe463468990f66d9b452225ce46dee19')
+ version('8.3.0', sha256='41cf0e7f14f9497e98353baa1ef4ca6204ce5ca525db8093f5bb44e89992abdf')
+ version('8.2.1', sha256='78d7bb1c22a5b2d216eac7b6ddedd20b601ba40227e64f743cbb54d4e5a7794d')
+ version('8.2.0', sha256='983f38d270ae2cb753c88cbce3f412e307c773807ad381acedeb9275afc0be32')
+
+ variant('build_type', default='Release',
+ values=('Debug', 'Release', 'RelWithDebInfo', 'MinSizeRel'),
+ description='Build the Release version by default')
extendable = True
@@ -26,41 +35,41 @@ class Spiral(CMakePackage):
def build(self, spec, prefix):
with working_dir(self.build_directory):
make('all')
- make('install/local')
-
- # For some reason the make install/local doesn't seem to install
- # the gap exe...though it does work if run manually
- gapfil = join_path(self.build_directory, 'gap/src/gap')
- dest = join_path(self.stage.source_path, 'gap/bin')
- install(gapfil, dest)
+ make('install')
def install(self, spec, prefix):
- mkdirp(prefix.gap.bin)
- gapfil = join_path(self.build_directory, 'gap/src/gap')
- install(gapfil, prefix.gap.bin)
- with working_dir(join_path(self.build_directory, 'gap')):
- files = ('spiral', 'spirald', '_spiral.g')
- for fil in files:
- install(fil, prefix)
- set_executable(join_path(prefix, fil))
-
with working_dir(self.stage.source_path):
files = ('LICENSE', 'README.md', 'ReleaseNotes.md')
for fil in files:
install(fil, prefix)
+ mkdirp(prefix.gap.bin)
mkdirp(prefix.gap.lib)
mkdirp(prefix.gap.grp)
mkdirp(prefix.namespaces)
mkdirp(prefix.profiler)
mkdirp(prefix.tests)
+ mkdirp(prefix.bin)
+ mkdirp(prefix.config)
print("self.stage.source_path = " + self.stage.source_path)
with working_dir(self.stage.source_path):
install_tree('namespaces', prefix.namespaces)
install_tree('profiler', prefix.profiler)
install_tree('tests', prefix.tests)
+ install_tree('bin', prefix.bin)
+ install_tree('config', prefix.config)
with working_dir(join_path(self.stage.source_path, 'gap')):
install_tree('lib', prefix.gap.lib)
install_tree('grp', prefix.gap.grp)
+ install_tree('bin', prefix.gap.bin)
+
+ def setup_dependent_build_environment(self, env, dependent_spec):
+ env.set('SPIRAL_HOME', self.prefix)
+
+ def setup_dependent_run_environment(self, env, dependent_spec):
+ env.set('SPIRAL_HOME', self.prefix)
+
+ def setup_run_environment(self, env):
+ env.set('SPIRAL_HOME', self.prefix)