[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Condor-users] condor_submit problems: _gtk.init_check(), RuntimeError: could not open display



On Wednesday, 16 November, 2011 at 11:40 AM, Christopher Prokop wrote:
Hi,

I am encountering a strange error when using condor_submit. Executing a script on my own works fine without errors, but when I try to run it using condor_submit, I get the following errors when trying to import from pylab or pylot from matplotlib:

File "../Local_Install//lib/python2.4/site-packages/matplotlib/pyplot.py",
line 95, in ?
File "../Local_Install//lib/python2.4/site-packages/matplotlib/backends/__init__.py",
line 25, in pylab_setup
File "../Local_Install//lib/python2.4/site-packages/matplotlib/backends/backend_gtkagg.py",
line 10, in ?
File "../Local_Install//lib/python2.4/site-packages/matplotlib/backends/backend_gtk.py",
line 8, in ?
File "/usr/lib/python2.4/site-packages/gtk-2.0/gtk/__init__.py", line 76, in ?
_init()
File "/usr/lib/python2.4/site-packages/gtk-2.0/gtk/__init__.py",
line 64, in _init
_gtk.init_check()
RuntimeError: could not open display
Your script is expecting to be able to connect to an active display. In this case it looks like it's looking for an X display session. Some tools require this even if you're not running anything graphical. Apparently matplotlib is one of those libraries.

You'll either need to figure out how to stop matplotlib from looking for an active display. Preventing it from loading the GTK library is probably your best way to solve this.

Or you'll need to push an DISPLAY environment variable in to the environment of the job on the remote machine. It'll need to point to a valid (and open, permission-wise) X display session. Consider using the display on your submitting desktop machine if it's running list. You can open permissions on your current display with:

xhost +

And then get the DISPLAY settings with:

echo $DISPLAY

Copy that string in to your submission file as an env setting:

environment = "DISPLAY = <stuff you got from that echo command>"

Regards,
- Ian

---
Ian Chesal

Cycle Computing, LLC
Leader in Open Compute Solutions for Clouds, Servers, and Desktops
Enterprise Condor Support and Management Tools

http://www.cyclecomputing.com
http://www.cyclecloud.com
http://twitter.com/cyclecomputing

 


This makes me think that there I am missing something in passing a permission to condor, but I have been unable to figure out what it is. I'm not even plotting or displaying any images. Are there any lines I need to add to my .cmd file?

Thanks,
Chris Prokop
_______________________________________________
Condor-users mailing list
To unsubscribe, send a message to condor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/condor-users

The archives can be found at:
https://lists.cs.wisc.edu/archive/condor-users/