md_parfor, a MATLAB code which runs the md() molecular dynamics program, running in parallel using parfor().
A single for statement in the compute() function was replaced by a parfor. The program was simplified so that it takes no input arguments (the former input quantities are hard-coded internally) and returns three numbers as function results, namely the values, at the final time step, of the potential energy, kinetic energy, and the relative energy error.
Thus, the basic function now has the form:
function [ pe, ke, e_lost ] = md_parfor ( )where
Depending on the situation, the function could be executed in parallel:
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
md_parfor is available in a MATLAB version.
collatz_parfor, a MATLAB code which seeks the maximum Collatz sequence between 1 and N, running in parallel using parfor().
heated_plate_parfor, a MATLAB code which solves the steady (time independent) heat equation in a 2D rectangular region, running in parallel using parfor().
hello_parfor, a MATLAB code which prints out "Hello, world!" multiple times, running in parallel using parfor().
high_card_parfor, a MATLAB code which computes statistics for a card game in which you are required to guess the location of the highest card, running in parallel using parfor().
matrix_assemble_parfor, a MATLAB code which assembles the Hilbert matrix, running in parallel using parfor()..
md, a MATLAB code which carries out a molecular dynamics simulation.
ode_sweep_parfor, a MATLAB code which computates a grid of solutions to a parameterized system of ODE's, running in parallel using parfor().
prime_parfor, a MATLAB code which counts the number of primes between 1 and N; running in parallel using parfor().
quad_parfor, a MATLAB code which estimates an integral using quadrature; running in parallel using parfor().
satisfy_parfor, a MATLAB code which demonstrates, for a particular circuit, an exhaustive search for solutions of the circuit satisfiability problem, running in parallel using parfor().
sparse_parfor, a MATLAB code which constructs individual blocks of a matrix in parallel, assembled using the sparse() command, running in parallel using parfor().
trapz_parfor, a MATLAB code which calls the trapz() function to compute several integral approximations, running in parallel using parfor().