COMBINATORIAL_BLAS  1.6
combblas::SpParHelper Class Reference

#include <SpParHelper.h>

Static Public Member Functions

template<typename IT >
static void ReDistributeToVector (int *&map_scnt, std::vector< std::vector< IT > > &locs_send, std::vector< std::vector< std::string > > &data_send, std::vector< std::array< char, MAXVERTNAME >> &distmapper_array, const MPI_Comm &comm)
 
template<typename KEY , typename VAL , typename IT >
static void GlobalSelect (IT gl_rank, std::pair< KEY, VAL > *&low, std::pair< KEY, VAL > *&upp, std::pair< KEY, VAL > *array, IT length, const MPI_Comm &comm)
 
template<typename KEY , typename VAL , typename IT >
static void BipartiteSwap (std::pair< KEY, VAL > *low, std::pair< KEY, VAL > *array, IT length, int nfirsthalf, int color, const MPI_Comm &comm)
 
template<typename KEY , typename VAL , typename IT >
static void MemoryEfficientPSort (std::pair< KEY, VAL > *array, IT length, IT *dist, const MPI_Comm &comm)
 
template<typename KEY , typename VAL , typename IT >
static std::vector< std::pair< KEY, VAL > > KeyValuePSort (std::pair< KEY, VAL > *array, IT length, IT *dist, const MPI_Comm &comm)
 
template<typename KEY , typename VAL , typename IT >
static void DebugPrintKeys (std::pair< KEY, VAL > *array, IT length, IT *dist, MPI_Comm &World)
 
template<typename IT , typename NT , typename DER >
static void FetchMatrix (SpMat< IT, NT, DER > &MRecv, const std::vector< IT > &essentials, std::vector< MPI_Win > &arrwin, int ownind)
 
template<typename IT , typename NT , typename DER >
static void BCastMatrix (MPI_Comm &comm1d, SpMat< IT, NT, DER > &Matrix, const std::vector< IT > &essentials, int root)
 
template<typename IT , typename NT , typename DER >
static void GatherMatrix (MPI_Comm &comm1d, SpMat< IT, NT, DER > &Matrix, int root)
 
template<typename IT , typename NT , typename DER >
static void SetWindows (MPI_Comm &comm1d, const SpMat< IT, NT, DER > &Matrix, std::vector< MPI_Win > &arrwin)
 
template<typename IT , typename NT , typename DER >
static void GetSetSizes (const SpMat< IT, NT, DER > &Matrix, IT **&sizes, MPI_Comm &comm1d)
 
template<typename IT , typename DER >
static void AccessNFetch (DER *&Matrix, int owner, std::vector< MPI_Win > &arrwin, MPI_Group &group, IT **sizes)
 
template<typename IT , typename DER >
static void LockNFetch (DER *&Matrix, int owner, std::vector< MPI_Win > &arrwin, MPI_Group &group, IT **sizes)
 
static void StartAccessEpoch (int owner, std::vector< MPI_Win > &arrwin, MPI_Group &group)
 
static void PostExposureEpoch (int self, std::vector< MPI_Win > &arrwin, MPI_Group &group)
 
static void LockWindows (int ownind, std::vector< MPI_Win > &arrwin)
 
static void UnlockWindows (int ownind, std::vector< MPI_Win > &arrwin)
 
static void Print (const std::string &s)
 
static void Print (const std::string &s, MPI_Comm &world)
 
static void PrintFile (const std::string &s, const std::string &filename)
 
static void PrintFile (const std::string &s, const std::string &filename, MPI_Comm &world)
 
static void check_newline (int *bytes_read, int bytes_requested, char *buf)
 
static bool FetchBatch (MPI_File &infile, MPI_Offset &curpos, MPI_Offset end_fpos, bool firstcall, std::vector< std::string > &lines, int myrank)
 
static void WaitNFree (std::vector< MPI_Win > &arrwin)
 
static void FreeWindows (std::vector< MPI_Win > &arrwin)
 

Detailed Description

Definition at line 48 of file SpParHelper.h.

Member Function Documentation

◆ AccessNFetch()

template<class IT , class DER >
void combblas::SpParHelper::AccessNFetch ( DER *&  Matrix,
int  owner,
std::vector< MPI_Win > &  arrwin,
MPI_Group &  group,
IT **  sizes 
)
static

