HiCMA
Hierarchical Computations on Manycore Architectures
testing_ztrsmd.c File Reference

This file shows how to factorize and solve using HiCMA. X/B matrix in AX=B is dense. More...

#include "timing.h"
#include "hicma_constants.h"
#include "hicma_struct.h"
#include "hicma_z.h"
#include "hicma.h"
#include "hicma_common.h"
#include <assert.h>
#include "auxcompute_z.h"
#include "auxdescutil.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_dposv (int argc, char **argv)
 
Factorize and Solve

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

int testing_dtrsmd (int argc, char **argv)
 

Variables

STARSH_blrf * mpiF
 
int print_progress = 1
 
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
 

Detailed Description

This file shows how to factorize and solve using HiCMA. X/B matrix in AX=B is dense.

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_ztrsmd.c.

Enumeration Type Documentation

◆ blas_order_type

Enumerator
blas_rowmajor 
blas_colmajor 
blas_rowmajor 
blas_colmajor 

Definition at line 88 of file testing_ztrsmd.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 92 of file testing_ztrsmd.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 105 of file testing_ztrsmd.c.

Function Documentation

◆ 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 213 of file testing_ztrsmd.c.

◆ testing_dtrsmd()

int testing_dtrsmd ( int  argc,
char **  argv 
)

This function shows matrix factorization and solve using TLR and dense matrices. A is in TLR format. X/B is in dense format.

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. Perform Cholesky factorization.

  10. Uncompress low rank tiles.
  11. Scatter dense tiles on to diagonal of dense matrix

Definition at line 227 of file testing_ztrsmd.c.

Variable Documentation

◆ mpiF

STARSH_blrf* mpiF

Definition at line 56 of file testing_ztrsmd.c.

◆ print_progress

int print_progress = 1

Definition at line 58 of file testing_ztrsmd.c.

◆ datebuf

char datebuf[128]

Definition at line 59 of file testing_ztrsmd.c.

◆ timer

time_t timer

Definition at line 60 of file testing_ztrsmd.c.

◆ tm_info

struct tm* tm_info

Definition at line 61 of file testing_ztrsmd.c.

◆ store_only_diagonal_tiles

int store_only_diagonal_tiles = 0

Definition at line 63 of file testing_ztrsmd.c.

◆ global_check

int global_check = 0

Definition at line 64 of file testing_ztrsmd.c.

◆ global_always_fixed_rank

int global_always_fixed_rank = 0

Definition at line 65 of file testing_ztrsmd.c.

◆ global_fixed_rank

int global_fixed_rank = 0

Definition at line 66 of file testing_ztrsmd.c.

◆ global_omit_computation

int global_omit_computation = 1

Definition at line 67 of file testing_ztrsmd.c.

◆ num_mpi_ranks

int num_mpi_ranks

Definition at line 68 of file testing_ztrsmd.c.

◆ run_potrf

int run_potrf = 1

Definition at line 69 of file testing_ztrsmd.c.

◆ diag_nrows

int diag_nrows = 0

Definition at line 70 of file testing_ztrsmd.c.

◆ main_print_index

int main_print_index = 0

Definition at line 71 of file testing_ztrsmd.c.

◆ print_index

int print_index = 0

Definition at line 72 of file testing_ztrsmd.c.

◆ print_index_end

int print_index_end = 0

Definition at line 73 of file testing_ztrsmd.c.

◆ main_print_mat

int main_print_mat = 0

Definition at line 74 of file testing_ztrsmd.c.

◆ print_mat

int print_mat = 0

Definition at line 75 of file testing_ztrsmd.c.

◆ use_scratch

int use_scratch = 1

Definition at line 76 of file testing_ztrsmd.c.

◆ calc_rank_stat

int calc_rank_stat = 1

Definition at line 77 of file testing_ztrsmd.c.