Yade simulation python script wont start using xrdp (remote access)

Asked by Alexander Eulitz [Eugen]

Hi,
i got kind of a strange problem here. After the installation of a new server which I control remotely from my windows desktop I wanted to run a yade simulation that was already done with my ubuntu desktop computer.
It is the simple bouncing sphere example from the tutorial.
After starting it via
# yade-daily bouncing.py
I get the following console output (is there a [code][/code] tag in this mailinglist?)

Welcome to Yade 3+3382+42~precise1
Xlib.xauth: warning, no xauthority details available
TCP python prompt on localhost:9000, auth cookie `dyusca'
XMLRPC info provider on http://localhost:21000
Xlib: extension "XInputExtension" missing on display ":10.0".
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id: 0x0
Running script test.py

Furthermore I see the control panel of Yade (the one with play button)
But i dont see the scene.

I tried using the generator from the control panel. If i choose one scenario from it and generate it, a new scene opens (without errors) and i can even start this simulation normally.

Does anyone have an idea what's the reason for it?

At first I thought it's an issue of the remote access. but why does the generator then work?#

Please help, Eugen

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Alexander Eulitz [Eugen]
Solved:
Last query:
Last reply:

This question was reopened

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#1

I guess you don't have support for GL display through your remote access (or, simply, there is no openGL on the server).
Trying running with "yade -n script.py" (see "yade -h" for the launch options).

Revision history for this message
Alexander Eulitz [Eugen] (kubeu) said :
#2

thanks, that will help a lot. openGL is installed on the server, because you can use yade with graphics if you directly operate it without remote access.
I hope, that it will be possible to use vtkrecorder during simulation. this way i should be able to look at particle movement after finishing simulation and transferring the data via network to my desktop computer, on which paraview would be installed.

Revision history for this message
Alexander Eulitz [Eugen] (kubeu) said :
#3

hmm, I tried using the vtkrecorder. but it doesnt work as expected.
As a tets I used the 3D Postprocessing example. But because i have to use the "-n" mode - i cant use the qt-parts of the tutorial. At least I think so.
If possible I would love to create a video from simulation but if I get the example right, for recording a mpeg video, i need to explicitly open qt.view() but this of course end up in error messages because there is no display environment variable.

I ended up using this code:

# demonstrate 3d postprocessing with yade
#
# 1. qt.SnapshotEngine saves images of the 3d view as it appears on the screen periodically
# utils.makeVideo is then used to make real movie from those images
# 2. VTKRecorder saves data in files which can be opened with Paraview
# see the User's manual for an intro to Paraview

# generate loose packing
from yade import pack
sp=pack.SpherePack()
sp.makeCloud((0,0,0),(2,2,2),rMean=.1,rRelFuzz=.6,periodic=True)
# add to scene, make it periodic
sp.toSimulation()

O.engines=[
   ForceResetter(),
   InsertionSortCollider([Bo1_Sphere_Aabb()]),
   InteractionLoop(
      [Ig2_Sphere_Sphere_L3Geom()],
      [Ip2_FrictMat_FrictMat_FrictPhys()],
      [Law2_L3Geom_FrictPhys_ElPerfPl()]
   ),
   NewtonIntegrator(damping=.4),
   # save data for Paraview
   VTKRecorder(fileName='3d-vtk-',recorders=['all'],iterPeriod=1),
]
O.dt=.5*utils.PWaveTimeStep()

# prescribe constant-strain deformation of the cell
O.cell.velGrad=Matrix3(-.1,0,0, 0,-.1,0, 0,0,-.1)

executing it via
# yade-daily -n -j2 3DPostprocessing.py
nothing happens. I expected some files being produced but nohting happens.

Could you please help me?

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#4

There is no "run()" in the script, it could explain why you get nothing.

Revision history for this message
Alexander Eulitz [Eugen] (kubeu) said :
#5

you're absolutely right, thank you.
I just added the following line of code to the .py script

# start simulation without using qt.controller()
O.run()

Revision history for this message
Alexander Eulitz [Eugen] (kubeu) said :
#6

Hi there,
just want to add a detail. I encountered the same problem again some time ago. "Xlib.xauth: warning, no xauthority details available"
This error message is caused by a missing xauthority file on your computer system and results in yade that will be run without graphics (-n option)
It is sufficient to touch this file
so typing in terminal
    touch ~/.Xauthority
will solve the problem and you can use yade in graphics mode.

I think that this problem is really rare but maybe someone else can be helped with that.
My operating system is Ubuntu 14.04 LTS 64bit.