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

Home » Public Forums » archive » remote execution of idl script
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
remote execution of idl script [message #91203] Wed, 17 June 2015 03:09 Go to next message
trisb is currently offline  trisb
Messages: 18
Registered: November 2010
Junior Member
Hello IDL hive mind,

after going through the post archives, I could not find a suitable solution to my problem, so here comes a new thread.

I have an IDL script file ~/hw.isc that contains only
print,"Hello world"

Now I want to execute this IDL script (or command, to start with) from the shell of a remote computer. My IDL version is 8.3 and I am operating under a UNIX system. If I do the following, it works:

ssh remote_server_name
idl -e "@~/hw.isc"

It correctly starts IDL, prints "Hello world", and exits.

Now I want to have that as a batch execution from my home server and want to use a one-liner:

ssh remote_server_name 'idl -e "@~/hw.isc"'

What happens is that it logs into the remote server, starts IDL, but hangs upon startup after the license server is loaded. No X commands are used in the script nor the startup file. The result is the same if I use -X, -Y, or >& outfile in the IDL call command to redirect screen output.

Thanks for your help!
Flo.
Re: remote execution of idl script [message #91204 is a reply to message #91203] Wed, 17 June 2015 05:51 Go to previous messageGo to next message
Lajos Foldy is currently offline  Lajos Foldy
Messages: 176
Registered: December 2011
Senior Member
On Wednesday, June 17, 2015 at 12:09:05 PM UTC+2, trisb wrote:
> Hello IDL hive mind,
>
> after going through the post archives, I could not find a suitable solution to my problem, so here comes a new thread.
>
> I have an IDL script file ~/hw.isc that contains only
> print,"Hello world"
>
> Now I want to execute this IDL script (or command, to start with) from the shell of a remote computer. My IDL version is 8.3 and I am operating under a UNIX system. If I do the following, it works:
>
> ssh remote_server_name
> idl -e "@~/hw.isc"
>
> It correctly starts IDL, prints "Hello world", and exits.
>
> Now I want to have that as a batch execution from my home server and want to use a one-liner:
>
> ssh remote_server_name 'idl -e "@~/hw.isc"'
>
> What happens is that it logs into the remote server, starts IDL, but hangs upon startup after the license server is loaded. No X commands are used in the script nor the startup file. The result is the same if I use -X, -Y, or >& outfile in the IDL call command to redirect screen output.
>
> Thanks for your help!
> Flo.

Try "ssh ... idl hw.isc' (and append "exit" to hw.isc).

regards,
Lajos
Re: remote execution of idl script [message #91205 is a reply to message #91204] Wed, 17 June 2015 06:39 Go to previous messageGo to next message
trisb is currently offline  trisb
Messages: 18
Registered: November 2010
Junior Member
Hello Lajos,

thanks for your suggestion. However,

ssh remote_server_name 'idl hw.isc'

leads to the same hung-up idl session as outlined in the original post.

Best,
Flo.
Re: remote execution of idl script [message #91208 is a reply to message #91204] Wed, 17 June 2015 06:45 Go to previous messageGo to next message
trisb is currently offline  trisb
Messages: 18
Registered: November 2010
Junior Member
Hello Lajos,

thanks for your suggestion. However,

ssh remote_server_name 'idl hw.isc'

leads to the same hung-up idl session as outlined in the original post. Edit: Same when adding 'exit' in the script.

Best,
Flo.
Re: remote execution of idl script [message #91209 is a reply to message #91204] Wed, 17 June 2015 06:48 Go to previous messageGo to next message
trisb is currently offline  trisb
Messages: 18
Registered: November 2010
Junior Member
Hi Lejos,

thanks for your suggestion. However,

ssh remote_server_name 'idl hw.isc'

ends up in the same stalled IDL session as the original command. Same when adding 'exit' to the script

Best,
Flo
Re: remote execution of idl script [message #91210 is a reply to message #91209] Wed, 17 June 2015 07:48 Go to previous messageGo to next message
Lajos Foldy is currently offline  Lajos Foldy
Messages: 176
Registered: December 2011
Senior Member
On Wednesday, June 17, 2015 at 3:48:02 PM UTC+2, trisb wrote:
> Hi Lejos,
>
> thanks for your suggestion. However,
>
> ssh remote_server_name 'idl hw.isc'
>
> ends up in the same stalled IDL session as the original command. Same when adding 'exit' to the script
>
> Best,
> Flo

Works for me:

gandalf:~> ssh frodo 'cat hw.isc'
print, "Hello world!"
exit

gandalf:~> ssh frodo 'idl hw.isc'
IDL Version 8.4.1 ...

Hello world!
gandalf:~>

What is in your hw.isc?

regards,
Lajos
Re: remote execution of idl script [message #91211 is a reply to message #91210] Wed, 17 June 2015 07:55 Go to previous messageGo to next message
trisb is currently offline  trisb
Messages: 18
Registered: November 2010
Junior Member
This is my hw.isc:
-----
print,"Hello world"
exit
-----

This is the output from running

ssh remote_server_name 'idl hw.isc'

once it stalls:
-----
IDL Version 8.3 (linux x86_64 m64). (c) 2013, Exelis Visual Information Solutions, Inc.
Installation number: [redacted]
Licensed for use by: [redacted]

-----

I also tried to ssh into the host server/headnode, but it results in the same problem.

Thanks,
Flo.
Re: remote execution of idl script [message #91212 is a reply to message #91211] Wed, 17 June 2015 08:20 Go to previous messageGo to next message
Lajos Foldy is currently offline  Lajos Foldy
Messages: 176
Registered: December 2011
Senior Member
On Wednesday, June 17, 2015 at 4:55:59 PM UTC+2, trisb wrote:
> This is my hw.isc:
> -----
> print,"Hello world"
> exit
> -----
>
> This is the output from running
>
> ssh remote_server_name 'idl hw.isc'
>
> once it stalls:
> -----
> IDL Version 8.3 (linux x86_64 m64). (c) 2013, Exelis Visual Information Solutions, Inc.
> Installation number: [redacted]
> Licensed for use by: [redacted]
>
> -----
>
> I also tried to ssh into the host server/headnode, but it results in the same problem.
>
> Thanks,
> Flo.

Is there any IDL_STARTUP file on the remote host?

What does "ssh remote_server_name 'cat hw.isc'" print?

If it is OK and the remote host is Linux, you can try

ssh remote_server_name 'strace idl hw.isc'

This will print a zillion lines but you will see where IDL stalls at the end.

I can not guess your setup problem without access to the system. Show my previous working example to your IDL or system admin.

regards,
Lajos
Re: remote execution of idl script [message #91213 is a reply to message #91212] Wed, 17 June 2015 08:33 Go to previous messageGo to next message
trisb is currently offline  trisb
Messages: 18
Registered: November 2010
Junior Member
Thanks, Lajos.

Displaying hw.isc with cat worked and seems normal. However, doing strace resulted in
-----
strace: idl: command not found
-----

I guess I will have to go to the sysadmin eventually.

Best,
Flo.
Re: remote execution of idl script [message #91214 is a reply to message #91212] Wed, 17 June 2015 08:49 Go to previous messageGo to next message
Nigel Wade is currently offline  Nigel Wade
Messages: 286
Registered: March 1998
Senior Member
On 17/06/15 16:20, fawltylanguage@gmail.com wrote:
> On Wednesday, June 17, 2015 at 4:55:59 PM UTC+2, trisb wrote:
>> This is my hw.isc:
>> -----
>> print,"Hello world"
>> exit
>> -----
>>
>> This is the output from running
>>
>> ssh remote_server_name 'idl hw.isc'
>>
>> once it stalls:
>> -----
>> IDL Version 8.3 (linux x86_64 m64). (c) 2013, Exelis Visual Information Solutions, Inc.
>> Installation number: [redacted]
>> Licensed for use by: [redacted]
>>
>> -----
>>
>> I also tried to ssh into the host server/headnode, but it results in the same problem.

Is it IDL which is hanging or ssh?

Try adding an additional command after idl to see if IDL exits, and ssh hangs.
If IDL exits then it's definitely something to do with the ssh environment rather than IDL.

It may also be X causing the problem, so get rid of X and unset DISPLAY:

ssh -x remote_server_name 'unset DISPLAY;idl hw.isc;ls'

If IDL exits it should list your files.


>>
>> Thanks,
>> Flo.
>
> Is there any IDL_STARTUP file on the remote host?
>
> What does "ssh remote_server_name 'cat hw.isc'" print?
>
> If it is OK and the remote host is Linux, you can try
>
> ssh remote_server_name 'strace idl hw.isc'
>
> This will print a zillion lines but you will see where IDL stalls at the end.
>

You can't strace IDL, it's a script.
Re: remote execution of idl script [message #91215 is a reply to message #91214] Wed, 17 June 2015 08:57 Go to previous messageGo to next message
trisb is currently offline  trisb
Messages: 18
Registered: November 2010
Junior Member
On Wednesday, June 17, 2015 at 4:49:27 PM UTC+1, Nigel Wade wrote:
> On 17/06/15 16:20, fawltylanguage@gmail.com wrote:
>> On Wednesday, June 17, 2015 at 4:55:59 PM UTC+2, trisb wrote:
>>> This is my hw.isc:
>>> -----
>>> print,"Hello world"
>>> exit
>>> -----
>>>
>>> This is the output from running
>>>
>>> ssh remote_server_name 'idl hw.isc'
>>>
>>> once it stalls:
>>> -----
>>> IDL Version 8.3 (linux x86_64 m64). (c) 2013, Exelis Visual Information Solutions, Inc.
>>> Installation number: [redacted]
>>> Licensed for use by: [redacted]
>>>
>>> -----
>>>
>>> I also tried to ssh into the host server/headnode, but it results in the same problem.
>
> Is it IDL which is hanging or ssh?
>
> Try adding an additional command after idl to see if IDL exits, and ssh hangs.
> If IDL exits then it's definitely something to do with the ssh environment rather than IDL.
>
> It may also be X causing the problem, so get rid of X and unset DISPLAY:
>
> ssh -x remote_server_name 'unset DISPLAY;idl hw.isc;ls'
>
> If IDL exits it should list your files.

Thanks for the suggestion, Nigel. It stalls at the same point as before, ls is not being executed.
Re: remote execution of idl script [message #91216 is a reply to message #91214] Wed, 17 June 2015 09:08 Go to previous messageGo to next message
Lajos Foldy is currently offline  Lajos Foldy
Messages: 176
Registered: December 2011
Senior Member
On Wednesday, June 17, 2015 at 5:49:27 PM UTC+2, Nigel Wade wrote:

> You can't strace IDL, it's a script.

Have you tried it? :-) The idl command is a shell script and it uses the shell's built-in exec to run the actual binary. The binary simply replaces the shell, no new process is created. strace works just fine.

regards,
Lajos
Re: remote execution of idl script [message #91227 is a reply to message #91216] Thu, 18 June 2015 05:40 Go to previous messageGo to next message
Nigel Wade is currently offline  Nigel Wade
Messages: 286
Registered: March 1998
Senior Member
On 17/06/15 17:08, fawltylanguage@gmail.com wrote:
> On Wednesday, June 17, 2015 at 5:49:27 PM UTC+2, Nigel Wade wrote:
>
>> You can't strace IDL, it's a script.
>
> Have you tried it? :-) The idl command is a shell script and it uses the shell's built-in exec to run the actual binary. The binary simply replaces the shell, no new process is created. strace works just fine.
>

I didn't actually. I was sure I'd tried this in the past when tracing problems and found it didn't work because idl is a
script.
However, when I do try it it works as advertised.

"Memory fault, core dumped"
Re: remote execution of idl script [message #91234 is a reply to message #91215] Fri, 19 June 2015 01:26 Go to previous messageGo to next message
Nigel Wade is currently offline  Nigel Wade
Messages: 286
Registered: March 1998
Senior Member
On 17/06/15 16:57, trisb wrote:
>> Is it IDL which is hanging or ssh?
>>>
>>> Try adding an additional command after idl to see if IDL exits, and ssh hangs.
>>> If IDL exits then it's definitely something to do with the ssh environment rather than IDL.
>>>
>>> It may also be X causing the problem, so get rid of X and unset DISPLAY:
>>>
>>> ssh -x remote_server_name 'unset DISPLAY;idl hw.isc;ls'
>>>
>>> If IDL exits it should list your files.
> Thanks for the suggestion, Nigel. It stalls at the same point as before, ls is not being executed.
>

That makes me think that there's something different about how the idl command is working on that remote system.
Also, the fact that Lajos suggestion to use strace fails to locate the idl command adds weight to this.

Do you know how the idl command is configured on that system?
Re: remote execution of idl script [message #91251 is a reply to message #91234] Tue, 23 June 2015 05:07 Go to previous message
trisb is currently offline  trisb
Messages: 18
Registered: November 2010
Junior Member
On Friday, June 19, 2015 at 9:26:20 AM UTC+1, Nigel Wade wrote:
> On 17/06/15 16:57, trisb wrote:
>>> Is it IDL which is hanging or ssh?
>>>>
>>>> Try adding an additional command after idl to see if IDL exits, and ssh hangs.
>>>> If IDL exits then it's definitely something to do with the ssh environment rather than IDL.
>>>>
>>>> It may also be X causing the problem, so get rid of X and unset DISPLAY:
>>>>
>>>> ssh -x remote_server_name 'unset DISPLAY;idl hw.isc;ls'
>>>>
>>>> If IDL exits it should list your files.
>> Thanks for the suggestion, Nigel. It stalls at the same point as before, ls is not being executed.
>>
>
> That makes me think that there's something different about how the idl command is working on that remote system.
> Also, the fact that Lajos suggestion to use strace fails to locate the idl command adds weight to this.
>
> Do you know how the idl command is configured on that system?

Thanks. Indeed, it was a problem with how the idl call related to the execution of idl. Problem solved with help of the sys admin.

Flo.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Problem with text()
Next Topic: trouble with image(), /data, /norm

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

Current Time: Wed Oct 08 11:34:37 PDT 2025

Total time taken to generate the page: 0.00956 seconds