Mentions légales du service

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

Merge branch 'hotfix/coverity' into 'master'

Fix a bunch of warning reported by coverity on the recents MR

See merge request !338
parents 6352f616 8aa15654
No related branches found
No related tags found
1 merge request!338Fix a bunch of warning reported by coverity on the recents MR
Showing
with 62 additions and 58 deletions
Subproject commit fdf4c92ee3e218e8c1eb5354c1bcddcbef10756a
Subproject commit 0540e73689762bfb5a3c9e8231de3cc1d14cf4dd
......@@ -483,7 +483,7 @@ int CHAMELEON_zheevd_Tile_Async( cham_job_t jobz, cham_uplo_t uplo,
#if defined(CHAMELEON_COPY_DIAG)
{
int n = chameleon_min(A->mt, A->nt) * A->nb;
chameleon_zdesc_alloc(D, A->mb, A->nb, A->m, n, 0, 0, A->m, n, );
chameleon_zdesc_alloc(D, A->mb, A->nb, A->m, n, 0, 0, A->m, n, CHAMELEON_zgemm_WS_Free( gemm_ws ) );
Dptr = &D;
}
#endif
......
......@@ -235,8 +235,8 @@ void update_progress(int currentValue, int maximumValue) {
res = div(currentValue*100, maximumValue);
}
else {
/* Calcule le quotient de la division */
res.quot = (int)( (long long)( currentValue * 100 ) / maximumValue );
/* Compute the quotient */
res.quot = (int)( ((double)currentValue * 100.) / (double)maximumValue );
}
}
......
......@@ -76,15 +76,15 @@ chameleon_recdesc_create( const char *name, CHAM_desc_t **descptr, void *mat, ch
chameleon_asprintf( &subname, "%s[%d,%d]", name, m, n );
chameleon_recdesc_create( subname, &tiledesc, tile->mat,
desc->dtyp, mb, nb,
tile->ld, tempnn, /* Abuse as ln is not used */
tempmm, tempnn,
1, 1, /* can recurse only on local data */
chameleon_getaddr_cm, chameleon_getblkldd_cm, NULL);
rc = chameleon_recdesc_create( subname, &tiledesc, tile->mat,
desc->dtyp, mb, nb,
tile->ld, tempnn, /* Abuse as ln is not used */
tempmm, tempnn,
1, 1, /* can recurse only on local data */
chameleon_getaddr_cm, chameleon_getblkldd_cm, NULL);
tile->format = CHAMELEON_TILE_DESC;
tile->mat = tiledesc;
tile->mat = tiledesc;
if ( rc != CHAMELEON_SUCCESS ) {
return rc;
......
Subproject commit aa6617c4780f00018477320e129bbd26a425b85e
Subproject commit 46117aee1e9a16c0da17224b8c7aa4e3213291e8
......@@ -52,7 +52,7 @@ testing_zcesca_desc( run_arg_list_t *args, int check )
int N = run_arg_get_int( args, "N", 1000 );
int M = run_arg_get_int( args, "M", N );
int LDA = run_arg_get_int( args, "LDA", M );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int Q = parameters_compute_q( P );
/* Descriptors */
......@@ -106,7 +106,7 @@ testing_zcesca_std( run_arg_list_t *args, int check )
int N = run_arg_get_int( args, "N", 1000 );
int M = run_arg_get_int( args, "M", N );
int LDA = run_arg_get_int( args, "LDA", M );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
/* Descriptors */
CHAMELEON_Complex64_t *A;
......
......@@ -165,6 +165,8 @@ int check_zmatrices( run_arg_list_t *args, cham_uplo_t uplo, CHAM_desc_t *descA,
A = (CHAMELEON_Complex64_t *)malloc((size_t)(LDA) * (size_t)(N) * sizeof(CHAMELEON_Complex64_t));
B = (CHAMELEON_Complex64_t *)malloc((size_t)(LDB) * (size_t)(N) * sizeof(CHAMELEON_Complex64_t));
if ( (A == NULL) || (B == NULL) ) {
free( A );
free( B );
return CHAMELEON_ERR_OUT_OF_RESOURCES;
}
}
......@@ -175,8 +177,8 @@ int check_zmatrices( run_arg_list_t *args, cham_uplo_t uplo, CHAM_desc_t *descA,
if ( rank == 0 ) {
info_solution = check_zmatrices_std( args, uplo, M, N, A, LDA, B, LDB );
free(A);
free(B);
free( A );
free( B );
}
/* Broadcasts the result from the main processus */
......
......@@ -55,8 +55,8 @@ testing_zgeadd_desc( run_arg_list_t *args, int check )
int M = run_arg_get_int( args, "M", N );
int LDA = run_arg_get_int( args, "LDA", ( ( trans == ChamNoTrans ) ? M : N ) );
int LDB = run_arg_get_int( args, "LDB", M );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedB = run_arg_get_int( args, "seedB", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int seedB = run_arg_get_int( args, "seedB", testing_ialea() );
int Q = parameters_compute_q( P );
CHAMELEON_Complex64_t alpha = testing_zalea();
CHAMELEON_Complex64_t beta = testing_zalea();
......@@ -132,8 +132,8 @@ testing_zgeadd_std( run_arg_list_t *args, int check )
int M = run_arg_get_int( args, "M", N );
int LDA = run_arg_get_int( args, "LDA", ( ( trans == ChamNoTrans ) ? M : N ) );
int LDB = run_arg_get_int( args, "LDB", M );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedB = run_arg_get_int( args, "seedB", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int seedB = run_arg_get_int( args, "seedB", testing_ialea() );
CHAMELEON_Complex64_t alpha = testing_zalea();
CHAMELEON_Complex64_t beta = testing_zalea();
......
......@@ -38,7 +38,7 @@ testing_zgelqf_desc( run_arg_list_t *args, int check )
int M = run_arg_get_int( args, "M", N );
int LDA = run_arg_get_int( args, "LDA", M );
int RH = run_arg_get_int( args, "qra", 4 );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int Q = parameters_compute_q( P );
/* Descriptors */
......@@ -114,7 +114,7 @@ testing_zgelqf_std( run_arg_list_t *args, int check )
int M = run_arg_get_int( args, "M", N );
int LDA = run_arg_get_int( args, "LDA", M );
int RH = run_arg_get_int( args, "qra", 4 );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int Q = parameters_compute_q( P );
int K = chameleon_min( M, N );
......
......@@ -42,7 +42,7 @@ testing_zgelqf_hqr_desc( run_arg_list_t *args, int check )
int llvl = run_arg_get_int( args, "llvl", -1 );
int hlvl = run_arg_get_int( args, "hlvl", -1 );
int domino = run_arg_get_int( args, "domino", -1 );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int Q = parameters_compute_q( P );
/* Descriptors */
......@@ -129,7 +129,7 @@ testing_zgelqf_hqr_std( run_arg_list_t *args, int check )
int llvl = run_arg_get_int( args, "llvl", -1 );
int hlvl = run_arg_get_int( args, "hlvl", -1 );
int domino = run_arg_get_int( args, "domino", -1 );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int Q = parameters_compute_q( P );
int K = chameleon_min( M, N );
......
......@@ -48,8 +48,8 @@ testing_zgelqs_desc( run_arg_list_t *args, int check )
int LDA = run_arg_get_int( args, "LDA", M );
int LDB = run_arg_get_int( args, "LDB", M );
int RH = run_arg_get_int( args, "qra", 0 );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedB = run_arg_get_int( args, "seedB", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int seedB = run_arg_get_int( args, "seedB", testing_ialea() );
int Q = parameters_compute_q( P );
/* Descriptors */
......
......@@ -55,8 +55,8 @@ testing_zgels_desc( run_arg_list_t *args, int check )
int LDA = run_arg_get_int( args, "LDA", M );
int LDB = run_arg_get_int( args, "LDB", maxMN );
int RH = run_arg_get_int( args, "qra", 4 );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedB = run_arg_get_int( args, "seedB", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int seedB = run_arg_get_int( args, "seedB", testing_ialea() );
int Q = parameters_compute_q( P );
/* Descriptors */
......@@ -158,8 +158,8 @@ testing_zgels_std( run_arg_list_t *args, int check )
int LDA = run_arg_get_int( args, "LDA", M );
int LDB = run_arg_get_int( args, "LDB", maxMN );
int RH = run_arg_get_int( args, "qra", 4 );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedB = run_arg_get_int( args, "seedB", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int seedB = run_arg_get_int( args, "seedB", testing_ialea() );
int Q = parameters_compute_q( P );
/* Descriptors */
......
......@@ -59,8 +59,8 @@ testing_zgels_hqr_desc( run_arg_list_t *args, int check )
int llvl = run_arg_get_int( args, "llvl", -1 );
int hlvl = run_arg_get_int( args, "hlvl", -1 );
int domino = run_arg_get_int( args, "domino", -1 );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedB = run_arg_get_int( args, "seedB", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int seedB = run_arg_get_int( args, "seedB", testing_ialea() );
int Q = parameters_compute_q( P );
/* Descriptors */
......@@ -170,8 +170,8 @@ testing_zgels_hqr_std( run_arg_list_t *args, int check )
int llvl = run_arg_get_int( args, "llvl", -1 );
int hlvl = run_arg_get_int( args, "hlvl", -1 );
int domino = run_arg_get_int( args, "domino", -1 );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedB = run_arg_get_int( args, "seedB", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int seedB = run_arg_get_int( args, "seedB", testing_ialea() );
int Q = parameters_compute_q( P );
/* Descriptors */
......
......@@ -49,9 +49,9 @@ testing_zgemm_desc( run_arg_list_t *args, int check )
int LDC = run_arg_get_int( args, "LDC", M );
CHAMELEON_Complex64_t alpha = testing_zalea();
CHAMELEON_Complex64_t beta = testing_zalea();
int seedA = run_arg_get_int( args, "seedA", random() );
int seedB = run_arg_get_int( args, "seedB", random() );
int seedC = run_arg_get_int( args, "seedC", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int seedB = run_arg_get_int( args, "seedB", testing_ialea() );
int seedC = run_arg_get_int( args, "seedC", testing_ialea() );
int Q = parameters_compute_q( P );
/* Descriptors */
......@@ -156,9 +156,9 @@ testing_zgemm_std( run_arg_list_t *args, int check )
int LDC = run_arg_get_int( args, "LDC", M );
CHAMELEON_Complex64_t alpha = testing_zalea();
CHAMELEON_Complex64_t beta = testing_zalea();
int seedA = run_arg_get_int( args, "seedA", random() );
int seedB = run_arg_get_int( args, "seedB", random() );
int seedC = run_arg_get_int( args, "seedC", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int seedB = run_arg_get_int( args, "seedB", testing_ialea() );
int seedC = run_arg_get_int( args, "seedC", testing_ialea() );
/* Descriptors */
int Am, An, Bm, Bn;
......
......@@ -52,7 +52,7 @@ testing_zgenm2_desc( run_arg_list_t *args, int check )
int N = run_arg_get_int( args, "N", 1000 );
int M = run_arg_get_int( args, "M", N );
int LDA = run_arg_get_int( args, "LDA", M );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int Q = parameters_compute_q( P );
int minMN = chameleon_min( M, N );
double cond = run_arg_get_double( args, "cond", 1.e16 );
......@@ -136,7 +136,7 @@ testing_zgenm2_std( run_arg_list_t *args, int check )
int N = run_arg_get_int( args, "N", 1000 );
int M = run_arg_get_int( args, "M", N );
int LDA = run_arg_get_int( args, "LDA", M );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int minMN = chameleon_min( M, N );
double cond = run_arg_get_double( args, "cond", 1.e16 );
int mode = run_arg_get_int( args, "mode", 4 );
......
......@@ -44,7 +44,7 @@ testing_zgepdf_qdwh_desc( run_arg_list_t *args, int check )
int M = run_arg_get_int( args, "M", N );
int LDA = run_arg_get_int( args, "LDA", M );
int LDB = run_arg_get_int( args, "LDB", N );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int Q = parameters_compute_q( P );
double cond = run_arg_get_double( args, "cond", 1.e16 );
int mode = run_arg_get_int( args, "mode", 4 );
......@@ -86,9 +86,9 @@ testing_zgepdf_qdwh_desc( run_arg_list_t *args, int check )
if ( hres != 0 ) {
return hres;
}
/*
* descA0 is defined here because of the cost of zlatms. To copy descA in descA0
* now prevents to call it again later in the check (indeed descA is modified
/*
* descA0 is defined here because of the cost of zlatms. To copy descA in descA0
* now prevents to call it again later in the check (indeed descA is modified
* with the call to CHAMELEON_zgepdf_qdwh_Tile[_Async]).
*/
if ( check ) {
......@@ -137,7 +137,7 @@ testing_zgepdf_qdwh_std( run_arg_list_t *args, int check )
int M = run_arg_get_int( args, "M", N );
int LDA = run_arg_get_int( args, "LDA", M );
int LDB = run_arg_get_int( args, "LDB", N );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
double cond = run_arg_get_double( args, "cond", 1.e16 );
int mode = run_arg_get_int( args, "mode", 4 );
int runtime;
......@@ -167,12 +167,14 @@ testing_zgepdf_qdwh_std( run_arg_list_t *args, int check )
/* Fills the matrix with random values */
hres = CHAMELEON_zlatms( M, N, ChamDistUniform, seedA, ChamNonsymPosv, NULL, mode, cond, 1., A, LDA );
if ( hres != 0 ) {
free( A );
free( H );
return hres;
}
/*
* A0 is defined here because of the cost of zlatms. To copy A in A0
* now prevents to call it again later in the check (indeed A is modified
* with the call to CHAMELEON_zgepdf_qdwh).
/*
* A0 is defined here because of the cost of zlatms. To copy A in A0
* now prevents to call it again later in the check (indeed A is modified
* with the call to CHAMELEON_zgepdf_qdwh).
*/
if ( check ) {
A0 = malloc( LDA*N*sizeof(CHAMELEON_Complex64_t) );
......
......@@ -51,7 +51,7 @@ testing_zgepdf_qr_desc( run_arg_list_t *args, int check )
int N = run_arg_get_int( args, "N", 1000 );
int M = run_arg_get_int( args, "M", N );
int LDA = run_arg_get_int( args, "LDA", M );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int Q = parameters_compute_q( P );
/* Descriptors */
......
......@@ -38,7 +38,7 @@ testing_zgeqrf_desc( run_arg_list_t *args, int check )
int M = run_arg_get_int( args, "M", N );
int LDA = run_arg_get_int( args, "LDA", M );
int RH = run_arg_get_int( args, "qra", 4 );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int Q = parameters_compute_q( P );
/* Descriptors */
......@@ -114,7 +114,7 @@ testing_zgeqrf_std( run_arg_list_t *args, int check )
int M = run_arg_get_int( args, "M", N );
int LDA = run_arg_get_int( args, "LDA", M );
int RH = run_arg_get_int( args, "qra", 4 );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int Q = parameters_compute_q( P );
int K = chameleon_min( M, N );
......
......@@ -42,7 +42,7 @@ testing_zgeqrf_hqr_desc( run_arg_list_t *args, int check )
int llvl = run_arg_get_int( args, "llvl", -1 );
int hlvl = run_arg_get_int( args, "hlvl", -1 );
int domino = run_arg_get_int( args, "domino", -1 );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int Q = parameters_compute_q( P );
/* Descriptors */
......@@ -129,7 +129,7 @@ testing_zgeqrf_hqr_std( run_arg_list_t *args, int check )
int llvl = run_arg_get_int( args, "llvl", -1 );
int hlvl = run_arg_get_int( args, "hlvl", -1 );
int domino = run_arg_get_int( args, "domino", -1 );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int Q = parameters_compute_q( P );
int K = chameleon_min( M, N );
......
......@@ -41,8 +41,8 @@ testing_zgeqrs_desc( run_arg_list_t *args, int check )
int LDA = run_arg_get_int( args, "LDA", M );
int LDB = run_arg_get_int( args, "LDB", M );
int RH = run_arg_get_int( args, "qra", 0 );
int seedA = run_arg_get_int( args, "seedA", random() );
int seedB = run_arg_get_int( args, "seedB", random() );
int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
int seedB = run_arg_get_int( args, "seedB", testing_ialea() );
int Q = parameters_compute_q( P );
/* Descriptors */
......
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