HiCMA
Hierarchical Computations on Manycore Architectures
timing.h File Reference
#include "morse.h"

Go to the source code of this file.

Macros

#define _TYPE   double
 
#define _PREC   double
 
#define _LAMCH   LAPACKE_dlamch_work
 
#define _FMULS   0
 
#define _FADDS   0
 
#define _NAME   "HICMA_zgemm_Tile"
 
#define PASTE_CODE_IPARAM_LOCALS(iparam)
 
#define PASTE_CODE_ALLOCATE_MATRIX_TILE(_desc_, _cond_, _type_, _type2_, _lda_, _m_, _n_)
 
#define PASTE_CODE_FREE_MATRIX(_desc_)   MORSE_Desc_Destroy( &_desc_ );
 
#define PASTE_TILE_TO_LAPACK(_desc_, _name_, _cond_, _type_, _lda_, _n_)
 
#define PASTE_CODE_ALLOCATE_MATRIX(_name_, _cond_, _type_, _lda_, _n_)
 
#define PASTE_CODE_ALLOCATE_COPY(_name_, _cond_, _type_, _orig_, _lda_, _n_)
 
#define START_TRACING()
 
#define STOP_TRACING()
 
#define START_DAG()   do {} while(0);
 
#define STOP_DAG()   do {} while(0);
 
#define START_DISTRIBUTED()   do {} while(0);
 
#define STOP_DISTRIBUTED()   do {} while(0);
 
#define START_TIMING()
 
#define STOP_TIMING()
 

Typedefs

typedef double morse_time_t
 

Enumerations

enum  iparam_timing {
  IPARAM_THRDNBR, IPARAM_THRDNBR_SUBGRP, IPARAM_SCHEDULER, IPARAM_M,
  IPARAM_N, IPARAM_K, IPARAM_LDA, IPARAM_LDB,
  IPARAM_LDC, IPARAM_IB, IPARAM_NB, IPARAM_MB,
  IPARAM_NITER, IPARAM_WARMUP, IPARAM_BIGMAT, IPARAM_CHECK,
  IPARAM_VERBOSE, IPARAM_AUTOTUNING, IPARAM_INPUTFMT, IPARAM_OUTPUTFMT,
  IPARAM_TRACE, IPARAM_DAG, IPARAM_ASYNC, IPARAM_MX,
  IPARAM_NX, IPARAM_RHBLK, IPARAM_INPLACE, IPARAM_MODE,
  IPARAM_INVERSE, IPARAM_NCUDAS, IPARAM_NMPI, IPARAM_P,
  IPARAM_Q, IPARAM_PROGRESS, IPARAM_GEMM3M, IPARAM_PROFILE,
  IPARAM_PRINT_WARNINGS, IPARAM_PEAK, IPARAM_PARALLEL_TASKS, IPARAM_NO_CPU,
  IPARAM_BOUND, IPARAM_BOUNDDEPS, IPARAM_BOUNDDEPSPRIO, IPARAM_RK,
  IPARAM_ACC, IPARAM_HICMA_MAXRANK, IPARAM_HICMA_STARSH_PROB, IPARAM_HICMA_STARSH_MAXRANK,
  IPARAM_HICMA_PRINTMAT, IPARAM_HICMA_PRINTINDEX, IPARAM_HICMA_PRINTINDEXEND, IPARAM_HICMA_ALWAYS_FIXED_RANK,
  IPARAM_SIZEOF
}
 
enum  dparam_timing {
  IPARAM_TIME, IPARAM_ANORM, IPARAM_BNORM, IPARAM_XNORM,
  IPARAM_RNORM, IPARAM_AinvNORM, IPARAM_ESTIMATED_PEAK, IPARAM_RES,
  IPARAM_THRESHOLD_CHECK, IPARAM_HICMA_STARSH_DECAY, IPARAM_HICMA_STARSH_WAVE_K, IPARAM_DNBPARAM
}
 

Functions

int RunTest (int *iparam, double *dparam, morse_time_t *t_, char *rankfile)
 
void * morse_getaddr_null (const MORSE_desc_t *A, int m, int n)
 

Detailed Description

This file contains the macros used for timing experiments.

HiCMA is a software package provided by King Abdullah University of Science and Technology (KAUST)

Version
0.1.1
Author
Kadir Akbudak
Date
2018-11-08

Definition in file timing.h.

Macro Definition Documentation

◆ _TYPE

#define _TYPE   double

Definition at line 31 of file timing.h.

◆ _PREC

#define _PREC   double

Definition at line 32 of file timing.h.

◆ _LAMCH

#define _LAMCH   LAPACKE_dlamch_work

Definition at line 33 of file timing.h.

◆ _FMULS

#define _FMULS   0

Definition at line 35 of file timing.h.

◆ _FADDS

#define _FADDS   0

Definition at line 36 of file timing.h.

◆ _NAME

#define _NAME   "HICMA_zgemm_Tile"

