MAGMA  1.2.0
MatrixAlgebraonGPUandMulticoreArchitectures
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
testing_zhegvd_m.cpp File Reference
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <cuda.h>
#include <cuda_runtime_api.h>
#include <cublas.h>
#include "magma.h"
#include "magma_lapack.h"
#include "testings.h"
Include dependency graph for testing_zhegvd_m.cpp:

Go to the source code of this file.

Macros

#define absv(v1)   ((v1)>0? (v1): -(v1))

Functions

magma_int_t magma_zhegvd_m (int nrgpu, magma_int_t itype, char jobz, char uplo, magma_int_t n, cuDoubleComplex *a, magma_int_t lda, cuDoubleComplex *b, magma_int_t ldb, double *w, cuDoubleComplex *work, magma_int_t lwork, double *rwork, magma_int_t lrwork, magma_int_t *iwork, magma_int_t liwork, magma_int_t *info)
int main (int argc, char **argv)

Macro Definition Documentation

#define absv (   v1)    ((v1)>0? (v1): -(v1))

Definition at line 36 of file testing_zhegvd_m.cpp.


Function Documentation

magma_int_t magma_zhegvd_m ( int  nrgpu,
magma_int_t  itype,
char  jobz,
char  uplo,
magma_int_t  n,
cuDoubleComplex *  a,
magma_int_t  lda,
cuDoubleComplex *  b,
magma_int_t  ldb,
double *  w,
cuDoubleComplex *  work,
magma_int_t  lwork,
double *  rwork,
magma_int_t  lrwork,
magma_int_t iwork,
magma_int_t  liwork,
magma_int_t info 
)

Definition at line 41 of file zhegvd_m.cpp.

References __func__, get_current_time(), GetTimerValue(), lapackf77_lsame, magma_get_zhetrd_nb(), magma_xerbla(), MAGMA_Z_ONE, MAGMA_Z_SET2REAL, magma_zheevd_m(), magma_zhegst_m(), magma_zpotrf2_ooc(), magma_ztrsm_m(), MagmaConjTrans, MagmaLeft, MagmaLowerStr, MagmaNonUnit, MagmaNoTrans, MagmaNoVectorsStr, MagmaUpperStr, MagmaVectorsStr, max, trans, and uplo.