Definition at line 742 of file SpParHelper.cpp.

◆ BCastMatrix()

template<typename IT , typename NT , typename DER >
void combblas::SpParHelper::BCastMatrix ( MPI_Comm &  comm1d,
SpMat< IT, NT, DER > &  Matrix,
const std::vector< IT > &  essentials,
int  root 
)
static
Parameters
[in]Matrix{For the root processor, the local object to be sent to all others. For all others, it is a (yet) empty object to be filled by the received data}
[in]essentials{irrelevant for the root}

Definition at line 583 of file SpParHelper.cpp.

◆ BipartiteSwap()

template<typename KEY , typename VAL , typename IT >
void combblas::SpParHelper::BipartiteSwap ( std::pair< KEY, VAL > *  low,
std::pair< KEY, VAL > *  array,
IT  length,
int  nfirsthalf,
int  color,
const MPI_Comm &  comm 
)
static

Definition at line 397 of file SpParHelper.cpp.

◆ check_newline()

void combblas::SpParHelper::check_newline ( int *  bytes_read,
int  bytes_requested,
char *  buf 
)
inlinestatic

Definition at line 832 of file SpParHelper.cpp.

◆ DebugPrintKeys()

template<typename KEY , typename VAL , typename IT >
void combblas::SpParHelper::DebugPrintKeys ( std::pair< KEY, VAL > *  array,
IT  length,
IT *  dist,
MPI_Comm &  World 
)
static

Definition at line 492 of file SpParHelper.cpp.

◆ FetchBatch()

bool combblas::SpParHelper::FetchBatch ( MPI_File &  infile,
MPI_Offset &  curpos,
MPI_Offset  end_fpos,
bool  firstcall,
std::vector< std::string > &  lines,
int  myrank 
)
inlinestatic

Definition at line 846 of file SpParHelper.cpp.

◆ FetchMatrix()

template<class IT , class NT , class DER >
void combblas::SpParHelper::FetchMatrix ( SpMat< IT, NT, DER > &  MRecv,
const std::vector< IT > &  essentials,
std::vector< MPI_Win > &  arrwin,
int  ownind 
)
static
Parameters
[in,out]MRecv{an already existing, but empty SpMat<...> object}
[in]essentials{carries essential information (i.e. required array sizes) about ARecv}
[in]arrwin{windows array of size equal to the number of built-in arrays in the SpMat data structure}
[in]ownind{processor index (within this processor row/column) of the owner of the matrix to be received}
Remarks
{The communicator information is implicitly contained in the MPI::Win objects}

Definition at line 552 of file SpParHelper.cpp.

◆ FreeWindows()

void combblas::SpParHelper::FreeWindows ( std::vector< MPI_Win > &  arrwin)
inlinestatic

Definition at line 920 of file SpParHelper.cpp.

◆ GatherMatrix()

template<typename IT , typename NT , typename DER >
void combblas::SpParHelper::GatherMatrix ( MPI_Comm &  comm1d,
SpMat< IT, NT, DER > &  Matrix,
int  root 
)
static

Just a test function to see the time to gather a matrix on an MPI process The ultimate object would be to create the whole matrix on rank 0 (TODO)

Parameters
[in]Matrix{For the root processor, the local object to be sent to all others. For all others, it is a (yet) empty object to be filled by the received data}
[in]essentials{irrelevant for the root}

Definition at line 612 of file SpParHelper.cpp.

◆ GetSetSizes()

template<class IT , class NT , class DER >
void combblas::SpParHelper::GetSetSizes ( const SpMat< IT, NT, DER > &  Matrix,
IT **&  sizes,
MPI_Comm &  comm1d 
)
static
Parameters
[in]sizes2D array where sizes[i] is an array of size r/s representing the ith essential component of all local blocks within that row/col sizes[i][j] is the size of the ith essential component of the jth local block within this row/col

Definition at line 773 of file SpParHelper.cpp.

◆ GlobalSelect()

template<typename KEY , typename VAL , typename IT >
void combblas::SpParHelper::GlobalSelect ( IT  gl_rank,
std::pair< KEY, VAL > *&  low,
std::pair< KEY, VAL > *&  upp,
std::pair< KEY, VAL > *  array,
IT  length,
const MPI_Comm &  comm 
)
static

