SuperLU Distributed 8.2.1
Distributed memory sparse direct solver
util.c File Reference

Utilities functions. More...

#include <math.h>
#include <unistd.h>
#include "superlu_ddefs.h"
Include dependency graph for util.c:

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 countnz_dist (const int_t n, int_t *xprune, int_t *nnzL, int_t *nnzU, Glu_persist_t *Glu_persist, Glu_freeable_t *Glu_freeable)
 
int64_t 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_dist_options_t *options)
 Set the default values for the options argument. More...
 
void print_options_dist (superlu_dist_options_t *options)
 Print the options setting. More...
 
void print_sp_ienv_dist (superlu_dist_options_t *options)
 Print the blocking parameters. More...
 
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_dist_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)
 
void PrintInt32 (char *name, int len, int *x)
 
int file_PrintInt10 (FILE *fp, char *name, int_t len, int_t *x)
 
int file_PrintInt32 (FILE *fp, char *name, int len, int *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 (int64_t cur_bytes, SuperLUStat_t *stat)
 
void print_memorylog (SuperLUStat_t *stat, char *msg)
 
int compare_pair (const void *a, const void *b)
 
int get_thread_per_process ()
 
int_t get_max_buffer_size ()
 
int_t get_gpublas_nb ()
 
int_t get_num_gpu_streams ()
 
int_t get_min (int_t *sums, int_t nprocs)
 
int_t static_partition (struct superlu_pair *work_load, int_t nwl, int_t *partition, int_t ldp, int_t *sums, int_t *counts, int nprocs)
 
void arrive_at_ublock (int_t j, int_t *iukp, int_t *rukp, int_t *jb, int_t *ljb, int_t *nsupc, int_t iukp0, int_t rukp0, int_t *usub, int_t *perm_u, int_t *xsup, gridinfo_t *grid)
 
int_t num_full_cols_U (int_t kk, int_t **Ufstnz_br_ptr, int_t *xsup, gridinfo_t *grid, int_t *perm_u, int_t *ldu)
 
int_t estimate_bigu_size (int_t nsupers, int_t **Ufstnz_br_ptr, Glu_persist_t *Glu_persist, gridinfo_t *grid, int_t *perm_u, int_t *max_ncols)
 
void quickSort (int_t *a, int_t l, int_t r, int_t dir)
 
int_t partition (int_t *a, int_t l, int_t r, int_t dir)
 
void quickSortM (int_t *a, int_t l, int_t r, int_t lda, int_t dir, int_t dims)
 
int_t partitionM (int_t *a, int_t l, int_t r, int_t lda, int_t dir, int_t dims)
 
int_t ** getTreePerm (int_t *myTreeIdxs, int_t *myZeroTrIdxs, int_t *nodeCount, int_t **nodeList, int_t *perm_c_supno, int_t *iperm_c_supno, gridinfo3d_t *grid3d)
 
int_tgetMyNodeCounts (int_t maxLvl, int_t *myTreeIdxs, int_t *gNodeCount)
 
int_t checkIntVector3d (int_t *vec, int_t len, gridinfo3d_t *grid3d)
 
int_t reduceStat (PhaseType PHASE, SuperLUStat_t *stat, gridinfo3d_t *grid3d)
 
int getnGPUStreams ()
 
int get_mpi_process_per_gpu ()
 

Variables

static int max_sup_size
 

Detailed Description

Utilities functions.

Copyright (c) 2003, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from U.S. Dept. of Energy)

All rights reserved.

The source code is distributed under BSD license, see the file License.txt at the top-level directory.

-- Distributed SuperLU routine (version 6.1) --
Lawrence Berkeley National Lab, Univ. of California Berkeley.
February 1, 2003

Modified: March 31, 2013
          January 29, 2018

Macro Definition Documentation

◆ NBUCKS

#define NBUCKS   10

Get the statistics of the supernodes.

Function Documentation

◆ arrive_at_ublock()

void arrive_at_ublock ( int_t  j,
int_t iukp,
int_t rukp,
int_t jb,
int_t ljb,
int_t nsupc,
int_t  iukp0,
int_t  rukp0,
int_t usub,
int_t perm_u,
int_t xsup,
gridinfo_t grid 
)
Here is the caller graph for this function:

◆ check_repfnz_dist()

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

Check whether repfnz[] == EMPTY after reset.

◆ checkIntVector3d()

int_t checkIntVector3d ( int_t vec,
int_t  len,
gridinfo3d_t grid3d 
)

◆ CheckZeroDiagonal()

int_t CheckZeroDiagonal ( int_t  n,
int_t rowind,
int_t colbeg,
int_t colcnt 
)

◆ compare_pair()

int compare_pair ( const void *  a,
const void *  b 
)
Here is the caller graph for this function:

◆ countnz_dist()

