LibPressio support for MGARD (#33999)

Co-authored-by: Robert Underwood <runderwood@anl.gov>
This commit is contained in:
Robert Underwood 2022-11-18 13:26:50 -05:00 committed by GitHub
parent f4826e1b33
commit acc19ad34f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 37 additions and 9 deletions

View file

@ -20,6 +20,7 @@ class Libpressio(CMakePackage, CudaPackage):
tests_require_compiler = True tests_require_compiler = True
version("master", branch="master") version("master", branch="master")
version("develop", branch="develop") version("develop", branch="develop")
version("0.90.2", sha256="1fe3f4073952a96bda1b3d7c237bc5d64d1f7bf13bfe1830074852ea33006bf9")
version("0.88.3", sha256="b2df2ed11f77eb2e07206f7bdfa4754017559017235c3324820021ef451fd48b") version("0.88.3", sha256="b2df2ed11f77eb2e07206f7bdfa4754017559017235c3324820021ef451fd48b")
version("0.88.2", sha256="f5de6aff5ff906b164d6b2199ada10a8e32fb1e2a6295da3f0b79d9626661a46") version("0.88.2", sha256="f5de6aff5ff906b164d6b2199ada10a8e32fb1e2a6295da3f0b79d9626661a46")
version("0.88.1", sha256="d7fe73a6b2d8de6d19c85e87888dcf1a62956f56b4e6dfd23e26901740031e00") version("0.88.1", sha256="d7fe73a6b2d8de6d19c85e87888dcf1a62956f56b4e6dfd23e26901740031e00")
@ -246,6 +247,11 @@ class Libpressio(CMakePackage, CudaPackage):
depends_on("arc", when="+arc") depends_on("arc", when="+arc")
depends_on("netcdf-c", when="+netcdf") depends_on("netcdf-c", when="+netcdf")
depends_on("mgardx", when="+mgardx") depends_on("mgardx", when="+mgardx")
conflicts(
"^ mgard@2022-11-18",
when="@:0.88.3+mgard",
msg="mgard@2022-11-18 is not supported before 0.89.0",
)
conflicts( conflicts(
"+mgardx", when="+szauto" "+mgardx", when="+szauto"
) # SZ auto and MGARDx cause symbol conflicts with each other ) # SZ auto and MGARDx cause symbol conflicts with each other

View file

@ -18,28 +18,50 @@ class Mgard(CMakePackage, CudaPackage):
maintainers = ["robertu94"] maintainers = ["robertu94"]
version("2022-11-18", commit="72dd230ed1af88f62ed3c0f662e2387a6e587748")
version("2021-11-12", commit="3c05c80a45a51bb6cc5fb5fffe7b1b16787d3366") version("2021-11-12", commit="3c05c80a45a51bb6cc5fb5fffe7b1b16787d3366")
version("2020-10-01", commit="b67a0ac963587f190e106cc3c0b30773a9455f7a") version("2020-10-01", commit="b67a0ac963587f190e106cc3c0b30773a9455f7a")
variant("serial", when="@2022-11-18:", default=True)
variant("openmp", when="@2022-11-18:", default=True)
variant("timing", when="@2022-11-18:", default=False)
variant("unstructured", when="@2022-11-18:", default=False)
depends_on("python", type=("build",), when="@2022-11-18:")
depends_on("sed", type=("build",), when="@2022-11-18:")
depends_on("zlib") depends_on("zlib")
depends_on("pkgconf", type=("build",), when="@2022-11-18:")
depends_on("zstd") depends_on("zstd")
depends_on("protobuf", when="@2022-11-18:")
depends_on("libarchive", when="@2021-11-12:") depends_on("libarchive", when="@2021-11-12:")
depends_on("tclap", when="@2021-11-12:") depends_on("tclap", when="@2021-11-12")
depends_on("yaml-cpp", when="@2021-11-12:") depends_on("yaml-cpp", when="@2021-11-12:")
depends_on("cmake@3.19:") depends_on("cmake@3.19:")
depends_on("nvcomp@2.0.2", when="+cuda") depends_on("nvcomp@2.2.0:", when="@2022-11-18:+cuda")
depends_on("nvcomp@2.0.2", when="@:2021-11-12+cuda")
conflicts("cuda_arch=none", when="+cuda") conflicts("cuda_arch=none", when="+cuda")
conflicts("~cuda", when="@2021-11-12") conflicts(
"~cuda", when="@2021-11-12", msg="without cuda MGARD@2021-11-12 has undefined symbols"
)
conflicts("%gcc@:7", when="@2022-11-18:", msg="requires std::optional and other c++17 things")
def cmake_args(self): def cmake_args(self):
args = ["-DBUILD_TESTING=OFF"] args = ["-DBUILD_TESTING=OFF"]
args.append(self.define_from_variant("MGARD_ENABLE_CUDA", "cuda"))
if "+cuda" in self.spec: if "+cuda" in self.spec:
args.append("-DMGARD_ENABLE_CUDA=ON")
cuda_arch = self.spec.variants["cuda_arch"].value cuda_arch = self.spec.variants["cuda_arch"].value
args.append("-DCUDA_ARCH_STRING={}".format(";".join(cuda_arch))) args.append("-DCUDA_ARCH_STRING={}".format(";".join(cuda_arch)))
if "75" in cuda_arch: if self.spec.satisfies("@:2021-11-12"):
args.append("-DMGARD_ENABLE_CUDA_OPTIMIZE_TURING=ON") if "+cuda" in self.spec:
if "70" in cuda_arch: if "75" in cuda_arch:
args.append("-DMGARD_ENABLE_CUDA_OPTIMIZE_VOLTA=ON") args.append("-DMGARD_ENABLE_CUDA_OPTIMIZE_TURING=ON")
if "70" in cuda_arch:
args.append("-DMGARD_ENABLE_CUDA_OPTIMIZE_VOLTA=ON")
elif self.spec.satisfies("@2022-11-18:"):
args.append("-DMAXIMUM_DIMENSION=4") # how do we do variants with arbitrary values
args.append("-DMGARD_ENABLE_CLI=OFF") # the CLI is busted
args.append(self.define_from_variant("MGARD_ENABLE_OPENMP", "openmp"))
args.append(self.define_from_variant("MGARD_ENABLE_TIMING", "timing"))
args.append(self.define_from_variant("MGARD_ENABLE_SERIAL", "serial"))
args.append(self.define_from_variant("MGARD_ENABLE_UNSTRUCTURED", "unstructured"))
return args return args