{
/* -- MAGMA (version 1.2.0) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
May 2012
Purpose
=======
ZHEGVD computes all the eigenvalues, and optionally, the eigenvectors
of a complex generalized Hermitian-definite eigenproblem, of the form
A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A and
B are assumed to be Hermitian and B is also positive definite.
If eigenvectors are desired, it uses a divide and conquer algorithm.
The divide and conquer algorithm makes very mild assumptions about
floating point arithmetic. It will work on machines with a guard
digit in add/subtract, or on those binary machines without guard
digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
Cray-2. It could conceivably fail on hexadecimal or decimal machines
without guard digits, but we know of none.
Arguments
=========
ITYPE (input) INTEGER
Specifies the problem type to be solved:
= 1: A*x = (lambda)*B*x
= 2: A*B*x = (lambda)*x
= 3: B*A*x = (lambda)*x
JOBZ (input) CHARACTER*1
= 'N': Compute eigenvalues only;
= 'V': Compute eigenvalues and eigenvectors.
UPLO (input) CHARACTER*1
= 'U': Upper triangles of A and B are stored;
= 'L': Lower triangles of A and B are stored.
N (input) INTEGER
The order of the matrices A and B. N >= 0.
A (input/output) COMPLEX*16 array, dimension (LDA, N)
On entry, the Hermitian matrix A. If UPLO = 'U', the
leading N-by-N upper triangular part of A contains the
upper triangular part of the matrix A. If UPLO = 'L',
the leading N-by-N lower triangular part of A contains
the lower triangular part of the matrix A.
On exit, if JOBZ = 'V', then if INFO = 0, A contains the
matrix Z of eigenvectors. The eigenvectors are normalized
as follows:
if ITYPE = 1 or 2, Z**H*B*Z = I;
if ITYPE = 3, Z**H*inv(B)*Z = I.
If JOBZ = 'N', then on exit the upper triangle (if UPLO='U')
or the lower triangle (if UPLO='L') of A, including the
diagonal, is destroyed.
LDA (input) INTEGER
The leading dimension of the array A. LDA >= max(1,N).
B (input/output) COMPLEX*16 array, dimension (LDB, N)
On entry, the Hermitian matrix B. If UPLO = 'U', the
leading N-by-N upper triangular part of B contains the
upper triangular part of the matrix B. If UPLO = 'L',
the leading N-by-N lower triangular part of B contains
the lower triangular part of the matrix B.
On exit, if INFO <= N, the part of B containing the matrix is
overwritten by the triangular factor U or L from the Cholesky
factorization B = U**H*U or B = L*L**H.
LDB (input) INTEGER
The leading dimension of the array B. LDB >= max(1,N).
W (output) DOUBLE PRECISION array, dimension (N)
If INFO = 0, the eigenvalues in ascending order.
WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
LWORK (input) INTEGER
The length of the array WORK.
If N <= 1, LWORK >= 1.
If JOBZ = 'N' and N > 1, LWORK >= N + 1.
If JOBZ = 'V' and N > 1, LWORK >= 2*N*nb + N**2.
If LWORK = -1, then a workspace query is assumed; the routine
only calculates the optimal sizes of the WORK, RWORK and
IWORK arrays, returns these values as the first entries of
the WORK, RWORK and IWORK arrays, and no error message
related to LWORK or LRWORK or LIWORK is issued by XERBLA.
RWORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LRWORK))
On exit, if INFO = 0, RWORK(1) returns the optimal LRWORK.
LRWORK (input) INTEGER
The dimension of the array RWORK.
If N <= 1, LRWORK >= 1.
If JOBZ = 'N' and N > 1, LRWORK >= N.
If JOBZ = 'V' and N > 1, LRWORK >= 1 + 5*N + 2*N**2.
If LRWORK = -1, then a workspace query is assumed; the
routine only calculates the optimal sizes of the WORK, RWORK
and IWORK arrays, returns these values as the first entries
of the WORK, RWORK and IWORK arrays, and no error message
related to LWORK or LRWORK or LIWORK is issued by XERBLA.
IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
LIWORK (input) INTEGER
The dimension of the array IWORK.
If N <= 1, LIWORK >= 1.
If JOBZ = 'N' and N > 1, LIWORK >= 1.
If JOBZ = 'V' and N > 1, LIWORK >= 3 + 5*N.
If LIWORK = -1, then a workspace query is assumed; the
routine only calculates the optimal sizes of the WORK, RWORK
and IWORK arrays, returns these values as the first entries
of the WORK, RWORK and IWORK arrays, and no error message
related to LWORK or LRWORK or LIWORK is issued by XERBLA.
INFO (output) INTEGER
= 0: successful exit
< 0: if INFO = -i, the i-th argument had an illegal value
> 0: ZPOTRF or ZHEEVD returned an error code:
<= N: if INFO = i and JOBZ = 'N', then the algorithm
failed to converge; i off-diagonal elements of an
intermediate tridiagonal form did not converge to
zero;
if INFO = i and JOBZ = 'V', then the algorithm
failed to compute an eigenvalue while working on
the submatrix lying in rows and columns INFO/(N+1)
through mod(INFO,N+1);
> N: if INFO = N + i, for 1 <= i <= N, then the leading
minor of order i of B is not positive definite.
The factorization of B could not be completed and
no eigenvalues or eigenvectors were computed.
Further Details
===============
Based on contributions by
Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
Modified so that no backsubstitution is performed if ZHEEVD fails to
converge (NEIG in old code could be greater than N causing out of
bounds reference to A - reported by Ralf Meyer). Also corrected the
description of INFO and the test on ITYPE. Sven, 16 Feb 05.
===================================================================== */
char uplo_[2] = {uplo, 0};
char jobz_[2] = {jobz, 0};
cuDoubleComplex c_one = MAGMA_Z_ONE;
magma_int_t lower;
char trans[1];
magma_int_t wantz;
magma_int_t lquery;
// magma_int_t lopt;
magma_int_t lwmin;
// magma_int_t liopt;
magma_int_t liwmin;
// magma_int_t lropt;
magma_int_t lrwmin;
lower = lapackf77_lsame(uplo_, MagmaLowerStr);
lquery = lwork == -1 || lrwork == -1 || liwork == -1;
*info = 0;
if (itype < 1 || itype > 3) {
*info = -1;
} else if (! (wantz || lapackf77_lsame(jobz_, MagmaNoVectorsStr))) {
*info = -2;
} else if (! (lower || lapackf77_lsame(uplo_, MagmaUpperStr))) {
*info = -3;
} else if (n < 0) {
*info = -4;
} else if (lda < max(1,n)) {
*info = -6;
} else if (ldb < max(1,n)) {
*info = -8;
}
if (wantz) {
lwmin = 2 * n + n * n;
lrwmin = 1 + 5 * n + 2 * n * n;
liwmin = 5 * n + 3;
} else {
lwmin = n * (nb + 1);
lrwmin = n;
liwmin = 1;
}
MAGMA_Z_SET2REAL(work[0],(double)lwmin);
rwork[0] = lrwmin;
iwork[0] = liwmin;
if (lwork < lwmin && ! lquery) {
*info = -11;
} else if (lrwork < lrwmin && ! lquery) {
*info = -13;
} else if (liwork < liwmin && ! lquery) {
*info = -15;
}
if (*info != 0) {
magma_xerbla( __func__, -(*info) );
return *info;
}
else if (lquery) {
return *info;
}
/* Quick return if possible */
if (n == 0) {
return *info;
}
#define ENABLE_TIMER
#ifdef ENABLE_TIMER
magma_timestr_t start, end;
start = get_current_time();
#endif
magma_zpotrf2_ooc(nrgpu, uplo_[0], n, b, ldb, info);
if (*info != 0) {
*info = n + *info;
return *info;
}
#ifdef ENABLE_TIMER
printf("time zpotrf = %6.2f\n", GetTimerValue(start,end)/1000.);
start = get_current_time();
#endif
/* Transform problem to standard eigenvalue problem and solve. */
magma_zhegst_m(nrgpu, itype, uplo_[0], n, a, lda, b, ldb, info);
#ifdef ENABLE_TIMER
printf("time zhegst = %6.2f\n", GetTimerValue(start,end)/1000.);
start = get_current_time();
#endif
magma_zheevd_m(nrgpu, jobz_[0], uplo_[0], n, a, lda, w, work, lwork, rwork, lrwork, iwork, liwork, info);
#ifdef ENABLE_TIMER
printf("time zheevd = %6.2f\n", GetTimerValue(start,end)/1000.);
#endif
if (wantz && *info == 0)
{
#ifdef ENABLE_TIMER
start = get_current_time();
#endif
/* Backtransform eigenvectors to the original problem. */
if (itype == 1 || itype == 2)
{
/* For A*x=(lambda)*B*x and A*B*x=(lambda)*x;
backtransform eigenvectors: x = inv(L)'*y or inv(U)*y */
if (lower) {
*(unsigned char *)trans = MagmaConjTrans;
} else {
*(unsigned char *)trans = MagmaNoTrans;
}
magma_ztrsm_m(nrgpu, MagmaLeft, uplo_[0], *trans, MagmaNonUnit,
n, n, c_one, b, ldb, a, lda);
}
else if (itype == 3)
{
/* For B*A*x=(lambda)*x;
backtransform eigenvectors: x = L*y or U'*y */
if (lower) {
*(unsigned char *)trans = MagmaNoTrans;
} else {
*(unsigned char *)trans = MagmaConjTrans;
}
//magma_ztrmm(MagmaLeft, uplo_[0], *trans, MagmaNonUnit,
// n, n, c_one, db, lddb, da, ldda);
}
#ifdef ENABLE_TIMER
printf("time setmatrices trsm/mm + getmatrices = %6.2f\n", GetTimerValue(start,end)/1000.);
#endif
}
/*work[0].r = (doublereal) lopt, work[0].i = 0.;
rwork[0] = (doublereal) lropt;
iwork[0] = liopt;*/
return *info;
} /* magma_zhegvd_m */

