ReproBLAS
Functions
binnedMPI.h File Reference

binnedMPI.h defines MPI wrapper functions for binned types and the necessary functions to perform reproducible reductions. More...

#include <mpi.h>
#include "binned.h"

Go to the source code of this file.

Functions

MPI_Op binnedMPI_DBDBADD (const int fold)
 Get an MPI_OP to add binned double precision (Y += X) More...
 
MPI_Op binnedMPI_ZBZBADD (const int fold)
 Get an MPI_OP to add binned complex double precision (Y += X) More...
 
MPI_Op binnedMPI_SBSBADD (const int fold)
 Get an MPI_OP to add binned double precision (Y += X) More...
 
MPI_Op binnedMPI_CBCBADD (const int fold)
 Get an MPI_OP to add binned complex single precision (Y += X) More...
 
MPI_Op binnedMPI_DBDBADDSQ (const int fold)
 Get an MPI_OP to add binned double precision scaled sums of squares (Y += X) More...
 
MPI_Op binnedMPI_SBSBADDSQ (const int fold)
 Get an MPI_OP to add binned single precision scaled sums of squares (Y += X) More...
 
MPI_Datatype binnedMPI_DOUBLE_BINNED (const int fold)
 Get an MPI_DATATYPE representing binned double precision. More...
 
MPI_Datatype binnedMPI_DOUBLE_COMPLEX_BINNED (const int fold)
 Get an MPI_DATATYPE representing binned complex double precision. More...
 
MPI_Datatype binnedMPI_FLOAT_BINNED (const int fold)
 Get an MPI_DATATYPE representing binned single precision. More...
 
MPI_Datatype binnedMPI_FLOAT_COMPLEX_BINNED (const int fold)
 Get an MPI_DATATYPE representing binned complex single precision. More...
 
MPI_Datatype binnedMPI_DOUBLE_BINNED_SCALED (const int fold)
 Get an MPI_DATATYPE representing scaled binned double precision. More...
 
MPI_Datatype binnedMPI_FLOAT_BINNED_SCALED (const int fold)
 Get an MPI_DATATYPE representing scaled binned single precision. More...
 

Detailed Description

binnedMPI.h defines MPI wrapper functions for binned types and the necessary functions to perform reproducible reductions.

This header is modeled after cblas.h, and as such functions are prefixed with character sets describing the data types they operate upon. For example, the function dfoo would perform the function foo on double possibly returning a double.

If two character sets are prefixed, the first set of characters describes the output and the second the input type. For example, the function dzbar would perform the function bar on double complex and return a double.

Such character sets are listed as follows:

The goal of using binned types is to obtain either more accurate or reproducible summation of floating point numbers. In reproducible summation, floating point numbers are split into several slices along predefined boundaries in the exponent range. The space between two boundaries is called a bin. Binned types are composed of several accumulators, each accumulating the slices in a particular bin. The accumulators correspond to the largest consecutive nonzero bins seen so far.

The parameter fold describes how many accumulators are used in the binned types supplied to a subroutine (an binned type with k accumulators is k-fold). The default value for this parameter can be set in config.h. If you are unsure of what value to use for fold, we recommend 3. Note that the fold of binned types must be the same for all binned types that interact with each other. Operations on more than one binned type assume all binned types being operated upon have the same fold. Note that the fold of an binned type may not be changed once the type has been allocated. A common use case would be to set the value of fold as a global macro in your code and supply it to all binned functions that you use.

Function Documentation

MPI_Op binnedMPI_CBCBADD ( const int  fold)

Get an MPI_OP to add binned complex single precision (Y += X)

Creates (if it has not already been created) and returns a function handle for an MPI reduction operation that performs the operation Y += X on two arrays of binned complex single precision datatypes of the specified fold. An MPI datatype handle can be created for such a datatype with binnedMPI_FLOAT_COMPLEX_BINNED.

This method may call MPI_Op_create(). If there is an error, this method will call MPI_Abort().

Parameters
foldthe fold of the binned types
Author
Peter Ahrens
Date
18 Jun 2016
MPI_Op binnedMPI_DBDBADD ( const int  fold)

Get an MPI_OP to add binned double precision (Y += X)

Creates (if it has not already been created) and returns a function handle for an MPI reduction operation that performs the operation Y += X on two arrays of binned double precision datatypes of the specified fold. An MPI datatype handle can be created for such a datatype with binnedMPI_DOUBLE_BINNED.

This method may call MPI_Op_create(). If there is an error, this method will call MPI_Abort().

Parameters
foldthe fold of the binned types
Author
Peter Ahrens
Date
18 Jun 2016
MPI_Op binnedMPI_DBDBADDSQ ( const int  fold)

Get an MPI_OP to add binned double precision scaled sums of squares (Y += X)

Creates (if it has not already been created) and returns a function handle for an MPI reduction operation that performs the operation Y += X where X and Y represent scaled sums of squares on two arrays of scaled binned double precision datatypes of the specified fold. An MPI datatype handle can be created for such a datatype with binnedMPI_DOUBLE_BINNED_SCALED.

