PaStiX Handbook  6.3.2
Eztrace_dev

Macros

#define PastixKernelStop   0
 Main stop enum event for all the events in traces.
 
#define PastixKernelsNbr   (PastixKernelLvl0Nbr + PastixKernelLvl1Nbr + PastixKernelLvl2Nbr)
 Total number of kernel events.
 

Typedefs

typedef enum pastix_ktype0_e pastix_ktype0_t
 List of the Level 0 events that may be traced in PaStiX. More...
 
typedef enum pastix_ktype_e pastix_ktype_t
 List of the Level 1 events that may be traced in PaStiX. More...
 
typedef enum pastix_ktype2_e pastix_ktype2_t
 List of the Level 2 events that may be traced in PaStiX. More...
 

Enumerations

enum  pastix_ktype0_e { PastixKernelLvl0Facto , PastixKernelLvl0Solve , PastixKernelLvl0Diag , PastixKernelLvl0Nbr }
 List of the Level 0 events that may be traced in PaStiX. More...
 
enum  pastix_ktype_e {
  PastixKernelGETRF , PastixKernelHETRF , PastixKernelPOTRF , PastixKernelPXTRF ,
  PastixKernelSYTRF , PastixKernelSCALOCblk , PastixKernelSCALOBlok , PastixKernelTRSMForw ,
  PastixKernelTRSMBack , PastixKernelTRSMCblk1d , PastixKernelTRSMCblk2d , PastixKernelTRSMCblkLR ,
  PastixKernelTRSMBlok2d , PastixKernelTRSMBlokLR , PastixKernelGEMMCblk1d1d , PastixKernelGEMMCblk1d2d ,
  PastixKernelGEMMCblk2d2d , PastixKernelGEMMCblkFRLR , PastixKernelGEMMCblkLRLR , PastixKernelGEMMBlok2d2d ,
  PastixKernelGEMMBlokLRLR , PastixKernelGEADDCblkFRFR , PastixKernelGEADDCblkFRLR , PastixKernelGEADDCblkLRLR ,
  PastixKernelLvl1Nbr
}
 List of the Level 1 events that may be traced in PaStiX. More...
 
enum  pastix_ktype2_e {
  PastixKernelLvl2GETRF , PastixKernelLvl2HETRF , PastixKernelLvl2POTRF , PastixKernelLvl2PXTRF ,
  PastixKernelLvl2SYTRF , PastixKernelLvl2_FR_TRSM , PastixKernelLvl2_LR_TRSM , PastixKernelLvl2_FR_GEMM ,
  PastixKernelLvl2_LR_FRFR2FR , PastixKernelLvl2_LR_FRLR2FR , PastixKernelLvl2_LR_LRFR2FR , PastixKernelLvl2_LR_LRLR2FR ,
  PastixKernelLvl2_LR_FRFR2LR , PastixKernelLvl2_LR_FRLR2LR , PastixKernelLvl2_LR_LRFR2LR , PastixKernelLvl2_LR_LRLR2LR ,
  PastixKernelLvl2_LR_FRFR2null , PastixKernelLvl2_LR_FRLR2null , PastixKernelLvl2_LR_LRFR2null , PastixKernelLvl2_LR_LRLR2null ,
  PastixKernelLvl2_LR_init_compress , PastixKernelLvl2_LR_add2C_uncompress , PastixKernelLvl2_LR_add2C_recompress , PastixKernelLvl2_LR_add2C_updateCfr ,
  PastixKernelLvl2_LR_add2C_orthou , PastixKernelLvl2_LR_add2C_rradd_orthogonalize , PastixKernelLvl2_LR_add2C_rradd_recompression , PastixKernelLvl2_LR_add2C_rradd_computeNewU ,
  PastixKernelLvl2Nbr
}
 List of the Level 2 events that may be traced in PaStiX. More...
 

Functions

static void kernel_trace_start_lvl0 (pastix_ktype0_t ktype)
 
static void kernel_trace_stop_lvl0 (double flops)
 
static void kernel_trace_start_lvl2 (pastix_ktype2_t ktype)
 
static void kernel_trace_stop_lvl2 (double flops)
 
static void kernel_trace_stop_lvl2_rank (double flops, int rank)
 
void kernelsTraceInit (const pastix_data_t *pastix_data, pastix_trace_t trace)
 Starts the trace module. More...
 
void kernelsTraceFinalize (const pastix_data_t *pastix_data)
 Stops the trace module. More...
 
void kernelsTraceStop ()
 Pauses the trace module.
 
void kernelsTraceStart ()
 Resumes the trace module.
 
static double kernel_trace_start (pastix_ktype_t ktype)
 Start the trace of a single kernel. More...
 
static void kernel_trace_stop (int8_t inlast, pastix_ktype_t ktype, int m, int n, int k, double flops, double starttime)
 Stop the trace of a single kernel. More...
 

Variables

volatile double kernels_flops [PastixKernelLvl1Nbr]
 Global array to store the number of flops executed per kernel.
 
pastix_atomic_lock_t lock_flops
 Lock to accumulate flops.
 
double overall_flops [3]
 Overall number of flops.
 

Detailed Description

