SG++-Doxygen-Documentation
Loading...
Searching...
No Matches
sgpp::datadriven::BlacsProcessGrid Class Reference

This class represents a BLACS process grid for use with ScaLAPACK. More...

#include <BlacsProcessGrid.hpp>

Public Member Functions

 BlacsProcessGrid (const BlacsProcessGrid &)=delete
 Cannot be copied, otherwise errors with multiple calls to blacs_gridexit are possible.
 
 BlacsProcessGrid (int rows=-1, int columns=-1)
 Creates a BLACS process grid with a certain number of rows and columns.
 
int getContextHandle () const
 
int getCurrentColumn () const
 
int getCurrentRow () const
 
int getProcessesInGrid () const
 
int getRowColumnIndex () const
 
int getTotalColumns () const
 
int getTotalRows () const
 
bool isProcessInGrid () const
 
BlacsProcessGridoperator= (const BlacsProcessGrid &)=delete
 
 ~BlacsProcessGrid ()
 

Static Public Member Functions

static int availableProcesses ()
 Can only be called after BLACS initialization.
 
static void exitBlacs ()
 Exit BLACS, should only be called once.
 
static int getCurrentProcess ()
 
static void initializeBlacs ()
 Initialize BLACS, should only be called once.
 

Detailed Description

This class represents a BLACS process grid for use with ScaLAPACK.

Constructor & Destructor Documentation

◆ BlacsProcessGrid() [1/2]

sgpp::datadriven::BlacsProcessGrid::BlacsProcessGrid ( int  rows = -1,
int  columns = -1 
)
explicit

Creates a BLACS process grid with a certain number of rows and columns.

There must be at least rows * columns processes available. If rows or columns is set to < 1, a square grid of maximum size is created from the available processes. Always call this method from all processes, as the init method of a BLACS grid has to be called from all processes, otherwise a deadlock will occur.

Parameters
rowsnumber of rows of the process grid, default -1 (square grid)
columnsnumber of columns of the process grid, default -1 (square grid)

References availableProcesses().

◆ BlacsProcessGrid() [2/2]

sgpp::datadriven::BlacsProcessGrid::BlacsProcessGrid ( const BlacsProcessGrid )
delete

Cannot be copied, otherwise errors with multiple calls to blacs_gridexit are possible.

◆ ~BlacsProcessGrid()

sgpp::datadriven::BlacsProcessGrid::~BlacsProcessGrid ( )

Member Function Documentation

◆ availableProcesses()

int sgpp::datadriven::BlacsProcessGrid::availableProcesses ( )
static

Can only be called after BLACS initialization.

Returns
the number of available mpi processes

Referenced by BlacsProcessGrid().

◆ exitBlacs()

void sgpp::datadriven::BlacsProcessGrid::exitBlacs ( )
static

Exit BLACS, should only be called once.

Referenced by main().

◆ getContextHandle()

int sgpp::datadriven::BlacsProcessGrid::getContextHandle ( ) const
Returns
the context handle of the BLACS context

◆ getCurrentColumn()

int sgpp::datadriven::BlacsProcessGrid::getCurrentColumn ( ) const
Returns
Column of the current process

◆ getCurrentProcess()

int sgpp::datadriven::BlacsProcessGrid::getCurrentProcess ( )
static
Returns
Number of the current process

Referenced by sgpp::datadriven::SparseGridMiner::print().

◆ getCurrentRow()

int sgpp::datadriven::BlacsProcessGrid::getCurrentRow ( ) const
Returns
Row of the current process

◆ getProcessesInGrid()

int sgpp::datadriven::BlacsProcessGrid::getProcessesInGrid ( ) const
Returns
the number of processes in the current grid.

◆ getRowColumnIndex()

int sgpp::datadriven::BlacsProcessGrid::getRowColumnIndex ( ) const
Returns
index of the process in the current grid.

◆ getTotalColumns()

int sgpp::datadriven::BlacsProcessGrid::getTotalColumns ( ) const
Returns
Total number of columns of the grid

◆ getTotalRows()

int sgpp::datadriven::BlacsProcessGrid::getTotalRows ( ) const
Returns
Total number of rows of the grid

◆ initializeBlacs()

void sgpp::datadriven::BlacsProcessGrid::initializeBlacs ( )
static

Initialize BLACS, should only be called once.

Referenced by main().

◆ isProcessInGrid()

bool sgpp::datadriven::BlacsProcessGrid::isProcessInGrid ( ) const
Returns
True if the current process is part of this grid, else false

◆ operator=()

BlacsProcessGrid & sgpp::datadriven::BlacsProcessGrid::operator= ( const BlacsProcessGrid )
delete

The documentation for this class was generated from the following files: