简体   繁体   中英

Offline rendering of animation on server with Paraview/Python script fails

I'm running this Python script on my (Debian) server to write out an animation from vtk data:

import paraview.simple as pv
pv.servermanager.LoadState('plot.pvsm')
pv.SetActiveView(pv.GetRenderView())
pv.WriteAnimation('images/bj.png', Quality=2)

It is supposed to create this animation while I'm not logged on the server. For that I use screen and run the script with:

pvbatch --use-offscreen-rendering plot3d.py &

It does its job well by writing the image files. However, when I detach from the screen session and log out the script stops completely.

In my understanding the option --use-offscreen-rendering should make sure that no rendering on my screen happens. This works on my client machine where I can run the same script and kill the terminal and the script continues.

Maybe relevant: For every image I get the error message:

libGL error: failed to authenticate magic 1
libGL error: failed to load driver: i965

where the number after "magic" increases with each image.

My system:

  • Debian Linux 3.16.7-ckt11-1 (2015-05-24), kernel 3.16.0-4-amd64
  • Paraview 4.1.0
  • Python 2.7.9
  • Screen 4.02.01

You still need access to X server even though you're using --use-offscreen-screen flag. If you want truly offscreen, you should rebuild your ParaView with OSMesa support as described here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM