Adapting a parameter space study for Legion

Table of Contents
Running a parameter space study
Running multiple copies of a program
Other on-line tutorials & documentation
Click on the to move to the selected text.

Depending on how your system is set up, you may need to set up your access to your system before you can run Legion commands. This will probably involve running a command such as this:
$ . ~legion/setup.sh
$ source ~legion/setup.csh
The exact syntax will depend on what kind of shell you are using and where your Legion files are installed (i.e., the value of ~legion will depend on your individual Legion net). Consult your system administrator for more information.

The following style conventions are used in these tutorials:

Running a parameter space study
This tutorial discusses the tools for adapting and running a parameter space study in Legion. The mechanics of running a Legion application will, of course, vary widely from one application to another. Generally, however, you will want to compile, register, and run individual applications with commands written specifically for that purpose. A parameter space study, however, can be adapted and run with only a few tools and doesn't require much knowledge of Legion. You may want to start a tty object (a special Legion object that monitors and directs a shell's output) and you may wish to arrange your context space to suit your application and your resources. if you wish to run your program on different machines you may also wish to use a makefile.

Running multiple copies of a program
The legion_run_multi command runs a previously registered serial program with different input files, using a simple specification file to describe the names of the expected input and output files. It is essentially a Perl script that runs serial copies of legion_run. The usage is:
legion_run_multi [-v] {-n <number of processors>}
     [-s <schedule file name>] {-f <specification file name>} 
     <program class name> [<arg1> <arg2> ... <argn>]

You must have already registered the program name and created the specification file. The specification file might look something like this:

in in.dat in.dat.*
constant const.dat
out out.dat

The in keyword identifies the line as a description of the input files. The in.dat string is the file name that the serial program expects for its input file. The final string, in.dat.*, is a pattern that the legion_run_multi will use to match all of the different input files in the current directory that will be individually fed to different runs of the serial program. The keyword constant names a single input file (const.dat)that is fed to each run.

The keyword out indicates the output file specification. The out.dat string is the name of the output file from the serial program. If in.dat.123 is an input file, for example, the command will direct the output to out.dat.123. You can use the keyword console to denote a set of files that will receive stdout from each serial run (i.e., you will end up with the same number of files as serial runs).

console console.dat

If you do not use the console keyword, stdout will be sent to your Legion tty object (if you have not yet created a tty object, see the tutorial).

For example, if you use following specification file:

in input input.*
constant constant.dat
out output output.*
console console
and the following files:
input.1 input.2 constant.dat
then the following output files will be produced:
output.1 output.2 console.1 console.2

More information about legion_run_multi is available here or in the man page. The Basic User manual has much more information on running applications in Legion, starting in section 8.0.

Other relevant on-line documents:
Click on the to go to the page.
Logging in to a running Legion system
Introduction to Legion context space
Context-related commands
Legion tty objects
Running a PVM code in Legion
Running a Legion MPI code
Running native MPI code
Quick list of all 1.7 Legion commands
Usage of all 1.7 Legion commands
FAQs for running programs in Legion
Starting a new Legion system
Legion security
Legion host and vault objects
Adding host and vault objects
Brief descriptions of all on-line tutorials

Last modified: Wed Jul 14 14:16:47 1999


[Home] [General] [Documentation] [Software]
[Testbeds] [Et Cetera] [Map/Search]