[Paraview] Paraview v5.0.0-RC1 with OpenGL2 backend not running using OSMESA v10.5.5

Albina, Frank frank.albina at sauber-motorsport.com
Thu Dec 10 10:03:02 EST 2015


Dear Aashish & Ken!

Thank you very much for your swift replies.

I had read from the Kitware blog that OpenSWR would bring additional performance but is still in “alpha” stage, therefore I have been concentrating on “standard” MESA first.

I was missing the bit of information requiring to set the MESA_GL_VERSION_OVERRIDE. I will therefore arrange to compile a newer MESA version and re-compile PV-5.0.0-rc1 and will let you know the outcome.

If everything runs smoothly, I should be able to give you feedback on what the results of my test benchmarks are.

Cheers,

Fran,.
From: Aashish Chaudhary [mailto:aashish.chaudhary at kitware.com]
Sent: Donnerstag, 10. Dezember 2015 15:55
To: Ken Martin
Cc: Albina, Frank; paraview at paraview.org
Subject: Re: [Paraview] Paraview v5.0.0-RC1 with OpenGL2 backend not running using OSMESA v10.5.5

Hi Frank,

In addition to what Ken said, If you switch to 10.6.5 make sure you have set in your build and runtime. export MESA_GL_VERSION_OVERRIDE=3.2.

- Aashish

On Thu, Dec 10, 2015 at 9:18 AM, Ken Martin <ken.martin at kitware.com<mailto:ken.martin at kitware.com>> wrote:
Thanks Frank,

