Commit d7123639 authored by Mathieu Faverge's avatar Mathieu Faverge

Fix another round of sonarqube issues in timings

parent f1d27d3a
...@@ -48,6 +48,9 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_) ...@@ -48,6 +48,9 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_)
#if !defined(CHAMELEON_SIMULATION) #if !defined(CHAMELEON_SIMULATION)
LAPACKE_zlarnv_work(1, ISEED, 1, &alpha); LAPACKE_zlarnv_work(1, ISEED, 1, &alpha);
LAPACKE_zlarnv_work(1, ISEED, 1, &beta); LAPACKE_zlarnv_work(1, ISEED, 1, &beta);
#else
alpha = 1.5;
beta = -2.3;
#endif #endif
/* Save C for check */ /* Save C for check */
......
...@@ -36,7 +36,7 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_) ...@@ -36,7 +36,7 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_)
/* Allocate Data */ /* Allocate Data */
PASTE_CODE_ALLOCATE_MATRIX_TILE( descA, 1, MORSE_Complex64_t, MorseComplexDouble, LDA, M, N ); PASTE_CODE_ALLOCATE_MATRIX_TILE( descA, 1, MORSE_Complex64_t, MorseComplexDouble, LDA, M, N );
PASTE_CODE_ALLOCATE_MATRIX( VT, (jobvt == MorseVec), MORSE_Complex64_t, N, N ); PASTE_CODE_ALLOCATE_MATRIX( VT, (jobvt == MorseVec), MORSE_Complex64_t, N, N );
PASTE_CODE_ALLOCATE_MATRIX( U, (jobu == MorseVec), MORSE_Complex64_t, M, M ); PASTE_CODE_ALLOCATE_MATRIX( U, (jobu == MorseVec), MORSE_Complex64_t, M, M );
PASTE_CODE_ALLOCATE_MATRIX( S, 1, double, N, 1 ); PASTE_CODE_ALLOCATE_MATRIX( S, 1, double, N, 1 );
/* Initialiaze Data */ /* Initialiaze Data */
...@@ -46,7 +46,7 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_) ...@@ -46,7 +46,7 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_)
MORSE_Alloc_Workspace_zgesvd(N, N, &descT, 1, 1); MORSE_Alloc_Workspace_zgesvd(N, N, &descT, 1, 1);
if ( jobu == MorseVec ) { if ( jobu == MorseVec ) {
LAPACKE_zlaset_work(LAPACK_COL_MAJOR, 'A', M, M, 0., 1., U, M); LAPACKE_zlaset_work(LAPACK_COL_MAJOR, 'A', M, M, 0., 1., U, M);
} }
if ( jobvt == MorseVec ) { if ( jobvt == MorseVec ) {
LAPACKE_zlaset_work(LAPACK_COL_MAJOR, 'A', N, N, 0., 1., VT, N); LAPACKE_zlaset_work(LAPACK_COL_MAJOR, 'A', N, N, 0., 1., VT, N);
...@@ -56,18 +56,18 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_) ...@@ -56,18 +56,18 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_)
INFO = MORSE_zgesvd_Tile(jobu, jobvt, descA, S, descT, U, M, VT, N); INFO = MORSE_zgesvd_Tile(jobu, jobvt, descA, S, descT, U, M, VT, N);
STOP_TIMING(); STOP_TIMING();
if(INFO!=0){ if( INFO != 0 ) {
printf(" ERROR OCCURED INFO %d\n",INFO); printf(" ERROR OCCURED INFO %d\n",INFO);
} }
/* DeAllocate Workspace */ /* DeAllocate Workspace */
MORSE_Dealloc_Workspace(&descT); MORSE_Dealloc_Workspace(&descT);
if (jobu == MorseVec) { if ( U != NULL ) {
free( U ); free( U );
} }
if (jobvt == MorseVec) { if ( VT != NULL) {
free( VT ); free( VT );
} }
PASTE_CODE_FREE_MATRIX( descA ); PASTE_CODE_FREE_MATRIX( descA );
free( S ); free( S );
......
...@@ -77,7 +77,8 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_) ...@@ -77,7 +77,8 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_)
free( A ); free( A );
} }
#endif #endif
PASTE_CODE_FREE_MATRIX( descA );
PASTE_CODE_FREE_MATRIX( descA );
(void)normmorse;
return 0; return 0;
} }
...@@ -160,7 +160,6 @@ Test(int64_t n, int *iparam) { ...@@ -160,7 +160,6 @@ Test(int64_t n, int *iparam) {
fadds = (double)(_FADDS); fadds = (double)(_FADDS);
fmuls = (double)(_FMULS); fmuls = (double)(_FMULS);
flops = 1e-9 * (fmuls * fp_per_mul + fadds * fp_per_add); flops = 1e-9 * (fmuls * fp_per_mul + fadds * fp_per_add);
gflops = 0.0;
if ( iparam[IPARAM_WARMUP] ) { if ( iparam[IPARAM_WARMUP] ) {
int status = RunTest( iparam, dparam, &(t[0])); int status = RunTest( iparam, dparam, &(t[0]));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment