Friday, March 30, 2012

MPI

To be used for   MPI_REDUCE, MPI_ALLREDUCE, MPI_REDUCE_SCATTER, and MPI_SCAN
 
 
There are a number of predefined reduction operations for use with MPI_ALLREDUCE, MPI_EXSCAN, MPI_REDUCE, MPI_REDUCE_SCATTER, and MPI_SCAN.
To invoke a predefined operation, place any of the following reductions in variable op.

Operation
Description
MPI_BAND
bitwise AND
MPI_BOR
bitwise OR
MPI_BXOR
bitwise XOR
MPI_LAND
logical AND
MPI_LOR
logical OR
MPI_LXOR
logical XOR
MPI_MAX
maximum value
MPI_MAXLOC
maximum value and location
MPI_MIN
minimum value
MPI_MINLOC
minimum value and location
MPI_PROD
product
MPI_REPLACE
f(a,b) = b (the current value in the target memory is replaced by the value supplied by the origin)
MPI_SUM
sum
Source

MPI_Op_create

int MPI_Op_create(
  MPI_User_function *function,
  int commute,
  MPI_Op *op
);
source

MPI DATA types


Data type
Description
MPI_BYTE
Untyped byte data
MPI_LB
Explicit lower bound marker
MPI_PACKED
Packed data (byte)
MPI_UB
Explicit upper bound marker
Data types for C language bindings
Data type
Description
MPI_CHAR
8-bit character
MPI_DOUBLE
64-bit floating point
MPI_FLOAT
32-bit floating point
MPI_INT
32-bit integer
MPI_LONG
32-bit integer
MPI_LONG_DOUBLE
64-bit floating point
MPI_LONG_LONG
64-bit integer
MPI_LONG_LONG_INT
64-bit integer
MPI_SHORT
16-bit integer
MPI_SIGNED_CHAR
8-bit signed character
MPI_UNSIGNED
32-bit unsigned integer
MPI_UNSIGNED_CHAR
8-bit unsigned character
MPI_UNSIGNED_LONG
32-bit unsigned integer
MPI_UNSIGNED_LONG_LONG
64-bit unsigned integer
MPI_UNSIGNED_SHORT
16-bit unsigned integer
MPI_WCHAR
Wide (16-bit) unsigned character

Example to write a distributed 2D array







No comments:

Post a Comment