Sierra Toolkit Version of the Day
Parallel_module

Typedefs

typedef MPI_Comm stk::ParallelMachine
typedef MPI_Datatype stk::ParallelDatatype

Functions

ParallelMachine stk::parallel_machine_null ()
 parallel_machine_null returns MPI_COMM_NULL if MPI is enabled.
ParallelMachine stk::parallel_machine_init (int *argc, char ***argv)
 parallel_machine_init calls MPI_Init.
void stk::parallel_machine_finalize ()
 parallel_machine_finalize calls MPI_Finalize.
void stk::all_write_string (ParallelMachine, std::ostream &, const std::string &)
 Write string from any or all processors to the ostream on the root processor.
void stk::all_reduce_sum (ParallelMachine, const double *local, double *global, unsigned count)
 Parallel summation to all processors.
void stk::all_reduce_sum (ParallelMachine, const float *local, float *global, unsigned count)
 Parallel summation to all processors.
void stk::all_reduce_sum (ParallelMachine, const int *local, int *global, unsigned count)
 Parallel summation to all processors.
void stk::all_reduce_sum (ParallelMachine, const size_t *local, size_t *global, unsigned count)
 Parallel summation to all processors.
void stk::all_reduce_bor (ParallelMachine, const unsigned *local, unsigned *global, unsigned count)
 Parallel bitwise-or to all processors.
template<class ReduceOp >
void stk::all_reduce (ParallelMachine, const ReduceOp &)

Typedef Documentation

typedef MPI_Comm stk::ParallelMachine
Todo:
REFACTOR: Figure out a better way to typedef for non-MPI builds

Definition at line 32 of file Parallel.hpp.

typedef MPI_Datatype stk::ParallelDatatype
Todo:
REFACTOR: Figure out a better way to typedef for non-MPI builds

Definition at line 36 of file Parallel.hpp.


Function Documentation

ParallelMachine stk::parallel_machine_null ( ) [inline]

parallel_machine_null returns MPI_COMM_NULL if MPI is enabled.

Returns:
a ParallelMachine ...

Definition at line 43 of file Parallel.hpp.

ParallelMachine stk::parallel_machine_init ( int *  argc,
char ***  argv 
) [inline]

parallel_machine_init calls MPI_Init.

Parameters:
argc
argv
Returns:
ParallelMachine (MPI_COMM_WORLD)

Definition at line 54 of file Parallel.hpp.

void stk::all_write_string ( ParallelMachine  arg_comm,
std::ostream &  arg_root_os,
const std::string &  arg_msg 
)

Write string from any or all processors to the ostream on the root processor.

Todo:
REFACTOR The per-processor separator needs to be addressed. Already created a duplicate for deferred error messages which could be replacement.

Definition at line 23 of file ParallelReduce.cpp.

template<class ReduceOp >
void stk::all_reduce ( ParallelMachine  ,
const ReduceOp &   
)

Aggregated parallel in-place reduce-to-all-processors operations.

example:

    ParallelMachine comm = ... ;
    double a[5] ;
    int    b[3] ;
    all_reduce( comm , ReduceSum < 5 >( a ) & ReduceMax < 3 >( b ) );
  Reduction options include:
    ReduceSum    < N > ( T * )   // Summation
    ReduceProd   < N > ( T * )   // Product
    ReduceMax    < N > ( T * )   // Maximum
    ReduceMin    < N > ( T * )   // Minimum
    ReduceBitOr  < N > ( T * )   // Bit-wise OR
    ReduceBitAnd < N > ( T * )   // Bit-wise AND
 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines