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

Home » Public Forums » archive » Re: How to call an IDL procedure from a DLM
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: How to call an IDL procedure from a DLM [message #47705 is a reply to message #47697] Thu, 23 February 2006 09:17 Go to previous messageGo to previous message
Haje Korth is currently offline  Haje Korth
Messages: 651
Registered: May 1997
Senior Member
Karl,
thanks for the info. So it seems even you folks at RSI think that this is
unfeasible. I usually blame things first on my C-illiteracy... :-)


"Karl Schultz" <k____schultz@rsinc.com> wrote in message
news:pan.2006.02.23.16.47.51.78000@rsinc.com...
> On Thu, 23 Feb 2006 08:26:54 -0500, Haje Korth wrote:
>
>> Maurizio,
>> What you are trying to do is an interesting concecpt, but I don't think
>> DLMs
>> are intended to work this way. At least I have never run across an
>> example
>> for such use. Isn't the whole purpose of DLMs, call_external, etc. to
>> call
>> code that is specifically NOT implemeneted in IDL? Why would you bother
>> writing a DLM if the functionality is already present in IDL?
>
> I'm thinking that he is doing part of his DLM processing in C, and then
> gets to a point where it would be Really Nice to call an IDL routine to
> finish it up because the IDL routine is at-hand and might be a pain to
> translate into C or whatever.
>
> It should be possible to refactor the code though to do some things in C
> and then return the intermediate results to IDL, where he can then call
> the IDL code. I can't speculate further without knowing more about the
> problem.
>
>> My guess is that you probably have to go out and find an external C or
>> FORTRAN library that does what you want, e.g. Numerical Recipes. RSI
>> manuals
>> often specify the source of their external algorithms. Or, if the
>> algortihm
>> is written in IDL, you can just translate it.
>>
>> This may just be well above my head, so maybe Karl has some input on
>> this. If this should really work, I would be interested in seeing an
>> example. I would be afraid that each of these calls need to start an
>> independent IDL session, thus leading to significant slowdown.
>
> You are on the right track. It isn't so much starting a new session, but
> rather reentering the interpreter that is causing the problem.
>
> I think redesigning the DLM as hinted above is the best approach. One way
> to "call IDL" from a DLM would be to spawn a new IDL process. But that
> would involve passing data back and forth via files or pipes/sockets and I
> think that's going to be more involved than refactoring the DLM.
>
> Karl
>
>
>>
>> Cheers,
>> Haje
>>
>> "Maurizio Tomasi" <tomasi@lambrate.inaf.it> wrote in message
>> news:dthqki$eh1$1@muffin.area.ba.cnr.it...
>>> Last week I posted a request for help, since my DLM produced a number
>>> of "Stopped on unknown instruction" errors. After some debugging, I
>>> found that the problem resides in IDL_ExecuteStr, which is not usable
>>> in DLMs since it has been meant to be used only with Callable IDL.
>>>
>>> However, I still need to call an IDL procedure from my DLM. I looked
>>> for a IDL_CallProc function, but I have had no success. Does somebody
>>> know if there is a way to do this?
>>>
>>> Thank you very much,
>>> Maurizio Tomasi.
>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: flux-conserving image resampling?
Next Topic: Re: iVolume isosurface placement

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

Current Time: Thu Oct 09 23:55:11 PDT 2025

Total time taken to generate the page: 0.00257 seconds