Running Serial Programs in Parallel

For jobs that are not "MPI-aware", "LAM-aware", or "PVM-aware", but need to be started in parallel, Scyld ClusterWare provides the parallel execution utilities mpprun and beorun. These utilities are more sophisticated than bpsh, in that they can automatically select ranges of nodes on which to start your program, run tasks on the master node, determine the number of CPUs on a node, and start a copy on each CPU. Thus, mpprun and beorun provide you with true "dynamic execution" capabilities, whereas bpsh provides "directed execution" only.

mpprun and beorun are very similar, and have similar parameters. They differ only in that mpprun runs jobs sequentially on the selected processors, while beorun runs jobs concurrently on the selected processors.

mpprun

mpprun is intended for applications rather than utilities, and runs them sequentially on the selected nodes. The basic syntax of mpprun is as follows:

[user@cluster username]$ mpprun [options]  app arg1 arg2...

where app is the application program you wish to run; it need not be a parallel program. The arg arguments are the values passed to each copy of the program being run.

Options

mpprun includes options for controlling various aspects of the job, including the ability to:

  • Specify the number of processors on which to start copies of the program

  • Start one copy on each node in the cluster

  • Start one copy on each CPU in the cluster

  • Force all jobs to run on the master node

  • Prevent any jobs from running on the master node

The most interesting of the options is the --map option, which lets the user specify which nodes will run copies of a program; an example is provided in the next section. This argument, if specified, overrides the mapper's selection of resources that it would otherwise use.

See the Reference Guide for a complete list of options for mpprun.

Examples

Run 16 tasks of program app:

[user@cluster username]$ mpprun -np 16  app infile outfile

Run 16 tasks of program app on any available nodes except nodes 2 and 3:

[user@cluster username]$ mpprun -np 16 --exclude 2:3  app infile outfile

Run 4 tasks of program app with task 0 on node 4, task 1 on node 2, task 2 on node 1, and task 3 on node 5:

[user@cluster username]$ mpprun --map 4:2:1:5  app infile outfile

beorun

beorun is intended for applications rather than utilities, and runs them concurrently on the selected nodes. The basic syntax of beorun is as follows:

[user@cluster username]$ beorun [options]  app arg1 arg2...

where app is the application program you wish to run; it need not be a parallel program. The arg arguments are the values passed to each copy of the program being run.

Options

beorun includes options for controlling various aspects of the job, including the ability to:

  • Specify the number of processors on which to start copies of the program

  • Start one copy on each node in the cluster

  • Start one copy on each CPU in the cluster

  • Force all jobs to run on the master node

  • Prevent any jobs from running on the master node

The most interesting of the options is the --map option, which lets the user specify which nodes will run copies of a program; an example is provided in the next section. This argument, if specified, overrides the mapper's selection of resources that it would otherwise use.

See the Reference Guide for a complete list of options for beorun.

Examples

Run 16 tasks of program app:

[user@cluster username]$ beorun -np 16  app infile outfile

Run 16 tasks of program app on any available nodes except nodes 2 and 3:

[user@cluster username]$ beorun -np 16 --exclude 2:3  app infile outfile

Run 4 tasks of program app with task 0 on node 4, task 1 on node 2, task 2 on node 1, and task 3 on node 5:

[user@cluster username]$ beorun --map 4:2:1:5  app infile outfile