4 CHARACTER*7 SNAMES( NSUBS )
6 DATA snames/
'PSGEMM ',
'PSSYMM ',
'PSSYRK ',
7 $
'PSSYR2K',
'PSTRMM ',
'PSTRSM ',
8 $
'PSGEADD',
'PSTRADD'/
122 INTEGER maxtests, maxgrids, gapmul, realsz, totmem,
124 REAL one, padval, zero, rogue
125 parameter( maxtests = 20, maxgrids = 20, gapmul = 10,
126 $ realsz = 4, totmem = 2000000,
127 $ memsiz = totmem / realsz, zero = 0.0e+0,
128 $ one = 1.0e+0, padval = -9923.0e+0,
129 $ nsubs = 8, rogue = -1.0e+10 )
130 INTEGER block_cyclic_2d_inb, csrc_, ctxt_, dlen_,
131 $ dtype_, imb_, inb_, lld_, mb_, m_, nb_, n_,
133 parameter( block_cyclic_2d_inb = 2, dlen_ = 11,
134 $ dtype_ = 1, ctxt_ = 2, m_ = 3, n_ = 4,
135 $ imb_ = 5, inb_ = 6, mb_ = 7, nb_ = 8,
136 $ rsrc_ = 9, csrc_ = 10, lld_ = 11 )
139 LOGICAL errflg, sof, tee
140 CHARACTER*1 adiagdo, aform, cform, diag, side, transa,
142 INTEGER csrca, csrcb, csrcc, i, ia, iam, iaseed, ib,
143 $ ibseed, ic, icseed, ictxt, igap, imba, imbb,
144 $ imbc, imida, imidb, imidc, inba, inbb, inbc,
145 $ ipa, ipb, ipc, ipg, ipmata, ipmatb, ipmatc,
146 $ iposta, ipostb, ipostc, iprea, ipreb, iprec,
147 $ ipw, iverb, j, ja, jb, jc, k, l, lda, ldb, ldc,
148 $ m, ma, mb, mba, mbb, mbc, mc, memreqd, mpa,
149 $ mpb, mpc, mycol, myrow, n, na, nb, nba, nbb,
150 $ nbc, nc, ncola, ncolb, ncolc, ngrids, nout,
151 $ npcol, nprocs, nprow, nqa, nqb, nqc, nrowa,
152 $ nrowb, nrowc, ntests, offda, offdc, rsrca,
153 $ rsrcb, rsrcc, tskip, tstcnt
154 REAL alpha, beta, scale, thresh
157 LOGICAL bcheck( nsubs ), ccheck( nsubs ),
159 CHARACTER*1 diagval( maxtests ), sideval( maxtests ),
160 $ trnaval( maxtests ), trnbval( maxtests ),
161 $ uploval( maxtests )
163 INTEGER cscaval( maxtests ), cscbval( maxtests ),
164 $ csccval( maxtests ), desca( dlen_ ),
165 $ descar( dlen_ ), descb( dlen_ ),
166 $ descbr( dlen_ ), descc( dlen_ ),
167 $ desccr( dlen_ ), iaval( maxtests ),
168 $ ibval( maxtests ), icval( maxtests ),
169 $ ierr( 6 ), imbaval( maxtests ),
170 $ imbbval( maxtests ), imbcval( maxtests ),
171 $ inbaval( maxtests ), inbbval( maxtests ),
172 $ inbcval( maxtests ), javal( maxtests ),
173 $ jbval( maxtests ), jcval( maxtests )
174 INTEGER kfail( nsubs ), kpass( nsubs ), kskip( nsubs ),
175 $ ktests( nsubs ), kval( maxtests ),
176 $ maval( maxtests ), mbaval( maxtests ),
177 $ mbbval( maxtests ), mbcval( maxtests ),
178 $ mbval( maxtests ), mcval( maxtests ),
179 $ mval( maxtests ), naval( maxtests ),
180 $ nbaval( maxtests ), nbbval( maxtests ),
181 $ nbcval( maxtests ), nbval( maxtests ),
182 $ ncval( maxtests ), nval( maxtests ),
183 $ pval( maxtests ), qval( maxtests ),
184 $ rscaval( maxtests ), rscbval( maxtests ),
185 $ rsccval( maxtests )
189 EXTERNAL blacs_exit, blacs_get, blacs_gridexit,
190 $ blacs_gridinfo, blacs_gridinit, blacs_pinfo,
196 $ pssymm, pssyr2k, pssyrk, pstradd, pstrmm,
204 INTRINSIC abs,
max, mod, real
207 CHARACTER*7 snames( nsubs )
210 COMMON /snamec/snames
211 COMMON /infoc/info, nblog
212 COMMON /pberrorc/nout, abrtflg
215 DATA bcheck/.true., .true., .false., .true., .true.,
216 $ .true., .false., .false./
217 DATA ccheck/.true., .true., .true., .true., .false.,
218 $ .false., .true., .true./
255 CALL blacs_pinfo( iam, nprocs )
257 $ trnaval, trnbval, uploval, mval, nval,
258 $ kval, maval, naval, imbaval, mbaval,
259 $ inbaval, nbaval, rscaval, cscaval, iaval,
260 $ javal, mbval, nbval, imbbval, mbbval,
261 $ inbbval, nbbval, rscbval, cscbval, ibval,
262 $ jbval, mcval, ncval, imbcval, mbcval,
263 $ inbcval, nbcval, rsccval, csccval, icval,
264 $ jcval, maxtests, ngrids, pval, maxgrids,
265 $ qval, maxgrids, nblog, ltest, sof, tee, iam,
266 $ igap, iverb, nprocs, thresh, alpha, beta,
270 WRITE( nout, fmt = 9976 )
271 WRITE( nout, fmt = * )
289 IF( nprow.LT.1 )
THEN
291 $
WRITE( nout, fmt = 9999 )
'GRID SIZE',
'NPROW', nprow
293 ELSE IF( npcol.LT.1 )
THEN
295 $
WRITE( nout, fmt = 9999 )
'GRID SIZE',
'NPCOL', npcol
297 ELSE IF( nprow*npcol.GT.nprocs )
THEN
299 $
WRITE( nout, fmt = 9998 ) nprow*npcol, nprocs
303 IF( ierr( 1 ).GT.0 )
THEN
305 $
WRITE( nout, fmt = 9997 )
'GRID'
312 CALL blacs_get( -1, 0, ictxt )
313 CALL blacs_gridinit( ictxt,
'Row-major', nprow, npcol )
314 CALL blacs_gridinfo( ictxt, nprow, npcol, myrow, mycol )
319 IF( myrow.GE.nprow .OR. mycol.GE.npcol )
330 transa = trnaval( j )
331 transb = trnbval( j )
375 WRITE( nout, fmt = * )
376 WRITE( nout, fmt = 9996 ) tstcnt, nprow, npcol
377 WRITE( nout, fmt = * )
379 WRITE( nout, fmt = 9995 )
380 WRITE( nout, fmt = 9994 )
381 WRITE( nout, fmt = 9995 )
382 WRITE( nout, fmt = 9993 ) m, n, k, side, uplo, transa,
385 WRITE( nout, fmt = 9995 )
386 WRITE( nout, fmt = 9992 )
387 WRITE( nout, fmt = 9995 )
388 WRITE( nout, fmt = 9991 ) ia, ja, ma, na, imba, inba,
389 $ mba, nba, rsrca, csrca
391 WRITE( nout, fmt = 9995 )
392 WRITE( nout, fmt = 9990 )
393 WRITE( nout, fmt = 9995 )
394 WRITE( nout, fmt = 9991 ) ib, jb, mb, nb, imbb, inbb,
395 $ mbb, nbb, rsrcb, csrcb
397 WRITE( nout, fmt = 9995 )
398 WRITE( nout, fmt = 9989 )
399 WRITE( nout, fmt = 9995 )
400 WRITE( nout, fmt = 9991 ) ic, jc, mc, nc, imbc, inbc,
401 $ mbc, nbc, rsrcc, csrcc
403 WRITE( nout, fmt = 9995 )
409 IF( .NOT.
lsame( side,
'L' ).AND.
410 $ .NOT.
lsame( side,
'R' ) )
THEN
412 $
WRITE( nout, fmt = 9997 )
'SIDE'
417 IF( .NOT.
lsame( uplo,
'U' ).AND.
418 $ .NOT.
lsame( uplo,
'L' ) )
THEN
420 $
WRITE( nout, fmt = 9997 )
'UPLO'
425 IF( .NOT.
lsame( transa,
'N' ).AND.
426 $ .NOT.
lsame( transa,
'T' ).AND.
427 $ .NOT.
lsame( transa,
'C' ) )
THEN
429 $
WRITE( nout, fmt = 9997 )
'TRANSA'
434 IF( .NOT.
lsame( transb,
'N' ).AND.
435 $ .NOT.
lsame( transb,
'T' ).AND.
436 $ .NOT.
lsame( transb,
'C' ) )
THEN
438 $
WRITE( nout, fmt = 9997 )
'TRANSB'
443 IF( .NOT.
lsame( diag ,
'U' ).AND.
444 $ .NOT.
lsame( diag ,
'N' ) )
THEN
446 $
WRITE( nout, fmt = 9997 )
'DIAG'
454 $ block_cyclic_2d_inb, ma, na, imba, inba,
455 $ mba, nba, rsrca, csrca, mpa, nqa, iprea,
456 $ imida, iposta, igap, gapmul, ierr( 1 ) )
459 $ block_cyclic_2d_inb, mb, nb, imbb, inbb,
460 $ mbb, nbb, rsrcb, csrcb, mpb, nqb, ipreb,
461 $ imidb, ipostb, igap, gapmul, ierr( 2 ) )
464 $ block_cyclic_2d_inb, mc, nc, imbc, inbc,
465 $ mbc, nbc, rsrcc, csrcc, mpc, nqc, iprec,
466 $ imidc, ipostc, igap, gapmul, ierr( 3 ) )
468 IF( ierr( 1 ).GT.0 .OR. ierr( 2 ).GT.0 .OR.
469 $ ierr( 3 ).GT.0 )
THEN
482 ipb = ipa + desca( lld_ )*nqa + iposta + ipreb
483 ipc = ipb + descb( lld_ )*nqb + ipostb + iprec
484 ipmata = ipc + descc( lld_ )*nqc + ipostc
485 ipmatb = ipmata + ma*na
486 ipmatc = ipmatb + mb*nb
487 ipg = ipmatc +
max( mb*nb, mc*nc )
494 ipw = ipg + 2*
max( m,
max( n, k ) )
495 memreqd = ipw - 1 +
max(
max(
max( imba, mba ),
496 $
max( imbb, mbb ) ),
499 IF( memreqd.GT.memsiz )
THEN
501 $
WRITE( nout, fmt = 9987 ) memreqd*realsz
507 CALL igsum2d( ictxt,
'All',
' ', 1, 1, ierr, 1, -1, 0 )
509 IF( ierr( 1 ).GT.0 )
THEN
511 $
WRITE( nout, fmt = 9988 )
522 IF( .NOT.ltest( l ) )
526 WRITE( nout, fmt = * )
527 WRITE( nout, fmt = 9986 ) snames( l )
538 IF(
lsame( transa,
'N' ) )
THEN
545 IF(
lsame( transb,
'N' ) )
THEN
553 ELSE IF( l.EQ.2 )
THEN
561 IF(
lsame( side,
'L' ) )
THEN
569 ELSE IF( l.EQ.3 )
THEN
575 IF(
lsame( transa,
'N' ) )
THEN
585 ELSE IF( l.EQ.4 )
THEN
591 IF(
lsame( transa,
'N' ) )
THEN
603 ELSE IF( l.EQ.5 .OR. l.EQ.6 )
THEN
606 IF(
lsame( side,
'L' ) )
THEN
616 ELSE IF( l.EQ.7 .OR. l.EQ.8 )
THEN
620 IF(
lsame( transa,
'N' ) )
THEN
636 CALL pmdimchk( ictxt, nout, nrowa, ncola,
'A', ia, ja,
638 CALL pmdimchk( ictxt, nout, nrowb, ncolb,
'B', ib, jb,
640 CALL pmdimchk( ictxt, nout, nrowc, ncolc,
'C', ic, jc,
643 IF( ierr( 1 ).NE.0 .OR. ierr( 2 ).NE.0 .OR.
644 $ ierr( 3 ).NE.0 )
THEN
645 kskip( l ) = kskip( l ) + 1
661 ELSE IF( l.EQ.3 .OR. l.EQ.4 )
THEN
671 ELSE IF( ( l.EQ.6 ).AND.(
lsame( diag,
'N' ) ) )
THEN
693 CALL pslagen( .false., aform, adiagdo, offda, ma, na,
694 $ 1, 1, desca, iaseed, mem( ipa ),
698 $
CALL pslagen( .false.,
'None',
'No diag', 0, mb, nb,
699 $ 1, 1, descb, ibseed, mem( ipb ),
703 $
CALL pslagen( .false., cform,
'No diag', offdc, mc,
704 $ nc, 1, 1, descc, icseed, mem( ipc ),
709 CALL pb_descset2( descar, ma, na, imba, inba, mba, nba,
710 $ -1, -1, ictxt,
max( 1, ma ) )
711 CALL pslagen( .false., aform, adiagdo, offda, ma, na,
712 $ 1, 1, descar, iaseed, mem( ipmata ),
715 IF( bcheck( l ) )
THEN
717 $ nbb, -1, -1, ictxt,
max( 1, mb ) )
718 CALL pslagen( .false.,
'None',
'No diag', 0, mb, nb,
719 $ 1, 1, descbr, ibseed, mem( ipmatb ),
723 IF( ccheck( l ) )
THEN
726 $ nbc, -1, -1, ictxt,
max( 1, mc ) )
727 CALL pslagen( .false., cform,
'No diag', offdc, mc,
728 $ nc, 1, 1, desccr, icseed, mem( ipmatc ),
736 $ nbb, -1, -1, ictxt,
max( 1, mb ) )
737 CALL pslagen( .false.,
'None',
'No diag', 0, mb, nb,
738 $ 1, 1, desccr, ibseed, mem( ipmatc ),
745 IF( ( l.EQ.2 ).AND.(
max( nrowa, ncola ).GT.1 ) )
THEN
749 IF(
lsame( uplo,
'L' ) )
THEN
753 CALL pslaset(
'Upper', nrowa-1, ncola-1, rogue,
754 $ rogue, mem( ipa ), ia, ja+1, desca )
756 ELSE IF(
lsame( uplo,
'U' ) )
THEN
760 CALL pslaset(
'Lower', nrowa-1, ncola-1, rogue,
761 $ rogue, mem( ipa ), ia+1, ja, desca )
765 ELSE IF( ( ( l.EQ.3 ).OR.( l.EQ.4 ) ).AND.
766 $ (
max( nrowc, ncolc ).GT.1 ) )
THEN
770 IF(
lsame( uplo,
'L' ) )
THEN
774 IF(
max( nrowc, ncolc ).GT.1 )
THEN
775 CALL pslaset(
'Upper', nrowc-1, ncolc-1, rogue,
776 $ rogue, mem( ipc ), ic, jc+1,
778 CALL pb_slaset(
'Upper', nrowc-1, ncolc-1, 0,
780 $ mem( ipmatc+ic-1+jc*ldc ), ldc )
783 ELSE IF(
lsame( uplo,
'U' ) )
THEN
787 IF(
max( nrowc, ncolc ).GT.1 )
THEN
788 CALL pslaset(
'Lower', nrowc-1, ncolc-1, rogue,
789 $ rogue, mem( ipc ), ic+1, jc,
791 CALL pb_slaset(
'Lower', nrowc-1, ncolc-1, 0,
793 $ mem( ipmatc+ic+(jc-1)*ldc ),
799 ELSE IF( l.EQ.5 .OR. l.EQ.6 )
THEN
801 IF(
lsame( uplo,
'L' ) )
THEN
805 IF(
lsame( diag,
'N' ) )
THEN
807 IF(
max( nrowa, ncola ).GT.1 )
THEN
808 CALL pslaset(
'Upper', nrowa-1, ncola-1,
809 $ rogue, rogue, mem( ipa ), ia,
811 CALL pb_slaset(
'Upper', nrowa-1, ncola-1, 0,
813 $ mem( ipmata+ia-1+ja*lda ),
819 CALL pslaset(
'Upper', nrowa, ncola, rogue, one,
820 $ mem( ipa ), ia, ja, desca )
821 CALL pb_slaset(
'Upper', nrowa, ncola, 0, zero,
823 $ mem( ipmata+ia-1+(ja-1)*lda ),
826 $ (
max( nrowa, ncola ).GT.1 ) )
THEN
827 scale = one / real(
max( nrowa, ncola ) )
828 CALL pslascal(
'Lower', nrowa-1, ncola-1,
829 $ scale, mem( ipa ), ia+1, ja,
833 $ mem( ipmata+ia+(ja-1)*lda ),
838 ELSE IF(
lsame( uplo,
'U' ) )
THEN
842 IF(
lsame( diag,
'N' ) )
THEN
844 IF(
max( nrowa, ncola ).GT.1 )
THEN
845 CALL pslaset(
'Lower', nrowa-1, ncola-1,
846 $ rogue, rogue, mem( ipa ), ia+1,
848 CALL pb_slaset(
'Lower', nrowa-1, ncola-1, 0,
850 $ mem( ipmata+ia+(ja-1)*lda ),
856 CALL pslaset(
'Lower', nrowa, ncola, rogue, one,
857 $ mem( ipa ), ia, ja, desca )
858 CALL pb_slaset(
'Lower', nrowa, ncola, 0, zero,
860 $ mem( ipmata+ia-1+(ja-1)*lda ),
863 $ (
max( nrowa, ncola ).GT.1 ) )
THEN
864 scale = one / real(
max( nrowa, ncola ) )
865 CALL pslascal(
'Upper', nrowa-1, ncola-1,
866 $ scale, mem( ipa ), ia, ja+1,
870 $ mem( ipmata+ia-1+ja*lda ), lda )
877 ELSE IF( l.EQ.8 )
THEN
879 IF(
lsame( uplo,
'L' ) )
THEN
883 IF(
max( nrowc, ncolc ).GT.1 )
THEN
884 CALL pslaset(
'Upper', nrowc-1, ncolc-1,
885 $ rogue, rogue, mem( ipc ), ic,
887 CALL pb_slaset(
'Upper', nrowc-1, ncolc-1, 0,
889 $ mem( ipmatc+ic-1+jc*ldc ), ldc )
892 ELSE IF(
lsame( uplo,
'U' ) )
THEN
896 IF(
max( nrowc, ncolc ).GT.1 )
THEN
897 CALL pslaset(
'Lower', nrowc-1, ncolc-1,
898 $ rogue, rogue, mem( ipc ), ic+1,
900 CALL pb_slaset(
'Lower', nrowc-1, ncolc-1, 0,
902 $ mem( ipmatc+ic+(jc-1)*ldc ),
912 CALL pb_sfillpad( ictxt, mpa, nqa, mem( ipa-iprea ),
913 $ desca( lld_ ), iprea, iposta, padval )
915 IF( bcheck( l ) )
THEN
916 CALL pb_sfillpad( ictxt, mpb, nqb, mem( ipb-ipreb ),
917 $ descb( lld_ ), ipreb, ipostb,
921 IF( ccheck( l ) )
THEN
922 CALL pb_sfillpad( ictxt, mpc, nqc, mem( ipc-iprec ),
923 $ descc( lld_ ), iprec, ipostc,
930 CALL pschkarg3( ictxt, nout, snames( l ), side, uplo,
931 $ transa, transb, diag, m, n, k, alpha, ia,
932 $ ja, desca, ib, jb, descb, beta, ic, jc,
937 IF( iverb.EQ.2 )
THEN
938 CALL pb_pslaprnt( nrowa, ncola, mem( ipa ), ia, ja,
940 $
'PARALLEL_INITIAL_A', nout,
942 ELSE IF( iverb.GE.3 )
THEN
944 $ 0, 0,
'PARALLEL_INITIAL_A', nout,
948 IF( bcheck( l ) )
THEN
949 IF( iverb.EQ.2 )
THEN
950 CALL pb_pslaprnt( nrowb, ncolb, mem( ipb ), ib, jb,
952 $
'PARALLEL_INITIAL_B', nout,
954 ELSE IF( iverb.GE.3 )
THEN
956 $ 0, 0,
'PARALLEL_INITIAL_B', nout,
961 IF( ccheck( l ) )
THEN
962 IF( iverb.EQ.2 )
THEN
963 CALL pb_pslaprnt( nrowc, ncolc, mem( ipc ), ic, jc,
965 $
'PARALLEL_INITIAL_C', nout,
967 ELSE IF( iverb.GE.3 )
THEN
969 $ 0, 0,
'PARALLEL_INITIAL_C', nout,
981 CALL psgemm( transa, transb, m, n, k, alpha,
982 $ mem( ipa ), ia, ja, desca, mem( ipb ),
983 $ ib, jb, descb, beta, mem( ipc ), ic, jc,
986 ELSE IF( l.EQ.2 )
THEN
990 CALL pssymm( side, uplo, m, n, alpha, mem( ipa ), ia,
991 $ ja, desca, mem( ipb ), ib, jb, descb,
992 $ beta, mem( ipc ), ic, jc, descc )
994 ELSE IF( l.EQ.3 )
THEN
998 CALL pssyrk( uplo, transa, n, k, alpha, mem( ipa ),
999 $ ia, ja, desca, beta, mem( ipc ), ic, jc,
1002 ELSE IF( l.EQ.4 )
THEN
1006 CALL pssyr2k( uplo, transa, n, k, alpha, mem( ipa ),
1007 $ ia, ja, desca, mem( ipb ), ib, jb,
1008 $ descb, beta, mem( ipc ), ic, jc,
1011 ELSE IF( l.EQ.5 )
THEN
1015 CALL pstrmm( side, uplo, transa, diag, m, n, alpha,
1016 $ mem( ipa ), ia, ja, desca, mem( ipb ),
1019 ELSE IF( l.EQ.6 )
THEN
1023 CALL pstrsm( side, uplo, transa, diag, m, n, alpha,
1024 $ mem( ipa ), ia, ja, desca, mem( ipb ),
1028 ELSE IF( l.EQ.7 )
THEN
1032 CALL psgeadd( transa, m, n, alpha, mem( ipa ), ia, ja,
1033 $ desca, beta, mem( ipc ), ic, jc, descc )
1035 ELSE IF( l.EQ.8 )
THEN
1039 CALL pstradd( uplo, transa, m, n, alpha, mem( ipa ),
1040 $ ia, ja, desca, beta, mem( ipc ), ic, jc,
1047 IF( info.NE.0 )
THEN
1048 kskip( l ) = kskip( l ) + 1
1050 $
WRITE( nout, fmt = 9974 ) info
1057 $ mem( ipa-iprea ), desca( lld_ ),
1058 $ iprea, iposta, padval )
1060 IF( bcheck( l ) )
THEN
1062 $ mem( ipb-ipreb ), descb( lld_ ),
1063 $ ipreb, ipostb, padval )
1066 IF( ccheck( l ) )
THEN
1068 $ mem( ipc-iprec ), descc( lld_ ),
1069 $ iprec, ipostc, padval )
1075 $ transb, diag, m, n, k, alpha,
1076 $ mem( ipmata ), mem( ipa ), ia, ja,
1077 $ desca, mem( ipmatb ), mem( ipb ),
1078 $ ib, jb, descb, beta, mem( ipmatc ),
1079 $ mem( ipc ), ic, jc, descc, thresh,
1080 $ rogue, mem( ipg ), info )
1081 IF( mod( info, 2 ).EQ.1 )
THEN
1083 ELSE IF( mod( info / 2, 2 ).EQ.1 )
THEN
1085 ELSE IF( mod( info / 4, 2 ).EQ.1 )
THEN
1087 ELSE IF( info.NE.0 )
THEN
1096 CALL pschkarg3( ictxt, nout, snames( l ), side, uplo,
1097 $ transa, transb, diag, m, n, k, alpha, ia,
1098 $ ja, desca, ib, jb, descb, beta, ic, jc,
1103 CALL pschkmout( nrowa, ncola, mem( ipmata ),
1104 $ mem( ipa ), ia, ja, desca, ierr( 4 ) )
1105 IF( ierr( 4 ).NE.0 )
THEN
1107 $
WRITE( nout, fmt = 9983 )
'PARALLEL_A',
1111 IF( bcheck( l ) )
THEN
1112 CALL pschkmout( nrowb, ncolb, mem( ipmatb ),
1113 $ mem( ipb ), ib, jb, descb, ierr( 5 ) )
1114 IF( ierr( 5 ).NE.0 )
THEN
1116 $
WRITE( nout, fmt = 9983 )
'PARALLEL_B',
1121 IF( ccheck( l ) )
THEN
1122 CALL pschkmout( nrowc, ncolc, mem( ipmatc ),
1123 $ mem( ipc ), ic, jc, descc, ierr( 6 ) )
1124 IF( ierr( 6 ).NE.0 )
THEN
1126 $
WRITE( nout, fmt = 9983 )
'PARALLEL_C',
1133 IF( info.NE.0 .OR. ierr( 1 ).NE.0 .OR.
1134 $ ierr( 2 ).NE.0 .OR. ierr( 3 ).NE.0 .OR.
1135 $ ierr( 4 ).NE.0 .OR. ierr( 5 ).NE.0 .OR.
1136 $ ierr( 6 ).NE.0 )
THEN
1137 kfail( l ) = kfail( l ) + 1
1140 $
WRITE( nout, fmt = 9985 ) snames( l )
1142 kpass( l ) = kpass( l ) + 1
1144 $
WRITE( nout, fmt = 9984 ) snames( l )
1149 IF( iverb.GE.1 .AND. errflg )
THEN
1150 IF( ierr( 4 ).NE.0 .OR. iverb.GE.3 )
THEN
1151 CALL psmprnt( ictxt, nout, ma, na, mem( ipmata ),
1152 $ lda, 0, 0,
'SERIAL_A' )
1153 CALL pb_pslaprnt( ma, na, mem( ipa ), 1, 1, desca,
1154 $ 0, 0,
'PARALLEL_A', nout,
1156 ELSE IF( ierr( 1 ).NE.0 )
THEN
1157 IF( ( nrowa.GT.0 ).AND.( ncola.GT.0 ) )
1158 $
CALL psmprnt( ictxt, nout, nrowa, ncola,
1159 $ mem( ipmata+ia-1+(ja-1)*lda ),
1160 $ lda, 0, 0,
'SERIAL_A' )
1161 CALL pb_pslaprnt( nrowa, ncola, mem( ipa ), ia, ja,
1162 $ desca, 0, 0,
'PARALLEL_A', nout,
1165 IF( bcheck( l ) )
THEN
1166 IF( ierr( 5 ).NE.0 .OR. iverb.GE.3 )
THEN
1167 CALL psmprnt( ictxt, nout, mb, nb,
1168 $ mem( ipmatb ), ldb, 0, 0,
1171 $ descb, 0, 0,
'PARALLEL_B',
1172 $ nout, mem( ipmatb ) )
1173 ELSE IF( ierr( 2 ).NE.0 )
THEN
1174 IF( ( nrowb.GT.0 ).AND.( ncolb.GT.0 ) )
1175 $
CALL psmprnt( ictxt, nout, nrowb, ncolb,
1176 $ mem( ipmatb+ib-1+(jb-1)*ldb ),
1177 $ ldb, 0, 0,
'SERIAL_B' )
1179 $ jb, descb, 0, 0,
'PARALLEL_B',
1180 $ nout, mem( ipmatb ) )
1183 IF( ccheck( l ) )
THEN
1184 IF( ierr( 6 ).NE.0 .OR. iverb.GE.3 )
THEN
1185 CALL psmprnt( ictxt, nout, mc, nc,
1186 $ mem( ipmatc ), ldc, 0, 0,
1189 $ descc, 0, 0,
'PARALLEL_C',
1190 $ nout, mem( ipmatc ) )
1191 ELSE IF( ierr( 3 ).NE.0 )
THEN
1192 IF( ( nrowb.GT.0 ).AND.( ncolb.GT.0 ) )
1193 $
CALL psmprnt( ictxt, nout, nrowc, ncolc,
1194 $ mem( ipmatc+ic-1+(jc-1)*ldc ),
1195 $ ldc, 0, 0,
'SERIAL_C' )
1197 $ jc, descc, 0, 0,
'PARALLEL_C',
1198 $ nout, mem( ipmatc ) )
1205 IF( sof.AND.errflg )
1210 40
IF( iam.EQ.0 )
THEN
1211 WRITE( nout, fmt = * )
1212 WRITE( nout, fmt = 9982 ) j
1217 CALL blacs_gridexit( ictxt )
1228 IF( ltest( i ) )
THEN
1229 kskip( i ) = kskip( i ) + tskip
1230 ktests( i ) = kskip( i ) + kfail( i ) + kpass( i )
1237 WRITE( nout, fmt = * )
1238 WRITE( nout, fmt = 9978 )
1239 WRITE( nout, fmt = * )
1240 WRITE( nout, fmt = 9980 )
1241 WRITE( nout, fmt = 9979 )
1244 WRITE( nout, fmt = 9981 )
'|', snames( i ), ktests( i ),
1245 $ kpass( i ), kfail( i ), kskip( i )
1247 WRITE( nout, fmt = * )
1248 WRITE( nout, fmt = 9977 )
1249 WRITE( nout, fmt = * )
1253 CALL blacs_exit( 0 )
1255 9999
FORMAT(
'ILLEGAL ', a,
': ', a,
' = ', i10,
1256 $
' should be at least 1' )
1257 9998
FORMAT(
'ILLEGAL GRID: NPROW*NPCOL = ', i4,
1258 $
'. It can be at most', i4 )
1259 9997
FORMAT(
'Bad ', a,
' parameters: going on to next test case.' )
1260 9996
FORMAT( 2x,
'Test number ', i4 ,
' started on a ', i6,
' x ',
1261 $ i6,
' process grid.' )
1262 9995
FORMAT( 2x,
' ------------------------------------------------',
1263 $
'-------------------' )
1264 9994
FORMAT( 2x,
' M N K SIDE UPLO TRANSA ',
1266 9993
FORMAT( 5x,i6,1x,i6,1x,i6,6x,a1,5x,a1,7x,a1,7x,a1,5x,a1 )
1267 9992
FORMAT( 2x,
' IA JA MA NA IMBA INBA',
1268 $
' MBA NBA RSRCA CSRCA' )
1269 9991
FORMAT( 5x,i6,1x,i6,1x,i6,1x,i6,1x,i6,1x,i6,1x,i6,1x,i6,
1271 9990
FORMAT( 2x,
' IB JB MB NB IMBB INBB',
1272 $
' MBB NBB RSRCB CSRCB' )
1273 9989
FORMAT( 2x,
' IC JC MC NC IMBC INBC',
1274 $
' MBC NBC RSRCC CSRCC' )
1275 9988
FORMAT(
'Not enough memory for this test: going on to',
1276 $
' next test case.' )
1277 9987
FORMAT(
'Not enough memory. Need: ', i12 )
1278 9986
FORMAT( 2x,
' Tested Subroutine: ', a )
1279 9985
FORMAT( 2x,
' ***** Computational check: ', a,
' ',
1280 $
' FAILED ',
' *****' )
1281 9984
FORMAT( 2x,
' ***** Computational check: ', a,
' ',
1282 $
' PASSED ',
' *****' )
1283 9983
FORMAT( 2x,
' ***** ERROR ***** Matrix operand ', a,
1284 $
' modified by ', a,
' *****' )
1285 9982
FORMAT( 2x,
'Test number ', i4,
' completed.' )
1286 9981
FORMAT( 2x,a1,2x,a7,8x,i4,6x,i4,5x,i4,4x,i4 )
1287 9980
FORMAT( 2x,
' SUBROUTINE TOTAL TESTS PASSED FAILED ',
1289 9979
FORMAT( 2x,
' ---------- ----------- ------ ------ ',
1291 9978
FORMAT( 2x,
'Testing Summary')
1292 9977
FORMAT( 2x,
'End of Tests.' )
1293 9976
FORMAT( 2x,
'Tests started.' )
1294 9975
FORMAT( 2x,
' ***** ', a,
' has an incorrect value: ',
1296 9974
FORMAT( 2x,
' ***** Operation not supported, error code: ',
1304 SUBROUTINE psbla3tstinfo( SUMMRY, NOUT, NMAT, DIAGVAL, SIDEVAL,
1305 $ TRNAVAL, TRNBVAL, UPLOVAL, MVAL,
1306 $ NVAL, KVAL, MAVAL, NAVAL, IMBAVAL,
1307 $ MBAVAL, INBAVAL, NBAVAL, RSCAVAL,
1308 $ CSCAVAL, IAVAL, JAVAL, MBVAL, NBVAL,
1309 $ IMBBVAL, MBBVAL, INBBVAL, NBBVAL,
1310 $ RSCBVAL, CSCBVAL, IBVAL, JBVAL,
1311 $ MCVAL, NCVAL, IMBCVAL, MBCVAL,
1312 $ INBCVAL, NBCVAL, RSCCVAL, CSCCVAL,
1313 $ ICVAL, JCVAL, LDVAL, NGRIDS, PVAL,
1314 $ LDPVAL, QVAL, LDQVAL, NBLOG, LTEST, SOF,
1315 $ TEE, IAM, IGAP, IVERB, NPROCS, THRESH,
1316 $ ALPHA, BETA, WORK )
1325 INTEGER IAM, IGAP, IVERB, LDPVAL, LDQVAL, LDVAL, NBLOG,
1326 $ NGRIDS, NMAT, NOUT, NPROCS
1327 REAL ALPHA, BETA, THRESH
1330 CHARACTER*( * ) SUMMRY
1331 CHARACTER*1 DIAGVAL( LDVAL ), SIDEVAL( LDVAL ),
1332 $ TRNAVAL( LDVAL ), TRNBVAL( LDVAL ),
1335 INTEGER CSCAVAL( LDVAL ), CSCBVAL( LDVAL ),
1336 $ csccval( ldval ), iaval( ldval ),
1337 $ ibval( ldval ), icval( ldval ),
1338 $ imbaval( ldval ), imbbval( ldval ),
1339 $ imbcval( ldval ), inbaval( ldval ),
1340 $ inbbval( ldval ), inbcval( ldval ),
1341 $ javal( ldval ), jbval( ldval ), jcval( ldval ),
1342 $ kval( ldval ), maval( ldval ), mbaval( ldval ),
1343 $ mbbval( ldval ), mbcval( ldval ),
1344 $ mbval( ldval ), mcval( ldval ), mval( ldval ),
1345 $ naval( ldval ), nbaval( ldval ),
1346 $ nbbval( ldval ), nbcval( ldval ),
1347 $ nbval( ldval ), ncval( ldval ), nval( ldval ),
1348 $ pval( ldpval ), qval( ldqval ),
1349 $ rscaval( ldval ), rscbval( ldval ),
1350 $ rsccval( ldval ), work( * )
1642 PARAMETER ( NIN = 11, nsubs = 8 )
1651 CHARACTER*79 USRINFO
1654 EXTERNAL blacs_abort, blacs_get, blacs_gridexit,
1655 $ blacs_gridinit, blacs_setup,
icopy, igebr2d,
1656 $ igebs2d, sgebr2d, sgebs2d
1663 INTRINSIC char, ichar,
max,
min
1666 CHARACTER*7 SNAMES( NSUBS )
1667 COMMON /SNAMEC/SNAMES
1678 OPEN( nin, file=
'PSBLAS3TST.dat', status=
'OLD' )
1679 READ( nin, fmt = * ) summry
1684 READ( nin, fmt = 9999 ) usrinfo
1688 READ( nin, fmt = * ) summry
1689 READ( nin, fmt = * ) nout
1690 IF( nout.NE.0 .AND. nout.NE.6 )
1691 $
OPEN( nout, file = summry, status =
'UNKNOWN' )
1697 READ( nin, fmt = * ) sof
1701 READ( nin, fmt = * ) tee
1705 READ( nin, fmt = * ) iverb
1706 IF( iverb.LT.0 .OR. iverb.GT.3 )
1711 READ( nin, fmt = * ) igap
1717 READ( nin, fmt = * ) thresh
1723 READ( nin, fmt = * ) nblog
1729 READ( nin, fmt = * ) ngrids
1730 IF( ngrids.LT.1 .OR. ngrids.GT.ldpval )
THEN
1731 WRITE( nout, fmt = 9998 )
'Grids', ldpval
1733 ELSE IF( ngrids.GT.ldqval )
THEN
1734 WRITE( nout, fmt = 9998 )
'Grids', ldqval
1740 READ( nin, fmt = * ) ( pval( i ), i = 1, ngrids )
1741 READ( nin, fmt = * ) ( qval( i ), i = 1, ngrids )
1745 READ( nin, fmt = * ) alpha
1746 READ( nin, fmt = * ) beta
1750 READ( nin, fmt = * ) nmat
1751 IF( nmat.LT.1 .OR. nmat.GT.ldval )
THEN
1752 WRITE( nout, fmt = 9998 )
'Tests', ldval
1758 READ( nin, fmt = * ) ( diagval( i ), i = 1, nmat )
1759 READ( nin, fmt = * ) ( sideval( i ), i = 1, nmat )
1760 READ( nin, fmt = * ) ( trnaval( i ), i = 1, nmat )
1761 READ( nin, fmt = * ) ( trnbval( i ), i = 1, nmat )
1762 READ( nin, fmt = * ) ( uploval( i ), i = 1, nmat )
1763 READ( nin, fmt = * ) ( mval( i ), i = 1, nmat )
1764 READ( nin, fmt = * ) ( nval( i ), i = 1, nmat )
1765 READ( nin, fmt = * ) ( kval( i ), i = 1, nmat )
1766 READ( nin, fmt = * ) ( maval( i ), i = 1, nmat )
1767 READ( nin, fmt = * ) ( naval( i ), i = 1, nmat )
1768 READ( nin, fmt = * ) ( imbaval( i ), i = 1, nmat )
1769 READ( nin, fmt = * ) ( inbaval( i ), i = 1, nmat )
1770 READ( nin, fmt = * ) ( mbaval( i ), i = 1, nmat )
1771 READ( nin, fmt = * ) ( nbaval( i ), i = 1, nmat )
1772 READ( nin, fmt = * ) ( rscaval( i ), i = 1, nmat )
1773 READ( nin, fmt = * ) ( cscaval( i ), i = 1, nmat )
1774 READ( nin, fmt = * ) ( iaval( i ), i = 1, nmat )
1775 READ( nin, fmt = * ) ( javal( i ), i = 1, nmat )
1776 READ( nin, fmt = * ) ( mbval( i ), i = 1, nmat )
1777 READ( nin, fmt = * ) ( nbval( i ), i = 1, nmat )
1778 READ( nin, fmt = * ) ( imbbval( i ), i = 1, nmat )
1779 READ( nin, fmt = * ) ( inbbval( i ), i = 1, nmat )
1780 READ( nin, fmt = * ) ( mbbval( i ), i = 1, nmat )
1781 READ( nin, fmt = * ) ( nbbval( i ), i = 1, nmat )
1782 READ( nin, fmt = * ) ( rscbval( i ), i = 1, nmat )
1783 READ( nin, fmt = * ) ( cscbval( i ), i = 1, nmat )
1784 READ( nin, fmt = * ) ( ibval( i ), i = 1, nmat )
1785 READ( nin, fmt = * ) ( jbval( i ), i = 1, nmat )
1786 READ( nin, fmt = * ) ( mcval( i ), i = 1, nmat )
1787 READ( nin, fmt = * ) ( ncval( i ), i = 1, nmat )
1788 READ( nin, fmt = * ) ( imbcval( i ), i = 1, nmat )
1789 READ( nin, fmt = * ) ( inbcval( i ), i = 1, nmat )
1790 READ( nin, fmt = * ) ( mbcval( i ), i = 1, nmat )
1791 READ( nin, fmt = * ) ( nbcval( i ), i = 1, nmat )
1792 READ( nin, fmt = * ) ( rsccval( i ), i = 1, nmat )
1793 READ( nin, fmt = * ) ( csccval( i ), i = 1, nmat )
1794 READ( nin, fmt = * ) ( icval( i ), i = 1, nmat )
1795 READ( nin, fmt = * ) ( jcval( i ), i = 1, nmat )
1801 ltest( i ) = .false.
1804 READ( nin, fmt = 9996,
END = 50 ) SNAMET, ltestt
1806 IF( snamet.EQ.snames( i ) )
1810 WRITE( nout, fmt = 9995 )snamet
1826 IF( nprocs.LT.1 )
THEN
1829 nprocs =
max( nprocs, pval( i )*qval( i ) )
1831 CALL blacs_setup( iam, nprocs )
1837 CALL blacs_get( -1, 0, ictxt )
1838 CALL blacs_gridinit( ictxt,
'Row-major', 1, nprocs )
1846 CALL sgebs2d( ictxt,
'All',
' ', 1, 1, thresh, 1 )
1847 CALL sgebs2d( ictxt,
'All',
' ', 1, 1, alpha, 1 )
1848 CALL sgebs2d( ictxt,
'All',
' ', 1, 1, beta, 1 )
1853 CALL igebs2d( ictxt,
'All',
' ', 3, 1, work, 3 )
1873 work( i ) = ichar( diagval( j ) )
1874 work( i+1 ) = ichar( sideval( j ) )
1875 work( i+2 ) = ichar( trnaval( j ) )
1876 work( i+3 ) = ichar( trnbval( j ) )
1877 work( i+4 ) = ichar( uploval( j ) )
1880 CALL icopy( ngrids, pval, 1, work( i ), 1 )
1882 CALL icopy( ngrids, qval, 1, work( i ), 1 )
1884 CALL icopy( nmat, mval, 1, work( i ), 1 )
1886 CALL icopy( nmat, nval, 1, work( i ), 1 )
1888 CALL icopy( nmat, kval, 1, work( i ), 1 )
1890 CALL icopy( nmat, maval, 1, work( i ), 1 )
1892 CALL icopy( nmat, naval, 1, work( i ), 1 )
1894 CALL icopy( nmat, imbaval, 1, work( i ), 1 )
1896 CALL icopy( nmat, inbaval, 1, work( i ), 1 )
1898 CALL icopy( nmat, mbaval, 1, work( i ), 1 )
1900 CALL icopy( nmat, nbaval, 1, work( i ), 1 )
1902 CALL icopy( nmat, rscaval, 1, work( i ), 1 )
1904 CALL icopy( nmat, cscaval, 1, work( i ), 1 )
1906 CALL icopy( nmat, iaval, 1, work( i ), 1 )
1908 CALL icopy( nmat, javal, 1, work( i ), 1 )
1910 CALL icopy( nmat, mbval, 1, work( i ), 1 )
1912 CALL icopy( nmat, nbval, 1, work( i ), 1 )
1914 CALL icopy( nmat, imbbval, 1, work( i ), 1 )
1916 CALL icopy( nmat, inbbval, 1, work( i ), 1 )
1918 CALL icopy( nmat, mbbval, 1, work( i ), 1 )
1920 CALL icopy( nmat, nbbval, 1, work( i ), 1 )
1922 CALL icopy( nmat, rscbval, 1, work( i ), 1 )
1924 CALL icopy( nmat, cscbval, 1, work( i ), 1 )
1926 CALL icopy( nmat, ibval, 1, work( i ), 1 )
1928 CALL icopy( nmat, jbval, 1, work( i ), 1 )
1930 CALL icopy( nmat, mcval, 1, work( i ), 1 )
1932 CALL icopy( nmat, ncval, 1, work( i ), 1 )
1934 CALL icopy( nmat, imbcval, 1, work( i ), 1 )
1936 CALL icopy( nmat, inbcval, 1, work( i ), 1 )
1938 CALL icopy( nmat, mbcval, 1, work( i ), 1 )
1940 CALL icopy( nmat, nbcval, 1, work( i ), 1 )
1942 CALL icopy( nmat, rsccval, 1, work( i ), 1 )
1944 CALL icopy( nmat, csccval, 1, work( i ), 1 )
1946 CALL icopy( nmat, icval, 1, work( i ), 1 )
1948 CALL icopy( nmat, jcval, 1, work( i ), 1 )
1952 IF( ltest( j ) )
THEN
1960 CALL igebs2d( ictxt,
'All',
' ', i, 1, work, i )
1964 WRITE( nout, fmt = 9999 )
'Level 3 PBLAS testing program.'
1965 WRITE( nout, fmt = 9999 ) usrinfo
1966 WRITE( nout, fmt = * )
1967 WRITE( nout, fmt = 9999 )
1968 $
'Tests of the real single precision '//
1970 WRITE( nout, fmt = * )
1971 WRITE( nout, fmt = 9993 ) nmat
1972 WRITE( nout, fmt = 9979 ) nblog
1973 WRITE( nout, fmt = 9992 ) ngrids
1974 WRITE( nout, fmt = 9990 )
1975 $
'P', ( pval(i), i = 1,
min(ngrids, 5) )
1977 $
WRITE( nout, fmt = 9991 ) ( pval(i), i = 6,
1978 $
min( 10, ngrids ) )
1980 $
WRITE( nout, fmt = 9991 ) ( pval(i), i = 11,
1981 $
min( 15, ngrids ) )
1983 $
WRITE( nout, fmt = 9991 ) ( pval(i), i = 16, ngrids )
1984 WRITE( nout, fmt = 9990 )
1985 $
'Q', ( qval(i), i = 1,
min(ngrids, 5) )
1987 $
WRITE( nout, fmt = 9991 ) ( qval(i), i = 6,
1988 $
min( 10, ngrids ) )
1990 $
WRITE( nout, fmt = 9991 ) ( qval(i), i = 11,
1991 $
min( 15, ngrids ) )
1993 $
WRITE( nout, fmt = 9991 ) ( qval(i), i = 16, ngrids )
1994 WRITE( nout, fmt = 9988 ) sof
1995 WRITE( nout, fmt = 9987 ) tee
1996 WRITE( nout, fmt = 9983 ) igap
1997 WRITE( nout, fmt = 9986 ) iverb
1998 WRITE( nout, fmt = 9980 ) thresh
1999 WRITE( nout, fmt = 9982 ) alpha
2000 WRITE( nout, fmt = 9981 ) beta
2001 IF( ltest( 1 ) )
THEN
2002 WRITE( nout, fmt = 9985 ) snames( 1 ),
' ... Yes'
2004 WRITE( nout, fmt = 9985 ) snames( 1 ),
' ... No '
2007 IF( ltest( i ) )
THEN
2008 WRITE( nout, fmt = 9984 ) snames( i ),
' ... Yes'
2010 WRITE( nout, fmt = 9984 ) snames( i ),
' ... No '
2013 WRITE( nout, fmt = 9994 ) eps
2014 WRITE( nout, fmt = * )
2021 $
CALL blacs_setup( iam, nprocs )
2026 CALL blacs_get( -1, 0, ictxt )
2027 CALL blacs_gridinit( ictxt,
'Row-major', 1, nprocs )
2033 CALL sgebr2d( ictxt,
'All',
' ', 1, 1, thresh, 1, 0, 0 )
2034 CALL sgebr2d( ictxt,
'All',
' ', 1, 1, alpha, 1, 0, 0 )
2035 CALL sgebr2d( ictxt,
'All',
' ', 1, 1, beta, 1, 0, 0 )
2037 CALL igebr2d( ictxt,
'All',
' ', 3, 1, work, 3, 0, 0 )
2042 i = 2*ngrids + 38*nmat + nsubs + 4
2043 CALL igebr2d( ictxt,
'All',
' ', i, 1, work, i, 0, 0 )
2046 IF( work( i ).EQ.1 )
THEN
2052 IF( work( i ).EQ.1 )
THEN
2063 diagval( j ) = char( work( i ) )
2064 sideval( j ) = char( work( i+1 ) )
2065 trnaval( j ) = char( work( i+2 ) )
2066 trnbval( j ) = char( work( i+3 ) )
2067 uploval( j ) = char( work( i+4 ) )
2070 CALL icopy( ngrids, work( i ), 1, pval, 1 )
2072 CALL icopy( ngrids, work( i ), 1, qval, 1 )
2074 CALL icopy( nmat, work( i ), 1, mval, 1 )
2076 CALL icopy( nmat, work( i ), 1, nval, 1 )
2078 CALL icopy( nmat, work( i ), 1, kval, 1 )
2080 CALL icopy( nmat, work( i ), 1, maval, 1 )
2082 CALL icopy( nmat, work( i ), 1, naval, 1 )
2084 CALL icopy( nmat, work( i ), 1, imbaval, 1 )
2086 CALL icopy( nmat, work( i ), 1, inbaval, 1 )
2088 CALL icopy( nmat, work( i ), 1, mbaval, 1 )
2090 CALL icopy( nmat, work( i ), 1, nbaval, 1 )
2092 CALL icopy( nmat, work( i ), 1, rscaval, 1 )
2094 CALL icopy( nmat, work( i ), 1, cscaval, 1 )
2096 CALL icopy( nmat, work( i ), 1, iaval, 1 )
2098 CALL icopy( nmat, work( i ), 1, javal, 1 )
2100 CALL icopy( nmat, work( i ), 1, mbval, 1 )
2102 CALL icopy( nmat, work( i ), 1, nbval, 1 )
2104 CALL icopy( nmat, work( i ), 1, imbbval, 1 )
2106 CALL icopy( nmat, work( i ), 1, inbbval, 1 )
2108 CALL icopy( nmat, work( i ), 1, mbbval, 1 )
2110 CALL icopy( nmat, work( i ), 1, nbbval, 1 )
2112 CALL icopy( nmat, work( i ), 1, rscbval, 1 )
2114 CALL icopy( nmat, work( i ), 1, cscbval, 1 )
2116 CALL icopy( nmat, work( i ), 1, ibval, 1 )
2118 CALL icopy( nmat, work( i ), 1, jbval, 1 )
2120 CALL icopy( nmat, work( i ), 1, mcval, 1 )
2122 CALL icopy( nmat, work( i ), 1, ncval, 1 )
2124 CALL icopy( nmat, work( i ), 1, imbcval, 1 )
2126 CALL icopy( nmat, work( i ), 1, inbcval, 1 )
2128 CALL icopy( nmat, work( i ), 1, mbcval, 1 )
2130 CALL icopy( nmat, work( i ), 1, nbcval, 1 )
2132 CALL icopy( nmat, work( i ), 1, rsccval, 1 )
2134 CALL icopy( nmat, work( i ), 1, csccval, 1 )
2136 CALL icopy( nmat, work( i ), 1, icval, 1 )
2138 CALL icopy( nmat, work( i ), 1, jcval, 1 )
2142 IF( work( i ).EQ.1 )
THEN
2145 ltest( j ) = .false.
2152 CALL blacs_gridexit( ictxt )
2156 120
WRITE( nout, fmt = 9997 )
2158 IF( nout.NE.6 .AND. nout.NE.0 )
2160 CALL blacs_abort( ictxt, 1 )
2165 9998
FORMAT(
' Number of values of ',5a,
' is less than 1 or greater ',
2167 9997
FORMAT(
' Illegal input in file ',40a,
'. Aborting run.' )
2168 9996
FORMAT( a7, l2 )
2169 9995
FORMAT(
' Subprogram name ', a7,
' not recognized',
2170 $ /
' ******* TESTS ABANDONED *******' )
2171 9994
FORMAT( 2x,
'Relative machine precision (eps) is taken to be ',
2173 9993
FORMAT( 2x,
'Number of Tests : ', i6 )
2174 9992
FORMAT( 2x,
'Number of process grids : ', i6 )
2175 9991
FORMAT( 2x,
' : ', 5i6 )
2176 9990
FORMAT( 2x, a1,
' : ', 5i6 )
2177 9988
FORMAT( 2x,
'Stop on failure flag : ', l6 )
2178 9987
FORMAT( 2x,
'Test for error exits flag : ', l6 )
2179 9986
FORMAT( 2x,
'Verbosity level : ', i6 )
2180 9985
FORMAT( 2x,
'Routines to be tested : ', a, a8 )
2181 9984
FORMAT( 2x,
' ', a, a8 )
2182 9983
FORMAT( 2x,
'Leading dimension gap : ', i6 )
2183 9982
FORMAT( 2x,
'Alpha : ', g16.6 )
2184 9981
FORMAT( 2x,
'Beta : ', g16.6 )
2185 9980
FORMAT( 2x,
'Threshold value : ', g16.6 )
2186 9979
FORMAT( 2x,
'Logical block size : ', i6 )
2199 INTEGER INOUT, NPROCS
2270 PARAMETER ( NSUBS = 8 )
2274 INTEGER I, ICTXT, MYCOL, MYROW, NPCOL, NPROW
2277 INTEGER SCODE( NSUBS )
2280 EXTERNAL BLACS_GET, BLACS_GRIDEXIT, BLACS_GRIDINFO,
2281 $ blacs_gridinit,
psdimee, psgeadd, psgemm,
2283 $ pstradd, pstrmm, pstrsm
2288 CHARACTER*7 SNAMES( NSUBS )
2289 COMMON /snamec/snames
2290 COMMON /pberrorc/nout, abrtflg
2293 DATA scode/31, 32, 33, 35, 38, 38, 39, 40/
2300 CALL blacs_get( -1, 0, ictxt )
2301 CALL blacs_gridinit( ictxt,
'Row-major', 1, nprocs )
2302 CALL blacs_gridinfo( ictxt, nprow, npcol, myrow, mycol )
2315 IF( ltest( i ) )
THEN
2316 CALL psoptee( ictxt, nout, psgemm, scode( i ), snames( i ) )
2317 CALL psdimee( ictxt, nout, psgemm, scode( i ), snames( i ) )
2318 CALL psmatee( ictxt, nout, psgemm, scode( i ), snames( i ) )
2324 IF( ltest( i ) )
THEN
2325 CALL psoptee( ictxt, nout, pssymm, scode( i ), snames( i ) )
2326 CALL psdimee( ictxt, nout, pssymm, scode( i ), snames( i ) )
2327 CALL psmatee( ictxt, nout, pssymm, scode( i ), snames( i ) )
2333 IF( ltest( i ) )
THEN
2334 CALL psoptee( ictxt, nout, pssyrk, scode( i ), snames( i ) )
2335 CALL psdimee( ictxt, nout, pssyrk, scode( i ), snames( i ) )
2336 CALL psmatee( ictxt, nout, pssyrk, scode( i ), snames( i ) )
2342 IF( ltest( i ) )
THEN
2343 CALL psoptee( ictxt, nout, pssyr2k, scode( i ), snames( i ) )
2344 CALL psdimee( ictxt, nout, pssyr2k, scode( i ), snames( i ) )
2345 CALL psmatee( ictxt, nout, pssyr2k, scode( i ), snames( i ) )
2351 IF( ltest( i ) )
THEN
2352 CALL psoptee( ictxt, nout, pstrmm, scode( i ), snames( i ) )
2353 CALL psdimee( ictxt, nout, pstrmm, scode( i ), snames( i ) )
2354 CALL psmatee( ictxt, nout, pstrmm, scode( i ), snames( i ) )
2360 IF( ltest( i ) )
THEN
2361 CALL psoptee( ictxt, nout, pstrsm, scode( i ), snames( i ) )
2362 CALL psdimee( ictxt, nout, pstrsm, scode( i ), snames( i ) )
2363 CALL psmatee( ictxt, nout, pstrsm, scode( i ), snames( i ) )
2369 IF( ltest( i ) )
THEN
2370 CALL psoptee( ictxt, nout, psgeadd, scode( i ), snames( i ) )
2371 CALL psdimee( ictxt, nout, psgeadd, scode( i ), snames( i ) )
2372 CALL psmatee( ictxt, nout, psgeadd, scode( i ), snames( i ) )
2378 IF( ltest( i ) )
THEN
2379 CALL psoptee( ictxt, nout, pstradd, scode( i ), snames( i ) )
2380 CALL psdimee( ictxt, nout, pstradd, scode( i ), snames( i ) )
2381 CALL psmatee( ictxt, nout, pstradd, scode( i ), snames( i ) )
2384 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
2385 $
WRITE( nout, fmt = 9999 )
2387 CALL blacs_gridexit( ictxt )
2393 9999
FORMAT( 2x,
'Error-exit tests completed.' )
2400 SUBROUTINE pschkarg3( ICTXT, NOUT, SNAME, SIDE, UPLO, TRANSA,
2401 $ TRANSB, DIAG, M, N, K, ALPHA, IA, JA,
2402 $ DESCA, IB, JB, DESCB, BETA, IC, JC, DESCC,
2411 CHARACTER*1 DIAG, SIDE, TRANSA, TRANSB, UPLO
2412 INTEGER IA, IB, IC, ICTXT, INFO, JA, JB, JC, K, M, N,
2418 INTEGER DESCA( * ), DESCB( * ), DESCC( * )
2534 INTEGER BLOCK_CYCLIC_2D_INB, CSRC_, CTXT_, DLEN_,
2535 $ DTYPE_, IMB_, INB_, LLD_, MB_, M_, NB_, N_,
2537 PARAMETER ( BLOCK_CYCLIC_2D_INB = 2, dlen_ = 11,
2538 $ dtype_ = 1, ctxt_ = 2, m_ = 3, n_ = 4,
2539 $ imb_ = 5, inb_ = 6, mb_ = 7, nb_ = 8,
2540 $ rsrc_ = 9, csrc_ = 10, lld_ = 11 )
2543 CHARACTER*1 DIAGREF, SIDEREF, TRANSAREF, TRANSBREF, UPLOREF
2544 INTEGER I, IAREF, IBREF, ICREF, JAREF, JBREF, JCREF,
2545 $ KREF, MREF, MYCOL, MYROW, NPCOL, NPROW, NREF
2546 REAL ALPHAREF, BETAREF
2549 CHARACTER*15 ARGNAME
2550 INTEGER DESCAREF( DLEN_ ), DESCBREF( DLEN_ ),
2554 EXTERNAL blacs_gridinfo, igsum2d
2567 CALL blacs_gridinfo( ictxt, nprow, npcol, myrow, mycol )
2571 IF( info.EQ.0 )
THEN
2585 descaref( i ) = desca( i )
2590 descbref( i ) = descb( i )
2596 desccref( i ) = descc( i )
2604 IF( .NOT. lsame( diag, diagref ) )
THEN
2605 WRITE( argname, fmt =
'(A)' )
'DIAG'
2606 ELSE IF( .NOT. lsame( side, sideref ) )
THEN
2607 WRITE( argname, fmt =
'(A)' )
'SIDE'
2608 ELSE IF( .NOT. lsame( transa, transaref ) )
THEN
2609 WRITE( argname, fmt =
'(A)' )
'TRANSA'
2610 ELSE IF( .NOT. lsame( transb, transbref ) )
THEN
2611 WRITE( argname, fmt =
'(A)' )
'TRANSB'
2612 ELSE IF( .NOT. lsame( uplo, uploref ) )
THEN
2613 WRITE( argname, fmt =
'(A)' )
'UPLO'
2614 ELSE IF( m.NE.mref )
THEN
2615 WRITE( argname, fmt =
'(A)' )
'M'
2616 ELSE IF( n.NE.nref )
THEN
2617 WRITE( argname, fmt =
'(A)' )
'N'
2618 ELSE IF( k.NE.kref )
THEN
2619 WRITE( argname, fmt =
'(A)' )
'K'
2620 ELSE IF( alpha.NE.alpharef )
THEN
2621 WRITE( argname, fmt =
'(A)' )
'ALPHA'
2622 ELSE IF( ia.NE.iaref )
THEN
2623 WRITE( argname, fmt =
'(A)' )
'IA'
2624 ELSE IF( ja.NE.jaref )
THEN
2625 WRITE( argname, fmt =
'(A)' )
'JA'
2626 ELSE IF( desca( dtype_ ).NE.descaref( dtype_ ) )
THEN
2627 WRITE( argname, fmt =
'(A)' )
'DESCA( DTYPE_ )'
2628 ELSE IF( desca( m_ ).NE.descaref( m_ ) )
THEN
2629 WRITE( argname, fmt =
'(A)' )
'DESCA( M_ )'
2630 ELSE IF( desca( n_ ).NE.descaref( n_ ) )
THEN
2631 WRITE( argname, fmt =
'(A)' )
'DESCA( N_ )'
2632 ELSE IF( desca( imb_ ).NE.descaref( imb_ ) )
THEN
2633 WRITE( argname, fmt =
'(A)' )
'DESCA( IMB_ )'
2634 ELSE IF( desca( inb_ ).NE.descaref( inb_ ) )
THEN
2635 WRITE( argname, fmt =
'(A)' )
'DESCA( INB_ )'
2636 ELSE IF( desca( mb_ ).NE.descaref( mb_ ) )
THEN
2637 WRITE( argname, fmt =
'(A)' )
'DESCA( MB_ )'
2638 ELSE IF( desca( nb_ ).NE.descaref( nb_ ) )
THEN
2639 WRITE( argname, fmt =
'(A)' )
'DESCA( NB_ )'
2640 ELSE IF( desca( rsrc_ ).NE.descaref( rsrc_ ) )
THEN
2641 WRITE( argname, fmt =
'(A)' )
'DESCA( RSRC_ )'
2642 ELSE IF( desca( csrc_ ).NE.descaref( csrc_ ) )
THEN
2643 WRITE( argname, fmt =
'(A)' )
'DESCA( CSRC_ )'
2644 ELSE IF( desca( ctxt_ ).NE.descaref( ctxt_ ) )
THEN
2645 WRITE( argname, fmt =
'(A)' )
'DESCA( CTXT_ )'
2646 ELSE IF( desca( lld_ ).NE.descaref( lld_ ) )
THEN
2647 WRITE( argname, fmt =
'(A)' )
'DESCA( LLD_ )'
2648 ELSE IF( ib.NE.ibref )
THEN
2649 WRITE( argname, fmt =
'(A)' )
'IB'
2650 ELSE IF( jb.NE.jbref )
THEN
2651 WRITE( argname, fmt =
'(A)' )
'JB'
2652 ELSE IF( descb( dtype_ ).NE.descbref( dtype_ ) )
THEN
2653 WRITE( argname, fmt =
'(A)' )
'DESCB( DTYPE_ )'
2654 ELSE IF( descb( m_ ).NE.descbref( m_ ) )
THEN
2655 WRITE( argname, fmt =
'(A)' )
'DESCB( M_ )'
2656 ELSE IF( descb( n_ ).NE.descbref( n_ ) )
THEN
2657 WRITE( argname, fmt =
'(A)' )
'DESCB( N_ )'
2658 ELSE IF( descb( imb_ ).NE.descbref( imb_ ) )
THEN
2659 WRITE( argname, fmt =
'(A)' )
'DESCB( IMB_ )'
2660 ELSE IF( descb( inb_ ).NE.descbref( inb_ ) )
THEN
2661 WRITE( argname, fmt =
'(A)' )
'DESCB( INB_ )'
2662 ELSE IF( descb( mb_ ).NE.descbref( mb_ ) )
THEN
2663 WRITE( argname, fmt =
'(A)' )
'DESCB( MB_ )'
2664 ELSE IF( descb( nb_ ).NE.descbref( nb_ ) )
THEN
2665 WRITE( argname, fmt =
'(A)' )
'DESCB( NB_ )'
2666 ELSE IF( descb( rsrc_ ).NE.descbref( rsrc_ ) )
THEN
2667 WRITE( argname, fmt =
'(A)' )
'DESCB( RSRC_ )'
2668 ELSE IF( descb( csrc_ ).NE.descbref( csrc_ ) )
THEN
2669 WRITE( argname, fmt =
'(A)' )
'DESCB( CSRC_ )'
2670 ELSE IF( descb( ctxt_ ).NE.descbref( ctxt_ ) )
THEN
2671 WRITE( argname, fmt =
'(A)' )
'DESCB( CTXT_ )'
2672 ELSE IF( descb( lld_ ).NE.descbref( lld_ ) )
THEN
2673 WRITE( argname, fmt =
'(A)' )
'DESCB( LLD_ )'
2674 ELSE IF( beta.NE.betaref )
THEN
2675 WRITE( argname, fmt =
'(A)' )
'BETA'
2676 ELSE IF( ic.NE.icref )
THEN
2677 WRITE( argname, fmt =
'(A)' )
'IC'
2678 ELSE IF( jc.NE.jcref )
THEN
2679 WRITE( argname, fmt =
'(A)' )
'JC'
2680 ELSE IF( descc( dtype_ ).NE.desccref( dtype_ ) )
THEN
2681 WRITE( argname, fmt =
'(A)' )
'DESCC( DTYPE_ )'
2682 ELSE IF( descc( m_ ).NE.desccref( m_ ) )
THEN
2683 WRITE( argname, fmt =
'(A)' )
'DESCC( M_ )'
2684 ELSE IF( descc( n_ ).NE.desccref( n_ ) )
THEN
2685 WRITE( argname, fmt =
'(A)' )
'DESCC( N_ )'
2686 ELSE IF( descc( imb_ ).NE.desccref( imb_ ) )
THEN
2687 WRITE( argname, fmt =
'(A)' )
'DESCC( IMB_ )'
2688 ELSE IF( descc( inb_ ).NE.desccref( inb_ ) )
THEN
2689 WRITE( argname, fmt =
'(A)' )
'DESCC( INB_ )'
2690 ELSE IF( descc( mb_ ).NE.desccref( mb_ ) )
THEN
2691 WRITE( argname, fmt =
'(A)' )
'DESCC( MB_ )'
2692 ELSE IF( descc( nb_ ).NE.desccref( nb_ ) )
THEN
2693 WRITE( argname, fmt =
'(A)' )
'DESCC( NB_ )'
2694 ELSE IF( descc( rsrc_ ).NE.desccref( rsrc_ ) )
THEN
2695 WRITE( argname, fmt =
'(A)' )
'DESCC( RSRC_ )'
2696 ELSE IF( descc( csrc_ ).NE.desccref( csrc_ ) )
THEN
2697 WRITE( argname, fmt =
'(A)' )
'DESCC( CSRC_ )'
2698 ELSE IF( descc( ctxt_ ).NE.desccref( ctxt_ ) )
THEN
2699 WRITE( argname, fmt =
'(A)' )
'DESCC( CTXT_ )'
2700 ELSE IF( descc( lld_ ).NE.desccref( lld_ ) )
THEN
2701 WRITE( argname, fmt =
'(A)' )
'DESCC( LLD_ )'
2706 CALL igsum2d( ictxt,
'All',
' ', 1, 1, info, 1, -1, 0 )
2708 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
THEN
2710 IF( info.NE.0 )
THEN
2711 WRITE( nout, fmt = 9999 ) argname, sname
2713 WRITE( nout, fmt = 9998 ) sname
2720 9999
FORMAT( 2x,
' ***** Input-only parameter check: ', a,
2721 $
' FAILED changed ', a,
' *****' )
2722 9998
FORMAT( 2x,
' ***** Input-only parameter check: ', a,
2730 SUBROUTINE psblas3tstchk( ICTXT, NOUT, NROUT, SIDE, UPLO, TRANSA,
2731 $ TRANSB, DIAG, M, N, K, ALPHA, A, PA, IA,
2732 $ JA, DESCA, B, PB, IB, JB, DESCB, BETA,
2733 $ C, PC, IC, JC, DESCC, THRESH, ROGUE,
2742 CHARACTER*1 DIAG, SIDE, TRANSA, TRANSB, UPLO
2743 INTEGER IA, IB, IC, ICTXT, INFO, JA, JB, JC, K, M, N,
2745 REAL ALPHA, BETA, ROGUE, THRESH
2748 INTEGER DESCA( * ), DESCB( * ), DESCC( * )
2749 REAL A( * ), B( * ), C( * ), PA( * ), PB( * ),
2750 $ PC( * ), WORK( * )
2968 PARAMETER ( ONE = 1.0e+0, zero = 0.0e+0 )
2969 INTEGER BLOCK_CYCLIC_2D_INB, CSRC_, CTXT_, DLEN_,
2970 $ DTYPE_, IMB_, INB_, LLD_, MB_, M_, NB_, N_,
2972 PARAMETER ( BLOCK_CYCLIC_2D_INB = 2, dlen_ = 11,
2973 $ dtype_ = 1, ctxt_ = 2, m_ = 3, n_ = 4,
2974 $ imb_ = 5, inb_ = 6, mb_ = 7, nb_ = 8,
2975 $ rsrc_ = 9, csrc_ = 10, lld_ = 11 )
2978 INTEGER I, IPG, MYCOL, MYROW, NPCOL, NPROW
2985 EXTERNAL BLACS_GRIDINFO, PB_SLASET, PSCHKMIN, PSMMCH,
2998 IF( ( m.LE.0 ).OR.( n.LE.0 ) )
3003 CALL blacs_gridinfo( ictxt, nprow, npcol, myrow, mycol )
3008 ipg =
max( m,
max( n, k ) ) + 1
3010 IF( nrout.EQ.1 )
THEN
3016 CALL psmmch( ictxt, transa, transb, m, n, k, alpha, a, ia, ja,
3017 $ desca, b, ib, jb, descb, beta, c, pc, ic, jc,
3018 $ descc, work, work( ipg ), err, ierr( 3 ) )
3020 IF( ierr( 3 ).NE.0 )
THEN
3021 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3022 $
WRITE( nout, fmt = 9998 )
3023 ELSE IF( err.GT.thresh )
THEN
3024 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3025 $
WRITE( nout, fmt = 9997 ) err
3030 IF( lsame( transa,
'N' ) )
THEN
3031 CALL pschkmin( err, m, k, a, pa, ia, ja, desca, ierr( 1 ) )
3033 CALL pschkmin( err, k, m, a, pa, ia, ja, desca, ierr( 1 ) )
3035 IF( lsame( transb,
'N' ) )
THEN
3036 CALL pschkmin( err, k, n, b, pb, ib, jb, descb, ierr( 2 ) )
3038 CALL pschkmin( err, n, k, b, pb, ib, jb, descb, ierr( 2 ) )
3041 ELSE IF( nrout.EQ.2 )
THEN
3047 IF( lsame( side,
'L' ) )
THEN
3048 CALL psmmch( ictxt,
'No transpose',
'No transpose', m, n, m,
3049 $ alpha, a, ia, ja, desca, b, ib, jb, descb,
3050 $ beta, c, pc, ic, jc, descc, work, work( ipg ),
3053 CALL psmmch( ictxt,
'No transpose',
'No transpose', m, n, n,
3054 $ alpha, b, ib, jb, descb, a, ia, ja, desca,
3055 $ beta, c, pc, ic, jc, descc, work, work( ipg ),
3059 IF( ierr( 3 ).NE.0 )
THEN
3060 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3061 $
WRITE( nout, fmt = 9998 )
3062 ELSE IF( err.GT.thresh )
THEN
3063 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3064 $
WRITE( nout, fmt = 9997 ) err
3069 IF( lsame( uplo,
'L' ) )
THEN
3070 IF( lsame( side,
'L' ) )
THEN
3071 CALL pb_slaset(
'Upper', m-1, m-1, 0, rogue, rogue,
3072 $ a( ia+ja*desca( m_ ) ), desca( m_ ) )
3074 CALL pb_slaset(
'Upper', n-1, n-1, 0, rogue, rogue,
3075 $ a( ia+ja*desca( m_ ) ), desca( m_ ) )
3078 IF( lsame( side,
'L' ) )
THEN
3079 CALL pb_slaset(
'Lower', m-1, m-1, 0, rogue, rogue,
3080 $ a( ia+1+(ja-1)*desca( m_ ) ),
3083 CALL pb_slaset(
'Lower', n-1, n-1, 0, rogue, rogue,
3084 $ a( ia+1+(ja-1)*desca( m_ ) ),
3089 IF( lsame( side,
'L' ) )
THEN
3090 CALL pschkmin( err, m, m, a, pa, ia, ja, desca, ierr( 1 ) )
3092 CALL pschkmin( err, n, n, a, pa, ia, ja, desca, ierr( 1 ) )
3094 CALL pschkmin( err, m, n, b, pb, ib, jb, descb, ierr( 2 ) )
3096 ELSE IF( nrout.EQ.3 )
THEN
3102 IF( lsame( transa,
'N' ) )
THEN
3103 CALL psmmch1( ictxt, uplo,
'No transpose', n, k, alpha, a,
3104 $ ia, ja, desca, beta, c, pc, ic, jc, descc,
3105 $ work, work( ipg ), err, ierr( 3 ) )
3107 CALL psmmch1( ictxt, uplo,
'Transpose', n, k, alpha, a, ia,
3108 $ ja, desca, beta, c, pc, ic, jc, descc, work,
3109 $ work( ipg ), err, ierr( 3 ) )
3112 IF( ierr( 3 ).NE.0 )
THEN
3113 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3114 $
WRITE( nout, fmt = 9998 )
3115 ELSE IF( err.GT.thresh )
THEN
3116 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3117 $
WRITE( nout, fmt = 9997 ) err
3122 IF( lsame( transa,
'N' ) )
THEN
3123 CALL pschkmin( err, n, k, a, pa, ia, ja, desca, ierr( 1 ) )
3125 CALL pschkmin( err, k, n, a, pa, ia, ja, desca, ierr( 1 ) )
3128 ELSE IF( nrout.EQ.4 )
THEN
3134 IF( lsame( transa,
'N' ) )
THEN
3135 CALL psmmch2( ictxt, uplo,
'No transpose', n, k, alpha, a,
3136 $ ia, ja, desca, b, ib, jb, descb, beta, c, pc,
3137 $ ic, jc, descc, work, work( ipg ), err,
3140 CALL psmmch2( ictxt, uplo,
'Transpose', n, k, alpha, a,
3141 $ ia, ja, desca, b, ib, jb, descb, beta, c, pc,
3142 $ ic, jc, descc, work, work( ipg ), err,
3146 IF( ierr( 3 ).NE.0 )
THEN
3147 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3148 $
WRITE( nout, fmt = 9998 )
3149 ELSE IF( err.GT.thresh )
THEN
3150 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3151 $
WRITE( nout, fmt = 9997 ) err
3156 IF( lsame( transa,
'N' ) )
THEN
3157 CALL pschkmin( err, n, k, a, pa, ia, ja, desca, ierr( 1 ) )
3158 CALL pschkmin( err, n, k, b, pb, ib, jb, descb, ierr( 2 ) )
3160 CALL pschkmin( err, k, n, a, pa, ia, ja, desca, ierr( 1 ) )
3161 CALL pschkmin( err, k, n, b, pb, ib, jb, descb, ierr( 2 ) )
3164 ELSE IF( nrout.EQ.5 )
THEN
3170 IF( lsame( side,
'L' ) )
THEN
3171 CALL psmmch( ictxt, transa,
'No transpose', m, n, m,
3172 $ alpha, a, ia, ja, desca, c, ib, jb, descb,
3173 $ zero, b, pb, ib, jb, descb, work,
3174 $ work( ipg ), err, ierr( 2 ) )
3176 CALL psmmch( ictxt,
'No transpose', transa, m, n, n,
3177 $ alpha, c, ib, jb, descb, a, ia, ja, desca,
3178 $ zero, b, pb, ib, jb, descb, work,
3179 $ work( ipg ), err, ierr( 2 ) )
3182 IF( ierr( 2 ).NE.0 )
THEN
3183 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3184 $
WRITE( nout, fmt = 9998 )
3185 ELSE IF( err.GT.thresh )
THEN
3186 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3187 $
WRITE( nout, fmt = 9997 ) err
3192 IF( lsame( side,
'L' ) )
THEN
3193 IF( lsame( uplo,
'L' ) )
THEN
3194 IF( lsame( diag,
'N' ) )
THEN
3195 CALL pb_slaset(
'Upper', m-1, m-1, 0, rogue, rogue,
3196 $ a( ia+ja*desca( m_ ) ), desca( m_ ) )
3198 CALL pb_slaset(
'Upper', m, m, 0, rogue, one,
3199 $ a( ia+(ja-1)*desca( m_ ) ),
3203 IF( lsame( diag,
'N' ) )
THEN
3204 CALL pb_slaset(
'Lower', m-1, m-1, 0, rogue, rogue,
3205 $ a( ia+1+(ja-1)*desca( m_ ) ),
3208 CALL pb_slaset(
'Lower', m, m, 0, rogue, one,
3209 $ a( ia+(ja-1)*desca( m_ ) ),
3213 CALL pschkmin( err, m, m, a, pa, ia, ja, desca, ierr( 1 ) )
3215 IF( lsame( uplo,
'L' ) )
THEN
3216 IF( lsame( diag,
'N' ) )
THEN
3217 CALL pb_slaset(
'Upper', n-1, n-1, 0, rogue, rogue,
3218 $ a( ia+ja*desca( m_ ) ), desca( m_ ) )
3220 CALL pb_slaset(
'Upper', n, n, 0, rogue, one,
3221 $ a( ia+(ja-1)*desca( m_ ) ),
3225 IF( lsame( diag,
'N' ) )
THEN
3226 CALL pb_slaset(
'Lower', n-1, n-1, 0, rogue, rogue,
3227 $ a( ia+1+(ja-1)*desca( m_ ) ),
3230 CALL pb_slaset(
'Lower', n, n, 0, rogue, one,
3231 $ a( ia+(ja-1)*desca( m_ ) ),
3235 CALL pschkmin( err, n, n, a, pa, ia, ja, desca, ierr( 1 ) )
3238 ELSE IF( nrout.EQ.6 )
THEN
3244 CALL strsm( side, uplo, transa, diag, m, n, alpha,
3245 $ a( ia+(ja-1)*desca( m_ ) ), desca( m_ ),
3246 $ b( ib+(jb-1)*descb( m_ ) ), descb( m_ ) )
3247 CALL pstrmm( side, uplo, transa, diag, m, n, alpha, pa, ia, ja,
3248 $ desca, pb, ib, jb, descb )
3249 IF( lsame( side,
'L' ) )
THEN
3250 CALL psmmch( ictxt, transa,
'No transpose', m, n, m, alpha,
3251 $ a, ia, ja, desca, b, ib, jb, descb, zero, c,
3252 $ pb, ib, jb, descb, work, work( ipg ), err,
3255 CALL psmmch( ictxt,
'No transpose', transa, m, n, n, alpha,
3256 $ b, ib, jb, descb, a, ia, ja, desca, zero, c,
3257 $ pb, ib, jb, descb, work, work( ipg ), err,
3261 IF( ierr( 2 ).NE.0 )
THEN
3262 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3263 $
WRITE( nout, fmt = 9998 )
3264 ELSE IF( err.GT.thresh )
THEN
3265 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3266 $
WRITE( nout, fmt = 9997 ) err
3271 IF( lsame( side,
'L' ) )
THEN
3272 IF( lsame( uplo,
'L' ) )
THEN
3273 IF( lsame( diag,
'N' ) )
THEN
3274 CALL pb_slaset(
'Upper', m-1, m-1, 0, rogue, rogue,
3275 $ a( ia+ja*desca( m_ ) ), desca( m_ ) )
3277 CALL pb_slaset(
'Upper', m, m, 0, rogue, one,
3278 $ a( ia+(ja-1)*desca( m_ ) ),
3282 IF( lsame( diag,
'N' ) )
THEN
3283 CALL pb_slaset(
'Lower', m-1, m-1, 0, rogue, rogue,
3284 $ a( ia+1+(ja-1)*desca( m_ ) ),
3287 CALL pb_slaset(
'Lower', m, m, 0, rogue, one,
3288 $ a( ia+(ja-1)*desca( m_ ) ),
3292 CALL pschkmin( err, m, m, a, pa, ia, ja, desca, ierr( 1 ) )
3294 IF( lsame( uplo,
'L' ) )
THEN
3295 IF( lsame( diag,
'N' ) )
THEN
3296 CALL pb_slaset(
'Upper', n-1, n-1, 0, rogue, rogue,
3297 $ a( ia+ja*desca( m_ ) ), desca( m_ ) )
3299 CALL pb_slaset(
'Upper', n, n, 0, rogue, one,
3300 $ a( ia+(ja-1)*desca( m_ ) ),
3304 IF( lsame( diag,
'N' ) )
THEN
3305 CALL pb_slaset(
'Lower', n-1, n-1, 0, rogue, rogue,
3306 $ a( ia+1+(ja-1)*desca( m_ ) ),
3309 CALL pb_slaset(
'Lower', n, n, 0, rogue, one,
3310 $ a( ia+(ja-1)*desca( m_ ) ),
3314 CALL pschkmin( err, n, n, a, pa, ia, ja, desca, ierr( 1 ) )
3316 ELSE IF( nrout.EQ.7 )
THEN
3322 CALL psmmch3(
'All', transa, m, n, alpha, a, ia, ja, desca,
3323 $ beta, c, pc, ic, jc, descc, err, ierr( 3 ) )
3327 IF( lsame( transa,
'N' ) )
THEN
3328 CALL pschkmin( err, m, n, a, pa, ia, ja, desca, ierr( 1 ) )
3330 CALL pschkmin( err, n, m, a, pa, ia, ja, desca, ierr( 1 ) )
3333 ELSE IF( nrout.EQ.8 )
THEN
3339 CALL psmmch3( uplo, transa, m, n, alpha, a, ia, ja, desca,
3340 $ beta, c, pc, ic, jc, descc, err, ierr( 3 ) )
3344 IF( lsame( transa,
'N' ) )
THEN
3345 CALL pschkmin( err, m, n, a, pa, ia, ja, desca, ierr( 1 ) )
3347 CALL pschkmin( err, n, m, a, pa, ia, ja, desca, ierr( 1 ) )
3352 IF( ierr( 1 ).NE.0 )
THEN
3354 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3355 $
WRITE( nout, fmt = 9999 )
'A'
3358 IF( ierr( 2 ).NE.0 )
THEN
3360 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3361 $
WRITE( nout, fmt = 9999 )
'B'
3364 IF( ierr( 3 ).NE.0 )
THEN
3366 IF( myrow.EQ.0 .AND. mycol.EQ.0 )
3367 $
WRITE( nout, fmt = 9999 )
'C'
3370 9999
FORMAT( 2x,
' ***** ERROR: Matrix operand ', a,
3371 $
' is incorrect.' )
3372 9998
FORMAT( 2x,
' ***** FATAL ERROR - Computed result is less ',
3373 $
'than half accurate *****' )
3374 9997
FORMAT( 2x,
' ***** Test completed with maximum test ratio: ',
3375 $ f11.5,
' SUSPECT *****' )