Definition at line 37 of file timing.h.

◆ PASTE_CODE_IPARAM_LOCALS

#define PASTE_CODE_IPARAM_LOCALS (   iparam)
Value:
double t; \
int64_t M = iparam[IPARAM_M]; \
int64_t N = iparam[IPARAM_N]; \
int64_t K = iparam[IPARAM_K]; \
int64_t NRHS = K; \
int64_t LDA = chameleon_max(M, iparam[IPARAM_LDA]); \
int64_t LDB = chameleon_max(N, iparam[IPARAM_LDB]); \
int64_t LDC = chameleon_max(K, iparam[IPARAM_LDC]); \
int64_t IB = iparam[IPARAM_IB]; \
int64_t MB = iparam[IPARAM_MB]; \
int64_t NB = iparam[IPARAM_NB]; \
int64_t P = iparam[IPARAM_P]; \
int64_t Q = iparam[IPARAM_Q]; \
int64_t MT = (M%MB==0) ? (M/MB) : (M/MB+1); \
int64_t NT = (N%NB==0) ? (N/NB) : (N/NB+1); \
int bigmat = iparam[IPARAM_BIGMAT]; \
int check = iparam[IPARAM_CHECK]; \
int loud = iparam[IPARAM_VERBOSE]; \
(void)M;(void)N;(void)K;(void)NRHS; \
(void)LDA;(void)LDB;(void)LDC; \
(void)IB;(void)MB;(void)NB;(void)P;(void)Q; \
(void)MT;(void)NT;(void)check;(void)loud;(void)bigmat;
int check
Definition: testing_zposv.c:76

Definition at line 125 of file timing.h.

◆ PASTE_CODE_ALLOCATE_MATRIX_TILE

#define PASTE_CODE_ALLOCATE_MATRIX_TILE (   _desc_,
  _cond_,
  _type_,
  _type2_,
  _lda_,
  _m_,
  _n_ 
)
Value:
MORSE_desc_t *_desc_ = NULL; \
int status ## _desc_ ; \
if( _cond_ ) { \
if (!bigmat){ \
status ## _desc_ = MORSE_Desc_Create_User(&(_desc_), NULL, _type2_, MB, NB, MB*NB, _lda_, _n_, 0, 0, _m_, _n_, \
P, Q, morse_getaddr_null, NULL, NULL);\
}\
else {\
status ## _desc_ = MORSE_Desc_Create(&(_desc_), NULL, _type2_, MB, NB, MB*NB, _lda_, _n_, 0, 0, _m_, _n_, \
P, Q);\
}\
if (status ## _desc_ != MORSE_SUCCESS) return (status ## _desc_); \
}
void * morse_getaddr_null(const MORSE_desc_t *A, int m, int n)
Definition: timing.c:79

Definition at line 150 of file timing.h.

◆ PASTE_CODE_FREE_MATRIX

#define PASTE_CODE_FREE_MATRIX (   _desc_)    MORSE_Desc_Destroy( &_desc_ );

Definition at line 165 of file timing.h.

◆ PASTE_TILE_TO_LAPACK