void countnz_dist ( const int_t  n,
int_t xprune,
int_t nnzL,
int_t 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. 

◆ Destroy_CompCol_Matrix_dist()

void Destroy_CompCol_Matrix_dist ( SuperMatrix A)

◆ Destroy_CompCol_Permuted_dist()

void Destroy_CompCol_Permuted_dist ( SuperMatrix A)

A is of type Stype==NCP.

◆ Destroy_CompRow_Matrix_dist()

void Destroy_CompRow_Matrix_dist ( SuperMatrix A)

◆ Destroy_CompRowLoc_Matrix_dist()

void Destroy_CompRowLoc_Matrix_dist ( SuperMatrix A)

◆ Destroy_Dense_Matrix_dist()

void Destroy_Dense_Matrix_dist ( SuperMatrix A)

A is of type Stype==DN.

◆ Destroy_SuperMatrix_Store_dist()

void Destroy_SuperMatrix_Store_dist ( SuperMatrix A)

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

◆ Destroy_SuperNode_Matrix_dist()

void Destroy_SuperNode_Matrix_dist ( SuperMatrix A)

◆ estimate_bigu_size()

int_t estimate_bigu_size ( int_t  nsupers,
int_t **  Ufstnz_br_ptr,
Glu_persist_t Glu_persist,
gridinfo_t grid,
int_t perm_u,
int_t max_ncols 
)

◆ file_PrintInt10()

int file_PrintInt10 ( FILE *  fp,
char *  name,
int_t  len,
int_t x 
)

◆ file_PrintInt32()

int file_PrintInt32 ( FILE *  fp,
char *  name,
int  len,
int *  x 
)

◆ fixupL_dist()

int64_t 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.

◆ get_diag_procs()

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 
)

◆ get_gpublas_nb()

int_t get_gpublas_nb ( )
Here is the caller graph for this function:

◆ get_max_buffer_size()

int_t get_max_buffer_size ( void  )

◆ get_min()

int_t get_min ( int_t sums,
int_t  nprocs 
)
Here is the caller graph for this function:

◆ get_mpi_process_per_gpu()

int get_mpi_process_per_gpu ( )

◆ get_num_gpu_streams()

int_t get_num_gpu_streams ( )
Here is the caller graph for this function:

◆ get_thread_per_process()

int get_thread_per_process ( void  )

◆ getMyNodeCounts()

int_t * getMyNodeCounts ( int_t  maxLvl,
int_t myTreeIdxs,
int_t gNodeCount 
)

◆ getnGPUStreams()

int getnGPUStreams ( )

◆ getTreePerm()

int_t ** getTreePerm ( int_t myTreeIdxs,
int_t myZeroTrIdxs,
int_t nodeCount,
int_t **  nodeList,
int_t perm_c_supno,
int_t iperm_c_supno,
gridinfo3d_t grid3d 
)

◆ ifill_dist()

void ifill_dist ( int_t a,
int_t  alen,
int_t  ival 
)

Fills an integer array with a given value.

Here is the caller graph for this function:

◆ isort()

void isort ( int_t  N,
int_t ARRAY1,
int_t ARRAY2 
)

◆ isort1()

void isort1 ( int_t  N,
int_t ARRAY 
)

◆ log_memory()

void log_memory ( int64_t  cur_bytes,
SuperLUStat_t stat 
)

◆ num_full_cols_U()

int_t num_full_cols_U ( int_t  kk,
int_t **  Ufstnz_br_ptr,
int_t xsup,
gridinfo_t grid,
int_t perm_u,
int_t ldu 
)
Here is the caller graph for this function:

◆ partition()

int_t partition ( int_t a,
int_t  l,
int_t  r,
int_t  dir 
)
Here is the caller graph for this function:

◆ partitionM()

int_t partitionM ( int_t a,
int_t  l,
int_t  r,
int_t  lda,
int_t  dir,
int_t  dims 
)
Here is the caller graph for this function:

◆ print_memorylog()

void print_memorylog ( SuperLUStat_t stat,
char *  msg 
)

◆ print_options_dist()

void print_options_dist ( superlu_dist_options_t options)

Print the options setting.

◆ print_panel_seg_dist()

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().

◆ print_sp_ienv_dist()

void print_sp_ienv_dist ( superlu_dist_options_t options)

Print the blocking parameters.

◆ PrintInt10()

void PrintInt10 ( char *  name,
int_t  len,
int_t x 
)

◆ PrintInt32()

void PrintInt32 ( char *  name,
int  len,
int *  x 
)

◆ PStatFree()

void PStatFree ( SuperLUStat_t stat)

◆ PStatInit()

void PStatInit ( SuperLUStat_t stat)

◆ PStatPrint()

void PStatPrint ( superlu_dist_options_t options,
SuperLUStat_t stat,
gridinfo_t grid 
)

◆ pxgstrs_finalize()

void pxgstrs_finalize ( pxgstrs_comm_t gstrs_comm)

◆ quickSort()

void quickSort ( int_t a,
int_t  l,
int_t  r,
int_t  dir 
)
Here is the caller graph for this function:

◆ quickSortM()

void quickSortM ( int_t a,
int_t  l,
int_t  r,
int_t  lda,
int_t  dir,
int_t  dims 
)
Here is the caller graph for this function:

◆ reduceStat()

int_t reduceStat ( PhaseType  PHASE,
SuperLUStat_t stat,
gridinfo3d_t grid3d 
)

reduce the states from all the two grids before prinitng it out See the defenition of enum PhaseType in superlu_enum_const.h

◆ set_default_options_dist()

void set_default_options_dist ( superlu_dist_options_t options)

Set the default values for the options argument.

◆ static_partition()

int_t static_partition ( struct superlu_pair work_load,
int_t  nwl,
int_t partition,
int_t  ldp,
int_t sums,
int_t counts,
int  nprocs 
)

◆ super_stats_dist()

void super_stats_dist ( int_t  nsuper,
int_t xsup 
)

Variable Documentation

◆ max_sup_size

int max_sup_size
static