Here is the call graph for this function:

Here is the caller graph for this function:

int main ( int  argc,
char **  argv 
)

Definition at line 41 of file testing_zhegvd_m.cpp.

References absv, blasf77_zdscal, blasf77_zgemm, blasf77_zhemm, blasf77_zherk, get_current_time(), GetTimerValue(), ISEED, lapackf77_zhegvd, lapackf77_zlacpy, lapackf77_zlange, lapackf77_zlanhe, lapackf77_zlarnv, lapackf77_zlaset, magma_get_zhetrd_nb(), MAGMA_Z_NEG_ONE, MAGMA_Z_ONE, MAGMA_Z_REAL, MAGMA_Z_SET2REAL, MAGMA_Z_ZERO, magma_zhegvd(), magma_zhegvd_m(), MagmaLowerStr, MagmaUpperLowerStr, MagmaUpperStr, MagmaVectorsStr, max, gbstrct_blg::N, TESTING_CUDA_FINALIZE_MGPU, TESTING_CUDA_INIT_MGPU, TESTING_FREE, TESTING_HOSTALLOC, TESTING_HOSTFREE, TESTING_MALLOC, and uplo.

{
cuDoubleComplex *h_A, *h_R, *h_B, *h_S, *h_work;
double *rwork, *w1, *w2;
magma_int_t *iwork;
double mgpu_time, gpu_time, cpu_time;
magma_timestr_t start, end;
/* Matrix size */
magma_int_t N=0, n2;
magma_int_t size[4] = {1024,2048,4100,6001};
magma_int_t i, itype, info;
magma_int_t ione = 1, izero = 0;
magma_int_t five = 5;
cuDoubleComplex c_zero = MAGMA_Z_ZERO;
cuDoubleComplex c_one = MAGMA_Z_ONE;
cuDoubleComplex c_neg_one = MAGMA_Z_NEG_ONE;
double d_one = 1.;
double d_neg_one = -1.;
double d_ten = 10.;
magma_int_t ISEED[4] = {0,0,0,1};
//const char *uplo = MagmaLowerStr;
char *uplo = (char*)MagmaLowerStr;
//char *uplo = (char*)MagmaUpperStr;
char *jobz = (char*)MagmaVectorsStr;
itype = 1;
magma_int_t checkres;
double result[4];
int flagN = 0;
if (argc != 1){
for(i = 1; i<argc; i++){
if (strcmp("-N", argv[i])==0){
N = atoi(argv[++i]);
if (N>0){
printf(" testing_zhegvd -N %d\n\n", N);
flagN=1;
}
else {
printf("\nUsage: \n");
printf(" testing_zhegvd -N %d\n\n", N);
exit(1);
}
}
if (strcmp("-itype", argv[i])==0){
itype = atoi(argv[++i]);
if (itype>0 && itype <= 3){
printf(" testing_zhegvd -itype %d\n\n", itype);
}
else {
printf("\nUsage: \n");
printf(" testing_zhegvd -itype %d\n\n", itype);
exit(1);
}
}
if (strcmp("-L", argv[i])==0){
uplo = (char*)MagmaLowerStr;
printf(" testing_zhegvd -L");
}
if (strcmp("-U", argv[i])==0){
uplo = (char*)MagmaUpperStr;
printf(" testing_zhegvd -U");
}
}
} else {
printf("\nUsage: \n");
printf(" testing_zhegvd_m -L/U -N %d -itype %d\n\n", 1024, 1);
}
if(!flagN)
N = size[3];
checkres = getenv("MAGMA_TESTINGS_CHECK") != NULL;
n2 = N * N;
/* Allocate host memory for the matrix */
TESTING_MALLOC( h_A, cuDoubleComplex, n2);
TESTING_MALLOC( h_B, cuDoubleComplex, n2);
TESTING_MALLOC( w1, double , N);
TESTING_MALLOC( w2, double , N);
TESTING_HOSTALLOC(h_R, cuDoubleComplex, n2);
TESTING_HOSTALLOC(h_S, cuDoubleComplex, n2);
magma_int_t lwork = 2*N*nb + N*N;
magma_int_t lrwork = 1 + 5*N +2*N*N;
magma_int_t liwork = 3 + 5*N;
TESTING_HOSTALLOC(h_work, cuDoubleComplex, lwork);
TESTING_MALLOC( rwork, double, lrwork);
TESTING_MALLOC( iwork, magma_int_t, liwork);
printf("\n\n");
printf(" N CPU Time(s) GPU Time(s) MGPU Time(s) \n");
printf("==================================================\n");
for(i=0; i<4; i++){
if (!flagN){
N = size[i];
n2 = N*N;
}
/* Initialize the matrix */
lapackf77_zlarnv( &ione, ISEED, &n2, h_A );
//lapackf77_zlatms( &N, &N, "U", ISEED, "P", w1, &five, &d_ten,
// &d_one, &N, &N, uplo, h_B, &N, h_work, &info);
//lapackf77_zlaset( "A", &N, &N, &c_zero, &c_one, h_B, &N);
lapackf77_zlarnv( &ione, ISEED, &n2, h_B );
/* increase the diagonal */
{
for(i=0; i<N; i++) {
MAGMA_Z_SET2REAL( h_B[i*N+i], ( MAGMA_Z_REAL(h_B[i*N+i]) + 1.*N ) );
MAGMA_Z_SET2REAL( h_A[i*N+i], MAGMA_Z_REAL(h_A[i*N+i]) );
}
}
lapackf77_zlacpy( MagmaUpperLowerStr, &N, &N, h_A, &N, h_R, &N );
lapackf77_zlacpy( MagmaUpperLowerStr, &N, &N, h_B, &N, h_S, &N );
start = get_current_time();
magma_zhegvd_m(2, itype, jobz[0], uplo[0],
N, h_R, N, h_S, N, w1,
h_work, lwork,
rwork, lrwork,
iwork, liwork,
&info);
if(info != 0)
printf("MGPU error code: %d\n",info);
mgpu_time = GetTimerValue(start,end)/1000.;
if ( checkres ) {
/* =====================================================================
Check the results following the LAPACK's [zc]hegvd routine.
A x = lambda B x is solved
and the following 3 tests computed:
(1) | A Z - B Z D | / ( |A||Z| N ) (itype = 1)
| A B Z - Z D | / ( |A||Z| N ) (itype = 2)
| B A Z - Z D | / ( |A||Z| N ) (itype = 3)
(2) | I - V V' B | / ( N ) (itype = 1,2)
| B - V V' | / ( |B| N ) (itype = 3)
(3) | S(with V) - S(w/o V) | / | S |
=================================================================== */
double temp1, temp2;
cuDoubleComplex *tau;
if (itype == 1 || itype == 2){
lapackf77_zlaset( "A", &N, &N, &c_zero, &c_one, h_S, &N);
blasf77_zgemm("N", "C", &N, &N, &N, &c_one, h_R, &N, h_R, &N, &c_zero, h_work, &N);
blasf77_zhemm("R", uplo, &N, &N, &c_neg_one, h_B, &N, h_work, &N, &c_one, h_S, &N);
result[1]= lapackf77_zlange("1", &N, &N, h_S, &N, rwork) / N;
}
else if (itype == 3){
lapackf77_zlacpy( MagmaUpperLowerStr, &N, &N, h_B, &N, h_S, &N);
blasf77_zherk(uplo, "N", &N, &N, &d_neg_one, h_R, &N, &d_one, h_S, &N);
result[1]= lapackf77_zlanhe("1",uplo, &N, h_S, &N, rwork) / N / lapackf77_zlanhe("1",uplo, &N, h_B, &N, rwork);
}
result[0] = 1.;
result[0] /= lapackf77_zlanhe("1",uplo, &N, h_A, &N, rwork);
result[0] /= lapackf77_zlange("1",&N , &N, h_R, &N, rwork);
if (itype == 1){
blasf77_zhemm("L", uplo, &N, &N, &c_one, h_A, &N, h_R, &N, &c_zero, h_work, &N);
for(int i=0; i<N; ++i)
blasf77_zdscal(&N, &w1[i], &h_R[i*N], &ione);
blasf77_zhemm("L", uplo, &N, &N, &c_neg_one, h_B, &N, h_R, &N, &c_one, h_work, &N);
result[0] *= lapackf77_zlange("1", &N, &N, h_work, &N, rwork)/N;
}
else if (itype == 2){
blasf77_zhemm("L", uplo, &N, &N, &c_one, h_B, &N, h_R, &N, &c_zero, h_work, &N);
for(int i=0; i<N; ++i)
blasf77_zdscal(&N, &w1[i], &h_R[i*N], &ione);
blasf77_zhemm("L", uplo, &N, &N, &c_one, h_A, &N, h_work, &N, &c_neg_one, h_R, &N);
result[0] *= lapackf77_zlange("1", &N, &N, h_R, &N, rwork)/N;
}
else if (itype == 3){
blasf77_zhemm("L", uplo, &N, &N, &c_one, h_A, &N, h_R, &N, &c_zero, h_work, &N);
for(int i=0; i<N; ++i)
blasf77_zdscal(&N, &w1[i], &h_R[i*N], &ione);
blasf77_zhemm("L", uplo, &N, &N, &c_one, h_B, &N, h_work, &N, &c_neg_one, h_R, &N);
result[0] *= lapackf77_zlange("1", &N, &N, h_R, &N, rwork)/N;
}
/* lapackf77_zhet21(&ione, uplo, &N, &izero,
h_A, &N,
w1, w1,
h_R, &N,
h_R, &N,
tau, h_work, rwork, &result[0]);
*/
lapackf77_zlacpy( MagmaUpperLowerStr, &N, &N, h_A, &N, h_R, &N );
lapackf77_zlacpy( MagmaUpperLowerStr, &N, &N, h_B, &N, h_S, &N );
magma_zhegvd(itype, 'N', uplo[0],
N, h_R, N, h_S, N, w2,
h_work, lwork,
rwork, lrwork,
iwork, liwork,
&info);
temp1 = temp2 = 0;
for(int j=0; j<N; j++){
temp1 = max(temp1, absv(w1[j]));
temp1 = max(temp1, absv(w2[j]));
temp2 = max(temp2, absv(w1[j]-w2[j]));
}
result[2] = temp2 / temp1;
}
lapackf77_zlacpy( MagmaUpperLowerStr, &N, &N, h_A, &N, h_R, &N );
lapackf77_zlacpy( MagmaUpperLowerStr, &N, &N, h_B, &N, h_S, &N );
/* ====================================================================
Performs operation using MAGMA
=================================================================== */
start = get_current_time();
magma_zhegvd(itype, jobz[0], uplo[0],
N, h_R, N, h_S, N, w1,
h_work, lwork,
rwork, lrwork,
iwork, liwork,
&info);
if(info != 0)
printf("GPU error code: %d\n",info);
gpu_time = GetTimerValue(start,end)/1000.;
/* =====================================================================
Performs operation using LAPACK
=================================================================== */
start = get_current_time();
lapackf77_zhegvd(&itype, jobz, uplo,
&N, h_A, &N, h_B, &N, w2,
h_work, &lwork,
rwork, &lrwork,
iwork, &liwork,
&info);
if (info < 0)
printf("Argument %d of zhegvd had an illegal value.\n", -info);
cpu_time = GetTimerValue(start,end)/1000.;
/* =====================================================================
Print execution time
=================================================================== */
printf("%5d %6.2f %6.2f %6.2f\n",
N, cpu_time, gpu_time, mgpu_time);
if ( checkres ){
printf("Testing the eigenvalues and eigenvectors for correctness:\n");
if(itype==1)
printf("(1) | A Z - B Z D | / (|A| |Z| N) = %e\n", result[0]);
else if(itype==2)
printf("(1) | A B Z - Z D | / (|A| |Z| N) = %e\n", result[0]);
else if(itype==3)
printf("(1) | B A Z - Z D | / (|A| |Z| N) = %e\n", result[0]);
if(itype==1 || itype ==2)
printf("(2) | I - Z Z' B | / N = %e\n", result[1]);
else
printf("(2) | B - Z Z' | / (|B| N) = %e\n", result[1]);
printf("(3) | D(w/ Z)-D(w/o Z)|/ |D| = %e\n\n", result[2]);
}
if (flagN)
break;
}
/* Memory clean up */
TESTING_FREE( h_A);
TESTING_FREE( h_B);
TESTING_FREE( rwork);
TESTING_FREE( iwork);
/* Shutdown */
}

Here is the call graph for this function: