HiCMA
Hierarchical Computations on Manycore Architectures
testing_zposv.c File Reference

This file shows how to factorize and solve using HiCMA. X/B matrix is in Tile Low Rank (TLR) format. More...

#include "timing.h"
#include "hicma_constants.h"
#include "hicma_struct.h"
#include "hicma_z.h"
#include "hicma.h"
#include "hicma_common.h"
#include "auxcompute_z.h"
#include "auxdescutil.h"
#include <time.h>
#include <sys/time.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <morse.h>
#include "testing_zauxiliary.h"

Go to the source code of this file.

Enumerations

enum  blas_order_type { blas_rowmajor = 101, blas_colmajor = 102, blas_rowmajor = 101, blas_colmajor = 102 }
 
enum  blas_cmach_type {
  blas_base = 151, blas_t = 152, blas_rnd = 153, blas_ieee = 154,
  blas_emin = 155, blas_emax = 156, blas_eps = 157, blas_prec = 158,
  blas_underflow = 159, blas_overflow = 160, blas_sfmin = 161, blas_base = 151,
  blas_t = 152, blas_rnd = 153, blas_ieee = 154, blas_emin = 155,
  blas_emax = 156, blas_eps = 157, blas_prec = 158, blas_underflow = 159,
  blas_overflow = 160, blas_sfmin = 161
}
 
enum  blas_norm_type {
  blas_one_norm = 171, blas_real_one_norm = 172, blas_two_norm = 173, blas_frobenius_norm = 174,
  blas_inf_norm = 175, blas_real_inf_norm = 176, blas_max_norm = 177, blas_real_max_norm = 178,
  blas_one_norm = 171, blas_real_one_norm = 172, blas_two_norm = 173, blas_frobenius_norm = 174,
  blas_inf_norm = 175, blas_real_inf_norm = 176, blas_max_norm = 177, blas_real_max_norm = 178
}
 

Functions

int testing_dtrsmd (int argc, char **argv)
 
Factorize and Solve

timing_dposv() shows how to use Cholesky factorization and then use triangular solve.

int testing_dposv (int argc, char **argv)
 

Variables

STARSH_blrf * mpiF
 
char datebuf [128]
 
time_t timer
 
struct tm * tm_info
 
int store_only_diagonal_tiles = 0
 
int global_check = 0
 
int global_always_fixed_rank = 0
 
int global_fixed_rank = 0
 
int global_omit_computation = 1
 
int num_mpi_ranks
 
int run_potrf = 1
 
int diag_nrows = 0
 
int main_print_index = 0
 
int print_index = 0
 
int print_index_end = 0
 
int main_print_mat = 0
 
int print_mat = 0
 
int use_scratch = 1
 
int calc_rank_stat = 1
 
int check = 0
 

Detailed Description

This file shows how to factorize and solve using HiCMA. X/B matrix is in Tile Low Rank (TLR) format.

HiCMA testing routine. 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 testing_zposv.c.

Enumeration Type Documentation

◆ blas_order_type

Enumerator
blas_rowmajor 
blas_colmajor 
blas_rowmajor 
blas_colmajor 

Definition at line 90 of file testing_zposv.c.

◆ blas_cmach_type

Enumerator
blas_base 
blas_t 
blas_rnd 
blas_ieee 
blas_emin 
blas_emax 
blas_eps 
blas_prec 
blas_underflow 
blas_overflow 
blas_sfmin 
blas_base 
blas_t 
blas_rnd 
blas_ieee 
blas_emin 
blas_emax 
blas_eps 
blas_prec 
blas_underflow 
blas_overflow 
blas_sfmin 

Definition at line 94 of file testing_zposv.c.

◆ blas_norm_type

Enumerator
blas_one_norm 
blas_real_one_norm 
blas_two_norm 
blas_frobenius_norm 
blas_inf_norm 
blas_real_inf_norm 
blas_max_norm 
blas_real_max_norm 
blas_one_norm 
blas_real_one_norm 
blas_two_norm 
blas_frobenius_norm 
blas_inf_norm 
blas_real_inf_norm 
blas_max_norm 
blas_real_max_norm 

Definition at line 107 of file testing_zposv.c.

Function Documentation

◆ testing_dtrsmd()

int testing_dtrsmd ( int  argc,
char **  argv 
)

Definition at line 215 of file testing_zposv.c.

◆ testing_dposv()

int testing_dposv ( int  argc,
char **  argv 
)

This function shows matrix factorization and solve using TLR matrices.

Steps are as follows:

  1. Allocate structures for TLR matrix A











  2. Allocate rank matrix for A. Set off-diagonal elements to 0 and diagonal elements to NB since only diagonals are dense.










  3. Generate whole Dense Matrix descAdense for only checking purposes.









  4. Generate diagonal Dense Matrix descAD but put the tiles in a tall and skinny matrix.








  5. Generate Compressed Matrix descAUV.







  6. Check if there exists off diagonal dense blocks.






  7. Calculate number of tiles in column dimension of B via $ceil(NRHS*1.0/NB)$





  8. Generate whole Dense Matrix descBdense for only checking purposes.




  9. Generate Compressed Matrix descBUV.



  10. Check if there exists off diagonal dense blocks.


  11. Perform Cholesky factorization.

  12. Uncompress low rank tiles.
  13. Scatter dense tiles on to diagonal of dense matrix

Definition at line 228 of file testing_zposv.c.

Variable Documentation

◆ mpiF

STARSH_blrf* mpiF

Definition at line 55 of file testing_zposv.c.

◆ datebuf

char datebuf[128]

Definition at line 57 of file testing_zposv.c.

◆ timer

time_t timer

Definition at line 58 of file testing_zposv.c.

◆ tm_info

struct tm* tm_info

Definition at line 59 of file testing_zposv.c.

◆ store_only_diagonal_tiles

int store_only_diagonal_tiles = 0

Definition at line 61 of file testing_zposv.c.

◆ global_check

int global_check = 0

Definition at line 62 of file testing_zposv.c.

◆ global_always_fixed_rank

int global_always_fixed_rank = 0

Definition at line 63 of file testing_zposv.c.

◆ global_fixed_rank

int global_fixed_rank = 0

Definition at line 64 of file testing_zposv.c.

◆ global_omit_computation

int global_omit_computation = 1

Definition at line 65 of file testing_zposv.c.

◆ num_mpi_ranks

int num_mpi_ranks

Definition at line 66 of file testing_zposv.c.

◆ run_potrf

int run_potrf = 1

Definition at line 67 of file testing_zposv.c.

◆ diag_nrows

int diag_nrows = 0

Definition at line 68 of file testing_zposv.c.

◆ main_print_index

int main_print_index = 0

Definition at line 69 of file testing_zposv.c.

◆ print_index

int print_index = 0

Definition at line 70 of file testing_zposv.c.

◆ print_index_end

int print_index_end = 0

Definition at line 71 of file testing_zposv.c.

◆ main_print_mat

int main_print_mat = 0

Definition at line 72 of file testing_zposv.c.

◆ print_mat

int print_mat = 0

Definition at line 73 of file testing_zposv.c.

◆ use_scratch

int use_scratch = 1

Definition at line 74 of file testing_zposv.c.

◆ calc_rank_stat

int calc_rank_stat = 1

Definition at line 75 of file testing_zposv.c.

◆ check

int check = 0

Definition at line 76 of file testing_zposv.c.