Ejemplo n.º 1
0
/* Subroutine */ int cdrvrf4_(integer *nout, integer *nn, integer *nval, real 
	*thresh, complex *c1, complex *c2, integer *ldc, complex *crf, 
	complex *a, integer *lda, real *s_work_clange__)
{
    /* Initialized data */

    static integer iseedy[4] = { 1988,1989,1990,1991 };
    static char uplos[1*2] = "U" "L";
    static char forms[1*2] = "N" "C";
    static char transs[1*2] = "N" "C";

    /* Format strings */
    static char fmt_9999[] = "(1x,\002 *** Error(s) or Failure(s) while test"
	    "ing CHFRK               ***\002)";
    static char fmt_9997[] = "(1x,\002     Failure in \002,a5,\002, CFORM="
	    "'\002,a1,\002',\002,\002 UPLO='\002,a1,\002',\002,\002 TRANS="
	    "'\002,a1,\002',\002,\002 N=\002,i3,\002, K =\002,i3,\002, test"
	    "=\002,g12.5)";
    static char fmt_9996[] = "(1x,\002All tests for \002,a5,\002 auxiliary r"
	    "outine passed the \002,\002threshold (\002,i5,\002 tests run)"
	    "\002)";
    static char fmt_9995[] = "(1x,a6,\002 auxiliary routine:\002,i5,\002 out"
	    " of \002,i5,\002 tests failed to pass the threshold\002)";

    /* System generated locals */
    integer a_dim1, a_offset, c1_dim1, c1_offset, c2_dim1, c2_offset, i__1, 
	    i__2, i__3, i__4, i__5, i__6, i__7;
    real r__1;
    complex q__1;

    /* Builtin functions */
    /* Subroutine */ int s_copy(char *, char *, ftnlen, ftnlen);
    integer s_wsle(cilist *), e_wsle(void), s_wsfe(cilist *), e_wsfe(void), 
	    do_fio(integer *, char *, ftnlen);

    /* Local variables */
    integer i__, j, k, n, iik, iin;
    real eps, beta;
    integer info;
    char uplo[1];
    integer nrun;
    real alpha;
    integer nfail, iseed[4];
    extern /* Subroutine */ int cherk_(char *, char *, integer *, integer *, 
	    real *, complex *, integer *, real *, complex *, integer *), chfrk_(char *, char *, char *, integer *, 
	    integer *, real *, complex *, integer *, real *, complex *);
    char cform[1];
    integer iform;
    real norma, normc;
    char trans[1];
    integer iuplo;
    extern doublereal clange_(char *, integer *, integer *, complex *, 
	    integer *, real *);
    integer ialpha;
    extern /* Complex */ VOID clarnd_(complex *, integer *, integer *);
    extern doublereal slamch_(char *), slarnd_(integer *, integer *);
    integer itrans;
    extern /* Subroutine */ int ctfttr_(char *, char *, integer *, complex *, 
	    complex *, integer *, integer *), ctrttf_(char *, 
	    char *, integer *, complex *, integer *, complex *, integer *);
    real result[1];

    /* Fortran I/O blocks */
    static cilist io___28 = { 0, 0, 0, 0, 0 };
    static cilist io___29 = { 0, 0, 0, fmt_9999, 0 };
    static cilist io___30 = { 0, 0, 0, fmt_9997, 0 };
    static cilist io___31 = { 0, 0, 0, fmt_9996, 0 };
    static cilist io___32 = { 0, 0, 0, fmt_9995, 0 };



/*  -- LAPACK test routine (version 3.2.0) -- */
/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
/*     November 2008 */

/*     .. Scalar Arguments .. */
/*     .. */
/*     .. Array Arguments .. */
/*     .. */

/*  Purpose */
/*  ======= */

/*  CDRVRF4 tests the LAPACK RFP routines: */
/*      CHFRK */

/*  Arguments */
/*  ========= */

/*  NOUT          (input) INTEGER */
/*                The unit number for output. */

/*  NN            (input) INTEGER */
/*                The number of values of N contained in the vector NVAL. */

/*  NVAL          (input) INTEGER array, dimension (NN) */
/*                The values of the matrix dimension N. */

/*  THRESH        (input) REAL */
/*                The threshold value for the test ratios.  A result is */
/*                included in the output file if RESULT >= THRESH.  To have */
/*                every test ratio printed, use THRESH = 0. */

/*  C1            (workspace) COMPLEX array, dimension (LDC,NMAX) */

/*  C2            (workspace) COMPLEX array, dimension (LDC,NMAX) */

/*  LDC           (input) INTEGER */
/*                The leading dimension of the array A.  LDA >= max(1,NMAX). */

/*  CRF           (workspace) COMPLEX array, dimension ((NMAX*(NMAX+1))/2). */

/*  A             (workspace) COMPLEX array, dimension (LDA,NMAX) */

/*  LDA           (input) INTEGER */
/*                The leading dimension of the array A.  LDA >= max(1,NMAX). */

/*  S_WORK_CLANGE (workspace) REAL array, dimension (NMAX) */

/*  ===================================================================== */
/*     .. */
/*     .. Parameters .. */
/*     .. */
/*     .. Local Scalars .. */
/*     .. */
/*     .. Local Arrays .. */
/*     .. */
/*     .. External Functions .. */
/*     .. */
/*     .. External Subroutines .. */
/*     .. */
/*     .. Intrinsic Functions .. */
/*     .. */
/*     .. Scalars in Common .. */
/*     .. */
/*     .. Common blocks .. */
/*     .. */
/*     .. Data statements .. */
    /* Parameter adjustments */
    --nval;
    c2_dim1 = *ldc;
    c2_offset = 1 + c2_dim1;
    c2 -= c2_offset;
    c1_dim1 = *ldc;
    c1_offset = 1 + c1_dim1;
    c1 -= c1_offset;
    --crf;
    a_dim1 = *lda;
    a_offset = 1 + a_dim1;
    a -= a_offset;
    --s_work_clange__;

    /* Function Body */
/*     .. */
/*     .. Executable Statements .. */

/*     Initialize constants and the random number seed. */

    nrun = 0;
    nfail = 0;
    info = 0;
    for (i__ = 1; i__ <= 4; ++i__) {
	iseed[i__ - 1] = iseedy[i__ - 1];
/* L10: */
    }
    eps = slamch_("Precision");

    i__1 = *nn;
    for (iin = 1; iin <= i__1; ++iin) {

	n = nval[iin];

	i__2 = *nn;
	for (iik = 1; iik <= i__2; ++iik) {

	    k = nval[iin];

	    for (iform = 1; iform <= 2; ++iform) {

		*(unsigned char *)cform = *(unsigned char *)&forms[iform - 1];

		for (iuplo = 1; iuplo <= 2; ++iuplo) {

		    *(unsigned char *)uplo = *(unsigned char *)&uplos[iuplo - 
			    1];

		    for (itrans = 1; itrans <= 2; ++itrans) {

			*(unsigned char *)trans = *(unsigned char *)&transs[
				itrans - 1];

			for (ialpha = 1; ialpha <= 4; ++ialpha) {

			    if (ialpha == 1) {
				alpha = 0.f;
				beta = 0.f;
			    } else if (ialpha == 1) {
				alpha = 1.f;
				beta = 0.f;
			    } else if (ialpha == 1) {
				alpha = 0.f;
				beta = 1.f;
			    } else {
				alpha = slarnd_(&c__2, iseed);
				beta = slarnd_(&c__2, iseed);
			    }

/*                       All the parameters are set: */
/*                          CFORM, UPLO, TRANS, M, N, */
/*                          ALPHA, and BETA */
/*                       READY TO TEST! */

			    ++nrun;

			    if (itrans == 1) {

/*                          In this case we are NOTRANS, so A is N-by-K */

				i__3 = k;
				for (j = 1; j <= i__3; ++j) {
				    i__4 = n;
				    for (i__ = 1; i__ <= i__4; ++i__) {
					i__5 = i__ + j * a_dim1;
					clarnd_(&q__1, &c__4, iseed);
					a[i__5].r = q__1.r, a[i__5].i = 
						q__1.i;
				    }
				}

				norma = clange_("I", &n, &k, &a[a_offset], 
					lda, &s_work_clange__[1]);

			    } else {

/*                          In this case we are TRANS, so A is K-by-N */

				i__3 = n;
				for (j = 1; j <= i__3; ++j) {
				    i__4 = k;
				    for (i__ = 1; i__ <= i__4; ++i__) {
					i__5 = i__ + j * a_dim1;
					clarnd_(&q__1, &c__4, iseed);
					a[i__5].r = q__1.r, a[i__5].i = 
						q__1.i;
				    }
				}

				norma = clange_("I", &k, &n, &a[a_offset], 
					lda, &s_work_clange__[1]);

			    }


/*                       Generate C1 our N--by--N Hermitian matrix. */
/*                       Make sure C2 has the same upper/lower part, */
/*                       (the one that we do not touch), so */
/*                       copy the initial C1 in C2 in it. */

			    i__3 = n;
			    for (j = 1; j <= i__3; ++j) {
				i__4 = n;
				for (i__ = 1; i__ <= i__4; ++i__) {
				    i__5 = i__ + j * c1_dim1;
				    clarnd_(&q__1, &c__4, iseed);
				    c1[i__5].r = q__1.r, c1[i__5].i = q__1.i;
				    i__5 = i__ + j * c2_dim1;
				    i__6 = i__ + j * c1_dim1;
				    c2[i__5].r = c1[i__6].r, c2[i__5].i = c1[
					    i__6].i;
				}
			    }

/*                       (See comment later on for why we use CLANGE and */
/*                       not CLANHE for C1.) */

			    normc = clange_("I", &n, &n, &c1[c1_offset], ldc, 
				    &s_work_clange__[1]);

			    s_copy(srnamc_1.srnamt, "CTRTTF", (ftnlen)32, (
				    ftnlen)6);
			    ctrttf_(cform, uplo, &n, &c1[c1_offset], ldc, &
				    crf[1], &info);

/*                       call zherk the BLAS routine -> gives C1 */

			    s_copy(srnamc_1.srnamt, "CHERK ", (ftnlen)32, (
				    ftnlen)6);
			    cherk_(uplo, trans, &n, &k, &alpha, &a[a_offset], 
				    lda, &beta, &c1[c1_offset], ldc);

/*                       call zhfrk the RFP routine -> gives CRF */

			    s_copy(srnamc_1.srnamt, "CHFRK ", (ftnlen)32, (
				    ftnlen)6);
			    chfrk_(cform, uplo, trans, &n, &k, &alpha, &a[
				    a_offset], lda, &beta, &crf[1]);

/*                       convert CRF in full format -> gives C2 */

			    s_copy(srnamc_1.srnamt, "CTFTTR", (ftnlen)32, (
				    ftnlen)6);
			    ctfttr_(cform, uplo, &n, &crf[1], &c2[c2_offset], 
				    ldc, &info);

/*                       compare C1 and C2 */

			    i__3 = n;
			    for (j = 1; j <= i__3; ++j) {
				i__4 = n;
				for (i__ = 1; i__ <= i__4; ++i__) {
				    i__5 = i__ + j * c1_dim1;
				    i__6 = i__ + j * c1_dim1;
				    i__7 = i__ + j * c2_dim1;
				    q__1.r = c1[i__6].r - c2[i__7].r, q__1.i =
					     c1[i__6].i - c2[i__7].i;
				    c1[i__5].r = q__1.r, c1[i__5].i = q__1.i;
				}
			    }

/*                       Yes, C1 is Hermitian so we could call CLANHE, */
/*                       but we want to check the upper part that is */
/*                       supposed to be unchanged and the diagonal that */
/*                       is supposed to be real -> CLANGE */

			    result[0] = clange_("I", &n, &n, &c1[c1_offset], 
				    ldc, &s_work_clange__[1]);
/* Computing MAX */
			    r__1 = dabs(alpha) * norma * norma + dabs(beta) * 
				    normc;
			    result[0] = result[0] / dmax(r__1,1.f) / max(n,1) 
				    / eps;

			    if (result[0] >= *thresh) {
				if (nfail == 0) {
				    io___28.ciunit = *nout;
				    s_wsle(&io___28);
				    e_wsle();
				    io___29.ciunit = *nout;
				    s_wsfe(&io___29);
				    e_wsfe();
				}
				io___30.ciunit = *nout;
				s_wsfe(&io___30);
				do_fio(&c__1, "CHFRK", (ftnlen)5);
				do_fio(&c__1, cform, (ftnlen)1);
				do_fio(&c__1, uplo, (ftnlen)1);
				do_fio(&c__1, trans, (ftnlen)1);
				do_fio(&c__1, (char *)&n, (ftnlen)sizeof(
					integer));
				do_fio(&c__1, (char *)&k, (ftnlen)sizeof(
					integer));
				do_fio(&c__1, (char *)&result[0], (ftnlen)
					sizeof(real));
				e_wsfe();
				++nfail;
			    }

/* L100: */
			}
/* L110: */
		    }
/* L120: */
		}
/* L130: */
	    }
/* L140: */
	}
/* L150: */
    }

/*     Print a summary of the results. */

    if (nfail == 0) {
	io___31.ciunit = *nout;
	s_wsfe(&io___31);
	do_fio(&c__1, "CHFRK", (ftnlen)5);
	do_fio(&c__1, (char *)&nrun, (ftnlen)sizeof(integer));
	e_wsfe();
    } else {
	io___32.ciunit = *nout;
	s_wsfe(&io___32);
	do_fio(&c__1, "CHFRK", (ftnlen)5);
	do_fio(&c__1, (char *)&nfail, (ftnlen)sizeof(integer));
	do_fio(&c__1, (char *)&nrun, (ftnlen)sizeof(integer));
	e_wsfe();
    }


    return 0;

/*     End of CDRVRF4 */

} /* cdrvrf4_ */
Ejemplo n.º 2
0
/* Subroutine */ int cdrvrf1_(integer *nout, integer *nn, integer *nval, real 
	*thresh, complex *a, integer *lda, complex *arf, real *work)
{
    /* Initialized data */

    static integer iseedy[4] = { 1988,1989,1990,1991 };
    static char uplos[1*2] = "U" "L";
    static char forms[1*2] = "N" "C";
    static char norms[1*4] = "M" "1" "I" "F";

    /* Format strings */
    static char fmt_9999[] = "(1x,\002 *** Error(s) or Failure(s) while test"
	    "ing CLANHF              ***\002)";
    static char fmt_9998[] = "(1x,\002     Error in \002,a6,\002 with UPLO="
	    "'\002,a1,\002', FORM='\002,a1,\002', N=\002,i5)";
    static char fmt_9997[] = "(1x,\002     Failure in \002,a6,\002 N=\002,"
	    "i5,\002 TYPE=\002,i5,\002 UPLO='\002,a1,\002', FORM ='\002,a1"
	    ",\002', NORM='\002,a1,\002', test=\002,g12.5)";
    static char fmt_9996[] = "(1x,\002All tests for \002,a6,\002 auxiliary r"
	    "outine passed the \002,\002threshold (\002,i5,\002 tests run)"
	    "\002)";
    static char fmt_9995[] = "(1x,a6,\002 auxiliary routine:\002,i5,\002 out"
	    " of \002,i5,\002 tests failed to pass the threshold\002)";
    static char fmt_9994[] = "(26x,i5,\002 error message recorded (\002,a6"
	    ",\002)\002)";

    /* System generated locals */
    integer a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5;
    complex q__1;

    /* Local variables */
    integer i__, j, n, iin, iit;
    real eps;
    integer info;
    char norm[1], uplo[1];
    integer nrun, nfail;
    real large;
    integer iseed[4];
    char cform[1];
    real small;
    integer iform;
    real norma;
    integer inorm, iuplo, nerrs;
    real result[1], normarf;

    /* Fortran I/O blocks */
    static cilist io___22 = { 0, 0, 0, 0, 0 };
    static cilist io___23 = { 0, 0, 0, fmt_9999, 0 };
    static cilist io___24 = { 0, 0, 0, fmt_9998, 0 };
    static cilist io___30 = { 0, 0, 0, 0, 0 };
    static cilist io___31 = { 0, 0, 0, fmt_9999, 0 };
    static cilist io___32 = { 0, 0, 0, fmt_9997, 0 };
    static cilist io___33 = { 0, 0, 0, fmt_9996, 0 };
    static cilist io___34 = { 0, 0, 0, fmt_9995, 0 };
    static cilist io___35 = { 0, 0, 0, fmt_9994, 0 };



/*  -- LAPACK test routine (version 3.2.0) -- */
/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
/*     November 2008 */

/*     .. Scalar Arguments .. */
/*     .. */
/*     .. Array Arguments .. */
/*     .. */

/*  Purpose */
/*  ======= */

/*  CDRVRF1 tests the LAPACK RFP routines: */
/*      CLANHF.F */

/*  Arguments */
/*  ========= */

/*  NOUT          (input) INTEGER */
/*                The unit number for output. */

/*  NN            (input) INTEGER */
/*                The number of values of N contained in the vector NVAL. */

/*  NVAL          (input) INTEGER array, dimension (NN) */
/*                The values of the matrix dimension N. */

/*  THRESH        (input) REAL */
/*                The threshold value for the test ratios.  A result is */
/*                included in the output file if RESULT >= THRESH.  To have */
/*                every test ratio printed, use THRESH = 0. */

/*  A             (workspace) COMPLEX array, dimension (LDA,NMAX) */

/*  LDA           (input) INTEGER */
/*                The leading dimension of the array A.  LDA >= max(1,NMAX). */

/*  ARF           (workspace) COMPLEX array, dimension ((NMAX*(NMAX+1))/2). */

/*  WORK          (workspace) COMPLEX array, dimension ( NMAX ) */

/*  ===================================================================== */
/*     .. */
/*     .. Parameters .. */
/*     .. */
/*     .. Local Scalars .. */
/*     .. */
/*     .. Local Arrays .. */
/*     .. */
/*     .. External Functions .. */
/*     .. */
/*     .. External Subroutines .. */
/*     .. */
/*     .. Scalars in Common .. */
/*     .. */
/*     .. Common blocks .. */
/*     .. */
/*     .. Data statements .. */
    /* Parameter adjustments */
    --nval;
    a_dim1 = *lda;
    a_offset = 1 + a_dim1;
    a -= a_offset;
    --arf;
    --work;

    /* Function Body */
/*     .. */
/*     .. Executable Statements .. */

/*     Initialize constants and the random number seed. */

    nrun = 0;
    nfail = 0;
    nerrs = 0;
    info = 0;
    for (i__ = 1; i__ <= 4; ++i__) {
	iseed[i__ - 1] = iseedy[i__ - 1];
/* L10: */
    }

    eps = slamch_("Precision");
    small = slamch_("Safe minimum");
    large = 1.f / small;
    small = small * *lda * *lda;
    large = large / *lda / *lda;

    i__1 = *nn;
    for (iin = 1; iin <= i__1; ++iin) {

	n = nval[iin];

	for (iit = 1; iit <= 3; ++iit) {

/*           IIT = 1 : random matrix */
/*           IIT = 2 : random matrix scaled near underflow */
/*           IIT = 3 : random matrix scaled near overflow */

	    i__2 = n;
	    for (j = 1; j <= i__2; ++j) {
		i__3 = n;
		for (i__ = 1; i__ <= i__3; ++i__) {
		    i__4 = i__ + j * a_dim1;
		    clarnd_(&q__1, &c__4, iseed);
		    a[i__4].r = q__1.r, a[i__4].i = q__1.i;
		}
	    }

	    if (iit == 2) {
		i__2 = n;
		for (j = 1; j <= i__2; ++j) {
		    i__3 = n;
		    for (i__ = 1; i__ <= i__3; ++i__) {
			i__4 = i__ + j * a_dim1;
			i__5 = i__ + j * a_dim1;
			q__1.r = large * a[i__5].r, q__1.i = large * a[i__5]
				.i;
			a[i__4].r = q__1.r, a[i__4].i = q__1.i;
		    }
		}
	    }

	    if (iit == 3) {
		i__2 = n;
		for (j = 1; j <= i__2; ++j) {
		    i__3 = n;
		    for (i__ = 1; i__ <= i__3; ++i__) {
			i__4 = i__ + j * a_dim1;
			i__5 = i__ + j * a_dim1;
			q__1.r = small * a[i__5].r, q__1.i = small * a[i__5]
				.i;
			a[i__4].r = q__1.r, a[i__4].i = q__1.i;
		    }
		}
	    }

/*           Do first for UPLO = 'U', then for UPLO = 'L' */

	    for (iuplo = 1; iuplo <= 2; ++iuplo) {

		*(unsigned char *)uplo = *(unsigned char *)&uplos[iuplo - 1];

/*              Do first for CFORM = 'N', then for CFORM = 'C' */

		for (iform = 1; iform <= 2; ++iform) {

		    *(unsigned char *)cform = *(unsigned char *)&forms[iform 
			    - 1];

		    s_copy(srnamc_1.srnamt, "CTRTTF", (ftnlen)32, (ftnlen)6);
		    ctrttf_(cform, uplo, &n, &a[a_offset], lda, &arf[1], &
			    info);

/*                 Check error code from CTRTTF */

		    if (info != 0) {
			if (nfail == 0 && nerrs == 0) {
			    io___22.ciunit = *nout;
			    s_wsle(&io___22);
			    e_wsle();
			    io___23.ciunit = *nout;
			    s_wsfe(&io___23);
			    e_wsfe();
			}
			io___24.ciunit = *nout;
			s_wsfe(&io___24);
			do_fio(&c__1, srnamc_1.srnamt, (ftnlen)32);
			do_fio(&c__1, uplo, (ftnlen)1);
			do_fio(&c__1, cform, (ftnlen)1);
			do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer));
			e_wsfe();
			++nerrs;
			goto L100;
		    }

		    for (inorm = 1; inorm <= 4; ++inorm) {

/*                    Check all four norms: 'M', '1', 'I', 'F' */

			*(unsigned char *)norm = *(unsigned char *)&norms[
				inorm - 1];
			normarf = clanhf_(norm, cform, uplo, &n, &arf[1], &
				work[1]);
			norma = clanhe_(norm, uplo, &n, &a[a_offset], lda, &
				work[1]);

			result[0] = (norma - normarf) / norma / eps;
			++nrun;

			if (result[0] >= *thresh) {
			    if (nfail == 0 && nerrs == 0) {
				io___30.ciunit = *nout;
				s_wsle(&io___30);
				e_wsle();
				io___31.ciunit = *nout;
				s_wsfe(&io___31);
				e_wsfe();
			    }
			    io___32.ciunit = *nout;
			    s_wsfe(&io___32);
			    do_fio(&c__1, "CLANHF", (ftnlen)6);
			    do_fio(&c__1, (char *)&n, (ftnlen)sizeof(integer))
				    ;
			    do_fio(&c__1, (char *)&iit, (ftnlen)sizeof(
				    integer));
			    do_fio(&c__1, uplo, (ftnlen)1);
			    do_fio(&c__1, cform, (ftnlen)1);
			    do_fio(&c__1, norm, (ftnlen)1);
			    do_fio(&c__1, (char *)&result[0], (ftnlen)sizeof(
				    real));
			    e_wsfe();
			    ++nfail;
			}
/* L90: */
		    }
L100:
		    ;
		}
/* L110: */
	    }
/* L120: */
	}
/* L130: */
    }

/*     Print a summary of the results. */

    if (nfail == 0) {
	io___33.ciunit = *nout;
	s_wsfe(&io___33);
	do_fio(&c__1, "CLANHF", (ftnlen)6);
	do_fio(&c__1, (char *)&nrun, (ftnlen)sizeof(integer));
	e_wsfe();
    } else {
	io___34.ciunit = *nout;
	s_wsfe(&io___34);
	do_fio(&c__1, "CLANHF", (ftnlen)6);
	do_fio(&c__1, (char *)&nfail, (ftnlen)sizeof(integer));
	do_fio(&c__1, (char *)&nrun, (ftnlen)sizeof(integer));
	e_wsfe();
    }
    if (nerrs != 0) {
	io___35.ciunit = *nout;
	s_wsfe(&io___35);
	do_fio(&c__1, (char *)&nerrs, (ftnlen)sizeof(integer));
	do_fio(&c__1, "CLANHF", (ftnlen)6);
	e_wsfe();
    }


    return 0;

/*     End of CDRVRF1 */

} /* cdrvrf1_ */
Ejemplo n.º 3
0
/* Subroutine */ int cerrrfp_(integer *nunit)
{
    /* Format strings */
    static char fmt_9999[] = "(1x,\002COMPLEX RFP routines passed the tests "
	    "of the \002,\002error exits\002)";
    static char fmt_9998[] = "(\002 *** RFP routines failed the tests of the"
	    " error \002,\002exits ***\002)";

    /* Local variables */
    complex a[1]	/* was [1][1] */, b[1]	/* was [1][1] */, beta;
    integer info;
    complex alpha;

    /* Fortran I/O blocks */
    static cilist io___6 = { 0, 0, 0, fmt_9999, 0 };
    static cilist io___7 = { 0, 0, 0, fmt_9998, 0 };



/*  -- LAPACK test routine (version 3.2.0) -- */
/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
/*     November 2008 */

/*     .. Scalar Arguments .. */
/*     .. */

/*  Purpose */
/*  ======= */

/*  CERRRFP tests the error exits for the COMPLEX driver routines */
/*  for solving linear systems of equations. */

/*  CDRVRFP tests the COMPLEX LAPACK RFP routines: */
/*      CTFSM, CTFTRI, CHFRK, CTFTTP, CTFTTR, CPFTRF, CPFTRS, CTPTTF, */
/*      CTPTTR, CTRTTF, and CTRTTP */

/*  Arguments */
/*  ========= */

/*  NUNIT   (input) INTEGER */
/*          The unit number for output. */

/*  ===================================================================== */

/*     .. */
/*     .. Local Scalars .. */
/*     .. */
/*     .. Local Arrays .. */
/*     .. */
/*     .. External Subroutines .. */
/*     .. */
/*     .. Scalars in Common .. */
/*     .. */
/*     .. Intrinsic Functions .. */
/*     .. */
/*     .. Common blocks .. */
/*     .. */
/*     .. Executable Statements .. */

    infoc_1.nout = *nunit;
    infoc_1.ok = TRUE_;
    a[0].r = 1.f, a[0].i = 1.f;
    b[0].r = 1.f, b[0].i = 1.f;
    alpha.r = 1.f, alpha.i = 1.f;
    beta.r = 1.f, beta.i = 1.f;

    s_copy(srnamc_1.srnamt, "CPFTRF", (ftnlen)32, (ftnlen)6);
    infoc_1.infot = 1;
    cpftrf_("/", "U", &c__0, a, &info);
    chkxer_("CPFTRF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);
    infoc_1.infot = 2;
    cpftrf_("N", "/", &c__0, a, &info);
    chkxer_("CPFTRF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);
    infoc_1.infot = 3;
    cpftrf_("N", "U", &c_n1, a, &info);
    chkxer_("CPFTRF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);

    s_copy(srnamc_1.srnamt, "CPFTRS", (ftnlen)32, (ftnlen)6);
    infoc_1.infot = 1;
    cpftrs_("/", "U", &c__0, &c__0, a, b, &c__1, &info);
    chkxer_("CPFTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);
    infoc_1.infot = 2;
    cpftrs_("N", "/", &c__0, &c__0, a, b, &c__1, &info);
    chkxer_("CPFTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);
    infoc_1.infot = 3;
    cpftrs_("N", "U", &c_n1, &c__0, a, b, &c__1, &info);
    chkxer_("CPFTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);
    infoc_1.infot = 4;
    cpftrs_("N", "U", &c__0, &c_n1, a, b, &c__1, &info);
    chkxer_("CPFTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);
    infoc_1.infot = 7;
    cpftrs_("N", "U", &c__0, &c__0, a, b, &c__0, &info);
    chkxer_("CPFTRS", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);

    s_copy(srnamc_1.srnamt, "CPFTRI", (ftnlen)32, (ftnlen)6);
    infoc_1.infot = 1;
    cpftri_("/", "U", &c__0, a, &info);
    chkxer_("CPFTRI", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);
    infoc_1.infot = 2;
    cpftri_("N", "/", &c__0, a, &info);
    chkxer_("CPFTRI", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);
    infoc_1.infot = 3;
    cpftri_("N", "U", &c_n1, a, &info);
    chkxer_("CPFTRI", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);

    s_copy(srnamc_1.srnamt, "CTFSM ", (ftnlen)32, (ftnlen)6);
    infoc_1.infot = 1;
    ctfsm_("/", "L", "U", "C", "U", &c__0, &c__0, &alpha, a, b, &c__1);
    chkxer_("CTFSM ", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);
    infoc_1.infot = 2;
    ctfsm_("N", "/", "U", "C", "U", &c__0, &c__0, &alpha, a, b, &c__1);
    chkxer_("CTFSM ", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);
    infoc_1.infot = 3;
    ctfsm_("N", "L", "/", "C", "U", &c__0, &c__0, &alpha, a, b, &c__1);
    chkxer_("CTFSM ", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);
    infoc_1.infot = 4;
    ctfsm_("N", "L", "U", "/", "U", &c__0, &c__0, &alpha, a, b, &c__1);
    chkxer_("CTFSM ", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);
    infoc_1.infot = 5;
    ctfsm_("N", "L", "U", "C", "/", &c__0, &c__0, &alpha, a, b, &c__1);
    chkxer_("CTFSM ", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);
    infoc_1.infot = 6;
    ctfsm_("N", "L", "U", "C", "U", &c_n1, &c__0, &alpha, a, b, &c__1);
    chkxer_("CTFSM ", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);
    infoc_1.infot = 7;
    ctfsm_("N", "L", "U", "C", "U", &c__0, &c_n1, &alpha, a, b, &c__1);
    chkxer_("CTFSM ", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);
    infoc_1.infot = 11;
    ctfsm_("N", "L", "U", "C", "U", &c__0, &c__0, &alpha, a, b, &c__0);
    chkxer_("CTFSM ", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);

    s_copy(srnamc_1.srnamt, "CTFTRI", (ftnlen)32, (ftnlen)6);
    infoc_1.infot = 1;
    ctftri_("/", "L", "N", &c__0, a, &info);
    chkxer_("CTFTRI", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);
    infoc_1.infot = 2;
    ctftri_("N", "/", "N", &c__0, a, &info);
    chkxer_("CTFTRI", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);
    infoc_1.infot = 3;
    ctftri_("N", "L", "/", &c__0, a, &info);
    chkxer_("CTFTRI", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);
    infoc_1.infot = 4;
    ctftri_("N", "L", "N", &c_n1, a, &info);
    chkxer_("CTFTRI", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);

    s_copy(srnamc_1.srnamt, "CTFTTR", (ftnlen)32, (ftnlen)6);
    infoc_1.infot = 1;
    ctfttr_("/", "U", &c__0, a, b, &c__1, &info);
    chkxer_("CTFTTR", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);
    infoc_1.infot = 2;
    ctfttr_("N", "/", &c__0, a, b, &c__1, &info);
    chkxer_("CTFTTR", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);
    infoc_1.infot = 3;
    ctfttr_("N", "U", &c_n1, a, b, &c__1, &info);
    chkxer_("CTFTTR", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);
    infoc_1.infot = 6;
    ctfttr_("N", "U", &c__0, a, b, &c__0, &info);
    chkxer_("CTFTTR", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);

    s_copy(srnamc_1.srnamt, "CTRTTF", (ftnlen)32, (ftnlen)6);
    infoc_1.infot = 1;
    ctrttf_("/", "U", &c__0, a, &c__1, b, &info);
    chkxer_("CTRTTF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);
    infoc_1.infot = 2;
    ctrttf_("N", "/", &c__0, a, &c__1, b, &info);
    chkxer_("CTRTTF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);
    infoc_1.infot = 3;
    ctrttf_("N", "U", &c_n1, a, &c__1, b, &info);
    chkxer_("CTRTTF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);
    infoc_1.infot = 5;
    ctrttf_("N", "U", &c__0, a, &c__0, b, &info);
    chkxer_("CTRTTF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);

    s_copy(srnamc_1.srnamt, "CTFTTP", (ftnlen)32, (ftnlen)6);
    infoc_1.infot = 1;
    ctfttp_("/", "U", &c__0, a, b, &info);
    chkxer_("CTFTTP", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);
    infoc_1.infot = 2;
    ctfttp_("N", "/", &c__0, a, b, &info);
    chkxer_("CTFTTP", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);
    infoc_1.infot = 3;
    ctfttp_("N", "U", &c_n1, a, b, &info);
    chkxer_("CTFTTP", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);

    s_copy(srnamc_1.srnamt, "CTPTTF", (ftnlen)32, (ftnlen)6);
    infoc_1.infot = 1;
    ctpttf_("/", "U", &c__0, a, b, &info);
    chkxer_("CTPTTF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);
    infoc_1.infot = 2;
    ctpttf_("N", "/", &c__0, a, b, &info);
    chkxer_("CTPTTF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);
    infoc_1.infot = 3;
    ctpttf_("N", "U", &c_n1, a, b, &info);
    chkxer_("CTPTTF", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);

    s_copy(srnamc_1.srnamt, "CTRTTP", (ftnlen)32, (ftnlen)6);
    infoc_1.infot = 1;
    ctrttp_("/", &c__0, a, &c__1, b, &info);
    chkxer_("CTRTTP", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);
    infoc_1.infot = 2;
    ctrttp_("U", &c_n1, a, &c__1, b, &info);
    chkxer_("CTRTTP", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);
    infoc_1.infot = 4;
    ctrttp_("U", &c__0, a, &c__0, b, &info);
    chkxer_("CTRTTP", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);

    s_copy(srnamc_1.srnamt, "CTPTTR", (ftnlen)32, (ftnlen)6);
    infoc_1.infot = 1;
    ctpttr_("/", &c__0, a, b, &c__1, &info);
    chkxer_("CTPTTR", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);
    infoc_1.infot = 2;
    ctpttr_("U", &c_n1, a, b, &c__1, &info);
    chkxer_("CTPTTR", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);
    infoc_1.infot = 5;
    ctpttr_("U", &c__0, a, b, &c__0, &info);
    chkxer_("CTPTTR", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);

    s_copy(srnamc_1.srnamt, "CHFRK ", (ftnlen)32, (ftnlen)6);
    infoc_1.infot = 1;
    chfrk_("/", "U", "N", &c__0, &c__0, &alpha.r, a, &c__1, &beta, b);
    chkxer_("CHFRK ", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);
    infoc_1.infot = 2;
    chfrk_("N", "/", "N", &c__0, &c__0, &alpha.r, a, &c__1, &beta, b);
    chkxer_("CHFRK ", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);
    infoc_1.infot = 3;
    chfrk_("N", "U", "/", &c__0, &c__0, &alpha.r, a, &c__1, &beta, b);
    chkxer_("CHFRK ", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);
    infoc_1.infot = 4;
    chfrk_("N", "U", "N", &c_n1, &c__0, &alpha.r, a, &c__1, &beta, b);
    chkxer_("CHFRK ", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);
    infoc_1.infot = 5;
    chfrk_("N", "U", "N", &c__0, &c_n1, &alpha.r, a, &c__1, &beta, b);
    chkxer_("CHFRK ", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);
    infoc_1.infot = 8;
    chfrk_("N", "U", "N", &c__0, &c__0, &alpha.r, a, &c__0, &beta, b);
    chkxer_("CHFRK ", &infoc_1.infot, &infoc_1.nout, &infoc_1.lerr, &
	    infoc_1.ok);

/*     Print a summary line. */

    if (infoc_1.ok) {
	io___6.ciunit = infoc_1.nout;
	s_wsfe(&io___6);
	e_wsfe();
    } else {
	io___7.ciunit = infoc_1.nout;
	s_wsfe(&io___7);
	e_wsfe();
    }

    return 0;

/*     End of CERRRFP */

} /* cerrrfp_ */