hello_parfor


hello_parfor, a MATLAB code which uses the parfor() statement for parallel execution and simply prints "Hello, world!" multiple times.

Here, the underlying MATLAB program is a simple function that says "Hello, world!" a certain number of times. The loop used to print these statements is controlled by a parfor command.

The function has the form:

function hello_parfor ( n )
where

Licensing:

The computer code and data files described and made available on this web page are distributed under the MIT license

Languages:

hello_parfor is available in a MATLAB version.

Related Data and Programs:

hello_parfor_test

collatz_parfor, a MATLAB program which seeks the maximum Collatz sequence between 1 and N, running in parallel using MATLAB's parfor feature.

HEATED_PLATE_PARFOR, a MATLAB program which solves the steady (time independent) heat equation in a 2D rectangular region, using MATLAB's parfor facility to run in parallel.

HELLO, a MATLAB program which prints out "Hello, world!".

HIGH_CARD_PARFOR, a MATLAB program which uses the parfor statement to compute in parallel the statistics for a card game in which you are required to guess the location of the highest card.

MATRIX_ASSEMBLE_PARFOR, a MATLAB program which demonstrates the parfor parallel programming feature by assembling the Hilbert matrix in a parallel loop.

MD_PARFOR, a MATLAB program which carries out a molecular dynamics simulation, running in parallel using MATLAB's "PARFOR" feature.

ODE_SWEEP_PARFOR, a MATLAB program which demonstrates how the PARFOR command can be used to parallelize the computation of a grid of solutions to a parameterized system of ODE's.

PRIME_PARFOR, a MATLAB program which counts the number of primes between 1 and N; running in parallel using MATLAB's "PARFOR" feature.

QUAD_PARFOR, a MATLAB program which estimates an integral using quadrature; running in parallel using MATLAB's "PARFOR" feature.

SATISFY_PARFOR, a MATLAB program which demonstrates, for a particular circuit, an exhaustive search for solutions of the circuit satisfiability problem, running in parallel using MATLAB's "PARFOR" feature.

SPARSE_PARFOR, a MATLAB library which demonstrates how a sparse matrix can be constructed by evaluating individual blocks in parallel with the parfor command, and then assembled (on a single processor) using the sparse() command.

TRAPZ_PARFOR, a MATLAB library which shows how a parfor loop can be used to call the trapz() function, to compute several integral approximations in parallel.

Reference:

Source Code:


Last revised on 10 December 2023.