24 #include "hicma_common.h" 27 #include "starsh-spatial.h" 28 #include "starsh-randtlr.h" 30 #include <lapacke_utils.h> 32 #include "coreblas/coreblas.h" 33 #include "coreblas/lapacke.h" 35 extern void _printmat(
double *
A,
int m,
int n,
int ld);
43 int tile_row_index,
int tile_column_index,
44 int maxrank,
double tol)
46 int ii = tile_row_index;
47 int jj = tile_column_index;
50 struct timeval tvalBefore, tvalAfter;
51 gettimeofday (&tvalBefore, NULL);
53 fprintf(stderr,
"%d+HAGcM\t|(%d,%d) m:%d n:%d lda:%d ldu:%d ldv:%d\n",MORSE_My_Mpi_Rank(), ii, jj, m, n, lda, ldu, ldv);
62 void *RD = RC->data, *CD = RD;
64 AD = malloc(
sizeof(
double) * lda * n);
70 int mn2 = maxrank+oversample;
74 size_t lwork = n, lwork_sdd = (4*mn2+7)*mn2;
77 lwork += (size_t)mn2*(2*n+m+mn2+1);
78 size_t liwork = 8*mn2;
81 iwork = malloc(
sizeof(*iwork) * liwork);
83 fprintf(stderr,
"%s %s %d:\t Allocation failed. No memory! liwork:%d", __FILE__, __func__, __LINE__, liwork);
87 work = malloc(
sizeof(*work) * lwork);
89 fprintf(stderr,
"%s %s %d:\t Allocation failed. No memory! lwork:%d", __FILE__, __func__, __LINE__, lwork);
92 starsh_dense_dlrrsdd(m, n, AD, lda, AU, ldu, AV, ldv, &rank, maxrank, oversample, tol, work, lwork, iwork);
99 printf(
"%d\thagcm-UV-output\n", __LINE__);
109 gettimeofday (&tvalAfter, NULL);
110 fprintf(stderr,
"%d-HAGcM\t|(%d,%d) rk:%g m:%d n:%d lda:%d ldu:%d ldv:%d\t\t\t\t\tHAGcM: %.4f\n",MORSE_My_Mpi_Rank(),ii,jj,Ark[0],m, n, lda, ldu, ldv,
111 (tvalAfter.tv_sec - tvalBefore.tv_sec)
112 +(tvalAfter.tv_usec - tvalBefore.tv_usec)/1000000.0
void _printmat(double *A, int m, int n, int ld)
void HCORE_zhagcm(int m, int n, double *AU, double *AV, double *Ark, int ldu, int ldv, int tile_row_index, int tile_column_index, int maxrank, double tol)
int HICMA_get_print_mat()
int HICMA_set_fixed_rank(int rank)
int HICMA_get_print_index_end()
int HICMA_get_print_index()
STARSH_blrf * HICMA_get_starsh_format()
int HICMA_get_always_fixed_rank()