diff options
Diffstat (limited to 'var/spack/repos/builtin/packages/fftx/package.py')
-rw-r--r-- | var/spack/repos/builtin/packages/fftx/package.py | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/var/spack/repos/builtin/packages/fftx/package.py b/var/spack/repos/builtin/packages/fftx/package.py index 423cf5e8b2..301821a0ec 100644 --- a/var/spack/repos/builtin/packages/fftx/package.py +++ b/var/spack/repos/builtin/packages/fftx/package.py @@ -3,6 +3,8 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import os.path + from spack.package import * @@ -11,20 +13,22 @@ class Fftx(CMakePackage, CudaPackage, ROCmPackage): 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" + homepage = "https://spiralgen.com" + url = "https://github.com/spiral-software/fftx/archive/refs/tags/1.1.2.tar.gz" git = "https://github.com/spiral-software/fftx.git" maintainers("spiralgen") version("develop", branch="develop") version("main", branch="main") + version("1.1.2", sha256="b2c4a7791305481af9e1bd358c1215efa4506c91c943cddca3780a1ccbc27810") + version("1.1.1", sha256="5cbca66ef09eca02ee8f336f58eb45cfac69cfb29cd6eb945852ad74085d8a60") + version("1.1.0", sha256="a6f95605abc11460bbf51839727a456a31488e27e12a970fc29a1b8c42f4e3b5") version("1.0.3", sha256="b5ff275facce4a2fbabd0aecc65dd55b744794f2e07cd8cfa91363001c664896") - depends_on("spiral-software") - depends_on("spiral-package-fftx") - depends_on("spiral-package-simt") - # depends_on('spiral-package-mpi') + depends_on("spiral-software+fftx+simt+jit+mpi") + # depend only on spiral-software, but spiral-software must be installed with variants: + # +fftx +simt +mpi +jit conflicts("+rocm", when="+cuda", msg="FFTX only supports one GPU backend at a time") @@ -39,41 +43,37 @@ class Fftx(CMakePackage, CudaPackage, ROCmPackage): 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")): + # From the root directory run the config-fftx-libs.sh script + with working_dir(self.stage.source_path): bash = which("bash") - bash("./build-lib-code.sh", backend) + bash("./config-fftx-libs.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("-DCMAKE_INSTALL_PREFIX:PATH={0}".format(self.prefix)) + if "+rocm" in spec: + args.append("-DCMAKE_CXX_COMPILER={0}".format(self.spec["hip"].hipcc)) args.append(self.build_config) + print("Args = " + str(args)) return args @property def build_targets(self): - return ["-j1", "install"] + return ["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") + files = ("License.txt", "README.md", "ReleaseNotes.md", "supercomputer-README.md") for fil in files: install(fil, prefix) + mkdirp(prefix.cache_jit_files) 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) + dir = join_path(self.stage.source_path, "cache_jit_files") + if os.path.isdir(dir): + install_tree("cache_jit_files", prefix.cache_jit_files) def setup_dependent_build_environment(self, env, dependent_spec): env.set("FFTX_HOME", self.prefix) |