How to Setup IDL and X-windows at PPPL

General Information

Although you may run IDL from a non-X terminal (like puTTY), most applications need X-windows. This comes with X11 on a mac. Many PPPL PC users use Exceed, a commercial product, but you can download shareware Xming and puTTY from the web. Be sure to check "X-11 forwarding" when using puTTY.

To use IDL from X windows, first setup IDL in system-specific ways (see below).

Setup Details

On the PPPL Linux cluster, type the following, or include in your startup file:
	module load idl
If you want to access NSTX or NSTX-U MDSplus data with IDL, you can just type "module load nstx" and IDL will be loaded. Most X-window systems (but not MacX and eXodus) need permission to send their X windows to your X display. For example, if you have logged into a portal machine to run IDL, you will have to type
	ssh portal.pppl.gov
in a login window, or give permission through some security menu, to allow X windows from portal.pppl.gov to be displayed at your display. Mac users should type " -Y" after "ssh".

On the PPPL UNIX Cluster

IDL is on several UNIX computers at PPPL. General UNIX users should use portal. NSTX users should use nstxpool (you must be in the unix group "nstx" to log into nstxpool computers).

IDL will be in your path, so simply type idl to the system prompt.

NSTX users new to Unix should read $NSTXUSR/util/init_files/AAA_Whats_Here.txt.

To have access to NSTX routines (and some other user-written routines), you will need additional directories added to your IDL_PATH environmental variable. If you are running the csh, tcsh or bash shells, place the following in your .cshrc UNIX startup file:

     module load nstx

How IDL finds routines

"% Attempt to call undefined procedure/function:" gets printed if IDL doesn't know how to find the routine being referenced. There are two different styles of dealing with this. Some people put each function and procedure in a separate file that is in the IDL_PATH so that IDL finds and compiles it when it is referenced. E.g., if you have some routines you frequently access, you can put them in a directory, e.g. "~/MyIDLcode", and prepend this path (or paths) to your IDL_PATH, which was probably set up by doing a "module load nstx" or "module load idl". In csh:
     setenv IDL_PATH "~/MyIDLcode:$IDL_PATH"
The other common way to incorporate frequently used local routines is to place them all in a file (or several) with any name, and compile them before you start running IDL code. E.g., if you put them in ~/myidlroutines.pro, you might define an environmental variable IDL_STARTUP to point to a routine that compliles all of these, e.g., place @~/myidlroutines.pro in ~/.idl_startup, and, in csh:
     setenv IDL_STARTUP "~/.idl_startup"

Frequently Asked Questions (not so much these days)

  1. How can I keep the colors from flashing on my X-display when I change focus to different windows?

    You have some options. See Limiting "Flashing" when using IDL at PPPL.

  2. Why are all my colors very dark/really off, etc.?

    Your monitor, or X-server, is probably set for 24-bit color (millions of colors), and the IDL routines are trying to work with 8-bit color. Do the following immediately upon entering IDL:

         IDL> Device, Decomposed=0
    
    See http://NSTX.pppl.gov/nstx/Software/IDL/simplecolors.html for an easy way to plot with named colors in IDL. Excellent advice on using color in IDL is provided at Fanning Consulting IDL Pages . The page on Limiting "Flashing" when using IDL at PPPL is also relevant.

Documentation

Best to Google "IDL Documentation" as the IDL parent company (Harris Geospatial Solutions as of April, 2017) has good documentation online. If you are running X-windows, you could type "?" at the IDL prompt (although this can be slow). Paper documentation sets are available in various locations around the lab.

If the IDL documention convention has been followed, you may get documentation on individual routines, e.g., "routine_name", by typing:

        IDL> doc_library,'routine_name'
Many routines delevoped at PPPL and elsewhere are in our conventional IDL_PATH and are documented at idl_routines.html.

Please mail comments on this page to nstx_sw_dev.

updated:27-Apr-2017
by: Bill Davis