Kokkos sanity checks (#44589)
* Kokkos: adding some sanity checks We can pretty much guarentee that if bin, include or lib directory is missing, something is wrong. Additionally KokkosCore_config.h and Kokkos_Core.hpp. I guess technically we could look for all public headers at least but that seems a bit overkill as well? * Kokkos Kernels: adding sanity checks * Remove check for lib directory since it might end up being lib64 * Also remove lib from kokkos-kernels sanity check
This commit is contained in:
parent
d7f5dbaf89
commit
394ed4f90d
@ -167,6 +167,10 @@ class KokkosKernels(CMakePackage, CudaPackage):
|
|||||||
|
|
||||||
variant("shared", default=True, description="Build shared libraries")
|
variant("shared", default=True, description="Build shared libraries")
|
||||||
|
|
||||||
|
# sanity check
|
||||||
|
sanity_check_is_file = [join_path("include", "KokkosKernels_config.h")]
|
||||||
|
sanity_check_is_dir = ["include"]
|
||||||
|
|
||||||
def cmake_args(self):
|
def cmake_args(self):
|
||||||
spec = self.spec
|
spec = self.spec
|
||||||
options = []
|
options = []
|
||||||
|
@ -265,6 +265,13 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
|
|||||||
"KokkosConfigCommon.cmake", relative_root=os.path.join("lib64", "cmake", "Kokkos")
|
"KokkosConfigCommon.cmake", relative_root=os.path.join("lib64", "cmake", "Kokkos")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# sanity check
|
||||||
|
sanity_check_is_file = [
|
||||||
|
join_path("include", "KokkosCore_config.h"),
|
||||||
|
join_path("include", "Kokkos_Core.hpp"),
|
||||||
|
]
|
||||||
|
sanity_check_is_dir = ["bin", "include"]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_microarch(cls, target):
|
def get_microarch(cls, target):
|
||||||
"""Get the Kokkos microarch name for a Spack target (spec.target)."""
|
"""Get the Kokkos microarch name for a Spack target (spec.target)."""
|
||||||
|
Loading…
Reference in New Issue
Block a user