FD2D_HEAT_EXPLICIT_SPMD is a MATLAB program which uses the SPMD (single program, multiple data) command to estimate the time evolution of heat over a 2D region.
The SPMD command allows a programmer to set up parallel computations that require more user control than the simple parfor command. In particular, users familiar with MPI will see many features that are similar to that parallel programming model, including the ability to send and receive messages. (Messages will NOT be exhibited in this simple example, however!)
The function has the form:
function y = heat2d_fun ( x )where
Since the point here is to watch the evolution of the blurred pictures, this program has only been set up to run locally and interactively, using the matlabpool command;
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
FD2D_HEAT_EXPLICIT_SPMD is available in a MATLAB version.
CONTRAST_SPMD, a MATLAB program which demonstrates the SPMD parallel programming feature for image operations; the client reads an image, the workers increase contrast over separate portions, and the client assembles and displays the results.
CONTRAST2_SPMD, a MATLAB program which demonstrates the SPMD parallel programming feature for image operations; this improves the contrast_spmd program by allowing the workers to share some data; this makes it possible to eliminate artificial "seams" in the processed image.
DIJKSTRA_SPMD. a MATLAB program which uses the SPMD feature to parallelize a simple example of Dijkstra's minimum distance algorithm for graphs.
FACE_SPMD, a MATLAB program which demonstrates the SPMD parallel programming feature; the client has a 3D box that has been dissected into tetrahedrons. Multiple workers cooperate to construct a list of the triangular faces that lie on the boundaries of the box.
IMAGE_DENOISE_SPMD, a MATLAB program which demonstrates the SPMD parallel programming feature for image operations; the client reads an image, the workers process portions of it, and the client assembles and displays the results.
MATRIX_ASSEMBLE_SPMD, a MATLAB program which demonstrates the SPMD parallel programming feature by having each worker assemble part of the Hilbert matrix, which is then combined into one array by the client program.
PLOT_SPMD, a MATLAB library which demonstrates the SPMD parallel programming feature, by having a number of labs compute parts of a sine plot, which is then displayed by the client process.
PRIME_SPMD, a MATLAB program which counts the number of primes between 1 and N; running in parallel using MATLAB's "SPMD" feature.
QUAD_SPMD, a MATLAB program which estimates an integral using quadrature; running in parallel using MATLAB's "SPMD" feature.
The User's Guide for the Parallel Computing Toolbox is available at http://www.mathworks.com/access/helpdesk/help/pdf_doc/distcomp/distcomp.pdf
You can go up one level to the MATLAB source codes.