MPIDL: Parallel IDL

MPI stands for Message Passing Interface. It is a library specification for message-passing between processors, proposed as a standard by a broadly based committee of vendors, implementers, and users.

MPIDL stands for Massively Parallel IDL and it is a library of MPI wrapper functions callable from within IDL. It allows IDL to run in parallel on any number of processors.

The instructions below are old and need to be updated.

MPIDL Environment
MPIDL can only be run on the petrel cluster. You will need to add the following lines to your .cshrc file:
if (`uname -s` == "Linux") then
setenv IDL_DLM_PATH /p/nstxusr2/user/dmastrov/mpidl:/usr/local/rsi/idl_5.5/bin/bin.linux.x86
setenv LD_LIBRARY_PATH /p/nstxusr2/user/dmastrov/mpidl:/usr/local/rsi/idl_5.5/bin/bin.linux.x86:$LD_LIBRARY_PATH
setenv PATH /p/nstxusr2/user/dmastrov/mpich/bin:$PATH
MPIDL Help
Help with MPIDL routines is available here.
Running MPIDL Routines
To run an MPIDL program you must use the script mpirun and use it to run a program called mpidl. There is a man page for mpirun on petrel which describes the various options available. Once you have invoked mpirun and mpidl is running on a number of processors, you will use the IDL function called mpi_run to tell IDL which program to run on each processor. For example:
[petrel001|3]mpirun -np 5 mpidl
Parallel IDL Copyright (c) 2002 PPPL
Initialized 5 processes

IDL>sts=mpi_run("calcanything")
% Loaded DLM: PIDL.
% Compiled module: CALCANYTHING.
IDL> exit
[petrel001|4]

In this example the mpidl program was run on 5 processors (the default processors as defined in /p/nstxusr2/user/dmastrov/mpich/share/machines.LINUX since I did not specify and alternate machinefile). mpidl started one interactive IDL session on the node on which you submitted this command and 4 background processes on the first 4 machines in the default machinefile. The interactive IDL process can be used exactly as any IDL session but the background processes are waiting to be told what program they are to run. You tell them which program to run by using the IDL function mpi_run. Alternatively you could put the name of an idl batchfile on the command line.

For example if you had a batchfile

$HOME/mytestarea/mybatchfile.pro:

[petrel001|4]cat $HOME/mytestarea/mybatchfile.pro
sts=mpi_run("calcanything") 
[petrel001|5]

Then you could do the following:

[petrel001|5]mpirun -np 5 -machinefile $HOME/mymachinfile mpidl $HOME/mytestarea/mybatchfile

Parallel IDL Copyright (c) 2002 PPPL
Initialized 5 processes

% Loaded DLM: PIDL.
% Compiled module: CALCANYTHING.
IDL>

Sample IDL programs for running in parrallel are available in /p/nstxusr2/user/dmastrov/mpidl/examples.

Examples of how to run an MPIDL program are available in /p/nstxusr2/user/dmastrov/mpidl/examples/launch.