From 0b2f75932e679045772fd31c6d0e716273beb0fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nadir=20Rom=C3=A1n=20Guerrero?= Date: Tue, 22 Mar 2022 10:15:11 +0100 Subject: [PATCH] Update ospray suite (#1532) * Updates OSPRay package * Create rkcommon package * Create openvkl package --- .../repo-patches/packages/openvkl/package.py | 26 ++++++++++++++++++ .../repo-patches/packages/ospray/package.py | 27 +++++++++++++++---- .../repo-patches/packages/rkcommon/package.py | 24 +++++++++++++++++ 3 files changed, 72 insertions(+), 5 deletions(-) create mode 100644 bluebrain/repo-patches/packages/openvkl/package.py create mode 100644 bluebrain/repo-patches/packages/rkcommon/package.py diff --git a/bluebrain/repo-patches/packages/openvkl/package.py b/bluebrain/repo-patches/packages/openvkl/package.py new file mode 100644 index 00000000000000..f87494f4341a4f --- /dev/null +++ b/bluebrain/repo-patches/packages/openvkl/package.py @@ -0,0 +1,26 @@ +# Copyright 2013-2018 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 import * + + +class Openvkl(CMakePackage): + """ + IntelĀ® Open Volume Kernel Library (Intel Open VKL) is a + collection of high-performance volume computation kernels, + developed at Intel. + """ + + homepage = "https://www.openvkl.org" + git = "https://github.com/openvkl/openvkl.git" + generator = "Ninja" + + version("1.2.0", tag="v1.2.0") + + depends_on("cmake@3.1:", type="build") + depends_on("ispc", type="build") + depends_on("ninja", type="build") + depends_on("embree") + depends_on("rkcommon") diff --git a/bluebrain/repo-patches/packages/ospray/package.py b/bluebrain/repo-patches/packages/ospray/package.py index 722a281dec24ea..39841b9aa0b7fd 100644 --- a/bluebrain/repo-patches/packages/ospray/package.py +++ b/bluebrain/repo-patches/packages/ospray/package.py @@ -15,23 +15,40 @@ class Ospray(CMakePackage): version("1.8.5", tag="v1.8.5") version("1.7.3", tag="v1.7.3") + version("2.9.0", tag="v2.9.0") variant("apps", default=False, description="Build example applications") depends_on("cmake@3.1:", type="build") depends_on("ispc@:1.12", type="build", when="@:1.999") + depends_on("ispc@1.16.1:", type="build", when="@2.9.0:") depends_on("ninja", type="build") depends_on("embree") depends_on("mpi") depends_on("tbb") + depends_on("rkcommon", when="@2.9.0:") + depends_on("openvkl", when="@2.9.0:") conflicts("^gcc") def cmake_args(self): - return [ + args = [ "-DOSPRAY_ENABLE_TUTORIALS=OFF", - "-DOSPRAY_ENABLE_APPS:BOOL={0}".format( - "ON" if "+apps" in self.spec else "OFF" - ), - "-DOSPRAY_MODULE_MPI=ON", + "-DOSPRAY_MODULE_MPI=ON" ] + if self.spec.satisifes('@:1.8.5'): + args.append("-DOSPRAY_ENABLE_APPS:BOOL={0}".format( + "ON" if "+apps" in self.spec else "OFF")) + elif self.spec.satisfies('@:2.9.0'): + args.append("-DOSPRAY_MODULE_DENOISER=OFF") + args.append("-DOSPRAY_ENABLE_APPS_BENCHMARK={0}".format( + "ON" if "+apps" in self.spec else "OFF")) + args.append("-DOSPRAY_ENABLE_APPS_EXAMPLES={0}".format( + "ON" if "+apps" in self.spec else "OFF")) + args.append("-DOSPRAY_ENABLE_APPS_TESTING={0}".format( + "ON" if "+apps" in self.spec else "OFF")) + args.append("-DOSPRAY_ENABLE_APPS_TUTORIALS={0}".format( + "ON" if "+apps" in self.spec else "OFF")) + args.append("-DOSPRAY_APPS_ENABLE_GLM=OFF") + + return args diff --git a/bluebrain/repo-patches/packages/rkcommon/package.py b/bluebrain/repo-patches/packages/rkcommon/package.py new file mode 100644 index 00000000000000..7ccac3e36dd850 --- /dev/null +++ b/bluebrain/repo-patches/packages/rkcommon/package.py @@ -0,0 +1,24 @@ +# Copyright 2013-2018 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 import * + + +class Rkcommon(CMakePackage): + """ + This project represents a common set of C++ infrastructure and + CMake utilities used by various components of Intel oneAPI + Rendering Toolkit. + """ + + homepage = "https://github.com/ospray/rkcommon" + git = "https://github.com/ospray/rkcommon.git" + generator = "Ninja" + + version("1.9.0", tag="v1.9.0") + + depends_on("cmake@3.1:", type="build") + depends_on("ninja", type="build") + depends_on("tbb")