Parallel Demonstration Program

The task that I just completed requires me to create a set of scripts that can configure random Ubuntu computers as nodes in the MPI computing cluster. All this is done, and the nodes can interact with each other properly. However, now I would like to demonstrate the effectiveness of the mentioned MPI cluster by throwing a parallel program on it. I'm just looking for a direct brute force calculation that can divide the work between the number of available processes (= nodes): if one node takes 10 seconds to run the program, 4 nodes should only take 2.5.

With this in mind, I was looking for simple computing programs written in C. For any purists, the program is not really part of my assignment, since the course I take is purely systemic management. I just need something to show that my cluster is working. I have some programming experience, but not much in C, and I don't have MPI. I found quite a few sample programs, but none of them seem to actually work in parallel. They distribute all the stages between my nodes, so if one node has a faster processor, the total time will decrease, but adding additional nodes does nothing to speed up the calculation.

Am I doing something wrong? Are the programs I found simply not parallel? Do I need to learn C programming for MPI to write my own program? Are there other parallel MPI programs that I can use to demonstrate how my cluster works?

EDIT

Thanks to the answers below, I was able to get several MPI scripts, including the sum of the first N natural numbers (which is not very useful when fulfilling data type restrictions), counting and generating prime numbers and Monte Carlo Pi calculation. Interestingly, only programs with a large number of programs realize (sometimes dramatic) performance improvements with the help of several nodes / processes.

, , , -, - . mpiexec -disable-hostname-propagation , : MPI (R), TCP- . , , Beowulf, DHCP/DNS node.

+5
2

- .

, , raytracing - , OpenMPI. / /, , MPI :)

- N . , .

, .

MPI, grep, IO .


, MPI , , . , . , parallelism , - , , , .

, MPI . node , , . , .

MPI , , , MPI_SEND. , , MPI, "" , , . , :)

/, ...

, , , :)

, . , :)


EDIT2

, , MPI, - Pi.

1, 1, Pi, , .

: (x, y) x, y [0, 1] x² + y² <= 1.

Pi

4 * Points in Circle / total Points

MPI , , , , .

+4

, , . " " "/" ( "/", ). , :

  • ;
  • ;
  • .

. "" / (, ). "" . : . , : .

. , (, GigE). , , . MPI, . , .. . MPI , , .

MPI , /. - , MPI, intercommunicators, .

+2

All Articles