NSTX logo FAQ Web Tools UNIX&VMS MDSplus
Overview Programming Diagnostics Applications
software
DiagnosticsFAQWeb ToolsUNIX&VMS softwareSoftware homeOverview Details

MPIDL Overview

(This page was created by a MODIFICATION of the IDL library routine mk_html_help).

List Last updated: Mon Jan 15 11:46:33 2003.


List of Topics

[List of Topics]


MPI Basics

[Next Topic] [List of Topics]
 

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.




Setting up your Environment

[Previous Topic] [Next Topic] [List of Topics]
 
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 Routines

[Previous Topic] [Next Topic] [List of Topics]
 

Help on MPIDL Routines

How to Run MPIDL Programs

[Previous Topic] [List of Topics]

 

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


MODIFICATION HISTORY:
       15-JAN-03 Written by Dana Mastrovito, PPPL