SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ rdbtin()

subroutine rdbtin ( logical  testsdrv,
logical  testbsbr,
logical  testcomb,
logical  testaux,
integer  nprec,
character*1, dimension(*)  prec,
integer  verb,
integer  outnum 
)

Definition at line 1143 of file blacstest.f.

1145*
1146* -- BLACS tester (version 1.0) --
1147* University of Tennessee
1148* December 15, 1994
1149*
1150*
1151* .. Scalar Arguments ..
1152 LOGICAL TESTSDRV, TESTBSBR, TESTCOMB, TESTAUX
1153 INTEGER NPREC, OUTNUM, VERB
1154* ..
1155* .. Array Arguments ..
1156 CHARACTER*1 PREC(*)
1157* ..
1158*
1159* Purpose
1160* =======
1161* RDBTIN: Read and process the top-level input file BT.dat.
1162*
1163* Arguments
1164* =========
1165* TESTSDRV (output) LOGICAL
1166* Run any point-to-point tests?
1167*
1168* TESTBSBR (output) LOGICAL
1169* Run any broadcast tests?
1170*
1171* TESTCOMB (output) LOGICAL
1172* Run any combine-operation tests (e.g. MAX)
1173*
1174* TESTAUX (output) LOGICAL
1175* Run any auxiliary tests?
1176*
1177* NPREC (output) INTEGER
1178* Number of different precisions to test. (up to 5, as determined
1179* by the parameter PRECMAX down in the code.)
1180*
1181* PREC (output) CHARACTER*1 array, dimension 5
1182* Prefix letter of each precision to test, from the set
1183* {'C', 'D', 'I', 'S', 'Z'}
1184*
1185* VERB (output) INTEGER
1186* Output verbosity for this test run.
1187* 0 = Print only "BEGIN [SDRV/BSBR/COMB]", followed by PASSED
1188* or FAILED message
1189* 1 = Same as 0, but also prints out header explaining all tests
1190* to be run.
1191* 2 = Prints out info before and after every individual test.
1192*
1193* OUTNUM (output) INTEGER
1194* Unit number for output file.
1195* ======================================================================
1196*
1197*
1198* .. Parameters ..
1199 INTEGER PRECMAX, VERBMAX, IN
1200 parameter( precmax = 5, verbmax = 2, in = 11 )
1201* ..
1202* .. Local Scalars ..
1203 INTEGER I
1204 CHARACTER*1 CH
1205 LOGICAL READERROR
1206* ..
1207* .. Local Arrays ..
1208 CHARACTER*80 HEADER, OUTNAME
1209* ..
1210* .. External Functions ..
1211 LOGICAL LSAME
1212 EXTERNAL lsame
1213* ..
1214* .. Executable Statements
1215*
1216* Open and read the file blacstest.dat. Expected format is
1217* -----
1218* 'One line of free text intended as a comment for each test run'
1219* integer Unit number of output file
1220* string Name of output file (ignored if unit = 6)
1221* {'T'|'F'} Run any point to point tests?
1222* {'T'|'F'} Run any broadcast tests?
1223* {'T'|'F'} Run any combine-operator tests?
1224* {'T'|'F'} Run the auxiliary tests?
1225* integer Number of precisions to test - up to 99
1226* array of CHAR*1's Specific precisions to test
1227* integer Output verb (1-n, n=most verbose)
1228* integer Number of nodes required by largest test case
1229* -----
1230* Note that the comments to the right of each line are present
1231* in the sample blacstest.dat file included with this
1232* distribution, but they are not required.
1233*
1234* The array of CHAR*1's is expected to have length equal to the
1235* integer in the previous line - if it is shorter, problems may
1236* occur later; if it is longer, the trailing elements will just
1237* be ignored. The verb is expected to be an integer
1238* between 1 and n inclusive and will be set to 1 if outside
1239* this range.
1240*
1241* Only process 0 should be calling this routine
1242*
1243 readerror = .false.
1244 OPEN( unit = in, file = 'bt.dat', status = 'OLD' )
1245 READ(in, *) header
1246 READ(in, *) outnum
1247 READ(in, *) outname
1248*
1249* Open and prepare output file
1250*
1251 IF( outnum.NE.6 .AND. outnum.NE.0 )
1252 $ OPEN( unit = outnum, file = outname, status = 'UNKNOWN' )
1253 WRITE(outnum, *) header
1254*
1255* Determine which tests to run
1256*
1257 READ(in, *) ch
1258 IF( lsame(ch, 'T') ) THEN
1259 testsdrv = .true.
1260 ELSE IF( lsame(ch, 'F') ) THEN
1261 testsdrv = .false.
1262 ELSE
1263 WRITE(outnum, 1000) 'SDRV', ch
1264 readerror = .true.
1265 END IF
1266*
1267 READ(in, *) ch
1268 IF( lsame(ch, 'T') ) THEN
1269 testbsbr = .true.
1270 ELSE IF(lsame( ch, 'F') ) THEN
1271 testbsbr = .false.
1272 ELSE
1273 WRITE(outnum, 1000) 'BSBR', ch
1274 readerror = .true.
1275 END IF
1276*
1277 READ(in, *) ch
1278 IF( lsame(ch, 'T') ) THEN
1279 testcomb = .true.
1280 ELSE IF( lsame(ch, 'F') ) THEN
1281 testcomb = .false.
1282 ELSE
1283 WRITE(outnum, 1000) 'COMB', ch
1284 readerror = .true.
1285 END IF
1286*
1287 READ(in, *) ch
1288 IF( lsame(ch, 'T') ) THEN
1289 testaux = .true.
1290 ELSE IF( lsame(ch, 'F') ) THEN
1291 testaux = .false.
1292 ELSE
1293 WRITE(outnum, 1000) 'AUX ', ch
1294 readerror = .true.
1295 END IF
1296*
1297* Get # of precisions, and precisions to test
1298*
1299 READ(in, *) nprec
1300 IF( nprec .LT. 0 ) THEN
1301 nprec = 0
1302 ELSE IF( nprec. gt. precmax ) THEN
1303 WRITE(outnum, 2000) nprec, precmax, precmax
1304 nprec = precmax
1305 END IF
1306*
1307 READ(in, *) ( prec(i), i = 1, nprec )
1308 DO 100 i = 1, nprec
1309 IF( lsame(prec(i), 'C') ) THEN
1310 prec(i) = 'C'
1311 ELSE IF( lsame(prec(i), 'D') ) THEN
1312 prec(i) = 'D'
1313 ELSE IF( lsame(prec(i), 'I') ) THEN
1314 prec(i) = 'I'
1315 ELSE IF( lsame(prec(i), 'S') ) THEN
1316 prec(i) = 'S'
1317 ELSE IF( lsame(prec(i), 'Z') ) THEN
1318 prec(i) = 'Z'
1319 ELSE
1320 WRITE(outnum, 3000) prec(i)
1321 readerror = .true.
1322 END IF
1323 100 CONTINUE
1324*
1325 READ(in, *) verb
1326*
1327 IF( verb .GT. verbmax ) THEN
1328 WRITE(outnum, 4000) verb, verbmax, verbmax
1329 verb = verbmax
1330 ELSE IF( verb .LT. 0 ) THEN
1331 WRITE(outnum, 5000) verb
1332 verb = 0
1333 END IF
1334*
1335* Abort if there was a fatal error
1336*
1337 IF( readerror ) THEN
1338 WRITE(outnum, 6000)
1339 IF( outnum .NE. 6 .AND. outnum .NE. 0 ) CLOSE( outnum )
1340 stop
1341 END IF
1342*
1343 1000 FORMAT( 'INVALID CHARACTER FOR ',a4,' TESTS ''', a1,
1344 $ ''' (EXPECTED T/F)' )
1345 2000 FORMAT( 'NUMBER OF PRECISIONS ', i6, ' GREATER THAN ', i6,
1346 $ ' - SETTING TO ', i6, '.')
1347 3000 FORMAT( 'UNRECOGNIZABLE PRECISION ENTRY ''', a1,
1348 $ ''' - EXPECTED ''C'', ''D'', ''I'', ''S'', OR ''Z''.')
1349 4000 FORMAT( 'VERBOSITY ', i4, ' GREATER THAN ',i4,
1350 $ ' - SETTING TO ',i4,'.')
1351 5000 FORMAT( 'VERBOSITY ', i4, ' LESS THAN 0 - SETTING TO 0' )
1352 6000 FORMAT( 'FATAL INPUT FILE ERROR - ABORTING RUN.' )
1353*
1354 RETURN
1355*
1356* End of RDBTIN
1357*
logical function lsame(ca, cb)
Definition tools.f:1724
Here is the caller graph for this function: