comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Background job on remote machine: problems with IDL_IDLBridge
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Background job on remote machine: problems with IDL_IDLBridge [message #85609] Wed, 21 August 2013 09:23 Go to next message
mg.elianto is currently offline  mg.elianto
Messages: 4
Registered: August 2013
Junior Member
Hi all,

this is Mario Gennaro writing (Space Telescope Science Institute), I am new to the group, I hope I'll find some help for my problem.

I am used to run background IDL jobs on remote machines; this usually works:

ssh -Y2 me@remotemachine

nohup $IDL_DIR/bin/idl < input-commands-list >& output-log-file

then I can ctrl-d and let the process run on the remote machine. eventually I can log back in and see the progress by:

tail -f output-log-file

Fine; however I have problems when the IDL code running requires X windows.
I solve this by writing codes that don't plot anything.
Again, this works BUT here is the big trouble:

one of my codes uses the IDL_IDLBridge, which seems to require a valid X windows to exist, even if the child process doesn't plot anything.

I thought I could solve this by using screen instead of nohup, but it doesn't seem to work.

I tried to ssh into the remote machine, create a screen session, the launch my program within the screen session:

ssh -Y2 me@remotemachine
screen -R "Foo"
screen-Foo-prompt $: $IDL_DIR/bin/idl < input-commands >& output-file

ctrl-a d

I can detach from the screen session, and the code keeps running, but if I disconnect from the remote machine (ctrl-d), I obtain this error (when I look back into the output log file):

X connection to localhost:10.0 broken (explicit kill or server shutdown)

Any clues?

Cheers,
Mario
Re: Background job on remote machine: problems with IDL_IDLBridge [message #85618 is a reply to message #85609] Thu, 22 August 2013 02:56 Go to previous messageGo to next message
Lajos Foldy is currently offline  Lajos Foldy
Messages: 176
Registered: December 2011
Senior Member
On Wednesday, August 21, 2013 6:23:55 PM UTC+2, mg.el...@googlemail.com wrote:

> I tried to ssh into the remote machine, create a screen session, the launch my program within the screen session:

VNC is the graphical counterpart of screen, see https://groups.google.com/forum/#!topic/comp.lang.idl-pvwave /4fpThx02PyM

regards,
Lajos
Re: Background job on remote machine: problems with IDL_IDLBridge [message #85622 is a reply to message #85618] Thu, 22 August 2013 07:22 Go to previous messageGo to next message
mg.elianto is currently offline  mg.elianto
Messages: 4
Registered: August 2013
Junior Member
On Thursday, August 22, 2013 5:56:24 AM UTC-4, fawltyl...@gmail.com wrote:
> On Wednesday, August 21, 2013 6:23:55 PM UTC+2, mg.el...@googlemail.com wrote:
>
>
>
>> I tried to ssh into the remote machine, create a screen session, the launch my program within the screen session:
>
>
>
> VNC is the graphical counterpart of screen, see https://groups.google.com/forum/#!topic/comp.lang.idl-pvwave /4fpThx02PyM
>
>
>
> regards,
>
> Lajos

Thank you Lajos,

I am going to give it a try. However this might require me asking the system administrators to install a VNC server on the remote machine (which is a big computing work horse that we have at my institute). I think that for some reasons they don't allow for remote desktop on such machines. While I will try and see, let me ask you if you think that this might be the only option. It seems so, when I read your older conversations.
Cheers,
Mario
Re: Background job on remote machine: problems with IDL_IDLBridge [message #85624 is a reply to message #85609] Thu, 22 August 2013 08:25 Go to previous messageGo to next message
mg.elianto is currently offline  mg.elianto
Messages: 4
Registered: August 2013
Junior Member
On Wednesday, August 21, 2013 12:23:55 PM UTC-4, mg.el...@googlemail.com wrote:
> Hi all,
>
>
>
> this is Mario Gennaro writing (Space Telescope Science Institute), I am new to the group, I hope I'll find some help for my problem.
>
>
>
> I am used to run background IDL jobs on remote machines; this usually works:
>
>
>
> ssh -Y2 me@remotemachine
>
>
>
> nohup $IDL_DIR/bin/idl < input-commands-list >& output-log-file
>
>
>
> then I can ctrl-d and let the process run on the remote machine. eventually I can log back in and see the progress by:
>
>
>
> tail -f output-log-file
>
>
>
> Fine; however I have problems when the IDL code running requires X windows.
>
> I solve this by writing codes that don't plot anything.
>
> Again, this works BUT here is the big trouble:
>
>
>
> one of my codes uses the IDL_IDLBridge, which seems to require a valid X windows to exist, even if the child process doesn't plot anything.
>
>
>
> I thought I could solve this by using screen instead of nohup, but it doesn't seem to work.
>
>
>
> I tried to ssh into the remote machine, create a screen session, the launch my program within the screen session:
>
>
>
> ssh -Y2 me@remotemachine
>
> screen -R "Foo"
>
> screen-Foo-prompt $: $IDL_DIR/bin/idl < input-commands >& output-file
>
>
>
> ctrl-a d
>
>
>
> I can detach from the screen session, and the code keeps running, but if I disconnect from the remote machine (ctrl-d), I obtain this error (when I look back into the output log file):
>
>
>
> X connection to localhost:10.0 broken (explicit kill or server shutdown)
>
>
>
> Any clues?
>
>
>
> Cheers,
>
> Mario
Re: Background job on remote machine: problems with IDL_IDLBridge [message #85625 is a reply to message #85622] Thu, 22 August 2013 08:40 Go to previous messageGo to next message
Lajos Foldy is currently offline  Lajos Foldy
Messages: 176
Registered: December 2011
Senior Member
On Thursday, August 22, 2013 4:22:58 PM UTC+2, Mario Gennaro wrote:
>
> I am going to give it a try. However this might require me asking the system administrators to install a VNC server on the remote machine (which is a big computing work horse that we have at my institute). I think that for some reasons they don't allow for remote desktop on such machines. While I will try and see, let me ask you if you think that this might be the only option. It seems so, when I read your older conversations.

The VNC server does not require a full-fledged desktop, like Gnome or KDE, it usually works with a minimalistic window manager by default (TWM on my OpenSuSE). Probably you can convince your sysadm :-)

Also, the VNC server does not need to run on your server, it can be used on any machine which can access the server. The only requirement is that you can not shut down the VNC server until your IDL program ends.

I don't see any other possibility. IDL_IDLbridge calls XOpenDisplay unconditionally, something must answer this call.

regards,
Lajos
Re: Background job on remote machine: problems with IDL_IDLBridge [message #85638 is a reply to message #85625] Fri, 23 August 2013 06:49 Go to previous messageGo to next message
mg.elianto is currently offline  mg.elianto
Messages: 4
Registered: August 2013
Junior Member
Hi Lajos and others.
One of the software support guys here, Joseph H., has found a solution which doesn't require VNC. I am posting his email below. It works for me, I hope it will help others:

*************************

If IDL_IDLBridge requires a X session but does *not* require human
interaction (i.e. clicking buttons in a GUI or monitoring graphical
output) you can do something like this:

1. Create a X frame buffer in a screen session
# screen -dmS FRAMEBUFFER Xvfb -pixdepths 8 16 24 :100

2. Start your IDL process in different screen session
# screen -mS IDL_JOB tcsh -l
[ Inside screen session ]
# setenv DISPLAY :100
# idl
... do stuff
[ Detach screen session ]

The IDL bridge should survive because its "X session" is now using Xvfb
instead of your local X11 forwarding via SSH.

******************

The only difference for me is that I use bash, so I issued

# screen -mS IDL_JOB bash -l
# export DISPLAY=:100

The important thing is that the IDL Bridge has been fooled.

Cheers,
Mario
Re: Background job on remote machine: problems with IDL_IDLBridge [message #85642 is a reply to message #85638] Fri, 23 August 2013 07:30 Go to previous messageGo to next message
Lajos Foldy is currently offline  Lajos Foldy
Messages: 176
Registered: December 2011
Senior Member
On Friday, August 23, 2013 3:49:26 PM UTC+2, Mario Gennaro wrote:

> # screen -dmS FRAMEBUFFER Xvfb -pixdepths 8 16 24 :100

Hi Mario,

nice trick! I have never heard about Xvfb before. The man page suggests that you can even look at the output, too.

Lajos
Re: Background job on remote machine: problems with IDL_IDLBridge [message #85656 is a reply to message #85642] Fri, 23 August 2013 12:51 Go to previous messageGo to next message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
Hi all,

Just FYI, for IDL 8.3 (due out in the late fall), the IDL_IDLBridge will no longer require an X server.

Cheers,
Chris
ExelisVIS
Re: Background job on remote machine: problems with IDL_IDLBridge [message #86970 is a reply to message #85656] Tue, 17 December 2013 23:38 Go to previous messageGo to next message
Boris is currently offline  Boris
Messages: 3
Registered: March 1996
Junior Member
пятница, 23 августа 2013 г., 21:51:32 UTC+2 пользователь Chris Torrence написал:
> Hi all,
>
>
>
> Just FYI, for IDL 8.3 (due out in the late fall), the IDL_IDLBridge will no longer require an X server.
>
>
>
> Cheers,
>
> Chris
>
> ExelisVIS

Hi Chris,

IDL Version 8.3 (linux x86_64 m64). (c) 2013, Exelis Visual Information Solutions, Inc.

% Compiled module: BUILD_BRIDGES.
% Loaded DLM: IDL_IDLBRIDGE.
% IDL_IDLBRIDGE Error: WINDOW: Unable to open X Windows display.
Is your DISPLAY environment variable set correctly?

It does require X-Window.
any comments?

by the way, I used the trick from Mario - it is appeared that I really started the background calculations, BUT all bridges used the same CPU.
it was about 9% load for each of 10 jobs.
The same task uses 10x100% when X-Window is there.

Thanks,
Boris.
Re: Background job on remote machine: problems with IDL_IDLBridge [message #86973 is a reply to message #86970] Wed, 18 December 2013 06:30 Go to previous messageGo to next message
Jim  Pendleton is currently offline  Jim Pendleton
Messages: 165
Registered: November 2011
Senior Member
On Wednesday, December 18, 2013 12:38:18 AM UTC-7, Boris wrote:
> пятница, 23 августа 2013 г., 21:51:32 UTC+2 пользователь Chris Torrence написал:
>
>> Hi all,
>
>>
>
>>
>
>>
>
>> Just FYI, for IDL 8.3 (due out in the late fall), the IDL_IDLBridge will no longer require an X server.
>
>>
>
>>
>
>>
>
>> Cheers,
>
>>
>
>> Chris
>
>>
>
>> ExelisVIS
>
>
>
> Hi Chris,
>
>
>
> IDL Version 8.3 (linux x86_64 m64). (c) 2013, Exelis Visual Information Solutions, Inc.
>
>
>
> % Compiled module: BUILD_BRIDGES.
>
> % Loaded DLM: IDL_IDLBRIDGE.
>
> % IDL_IDLBRIDGE Error: WINDOW: Unable to open X Windows display.
>
> Is your DISPLAY environment variable set correctly?
>
>
>
> It does require X-Window.
>
> any comments?
>
>
>
> by the way, I used the trick from Mario - it is appeared that I really started the background calculations, BUT all bridges used the same CPU.
>
> it was about 9% load for each of 10 jobs.
>
> The same task uses 10x100% when X-Window is there.
>
>
>
> Thanks,
>
> Boris.

Boris,
Are you sure that the routine you're executing from the IDL_IDLBridge object doesn't explicitly create a WINDOW? To simplify debugging, what do you get for output if you call this?

IDL> b = idl_idlbridge()

Jim P.
Re: Background job on remote machine: problems with IDL_IDLBridge [message #87127 is a reply to message #86973] Wed, 08 January 2014 23:27 Go to previous messageGo to next message
borisstrel is currently offline  borisstrel
Messages: 2
Registered: January 2014
Junior Member
среда, 18 декабря 2013 г., 15:30:46 UTC+1 пользователь Jim P написал:
> On Wednesday, December 18, 2013 12:38:18 AM UTC-7, Boris wrote:
>
>> пятница, 23 августа 2013 г., 21:51:32 UTC+2 пользователь Chris Torrence написал:
>
>>
>
>>> Hi all,
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>> Just FYI, for IDL 8.3 (due out in the late fall), the IDL_IDLBridge will no longer require an X server.
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>> Cheers,
>
>>
>
>>>
>
>>
>
>>> Chris
>
>>
>
>>>
>
>>
>
>>> ExelisVIS
>
>>
>
>>
>
>>
>
>> Hi Chris,
>
>>
>
>>
>
>>
>
>> IDL Version 8.3 (linux x86_64 m64). (c) 2013, Exelis Visual Information Solutions, Inc.
>
>>
>
>>
>
>>
>
>> % Compiled module: BUILD_BRIDGES.
>
>>
>
>> % Loaded DLM: IDL_IDLBRIDGE.
>
>>
>
>> % IDL_IDLBRIDGE Error: WINDOW: Unable to open X Windows display.
>
>>
>
>> Is your DISPLAY environment variable set correctly?
>
>>
>
>>
>
>>
>
>> It does require X-Window.
>
>>
>
>> any comments?
>
>>
>
>>
>
>>
>
>> by the way, I used the trick from Mario - it is appeared that I really started the background calculations, BUT all bridges used the same CPU.
>
>>
>
>> it was about 9% load for each of 10 jobs.
>
>>
>
>> The same task uses 10x100% when X-Window is there.
>
>>
>
>>
>
>>
>
>> Thanks,
>
>>
>
>> Boris.
>
>
>
> Boris,
>
> Are you sure that the routine you're executing from the IDL_IDLBridge object doesn't explicitly create a WINDOW? To simplify debugging, what do you get for output if you call this?
>
>
>
> IDL> b = idl_idlbridge()
>
>
>
> Jim P.

Hi Jim,
you are right.
sorry for confusion.

the Bridge object was created. but sitting up the environment needed X Window for some reason (actually what for?)

IDL> a=obj_new('IDL_IDLBridge')
% Loaded DLM: IDL_IDLBRIDGE.
IDL> a->execute, '@' + pref_get('IDL_STARTUP')
% IDL_IDLBRIDGE Error: WINDOW: Unable to open X Windows display.
Is your DISPLAY environment variable set correctly?
% Execution halted at: $MAIN$
IDL>

this works if DISPLAY is ok.
Boris.
Re: Background job on remote machine: problems with IDL_IDLBridge [message #87128 is a reply to message #87127] Wed, 08 January 2014 23:35 Go to previous message
borisstrel is currently offline  borisstrel
Messages: 2
Registered: January 2014
Junior Member
четверг, 9 января 2014 г., 8:27:52 UTC+1 пользователь boris...@gmail.com написал:
> среда, 18 декабря 2013 г., 15:30:46 UTC+1 пользователь Jim P написал:
>
>> On Wednesday, December 18, 2013 12:38:18 AM UTC-7, Boris wrote:
>
>>
>
>>> пятница, 23 августа 2013 г., 21:51:32 UTC+2 пользователь Chris Torrence написал:
>
>>
>
>>>
>
>>
>
>>>> Hi all,
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> Just FYI, for IDL 8.3 (due out in the late fall), the IDL_IDLBridge will no longer require an X server.
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> Cheers,
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> Chris
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> ExelisVIS
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>> Hi Chris,
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>> IDL Version 8.3 (linux x86_64 m64). (c) 2013, Exelis Visual Information Solutions, Inc.
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>> % Compiled module: BUILD_BRIDGES.
>
>>
>
>>>
>
>>
>
>>> % Loaded DLM: IDL_IDLBRIDGE.
>
>>
>
>>>
>
>>
>
>>> % IDL_IDLBRIDGE Error: WINDOW: Unable to open X Windows display.
>
>>
>
>>>
>
>>
>
>>> Is your DISPLAY environment variable set correctly?
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>> It does require X-Window.
>
>>
>
>>>
>
>>
>
>>> any comments?
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>> by the way, I used the trick from Mario - it is appeared that I really started the background calculations, BUT all bridges used the same CPU.
>
>>
>
>>>
>
>>
>
>>> it was about 9% load for each of 10 jobs.
>
>>
>
>>>
>
>>
>
>>> The same task uses 10x100% when X-Window is there.
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>> Thanks,
>
>>
>
>>>
>
>>
>
>>> Boris.
>
>>
>
>>
>
>>
>
>> Boris,
>
>>
>
>> Are you sure that the routine you're executing from the IDL_IDLBridge object doesn't explicitly create a WINDOW? To simplify debugging, what do you get for output if you call this?
>
>>
>
>>
>
>>
>
>> IDL> b = idl_idlbridge()
>
>>
>
>>
>
>>
>
>> Jim P.
>
>
>
> Hi Jim,
>
> you are right.
>
> sorry for confusion.
>
>
>
> the Bridge object was created. but sitting up the environment needed X Window for some reason (actually what for?)
>
>
>
> IDL> a=obj_new('IDL_IDLBridge')
>
> % Loaded DLM: IDL_IDLBRIDGE.
>
> IDL> a->execute, '@' + pref_get('IDL_STARTUP')
>
> % IDL_IDLBRIDGE Error: WINDOW: Unable to open X Windows display.
>
> Is your DISPLAY environment variable set correctly?
>
> % Execution halted at: $MAIN$
>
> IDL>
>
>
>
> this works if DISPLAY is ok.
>
> Boris.

ok, in the startup there was something calling X-Window
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Thickness of Errorbar
Next Topic: SVN bug makes project properties tab invisible at first

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 09:14:55 PDT 2025

Total time taken to generate the page: 0.00842 seconds