This is an area we are actively working to cleanup right now. Both in catching it more gracefully and in providing better messages to help people understand what the next step should be. I believe if you are in an Intel based system that using their new SWR backend for mesa ( http://openswr.org/ ) might give the best software rendering performance. I think it requires a more recent version of Mesa, we suggest Mesa 10.6.5 or later for VTK. Other people on this list are more familiar with the specifics of setting up SWR and Mesa on a cluster but I wanted to at least give you a quick response to let you know we are working on it :-)

Thanks
Ken





On Thu, Dec 10, 2015 at 8:47 AM, Albina, Frank <frank.albina at sauber-motorsport.com<mailto:frank.albina at sauber-motorsport.com>> wrote:
Hi all!

First of all, thanks for all the effort spent on porting the rendering engine to support the OpenGL2 backend by default on PV 5.0.0. Early tests with the binary from the download page shows a massive improvement over the PV 4.1 to 4.3 versions in terms of rendering time. I have repeated the test over a few different GPUs and got the same results.

Which brought me to thinking that similar performance improvements could be also achieved when performing software rendering with the MESA libraries. I downloaded the PV sources for the 5.0.0-RC1 release yesterday and compiled it with MESA and MPI support. MPI version is Intel 5.0.1 and MESA version is 10.5.5. The MESA libraries are compiled using:

./configure --enable-64-bit --enable-texture-float --enable-osmesa --disable-egl --disable-xorg --disable-xvmc --disable-opencl --disable-glx --disable-dri --disable-va --disable-shared-glapi --enable-gallium-llvm=no --with-gnu-ld --with-osmesa-bits=8 --disable-vdpau --enable-dependency-tracking --with-gallium-drivers=”” --with-dri-drivers=”” --with-egl-platforms=””

Which corresponds to a “classic” compilation without LLVM support. Believe it or not, this was found to run faster on our CPU cluster than with the LLVM drivers.

After linking PV 5.0.0 against the MESA libs with the OpenGL2 backend, I started running a simple benchmark to check possible performance benefits and here is the error output I got:

GL_Version: 2.1 Mesa 10.5.5
Warning: In /panfs/srvpan01/code/repo/build/paraview-5.0.0-rc1/src/VTK/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx, line 549
vtkOSOpenGLRenderWindow (0x3c0eef60): VTK is designed to work with OpenGL version 3.2 but it appears it has been given a context that does not support 3.2. VTK will run in a compatibility mode designed to work with OpenGL 2.1 but some features may not work.

ERROR: In /panfs/srvpan01/code/repo/build/paraview-5.0.0-rc1/src/VTK/Rendering/OpenGL2/vtkShaderProgram.cxx, line 369
vtkShaderProgram (0x4d4dbfe0): 1: #version 120
2: #extension GL_EXT_gpu_shader4 : require
3: #define highp
4: #define mediump
5: #define lowp
6:
7: /*=========================================================================
8:
9:   Program:   Visualization Toolkit
10:   Module:    vtkPolyDataFS.glsl
11:
12:   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
13:   All rights reserved.
14:   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
15:
16:      This software is distributed WITHOUT ANY WARRANTY; without even
17:      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
18:      PURPOSE.  See the above copyright notice for more information.
19:
20: =========================================================================*/
21: // Template for the polydata mappers fragment shader
22:
23: uniform int PrimitiveIDOffset;
24:
25: // VC position of this fragment
26: varying vec4 vertexVCVSOutput;
27:
28: // optional color passed in from the vertex shader, vertexColor
29: uniform bool OverridesColor;
30: uniform float opacityUniform; // the fragment opacity
31: uniform vec3 ambientColorUniform; // intensity weighted color
32: uniform vec3 diffuseColorUniform; // intensity weighted color
33: uniform vec3 specularColorUniform; // intensity weighted color
34: uniform float specularPowerUniform;
35:
36:
37: // optional surface normal declaration
38: uniform int cameraParallel;
39:
40: // extra lighting parameters
41: uniform int numberOfLights;
42: uniform vec3 lightColor[6];
43: uniform vec3 lightDirectionVC[6]; // normalized
44: uniform vec3 lightHalfAngleVC[6]; // normalized
45:
46: // Texture coordinates
47: varying vec2 tcoordVCVSOutput; uniform sampler2D texture1;
48:
49: // picking support
50: //VTK::Picking::Dec
51:
52: // Depth Peeling Support
53: //VTK::DepthPeeling::Dec
54:
55: // clipping plane vars
56: //VTK::Clip::Dec
57:
58: // the output of this shader
59: //VTK::Output::Dec
60:
61: // Apple Bug
62: //VTK::PrimID::Dec
63:
64: void main()
65: {
66:   // Apple Bug
67:   //VTK::PrimID::Impl
68:
69:   //VTK::Clip::Impl
70:
71:   vec3 ambientColor;
72:   vec3 diffuseColor;
73:   float opacity;
74:   vec3 specularColor;
75:   float specularPower;
76:   ambientColor = ambientColorUniform;
77:   diffuseColor = diffuseColorUniform;
78:   opacity = opacityUniform;
79:   specularColor = specularColorUniform;
80:   specularPower = specularPowerUniform;
81:   vec4 texColor = texture2D(texture1, tcoordVCVSOutput.st);
82:   diffuseColor = texColor.rgb;
83:   opacity = opacity*texColor.a;
84:   if (OverridesColor) {
85:     ambientColor = ambientColorUniform;
86:     diffuseColor = diffuseColorUniform; }
87:
88:
89:   // VC position of this fragment
90:   vec4 vertexVC = vertexVCVSOutput;
91:
92:   // Generate the normal if we are not passed in one
93:   vec3 fdx = normalize(vec3(dFdx(vertexVC.x),dFdx(vertexVC.y),dFdx(vertexVC.z)));
94:   vec3 fdy = normalize(vec3(dFdy(vertexVC.x),dFdy(vertexVC.y),dFdy(vertexVC.z)));
95:   vec3 normalVCVSOutput = normalize(cross(fdx,fdy));
96:   if (cameraParallel == 1 && normalVCVSOutput.z < 0.0) { normalVCVSOutput = -1.0*normalVCVSOutput; }
97:   if (cameraParallel == 0 && dot(normalVCVSOutput,vertexVC.xyz) > 0.0) { normalVCVSOutput = -1.0*normalVCVSOutput; }
98:
99:   vec3 diffuse = vec3(0,0,0);
100:   vec3 specular = vec3(0,0,0);
101:   for (int lightNum = 0; lightNum < numberOfLights; lightNum++)
102:     {
103:     float df = max(0.0, dot(normalVCVSOutput, -lightDirectionVC[lightNum]));
104:     diffuse += ((df) * lightColor[lightNum]);
105:     if (dot(normalVCVSOutput, lightDirectionVC[lightNum]) < 0.0)
106:       {
107:       float sf = pow( max(0.0, dot(lightHalfAngleVC[lightNum],normalVCVSOutput)), specularPower);
108:       specular += ((sf) * lightColor[lightNum]);
109:       }
110:     }
111:   diffuse = diffuse * diffuseColor;
112:   specular = specular * specularColor;
113:   gl_FragData[0] = vec4(ambientColor + diffuse + specular, opacity);  //VTK::Light::Impl
114:
115:   //VTK::TCoord::Impl
116:
117:   if (gl_FragData[0].a <= 0.0)
118:     {
119:     discard;
120:     }
121:
122:   //VTK::DepthPeeling::Impl
123:
124:   //VTK::Picking::Impl
125:
126: }
127:


ERROR: In /panfs/srvpan01/code/repo/build/paraview-5.0.0-rc1/src/VTK/Rendering/OpenGL2/vtkShaderProgram.cxx, line 370
vtkShaderProgram (0x4d4dbfe0): 0:2(12): error: extension `GL_EXT_gpu_shader4' unsupported in fragment shader


APPLICATION TERMINATED WITH THE EXIT STRING: Segmentation fault (signal 11)

Was it to be expected? If so, is there any chance at all to run PV 5.0.0 in batch with MESA support on a CPU cluster? If so, which MESA version is required/recommended and what are the compile options to pass?

Thank you very much in advance for any answer.


Frank Albina


_______________________________________________
Powered by www.kitware.com<http://www.kitware.com>

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview



--
Ken Martin PhD
Chairman & CFO
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065
518 371 3971<tel:518%20371%203971>

This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee.  Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message.  Thank you.

_______________________________________________
Powered by www.kitware.com<http://www.kitware.com>

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview



--
| Aashish Chaudhary
| Technical Leader
| Kitware Inc.
| http://www.kitware.com/company/team/chaudhary.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20151210/4324a6b7/attachment-0001.html>


More information about the ParaView mailing list