#define PASTE_TILE_TO_LAPACK (   _desc_,
  _name_,
  _cond_,
  _type_,
  _lda_,
  _n_ 
)
Value:
_type_ *_name_ = NULL; \
if ( _cond_ ) { \
_name_ = (_type_*)malloc( (_lda_) * (_n_) * sizeof(_type_)); \
if ( ! _name_ ) { \
fprintf(stderr, "Out of Memory for %s\n", #_name_); \
return -1; \
} \
MORSE_Tile_to_Lapack(_desc_, (void*)_name_, _lda_); \
}

Definition at line 168 of file timing.h.

◆ PASTE_CODE_ALLOCATE_MATRIX

#define PASTE_CODE_ALLOCATE_MATRIX (   _name_,
  _cond_,
  _type_,
  _lda_,
  _n_ 
)
Value:
_type_ *_name_ = NULL; \
if( _cond_ ) { \
_name_ = (_type_*)malloc( (_lda_) * (_n_) * sizeof(_type_) ); \
if ( ! _name_ ) { \
fprintf(stderr, "Out of Memory for %s\n", #_name_); \
return -1; \
} \
}

Definition at line 179 of file timing.h.

◆ PASTE_CODE_ALLOCATE_COPY

#define PASTE_CODE_ALLOCATE_COPY (   _name_,
  _cond_,
  _type_,
  _orig_,
  _lda_,
  _n_ 
)
Value:
_type_ *_name_ = NULL; \
if( _cond_ ) { \
_name_ = (_type_*)malloc( (_lda_) * (_n_) * sizeof(_type_) ); \
if ( ! _name_ ) { \
fprintf(stderr, "Out of Memory for %s\n", #_name_); \
return -1; \
} \
memcpy(_name_, _orig_, (_lda_) * (_n_) * sizeof(_type_) ); \
}

Definition at line 189 of file timing.h.

◆ START_TRACING

#define START_TRACING ( )
Value:
RUNTIME_start_stats(); \
if(iparam[IPARAM_TRACE] == 2) { \
RUNTIME_start_profiling(); \
} \
if(iparam[IPARAM_BOUND]) { \
MORSE_Enable(MORSE_BOUND); \
}

Definition at line 205 of file timing.h.

◆ STOP_TRACING

#define STOP_TRACING ( )
Value:
RUNTIME_stop_stats(); \
if(iparam[IPARAM_TRACE] == 2) { \
RUNTIME_stop_profiling(); \
} \
if(iparam[IPARAM_BOUND]) { \
MORSE_Disable(MORSE_BOUND); \
}

Definition at line 214 of file timing.h.

◆ START_DAG

#define START_DAG ( )    do {} while(0);

Definition at line 237 of file timing.h.

◆ STOP_DAG

#define STOP_DAG ( )    do {} while(0);

Definition at line 238 of file timing.h.

◆ START_DISTRIBUTED

#define START_DISTRIBUTED ( )    do {} while(0);

Definition at line 250 of file timing.h.

◆ STOP_DISTRIBUTED

#define STOP_DISTRIBUTED ( )    do {} while(0);

Definition at line 251 of file timing.h.

◆ START_TIMING

#define START_TIMING ( )
Value:
t = -RUNTIME_get_time(); \
START_DAG(); \
START_TRACING(); \
START_DISTRIBUTED();

Definition at line 259 of file timing.h.

◆ STOP_TIMING

#define STOP_TIMING ( )
Value:
t += RUNTIME_get_time(); \
if (iparam[IPARAM_PROFILE] == 2) { \
RUNTIME_kernelprofile_display(); \
RUNTIME_schedprofile_display(); \
} \
*t_ = t; \
STOP_DISTRIBUTED(); \
STOP_TRACING(); \
STOP_DAG();

Definition at line 265 of file timing.h.

Typedef Documentation

◆ morse_time_t

typedef double morse_time_t

Definition at line 42 of file timing.h.

Enumeration Type Documentation

◆ iparam_timing

Enumerator
IPARAM_THRDNBR 
IPARAM_THRDNBR_SUBGRP 
IPARAM_SCHEDULER 
IPARAM_M 
IPARAM_N 
IPARAM_K 
IPARAM_LDA 
IPARAM_LDB 
IPARAM_LDC 
IPARAM_IB 
IPARAM_NB 
IPARAM_MB 
IPARAM_NITER 
IPARAM_WARMUP 
IPARAM_BIGMAT 
IPARAM_CHECK 
IPARAM_VERBOSE 
IPARAM_AUTOTUNING 
IPARAM_INPUTFMT 
IPARAM_OUTPUTFMT 
IPARAM_TRACE 
IPARAM_DAG 
IPARAM_ASYNC 
IPARAM_MX 
IPARAM_NX 
IPARAM_RHBLK 
IPARAM_INPLACE 
IPARAM_MODE 
IPARAM_INVERSE 
IPARAM_NCUDAS 
IPARAM_NMPI 
IPARAM_P 
IPARAM_Q 
IPARAM_PROGRESS 
IPARAM_GEMM3M 
IPARAM_PROFILE 
IPARAM_PRINT_WARNINGS 
IPARAM_PEAK 
IPARAM_PARALLEL_TASKS 
IPARAM_NO_CPU 
IPARAM_BOUND 
IPARAM_BOUNDDEPS 
IPARAM_BOUNDDEPSPRIO 
IPARAM_RK 
IPARAM_ACC 
IPARAM_HICMA_MAXRANK 
IPARAM_HICMA_STARSH_PROB 
IPARAM_HICMA_STARSH_MAXRANK 
IPARAM_HICMA_PRINTMAT 
IPARAM_HICMA_PRINTINDEX 
IPARAM_HICMA_PRINTINDEXEND 
IPARAM_HICMA_ALWAYS_FIXED_RANK 
IPARAM_SIZEOF 

Definition at line 48 of file timing.h.

◆ dparam_timing

Enumerator
IPARAM_TIME 
IPARAM_ANORM 
IPARAM_BNORM 
IPARAM_XNORM 
IPARAM_RNORM 
IPARAM_AinvNORM 
IPARAM_ESTIMATED_PEAK 
IPARAM_RES 
IPARAM_THRESHOLD_CHECK 
IPARAM_HICMA_STARSH_DECAY 
IPARAM_HICMA_STARSH_WAVE_K 
IPARAM_DNBPARAM 

Definition at line 108 of file timing.h.

Function Documentation

◆ RunTest()

int RunTest ( int *  iparam,
double *  dparam,
morse_time_t t_,
char *  rankfile 
)

Definition at line 153 of file time_zgemm_tile.c.

◆ morse_getaddr_null()

void* morse_getaddr_null ( const MORSE_desc_t *  A,
int  m,
int  n 
)

Definition at line 79 of file timing.c.