This page contains examples for COMP4510.
Example MPI programs
A bit of C/MPI code to test the LAMMPI support in the Linux lab
(MPIhello2.c)
.
The example MPI vector summation code
(vsum.c)
.
The example MPI vector summation code with timer calls
(vsumTimed.c)
.
The example MPI vector summation code using scatter/gather
(vsum_scatter_gather.c)
.
The example MPI vector summation code using scatter/reduce
(vsum_scatter_reduce.c)
.
Some example MPI matrix multiplication code
(mmult.c)
.
Some example MPI matrix multiplication code using Cannon's algorithm and a virtual 2D Cartesian grid topology
(mmult_cannon.c)
.
The
cart.h
file required by mmult_cannon.c.
Example OpenMP programs
A bit of C/OpenMP code to test the OpenMP support on the gcc compiler
(tstOMP.c)
.
The sample matrix muliplication code (serial and OpenMP parallel) is available in the subdirectory
matrixMultiplication
Example Serial Histogram Equalization Program
The sample matrix histogram equalization code (serial only) as well as sample portable gray map (PGM) files are available in the subdirectory
histogramEqualization
Example Timer Code
A bit of C code to do code timing
TimerCode.c,
which can be used in assignment 1.
Example MPI Code for testing
A simple embarassingly parallel C/MPI program to calculate pi,
cpi.c,
which can be used to test that you have Lam/MPI working in the lab.
A basic .mpihosts file,
.mpihosts,
which you can use with Lam/MPI in the lab. You can use any of the machine names in the lab. I just picked the first 8 bird names I thought of.
University of Manitoba Computer Science Homepage
Page Administrator --
pgraham@cs.umanitoba.ca
Computer Science WWW Administrator --
www@cs.umanitoba.ca
Copyright ©
Peter Graham
Last update: