STARS-H
Software for Testing Accuracy, Reliability and Scalability of Hierarchical computations
H-format

Routines to partition matrix into low-rank blocks. More...

Data Structures

struct  starsh_blrf
 Non-nested block-wise low-rank format. More...
 

Typedefs

typedef struct starsh_blrf STARSH_blrf
 

Functions

int starsh_blrf_new (STARSH_blrf **format, STARSH_problem *problem, char symm, STARSH_cluster *row_cluster, STARSH_cluster *col_cluster, STARSH_int nbrows, STARSH_int nbcols, STARSH_int nblocks_far, STARSH_int *block_far, STARSH_int *brow_far_start, STARSH_int *brow_far, STARSH_int *bcol_far_start, STARSH_int *bcol_far, STARSH_int nblocks_far_local, STARSH_int *block_far_local, STARSH_int nblocks_near, STARSH_int *block_near, STARSH_int *brow_near_start, STARSH_int *brow_near, STARSH_int *bcol_near_start, STARSH_int *bcol_near, STARSH_int nblocks_near_local, STARSH_int *block_near_local, enum STARSH_BLRF_TYPE type)
 Init STARSH_blrf object. More...
 
int starsh_blrf_new_from_coo (STARSH_blrf **format, STARSH_problem *problem, char symm, STARSH_cluster *row_cluster, STARSH_cluster *col_cluster, STARSH_int nblocks_far, STARSH_int *block_far, STARSH_int nblocks_near, STARSH_int *block_near, enum STARSH_BLRF_TYPE type)
 Init STARSH_blrf object by lists of admissible blocks. More...
 
int starsh_blrf_new_tlr (STARSH_blrf **format, STARSH_problem *problem, char symm, STARSH_cluster *row_cluster, STARSH_cluster *col_cluster)
 TLR partitioning of problem with given plain clusters. More...
 
void starsh_blrf_free (STARSH_blrf *format)
 
void starsh_blrf_info (STARSH_blrf *format)
 
void starsh_blrf_print (STARSH_blrf *format)
 
int starsh_blrf_get_block (STARSH_blrf *format, STARSH_int i, STARSH_int j, int *shape, void **D)
 Returns dense block on intersection of given block row and column. More...
 
int starsh_blrf_new_from_coo_mpi (STARSH_blrf **format, STARSH_problem *problem, char symm, STARSH_cluster *row_cluster, STARSH_cluster *col_cluster, STARSH_int nblocks_far, STARSH_int *block_far, STARSH_int nblocks_far_local, STARSH_int *block_far_local, STARSH_int nblocks_near, STARSH_int *block_near, STARSH_int nblocks_near_local, STARSH_int *block_near_local, enum STARSH_BLRF_TYPE type)
 Create new STARSH_blrf object on MPI node. More...
 
int starsh_blrf_new_tlr_mpi (STARSH_blrf **format, STARSH_problem *problem, char symm, STARSH_cluster *row_cluster, STARSH_cluster *col_cluster)
 TLR partitioning on MPI nodes with 2D block cycling distribution. More...
 

Detailed Description

Routines to partition matrix into low-rank blocks.

Typedef Documentation

◆ STARSH_blrf

Function Documentation

◆ starsh_blrf_free()

void starsh_blrf_free ( STARSH_blrf format)

Free STARSH_blrf object.

◆ starsh_blrf_get_block()

int starsh_blrf_get_block ( STARSH_blrf format,
STARSH_int  i,
STARSH_int  j,
int *  shape,
void **  D 
)

Returns dense block on intersection of given block row and column.

Allocate memory and compute kernel function for a given submatrix on intersection of i-th row cluster with j-th column cluster. User have to free memory after usage.

Parameters
[in]formatPointer to STARSH_blrf object.
[in]i,jIndexes of row and column clusters.
[out]shapeShape of output submatrix.
[out]DSubmatrix on intersection of i-th row cluster and j-th column cluster.
Returns
Error code STARSH_ERRNO.

