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.
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. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Mon, May 2, 2016 at 5:21 PM, Moreland, Kenneth <[email protected]> wrote: > 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). > > > > 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. > > > > 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. > > > > See this Wiki page for more info: > http://www.paraview.org/Wiki/ParaView_And_Mesa_3D > > > > -Ken > > > > > > *From: *Walter Scott <[email protected]> > *Date: *Monday, May 2, 2016 at 3:11 PM > *To: *Kenneth Moreland <[email protected]>, "[email protected]" < > [email protected]> > *Subject: *RE: [Paraview] Cron job and ParaView > > > > OK, taking small steps here, what is OSMesa, and want is Mesa? Utkarsh > and I had this discussion, but I never understood the difference. > > > > 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? > > > > You are correct – I am not building OSMesa. Thus, my problem? > > > > Alan > > > > > > > > *From:* Moreland, Kenneth > *Sent:* Monday, May 02, 2016 3:01 PM > *To:* Scott, W Alan <[email protected]>; [email protected] > *Subject:* Re: [Paraview] Cron job and ParaView > > > > Are you sure you are building with osmesa? Just using mesa is not > sufficient. > > > > -Ken > > > > *From: *ParaView <[email protected]> on behalf of Walter > Scott <[email protected]> > *Date: *Monday, May 2, 2016 at 2:58 PM > *To: *"[email protected]" <[email protected]> > *Subject: *[EXTERNAL] [Paraview] Cron job and ParaView > > > > 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 > > > > 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. > > > > Any ideas? > > > > Thanks, > > > > Alan > > > > > > _______________________________________________ > Powered by 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 > >
_______________________________________________ Powered by 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