This method may call MPI_Op_create(). If there is an error, this method will call MPI_Abort().

Parameters
foldthe fold of the binned types
Author
Peter Ahrens
Date
18 Jun 2016
MPI_Datatype binnedMPI_DOUBLE_BINNED ( const int  fold)

Get an MPI_DATATYPE representing binned double precision.

Creates (if it has not already been created) and returns a datatype handle for an MPI datatype that represents an binned double precision type.

This method may call MPI_Type_contiguous() and MPI_Type_commit(). If there is an error, this method will call MPI_Abort().

Parameters
foldthe fold of the binned types
Author
Peter Ahrens
Date
18 Jun 2016
MPI_Datatype binnedMPI_DOUBLE_BINNED_SCALED ( const int  fold)

Get an MPI_DATATYPE representing scaled binned double precision.

Creates (if it has not already been created) and returns a datatype handle for an MPI datatype that represents a scaled binned double precision type.

This method may call MPI_Type_contiguous() and MPI_Type_commit(). If there is an error, this method will call MPI_Abort().

Parameters
foldthe fold of the binned types
Author
Peter Ahrens
Date
18 Jun 2016
MPI_Datatype binnedMPI_DOUBLE_COMPLEX_BINNED ( const int  fold)

Get an MPI_DATATYPE representing binned complex double precision.

Creates (if it has not already been created) and returns a datatype handle for an MPI datatype that represents an binned complex double precision type.

This method may call MPI_Type_contiguous() and MPI_Type_commit(). If there is an error, this method will call MPI_Abort().

Parameters
foldthe fold of the binned types
Author
Peter Ahrens
Date
18 Jun 2016
MPI_Datatype binnedMPI_FLOAT_BINNED ( const int  fold)

Get an MPI_DATATYPE representing binned single precision.

Creates (if it has not already been created) and returns a datatype handle for an MPI datatype that represents a binned single precision type.

This method may call MPI_Type_contiguous() and MPI_Type_commit(). If there is an error, this method will call MPI_Abort().

Parameters
foldthe fold of the binned types
Author
Peter Ahrens
Date
18 Jun 2016
MPI_Datatype binnedMPI_FLOAT_BINNED_SCALED ( const int  fold)

Get an MPI_DATATYPE representing scaled binned single precision.

Creates (if it has not already been created) and returns a datatype handle for an MPI datatype that represents a scaled binned single precision type.

This method may call MPI_Type_contiguous() and MPI_Type_commit(). If there is an error, this method will call MPI_Abort().

Parameters
foldthe fold of the binned types
Author
Peter Ahrens
Date
18 Jun 2016
MPI_Datatype binnedMPI_FLOAT_COMPLEX_BINNED ( const int  fold)

Get an MPI_DATATYPE representing binned complex single precision.

Creates (if it has not already been created) and returns a datatype handle for an MPI datatype that represents a binned complex single precision type.

This method may call MPI_Type_contiguous() and MPI_Type_commit(). If there is an error, this method will call MPI_Abort().

Parameters
foldthe fold of the binned types
Author
Peter Ahrens
Date
18 Jun 2016
MPI_Op binnedMPI_SBSBADD ( const int  fold)

Get an MPI_OP to add binned double precision (Y += X)

Creates (if it has not already been created) and returns a function handle for an MPI reduction operation that performs the operation Y += X on two arrays of binned double precision datatypes of the specified fold. An MPI datatype handle can be created for such a datatype with binnedMPI_FLOAT_BINNED.

This method may call MPI_Op_create(). If there is an error, this method will call MPI_Abort().

Parameters
foldthe fold of the binned types
Author
Peter Ahrens
Date
18 Jun 2016
MPI_Op binnedMPI_SBSBADDSQ ( const int  fold)

Get an MPI_OP to add binned single precision scaled sums of squares (Y += X)

Creates (if it has not already been created) and returns a function handle for an MPI reduction operation that performs the operation Y += X where X and Y represent scaled sums of squares on two arrays of scaled binned single precision datatypes of the specified fold. An MPI datatype handle can be created for such a datatype with binnedMPI_FLOAT_BINNED_SCALED.

This method may call MPI_Op_create(). If there is an error, this method will call MPI_Abort().

Parameters
foldthe fold of the binned types
Author
Peter Ahrens
Date
18 Jun 2016
MPI_Op binnedMPI_ZBZBADD ( const int  fold)

Get an MPI_OP to add binned complex double precision (Y += X)

Creates (if it has not already been created) and returns a function handle for an MPI reduction operation that performs the operation Y += X on two arrays of binned complex double precision datatypes of the specified fold. An MPI datatype handle can be created for such a datatype with binnedMPI_DOUBLE_COMPLEX_BINNED.

This method may call MPI_Op_create(). If there is an error, this method will call MPI_Abort().

Parameters
foldthe fold of the binned types
Author
Peter Ahrens
Date
18 Jun 2016