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

Home » Public Forums » archive » Re: Can a script tell if it is running in the VM?
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: Can a script tell if it is running in the VM? [message #43532] Fri, 15 April 2005 12:00 Go to previous message
tam is currently offline  tam
Messages: 48
Registered: February 2000
Member
Wayne Landsman wrote:

>>
>> Is there some easy, and safe for IDL 5.x, way to check if
>> one is in the VM environment? It seems like there should
>> be a system variable that indicates the environment
>> but I didn't see it mentioned in the doucmentation I've seen.
>
>
> You can use the lmgr() function, e.g. lmgr(/VM) returns 1 if the current
> session is using a VM license, and there are many other options.
>
> I am a little confused about the reference to IDL 5.x though, since I
> thought the VM wasn't introduced until V6.0. (So if you are running
> V5.x then you know it is not a VM license...) --Wayne
>

Thanks,

This code will be
run by users in older versions of IDL and also by users
who are using the VM, so I need to be careful that I won't
get compilation/run errors in the older version. That's
caused problems in the past when trying to make a new capability
conditionally available.

So the safe construct is:

if !version.release ge '6' then begin
if (lmgr(/vm) eq 1) then begin
print, "In the VM"
endif
endif

but

if !version.release ge '6' and lmgr(/vm) then begin
... will fail


Now that you point this out, I can see this kind of guard being
using in mrd_struct.

Regards,
Tom
[Message index]
 
Read Message
Read Message
Previous Topic: Can a script tell if it is running in the VM?
Next Topic: Segmentation fault with IDL 5.5 + Debian Testing/Unstable

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

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

Total time taken to generate the page: 0.00432 seconds