Re: IDL Virtual Machine information [message #35623] |
Mon, 30 June 2003 05:05  |
Haje Korth
Messages: 651 Registered: May 1997
|
Senior Member |
|
|
At the presentation RSI gave by us, the five people from RSI was not aware
of any DLM, call_external restrictions. I specifically asked for that. I
think there are restrictions about callable IDL, but let this stand a s a
rumor rather than a fact. The IDL 6.0 beta documentation does not mention
these restrictions. The only serious restriction is the EXECUTE() command,
which is not available in VM mode. This seems to be used by many people,
even though I haven't discovered its usefulness. (Maybe someone could
describe a scenario, where I really need this and cannot find a quick
workaround. Maybe I have been missing out on something great here.)
Greetings,
Haje
--
<tbb0301@mail.lrz-muenchen.de> wrote in message
news:Pine.SOL.4.55.0306301004370.435@sun2.lrz-muenchen.de...
> On Fri, 27 Jun 2003, Gert Van de Wouwer wrote:
>
>>
> "Liam Gumley" <Liam.Gumley@ssec.wisc.edu> wrote in message
>> news:bdf0ei$oce$1@news.doit.wisc.edu...
>>> A particularly interesting feature of IDL 6.0 is the IDL Virtual
Machine,
>>
>
> My basic understanding after talking to the local distributor was that
> DLM are not allowed for VM.
>
> Best regrads
>
> Stephan
>> But a problem I see is the use of DLM's that I often use. I need to
rebuild
>> them every time there is a IDL upgrade (and they are not backwards
>> compatible). Anyone any thoughts how this would be with the VM?
>
> ------------------------------------------------------------ --------------
----
> Dr. Stephan Nekolla Telefon: (49) (0) 89
4140-2959
> http://www.nuk.med.tu-muenchen.de Fax: (49) (0) 89 4140-4938
> Klinik und Poliklinik fuer Nuklearmedizin E-Mail:
s.nekolla@lrz.tu-muenchen.de
> Klinikum rechts der Isar der Technischen Universitaet Muenchen
> Ismaningerstr. 22 D-81675 Muenchen
> ------------------------------------------------------------ --------------
----
>
|
|
|
|
Re: IDL Virtual Machine information [message #35625 is a reply to message #35623] |
Mon, 30 June 2003 02:48   |
Nigel Wade
Messages: 286 Registered: March 1998
|
Senior Member |
|
|
tbb0301@mail.lrz-muenchen.de wrote:
> On Fri, 27 Jun 2003, Gert Van de Wouwer wrote:
>
>>
> "Liam Gumley" <Liam.Gumley@ssec.wisc.edu> wrote in message
>> news:bdf0ei$oce$1@news.doit.wisc.edu...
>>> A particularly interesting feature of IDL 6.0 is the IDL Virtual
>>> Machine,
>>
> Stephan
>> But a problem I see is the use of DLM's that I often use. I need to
>> rebuild them every time there is a IDL upgrade (and they are not
>> backwards compatible). Anyone any thoughts how this would be with the VM?
>
> My basic understanding after talking to the local distributor was that
> DLM are not allowed for VM.
>
> Best regrads
>
But that would remove some of the core functionality of IDL which is
implemented as DLMs. Surely this can't be the case.
--
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@ion.le.ac.uk
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555
|
|
|
|
|
Re: IDL Virtual Machine information [message #35649 is a reply to message #35648] |
Thu, 26 June 2003 15:50   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
JD Smith writes:
> In the case of CW_PDMENU, you could easily modify it
> to use a custom-built _EXTRA structure or, even better, rely on the
> fact that well-designed routines will (should) accept some value for
> all keywords which is equivalent to never having used the keyword
> (e.g. "foo" and "foo,HELP=0" are equivalent -- neither should activate
> HELP).
I knew there would be a silver lining here. Just
think, if you want to use the IDL Virtual Machine
you will *have* to know how to use KEYWORD_SET
and N_ELEMENTS properly to check your keywords.
It could revolutionize IDL programming!!
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
Re: IDL Virtual Machine information [message #35650 is a reply to message #35649] |
Thu, 26 June 2003 15:23   |
JD Smith
Messages: 850 Registered: December 1999
|
Senior Member |
|
|
On Thu, 26 Jun 2003 14:19:53 -0700, Reimar Bauer wrote:
> JD Smith wrote:
>
>> On Thu, 26 Jun 2003 08:28:47 -0700, Liam Gumley wrote:
>>
>>> "Craig Markwardt" <craigmnet@cow.physics.wisc.edu> wrote in message
>>> news:onptl0g9wi.fsf@cow.physics.wisc.edu...
>>>>
>>>> "Liam Gumley" <Liam.Gumley@ssec.wisc.edu> writes:
>>>> > A particularly interesting feature of IDL 6.0 is the IDL Virtual
>>> Machine,
>>>> > which will allow developers to distribute compiled cross-platform
>>>> > applications that do not require IDL to run.
>>>>
>>>> Liam--
>>>>
>>>> You're right this is an interesting development. This may help get
>>>> more IDL applications distributed, which I'm sure is the goal of RSI.
>>>> But the virtual machine is significantly less interesting to me on
>>>> account of the fact that EXECUTE() is disabled:
>>>>
>>>> http://www.rsinc.com/idl/idlvm_faq.asp#runtime
>>>>
>>>> There are a couple of key places in my code where EXECUTE() is
>>>> integral to the operation of the algorithm, and those would not
>>>> transfer over to the IDL VM.
>>>
>>> I wonder why EXECUTE is not allowed?
>>>
>>>
>> Presumably for the same reason that uncompiled .pro routines can't be
>> run with the VM: it doesn't include the byte-code compiler. I'd
>> suspect that EXECUTE works by calling the very same compiler at
>> run-time. If it did include the compiler, the VM could easily be
>> turned into a full-fledged copy of IDL! The CALL_* routines still work
>> because they are only allowed to call routines which are compiled
>> (either natively in IDL, or in the .sav file itself).
>>
>> That said, there are lots of uses of EXECUTE which are no longer really
>> necessary in IDL 6.0, e.g., building variable-length argument lists of
>> dimensions for various routines (I've noticed Craig using that trick a
>> lot). Since the VM will only run .sav files compiled with IDLv6.0,
>> there's no need to hang onto these old constructions for
>> compatibility's sake. Perhaps people could list their typical uses of
>> EXECUTE and we could consider ways to eliminate them?
>>
>> JD
>
> I did a few days ago a feature request to remove all EXECUTEs from die
> idl standard library.
>
> You can do a grep at rsi/idl/lib. There are some important routines too
> which you can't use if you plan to build a vm.
I took a look in the IDL6.0 beta lib/, and found a couple which might
cause trouble: CW_FORM and CW_PDMENU. Interestingly, in all cases I
found, this aim is almost always building a list of arguments of
unknown length. In the case of CW_PDMENU, you could easily modify it
to use a custom-built _EXTRA structure or, even better, rely on the
fact that well-designed routines will (should) accept some value for
all keywords which is equivalent to never having used the keyword
(e.g. "foo" and "foo,HELP=0" are equivalent -- neither should activate
HELP).
One interesting approach to this variable argument list length issue
is seen in Perl: the argument list is always interpreted as a single
list, and can always be passed in as a single list, as individual
arguments, or as any combination. Obviously, IDL cannot be
retro-fitted to use this type of syntax, but one possibility presents
itself: for all IDL programs, if the keyword _ARGUMENT is passed a
pointer array, the individual arguments will be mapped to pointer
values of the slots in the pointer array (as many as there are). E.g.
pro myroutine, a, b, c
could be called as
myroutine,_ARGUMENTS=[ptr_new(12),ptr_new(15),ptr_new([14,15 ])]
equivalent to
myroutine,12,15,[14,15]
This would *only* be useful in the context of run-time determined
arguments, but there it would be invaluable, for instance, neatly
solving the macro-replay issue Ben raised last week, i.e. creating a
standard mechanism for storing and re-using a variable number of
routine arguments. It would also introduce a potential for
memory-leak unless care was taken, but despite this, it seems useful.
You'd have to use /NO_COPY judiciously for large arrays or data
structures (which normally would be passed by reference), ensuring
that you restore the data after the call if necessary. A set of
helper routines could easily bundle all arguments as a pointer array,
and unbundle them afterwards, freeing the pointers:
big=lindgen(50000)
args=bundle_arguments(12,15,big,/NO_COPY)
myroutine,_ARGUMENTS=args
unbundle_arguments,args,void,void,big
The other use of EXECUTE I've seen is turning the name of a variable
(a string) into that variable's values. There's already a way to do
this (though it's technically off-limits):
IDL> myvar=1
IDL> print,routine_names("myvar",/fetch)
1
Terrible things will happen to you when you use this forbidden
function, such as (more) hair growing out of your ears, but
nonetheless, it demonstrates that EXECUTE is not essential for this
operation.
Just my 2.e-2USD.
JD
|
|
|
Re: IDL Virtual Machine information [message #35651 is a reply to message #35650] |
Thu, 26 June 2003 15:14   |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
JD Smith <jdsmith@as.arizona.edu> writes:
>
> That said, there are lots of uses of EXECUTE which are no longer
> really necessary in IDL 6.0, e.g., building variable-length argument
> lists of dimensions for various routines (I've noticed Craig using
> that trick a lot). Since the VM will only run .sav files compiled
> with IDLv6.0, there's no need to hang onto these old constructions for
> compatibility's sake. Perhaps people could list their typical uses of
> EXECUTE and we could consider ways to eliminate them?
I generally try to avoid EXECUTE(), but end up using it in several
different ways. One is to handle the stupid dimension-list behavior
of REBIN, but that may be fixed in newer versions of IDL.
Another is allowing users to enter expressions to be evaluated. This
includes fitting routines like MPFIT (parameter constraints),
MPFITEXPR and CHEBCOEF. I don't know a way of evaluating a
user-function without EXECUTE.
There is a more esoteric set of routines which uses EXECUTE() to
extract a particular argument from an argument list. For example, if
my routine is defined as:
pro mypro, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, ...
then one can use EXECUTE to pull out each of the x{i} arguments
without writing testing each one manually (eg CMRESTORE, FXBREADM,
PRINTLOG, TRANSREAD).
A final way is to make complex expressions which I couldn't figure any
other elegant way to do. For example, constructing a template
structure in TRANSREAD.
I fully admit that the IDL VM sounds like a really interesting way of
getting more people to use IDL software, and I'm sure that's why RSI
developed it. It will lower the barrier for distribution of
IDL-related packages, which RSI probably hopes will drive more sales
when package recipients realize how great IDL is.
*BUT*, I think developers should consider the IDL VM as a separate
platform to develop for. It requires more discipline to avoid
EXECUTE(), more careful checking that supporting library routines (and
as Reimar points out, event IDL standard library!) don't trespass
either. It means that existing code can't be pressed immediately into
service without vetting it, and some functionality that requires
EXECUTE() may need to be stripped away. This may or may not have
significant costs.
For these reasons, I don't think the IDL VM will be a big hit. It
will be nice, but not big.
Craig
--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
|
|
|
Re: IDL Virtual Machine information [message #35652 is a reply to message #35651] |
Thu, 26 June 2003 14:19   |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
JD Smith wrote:
> On Thu, 26 Jun 2003 08:28:47 -0700, Liam Gumley wrote:
>
>> "Craig Markwardt" <craigmnet@cow.physics.wisc.edu> wrote in message
>> news:onptl0g9wi.fsf@cow.physics.wisc.edu...
>>>
>>> "Liam Gumley" <Liam.Gumley@ssec.wisc.edu> writes:
>>>> A particularly interesting feature of IDL 6.0 is the IDL Virtual
>> Machine,
>>>> which will allow developers to distribute compiled cross-platform
>>>> applications that do not require IDL to run.
>>>
>>> Liam--
>>>
>>> You're right this is an interesting development. This may help get
>>> more IDL applications distributed, which I'm sure is the goal of RSI.
>>> But the virtual machine is significantly less interesting to me on
>>> account of the fact that EXECUTE() is disabled:
>>>
>>> http://www.rsinc.com/idl/idlvm_faq.asp#runtime
>>>
>>> There are a couple of key places in my code where EXECUTE() is integral
>>> to the operation of the algorithm, and those would not transfer over to
>>> the IDL VM.
>>
>> I wonder why EXECUTE is not allowed?
>>
>
> Presumably for the same reason that uncompiled .pro routines can't be
> run with the VM: it doesn't include the byte-code compiler. I'd
> suspect that EXECUTE works by calling the very same compiler at
> run-time. If it did include the compiler, the VM could easily be
> turned into a full-fledged copy of IDL! The CALL_* routines still
> work because they are only allowed to call routines which are compiled
> (either natively in IDL, or in the .sav file itself).
>
> That said, there are lots of uses of EXECUTE which are no longer
> really necessary in IDL 6.0, e.g., building variable-length argument
> lists of dimensions for various routines (I've noticed Craig using
> that trick a lot). Since the VM will only run .sav files compiled
> with IDLv6.0, there's no need to hang onto these old constructions for
> compatibility's sake. Perhaps people could list their typical uses of
> EXECUTE and we could consider ways to eliminate them?
>
> JD
I did a few days ago a feature request to remove all EXECUTEs from die idl
standard library.
You can do a grep at rsi/idl/lib. There are some important routines too
which you can't use if you plan to build a vm.
Reimar
--
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg-i/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
|
|
|
Re: IDL Virtual Machine information [message #35653 is a reply to message #35652] |
Thu, 26 June 2003 10:36   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
JD Smith writes:
> That said, there are lots of uses of EXECUTE which are no longer
> really necessary in IDL 6.0, e.g., building variable-length argument
> lists of dimensions for various routines (I've noticed Craig using
> that trick a lot). Since the VM will only run .sav files compiled
> with IDLv6.0, there's no need to hang onto these old constructions for
> compatibility's sake.
What!? And get rid of that old IDL 4.0 license Craig
has hanging around still. Say it ain't so, Craig!
Don't do it!
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
Re: IDL Virtual Machine information [message #35654 is a reply to message #35653] |
Thu, 26 June 2003 10:25   |
JD Smith
Messages: 850 Registered: December 1999
|
Senior Member |
|
|
On Thu, 26 Jun 2003 08:28:47 -0700, Liam Gumley wrote:
> "Craig Markwardt" <craigmnet@cow.physics.wisc.edu> wrote in message
> news:onptl0g9wi.fsf@cow.physics.wisc.edu...
>>
>> "Liam Gumley" <Liam.Gumley@ssec.wisc.edu> writes:
>>> A particularly interesting feature of IDL 6.0 is the IDL Virtual
> Machine,
>>> which will allow developers to distribute compiled cross-platform
>>> applications that do not require IDL to run.
>>
>> Liam--
>>
>> You're right this is an interesting development. This may help get
>> more IDL applications distributed, which I'm sure is the goal of RSI.
>> But the virtual machine is significantly less interesting to me on
>> account of the fact that EXECUTE() is disabled:
>>
>> http://www.rsinc.com/idl/idlvm_faq.asp#runtime
>>
>> There are a couple of key places in my code where EXECUTE() is integral
>> to the operation of the algorithm, and those would not transfer over to
>> the IDL VM.
>
> I wonder why EXECUTE is not allowed?
>
Presumably for the same reason that uncompiled .pro routines can't be
run with the VM: it doesn't include the byte-code compiler. I'd
suspect that EXECUTE works by calling the very same compiler at
run-time. If it did include the compiler, the VM could easily be
turned into a full-fledged copy of IDL! The CALL_* routines still
work because they are only allowed to call routines which are compiled
(either natively in IDL, or in the .sav file itself).
That said, there are lots of uses of EXECUTE which are no longer
really necessary in IDL 6.0, e.g., building variable-length argument
lists of dimensions for various routines (I've noticed Craig using
that trick a lot). Since the VM will only run .sav files compiled
with IDLv6.0, there's no need to hang onto these old constructions for
compatibility's sake. Perhaps people could list their typical uses of
EXECUTE and we could consider ways to eliminate them?
JD
|
|
|
|
|
|
|
|
|
Re: IDL Virtual Machine information [message #35708 is a reply to message #35623] |
Tue, 01 July 2003 01:49   |
Nigel Wade
Messages: 286 Registered: March 1998
|
Senior Member |
|
|
Haje Korth wrote:
> At the presentation RSI gave by us, the five people from RSI was not aware
> of any DLM, call_external restrictions. I specifically asked for that.
That's good to know. We are particularly interested in the VM for running
IDL whilst away at conference. To not be able to use DLM would render it
almost useless as all our data I/O uses either DLM or call_external.
> I think there are restrictions about callable IDL, but let this stand
> as a rumor rather than a fact.
This if from the VM FAQ (http://www.rsinc.com/idlvm/idlvm_faq.asp):
# While the IDL VM does allow IDL code to embed external objects such as
ActiveX controls and Java objects, the IDL VM cannot be used in
applications where IDL is called from an external environment. This means
that callable IDL applications and applications that use the IDL ActiveX
control (IDLDrawX) will not run.
# Use of the IDL EXECUTE function is not allowed. Note that the
CALL_PROCEDURE and CALL_FUNCTION routines are allowed and may be valid
replacements for many uses of the EXECUTE function.
--
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@ion.le.ac.uk
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555
|
|
|
|
|
Re: IDL Virtual Machine information [message #35714 is a reply to message #35623] |
Mon, 30 June 2003 10:47   |
kashyap
Messages: 26 Registered: April 1993
|
Junior Member |
|
|
In article <bdp94e$jfg$1@houston.jhuapl.edu>,
Haje Korth <haje.korth@jhuapl.edu> wrote:
> which is not available in VM mode. This seems to be used by many people,
> even though I haven't discovered its usefulness. (Maybe someone could
> describe a scenario, where I really need this and cannot find a quick
> workaround. Maybe I have been missing out on something great here.)
>
> Greetings,
> Haje
Here is an example:
http://hea-www.harvard.edu/PINTofALE/pro/fitting/adjustie.pr o
(which is part of the PINTofALE suite, see
http://hea-www.harvard.edu/PINTofALE/doc/FITLINES.howto )
We use EXECUTE() to define constraints among fit parameters. Given
the large number of possible constraints, there is no other way to
set up a flexible constraint at run time. For instance, one might
come across a constraint such as "flux in line 2 is between 2 and 3
times the flux in line 1." Or, "line 2 is at a fixed distance from
line 1, with some error." Or, "if line 1 has flux greater than some
threshold then line 2 is located at this position, otherwise at this
other, slightly different, position." Etc.
Vinay
--
____________________________________________________________ __________________
kashyap@head-cfa.harvard.edu 617 495 7173 [CfA/P-143] 617 496 7173 [F]
------------ And now a word from our sponsor ---------------------
For a secure high performance FTP using SSL/TLS encryption
upgrade to SurgeFTP
---- See http://netwinsite.com/sponsor/sponsor_surgeftp.htm ----
|
|
|
Re: IDL Virtual Machine information [message #35815 is a reply to message #35652] |
Mon, 14 July 2003 08:31  |
Research Systems Inc.
Messages: 33 Registered: May 1997
|
Member |
|
|
Most of the uses of the EXECUTE function in the IDL library have been
removed in IDL 6.0. A few were not addressed and are therefore not supported
with the IDL VM in IDL 6.0. These are listed in the IDL 6.0 release notes
and include the ANNOTATE, EFONT, READ_INTERFILE, and RESOLVE_ALL routines.
Stephanie Staley
RSI
"Reimar Bauer" <R.Bauer@fz-juelich.de> wrote in message
news:bdfo3k$fcie$1@zam602.zam.kfa-juelich.de...
> JD Smith wrote:
>
>> On Thu, 26 Jun 2003 08:28:47 -0700, Liam Gumley wrote:
>>
>>> "Craig Markwardt" <craigmnet@cow.physics.wisc.edu> wrote in message
>>> news:onptl0g9wi.fsf@cow.physics.wisc.edu...
>>>>
>>>> "Liam Gumley" <Liam.Gumley@ssec.wisc.edu> writes:
>>>> > A particularly interesting feature of IDL 6.0 is the IDL Virtual
>>> Machine,
>>>> > which will allow developers to distribute compiled cross-platform
>>>> > applications that do not require IDL to run.
>>>>
>>>> Liam--
>>>>
>>>> You're right this is an interesting development. This may help get
>>>> more IDL applications distributed, which I'm sure is the goal of RSI.
>>>> But the virtual machine is significantly less interesting to me on
>>>> account of the fact that EXECUTE() is disabled:
>>>>
>>>> http://www.rsinc.com/idl/idlvm_faq.asp#runtime
>>>>
>>>> There are a couple of key places in my code where EXECUTE() is
integral
>>>> to the operation of the algorithm, and those would not transfer over
to
>>>> the IDL VM.
>>>
>>> I wonder why EXECUTE is not allowed?
>>>
>>
>> Presumably for the same reason that uncompiled .pro routines can't be
>> run with the VM: it doesn't include the byte-code compiler. I'd
>> suspect that EXECUTE works by calling the very same compiler at
>> run-time. If it did include the compiler, the VM could easily be
>> turned into a full-fledged copy of IDL! The CALL_* routines still
>> work because they are only allowed to call routines which are compiled
>> (either natively in IDL, or in the .sav file itself).
>>
>> That said, there are lots of uses of EXECUTE which are no longer
>> really necessary in IDL 6.0, e.g., building variable-length argument
>> lists of dimensions for various routines (I've noticed Craig using
>> that trick a lot). Since the VM will only run .sav files compiled
>> with IDLv6.0, there's no need to hang onto these old constructions for
>> compatibility's sake. Perhaps people could list their typical uses of
>> EXECUTE and we could consider ways to eliminate them?
>>
>> JD
>
> I did a few days ago a feature request to remove all EXECUTEs from die idl
> standard library.
>
> You can do a grep at rsi/idl/lib. There are some important routines too
> which you can't use if you plan to build a vm.
>
>
>
> Reimar
>
>
> --
> Forschungszentrum Juelich
> email: R.Bauer@fz-juelich.de
> http://www.fz-juelich.de/icg/icg-i/
> ============================================================ ======
> a IDL library at ForschungsZentrum Juelich
> http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
>
|
|
|