Normal usage

You can still use the following command:

gp -f input.file

This will run the original code up to the smallest detail. This may be a good start for implementing your problems. So if you have any problems try the pure sequentail version of the kernel first. If you run into problems after you have confirmed the correct execution using the sequential please let me know.

To invoke the parallel execution your need only one additional parameter:

gp -f input.file -m

This -m stands for master and is really the only parameter that will initiate the parallel version of the kernel. The program invoked in this way will be the master and will launch other tasks which will do the actual computations. That is really all there is to it, nice isn't it?

When invoked in this way the parallel kernel will inspect the PVM and determine the number of computing hosts that are available. The kernel will then distribute the subpopulations according to the number of nodes found.

For those who want to adjust artificially the number of CPU's at run-time there is on additional parameter.

gp -f input.file -m -h 4

What this parameter does is tell the kernel to start the specified number of tasks. This can more than the number of CPU's at you have at your disposal in your parallel virtual machine. And you can of course also reduce the number of tasks in the same way.

Why would you want this feature anyway? Well it allows you to simulate the parallel operation of the kernel using only 1 CPU (this is how I how I used it most since I can debug the kernel in this way, see underneath). But if you happen to have a cluster of say 5 dual CPU machines then you could specify -h 10 and in that way make the most out of them.

By default the kernel will run in synchronous mode. Since the kernel can work both in synchronous and asynchronous mode you can use a command line parameter to invoke asynchronous operations of the kernel.

gp -f input.file -m -a

The asynchronous mode is specified by the -a on the command line.

Debugging parameters

If you want to debug the kernel or your program you can add -b followed by a number on the command line. The kernel will open debugging windows so that you can debug the slave at ease. See the debugging faq for more explaination. In this example we want to use 10 nodes and we want to debug the first 5 tasks started by the kernel. This only works if you use only 1 CPU!

gp -f input.file -m -h 10 -b 5

The information provided on this page is copyrighted © by the Free University of Brussels and provided as is.
From more information contact Johan Parent