Building 5.6.0-RC1 on cray

Paraview version: git tag v4.6.0-RC1
Superbuild version: HEAD (7e825d06d403456fbf0a0debcfe06add0b274361)

First of all, the common/cmake/crayprgenv.cmake that comes with embree has a change (made by Chuck), that disables ISA_SSE42 support. That’s fine, because that doesn’t seem to build on Cray anyway. The problem is, that cache variable doesn’t exist when the superbuild tries to build embree, which causes cmake to fail.
My simple fix is to define the cache variable right before that line, but I’m sure there’s a better place for it.

Once I’m past that little annoyance, there’s another problem. Ospray apparently requires an embree ISA >= 4.1, which we’re explicitly not building.

CMake Error at cmake/ospray_macros.cmake:115 (message):
  Your Embree build needs to support at least one ISA >= SSE4.1!

To fix that, I changed the embree_BUILD_ISA from “DEFAULT” to “ALL”, and fixed the bug on line 12 of the same file that the change exposed.

Diff for the superbuild:

diff --git a/projects/embree.cmake b/projects/embree.cmake
index c25935a..ef5408f 100644
--- a/projects/embree.cmake
+++ b/projects/embree.cmake
@@ -1,4 +1,4 @@
-set(embree_BUILD_ISA "DEFAULT" CACHE STRING "ISAs to build Embree for")
+set(embree_BUILD_ISA "ALL" CACHE STRING "ISAs to build Embree for")
 mark_as_advanced(embree_BUILD_ISA)
 set(embree_isa_args)
 set(embree_allow_skx "-DEMBREE_ISA_AVX512SKX:BOOL=OFF") #default off due to flaky trycompile
@@ -9,7 +9,7 @@ if(NOT (embree_BUILD_ISA STREQUAL "DEFAULT"))
   list(APPEND embree_isa_args -DEMBREE_MAX_ISA:BOOL=NONE)
   foreach(isa IN LISTS embree_BUILD_ISA)
     list(APPEND embree_isa_args -DEMBREE_ISA_${isa}:BOOL=ON)
-    if (MATCHES isa "AVX512SKX")
+    if (isa MATCHES "AVX512SKX")
       set(embree_allow_skx)
     endif()
   endforeach()

Playing with it a little more, the embree crayprgenv.cmake problem doesn’t occur when embree_BUILD_ISA is set to ALL. I’ve put in an issue on the embree repo about this.

Thanks Paul.

https://gitlab.kitware.com/paraview/paraview-superbuild/merge_requests/494

Using Paul’s build scripts here.

I’m building SuperBuild master with paraview_source_selection=source on a toss3. The paraview source used is the current release branch. With embree_BUILD_ISA=“DEFAULT” I am getting these errors:

[ 21%] Built target embree_sse42
objdump: curve_intersector_virtual.cpp.sse42.cpp.o: File format not recognized
[ 57%] Built target embree_sse42_check_globals
[ 78%] Built target embree_avx2
[ 80%] Built target embree_avx
objdump: curve_intersector_virtual.cpp.avx.cpp.o: File format not recognized
[ 80%] Linking CXX shared library ../libembree3.so
icpc: command line warning #10121: overriding '-static-intel' with '-shared-intel'
[ 80%] Built target embree_avx2_check_globals
[ 80%] Built target embree_avx_check_globals
CMakeFiles/embree.dir/bvh/bvh4_factory.cpp.o: In function `embree::BVH4Factory::selectIntersectors(int)':
bvh4_factory.cpp:(.text+0x29e6): undefined reference to `embree::avx::VirtualCurveIntersector4i()'
bvh4_factory.cpp:(.text+0x29ed): undefined reference to `embree::avx::VirtualCurveIntersector8i()'
bvh4_factory.cpp:(.text+0x29fb): undefined reference to `embree::avx::VirtualCurveIntersector4v()'
bvh4_factory.cpp:(.text+0x2a0c): undefined reference to `embree::avx::VirtualCurveIntersector8v()'
bvh4_factory.cpp:(.text+0x2a19): undefined reference to `embree::avx::VirtualCurveIntersector4iMB()'
bvh4_factory.cpp:(.text+0x2a26): undefined reference to `embree::avx::VirtualCurveIntersector8iMB()'
CMakeFiles/embree.dir/bvh/bvh8_factory.cpp.o: In function `embree::BVH8Factory::selectIntersectors(int)':
bvh8_factory.cpp:(.text+0x21af): undefined reference to `embree::avx::VirtualCurveIntersector8v()'
gmake[5]: *** [libembree3.so.3.2.0] Error 1
gmake[4]: *** [kernels/CMakeFiles/embree.dir/all] Error 2
gmake[3]: *** [all] Error 2
CMake Error at /usr/projects/paraview/stam/fog/build/release-osmesa_intel-17.0.4_openmpi-2.1.2_python-2.7-anaconda-4.1.1/superbuild/sb-embree-build.cmake:47 (message):
Failed with exit code 2

make[2]: *** [superbuild/embree/stamp/embree-build] Error 1
make[1]: *** [superbuild/CMakeFiles/embree.dir/all] Error 2
make: *** [all] Error 2

If I set embree_BUILD_ISA=“ALL” as suggested here it works. I am using superbuild master, and the latest commit is 33a39e6fffda0f9ac65d665541429d09dd780cd9

Is this the same issue as Paul’s?

Thanks

Make sure any changes like this you make in the cmake file are tied to this version of paraview, so that this will continue to work consistently for older versions as well.