exago: add and logging variant. (#40188)

This commit is contained in:
Cameron Rutherford 2023-10-04 21:57:17 -07:00 committed by GitHub
parent 79e7da9420
commit 9f0e3c0fed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 5 deletions

View File

@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
from spack.package import *
@ -13,7 +15,7 @@ class Exago(CMakePackage, CudaPackage, ROCmPackage):
homepage = "https://github.com/pnnl/ExaGO"
git = "https://github.com/pnnl/ExaGO.git"
maintainers("ryandanehy", "CameronRutherford", "pelesh")
maintainers("ryandanehy", "cameronrutherford", "pelesh")
version("1.5.1", commit="7abe482c8da0e247f9de4896f5982c4cacbecd78", submodules=True)
version("1.5.0", commit="227f49573a28bdd234be5500b3733be78a958f15", submodules=True)
@ -45,6 +47,7 @@ class Exago(CMakePackage, CudaPackage, ROCmPackage):
conflicts(
"+python", when="+ipopt+rocm", msg="Python bindings require -fPIC with Ipopt for rocm."
)
variant("logging", default=False, description="Enable/Disable spdlog based logging")
# Solver options
variant("hiop", default=False, description="Enable/Disable HiOp")
@ -175,17 +178,18 @@ def cmake_args(self):
args.extend(
[
self.define("EXAGO_ENABLE_GPU", "+cuda" in spec or "+rocm" in spec),
self.define("PETSC_DIR", spec["petsc"].prefix),
self.define("EXAGO_RUN_TESTS", self.run_tests),
self.define("LAPACK_LIBRARIES", spec["lapack"].libs + spec["blas"].libs),
self.define_from_variant("EXAGO_ENABLE_CUDA", "cuda"),
self.define_from_variant("EXAGO_ENABLE_HIP", "rocm"),
self.define("PETSC_DIR", spec["petsc"].prefix),
self.define("EXAGO_RUN_TESTS", True),
self.define_from_variant("EXAGO_ENABLE_LOGGING", "logging"),
self.define_from_variant("EXAGO_ENABLE_MPI", "mpi"),
self.define_from_variant("EXAGO_ENABLE_RAJA", "raja"),
self.define_from_variant("EXAGO_ENABLE_HIOP", "hiop"),
self.define_from_variant("EXAGO_ENABLE_IPOPT", "ipopt"),
self.define_from_variant("EXAGO_ENABLE_PYTHON", "python"),
self.define_from_variant("EXAGO_ENABLE_LOGGING", "logging"),
self.define("LAPACK_LIBRARIES", spec["lapack"].libs + spec["blas"].libs),
]
)

View File

@ -19,7 +19,7 @@ class Hiop(CMakePackage, CudaPackage, ROCmPackage):
homepage = "https://github.com/LLNL/hiop"
git = "https://github.com/LLNL/hiop.git"
maintainers("ryandanehy", "CameronRutherford", "pelesh")
maintainers("ryandanehy", "cameronrutherford", "pelesh")
# Most recent tagged snapshot is the preferred version when profiling.
version("1.0.0", commit="10b7d3ee0a15cb4949ccee8c905d447b9528794f", submodules=True)