MPI concurrent wave equation and code
The following code was borrowed from Blaise Barney of Lawrence Livermore National Laboratory. It is an MPI concurrent wave equation program that the author implemented on his 64-core Pi3 supercomputer.
The code essentially solves a one-dimensional wave equation and it has the following form:
A(i,t+1) = (2.0*A(i,t)) - A(i,t-1)+(c*(A(i-1,t)-(2.0*A(i,t))+A(i+1,t)))
Please see; http://www.robopgmr.com/?p=2780 for more in-depth details and instructions.
Additionally, the code discretizes said vibrating string into points (100 in this slightly modified version of the code) along its length, and calculates the amplitudes of those points as per the number of time steps values (five for this code run) you entered initially, and then displays the results. The author employed all 64 cores of his Pi3 to generate the amplitudes at the points.
Note
The code was initially executed/tested on the author's main PC. The .c
file was subsequently SFTP over...