SuperLU_DIST  4.0
superlu_dist on CPU and GPU clusters
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Macros | Functions
util.c File Reference

Utilities functions. More...

#include <math.h>
#include "superlu_ddefs.h"

Macros

#define NBUCKS   10
 Get the statistics of the supernodes. More...
 

Functions

void Destroy_SuperMatrix_Store_dist (SuperMatrix *A)
 Deallocate the structure pointing to the actual storage of the matrix. More...
 
void Destroy_CompCol_Matrix_dist (SuperMatrix *A)
 
void Destroy_CompRowLoc_Matrix_dist (SuperMatrix *A)
 
void Destroy_CompRow_Matrix_dist (SuperMatrix *A)
 
void Destroy_SuperNode_Matrix_dist (SuperMatrix *A)
 
void Destroy_CompCol_Permuted_dist (SuperMatrix *A)
 A is of type Stype==NCP. More...
 
void Destroy_Dense_Matrix_dist (SuperMatrix *A)
 A is of type Stype==DN. More...
 
void Destroy_LU (int_t n, gridinfo_t *grid, LUstruct_t *LUstruct)
 Destroy distributed L & U matrices. More...
 
void ScalePermstructInit (const int_t m, const int_t n, ScalePermstruct_t *ScalePermstruct)
 Allocate storage in ScalePermstruct. More...
 
void ScalePermstructFree (ScalePermstruct_t *ScalePermstruct)
 Deallocate ScalePermstruct. More...
 
void LUstructInit (const int_t n, LUstruct_t *LUstruct)
 Allocate storage in LUstruct. More...
 
void LUstructFree (LUstruct_t *LUstruct)
 Deallocate LUstruct. More...
 
void countnz_dist (const int_t n, int_t *xprune, long long int *nnzL, long long int *nnzU, Glu_persist_t *Glu_persist, Glu_freeable_t *Glu_freeable)
 
long long int fixupL_dist (const int_t n, const int_t *perm_r, Glu_persist_t *Glu_persist, Glu_freeable_t *Glu_freeable)
 
void set_default_options_dist (superlu_options_t *options)
 Set the default values for the options argument. More...
 
void print_options_dist (superlu_options_t *options)
 Print the options setting. More...
 
void print_sp_ienv_dist (superlu_options_t *options)
 Print the blocking parameters. More...
 
int_t pxgstrs_init (int_t n, int_t m_loc, int_t nrhs, int_t fst_row, int_t perm_r[], int_t perm_c[], gridinfo_t *grid, Glu_persist_t *Glu_persist, SOLVEstruct_t *SOLVEstruct)
 
void pxgstrs_finalize (pxgstrs_comm_t *gstrs_comm)
 
void print_panel_seg_dist (int_t n, int_t w, int_t jcol, int_t nseg, int_t *segrep, int_t *repfnz)
 Diagnostic print of segment info after panel_dfs(). More...
 
void PStatInit (SuperLUStat_t *stat)
 
void PStatPrint (superlu_options_t *options, SuperLUStat_t *stat, gridinfo_t *grid)
 
void PStatFree (SuperLUStat_t *stat)
 
void ifill_dist (int_t *a, int_t alen, int_t ival)
 Fills an integer array with a given value. More...
 
void get_diag_procs (int_t n, Glu_persist_t *Glu_persist, gridinfo_t *grid, int_t *num_diag_procs, int_t **diag_procs, int_t **diag_len)
 
void super_stats_dist (int_t nsuper, int_t *xsup)
 
void check_repfnz_dist (int_t n, int_t w, int_t jcol, int_t *repfnz)
 Check whether repfnz[] == EMPTY after reset. More...
 
void PrintInt10 (char *name, int_t len, int_t *x)
 
int file_PrintInt10 (FILE *fp, char *name, int_t len, int_t *x)
 
int file_PrintLong10 (FILE *fp, char *name, int_t len, int_t *x)
 
int_t CheckZeroDiagonal (int_t n, int_t *rowind, int_t *colbeg, int_t *colcnt)
 
void isort (int_t N, int_t *ARRAY1, int_t *ARRAY2)
 
void isort1 (int_t N, int_t *ARRAY)
 
void log_memory (long long cur_bytes, SuperLUStat_t *stat)
 
void print_memorylog (SuperLUStat_t *stat, char *msg)
 

Detailed Description

Utilities functions.

– Distributed SuperLU routine (version 2.3) –
Lawrence Berkeley National Lab, Univ. of California Berkeley.
February 1, 2003
Modified: March 31, 2013

Macro Definition Documentation

#define NBUCKS   10

Get the statistics of the supernodes.

Function Documentation

void check_repfnz_dist ( int_t  n,
int_t  w,
int_t  jcol,
int_t repfnz 
)

