Introduction
Now we’ll see how to run an IDL program on the cluster. Before proceeding, make sure you’ve read the How To Run tutorial first.
For more information about the software, see the IDL website.
Loading the IDL Module
The module can be loaded up using module load idl. Taki currently has IDL version 8.4.1 installed.
[reetam1@taki-usr1 ~]$ module load idl [reetam1@taki-usr1 ~]$ idl IDL Version 8.4.1 (linux x86_64 m64). (c) 2015, Exelis Visual Information Solutions, Inc. Installation number: 208932-19. Licensed for use by: University of Maryland (MAIN)
Performing Calculations on the Cluster Nodes
Running IDL on the cluster is not much different than running MATLAB or other serial programs as long as you’re not making plots (we’ll cover that in the next section). There are a few minor modifications you must make to your batch script. First, we’ll need an example IDL program:
We’ll also make a main program:
Then we’ll create a batch script:
For details on that script, see this page. Note that we’re requesting only one node since we didn’t specify a specific number here.
Now we can submit our job to the scheduler
[reetam1@taki-usr1 sayhello-idl]$ sbatch run.slurm Submitted batch job 3385760
Eventually the job will complete. When it does, it will create slurm.out and slurm.err files with the following output:
[reetam1@taki-usr1 sayhello-idl]$ more slurm.err IDL Version 8.4.1 (linux x86_64 m64). (c) 2015, Exelis Visual Information Solutions, Inc. Installation number: 208932-19. Licensed for use by: University of Maryland (MAIN) % Compiled module: MAIN. % Compiled module: SAYHELLO. [reetam1@taki-usr1 sayhello-idl]$ more slurm.out HELLO WORLD [reetam1@taki-usr1 sayhello-idl]$
Generating Plots on the Cluster Nodes
Generating plots without a desktop on IDL can be complicated if you don’t have functions that automate everything for you. A popular pair is plopen and plclose, developed at Goddard. For this tutorial, we will use imopen and imclose which are simply modified versions of Goddard’s plopen and plclose with support for additional image types:
Copy those to a directory on the machine and then create this file, the same directory:
Then create a new batch script:
Note that all we’ve changed is that “main” has been replaced with “testplot”. Now submit that script:
[reetam1@taki-usr1 testplot-idl]$ sbatch run.slurm Submitted batch job 3385763
When the job finishes, it should create slurm.out, slurm.err and test.png. The output files should contain the following:
[reetam1@taki-usr1 testplot-idl]$ ls -l total 32 -rw-rw---- 1 reetam1 pi_gobbert 3036 Apr 28 2011 imclose.pro -rw-rw---- 1 reetam1 pi_gobbert 5800 Apr 28 2011 imopen.pro -rw-rw---- 1 reetam1 pi_gobbert 228 Dec 16 16:00 run.slurm -rw-rw---- 1 reetam1 pi_gobbert 277 Dec 16 16:01 slurm.err -rw-rw---- 1 reetam1 pi_gobbert 0 Dec 16 16:01 slurm.out -rw-rw---- 1 reetam1 pi_gobbert 859 Apr 28 2011 testplot.pro -rw-rw---- 1 reetam1 pi_gobbert 3074 Dec 16 16:01 test.png [reetam1@taki-usr1 testplot-idl]$ more slurm.err IDL Version 8.4.1 (linux x86_64 m64). (c) 2015, Exelis Visual Information Solutions, Inc. Installation number: 208932-19. Licensed for use by: University of Maryland (MAIN) % Compiled module: TESTPLOT. % Compiled module: IMOPEN. % Compiled module: IMCLOSE. % Loaded DLM: PNG. [reetam1@taki-usr1 testplot-idl]$ more slurm.out [reetam1@taki-usr1 testplot-idl]$
The test.png image should look like this:
Any of the 2D IDL plotting routines should work. The visualization routines that rely on fancy 3D X11 applications will not work since they require an actual graphical display.