SuperLU Distributed 9.0.0
gpu3d
supernodalForest.c File Reference

SuperLU utilities. More...

#include <stdio.h>
#include <assert.h>
#include "superlu_ddefs.h"
#include <math.h>
Include dependency graph for supernodalForest.c:

Classes

struct  rForest_t
 
struct  forestPartition_t
 

Macros

#define INT_T_ALLOC(x)   ((int_t *) SUPERLU_MALLOC ( (x) * sizeof (int_t)))
 
#define DOUBLE_ALLOC(x)   ((double *) SUPERLU_MALLOC ( (x) * sizeof (double)))
 
#define ABS(a)   ((a)<0?-(a):a)
 
#define ACCEPTABLE_TREE_IMBALANCE   0.2
 
#define NUM_TREE_LOWERB   32
 

Functions

int_t calcTopInfoForest (sForest_t *forest, int_t nsupers, int_t *setree)
 
sForest_t ** getForests (int_t maxLvl, int_t nsupers, int_t *setree, treeList_t *treeList)
 
double calcNodeListWeight (int_t nnodes, int_t *nodeList, treeList_t *treeList)
 
sForest_t ** getNestDissForests (int_t maxLvl, int_t nsupers, int_t *setree, treeList_t *treeList)
 
static int cmpfuncInd (const void *a, const void *b)
 
int_tgetSortIndex (int_t n, int_t *A)
 
static int cmpfuncIndDouble (const void *a, const void *b)
 
int_tgetSortIndexDouble (int_t n, double *A)
 
static int cmpfunc (const void *a, const void *b)
 
int_tpermuteArr (int_t n, int_t *A, int_t *perm)
 
double * getTreeWeights (int_t numTrees, int_t *gNodeCount, int_t **gNodeLists, treeList_t *treeList)
 
int_tgetNodeCountsFr (int_t maxLvl, sForest_t **sForests)
 
int_t ** getNodeListFr (int_t maxLvl, sForest_t **sForests)
 
int_tgetNodeToForstMap (int_t nsupers, sForest_t **sForests, gridinfo3d_t *grid3d)
 
int_tgetMyNodeCountsFr (int_t maxLvl, int_t *myTreeIdxs, sForest_t **sForests)
 
int_t ** getTreePermFr (int_t *myTreeIdxs, sForest_t **sForests, gridinfo3d_t *grid3d)
 
int * getIsNodeInMyGrid (int_t nsupers, int_t maxLvl, int_t *myNodeCount, int_t **treePerm)
 
double pearsonCoeff (int_t numForests, double *frCost, double *frWeight)
 
void printGantt (int root, int numForests, char *nodename, double scale, double *gFrstCostAcc, double *crPathCost)
 
void printForestWeightCost (sForest_t **sForests, SCT_t *SCT, gridinfo3d_t *grid3d)
 
double getLoadImbalance (int_t nTrees, int_t *treeIndx, double *gTreeWeights)
 
void freeRforest (rForest_t *rforest)
 
sForest_tcreateForestNew (int_t numTrees, int_t nsupers, int_t *nodeCounts, int_t **NodeLists, int_t *setree, treeList_t *treeList)
 
void oneLeveltreeFrPartition (int_t nTrees, int_t *trCount, int_t **trList, int_t *treeSet, double *sWeightArr)
 
void resizeArr (void **A, int oldSize, int newSize, size_t typeSize)
 
forestPartition_t iterativeFrPartitioning (rForest_t *rforest, int_t nsupers, int_t *setree, treeList_t *treeList)
 
sForest_tr2sForest (rForest_t *rforest, int_t nsupers, int_t *setree, treeList_t *treeList)
 
sForest_t ** getGreedyLoadBalForests (int_t maxLvl, int_t nsupers, int_t *setree, treeList_t *treeList)
 
sForest_t ** getOneLevelBalForests (int_t maxLvl, int_t nsupers, int_t *setree, treeList_t *treeList)
 
int * getBrecvTree (int_t nlb, sForest_t *sforest, int *bmod, gridinfo_t *grid)
 
