summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorThomas-Ulrich <ulrich@geophysik.uni-muenchen.de>2022-11-28 15:54:21 +0100
committerGitHub <noreply@github.com>2022-11-28 15:54:21 +0100
commit35e5a916bcec9cdb450012dce9261c4eb3058319 (patch)
treee361875804e2ba08756610e81eefc79f0f3193d4 /var
parent137457765979fa146b972703c3eac46866d1f248 (diff)
downloadspack-35e5a916bcec9cdb450012dce9261c4eb3058319.tar.gz
spack-35e5a916bcec9cdb450012dce9261c4eb3058319.tar.bz2
spack-35e5a916bcec9cdb450012dce9261c4eb3058319.tar.xz
spack-35e5a916bcec9cdb450012dce9261c4eb3058319.zip
easi: update package, rework impalajit (#34032)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/easi/package.py48
-rw-r--r--var/spack/repos/builtin/packages/impalajit-llvm/package.py32
-rw-r--r--var/spack/repos/builtin/packages/impalajit/package.py46
3 files changed, 62 insertions, 64 deletions
diff --git a/var/spack/repos/builtin/packages/easi/package.py b/var/spack/repos/builtin/packages/easi/package.py
index 950b2363b4..c65ccbcbf8 100644
--- a/var/spack/repos/builtin/packages/easi/package.py
+++ b/var/spack/repos/builtin/packages/easi/package.py
@@ -3,12 +3,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-
-import os
-import shutil
-
from spack.package import *
-from spack.repo import GitExe
class Easi(CMakePackage):
@@ -19,60 +14,49 @@ class Easi(CMakePackage):
homepage = "https://easyinit.readthedocs.io"
git = "https://github.com/SeisSol/easi.git"
- maintainers = ["ThrudPrimrose", "ravil-mobile", "krenzland"]
+ maintainers = ["ravil-mobile", "Thomas-Ulrich", "krenzland", "ThrudPrimrose"]
version("develop", branch="master")
+ version("1.2.0", tag="v1.2.0")
version("1.1.2", tag="v1.1.2")
variant("asagi", default=True, description="build with ASAGI support")
variant(
"jit",
- default="impalajit",
+ default="impalajit,lua",
description="build with JIT support",
values=("impalajit", "impalajit-llvm", "lua"),
- multi=False,
+ multi=True,
)
depends_on("asagi +mpi +mpi3", when="+asagi")
depends_on("yaml-cpp@0.6.2")
- depends_on("impalajit-llvm@1.0.0", when="jit=impalajit-llvm")
+
+ depends_on("impalajit@llvm-1.0.0", when="jit=impalajit-llvm")
depends_on("lua@5.3.2", when="jit=lua")
- depends_on("git", type="build", when="jit=impalajit")
+ depends_on("impalajit", when="jit=impalajit")
+
+ conflicts("jit=impalajit", when="jit=impalajit-llvm")
+ conflicts("jit=impalajit-llvm", when="jit=impalajit")
conflicts("jit=impalajit", when="target=aarch64:")
conflicts("jit=impalajit", when="target=ppc64:")
conflicts("jit=impalajit", when="target=ppc64le:")
conflicts("jit=impalajit", when="target=riscv64:")
- def pre_build(self):
- spec = self.spec
- if "jit=impalajit" in spec:
- impalajir_src = join_path(self.stage.source_path, "impalajit")
- if os.path.isdir(impalajir_src):
- shutil.rmtree(impalajir_src)
-
- git_exe = GitExe()
- git_exe("clone", "https://github.com/uphoffc/ImpalaJIT.git", impalajir_src)
- with working_dir(join_path(impalajir_src, "build"), create=True):
- cmake("..", "-DCMAKE_INSTALL_PREFIX={0}".format(self.spec.prefix))
- make()
- make("install")
-
def cmake_args(self):
- self.pre_build()
args = []
args.append(self.define_from_variant("ASAGI", "asagi"))
-
- with_impala = "jit=impalajit" in self.spec
- with_impala |= "jit=impalajit-llvm" in self.spec
- if with_impala:
+ spec = self.spec
+ if "jit=impalajit" in spec or "jit=impalajit-llvm" in spec:
args.append(self.define("IMPALAJIT", True))
- backend_type = "llvm" if "jit=impalajit-llvm" in self.spec else "original"
+ backend_type = "llvm" if "jit=impalajit-llvm" in spec else "original"
args.append(self.define("IMPALAJIT_BACKEND", backend_type))
-
- if "jit=lua" in self.spec:
+ else:
args.append(self.define("IMPALAJIT", False))
+
+ if "jit=lua" in spec:
args.append(self.define("LUA", True))
return args
diff --git a/var/spack/repos/builtin/packages/impalajit-llvm/package.py b/var/spack/repos/builtin/packages/impalajit-llvm/package.py
deleted file mode 100644
index a5fe5f6812..0000000000
--- a/var/spack/repos/builtin/packages/impalajit-llvm/package.py
+++ /dev/null
@@ -1,32 +0,0 @@
-# Copyright 2013-2021 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.package import *
-
-
-class ImpalajitLlvm(CMakePackage):
- """Impala is a calculator-like language. This is a fork of
- the original ImpalaJIT project and was enhanced with LLVM JIT.
- Impala acts as a backend for `easi` project.
- """
-
- homepage = "https://github.com/ravil-mobile/ImpalaJIT"
- git = "https://github.com/ravil-mobile/ImpalaJIT"
-
- maintainers = ["ravil-mobile"]
-
- version("develop", branch="master")
- version("1.0.0", tag="v1.0.0")
-
- variant("shared", default=True, description="build as a shared library")
-
- depends_on("llvm@10.0.0:11.1.0")
- depends_on("z3")
-
- def cmake_args(self):
- args = []
- args.append(self.define_from_variant("SHARED_LIB", "shared"))
- return args
diff --git a/var/spack/repos/builtin/packages/impalajit/package.py b/var/spack/repos/builtin/packages/impalajit/package.py
new file mode 100644
index 0000000000..5feb26096e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/impalajit/package.py
@@ -0,0 +1,46 @@
+# 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.package import *
+
+
+class Impalajit(CMakePackage):
+ """A lightweight JIT compiler for flexible data access in simulation applications.
+ impalajit@llvm is enhanced with LLVM JIT. This means that impalajit@llvm is
+ supposed to work on any architecture supported by llvm, contrary to the
+ impalajit@main package which is restricted to x86 architectures.This comes at the
+ price of extra dependencies. Impala acts as a backend for `easi` project."""
+
+ homepage = "https://github.com/manuel-fasching/ImpalaJIT/blob/master/README.md"
+
+ version(
+ "main",
+ git="https://github.com/manuel-fasching/ImpalaJIT.git",
+ branch="master",
+ preferred=True,
+ )
+ version("llvm", git="https://github.com/ravil-mobile/ImpalaJIT.git", branch="dev")
+ version("llvm-1.0.0", git="https://github.com/ravil-mobile/ImpalaJIT.git", tag="v1.0.0")
+
+ maintainers = ["ravil-mobile", "Thomas-Ulrich"]
+
+ variant("shared", default=True, description="build as a shared library")
+ depends_on("cmake", type="build")
+ depends_on("pkg-config", type="build", when="@main")
+ depends_on("llvm@10.0.0:11.1.0", when="@llvm")
+ depends_on("z3", when="@llvm")
+ depends_on("llvm@10.0.0:11.1.0", when="@llvm-1.0.0")
+ depends_on("z3", when="@llvm-1.0.0")
+
+ def cmake_args(self):
+ args = []
+ args.append(self.define_from_variant("SHARED_LIB", "shared"))
+ args.append(self.define("TESTS", self.run_tests))
+
+ if self.compiler != "intel":
+ args.append("-DINTEL_COMPILER=OFF")
+
+ return args