Check whether repfnz[] == EMPTY after reset.

int_t CheckZeroDiagonal ( int_t  n,
int_t rowind,
int_t colbeg,
int_t colcnt 
)
void countnz_dist ( const int_t  n,
int_t xprune,
long long int *  nnzL,
long long int *  nnzU,
Glu_persist_t Glu_persist,
Glu_freeable_t Glu_freeable 
)
Count the total number of nonzeros in factors L and U,  and in the 
symmetrically reduced L. 
void Destroy_CompCol_Matrix_dist ( SuperMatrix A)
void Destroy_CompCol_Permuted_dist ( SuperMatrix A)

A is of type Stype==NCP.

void Destroy_CompRow_Matrix_dist ( SuperMatrix A)
void Destroy_CompRowLoc_Matrix_dist ( SuperMatrix A)
void Destroy_Dense_Matrix_dist ( SuperMatrix A)

A is of type Stype==DN.

void Destroy_LU ( int_t  n,
gridinfo_t grid,
LUstruct_t LUstruct 
)

Destroy distributed L & U matrices.

void Destroy_SuperMatrix_Store_dist ( SuperMatrix A)

Deallocate the structure pointing to the actual storage of the matrix.

void Destroy_SuperNode_Matrix_dist ( SuperMatrix A)
int file_PrintInt10 ( FILE *  fp,
char *  name,
int_t  len,
int_t x 
)
int file_PrintLong10 ( FILE *  fp,
char *  name,
int_t  len,
int_t x 
)
long long int fixupL_dist ( const int_t  n,
const int_t perm_r,
Glu_persist_t Glu_persist,
Glu_freeable_t Glu_freeable 
)
Fix up the data storage lsub for L-subscripts. It removes the subscript
sets for structural pruning,    and applies permuation to the remaining
subscripts.
void get_diag_procs ( int_t  n,
Glu_persist_t Glu_persist,
gridinfo_t grid,
int_t num_diag_procs,
int_t **  diag_procs,
int_t **  diag_len 
)
void ifill_dist ( int_t a,
int_t  alen,
int_t  ival 
)

Fills an integer array with a given value.

void isort ( int_t  N,
int_t ARRAY1,
int_t ARRAY2 
)
void isort1 ( int_t  N,
int_t ARRAY 
)
void log_memory ( long long  cur_bytes,
SuperLUStat_t stat 
)
void LUstructFree ( LUstruct_t LUstruct)

Deallocate LUstruct.

void LUstructInit ( const int_t  n,
LUstruct_t LUstruct 
)

Allocate storage in LUstruct.

void print_memorylog ( SuperLUStat_t stat,
char *  msg 
)
void print_options_dist ( superlu_options_t options)

Print the options setting.

void print_panel_seg_dist ( int_t  n,
int_t  w,
int_t  jcol,
int_t  nseg,
int_t segrep,
int_t repfnz 
)

Diagnostic print of segment info after panel_dfs().

void print_sp_ienv_dist ( superlu_options_t options)

Print the blocking parameters.

void PrintInt10 ( char *  name,
int_t  len,
int_t x 
)
void PStatFree ( SuperLUStat_t stat)
void PStatInit ( SuperLUStat_t stat)
void PStatPrint ( superlu_options_t options,
SuperLUStat_t stat,
gridinfo_t grid 
)
void pxgstrs_finalize ( pxgstrs_comm_t gstrs_comm)
int_t pxgstrs_init ( int_t  n,
int_t  m_loc,
int_t  nrhs,
int_t  fst_row,
int_t  perm_r[],
int_t  perm_c[],
gridinfo_t grid,
Glu_persist_t Glu_persist,
SOLVEstruct_t SOLVEstruct 
)

Purpose

  Set up the communication pattern for the triangular solution.

Arguments

n      (input) int (global)
       The dimension of the linear system.
m_loc  (input) int (local)
       The local row dimension of the distributed input matrix.
nrhs   (input) int (global)
       Number of right-hand sides.
fst_row (input) int (global)
       The row number of matrix B's first row in the global matrix.
perm_r (input) int* (global)
       The row permutation vector.
perm_c (input) int* (global)
       The column permutation vector.
grid   (input) gridinfo_t*
       The 2D process mesh.
void ScalePermstructFree ( ScalePermstruct_t ScalePermstruct)

Deallocate ScalePermstruct.

void ScalePermstructInit ( const int_t  m,
const int_t  n,
ScalePermstruct_t ScalePermstruct 
)

Allocate storage in ScalePermstruct.

void set_default_options_dist ( superlu_options_t )

Set the default values for the options argument.


void super_stats_dist ( int_t  nsuper,
int_t xsup 
)