CHANGE IN THE SCRIPT:
authorjulie <julielangou@users.noreply.github.com>
Tue, 28 Jun 2011 08:07:35 +0000 (08:07 +0000)
committerjulie <julielangou@users.noreply.github.com>
Tue, 28 Jun 2011 08:07:35 +0000 (08:07 +0000)
lapack_testing.py has been moved to the top directory
One argument was added :
     - d [dir] is to indicate where is the LAPACK testing directory (.out files). By default, the script will use .-d or --dir to
The -f argument was replaced by -r argument. Now by default the script will use the LAPACK output.
     - r is to use to run the LAPACK tests then analyse the output (.out files). By default, the script will not run all the LAPACK tests

INTEGRATION:
Integration of the LAPACK Testing parsing in the Makefile and CMake build process.

In the Makefile build: now the lapack_testing target will call the script after running the tests
In the CMAKE build: after the tests are run, the script will be executed with the option -s (short)
the end of the output will look like this:
100% tests passed, 0 tests failed out of 98

Total Test time (real) = 211.83 sec
SUMMARY                 numerical error         other error
================        =================       ================
REAL                    40      (0.004%)        0       (0.000%)
DOUBLE PRECISION        202     (0.020%)        0       (0.000%)
COMPLEX                 2       (0.000%)        0       (0.000%)
COMPLEX16               28      (0.005%)        0       (0.000%)

--> ALL PRECISIONS      272     (0.009%)        0       (0.000%)

CTestCustom.cmake.in
Makefile
TESTING/CMakeLists.txt
lapack_testing.py [moved from TESTING/lapack_testing.py with 91% similarity]

index 6388415..f8e7671 100644 (file)
@@ -42,3 +42,5 @@ SET(CTEST_CUSTOM_WARNING_EXCEPTION
   # intentional
   "Character string truncated to length 1 on assignment"
 )
+
+SET(CTEST_CUSTOM_POST_TEST "./lapack_testing.py -s -d Testing")
\ No newline at end of file
index fefba59..788f0c2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,7 @@
 
 include make.inc
 
-all: lapack_install lib lapack_testing blas_testing
+all: lapack_install lib blas_testing lapack_testing 
 
 lib: lapacklib tmglib
 #lib: blaslib variants lapacklib tmglib
@@ -31,6 +31,7 @@ tmglib:
 
 lapack_testing:        lib
        ( cd TESTING ; $(MAKE) )
+       ./lapack_testing.py
 
 variants_testing: lib variants
        ( cd TESTING ; rm -f xlintst* ; $(MAKE)  VARLIB='SRC/VARIANTS/LIB/cholrl.a' ; \
index 3115394..fba45b2 100644 (file)
@@ -306,3 +306,4 @@ add_lapack_test(zlse.out lse.in xeigtstz)
 
 # ==============================================================================
 
+file(COPY ${LAPACK_SOURCE_DIR}/lapack_testing.py DESTINATION ${LAPACK_BINARY_DIR})
similarity index 91%
rename from TESTING/lapack_testing.py
rename to lapack_testing.py
index 4e3d506..895de4c 100755 (executable)
@@ -12,8 +12,8 @@ import os, sys, math
 import getopt
 # Arguments
 try:
-   opts, args = getopt.getopt(sys.argv[1:], "hsfep:t:n", 
-                              ["help", "short", "file", "error","prec=","test=","number"])
+   opts, args = getopt.getopt(sys.argv[1:], "hd:srep:t:n", 
+                              ["help", "dir", "short", "run", "error","prec=","test=","number"])
    
 except getopt.error, msg:
    print msg
@@ -21,16 +21,18 @@ except getopt.error, msg:
    sys.exit(2)
 
 short_summary=0
-with_file=0
+with_file=1
 just_errors = 0
 prec='x'
 test='all'
 only_numbers=0
+dir="TESTING"
 for o, a in opts:
    if o in ("-h", "--help"):
-      print sys.argv[0]+" [-h|--help] [-s |--short] [-f |--file] [-e |--error] [-p p |--prec p] [-t test |--test test] [-n | --number]"
+      print sys.argv[0]+" [-h|--help] [-d dir |--dir dir] [-s |--short] [-r |--run] [-e |--error] [-p p |--prec p] [-t test |--test test] [-n | --number]"
       print "     - h is to print this message"
-      print "     - f is to use directly the output of the LAPACK testing (.out files). By default, the script will run all the LAPACK tests"
+      print "     - r is to use to run the LAPACK tests then analyse the output (.out files). By default, the script will not run all the LAPACK tests"
+      print "     - d [dir] is to indicate where is the LAPACK testing directory (.out files). By default, the script will use ."
       print " LEVEL OF OUTPUT"
       print "     - x is to print a detailed summary"
       print "     - e is to print only the error summary"
@@ -50,23 +52,25 @@ for o, a in opts:
       print "            rfp=rfp format"
       print "            all=all tests [DEFAULT]"
       print " EXAMPLES:"
-      print "     ./lapack_testing.py -n -f"
+      print "     ./lapack_testing.py -n"
       print "            Will return the numbers of failed tests by analyzing the LAPACK output"
-      print "     ./lapack_testing.py -n -f -p s"
-      print "            Will return the numbers of failed tests in REAL precision by analyzing the LAPACK output"
-      print "     ./lapack_testing.py -n -f -p s -t eig "
+      print "     ./lapack_testing.py -n -r -p s"
+      print "            Will return the numbers of failed tests in REAL precision by running the LAPACK Tests then analyzing the output"
+      print "     ./lapack_testing.py -n -p s -t eig "
       print "            Will return the numbers of failed tests in REAL precision by analyzing only the LAPACK output of EIGEN testings"
       print "Written by Julie Langou (June 2011) "
       sys.exit(0)
    else:
       if o in ("-s", "--short"):
          short_summary = 1
-      if o in ("-f", "--file"):
-         with_file = 1
+      if o in ("-r", "--run"):
+         with_file = 0
       if o in ("-e", "--error"):
          just_errors = 1
       if o in ( '-p', '--prec' ):
          prec = a
+      if o in ( '-d', '--dir' ):
+         dir = a
       if o in ( '-t', '--test' ):
          test = a
       if o in ( '-n', '--number' ):
@@ -74,6 +78,7 @@ for o, a in opts:
          short_summary = 1
 
 # process options
+os.chdir(dir)
 execution=1
 summary="SUMMARY             \tnumerical error   \tother error  \n";
 summary+="================    \t=================\t================  \n";