Mentions légales du service

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

latms: reduce the size of the workspaces, fix random seed shift, and fix diagonal in mode=4

parent 30266fd3
No related branches found
No related tags found
1 merge request!234Set of minor bugfix
......@@ -134,6 +134,9 @@ void chameleon_pzlatms( cham_dist_t idist, unsigned long long int seed, cham_sym
return;
}
/* Shift the seed for future use to generate the random unitary matrices */
seed = CORE_rnd64_jump( 2 * minmn, seed );
/* Scale by dmax */
if ( ( mode != 0 ) && ( abs(mode) != 6 ) )
{
......@@ -177,13 +180,11 @@ void chameleon_pzlatms( cham_dist_t idist, unsigned long long int seed, cham_sym
/* U is of size A->m by min(A->m, A->n) */
chameleon_zdesc_copy_and_restrict( A, &descU, A->m, minmn );
/* Shift the seed to generate the random unitary matrix */
#if !defined(CHAMELEON_SIMULATION)
seed = CORE_rnd64_jump( 2 * minmn, seed );
#endif
chameleon_pzplrnt( &descU, seed, sequence, request );
/* Shift the seed to generate the next random unitary matrix */
#if !defined(CHAMELEON_SIMULATION)
seed = CORE_rnd64_jump( 2 * minmn * A->n, seed );
seed = CORE_rnd64_jump( 2 * minmn * A->m, seed );
#endif
/* Apply a QR factorization */
......@@ -207,13 +208,13 @@ void chameleon_pzlatms( cham_dist_t idist, unsigned long long int seed, cham_sym
chameleon_desc_init( &descTS, CHAMELEON_MAT_ALLOC_TILE,
ChamComplexDouble, ib, descU.nb, ib * descU.nb,
ib * descU.lmt, descU.nb * descU.lnt, 0, 0,
ib * descU.lmt, descU.nb * descU.lnt, descU.p, descU.q,
ib * descU.mt, descU.nb * descU.nt, 0, 0,
ib * descU.mt, descU.nb * descU.nt, descU.p, descU.q,
NULL, NULL, NULL );
chameleon_desc_init( &descTT, CHAMELEON_MAT_ALLOC_TILE,
ChamComplexDouble, ib, descU.nb, ib * descU.nb,
ib * descU.lmt, descU.nb * descU.lnt, 0, 0,
ib * descU.lmt, descU.nb * descU.lnt, descU.p, descU.q,
ib * descU.mt, descU.nb * descU.nt, 0, 0,
ib * descU.mt, descU.nb * descU.nt, descU.p, descU.q,
NULL, NULL, NULL );
/* U <= qr(U) */
......@@ -255,14 +256,7 @@ void chameleon_pzlatms( cham_dist_t idist, unsigned long long int seed, cham_sym
/* V is of size min(A->m, A->n) by A->n */
chameleon_zdesc_copy_and_restrict( A, &descV, minmn, A->n );
/* Shift the seed to generate the random unitary matrix */
#if !defined(CHAMELEON_SIMULATION)
seed = CORE_rnd64_jump( 2 * minmn, seed );
#endif
chameleon_pzplrnt( &descV, seed, sequence, request );
#if !defined(CHAMELEON_SIMULATION)
seed = CORE_rnd64_jump( 2 * minmn * A->n, seed );
#endif
/* Apply a QR factorization */
mat.mt = descV.mt;
......@@ -285,13 +279,13 @@ void chameleon_pzlatms( cham_dist_t idist, unsigned long long int seed, cham_sym
chameleon_desc_init( &descTS, CHAMELEON_MAT_ALLOC_TILE,
ChamComplexDouble, ib, descV.nb, ib * descV.nb,
ib * descV.lmt, descV.nb * descV.lnt, 0, 0,
ib * descV.lmt, descV.nb * descV.lnt, descV.p, descV.q,
ib * descV.mt, descV.nb * descV.nt, 0, 0,
ib * descV.mt, descV.nb * descV.nt, descV.p, descV.q,
NULL, NULL, NULL );
chameleon_desc_init( &descTT, CHAMELEON_MAT_ALLOC_TILE,
ChamComplexDouble, ib, descV.nb, ib * descV.nb,
ib * descV.lmt, descV.nb * descV.lnt, 0, 0,
ib * descV.lmt, descV.nb * descV.lnt, descV.p, descV.q,
ib * descV.mt, descV.nb * descV.nt, 0, 0,
ib * descV.mt, descV.nb * descV.nt, descV.p, descV.q,
NULL, NULL, NULL );
/* V <= qr(V) */
......
......@@ -189,7 +189,7 @@ int CORE_zlatm1( int MODE, double COND, int IRSIGN, cham_dist_t DIST,
alpha = ( 1. - temp ) / ((double)(N-1));
for( i=1; i<N; i++ ) {
D[i] = ((double)(N-i)) * alpha + temp;
D[i] = ((double)(N-i-1)) * alpha + temp;
}
}
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