IDL

From Peyton Hall Documentation

(Difference between revisions)
Jump to: navigation, search
m
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.
 +
 +
== Setting Thread Pools ==
 +
In certain cases (e.g. running jobs through Condor), you might want to limit the number of threads IDL (defaults to the number of CPUs on the machine) can use so that it does not eat up all the resources on a machine. This can be set through the environment variable IDL_CPU_TPOOL_NTHREADS, or alternatively using the 'CPU' procedure after starting IDL: '<tt>CPU, TPOOL_NTHREADS = NumThreads</tt>'

Revision as of 20:03, 22 April 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.

Setting Thread Pools

In certain cases (e.g. running jobs through Condor), you might want to limit the number of threads IDL (defaults to the number of CPUs on the machine) can use so that it does not eat up all the resources on a machine. This can be set through the environment variable IDL_CPU_TPOOL_NTHREADS, or alternatively using the 'CPU' procedure after starting IDL: 'CPU, TPOOL_NTHREADS = NumThreads'


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. Feel free to email offenders and ask them to clean up their old processes, or contact us to kill them if you've heard no reply and need the cycles yourself.


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.

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