IDL

From Peyton Hall Documentation

(Difference between revisions)
Jump to: navigation, search
(Blurb about licenses & conservation)
Line 3: Line 3:
== Getting started ==
== Getting started ==
-
If you use csh or tcsh (echo $SHELL to see which one - unless you asked for a change, it should be bash), add '<tt>source /usr/peyton/bin/idl_setup</tt>'to your .cshrc file.  If you use bash or ksh, put '<tt>. /usr/peyton/bin/idl_setup.ksh</tt>' in your .bashrc or .profile.  Then run idl (/usr/peyton/bin/idl) to start.
+
If you use csh or tcsh (echo $SHELL to see which one - unless you asked for a change, it should be bash), add '<tt>source /usr/peyton/bin/idl_setup</tt>'to your .cshrc file.  If you use bash, put '<tt>. /usr/peyton/bin/idl_setup.bash</tt>' in your .bashrc.  Then run idl (/usr/peyton/bin/idl) to start.
Line 11: Line 11:
There is also a problem for IDL 5.5 running on linuxes with pixmap depth set to 24.  The use of TVSCL or TV loads the wrong color map and gives a streaky appearance to the graphics.  You can prevent this by adding the lines '<tt>WINDOW, /PIXMAP & WDELETE</tt>' and '<tt>DEVICE, BYPASS_TRANSLATION=0</tt>' to your .idl_startup file.  If one is trying to read an image from the graphics window using TVRD, this workaround fails - one has to run X in depth 8 or 16.  This problem is because IDL still cannot handle TrueColor in 24bit depth, though it can now handle it in 8 and 16 bits.
There is also a problem for IDL 5.5 running on linuxes with pixmap depth set to 24.  The use of TVSCL or TV loads the wrong color map and gives a streaky appearance to the graphics.  You can prevent this by adding the lines '<tt>WINDOW, /PIXMAP & WDELETE</tt>' and '<tt>DEVICE, BYPASS_TRANSLATION=0</tt>' to your .idl_startup file.  If one is trying to read an image from the graphics window using TVRD, this workaround fails - one has to run X in depth 8 or 16.  This problem is because IDL still cannot handle TrueColor in 24bit depth, though it can now handle it in 8 and 16 bits.
 +
 +
 +
== IDL Licenses ==
 +
Every copy of IDL that is run checks out licenses from the license server, and we have a limited number of licenses.  Because of this, it's frowned upon to run many copies of IDL at the same time unless you're actively doing work that requires them (and very frowned upon to leave an IDL instance open for long periods of time when it's not being used, as others could be using those licenses).  If you're getting errors about IDL being out of licenses, or you're just curious who's using it, you can check by running <tt>/usr/peyton/common/licensed/idl/bin/lmstat -a</tt>.
 +
 +
 +
=== Running Multiple Copies On The Same Computer ===
 +
Craig Loomis points out a method by which one can run multiple copies of IDL and only use one copy's worth of licenses:
 +
<blockquote>IDL hands out licenses based on hostname+username+display. If all three of those are equal you can start as many sessions as you want and only consume one license. The modern habit of letting ssh create X tunnels causes the display name to be different for each ssh connection, even if several connections come from a single host.</blockquote>
 +
 +
<blockquote>There are several ways of making your DISPLAY name the same for all such connections. The simplest is to note which your first one is (echo $DISPLAY), and set DISPLAY on other connections to that. Another way is to turn on ssh connection sharing, which has the additional benefit of making subsequent connections start faster. But if you use screen or tunnels it can quickly turn against you. If not, putting:</blockquote>
 +
 +
Host *.astro.princeton.edu
 +
        ControlMaster auto
 +
        ControlPath /tmp/%r@%h:%p
 +
 +
<blockquote>in your .ssh/config can be useful.  This is untested (I used to use sharing but had to stop because of my funky habits).</blockquote>
 +
 +
Many people run "console-only" IDL sessions on a single host by unsetting DISPLAY entirely before running the program; no matter how you do it, as long as the user name, host and DISPLAY variable are all the same, every copy of IDL running that way will only use a single license (good for multiple copies on dual- and quad-core hosts).
 +
[[Category:Software]]
[[Category:Software]]

Revision as of 20:06, 8 February 2010

IDL is a data visualization & analysis program used by many in the department.


Contents

Getting started

If you use csh or tcsh (echo $SHELL to see which one - unless you asked for a change, it should be bash), add 'source /usr/peyton/bin/idl_setup'to your .cshrc file. If you use bash, put '. /usr/peyton/bin/idl_setup.bash' in your .bashrc. Then run idl (/usr/peyton/bin/idl) to start.


Color problems

Sometimes the colors in IDL can seem all wrong. One workaround found on a web page suggests setting the image decomposition to 0 with 'device,decomposed=0'. This has to be set in IDL before any windows are opened. The need for this comes about because IDL only works properly with 8-bit color. Obviously, with our new fangled modern video cards, no-one uses 8-bit anymore, hence the need to force the X-window to work as 8-bit.


There is also a problem for IDL 5.5 running on linuxes with pixmap depth set to 24. The use of TVSCL or TV loads the wrong color map and gives a streaky appearance to the graphics. You can prevent this by adding the lines 'WINDOW, /PIXMAP & WDELETE' and 'DEVICE, BYPASS_TRANSLATION=0' to your .idl_startup file. If one is trying to read an image from the graphics window using TVRD, this workaround fails - one has to run X in depth 8 or 16. This problem is because IDL still cannot handle TrueColor in 24bit depth, though it can now handle it in 8 and 16 bits.


IDL Licenses

Every copy of IDL that is run checks out licenses from the license server, and we have a limited number of licenses. Because of this, it's frowned upon to run many copies of IDL at the same time unless you're actively doing work that requires them (and very frowned upon to leave an IDL instance open for long periods of time when it's not being used, as others could be using those licenses). If you're getting errors about IDL being out of licenses, or you're just curious who's using it, you can check by running /usr/peyton/common/licensed/idl/bin/lmstat -a.


Running Multiple Copies On The Same Computer

Craig Loomis points out a method by which one can run multiple copies of IDL and only use one copy's worth of licenses:

IDL hands out licenses based on hostname+username+display. If all three of those are equal you can start as many sessions as you want and only consume one license. The modern habit of letting ssh create X tunnels causes the display name to be different for each ssh connection, even if several connections come from a single host.
There are several ways of making your DISPLAY name the same for all such connections. The simplest is to note which your first one is (echo $DISPLAY), and set DISPLAY on other connections to that. Another way is to turn on ssh connection sharing, which has the additional benefit of making subsequent connections start faster. But if you use screen or tunnels it can quickly turn against you. If not, putting:
Host *.astro.princeton.edu
        ControlMaster auto
        ControlPath /tmp/%r@%h:%p
in your .ssh/config can be useful. This is untested (I used to use sharing but had to stop because of my funky habits).

Many people run "console-only" IDL sessions on a single host by unsetting DISPLAY entirely before running the program; no matter how you do it, as long as the user name, host and DISPLAY variable are all the same, every copy of IDL running that way will only use a single license (good for multiple copies on dual- and quad-core hosts).

Personal tools