OPEN_MP_STUBS
A C "Stub" Library for OpenMP


OPEN_MP_STUBS is a C library of routines which constitute a "stub" implementation of the OpenMP 2.5 standard.

A stub library is useful when you want to try out a program on a system that does not have OpenMP, or when you need to have a formally complete program to analyze, or in other cases where you want to ignore the actual OpenMP library. A stub library can also help to understand the structure of the actual library.

Related Data and Programs:

MPI is a library of routines for doing parallel programming in a distributed memory environment, using message passing.

OPEN_MP is a directory of C examples which illustrate the use of the OpenMP application program interface for carrying out parallel computations in a shared memory environment.

OPEN_MP_ECLIPSE is a set of examples for running C++ OpenMP programs on Eclipse, an IBM SP cluster that was once available at FSU.

OPEN_MP_STUBS is also available in a C++ version and a FORTRAN77 version and a FORTRAN90 version.

PESSL is a parallel mathematical library for use on IBM SP systems.

PETSC is a scientific library for parallel computations.

Reference:

  1. Rohit Chandra, Leonardo Dagum, Dave Kohr, Dror Maydan, Jeff McDonald, Ramesh Menon,
    Parallel Programming in OpenMP,
    Morgan Kaufmann, 2001,
    ISBN: 1-55860-671-8,
    LC: QA76.642.P32.
  2. Barbara Chapman, Gabriele Jost, Ruud vanderPas, David Kuck,
    Using OpenMP: Portable Shared Memory Parallel Processing,
    MIT Press, 2007,
    ISBN13: 978-0262533027.
  3. Tim Mattson, Rudolf Eigenmann,
    OpenMP: An API for Writing Portable SMP Application Software,
    a slide presentation,
    open_mp_slides.pdf.
  4. libgomp.pdf,
    The GNU OpenMP Implementation.
  5. The OpenMP web site
  6. OpenMP Application Program Interface,
    Version 2.5,
    May 2005,
    open_mp_2.5.pdf

Source Code:

Examples and Tests:

Note that these examples are normally run in parallel with OpenMP. The point being made here is that such programs can be run sequentially, as though OpenMP were available, by calling the OPEN_MP_STUBS library. They don't run well (fast) - it's just remarkable that they run at all.

COMPUTE_PI shows how information can be shared. Several processors need to compute pieces of a sum that will approximate pi.

HELLO is a very simple program which calls an OpenMP subroutine to set the number of threads, and then has each thread say hello;

HELMHOLTZ is a program that solves the Helmholtz equation on a rectangular grid, using Jacobi iteration with overrelaxation;

MD is a time dependent molecular dynamics code;

List of Routines:

Again, please don't be confused. These routines have the same names as the real OpenMP library; they just don't do anything. Well, not much, anyway. They do just enough to let a program run in sequential mode.

You can go up one level to the C source codes.


Last revised on 21 November 2007.