<div dir="ltr">Also, be wary of environment variables in the cron job which are not the same (think empty) as when you log into an interactive session.<div><br><div>If the machine happens to be setup to have X and you are OK with onscreen rendering for the job (many nighty dashboards work this way for instance) it is entirely possible that the process has no DISPLAY environment variable and that you have to manually set it to :0 or something like that.<br></div></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature">David E DeMarle<br>Kitware, Inc.<br>R&D Engineer<br>21 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-881-4909</div></div>
<br><div class="gmail_quote">On Mon, May 2, 2016 at 5:21 PM, Moreland, Kenneth <span dir="ltr"><<a href="mailto:kmorel@sandia.gov" target="_blank">kmorel@sandia.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="white" lang="EN-US" link="#0563C1" vlink="#954F72">
<div>
<p class="MsoNormal">That is basically the difference. To use any implementation of OpenGL (which is what Mesa3D is), you first need an OpenGL context. On *nix you typically get this by opening a window with the Xhost. Even when doing offscreen rendering you
need to get a context with the Xhost (because classically this was the interface to the graphics hardware).<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Osmesa is a small library that sits on top of Mesa3D. It creates an OpenGL context without having to go to an Xhost. It has a different interface than GLX, so your software needs to specifically open an osmesa “window” in addition to linking
to the correct library.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">As I recall, in order to use osmesa, you need to set VTK_OPENGL_HAS_OSMESA to ON and then set OSMESA_INCLUDE_DIR and OSMESA_LIBRARY. Typically the osmesa headers and libraries are in the same location as the Mesa 3D install.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">See this Wiki page for more info: <a href="http://www.paraview.org/Wiki/ParaView_And_Mesa_3D" target="_blank">
http://www.paraview.org/Wiki/ParaView_And_Mesa_3D</a><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">-Ken<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="color:black">From: </span></b><span style="color:black">Walter Scott <<a href="mailto:wascott@sandia.gov" target="_blank">wascott@sandia.gov</a>><br>
<b>Date: </b>Monday, May 2, 2016 at 3:11 PM<br>
<b>To: </b>Kenneth Moreland <<a href="mailto:kmorel@sandia.gov" target="_blank">kmorel@sandia.gov</a>>, "<a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>" <<a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>><br>
<b>Subject: </b>RE: [Paraview] Cron job and ParaView</span><span style="font-size:12.0pt;color:black"><u></u><u></u></span></p>
</div><div><div class="h5">
<div>
<p class="MsoNormal"><span style="font-family:"Times New Roman""><u></u> <u></u></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="color:#1f497d">OK, taking small steps here, what is OSMesa, and want is Mesa? Utkarsh and I had this discussion, but I never understood the difference.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d">Having just googled the difference, If I understand correctly, OSMesa actually means Off Screen Mesa, and is compiled into Mesa. Otherwise, you get Mesa – software rendering, but into a GLX window?</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d">You are correct – I am not building OSMesa. Thus, my problem?</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d">Alan</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="color:#1f497d"> </span><u></u><u></u></p>
<div>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Moreland, Kenneth <br>
<b>Sent:</b> Monday, May 02, 2016 3:01 PM<br>
<b>To:</b> Scott, W Alan <<a href="mailto:wascott@sandia.gov" target="_blank">wascott@sandia.gov</a>>; <a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a><br>
<b>Subject:</b> Re: [Paraview] Cron job and ParaView<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Are you sure you are building with osmesa? Just using mesa is not sufficient.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">-Ken<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="color:black">From: </span></b><span style="color:black">ParaView <<a href="mailto:paraview-bounces@paraview.org" target="_blank">paraview-bounces@paraview.org</a>> on behalf of Walter Scott <<a href="mailto:wascott@sandia.gov" target="_blank">wascott@sandia.gov</a>><br>
<b>Date: </b>Monday, May 2, 2016 at 2:58 PM<br>
<b>To: </b>"<a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>" <<a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>><br>
<b>Subject: </b>[EXTERNAL] [Paraview] Cron job and ParaView</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Times New Roman""> </span><u></u><u></u></p>
</div>
<div>
<div>
<p class="MsoNormal">I have a user that is trying to run ParaView in a cron job, and keeps getting the following error on PV 4.4.0: 4.4.0/ParaView4/VTK/Rendering/OpenGL/vtkXOpenGLRenderWindow.cxx, line 542 vtkXOpenGLRenderWindow (0x5197850): bad X server connection<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Has anyone tried to do this, and figured out a solution? User has tried running a build I did – which attaches to Mesa – and has –use-offscreen-rendering turned on, and is running pvbatch. Same error.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Any ideas?<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Thanks,<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Alan<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
</div>
</div>
</div>
</div></div></div>
</div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" rel="noreferrer" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" rel="noreferrer" target="_blank">http://markmail.org/search/?q=ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/paraview</a><br>
<br></blockquote></div><br></div>