Re: Faking X Display for IDL Bridge [message #72427 is a reply to message #72426] |
Mon, 13 September 2010 08:06   |
Haje Korth
Messages: 651 Registered: May 1997
|
Senior Member |
|
|
Jeff,
coding the bridge was not that difficult after googleing a few
examples, some of which were found in this news group.The code I ended
up using is given below.
I am trying to set the display variable but I must be doing this
wrong as it is not working. I am also looking at Xvfb per David
Fannings web site, but I am not smart enough to make it work.
Haje
obridge=objarr(nproc)
for chain=0,nproc-1 do obridge[chain]=obj_new('idl_idlbridge')
for chain=0,nproc-1 do begin
j=i+chain
if (j lt cnt) then begin
fname=files[idx[j]]
obridge[chain]->setvar,'fname',fname
obridge[chain]->execute,'idl_process,fname',/nowait
endif
endfor
for chain=0,nproc-1 do while obridge[chain]->status() ne 0 do
wait,0.0001
obj_destroy,obridge
obridge=objarr(nproc)
for chain=0,nproc-1 do obridge[chain]=obj_new('idl_idlbridge')
On Sep 13, 10:39 am, "Jeff N." <jeffnettles4...@gmail.com> wrote:
> On Sep 13, 10:30 am, Haje Korth <hajeko...@gmail.com> wrote:
>
>
>
>> Hi,
>> I just had this great idea of forking IDL jobs on my 16-CPU server
>> using the IDL to IDL Bridge. The code runs great from the command line
>> but using a UNIX cron job I get the error message "IDL_IDLBridge:
>> Unable to establish X Connection." To late did I understand the the
>> help that reads:
>
>> "Warning: On UNIX systems, the IDL_IDLBridge requires that the DISPLAY
>> environment variable be set to a valid X Windows display. If no
>> display is available, execution of the IDL_IDLBridge will halt, with
>> error messages that include:IDL_IDLBridge: Unable to establish X
>> Connection."
>
>> The requirement for an X display seems silly, as my code does not
>> display anything. Is there a way to fake the existence of an X window?
>> Or did I just wasted my time coding this feature?
>
>> Haje
>
> I'm not a linux expert by any means, so forgive me if this is stupid,
> but couldn't you just set the display env't variable anyway whether
> you use it or not? It does seem silly that you have to set it whether
> or not you use it, but is there any harm in just setting it?
>
> On another note, how difficult was it to code up the IDL_IDLBridge
> forking? I've thought about this myself but haven't really dived into
> doing it other than a few (failed) half-hearted stabs.
>
> Jeff
|
|
|