Typedef Documentation

◆ pastix_ktype0_t

List of the Level 0 events that may be traced in PaStiX.

This is only the high level steps.

◆ pastix_ktype_t

List of the Level 1 events that may be traced in PaStiX.

This is the main information that traces all the major kernels during the factorization step.

◆ pastix_ktype2_t

List of the Level 2 events that may be traced in PaStiX.

This is the low-level information that traces all the individual calls to blas/lapack routines in the code. It is used to compute the number of flops in low-rank compression, and to distinguish the amount of flops spent in each part of the low-rank updates.

Enumeration Type Documentation

◆ pastix_ktype0_e

List of the Level 0 events that may be traced in PaStiX.

This is only the high level steps.

Definition at line 34 of file kernels_enums.h.

◆ pastix_ktype_e

List of the Level 1 events that may be traced in PaStiX.

This is the main information that traces all the major kernels during the factorization step.

Enumerator
PastixKernelGETRF 

LU diagonal block kernel

PastixKernelHETRF 

LDLh diagonal block kernel

PastixKernelPOTRF 

Cholesky diagonal block kernel

PastixKernelPXTRF 

Complex LL^t diagonal block kernel

PastixKernelSYTRF 

LDLt diagonal block kernel

PastixKernelSCALOCblk 

Scaling out-of-place of a panel

PastixKernelSCALOBlok 

Scaling out-of-place of a block

PastixKernelTRSMForw 

Solve forward TRSM block kernel

PastixKernelTRSMBack 

Solve backward TRSM block kernel

PastixKernelTRSMCblk1d 

TRSM applied to a panel in 1d layout

PastixKernelTRSMCblk2d 

TRSM applied to a panel in 2d layout

PastixKernelTRSMCblkLR 

TRSM applied to a panel in low-rank

PastixKernelTRSMBlok2d 

TRSM applied to a block in 2d layout

PastixKernelTRSMBlokLR 

TRSM applied to a block in low-rank

PastixKernelGEMMCblk1d1d 

GEMM applied from a panel in 1d layout to a panel in 1d layout

PastixKernelGEMMCblk1d2d 

GEMM applied from a panel in 1d layout to a panel in 2d layout

PastixKernelGEMMCblk2d2d 

GEMM applied from a panel in 2d layout to a panel in 2d layout

PastixKernelGEMMCblkFRLR 

GEMM applied from a panel in full-rank to a panel in low-rank

PastixKernelGEMMCblkLRLR 

GEMM applied from a panel in low-rank to a panel in low-rank

PastixKernelGEMMBlok2d2d 

GEMM applied from a block in 2d layout to a block in 2d layout

PastixKernelGEMMBlokLRLR 

GEMM applied from a block in low-rank to a block in low-rank

PastixKernelGEADDCblkFRFR 

GEADD applied from a panel in full-rank to a panel in full-rank

PastixKernelGEADDCblkFRLR 

GEADD applied from a panel in full-rank to a panel in low-rank

PastixKernelGEADDCblkLRLR 

GEADD applied from a panel in low-rank to a panel in low-rank

Definition at line 47 of file kernels_enums.h.

◆ pastix_ktype2_e

List of the Level 2 events that may be traced in PaStiX.

This is the low-level information that traces all the individual calls to blas/lapack routines in the code. It is used to compute the number of flops in low-rank compression, and to distinguish the amount of flops spent in each part of the low-rank updates.

Enumerator
PastixKernelLvl2GETRF 

LU diagonal block kernel

PastixKernelLvl2HETRF 

LDLh diagonal block kernel

PastixKernelLvl2POTRF 

Cholesky diagonal block kernel

PastixKernelLvl2PXTRF 

Complex LL^t diagonal block kernel

PastixKernelLvl2SYTRF 

LDLt diagonal block kernel

PastixKernelLvl2_LR_add2C_rradd_orthogonalize 

< CGS, partialQR or fullQR

Definition at line 84 of file kernels_enums.h.

Function Documentation

◆ kernelsTraceInit()

void kernelsTraceInit ( const pastix_data_t pastix_data,
pastix_trace_t  trace 
)

Starts the trace module.

Parameters
[in]pastix_dataThe pastix_data structure of the problem to give input information to the different trace modes.
[in]traceValue of iparm_trace :
  • PastixTraceNot = no trace
  • PastixTraceNumfact = only traces the facto
  • PastixTraceSolve = only traces the solve
  • PastixTraceFactAndSolve = traces facto and solve

Definition at line 147 of file kernels_trace.c.

References solver_matrix_s::bloknbr, solver_matrix_s::cblkmaxblk, solver_matrix_s::cblkmin2d, solver_matrix_s::cblknbr, solver_matrix_s::cblktab, pastix_data_s::dir_global, solver_matrix_s::factotype, solver_cblk_s::fblokptr, kernels_flops, lock_flops, pastix_int_t, PastixFactLU, PastixTraceNot, and pastix_data_s::solvmatr.

Referenced by pastixInitWithAffinity().

◆ kernelsTraceFinalize()

◆ kernel_trace_start()

static double kernel_trace_start ( pastix_ktype_t  ktype)
inlinestatic

