Interactive Data Language (IDL) is a programming language used for data analysis and is popular in several scientific fields. This page explains how to use the IDL module on Oscar run IDL programs.
First load the IDL module that you want to use with module load idl/version_number
:
You can use the command module load idl
to simply load the default version. This is demonstrated in the following command followed by system dialogue.
As indicated by the system dialogue, you will need to enter the following command to set up the environment for IDL:
Once you've set up IDL in the way outlined above, you can open the IDL command line by simply using the command idl
:
Note: To exit this environment, simply use the command exit
As is stated in the IDL Documentation, IDL in command-line mode "uses a text-only interface and sends output to your terminal screen or shell window." Thus, this is a mode in which you can enter commands and see their results in real time, but it is not where one should write full IDL programs.
To write an IDL program, you can use any of the text editors on Oscar (such as vim, emacs, and nano) or you can create the program in a file on your own computer and then copy that file to Oscar when you are finished. Here is an example (hello world) IDL program idl_hello_world.pro
:
This file and the batch file below can be found at /gpfs/runtime/software_examples/idl/8.5.1
if you wish to copy them and test the process yourself.
Once you have the .pro
file on Oscar, you can then run this file using a batch script. Here is a bare bones version of a batch script (called idl_hello_world.sh)
that will run the script idl_hello_world.pro
(note that the .pro
is omitted in the script).
We can then run the batch file by using the sbatch
command: