Mentions légales du service

Skip to content
Snippets Groups Projects
Commit d70f1843 authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

Silent warnings in lange timings

parent f9eb09aa
No related branches found
No related tags found
No related merge requests found
/** /**
* *
* @copyright (c) 2009-2014 The University of Tennessee and The University * @Copyright (c) 2009-2014 The University of Tennessee and The University
* of Tennessee Research Foundation. * of Tennessee Research Foundation.
* All rights reserved. * All rights reserved.
* @copyright (c) 2012-2014 Inria. All rights reserved. * @copyright (c) 2012-2014 Inria. All rights reserved.
...@@ -24,17 +24,13 @@ ...@@ -24,17 +24,13 @@
#include "./timing.c" #include "./timing.c"
static int static int
RunTest(int *iparam, double *dparam, morse_time_t *t_) RunTest(int *iparam, double *dparam, morse_time_t *t_)
{ {
int hres = 0; int hres = 0;
int n; double normmorse, normlapack, result;
double normmorse, normlapack, result; int norm = MorseInfNorm;
double eps;
int norm[4] = { MorseMaxNorm, MorseOneNorm, MorseInfNorm, MorseFrobeniusNorm };
char *normstr[4] = { "Max", "One", "Inf", "Fro" };
PASTE_CODE_IPARAM_LOCALS( iparam );
eps = LAPACKE_dlamch_work('e'); PASTE_CODE_IPARAM_LOCALS( iparam );
/* Allocate Data */ /* Allocate Data */
PASTE_CODE_ALLOCATE_MATRIX( A, 1, MORSE_Complex64_t, M, N ); PASTE_CODE_ALLOCATE_MATRIX( A, 1, MORSE_Complex64_t, M, N );
...@@ -43,16 +39,16 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_) ...@@ -43,16 +39,16 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_)
/* MORSE ZLANGE */ /* MORSE ZLANGE */
START_TIMING(); START_TIMING();
normmorse = MORSE_zlange(MorseInfNorm, M, N, A, LDA); normmorse = MORSE_zlange(norm, M, N, A, LDA);
STOP_TIMING(); STOP_TIMING();
/* Check the solution */ /* Check the solution */
if ( check ) if ( check )
{ {
double *work = (double*) malloc(max(M,N)*sizeof(double)); double *work = (double*) malloc(max(M,N)*sizeof(double));
normlapack = LAPACKE_zlange_work(LAPACK_COL_MAJOR, 'I', M, N, A, LDA, work); normlapack = LAPACKE_zlange_work(LAPACK_COL_MAJOR, morse_lapack_const(norm), M, N, A, LDA, work);
result = fabs(normmorse - normlapack); result = fabs(normmorse - normlapack);
switch(norm[2]) { switch(norm) {
case MorseMaxNorm: case MorseMaxNorm:
/* result should be perfectly equal */ /* result should be perfectly equal */
break; break;
...@@ -70,7 +66,7 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_) ...@@ -70,7 +66,7 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_)
break; break;
} }
if ( MORSE_My_Mpi_Rank() == 0 ) { if ( MORSE_My_Mpi_Rank() == 0 ) {
dparam[IPARAM_ANORM] = normlapack; dparam[IPARAM_ANORM] = normlapack;
dparam[IPARAM_BNORM] = 0.; dparam[IPARAM_BNORM] = 0.;
dparam[IPARAM_XNORM] = 1.; dparam[IPARAM_XNORM] = 1.;
dparam[IPARAM_RES] = result; dparam[IPARAM_RES] = result;
......
...@@ -28,11 +28,9 @@ static int ...@@ -28,11 +28,9 @@ static int
RunTest(int *iparam, double *dparam, morse_time_t *t_) RunTest(int *iparam, double *dparam, morse_time_t *t_)
{ {
double normmorse, normlapack, result; double normmorse, normlapack, result;
double eps; int norm = MorseInfNorm;
int norm[4] = { MorseMaxNorm, MorseOneNorm, MorseInfNorm, MorseFrobeniusNorm };
PASTE_CODE_IPARAM_LOCALS( iparam );
eps = LAPACKE_dlamch_work('e'); PASTE_CODE_IPARAM_LOCALS( iparam );
/* 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 );
...@@ -40,7 +38,7 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_) ...@@ -40,7 +38,7 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_)
/* MORSE ZPOSV */ /* MORSE ZPOSV */
START_TIMING(); START_TIMING();
normmorse = MORSE_zlange_Tile(MorseInfNorm, descA); normmorse = MORSE_zlange_Tile(norm, descA);
STOP_TIMING(); STOP_TIMING();
/* Check the solution */ /* Check the solution */
...@@ -49,9 +47,9 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_) ...@@ -49,9 +47,9 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_)
/* Allocate Data */ /* Allocate Data */
PASTE_TILE_TO_LAPACK( descA, A, check, MORSE_Complex64_t, M, N ); PASTE_TILE_TO_LAPACK( descA, A, check, MORSE_Complex64_t, M, N );
double *work = (double*) malloc(max(M,N)*sizeof(double)); double *work = (double*) malloc(max(M,N)*sizeof(double));
normlapack = LAPACKE_zlange_work(LAPACK_COL_MAJOR, 'I', M, N, A, LDA, work); normlapack = LAPACKE_zlange_work(LAPACK_COL_MAJOR, morse_lapack_const(norm), M, N, A, LDA, work);
result = fabs(normmorse - normlapack); result = fabs(normmorse - normlapack);
switch(norm[2]) { switch(norm) {
case MorseMaxNorm: case MorseMaxNorm:
/* result should be perfectly equal */ /* result should be perfectly equal */
break; break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment