QUAD2_OPENMP
Quadrature using OpenMP


QUAD2_OPENMP is a C program which approximates a multidimensional integral using a quadrature rule. The quadrature computation is done with OpenMP.

The quadrature rule is defined by three text files:

  1. the "X" file lists the abscissas (N rows, M columns);
  2. the "W" file lists the weights (N rows);
  3. the "R" file lists the integration region corners (2 rows, M columns);

The program assumes that the names of the three files can be deduced from the file_root. For instance, if the file_root was "cc_d2_level5", this implies that

  1. the "X" file is cc_d2_level5_x.txt;
  2. the "W" file is cc_d2_level5_w.txt;
  3. the "R" file is cc_d2_level5_r.txt;

Usage:

        export OMP_NUM_THREADS=2
        ./quad2_openmp file_root
      
where file_root is the "root" name for a set of three files that define a quadrature rule.

Licensing:

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

Languages:

QUAD2_OPENMP is available in a C version and a C++ version and a FORTRAN90 version.

Related Data and Programs:

CLENSHAW_CURTIS is a C++ library which can set up a Clenshaw Curtis quadrature grid in multiple dimensions.

DIJKSTRA_OPENMP a C program which uses OpenMP to parallelize a simple example of Dijkstra's minimum distance algorithm for graphs.

FFT_OPENMP is a C program which demonstrates the computation of a Fast Fourier Transform in parallel, using OpenMP.

FUNCTIONS_OPENMP, a C program which demonstrates the behavior of a few of the OpenMP library functions.

HEATED_PLATE_OPENMP is a C program which solves the steady (time independent) heat equation in a 2D rectangular region, using OpenMP to run in parallel.

HELLO_OPENMP, a C program which prints out "Hello, world!" using the OpenMP parallel programming environment.

IMAGE_DENOISE_OPENMP, a C library which applies simple filtering techniques to remove noise from an image, carrying out the operation in parallel using OpenMP.

INTEGRAL_TEST is a FORTRAN90 program which uses test integrals to evaluate sets of quadrature points.

JACOBI_OPENMP, a C program which illustrates the use of the OpenMP application program interface to parallelize a Jacobi iteration solving A*x=b.

JULIA_OPENMP, a C program which produces an image of a Julia set, using OpenMP to carry out the computation in parallel.

LEGENDRE_RULE_FAST, is a C program which uses a fast (order N) algorithm to compute a Gauss-Legendre quadrature rule of given order.

MD_OPENMP is a C program which carries out a molecular dynamics simulation using OpenMP.

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

MULTITASK_OPENMP, a C program which demonstrates how to "multitask", that is, to execute several unrelated and distinct tasks simultaneously, using OpenMP for parallel execution.

MXM_OPENMP, a C program which computes a dense matrix product C=A*B, using OpenMP for parallel execution.

OPENMP is a library of routines, and a set of compiler directives, which enable parallel programming in a shared memory environment.

OPENMP_RCC, C programs which illustrate how a C program, using OpenMP, can be compiled and run in batch mode on the FSU High Performance Computing (HPC) cluster operated by the Research Computing Center (RCC).

PRIME_OPENMP is a C program which counts the number of primes between 1 and N, using OpenMP for parallel execution.

PRODUCT_RULE is a C++ program which can create a multidimensional quadrature rule as a product of one dimensional rules.

QUAD_MPI is a C program which approximates an integral using a quadrature rule, and carries out the computation in parallel using MPI.

QUADRATURE_RULES is a dataset directory which contains many examples of files that define quadrature rules.

QUADRATURE_TEST is a C++ program which reads files defining a quadrature rule, and applies them to all the test integrals defined by TEST_NINT.

QUADRULE is a C library which defines quadrature rules for 1D domains.

SANDIA_RULES, a C library which produces 1D quadrature rules of Chebyshev, Clenshaw Curtis, Fejer 2, Gegenbauer, generalized Hermite, generalized Laguerre, Hermite, Jacobi, Laguerre, Legendre and Patterson types.

SATISFY_OPENMP is a C program which demonstrates, for a particular circuit, an exhaustive search for solutions of the circuit satisfy problem, using OpenMP for parallel execution.

SCHEDULE_OPENMP is a C program which demonstrates the default, static, and dynamic methods of "scheduling" loop iterations in OpenMP to avoid work imbalance.

SGEFA_OPENMP is a C program which reimplements the SGEFA/SGESL linear algebra routines from LINPACK for use with OpenMP.

STROUD is a C++ library which contains quadrature rules for a variety of unusual areas, surfaces and volumes in 2D, 3D and N-dimensions.

TEST_NINT is a C++ library which defines a set of integrand functions to be used for testing multidimensional quadrature rules and routines.

TESTPACK is a C++ library which defines a set of integrands used to test multidimensional quadrature.

ZIGGURAT_OPENMP, a C program which demonstrates how the ZIGGURAT library can be used to generate random numbers in an OpenMP parallel program.

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
  4. The OpenMP web site
  5. OpenMP Architecture Review Board,
    OpenMP C and C++ Application Program Interface,
    Version 2.0,
    March 2002.
  6. OpenMP Architecture Review Board,
    OpenMP Fortran Application Program Interface,
    Version 2.0,
    November 2000.

Source Code:

Examples and Tests:

CC_D10_LEVEL4 is a Clenshaw-Curtis sparse grid rule for a 10 dimensional hypercube, at the 4th level of fineness.

CC_D10_LEVEL5 is a Clenshaw-Curtis sparse grid rule for a 10 dimensional hypercube, at the 5th level of fineness.

List of Routines:

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


Last revised on 28 April 2008.