int * getBrecvTree_newsolve (int_t nlb, int_t nsupers, int *supernodeMask, int *bmod, gridinfo_t *grid)
 
int getNrootUsolveTree (int_t *nbrecvmod, sForest_t *sforest, int *brecv, int *bmod, gridinfo_t *grid)
 
int getNbrecvX (sForest_t *sforest, int_t *Urbs, gridinfo_t *grid)
 
int getNbrecvX_newsolve (int_t nsupers, int *supernodeMask, int_t *Urbs, Ucb_indptr_t **Ucb_indptr, gridinfo_t *grid)
 
int getNrootUsolveTree_newsolve (int_t *nbrecvmod, int_t nsupers, int *supernodeMask, int *brecv, int *bmod, gridinfo_t *grid)
 
int_t getNfrecvmodLeaf (int *nleaf, sForest_t *sforest, int *frecv, int *fmod, gridinfo_t *grid)
 
int_t getNfrecvmod_newsolve (int *nleaf, int_t nsupers, int *supernodeMask, int *frecv, int *fmod, gridinfo_t *grid)
 
int_t zAllocBcast (int_t size, void **ptr, gridinfo3d_t *grid3d)
 
int_t zAllocBcast_gridID (int_t size, void **ptr, int_t gridID, gridinfo3d_t *grid3d)
 
int * getfrecv_newsolve (int_t nsupers, int *supernodeMask, int_t nlb, int *fmod, int *mod_bit, gridinfo_t *grid)
 
int * getfrecvLeaf (sForest_t *sforest, int_t nlb, int *fmod, int *mod_bit, gridinfo_t *grid)
 
int getNfrecvx_newsolve (int_t nsupers, int *supernodeMask, int_t **Lrowind_bc_ptr, int_t **Lindval_loc_bc_ptr, gridinfo_t *grid)
 
int getNfrecvxLeaf (sForest_t *sforest, int_t **Lrowind_bc_ptr, gridinfo_t *grid)
 
int * getfmod_newsolve (int_t nlb, int_t nsupers, int *supernodeMask, int_t **Lrowind_bc_ptr, int_t **Lindval_loc_bc_ptr, gridinfo_t *grid)
 
int * getfmodLeaf (int_t nlb, int *fmod_i)
 
int getldu (int_t knsupc, int_t iklrow, int_t *usub)
 
int * getBmod3d (int_t treeId, int_t nlb, sForest_t *sforest, int_t *xsup, int_t **Ufstnz_br_ptr, int_t *supernode2treeMap, gridinfo_t *grid)
 
int * getBmod3d_newsolve (int_t nlb, int_t nsupers, int *supernodeMask, int_t *xsup, int_t **Ufstnz_br_ptr, gridinfo_t *grid)
 

Variables

static int_tsortPtr
 
static double * sortPtrDouble
 
int * mystatus
 
int * mystatusmod
 
int * d_rownum
 
int * d_rowstart
 
int * mystatus_u
 
int * mystatusmod_u
 
int * d_status
 
int * d_statusmod
 
uint64_t * flag_bc_q
 
uint64_t * flag_rd_q
 
int * my_flag_bc
 
int * my_flag_rd
 
int * d_mynum
 
int * d_mymaskstart
 
int * d_mymasklength
 
int * d_mynum_u
 
int * d_mymaskstart_u
 
int * d_mymasklength_u
 
int * d_nfrecv
 
int * h_nfrecv
 
int * d_colnum
 
int * d_nfrecv_u
 
int * h_nfrecv_u
 
int * d_colnum_u
 
int * d_nfrecvmod
 
int * h_nfrecvmod
 
int * d_colnummod
 
int * d_nfrecvmod_u
 
int * h_nfrecvmod_u
 
int * d_colnummod_u
 
int * d_mynummod
 
int * d_mymaskstartmod
 
int * d_mymasklengthmod
 
int * d_mynummod_u
 
int * d_mymaskstartmod_u
 
int * d_mymasklengthmod_u
 
int * d_recv_cnt
 
int * d_msgnum
 
int * d_recv_cnt_u
 
int * d_msgnum_u
 
int * d_flag_mod
 
int * d_flag_mod_u
 

Detailed Description

SuperLU utilities.

-- Distributed SuperLU routine (version 9.0) --
Lawrence Berkeley National Lab, Oak Ridge National Lab
May 12, 2021

Macro Definition Documentation

◆ ABS

#define ABS (   a)    ((a)<0?-(a):a)

◆ ACCEPTABLE_TREE_IMBALANCE

#define ACCEPTABLE_TREE_IMBALANCE   0.2

◆ DOUBLE_ALLOC

#define DOUBLE_ALLOC (   x)    ((double *) SUPERLU_MALLOC ( (x) * sizeof (double)))

◆ INT_T_ALLOC

#define INT_T_ALLOC (   x)    ((int_t *) SUPERLU_MALLOC ( (x) * sizeof (int_t)))

◆ NUM_TREE_LOWERB

#define NUM_TREE_LOWERB   32

Function Documentation

◆ calcNodeListWeight()

double calcNodeListWeight ( int_t  nnodes,
int_t nodeList,
treeList_t treeList 
)
Here is the caller graph for this function:

◆ calcTopInfoForest()

int_t calcTopInfoForest ( sForest_t forest,
int_t  nsupers,
int_t setree 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cmpfunc()

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

◆ cmpfuncInd()

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

◆ cmpfuncIndDouble()

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

◆ createForestNew()

sForest_t * createForestNew ( int_t  numTrees,
int_t  nsupers,
int_t nodeCounts,
int_t **  NodeLists,
int_t setree,
treeList_t treeList 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freeRforest()

void freeRforest ( rForest_t rforest)
Here is the caller graph for this function:

◆ getBmod3d()

int * getBmod3d ( int_t  treeId,
int_t  nlb,
sForest_t sforest,
int_t xsup,
int_t **  Ufstnz_br_ptr,
int_t supernode2treeMap,
gridinfo_t grid 
)
Here is the caller graph for this function:

◆ getBmod3d_newsolve()

int * getBmod3d_newsolve ( int_t  nlb,
int_t  nsupers,
int *  supernodeMask,
int_t xsup,
int_t **  Ufstnz_br_ptr,
gridinfo_t grid 
)
Here is the caller graph for this function:

◆ getBrecvTree()

int * getBrecvTree ( int_t  nlb,
sForest_t sforest,
int *  bmod,
gridinfo_t grid 
)
Here is the caller graph for this function:

◆ getBrecvTree_newsolve()

int * getBrecvTree_newsolve ( int_t  nlb,
int_t  nsupers,
int *  supernodeMask,
int *  bmod,
gridinfo_t grid 
)
Here is the caller graph for this function:

◆ getfmod_newsolve()

int * getfmod_newsolve ( int_t  nlb,
int_t  nsupers,
int *  supernodeMask,
int_t **  Lrowind_bc_ptr,
int_t **  Lindval_loc_bc_ptr,
gridinfo_t grid 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getfmodLeaf()

int * getfmodLeaf ( int_t  nlb,
int *  fmod_i 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getForests()

sForest_t ** getForests ( int_t  maxLvl,
int_t  nsupers,
int_t setree,
treeList_t treeList 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getfrecv_newsolve()

int * getfrecv_newsolve ( int_t  nsupers,
int *  supernodeMask,
int_t  nlb,
int *  fmod,
int *  mod_bit,
gridinfo_t grid 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getfrecvLeaf()

int * getfrecvLeaf ( sForest_t sforest,
int_t  nlb,
int *  fmod,
int *  mod_bit,
gridinfo_t grid 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getGreedyLoadBalForests()

sForest_t ** getGreedyLoadBalForests ( int_t  maxLvl,
int_t  nsupers,
int_t setree,
treeList_t treeList 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getIsNodeInMyGrid()

int * getIsNodeInMyGrid ( int_t  nsupers,
int_t  maxLvl,
int_t myNodeCount,
int_t **  treePerm 
)
Here is the caller graph for this function:

◆ getldu()

int getldu ( int_t  knsupc,
int_t  iklrow,
int_t usub 
)
Here is the caller graph for this function:

◆ getLoadImbalance()

double getLoadImbalance ( int_t  nTrees,
int_t treeIndx,
double *  gTreeWeights 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMyNodeCountsFr()

int_t * getMyNodeCountsFr ( int_t  maxLvl,
int_t myTreeIdxs,
sForest_t **  sForests 
)
Here is the caller graph for this function:

◆ getNbrecvX()

int getNbrecvX ( sForest_t sforest,
int_t Urbs,
gridinfo_t grid 
)
Here is the caller graph for this function:

◆ getNbrecvX_newsolve()

int getNbrecvX_newsolve ( int_t  nsupers,
int *  supernodeMask,
int_t Urbs,
Ucb_indptr_t **  Ucb_indptr,
gridinfo_t grid 
)
Here is the caller graph for this function:

◆ getNestDissForests()

sForest_t ** getNestDissForests ( int_t  maxLvl,
int_t  nsupers,
int_t setree,
treeList_t treeList 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getNfrecvmod_newsolve()

int_t getNfrecvmod_newsolve ( int *  nleaf,
int_t  nsupers,
int *  supernodeMask,
int *  frecv,
int *  fmod,
gridinfo_t grid 
)
Here is the caller graph for this function:

◆ getNfrecvmodLeaf()

int_t getNfrecvmodLeaf ( int *  nleaf,
sForest_t sforest,
int *  frecv,
int *  fmod,
gridinfo_t grid 
)
Here is the caller graph for this function:

◆ getNfrecvx_newsolve()

int getNfrecvx_newsolve ( int_t  nsupers,
int *  supernodeMask,
int_t **  Lrowind_bc_ptr,
int_t **  Lindval_loc_bc_ptr,
gridinfo_t grid 
)
Here is the caller graph for this function:

◆ getNfrecvxLeaf()

int getNfrecvxLeaf ( sForest_t sforest,
int_t **  Lrowind_bc_ptr,
gridinfo_t grid 
)
Here is the caller graph for this function:

◆ getNodeCountsFr()

int_t * getNodeCountsFr ( int_t  maxLvl,
sForest_t **  sForests 
)
Here is the caller graph for this function:

◆ getNodeListFr()

int_t ** getNodeListFr ( int_t  maxLvl,
sForest_t **  sForests 
)
Here is the caller graph for this function:

◆ getNodeToForstMap()

int_t * getNodeToForstMap ( int_t  nsupers,
sForest_t **  sForests,
gridinfo3d_t grid3d 
)
Here is the call graph for this function:

◆ getNrootUsolveTree()

int getNrootUsolveTree ( int_t nbrecvmod,
sForest_t sforest,
int *  brecv,
int *  bmod,
gridinfo_t grid 
)
Here is the caller graph for this function:

◆ getNrootUsolveTree_newsolve()

int getNrootUsolveTree_newsolve ( int_t nbrecvmod,
int_t  nsupers,
int *  supernodeMask,
int *  brecv,
int *  bmod,
gridinfo_t grid 
)
Here is the caller graph for this function:

◆ getOneLevelBalForests()

sForest_t ** getOneLevelBalForests ( int_t  maxLvl,
int_t  nsupers,
int_t setree,
treeList_t treeList 
)
Here is the call graph for this function:

◆ getSortIndex()

int_t * getSortIndex ( int_t  n,
int_t A 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSortIndexDouble()

int_t * getSortIndexDouble ( int_t  n,
double *  A 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTreePermFr()

int_t ** getTreePermFr ( int_t myTreeIdxs,
sForest_t **  sForests,
gridinfo3d_t grid3d 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTreeWeights()

double * getTreeWeights ( int_t  numTrees,
int_t gNodeCount,
int_t **  gNodeLists,
treeList_t treeList 
)
Here is the call graph for this function:

◆ iterativeFrPartitioning()

forestPartition_t iterativeFrPartitioning ( rForest_t rforest,
int_t  nsupers,
int_t setree,
treeList_t treeList 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ oneLeveltreeFrPartition()

void oneLeveltreeFrPartition ( int_t  nTrees,
int_t trCount,
int_t **  trList,
int_t treeSet,
double *  sWeightArr 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pearsonCoeff()

double pearsonCoeff ( int_t  numForests,
double *  frCost,
double *  frWeight 
)
Here is the caller graph for this function:

◆ permuteArr()

int_t * permuteArr ( int_t  n,
int_t A,
int_t perm 
)
Here is the caller graph for this function:

◆ printForestWeightCost()

void printForestWeightCost ( sForest_t **  sForests,
SCT_t SCT,
gridinfo3d_t grid3d 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ printGantt()

void printGantt ( int  root,
int  numForests,
char *  nodename,
double  scale,
double *  gFrstCostAcc,
double *  crPathCost 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ r2sForest()

sForest_t * r2sForest ( rForest_t rforest,
int_t  nsupers,
int_t setree,
treeList_t treeList 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ resizeArr()

void resizeArr ( void **  A,
int  oldSize,
int  newSize,
size_t  typeSize 
)
Here is the caller graph for this function:

◆ zAllocBcast()

int_t zAllocBcast ( int_t  size,
void **  ptr,
gridinfo3d_t grid3d 
)

◆ zAllocBcast_gridID()

int_t zAllocBcast_gridID ( int_t  size,
void **  ptr,
int_t  gridID,
gridinfo3d_t grid3d 
)
Here is the caller graph for this function:

Variable Documentation

◆ d_colnum

int * d_colnum

◆ d_colnum_u

int * d_colnum_u

◆ d_colnummod

int * d_colnummod

◆ d_colnummod_u

int * d_colnummod_u

◆ d_flag_mod

int* d_flag_mod

◆ d_flag_mod_u

int * d_flag_mod_u

◆ d_msgnum

int * d_msgnum

◆ d_msgnum_u

int * d_msgnum_u

◆ d_mymasklength

int * d_mymasklength

◆ d_mymasklength_u

int * d_mymasklength_u

◆ d_mymasklengthmod

int * d_mymasklengthmod

◆ d_mymasklengthmod_u

int * d_mymasklengthmod_u

◆ d_mymaskstart

int * d_mymaskstart

◆ d_mymaskstart_u

int * d_mymaskstart_u

◆ d_mymaskstartmod

int * d_mymaskstartmod

◆ d_mymaskstartmod_u

int * d_mymaskstartmod_u

◆ d_mynum

int* d_mynum

◆ d_mynum_u

int* d_mynum_u

◆ d_mynummod

int* d_mynummod

◆ d_mynummod_u

int* d_mynummod_u

◆ d_nfrecv

int* d_nfrecv

◆ d_nfrecv_u

int* d_nfrecv_u

◆ d_nfrecvmod

int* d_nfrecvmod

◆ d_nfrecvmod_u

int* d_nfrecvmod_u

◆ d_recv_cnt

int* d_recv_cnt

◆ d_recv_cnt_u

int* d_recv_cnt_u

◆ d_rownum

int * d_rownum

◆ d_rowstart

int * d_rowstart

◆ d_status

int* d_status

◆ d_statusmod

int * d_statusmod

◆ flag_bc_q

uint64_t* flag_bc_q

◆ flag_rd_q

uint64_t * flag_rd_q

◆ h_nfrecv

int * h_nfrecv

◆ h_nfrecv_u

int * h_nfrecv_u

◆ h_nfrecvmod

int * h_nfrecvmod

◆ h_nfrecvmod_u

int * h_nfrecvmod_u

◆ my_flag_bc

int* my_flag_bc

◆ my_flag_rd

int * my_flag_rd

◆ mystatus

int* mystatus

◆ mystatus_u

int* mystatus_u

◆ mystatusmod

int * mystatusmod

◆ mystatusmod_u

int * mystatusmod_u

◆ sortPtr

int_t* sortPtr
static

◆ sortPtrDouble

double* sortPtrDouble
static