Start the trace of a single kernel.

Parameters
[in]ktypeType of the kernel starting that need to be traced. With EZTrace mode, this call is empty if the environment variable PASTIX_EZTRACE_LEVEL is different from 1.
Returns
the starting time if PASTIX_GENERATE_MODEL is enabled, 0. otherwise.

Definition at line 87 of file kernels_trace.h.

Referenced by core_cgemmsp_block_frfr(), core_cgemmsp_block_frlr(), core_cgemmsp_block_lrlr(), core_ctrsmsp_2dsub(), core_ctrsmsp_lrsub(), core_dgemmsp_block_frfr(), core_dgemmsp_block_frlr(), core_dgemmsp_block_lrlr(), core_dtrsmsp_2dsub(), core_dtrsmsp_lrsub(), core_sgemmsp_block_frfr(), core_sgemmsp_block_frlr(), core_sgemmsp_block_lrlr(), core_strsmsp_2dsub(), core_strsmsp_lrsub(), core_zgemmsp_block_frfr(), core_zgemmsp_block_frlr(), core_zgemmsp_block_lrlr(), core_ztrsmsp_2dsub(), core_ztrsmsp_lrsub(), cpublok_cadd(), cpublok_dadd(), cpublok_sadd(), cpublok_zadd(), cpucblk_cadd(), cpucblk_cgemmsp(), cpucblk_cgetrfsp1d_getrf(), cpucblk_chetrfsp1d_hetrf(), cpucblk_cpotrfsp1d_potrf(), cpucblk_cpxtrfsp1d_pxtrf(), cpucblk_cscalo(), cpucblk_csytrfsp1d_sytrf(), cpucblk_dadd(), cpucblk_dgemmsp(), cpucblk_dgetrfsp1d_getrf(), cpucblk_dpotrfsp1d_potrf(), cpucblk_dscalo(), cpucblk_dsytrfsp1d_sytrf(), cpucblk_sadd(), cpucblk_sgemmsp(), cpucblk_sgetrfsp1d_getrf(), cpucblk_spotrfsp1d_potrf(), cpucblk_sscalo(), cpucblk_ssytrfsp1d_sytrf(), cpucblk_zadd(), cpucblk_zgemmsp(), cpucblk_zgetrfsp1d_getrf(), cpucblk_zhetrfsp1d_hetrf(), cpucblk_zpotrfsp1d_potrf(), cpucblk_zpxtrfsp1d_pxtrf(), cpucblk_zscalo(), cpucblk_zsytrfsp1d_sytrf(), solve_cblk_ctrsmsp_backward(), solve_cblk_ctrsmsp_forward(), solve_cblk_dtrsmsp_backward(), solve_cblk_dtrsmsp_forward(), solve_cblk_strsmsp_backward(), solve_cblk_strsmsp_forward(), solve_cblk_ztrsmsp_backward(), and solve_cblk_ztrsmsp_forward().

◆ kernel_trace_stop()

static void kernel_trace_stop ( int8_t  inlast,
pastix_ktype_t  ktype,
int  m,
int  n,
int  k,
double  flops,
double  starttime 
)
inlinestatic

Stop the trace of a single kernel.

Parameters
[in]ktypeType of the kernel starting that need to be traced. With EZTrace mode, this call is empty if the environment variable PASTIX_EZTRACE_LEVEL is different from 1.
[in]mThe m parameter of the kernel (used by xxTRF, TRSM, and GEMM)
[in]nThe n parameter of the kernel (used by TRSM, and GEMM)
[in]kThe k parameter of the kernel (used by GEMM)
[in]flopsThe number of flops of the kernel
[in]starttimeThe stating time of the kernel. Used only if PASTIX_GENERATE_MODEL is enabled.

Definition at line 139 of file kernels_trace.h.

References lock_flops, overall_flops, and PastixKernelStop.

Referenced by core_cgemmsp_block_frfr(), core_cgemmsp_block_frlr(), core_cgemmsp_block_lrlr(), core_ctrsmsp_2dsub(), core_ctrsmsp_lrsub(), core_dgemmsp_block_frfr(), core_dgemmsp_block_frlr(), core_dgemmsp_block_lrlr(), core_dtrsmsp_2dsub(), core_dtrsmsp_lrsub(), core_sgemmsp_block_frfr(), core_sgemmsp_block_frlr(), core_sgemmsp_block_lrlr(), core_strsmsp_2dsub(), core_strsmsp_lrsub(), core_zgemmsp_block_frfr(), core_zgemmsp_block_frlr(), core_zgemmsp_block_lrlr(), core_ztrsmsp_2dsub(), core_ztrsmsp_lrsub(), cpublok_cadd(), cpublok_dadd(), cpublok_sadd(), cpublok_zadd(), cpucblk_cadd(), cpucblk_cgemmsp(), cpucblk_cscalo(), cpucblk_dadd(), cpucblk_dgemmsp(), cpucblk_dscalo(), cpucblk_sadd(), cpucblk_sgemmsp(), cpucblk_sscalo(), cpucblk_zadd(), cpucblk_zgemmsp(), and cpucblk_zscalo().