Commit 9a9d0550 authored by Utkarsh Ayachit's avatar Utkarsh Ayachit
Browse files

update to ospray 2.2

Updates to build ospray 2.2. This results in updates to other ospray
dependencies to match recommended versions.

Also adds new project required by ospray including openvkl, ospcommon
and ospraymodulempi.
parent e19b1ef2
Pipeline #182023 failed with stages
in 46 minutes and 40 seconds
......@@ -54,8 +54,11 @@ function (superbuild_find_projects var)
netcdf
nlohmannjson
numpy
ospray
openimagedenoise
openvkl
ospcommon
ospray
ospraymodulempi
paraviewweb
paraviewwebglance
paraviewweblite
......@@ -84,6 +87,7 @@ function (superbuild_find_projects var)
pythonzopeinterface
pytz
qt5
rkcommon
silo
szip
tbb
......
......@@ -39,8 +39,19 @@ endif ()
set(additional_libraries)
if (ospray_enabled)
list(APPEND additional_libraries
"${superbuild_install_location}/lib/libospray_module_ispc.dylib")
set(osprayextra_libraries
openvkl_module_ispc_driver
ospray_module_denoiser
ospray_module_ispc
ospray_module_mpi
rkcommon)
foreach (osprayextra_library IN LISTS osprayextra_libraries)
if (EXISTS "${superbuild_install_location}/lib/lib${osprayextra_library}.dylib")
list(APPEND additional_libraries
"${superbuild_install_location}/lib/lib${osprayextra_library}.dylib")
endif ()
endforeach ()
endif ()
superbuild_apple_create_app(
......
......@@ -46,8 +46,6 @@ superbuild_add_project(embree
-DEMBREE_TUTORIALS:BOOL=OFF
-DCMAKE_INSTALL_LIBDIR:STRING=lib)
superbuild_apply_patch(embree no-sse42-on-cray "Disable SSE 42 on Cray.")
if (MSVC_VERSION EQUAL 1900)
superbuild_append_flags(cxx_flags "-d2SSAOptimizer-" PROJECT_ONLY)
endif()
......@@ -3,5 +3,5 @@ superbuild_add_project(ispc
BUILD_COMMAND ""
INSTALL_COMMAND
"${CMAKE_COMMAND}" -E copy_if_different
<SOURCE_DIR>/ispc${CMAKE_EXECUTABLE_SUFFIX}
<SOURCE_DIR>/bin/ispc${CMAKE_EXECUTABLE_SUFFIX}
<INSTALL_DIR>/bin/ispc${CMAKE_EXECUTABLE_SUFFIX})
superbuild_add_project(openimagedenoise
DEPENDS tbb cxx11
DEPENDS tbb cxx11 ispc
CMAKE_ARGS
-DOIDN_APPS:BOOL=OFF
-DCMAKE_INSTALL_NAME_DIR:PATH=<INSTALL_DIR>/lib
-DCMAKE_INSTALL_LIBDIR:STRING=lib
)
superbuild_apply_patch(openimagedenoise fix-openmpsimd
"Fix missing compiler flag in openimagedenoise")
superbuild_add_project(openvkl
DEPENDS ispc tbb cxx11 ospcommon embree rkcommon
CMAKE_ARGS
-DBUILD_BENCHMARKS:BOOL=OFF
-DBUILD_EXAMPLES:BOOL=OFF
-DBUILD_TESTING:BOOL=OFF
-DCMAKE_INSTALL_NAME_DIR:PATH=<INSTALL_DIR>/lib
-DCMAKE_INSTALL_LIBDIR:STRING=lib
-DISPC_EXECUTABLE:PATH=<INSTALL_DIR>/bin/ispc)
superbuild_add_project(ospcommon
DEPENDS ispc tbb cxx11
CMAKE_ARGS
-DBUILD_TESTING:BOOL=OFF
-DCMAKE_INSTALL_NAME_DIR:PATH=<INSTALL_DIR>/lib
-DCMAKE_INSTALL_LIBDIR:STRING=lib
-DOSPCOMMON_TASKING_SYSTEM:STRING=TBB)
......@@ -9,38 +9,21 @@ set(ospray_BUILD_ISA "${ospray_isa_default}"
mark_as_advanced(ospray_BUILD_ISA)
set_property(CACHE ospray_BUILD_ISA PROPERTY STRINGS SSE AVX AVX2 AVX512KNL AVX512SKX ALL)
set (ospray_depends ispc tbb cxx11 embree ospraymaterials openimagedenoise)
set (ospray_depends ispc tbb cxx11 embree ospraymaterials openimagedenoise
ospcommon openvkl)
superbuild_add_project(ospray
DEPENDS ${ospray_depends}
CMAKE_ARGS
-DTBB_ROOT:PATH=<INSTALL_DIR>
-DOSPRAY_ISPC_DIRECTORY:PATH=<INSTALL_DIR>/bin
-DCMAKE_INSTALL_NAME_DIR:PATH=<INSTALL_DIR>/lib
-DCMAKE_INSTALL_LIBDIR:STRING=lib
-DOSPRAY_BUILD_ISA:STRING=${ospray_BUILD_ISA}
-DOSPRAY_APPS_BENCHMARK:BOOL=OFF
-DOSPRAY_APPS_ENABLE_SCRIPTING:BOOL=OFF
-DOSPRAY_APPS_GLUTVIEWER:BOOL=OFF
-DOSPRAY_APPS_PARAVIEW_TFN_CVT:BOOL=OFF
-DOSPRAY_APPS_MODELVIEWER:BOOL=OFF
-DOSPRAY_APPS_PARTICLEVIEWER:BOOL=OFF
-DOSPRAY_APPS_QTVIEWER:BOOL=OFF
-DOSPRAY_APPS_STREAMLINEVIEWER:BOOL=OFF
-DOSPRAY_APPS_VOLUMEVIEWER:BOOL=OFF
-DOSPRAY_COMMANDLINE_TACHYON_SUPPORT:BOOL=OFF
-DOSPRAY_APPS_EXAMPLES:BOOL=OFF
-DOSPRAY_APPS_TESTING:BOOL=OFF
-DOSPRAY_ENABLE_APPS:BOOL=OFF
-DOSPRAY_ENABLE_TESTING:BOOL=OFF
-DOSPRAY_ENABLE_TUTORIALS:BOOL=OFF
-DOSPRAY_MODULE_DISPLAY_WALD:BOOL=OFF
-DOSPRAY_MODULE_LOADERS:BOOL=OFF
-DOSPRAY_MODULE_OPENGL_UTIL:BOOL=OFF
-DOSPRAY_MODULE_SEISMIC:BOOL=OFF
-DOSPRAY_MODULE_TACHYON:BOOL=OFF
-DCMAKE_INSTALL_LIBDIR:STRING=lib)
-DOSPRAY_MODULE_DENOISER:BOOL=ON
)
superbuild_add_extra_cmake_args(
-DOSPRAY_INSTALL_DIR:PATH=<INSTALL_DIR>)
superbuild_apply_patch(ospray type-conversion
"Fix type conversion error on icc 18.")
superbuild_apply_patch(ospray fix-stale-constructor-call
"Fixup constructor calls")
superbuild_add_project(ospraymodulempi
DEPENDS ospray mpi ispc tbb cxx11
CMAKE_ARGS
-DCMAKE_INSTALL_NAME_DIR:PATH=<INSTALL_DIR>/lib
-DCMAKE_INSTALL_LIBDIR:STRING=lib)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b6954fb..0cf14f3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -313,6 +313,10 @@ ELSE()
ENDIF ()
ENDIF()
+IF(CMAKE_CXX_COMPILER_WRAPPER STREQUAL "CrayPrgEnv")
+ SET(EMBREE_ISA_SSE42 OFF)
+ENDIF()
+
##############################################################
# ISA configuration continued
##############################################################
diff --git a/common/cmake/crayprgenv.cmake b/common/cmake/crayprgenv.cmake
index c466330..11cc275 100644
--- a/common/cmake/crayprgenv.cmake
+++ b/common/cmake/crayprgenv.cmake
@@ -20,7 +20,5 @@ SET(FLAGS_AVX2 "-target-cpu=haswell")
SET(FLAGS_AVX512KNL "-target-cpu=mic-knl")
SET(FLAGS_AVX512SKX "-target-cpu=x86-skylake")
-SET_PROPERTY(CACHE EMBREE_ISA_SSE42 PROPERTY VALUE OFF)
-
STRING(TOLOWER "${CMAKE_CXX_COMPILER_ID}" _lower_compiler_id)
INCLUDE("${CMAKE_CURRENT_LIST_DIR}/${_lower_compiler_id}.cmake" OPTIONAL)
diff --git a/mkl-dnn/cmake/OpenMP.cmake b/mkl-dnn/cmake/OpenMP.cmake
index dc0c3db..8609d58 100644
--- a/mkl-dnn/cmake/OpenMP.cmake
+++ b/mkl-dnn/cmake/OpenMP.cmake
@@ -17,6 +17,8 @@
# Manage OpenMP-related compiler flags
#===============================================================================
+include(CheckCXXCompilerFlag)
+
if(OpenMP_cmake_included)
return()
endif()
@@ -38,8 +40,11 @@ if (NOT MKLDNN_THREADING MATCHES "OMP")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -qopenmp-simd")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -qopenmp-simd")
else()
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp-simd")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp-simd")
+ check_cxx_compiler_flag("-fopenmp-simd" openmp_simd_avail)
+ if (openmp_simd_avail)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp-simd")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp-simd")
+ endif()
endif()
return()
endif()
diff -pur src/components/ospcommon/common.cpp src2/components/ospcommon/common.cpp
--- src/components/ospcommon/common.cpp 2019-07-30 09:29:49.000000000 -0400
+++ src2/components/ospcommon/common.cpp 2019-07-30 09:30:25.000000000 -0400
@@ -75,6 +75,14 @@ namespace ospcommon {
{
return LibraryRepository::getInstance()->getSymbol(name);
}
+ std::string getSymbolsLibrary(const std::string& name)
+ {
+ return LibraryRepository::getInstance()->getSymbolsLibrary(name);
+ }
+ void *getLibrary(const std::string& name)
+ {
+ return LibraryRepository::getInstance()->getLibrary(name);
+ }
} // ::ospcommon
diff -pur src/components/ospcommon/common.h src2/components/ospcommon/common.h
--- src/components/ospcommon/common.h 2019-07-30 09:29:49.000000000 -0400
+++ src2/components/ospcommon/common.h 2019-07-30 09:30:25.000000000 -0400
@@ -89,6 +89,8 @@ namespace ospcommon {
OSPCOMMON_INTERFACE void loadLibrary(const std::string &name);
OSPCOMMON_INTERFACE void loadDefaultLibrary();
OSPCOMMON_INTERFACE void *getSymbol(const std::string &name);
+ OSPCOMMON_INTERFACE std::string getSymbolsLibrary(const std::string &name);
+ OSPCOMMON_INTERFACE void *getLibrary(const std::string &name);
#ifdef _WIN32
# define osp_snprintf sprintf_s
diff -pur src/components/ospcommon/library.cpp src2/components/ospcommon/library.cpp
--- src/components/ospcommon/library.cpp 2019-07-30 09:29:49.000000000 -0400
+++ src2/components/ospcommon/library.cpp 2019-07-30 09:30:25.000000000 -0400
@@ -316,6 +316,7 @@ namespace ospcommon {
{
for (auto &l : repo)
delete l.second;
+ repo.clear();
}
void LibraryRepository::add(const std::string &name)
@@ -334,6 +335,20 @@ namespace ospcommon {
return sym;
}
+ std::string LibraryRepository::getSymbolsLibrary(const std::string &name) const
+ {
+ void *sym = nullptr;
+ std::string rlib = "";
+ for (auto lib = repo.cbegin(); sym == nullptr && lib != repo.end(); ++lib)
+ {
+ sym = lib->second->getSymbol(name);
+ rlib = lib->first;
+ }
+
+ if (sym)
+ return rlib;
+ return "";
+ }
void LibraryRepository::addDefaultLibrary()
{
@@ -361,6 +376,13 @@ namespace ospcommon {
repo["ospray"] = new Library(RTLD_DEFAULT);
#endif
}
+ void* LibraryRepository::getLibrary(const std::string &name) const
+ {
+ auto lib = repo.find(name);
+ if (lib != repo.end())
+ return lib->second;
+ return nullptr;
+ }
bool LibraryRepository::libraryExists(const std::string &name) const
{
diff -pur src/components/ospcommon/library.h src2/components/ospcommon/library.h
--- src/components/ospcommon/library.h 2019-07-30 09:29:49.000000000 -0400
+++ src2/components/ospcommon/library.h 2019-07-30 09:30:25.000000000 -0400
@@ -14,6 +14,8 @@
// limitations under the License. //
// ======================================================================== //
+#pragma once
+
#include "common.h"
// std
#include <map>
@@ -54,10 +56,14 @@ namespace ospcommon {
/* returns address of a symbol from any library in the repo */
void* getSymbol(const std::string& sym) const;
+ /* returns name of a library in the repo that holds a symbol */
+ std::string getSymbolsLibrary(const std::string& sym) const;
+
/* add the default library to the repo */
void addDefaultLibrary();
bool libraryExists(const std::string &name) const;
+ void* getLibrary(const std::string &name) const;
private:
static std::unique_ptr<LibraryRepository> instance;
diff -pur src/ospray/api/objectFactory.h src2/ospray/api/objectFactory.h
--- src/ospray/api/objectFactory.h 2019-07-30 09:29:49.000000000 -0400
+++ src2/ospray/api/objectFactory.h 2019-07-30 09:30:25.000000000 -0400
@@ -17,6 +17,7 @@
#pragma once
#include "../common/OSPCommon.h"
+#include "ospcommon/library.h"
#include <map>
@@ -31,10 +32,15 @@ namespace ospray {
// Function pointers corresponding to each subtype.
static std::map<std::string, creationFunctionPointer> symbolRegistry;
+ static std::map<std::string, std::string> symbolsLibRegistry;
+ static std::map<std::string, void* > libRegistry;
const auto type_string = stringForType(OSP_TYPE);
+ const auto symsLib = symbolsLibRegistry[type];
// Find the creation function for the subtype if not already known.
- if (symbolRegistry.count(type) == 0) {
+ if (symbolRegistry.count(type) == 0 ||
+ libRegistry[symsLib] != getLibrary(symsLib)) {
+
postStatusMsg(2) << "#ospray: trying to look up "
<< type_string << " type '" << type
<< "' for the first time";
@@ -46,6 +52,10 @@ namespace ospray {
// Look for the named function.
symbolRegistry[type] =
(creationFunctionPointer)getSymbol(creationFunctionName);
+ symbolsLibRegistry[type] =
+ getSymbolsLibrary(creationFunctionName);
+ libRegistry[symbolsLibRegistry[type]] =
+ getLibrary(symbolsLibRegistry[type]);
// The named function may not be found if the requested subtype is not
// known.
diff --git a/ospray/fb/LocalFB.ispc b/ospray/fb/LocalFB.ispc
index 913d16e..db130bb 100644
--- a/ospray/fb/LocalFB.ispc
+++ b/ospray/fb/LocalFB.ispc
@@ -164,12 +164,15 @@ export uniform float LocalFrameBuffer_accumulateTile(void *uniform _fb,
export void LocalFrameBuffer_accumulateAuxTile(void *uniform _fb
, const uniform Tile &tile
, uniform vec3f *uniform aux
- , const varying float * uniform ax
- , const varying float * uniform ay
- , const varying float * uniform az
+ , const void * uniform _ax
+ , const void * uniform _ay
+ , const void * uniform _az
)
{
uniform LocalFB *uniform fb = (uniform LocalFB *uniform)_fb;
+ const varying float * uniform ax = (const varying float * uniform) _ax;
+ const varying float * uniform ay = (const varying float * uniform) _ay;
+ const varying float * uniform az = (const varying float * uniform) _az;
const uniform float accumID = tile.accumID;
const uniform float accScale = rcpf(tile.accumID + 1);
superbuild_add_project(rkcommon
DEPENDS cxx11 tbb
CMAKE_ARGS
-DBUILD_TESTING:BOOL=OFF
-DCMAKE_INSTALL_LIBDIR:STRING=lib
-DCMAKE_INSTALL_NAME_DIR:PATH=<INSTALL_DIR>/lib
-DINSTALL_DEPS:BOOL=OFF
)
......@@ -149,7 +149,11 @@ endif ()
if (ospray_enabled)
set(osprayextra_libraries
ospray_module_ispc)
openvkl_module_ispc_driver
ospray_module_denoiser
ospray_module_ispc
ospray_module_mpi
rkcommon)
foreach (osprayextra_library IN LISTS osprayextra_libraries)
file(GLOB lib_filenames
......
......@@ -109,7 +109,11 @@ endif ()
if (ospray_enabled)
set(osprayextra_libraries
ospray_module_ispc)
openvkl_module_ispc_driver
ospray_module_denoiser
ospray_module_ispc
ospray_module_mpi
rkcommon)
foreach (osprayextra_library IN LISTS osprayextra_libraries)
superbuild_windows_install_plugin("${osprayextra_library}.dll"
......
......@@ -67,43 +67,51 @@ superbuild_set_revision(socat
URL "https://www.paraview.org/files/dependencies/socat-1.7.3.1.tar.bz2"
URL_MD5 334e46924f2b386299c9db2ac22bcd36)
set(ispc_version "1.9.2")
if (WIN32)
if (MSVC12)
# for VS2013, we use older version of ISPC
set(ispc_version "1.9.1")
set(ispc_file "https://www.paraview.org/files/dependencies/ispc-v${ispc_version}-windows-vs2013.zip")
set(ispc_md5 "ae836b2cb4b7610e92a84fb1feaef72f")
else ()
set(ispc_file "https://www.paraview.org/files/dependencies/ispc-v${ispc_version}-windows.zip")
set(ispc_md5 "3bcfab1e48b64be2cd160e14eaa2f9ab")
endif()
set(ispc_suffix "-windows.zip")
set(ispc_md5 ec76fdd4a31dbfa90ffd70768bd21384)
elseif (APPLE)
set(ispc_file "https://www.paraview.org/files/dependencies/ispc-v${ispc_version}-osx.tar.gz")
set(ispc_md5 "387cce62a6c63def5e6eb1c0a468a3db")
else ()
set(ispc_file "https://www.paraview.org/files/dependencies/ispc-v${ispc_version}-linux.tar.gz")
set(ispc_md5 "0178a33a065ae65d0be00be23871cf9f")
endif ()
set(ispc_suffix "-macOS.tar.gz")
set(ispc_md5 d56d35cff940c89efe16297b236bca91)
else()
set(ispc_suffix "-linux.tar.gz")
set(ispc_md5 7f0150e33a8f64a1942134b77f3c5046)
endif()
superbuild_set_revision(ispc
URL "${ispc_file}"
URL "https://www.paraview.org/files/dependencies/ispc-v1.12.0${ispc_suffix}"
URL_MD5 "${ispc_md5}")
superbuild_set_revision(embree
URL "https://www.paraview.org/files/dependencies/embree-3.2.0.tar.gz"
URL_MD5 f414fefe6167ba58102fd0eb06c9ee5b)
URL "https://www.paraview.org/files/dependencies/embree-v3.9.0.tar.gz"
URL_MD5 a5c220ca9033ff4856895de7e1a6deaa)
superbuild_set_revision(ospcommon
URL "https://www.paraview.org/files/dependencies/ospcommon-v1.3.0.tar.gz"
URL_MD5 47fdc436c2f393a53ee467611dd796ae)
superbuild_set_revision(openvkl
URL "https://www.paraview.org/files/dependencies/openvkl-v0.10.0.tar.gz"
URL_MD5 ac8541bf6d7a067c91dd8b1c76a83fb3)
superbuild_set_revision(ospray
URL "https://www.paraview.org/files/dependencies/ospray-1.8.4.tar.gz"
URL_MD5 359a56552d981d057bfbd3e97f4fc0b7)
URL "https://www.paraview.org/files/dependencies/ospray-v2.2.0.tar.gz"
URL_MD5 a514fd8238c1a00b9a2394912a726417)
superbuild_set_revision(ospraymodulempi
URL "https://www.paraview.org/files/dependencies/ospraymodulempi-v2.2.0.tar.gz"
URL_MD5 0d15ba06888e7dce29237b539a921fae)
superbuild_set_revision(ospraymaterials
URL "https://www.paraview.org/files/data/OSPRayMaterials-0.2.tar.gz"
URL_MD5 3b2716318ec8bf719373f25737b0bddc)
superbuild_set_revision(openimagedenoise
URL "https://www.paraview.org/files/dependencies/oidn-0.8.1.src.tar.gz"
URL_MD5 4951edc5422682b639595c9fc8dbadcc)
URL "https://www.paraview.org/files/dependencies/oidn-v1.2.2.tar.gz"
URL_MD5 87db47c8c0ea93db97112888b04bb941)
superbuild_set_revision(rkcommon
URL "https://www.paraview.org/files/dependencies/rkcommon-v1.4.2.tar.gz"
URL_MD5 e98bf98786739cfec82e661554d24f0f)
superbuild_set_revision(openvr
URL "https://www.paraview.org/files/dependencies/openvr_1.0.10_win_thin.zip"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment