PLASMA  2.4.5
PLASMA - Parallel Linear Algebra for Scalable Multi-core Architectures
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
lapack_testing.py
Go to the documentation of this file.
1 #! /usr/bin/env python
2 # -*- coding: utf-8 -*-
3 
4 import os
5 import sys
6 filename = "testing_results.txt"
7 f = open(filename, "w") # erase the file if it exists
8 f.close()
9 
10 # Add current directory to the path for subshells of this shell
11 # Allows the popen to find local files in both windows and unixes
12 os.environ["PATH"] = os.environ["PATH"]+":."
13 
14 print ' '
15 print '---------------- LAPACK LIN Testing with PLASMA ----------------'
16 print ' '
17 print '-- Detailed results are stored in', filename
18 
19 dtypes = (
20 ("s", "d", "c", "z"),
21 ("Single", "Double", "Complex", "Double Complex"),
22 )
23 for dtype in range(4):
24  letter = dtypes[0][dtype]
25  name = dtypes[1][dtype]
26  print " "
27  print "------------------------- %s ------------------------" % name
28  print " "
29  sys.stdout.flush() # make sure progress of testing is shown
30  f = open(filename, "a")
31  test1 = os.popen("xlintst%s < %stest.in" % (letter, letter))
32  for line in test1.readlines():
33  f.write(str(line))
34  if "passed" in line : print line,
35  if "failed" in line : print "\n Failure =======>", line
36  if "recorded" in line : print "\n ===>", line
37  f.close()