Run an example program

Describes how to run an example program with MPI.

Before you begin

Make sure that you have compiled the example program. See Compilers for example programs.

About this task

This example uses MPI, so you must run it on a compute node on your cluster. The help pages and support staff on your site can tell you exactly how to do this on your machine. The simplest way when running small programs is often to request an interactive session.

Procedure

Type the command:

$ qsub -I
qsub: waiting for job 31337 to start
qsub: job 31337 ready
$ cd /opt/linaro/forge/x.y.z/examples
$ mpiexec -n 4 ./wave_c
Wave solution running with 4 processes

Results

If the output is similar to this, the example program is compiled and working correctly.

0: points = 1000000, running for 30 seconds
points / second: 63.9M (16.0M per process)
compute / communicate efficiency: 94% | 97% | 100%

Points for validation:
0:0.00  200000:0.95  400000:0.59  600000:-0.59  800000:-0.95  999999:0.00
wave finished

Next steps

Generate a performance report for an example program