Commit 50682a83 authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

Protect the calls to lapacke in compute, this is a temporary fix for issue 18

parent cd6051f2
......@@ -521,6 +521,8 @@ int MORSE_zgesvd_Tile_Async(MORSE_enum jobu, MORSE_enum jobvt,
}
morse_sequence_wait(morse, sequence);
#if !defined(CHAMELEON_SIMULATION)
info = LAPACKE_zgbbrd( LAPACK_COL_MAJOR,
gbbrd_vect,
M, N,
......@@ -533,6 +535,7 @@ int MORSE_zgesvd_Tile_Async(MORSE_enum jobu, MORSE_enum jobvt,
if (info != 0) {
fprintf(stderr, "MORSE_zgesvd_Tile_Async: LAPACKE_zgbbrd = %d\n", info );
}
#endif /* !defined(CHAMELEON_SIMULATION) */
morse_desc_mat_free(&descAB);
/* Transform U and Vt into tile format */
......@@ -594,6 +597,7 @@ int MORSE_zgesvd_Tile_Async(MORSE_enum jobu, MORSE_enum jobvt,
/* Solve the bidiagonal SVD problem */
/* On exit, U and VT are updated with bidiagonal matrix singular vectors */
#if !defined(CHAMELEON_SIMULATION)
info = LAPACKE_zbdsqr( LAPACK_COL_MAJOR, 'U',
MINMN, ncvt, nru, 0,
S, E,
......@@ -601,6 +605,7 @@ int MORSE_zgesvd_Tile_Async(MORSE_enum jobu, MORSE_enum jobvt,
if (info != 0) {
fprintf(stderr, "MORSE_zgesvd_Tile_Async: LAPACKE_zbdsqr = %d\n", info );
}
#endif /* !defined(CHAMELEON_SIMULATION) */
if (jobu != MorseNoVec)
morse_desc_mat_free( &descU );
......
......@@ -420,6 +420,7 @@ int MORSE_zheevd_Tile_Async(MORSE_enum jobz, MORSE_enum uplo,
if (jobz == MorseNoVec){
#if !defined(CHAMELEON_SIMULATION)
/* Tridiagonal eigensolver */
status = LAPACKE_zstedc( LAPACK_COL_MAJOR,
morse_lapack_const(jobz),
......@@ -428,6 +429,7 @@ int MORSE_zheevd_Tile_Async(MORSE_enum jobz, MORSE_enum uplo,
if (status != 0) {
morse_error("MORSE_zheevd_Tile_Async", "LAPACKE_zstedc failed");
}
#endif /* !defined(CHAMELEON_SIMULATION) */
free(E);
return MORSE_SUCCESS;
}
......@@ -441,8 +443,11 @@ int MORSE_zheevd_Tile_Async(MORSE_enum jobz, MORSE_enum uplo,
/* For bug in lapacke */
memset(V, 0, N * N * sizeof(MORSE_Complex64_t));
/* Tridiagonal eigensolver */
/* V contains the eigenvectors of the tridiagonal system on exit */
/*
* Tridiagonal eigensolver
* V contains the eigenvectors of the tridiagonal system on exit
*/
#if !defined(CHAMELEON_SIMULATION)
status = LAPACKE_zstedc( LAPACK_COL_MAJOR,
morse_lapack_const(MorseIvec),
N, W, E,
......@@ -450,6 +455,7 @@ int MORSE_zheevd_Tile_Async(MORSE_enum jobz, MORSE_enum uplo,
if (status != 0) {
morse_error("MORSE_zheevd_Tile_Async", "LAPACKE_zstedc failed");
}
#endif /* !defined(CHAMELEON_SIMULATION) */
/* Convert matrices in tile format */
/* A/T from MORSE_zhetrd refer to Q1 (tile layout) */
......
......@@ -408,6 +408,7 @@ int MORSE_zhetrd_Tile_Async(MORSE_enum jobz,
morse_sequence_wait(morse, sequence);
/* Reduce band matrix to tridiagonal matrix */
#if !defined(CHAMELEON_SIMULATION)
status = LAPACKE_zhbtrd( LAPACK_COL_MAJOR,
morse_lapack_const(jobz),
morse_lapack_const(uplo),
......@@ -417,6 +418,7 @@ int MORSE_zhetrd_Tile_Async(MORSE_enum jobz,
if (status != 0) {
morse_error("MORSE_zhetrd_Tile_Async", "LAPACKE_zhbtrd failed");
}
#endif /* !defined(CHAMELEON_SIMULATION) */
morse_desc_mat_free(&descAB);
return MORSE_SUCCESS;
......
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