◆ starsh_blrf_info()

void starsh_blrf_info ( STARSH_blrf format)

Print short info about STARSH_blrf object.

◆ starsh_blrf_new()

int starsh_blrf_new ( STARSH_blrf **  format,
STARSH_problem problem,
char  symm,
STARSH_cluster row_cluster,
STARSH_cluster col_cluster,
STARSH_int  nbrows,
STARSH_int  nbcols,
STARSH_int  nblocks_far,
STARSH_int block_far,
STARSH_int brow_far_start,
STARSH_int brow_far,
STARSH_int bcol_far_start,
STARSH_int bcol_far,
STARSH_int  nblocks_far_local,
STARSH_int block_far_local,
STARSH_int  nblocks_near,
STARSH_int block_near,
STARSH_int brow_near_start,
STARSH_int brow_near,
STARSH_int bcol_near_start,
STARSH_int bcol_near,
STARSH_int  nblocks_near_local,
STARSH_int block_near_local,
enum STARSH_BLRF_TYPE  type 
)

Init STARSH_blrf object.

This function simply allocates memory and fills fields of STARSH_blrf object. Look at STARSH_blrf to get more info about meaning of each field.

Parameters
[out]formatPointer to STARSH_blrf object.
[in]problempointer to STARSH_problem object.
[in]symm'S' if format is symmetric and 'N' otherwise.
[in]row_cluster,col_clusterpointers to STARSH_cluster objects, corresponding to clusterization of rows and columns.
[in]nbrows,nbcolsNumber of clusters of rows and columns.
[in]nblocks_farNumber of admissible far-field blocks.
[in]block_farCoordinates of admissible far-field blocks.
[in]brow_far_start,brow_farList of all admissible far-field blocks, stored in CSR format.
[in]bcol_far_start,bcol_farList of all admissible far-field blocks, stored in CSC format.
[in]nblocks_far_local,block_far_localList of local admissible far-field blocks, stored on current MPI node.
[in]nblocks_nearNumber of admissible near-field blocks.
[in]block_nearCoordinates of admissible near-field blocks.
[in]brow_near_start,brow_nearList of all admissible near-field blocks, stored in CSR format.
[in]bcol_near_start,bcol_nearList of all admissible near-field blocks, stored in CSC format.
[in]nblocks_near_local,block_near_localList of local admissible near-field blocks, stored on current MPI node.
[in]typeType of format. Look at STARSH_BLRF_TYPE for more info.
Returns
Error code STARSH_ERRNO.
See also
starsh_blrf_new_from_coo(), starsh_blrf_free().

◆ starsh_blrf_new_from_coo()

int starsh_blrf_new_from_coo ( STARSH_blrf **  format,
STARSH_problem problem,
char  symm,
STARSH_cluster row_cluster,
STARSH_cluster col_cluster,
STARSH_int  nblocks_far,
STARSH_int block_far,
STARSH_int  nblocks_near,
STARSH_int block_near,
enum STARSH_BLRF_TYPE  type 
)

Init STARSH_blrf object by lists of admissible blocks.

Allocate memory and fill ifields of STARSH_blrf object. Uses lists of admissible far-field and near-field blocks in COO sparse format to copy it into CSR and CSC formats. Look at STARSH_blrf to get more info about meaning of each field.

Parameters
[out]formatAddress of pointer to STARSH_blrf object.
[in]problempointer to STARSH_problem object.
[in]symm'S' if format is symmetric and 'N' otherwise.
[in]row_cluster,col_clusterpointers to STARSH_cluster objects, corresponding to clusterization of rows and columns.
[in]nblocks_farNumber of admissible far-field blocks.
[in]block_farCoordinates of admissible far-field blocks.
[in]nblocks_nearNumber of admissible near-field blocks.
[in]block_nearCoordinates of admissible near-field blocks.
[in]typeType of format.
Returns
Error code STARSH_ERRNO.
See also
starsh_blrf_new(), starsh_blrf_free().

◆ starsh_blrf_new_from_coo_mpi()

int starsh_blrf_new_from_coo_mpi ( STARSH_blrf **  format,
STARSH_problem problem,
char  symm,
STARSH_cluster row_cluster,
STARSH_cluster col_cluster,
STARSH_int  nblocks_far,
STARSH_int block_far,
STARSH_int  nblocks_far_local,
STARSH_int block_far_local,
STARSH_int  nblocks_near,
STARSH_int block_near,
STARSH_int  nblocks_near_local,
STARSH_int block_near_local,
enum STARSH_BLRF_TYPE  type 
)

Create new STARSH_blrf object on MPI node.

Allocate memory and fill fields of STARSH_blrf object on a distributed-memory system (using MPI). Uses lists of admissible far-field and near-field blocks in COO sparse format to copy it into CSR and CSC formats. Look at STARSH_blrf to get more info about meaning of each field.

Parameters
[out]formatAddress of pointer to STARSH_blrf object.
[in]problempointer to STARSH_problem object.
[in]symm'S' if format is symmetric and 'N' otherwise.
[in]row_cluster,col_clusterpointers to STARSH_cluster objects, corresponding to clusterization of rows and columns.
[in]nblocks_farNumber of admissible far-field blocks.
[in]block_farCoordinates of admissible far-field blocks.
[in]nblocks_far_localNumber of admissible far-field blocks, stored locally on MPI node.
[in]block_far_localList of admissible far-field blocks, stored locally on MPI node.
[in]nblocks_nearNumber of admissible near-field blocks.
[in]block_nearCoordinates of admissible near-field blocks.
[in]nblocks_near_localNumber of admissible near-field blocks, stored locally on MPI node.
[in]block_near_localList of admissible near-field blocks, stored locally on MPI node.
[in]typeType of format.
Returns
Error code STARSH_ERRNO.
See also
starsh_blrf_new_from_coo(), starsh_blrf_new_tlr_mpi().

◆ starsh_blrf_new_tlr()

int starsh_blrf_new_tlr ( STARSH_blrf **  format,
STARSH_problem problem,
char  symm,
STARSH_cluster row_cluster,
STARSH_cluster col_cluster 
)

TLR partitioning of problem with given plain clusters.

Uses non-hierarchical clusterization of rows and columns to generate plain division of problem into admissible blocks.

Parameters
[out]formatAddress of pointer to STARSH_blrf object.
[in]problemPointer to STARSH_problem object.
[in]symm'S' if format is symmetric and 'N' otherwise.
[in]row_cluster,col_clusterpointers to STARSH_cluster objects, corresponding to clusterization of rows and columns.
Returns
Error code STARSH_ERRNO.
See also
starsh_blrf_new(), starsh_blrf_new_from_coo().

◆ starsh_blrf_new_tlr_mpi()

int starsh_blrf_new_tlr_mpi ( STARSH_blrf **  format,
STARSH_problem problem,
char  symm,
STARSH_cluster row_cluster,
STARSH_cluster col_cluster 
)

TLR partitioning on MPI nodes with 2D block cycling distribution.

Uses non-hierarchical clusterization of rows and columns to generate plain division of problem into admissible far-field and near-field blocks, placed over MPI nodes by 2D block cycling distribution.

Parameters
[out]formatAddress of pointer to STARSH_blrf object.
[in]problemPointer to STARSH_problem object.
[in]symm'S' if format is symmetric and 'N' otherwise.
[in]row_cluster,col_clusterpointers to STARSH_cluster objects, corresponding to clusterization of rows and columns.
Returns
Error code STARSH_ERRNO.
See also
starsh_blrf_new_tlr().

◆ starsh_blrf_print()

void starsh_blrf_print ( STARSH_blrf format)

Print full info about STARSH_blrf object.