Definition at line 279 of file SpParHelper.cpp.

◆ KeyValuePSort()

template<typename KEY , typename VAL , typename IT >
std::vector< std::pair< KEY, VAL > > combblas::SpParHelper::KeyValuePSort ( std::pair< KEY, VAL > *  array,
IT  length,
IT *  dist,
const MPI_Comm &  comm 
)
static

Definition at line 198 of file SpParHelper.cpp.

◆ LockNFetch()

template<class IT , class DER >
void combblas::SpParHelper::LockNFetch ( DER *&  Matrix,
int  owner,
std::vector< MPI_Win > &  arrwin,
MPI_Group &  group,
IT **  sizes 
)
static

Definition at line 755 of file SpParHelper.cpp.

◆ LockWindows()

void combblas::SpParHelper::LockWindows ( int  ownind,
std::vector< MPI_Win > &  arrwin 
)
inlinestatic

Definition at line 694 of file SpParHelper.cpp.

◆ MemoryEfficientPSort()

template<typename KEY , typename VAL , typename IT >
void combblas::SpParHelper::MemoryEfficientPSort ( std::pair< KEY, VAL > *  array,
IT  length,
IT *  dist,
const MPI_Comm &  comm 
)
static

Definition at line 103 of file SpParHelper.cpp.

◆ PostExposureEpoch()

void combblas::SpParHelper::PostExposureEpoch ( int  self,
std::vector< MPI_Win > &  arrwin,
MPI_Group &  group 
)
inlinestatic
Parameters
[in]self{rank of "this" processor to be excluded when starting the exposure epoch}

Definition at line 734 of file SpParHelper.cpp.

◆ Print() [1/2]

void combblas::SpParHelper::Print ( const std::string &  s)
inlinestatic

Definition at line 811 of file SpParHelper.cpp.

◆ Print() [2/2]

void combblas::SpParHelper::Print ( const std::string &  s,
MPI_Comm &  world 
)
inlinestatic

Definition at line 821 of file SpParHelper.cpp.

◆ PrintFile() [1/2]

void combblas::SpParHelper::PrintFile ( const std::string &  s,
const std::string &  filename 
)
inlinestatic

Definition at line 786 of file SpParHelper.cpp.

◆ PrintFile() [2/2]

void combblas::SpParHelper::PrintFile ( const std::string &  s,
const std::string &  filename,
MPI_Comm &  world 
)
inlinestatic

Definition at line 798 of file SpParHelper.cpp.

◆ ReDistributeToVector()

template<typename IT >
void combblas::SpParHelper::ReDistributeToVector ( int *&  map_scnt,
std::vector< std::vector< IT > > &  locs_send,
std::vector< std::vector< std::string > > &  data_send,
std::vector< std::array< char, MAXVERTNAME >> &  distmapper_array,
const MPI_Comm &  comm 
)
static

Definition at line 35 of file SpParHelper.cpp.

◆ SetWindows()

template<class IT , class NT , class DER >
void combblas::SpParHelper::SetWindows ( MPI_Comm &  comm1d,
const SpMat< IT, NT, DER > &  Matrix,
std::vector< MPI_Win > &  arrwin 
)
static

Definition at line 670 of file SpParHelper.cpp.

◆ StartAccessEpoch()

void combblas::SpParHelper::StartAccessEpoch ( int  owner,
std::vector< MPI_Win > &  arrwin,
MPI_Group &  group 
)
inlinestatic
Parameters
[in]owner{target processor rank within the processor group}
[in]arrwin{start access epoch only to owner's arrwin (-windows) }

Definition at line 715 of file SpParHelper.cpp.

◆ UnlockWindows()

void combblas::SpParHelper::UnlockWindows ( int  ownind,
std::vector< MPI_Win > &  arrwin 
)
inlinestatic

Definition at line 702 of file SpParHelper.cpp.

◆ WaitNFree()

void combblas::SpParHelper::WaitNFree ( std::vector< MPI_Win > &  arrwin)
inlinestatic

Definition at line 908 of file SpParHelper.cpp.


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