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

Home » Public Forums » archive » Re: IDL_IDLBRIDGE undefined procedure problem
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
Re: IDL_IDLBRIDGE undefined procedure problem [message #73460] Fri, 12 November 2010 05:29 Go to next message
Haje Korth is currently offline  Haje Korth
Messages: 651
Registered: May 1997
Senior Member
If you use the /nowait keyword you can execute all bridge jobs
simultaneously. If you have enough cores the jobs will use different
cores for each execution. Haje

On Nov 11, 11:43 am, Ammar Yusuf <amyus...@gmail.com> wrote:
> On Nov 11, 11:39 am, jeanh
>
> <jghasb...@DELETETHIS.environmentalmodelers.ANDTHIS.com> wrote:
>>> Another question is when stuff is executing inside of these processes
>>> through the bridge I can't see any output from those processes. How
>>> would I do that if i wanted to? Thanks.
>
>> You can save the output to a file:
>
>> thread_2 = obj_new('IDL_IDLBridge', output = 'C:\child_output.txt')
>
>> Jean
>
> Thanks. Another question and I'm just making sure. By using the
> IDL_IDLBRIDGE object that means obj1, obj2, obj3, obj4 are running in
> parallel or does obj1 execute first or suspend and then go to obj2.
> Also does the IDL Bridge object automatically dispatch to different
> processors because I have a quad core so I would like for each object
> to be on a separate core. I'm not sure if that's possible. Thanks!
Re: IDL_IDLBRIDGE undefined procedure problem [message #73486 is a reply to message #73460] Thu, 11 November 2010 08:43 Go to previous messageGo to next message
Ammar Yusuf is currently offline  Ammar Yusuf
Messages: 36
Registered: October 2010
Member
On Nov 11, 11:39 am, jeanh
<jghasb...@DELETETHIS.environmentalmodelers.ANDTHIS.com> wrote:
>> Another question is when stuff is executing inside of these processes
>> through the bridge I can't see any output from those processes. How
>> would I do that if i wanted to? Thanks.
>
> You can save the output to a file:
>
> thread_2 = obj_new('IDL_IDLBridge', output = 'C:\child_output.txt')
>
> Jean

Thanks. Another question and I'm just making sure. By using the
IDL_IDLBRIDGE object that means obj1, obj2, obj3, obj4 are running in
parallel or does obj1 execute first or suspend and then go to obj2.
Also does the IDL Bridge object automatically dispatch to different
processors because I have a quad core so I would like for each object
to be on a separate core. I'm not sure if that's possible. Thanks!
Re: IDL_IDLBRIDGE undefined procedure problem [message #73487 is a reply to message #73486] Thu, 11 November 2010 08:39 Go to previous messageGo to next message
jeanh is currently offline  jeanh
Messages: 79
Registered: November 2009
Member
> Another question is when stuff is executing inside of these processes
> through the bridge I can't see any output from those processes. How
> would I do that if i wanted to? Thanks.

You can save the output to a file:

thread_2 = obj_new('IDL_IDLBridge', output = 'C:\child_output.txt')

Jean
Re: IDL_IDLBRIDGE undefined procedure problem [message #73491 is a reply to message #73487] Thu, 11 November 2010 08:03 Go to previous messageGo to next message
Ammar Yusuf is currently offline  Ammar Yusuf
Messages: 36
Registered: October 2010
Member
On Nov 11, 10:29 am, jeanh
<jghasb...@DELETETHIS.environmentalmodelers.ANDTHIS.com> wrote:
> On 11/11/2010 10:05 AM, Ammar Yusuf wrote:
>
>> Hi I'm new to using this IDL_IDLBRIDGE object so I was just running
>> some  test code like:
>
>> Obj1 = OBJ_NEW('IDL_IDLBridge')
>> Obj1->Execute, "run1"
>> I have four separate functions in four separate files called pro run1,
>> pro run2, pro run3, and pro run4. They all do something really simple
>> but every time I run the above code I get this error:
>> IDL_IDLBRIDGE Error: Attempt to call undefined procedure/function:
>> 'RUN1'.
>
>> Thanks.
>
> Hi,
> the procedures are not compiled in the idlBridge session.
>
> try this:
> Obj1 = OBJ_NEW('IDL_IDLBridge')
> Obj1->Execute, '.compile run1'
> Obj1->Execute, "run1"
>
> Of course, run1.pro must be in your path. Remember that startup files
> are not run in the bridge session..
> Jean

It worked when I added the folder that held the routines to the path.

Another question is when stuff is executing inside of these processes
through the bridge I can't see any output from those processes. How
would I do that if i wanted to? Thanks.
Re: IDL_IDLBRIDGE undefined procedure problem [message #73492 is a reply to message #73491] Thu, 11 November 2010 07:29 Go to previous messageGo to next message
jeanh is currently offline  jeanh
Messages: 79
Registered: November 2009
Member
On 11/11/2010 10:05 AM, Ammar Yusuf wrote:
> Hi I'm new to using this IDL_IDLBRIDGE object so I was just running
> some test code like:
>
> Obj1 = OBJ_NEW('IDL_IDLBridge')
> Obj1->Execute, "run1"
> I have four separate functions in four separate files called pro run1,
> pro run2, pro run3, and pro run4. They all do something really simple
> but every time I run the above code I get this error:
> IDL_IDLBRIDGE Error: Attempt to call undefined procedure/function:
> 'RUN1'.
>
> Thanks.

Hi,
the procedures are not compiled in the idlBridge session.

try this:
Obj1 = OBJ_NEW('IDL_IDLBridge')
Obj1->Execute, '.compile run1'
Obj1->Execute, "run1"


Of course, run1.pro must be in your path. Remember that startup files
are not run in the bridge session..
Jean
Re: IDL_IDLBRIDGE undefined procedure problem [message #73545 is a reply to message #73460] Fri, 12 November 2010 08:59 Go to previous messageGo to next message
Ammar Yusuf is currently offline  Ammar Yusuf
Messages: 36
Registered: October 2010
Member
On Nov 12, 8:29 am, Haje Korth <hajeko...@gmail.com> wrote:
> If you use the /nowait keyword you can execute all bridge jobs
> simultaneously. If you have enough cores the jobs will use different
> cores for each execution. Haje
>

Thanks! That worked for me. So I make 6 objects and I only have 4
cores then it will run the 4 objects first and then wait for the other
two or will it interleave all of them?
Re: IDL_IDLBRIDGE undefined procedure problem [message #92391 is a reply to message #73487] Sun, 06 December 2015 21:29 Go to previous messageGo to next message
suntaopku is currently offline  suntaopku
Messages: 1
Registered: December 2015
Junior Member
在 2010年11月12日星期五 UTC+8上午12:39:05,jeanh写道:
>> Another question is when stuff is executing inside of these processes
>> through the bridge I can't see any output from those processes. How
>> would I do that if i wanted to? Thanks.
>
> You can save the output to a file:
>
> thread_2 = obj_new('IDL_IDLBridge', output = 'C:\child_output.txt')
>
> Jean

Hi,
I really learn a lot from your answers.
So I am just starting to use the IDL_IDLbridge to do parallel computing.
And when I execute a child process, the child process can not run another self-defined pro or funcs. The output show as " Attempt to call undefined procedure/function: run2"
So can you give me some help? Thanks.
Example:
obj->execute,'run1';

pro run1
run2
end
pro run2
window,0
end
Re: IDL_IDLBRIDGE undefined procedure problem [message #92395 is a reply to message #92391] Mon, 07 December 2015 06:20 Go to previous message
markb77 is currently offline  markb77
Messages: 217
Registered: July 2006
Senior Member
You need to modify the !PATH variable on the bridge process. Something like this:

cmd_str = '!PATH = EXPAND_PATH(mypath) + ' + $
'PATH_SEP(/SEARCH_PATH) + !PATH'

bridge_obj -> Execute, cmd_str
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Finding NaNs in arrays - Strange outcome
Next Topic: intel fortran compiler question on windows.

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

Current Time: Wed Oct 08 15:10:17 PDT 2025

Total time taken to generate the page: 0.00683 seconds