Import LAPACK: top directory
This commit is contained in:
parent
57eee3fa43
commit
77006cc2a3
|
@ -3,7 +3,7 @@ project(LAPACK Fortran)
|
||||||
|
|
||||||
set(LAPACK_MAJOR_VERSION 3)
|
set(LAPACK_MAJOR_VERSION 3)
|
||||||
set(LAPACK_MINOR_VERSION 6)
|
set(LAPACK_MINOR_VERSION 6)
|
||||||
set(LAPACK_PATCH_VERSION 0)
|
set(LAPACK_PATCH_VERSION 1)
|
||||||
set(
|
set(
|
||||||
LAPACK_VERSION
|
LAPACK_VERSION
|
||||||
${LAPACK_MAJOR_VERSION}.${LAPACK_MINOR_VERSION}.${LAPACK_PATCH_VERSION}
|
${LAPACK_MAJOR_VERSION}.${LAPACK_MINOR_VERSION}.${LAPACK_PATCH_VERSION}
|
||||||
|
@ -17,11 +17,10 @@ set(
|
||||||
set(CMAKE_MACOSX_RPATH ON)
|
set(CMAKE_MACOSX_RPATH ON)
|
||||||
set(CMAKE_SKIP_BUILD_RPATH FALSE)
|
set(CMAKE_SKIP_BUILD_RPATH FALSE)
|
||||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
|
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
|
||||||
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
|
list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" isSystemDir)
|
||||||
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
|
||||||
list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
|
|
||||||
if("${isSystemDir}" STREQUAL "-1")
|
if("${isSystemDir}" STREQUAL "-1")
|
||||||
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
|
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
|
||||||
|
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
@ -37,7 +36,7 @@ set(CMAKE_MODULE_PATH "${LAPACK_SOURCE_DIR}/CMAKE" ${CMAKE_MODULE_PATH})
|
||||||
|
|
||||||
if (UNIX)
|
if (UNIX)
|
||||||
if ( "${CMAKE_Fortran_COMPILER}" MATCHES "ifort" )
|
if ( "${CMAKE_Fortran_COMPILER}" MATCHES "ifort" )
|
||||||
set( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fltconsistency -fp_port" )
|
set( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fp-model strict" )
|
||||||
endif ()
|
endif ()
|
||||||
if ( "${CMAKE_Fortran_COMPILER}" MATCHES "xlf" )
|
if ( "${CMAKE_Fortran_COMPILER}" MATCHES "xlf" )
|
||||||
set( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -qnosave -qstrict=none" )
|
set( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -qnosave -qstrict=none" )
|
||||||
|
@ -47,6 +46,33 @@ if (UNIX)
|
||||||
STRING(REPLACE \;mtsk\; \; CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES "${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES}")
|
STRING(REPLACE \;mtsk\; \; CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES "${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES}")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
if ( CMAKE_Fortran_COMPILER_ID STREQUAL "Compaq" )
|
||||||
|
if ( WIN32 )
|
||||||
|
if (CMAKE_GENERATOR STREQUAL "NMake Makefiles")
|
||||||
|
get_filename_component(CMAKE_Fortran_COMPILER_CMDNAM ${CMAKE_Fortran_COMPILER} NAME_WE)
|
||||||
|
message(STATUS "Using Compaq Fortran compiler with command name ${CMAKE_Fortran_COMPILER_CMDNAM}")
|
||||||
|
set( cmd ${CMAKE_Fortran_COMPILER_CMDNAM} )
|
||||||
|
string( TOLOWER "${cmd}" cmdlc )
|
||||||
|
if ( cmdlc STREQUAL "df" )
|
||||||
|
message(STATUS "Assume the Compaq Visual Fortran Compiler is being used")
|
||||||
|
set(CMAKE_Fortran_USE_RESPONSE_FILE_FOR_OBJECTS 1)
|
||||||
|
set(CMAKE_Fortran_USE_RESPONSE_FILE_FOR_INCLUDES 1)
|
||||||
|
#This is a workaround that is needed to avoid forward-slashes in the
|
||||||
|
#filenames listed in response files from incorrectly being interpreted as
|
||||||
|
#introducing compiler command options
|
||||||
|
if (${BUILD_SHARED_LIBS})
|
||||||
|
message(FATAL_ERROR "Making of shared libraries with CVF has not been tested.")
|
||||||
|
endif()
|
||||||
|
set(str "NMake version 9 or later should be used. NMake version 6.0 which is\n")
|
||||||
|
set(str "${str} included with the CVF distribution fails to build Lapack because\n")
|
||||||
|
set(str "${str} the number of source files exceeds the limit for NMake v6.0\n")
|
||||||
|
message(STATUS ${str})
|
||||||
|
set(CMAKE_Fortran_LINK_EXECUTABLE "LINK /out:<TARGET> <LINK_FLAGS> <LINK_LIBRARIES> <OBJECTS>")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
# Get Python
|
# Get Python
|
||||||
find_package(PythonInterp)
|
find_package(PythonInterp)
|
||||||
message(STATUS "Looking for Python found - ${PYTHONINTERP_FOUND}")
|
message(STATUS "Looking for Python found - ${PYTHONINTERP_FOUND}")
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
Copyright (c) 1992-2015 The University of Tennessee and The University
|
Copyright (c) 1992-2016 The University of Tennessee and The University
|
||||||
of Tennessee Research Foundation. All rights
|
of Tennessee Research Foundation. All rights
|
||||||
reserved.
|
reserved.
|
||||||
Copyright (c) 2000-2015 The University of California Berkeley. All
|
Copyright (c) 2000-2016 The University of California Berkeley. All
|
||||||
rights reserved.
|
rights reserved.
|
||||||
Copyright (c) 2006-2015 The University of Colorado Denver. All rights
|
Copyright (c) 2006-2016 The University of Colorado Denver. All rights
|
||||||
reserved.
|
reserved.
|
||||||
|
|
||||||
$COPYRIGHT$
|
$COPYRIGHT$
|
||||||
|
|
|
@ -14,13 +14,14 @@ lib: lapacklib tmglib
|
||||||
clean: cleanlib cleantesting cleanblas_testing cleancblas_testing
|
clean: cleanlib cleantesting cleanblas_testing cleancblas_testing
|
||||||
|
|
||||||
lapack_install:
|
lapack_install:
|
||||||
( cd INSTALL; $(MAKE); )
|
( cd INSTALL; $(MAKE); ./testlsame; ./testslamch; ./testdlamch; \
|
||||||
|
./testsecond; ./testdsecnd; ./testieee; ./testversion )
|
||||||
|
|
||||||
blaslib:
|
blaslib:
|
||||||
( cd BLAS/SRC; $(MAKE) )
|
( cd BLAS/SRC; $(MAKE) )
|
||||||
|
|
||||||
cblaslib:
|
cblaslib:
|
||||||
( cd CBLAS/src; $(MAKE) )
|
( cd CBLAS; $(MAKE) )
|
||||||
|
|
||||||
lapacklib: lapack_install
|
lapacklib: lapack_install
|
||||||
( cd SRC; $(MAKE) )
|
( cd SRC; $(MAKE) )
|
||||||
|
@ -116,7 +117,7 @@ cleanblas_testing:
|
||||||
( cd BLAS; rm -f xblat* )
|
( cd BLAS; rm -f xblat* )
|
||||||
|
|
||||||
cleancblas_testing:
|
cleancblas_testing:
|
||||||
( cd CBLAS; $(MAKE) cleanexe )
|
( cd CBLAS/testing; $(MAKE) clean )
|
||||||
|
|
||||||
cleantesting:
|
cleantesting:
|
||||||
( cd TESTING/LIN; $(MAKE) clean )
|
( cd TESTING/LIN; $(MAKE) clean )
|
||||||
|
|
|
@ -22,6 +22,8 @@ VERSION 3.4.1 : April 2012
|
||||||
VERSION 3.4.2 : September 2012
|
VERSION 3.4.2 : September 2012
|
||||||
VERSION 3.5.0 : November 2013
|
VERSION 3.5.0 : November 2013
|
||||||
VERSION 3.6.0 : November 2015
|
VERSION 3.6.0 : November 2015
|
||||||
|
VERSION 3.6.1 : June 2016
|
||||||
|
|
||||||
|
|
||||||
LAPACK is a library of Fortran 90 with subroutines for solving
|
LAPACK is a library of Fortran 90 with subroutines for solving
|
||||||
the most commonly occurring problems in numerical linear algebra.
|
the most commonly occurring problems in numerical linear algebra.
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
prefix=@prefix@
|
prefix=@CMAKE_INSTALL_PREFIX@
|
||||||
libdir=@libdir@
|
libdir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@
|
||||||
|
|
||||||
Name: lapack
|
Name: lapack
|
||||||
Description: FORTRAN reference implementation of LAPACK Linear Algebra PACKage
|
Description: FORTRAN reference implementation of LAPACK Linear Algebra PACKage
|
||||||
Version: @LAPACK_VERSION@
|
Version: @LAPACK_VERSION@
|
||||||
URL: http://www.netlib.org/lapack/
|
URL: http://www.netlib.org/lapack/
|
||||||
Libs: -L${libdir} -llapack
|
Libs: -L@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ -llapack
|
||||||
Requires: blas
|
Requires: blas
|
||||||
|
|
|
@ -3,22 +3,22 @@
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# lapack_testing.py
|
# lapack_testing.py
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
from __future__ import print_function
|
||||||
from subprocess import Popen, STDOUT, PIPE
|
from subprocess import Popen, STDOUT, PIPE
|
||||||
import os, sys, math
|
import os, sys, math
|
||||||
import getopt
|
import getopt
|
||||||
# Arguments
|
# Arguments
|
||||||
try:
|
try:
|
||||||
opts, args = getopt.getopt(sys.argv[1:], "hd:srep:t:n",
|
opts, args = getopt.getopt(sys.argv[1:], "hd:srep:t:n",
|
||||||
["help", "dir", "short", "run", "error","prec=","test=","number"])
|
["help", "dir", "short", "run", "error","prec=","test=","number"])
|
||||||
|
|
||||||
except getopt.error, msg:
|
except getopt.error as msg:
|
||||||
print msg
|
print(msg)
|
||||||
print "for help use --help"
|
print("for help use --help")
|
||||||
sys.exit(2)
|
sys.exit(2)
|
||||||
|
|
||||||
short_summary=0
|
short_summary=0
|
||||||
with_file=1
|
with_file=1
|
||||||
|
@ -32,56 +32,56 @@ bin_dir='bin/Release'
|
||||||
abs_bin_dir=os.path.normpath(os.path.join(os.getcwd(),bin_dir))
|
abs_bin_dir=os.path.normpath(os.path.join(os.getcwd(),bin_dir))
|
||||||
|
|
||||||
for o, a in opts:
|
for o, a in opts:
|
||||||
if o in ("-h", "--help"):
|
if o in ("-h", "--help"):
|
||||||
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(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(" - h is to print this message")
|
||||||
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(" - 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(" - d [dir] is to indicate where is the LAPACK testing directory (.out files). By default, the script will use .")
|
||||||
print " LEVEL OF OUTPUT"
|
print(" LEVEL OF OUTPUT")
|
||||||
print " - x is to print a detailed summary"
|
print(" - x is to print a detailed summary")
|
||||||
print " - e is to print only the error summary"
|
print(" - e is to print only the error summary")
|
||||||
print " - s is to print a short summary"
|
print(" - s is to print a short summary")
|
||||||
print " - n is to print the numbers of failing tests (turn on summary mode)"
|
print(" - n is to print the numbers of failing tests (turn on summary mode)")
|
||||||
print " SECLECTION OF TESTS:"
|
print(" SECLECTION OF TESTS:")
|
||||||
print " - p [s/c/d/z/x] is to indicate the PRECISION to run:"
|
print(" - p [s/c/d/z/x] is to indicate the PRECISION to run:")
|
||||||
print " s=single"
|
print(" s=single")
|
||||||
print " d=double"
|
print(" d=double")
|
||||||
print " sd=single/double"
|
print(" sd=single/double")
|
||||||
print " c=complex"
|
print(" c=complex")
|
||||||
print " z=double complex"
|
print(" z=double complex")
|
||||||
print " cz=complex/double complex"
|
print(" cz=complex/double complex")
|
||||||
print " x=all [DEFAULT]"
|
print(" x=all [DEFAULT]")
|
||||||
print " - t [lin/eig/mixed/rfp/all] is to indicate which TEST FAMILY to run:"
|
print(" - t [lin/eig/mixed/rfp/all] is to indicate which TEST FAMILY to run:")
|
||||||
print " lin=Linear Equation"
|
print(" lin=Linear Equation")
|
||||||
print " eig=Eigen Problems"
|
print(" eig=Eigen Problems")
|
||||||
print " mixed=mixed-precision"
|
print(" mixed=mixed-precision")
|
||||||
print " rfp=rfp format"
|
print(" rfp=rfp format")
|
||||||
print " all=all tests [DEFAULT]"
|
print(" all=all tests [DEFAULT]")
|
||||||
print " EXAMPLES:"
|
print(" EXAMPLES:")
|
||||||
print " ./lapack_testing.py -n"
|
print(" ./lapack_testing.py -n")
|
||||||
print " Will return the numbers of failed tests by analyzing the LAPACK output"
|
print(" Will return the numbers of failed tests by analyzing the LAPACK output")
|
||||||
print " ./lapack_testing.py -n -r -p s"
|
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(" 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(" ./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(" 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) "
|
print("Written by Julie Langou (June 2011) ")
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
else:
|
else:
|
||||||
if o in ("-s", "--short"):
|
if o in ("-s", "--short"):
|
||||||
short_summary = 1
|
short_summary = 1
|
||||||
if o in ("-r", "--run"):
|
if o in ("-r", "--run"):
|
||||||
with_file = 0
|
with_file = 0
|
||||||
if o in ("-e", "--error"):
|
if o in ("-e", "--error"):
|
||||||
just_errors = 1
|
just_errors = 1
|
||||||
if o in ( '-p', '--prec' ):
|
if o in ( '-p', '--prec' ):
|
||||||
prec = a
|
prec = a
|
||||||
if o in ( '-d', '--dir' ):
|
if o in ( '-d', '--dir' ):
|
||||||
test_dir = a
|
test_dir = a
|
||||||
if o in ( '-t', '--test' ):
|
if o in ( '-t', '--test' ):
|
||||||
test = a
|
test = a
|
||||||
if o in ( '-n', '--number' ):
|
if o in ( '-n', '--number' ):
|
||||||
only_numbers = 1
|
only_numbers = 1
|
||||||
short_summary = 1
|
short_summary = 1
|
||||||
|
|
||||||
# process options
|
# process options
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ os.chdir(test_dir)
|
||||||
|
|
||||||
execution=1
|
execution=1
|
||||||
summary="\n\t\t\t--> LAPACK TESTING SUMMARY <--\n";
|
summary="\n\t\t\t--> LAPACK TESTING SUMMARY <--\n";
|
||||||
if with_file: summary+= "\t\tProcessing LAPACK Testing output found in the "+test_dir+" direcory\n";
|
if with_file: summary+= "\t\tProcessing LAPACK Testing output found in the "+test_dir+" directory\n";
|
||||||
summary+="SUMMARY \tnb test run \tnumerical error \tother error \n";
|
summary+="SUMMARY \tnb test run \tnumerical error \tother error \n";
|
||||||
summary+="================ \t===========\t=================\t================ \n";
|
summary+="================ \t===========\t=================\t================ \n";
|
||||||
nb_of_test=0
|
nb_of_test=0
|
||||||
|
@ -100,80 +100,80 @@ os.environ["PATH"] = os.environ["PATH"]+":."
|
||||||
|
|
||||||
# Define a function to open the executable (different filenames on unix and Windows)
|
# Define a function to open the executable (different filenames on unix and Windows)
|
||||||
def run_summary_test( f, cmdline, short_summary):
|
def run_summary_test( f, cmdline, short_summary):
|
||||||
nb_test_run=0
|
nb_test_run=0
|
||||||
nb_test_fail=0
|
nb_test_fail=0
|
||||||
nb_test_illegal=0
|
nb_test_illegal=0
|
||||||
nb_test_info=0
|
nb_test_info=0
|
||||||
|
|
||||||
if (with_file):
|
|
||||||
if not os.path.exists(cmdline):
|
|
||||||
error_message=cmdline+" file not found"
|
|
||||||
r=1
|
|
||||||
if short_summary: return [nb_test_run,nb_test_fail,nb_test_illegal,nb_test_info]
|
|
||||||
else:
|
|
||||||
pipe = open(cmdline,'r')
|
|
||||||
r=0
|
|
||||||
else:
|
|
||||||
if os.name != 'nt':
|
|
||||||
cmdline='./' + cmdline
|
|
||||||
else :
|
|
||||||
cmdline=abs_bin_dir+os.path.sep+cmdline
|
|
||||||
|
|
||||||
outfile=cmdline.split()[4]
|
if (with_file):
|
||||||
#pipe = open(outfile,'w')
|
if not os.path.exists(cmdline):
|
||||||
p = Popen(cmdline, shell=True)#, stdout=pipe)
|
error_message=cmdline+" file not found"
|
||||||
p.wait()
|
r=1
|
||||||
#pipe.close()
|
if short_summary: return [nb_test_run,nb_test_fail,nb_test_illegal,nb_test_info]
|
||||||
r=p.returncode
|
else:
|
||||||
pipe = open(outfile,'r')
|
pipe = open(cmdline,'r')
|
||||||
error_message=cmdline+" did not work"
|
r=0
|
||||||
|
else:
|
||||||
|
if os.name != 'nt':
|
||||||
|
cmdline='./' + cmdline
|
||||||
|
else :
|
||||||
|
cmdline=abs_bin_dir+os.path.sep+cmdline
|
||||||
|
|
||||||
if r != 0 and not with_file:
|
outfile=cmdline.split()[4]
|
||||||
print "---- TESTING " + cmdline.split()[0] + "... FAILED(" + error_message +") !"
|
#pipe = open(outfile,'w')
|
||||||
for line in pipe.readlines():
|
p = Popen(cmdline, shell=True)#, stdout=pipe)
|
||||||
f.write(str(line))
|
p.wait()
|
||||||
elif r != 0 and with_file and not short_summary:
|
#pipe.close()
|
||||||
print "---- WARNING: please check that you have the LAPACK output : "+cmdline+"!"
|
r=p.returncode
|
||||||
print "---- WARNING: with the option -r, we can run the LAPACK testing for you"
|
pipe = open(outfile,'r')
|
||||||
# print "---- "+error_message
|
error_message=cmdline+" did not work"
|
||||||
else:
|
|
||||||
for line in pipe.readlines():
|
|
||||||
f.write(str(line))
|
|
||||||
words_in_line=line.split()
|
|
||||||
if (line.find("run")!=-1):
|
|
||||||
# print line
|
|
||||||
whereisrun=words_in_line.index("run)")
|
|
||||||
nb_test_run+=int(words_in_line[whereisrun-2])
|
|
||||||
if (line.find("out of")!=-1):
|
|
||||||
if (short_summary==0): print line,
|
|
||||||
whereisout= words_in_line.index("out")
|
|
||||||
nb_test_fail+=int(words_in_line[whereisout-1])
|
|
||||||
if ((line.find("illegal")!=-1) or (line.find("Illegal")!=-1)):
|
|
||||||
if (short_summary==0):print line,
|
|
||||||
nb_test_illegal+=1
|
|
||||||
if (line.find(" INFO")!=-1):
|
|
||||||
if (short_summary==0):print line,
|
|
||||||
nb_test_info+=1
|
|
||||||
if (with_file==1):
|
|
||||||
pipe.close()
|
|
||||||
|
|
||||||
f.flush();
|
|
||||||
|
|
||||||
return [nb_test_run,nb_test_fail,nb_test_illegal,nb_test_info]
|
if r != 0 and not with_file:
|
||||||
|
print("---- TESTING " + cmdline.split()[0] + "... FAILED(" + error_message +") !")
|
||||||
|
for line in pipe.readlines():
|
||||||
|
f.write(str(line))
|
||||||
|
elif r != 0 and with_file and not short_summary:
|
||||||
|
print("---- WARNING: please check that you have the LAPACK output : "+cmdline+"!")
|
||||||
|
print("---- WARNING: with the option -r, we can run the LAPACK testing for you")
|
||||||
|
# print "---- "+error_message
|
||||||
|
else:
|
||||||
|
for line in pipe.readlines():
|
||||||
|
f.write(str(line))
|
||||||
|
words_in_line=line.split()
|
||||||
|
if (line.find("run")!=-1):
|
||||||
|
# print line
|
||||||
|
whereisrun=words_in_line.index("run)")
|
||||||
|
nb_test_run+=int(words_in_line[whereisrun-2])
|
||||||
|
if (line.find("out of")!=-1):
|
||||||
|
if (short_summary==0): print(line, end=' ')
|
||||||
|
whereisout= words_in_line.index("out")
|
||||||
|
nb_test_fail+=int(words_in_line[whereisout-1])
|
||||||
|
if ((line.find("illegal")!=-1) or (line.find("Illegal")!=-1)):
|
||||||
|
if (short_summary==0):print(line, end=' ')
|
||||||
|
nb_test_illegal+=1
|
||||||
|
if (line.find(" INFO")!=-1):
|
||||||
|
if (short_summary==0):print(line, end=' ')
|
||||||
|
nb_test_info+=1
|
||||||
|
if (with_file==1):
|
||||||
|
pipe.close()
|
||||||
|
|
||||||
|
f.flush();
|
||||||
|
|
||||||
|
return [nb_test_run,nb_test_fail,nb_test_illegal,nb_test_info]
|
||||||
|
|
||||||
|
|
||||||
# If filename cannot be opened, send output to sys.stderr
|
# If filename cannot be opened, send output to sys.stderr
|
||||||
filename = "testing_results.txt"
|
filename = "testing_results.txt"
|
||||||
try:
|
try:
|
||||||
f = open(filename, 'w')
|
f = open(filename, 'w')
|
||||||
except IOError:
|
except IOError:
|
||||||
f = sys.stdout
|
f = sys.stdout
|
||||||
|
|
||||||
if (short_summary==0):
|
if (short_summary==0):
|
||||||
print " "
|
print(" ")
|
||||||
print "---------------- Testing LAPACK Routines ----------------"
|
print("---------------- Testing LAPACK Routines ----------------")
|
||||||
print " "
|
print(" ")
|
||||||
print "-- Detailed results are stored in", filename
|
print("-- Detailed results are stored in", filename)
|
||||||
|
|
||||||
dtypes = (
|
dtypes = (
|
||||||
("s", "d", "c", "z"),
|
("s", "d", "c", "z"),
|
||||||
|
@ -181,32 +181,32 @@ dtypes = (
|
||||||
)
|
)
|
||||||
|
|
||||||
if prec=='s':
|
if prec=='s':
|
||||||
range_prec=[0]
|
range_prec=[0]
|
||||||
elif prec=='d':
|
elif prec=='d':
|
||||||
range_prec=[1]
|
range_prec=[1]
|
||||||
elif prec=='sd':
|
elif prec=='sd':
|
||||||
range_prec=[0,1]
|
range_prec=[0,1]
|
||||||
elif prec=='c':
|
elif prec=='c':
|
||||||
range_prec=[2]
|
range_prec=[2]
|
||||||
elif prec=='z':
|
elif prec=='z':
|
||||||
range_prec=[3]
|
range_prec=[3]
|
||||||
elif prec=='cz':
|
elif prec=='cz':
|
||||||
range_prec=[2,3]
|
range_prec=[2,3]
|
||||||
else:
|
else:
|
||||||
prec='x';
|
prec='x';
|
||||||
range_prec=range(4)
|
range_prec=list(range(4))
|
||||||
|
|
||||||
if test=='lin':
|
if test=='lin':
|
||||||
range_test=[15]
|
range_test=[15]
|
||||||
elif test=='mixed':
|
elif test=='mixed':
|
||||||
range_test=[16]
|
range_test=[16]
|
||||||
range_prec=[1,3]
|
range_prec=[1,3]
|
||||||
elif test=='rfp':
|
elif test=='rfp':
|
||||||
range_test=[17]
|
range_test=[17]
|
||||||
elif test=='eig':
|
elif test=='eig':
|
||||||
range_test=range(15)
|
range_test=list(range(15))
|
||||||
else:
|
else:
|
||||||
range_test=range(18)
|
range_test=list(range(18))
|
||||||
|
|
||||||
list_results = [
|
list_results = [
|
||||||
[0, 0, 0, 0, 0],
|
[0, 0, 0, 0, 0],
|
||||||
|
@ -216,111 +216,111 @@ list_results = [
|
||||||
]
|
]
|
||||||
|
|
||||||
for dtype in range_prec:
|
for dtype in range_prec:
|
||||||
letter = dtypes[0][dtype]
|
letter = dtypes[0][dtype]
|
||||||
name = dtypes[1][dtype]
|
name = dtypes[1][dtype]
|
||||||
|
|
||||||
if (short_summary==0):
|
if (short_summary==0):
|
||||||
print " "
|
print(" ")
|
||||||
print "------------------------- %s ------------------------" % name
|
print("------------------------- %s ------------------------" % name)
|
||||||
print " "
|
print(" ")
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
|
|
||||||
dtests = (
|
dtests = (
|
||||||
("nep", "sep", "svd",
|
("nep", "sep", "svd",
|
||||||
letter+"ec",letter+"ed",letter+"gg",
|
letter+"ec",letter+"ed",letter+"gg",
|
||||||
letter+"gd",letter+"sb",letter+"sg",
|
letter+"gd",letter+"sb",letter+"sg",
|
||||||
letter+"bb","glm","gqr",
|
letter+"bb","glm","gqr",
|
||||||
"gsv","csd","lse",
|
"gsv","csd","lse",
|
||||||
letter+"test", letter+dtypes[0][dtype-1]+"test",letter+"test_rfp"),
|
letter+"test", letter+dtypes[0][dtype-1]+"test",letter+"test_rfp"),
|
||||||
("Nonsymmetric Eigenvalue Problem", "Symmetric Eigenvalue Problem", "Singular Value Decomposition",
|
("Nonsymmetric Eigenvalue Problem", "Symmetric Eigenvalue Problem", "Singular Value Decomposition",
|
||||||
"Eigen Condition","Nonsymmetric Eigenvalue","Nonsymmetric Generalized Eigenvalue Problem",
|
"Eigen Condition","Nonsymmetric Eigenvalue","Nonsymmetric Generalized Eigenvalue Problem",
|
||||||
"Nonsymmetric Generalized Eigenvalue Problem driver", "Symmetric Eigenvalue Problem", "Symmetric Eigenvalue Generalized Problem",
|
"Nonsymmetric Generalized Eigenvalue Problem driver", "Symmetric Eigenvalue Problem", "Symmetric Eigenvalue Generalized Problem",
|
||||||
"Banded Singular Value Decomposition routines", "Generalized Linear Regression Model routines", "Generalized QR and RQ factorization routines",
|
"Banded Singular Value Decomposition routines", "Generalized Linear Regression Model routines", "Generalized QR and RQ factorization routines",
|
||||||
"Generalized Singular Value Decomposition routines", "CS Decomposition routines", "Constrained Linear Least Squares routines",
|
"Generalized Singular Value Decomposition routines", "CS Decomposition routines", "Constrained Linear Least Squares routines",
|
||||||
"Linear Equation routines", "Mixed Precision linear equation routines","RFP linear equation routines"),
|
"Linear Equation routines", "Mixed Precision linear equation routines","RFP linear equation routines"),
|
||||||
(letter+"nep", letter+"sep", letter+"svd",
|
(letter+"nep", letter+"sep", letter+"svd",
|
||||||
letter+"ec",letter+"ed",letter+"gg",
|
letter+"ec",letter+"ed",letter+"gg",
|
||||||
letter+"gd",letter+"sb",letter+"sg",
|
letter+"gd",letter+"sb",letter+"sg",
|
||||||
letter+"bb",letter+"glm",letter+"gqr",
|
letter+"bb",letter+"glm",letter+"gqr",
|
||||||
letter+"gsv",letter+"csd",letter+"lse",
|
letter+"gsv",letter+"csd",letter+"lse",
|
||||||
letter+"test", letter+dtypes[0][dtype-1]+"test",letter+"test_rfp"),
|
letter+"test", letter+dtypes[0][dtype-1]+"test",letter+"test_rfp"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
for dtest in range_test:
|
for dtest in range_test:
|
||||||
nb_of_test=0
|
nb_of_test=0
|
||||||
# NEED TO SKIP SOME PRECISION (namely s and c) FOR PROTO MIXED PRECISION TESTING
|
# NEED TO SKIP SOME PRECISION (namely s and c) FOR PROTO MIXED PRECISION TESTING
|
||||||
if dtest==16 and (letter=="s" or letter=="c"):
|
if dtest==16 and (letter=="s" or letter=="c"):
|
||||||
continue
|
continue
|
||||||
if (with_file==1):
|
if (with_file==1):
|
||||||
cmdbase=dtests[2][dtest]+".out"
|
cmdbase=dtests[2][dtest]+".out"
|
||||||
else:
|
|
||||||
if dtest==15:
|
|
||||||
# LIN TESTS
|
|
||||||
cmdbase="xlintst"+letter+" < "+dtests[0][dtest]+".in > "+dtests[2][dtest]+".out"
|
|
||||||
elif dtest==16:
|
|
||||||
# PROTO LIN TESTS
|
|
||||||
cmdbase="xlintst"+letter+dtypes[0][dtype-1]+" < "+dtests[0][dtest]+".in > "+dtests[2][dtest]+".out"
|
|
||||||
elif dtest==17:
|
|
||||||
# PROTO LIN TESTS
|
|
||||||
cmdbase="xlintstrf"+letter+" < "+dtests[0][dtest]+".in > "+dtests[2][dtest]+".out"
|
|
||||||
else:
|
else:
|
||||||
# EIG TESTS
|
if dtest==15:
|
||||||
cmdbase="xeigtst"+letter+" < "+dtests[0][dtest]+".in > "+dtests[2][dtest]+".out"
|
# LIN TESTS
|
||||||
if (not just_errors and not short_summary):
|
cmdbase="xlintst"+letter+" < "+dtests[0][dtest]+".in > "+dtests[2][dtest]+".out"
|
||||||
print "--> Testing "+name+" "+dtests[1][dtest]+" [ "+cmdbase+" ]"
|
elif dtest==16:
|
||||||
# Run the process: either to read the file or run the LAPACK testing
|
# PROTO LIN TESTS
|
||||||
nb_test = run_summary_test(f, cmdbase, short_summary)
|
cmdbase="xlintst"+letter+dtypes[0][dtype-1]+" < "+dtests[0][dtest]+".in > "+dtests[2][dtest]+".out"
|
||||||
list_results[0][dtype]+=nb_test[0]
|
elif dtest==17:
|
||||||
list_results[1][dtype]+=nb_test[1]
|
# PROTO LIN TESTS
|
||||||
list_results[2][dtype]+=nb_test[2]
|
cmdbase="xlintstrf"+letter+" < "+dtests[0][dtest]+".in > "+dtests[2][dtest]+".out"
|
||||||
list_results[3][dtype]+=nb_test[3]
|
else:
|
||||||
got_error=nb_test[1]+nb_test[2]+nb_test[3]
|
# EIG TESTS
|
||||||
|
cmdbase="xeigtst"+letter+" < "+dtests[0][dtest]+".in > "+dtests[2][dtest]+".out"
|
||||||
if (not short_summary):
|
if (not just_errors and not short_summary):
|
||||||
if (nb_test[0]>0 and just_errors==0):
|
print("--> Testing "+name+" "+dtests[1][dtest]+" [ "+cmdbase+" ]")
|
||||||
print "--> Tests passed: "+str(nb_test[0])
|
# Run the process: either to read the file or run the LAPACK testing
|
||||||
if (nb_test[1]>0):
|
nb_test = run_summary_test(f, cmdbase, short_summary)
|
||||||
print "--> Tests failing to pass the threshold: "+str(nb_test[1])
|
list_results[0][dtype]+=nb_test[0]
|
||||||
if (nb_test[2]>0):
|
list_results[1][dtype]+=nb_test[1]
|
||||||
print "--> Illegal Error: "+str(nb_test[2])
|
list_results[2][dtype]+=nb_test[2]
|
||||||
if (nb_test[3]>0):
|
list_results[3][dtype]+=nb_test[3]
|
||||||
print "--> Info Error: "+str(nb_test[3])
|
got_error=nb_test[1]+nb_test[2]+nb_test[3]
|
||||||
if (got_error>0 and just_errors==1):
|
|
||||||
print "ERROR IS LOCATED IN "+name+" "+dtests[1][dtest]+" [ "+cmdbase+" ]"
|
if (not short_summary):
|
||||||
print ""
|
if (nb_test[0]>0 and just_errors==0):
|
||||||
if (just_errors==0):
|
print("--> Tests passed: "+str(nb_test[0]))
|
||||||
print ""
|
if (nb_test[1]>0):
|
||||||
|
print("--> Tests failing to pass the threshold: "+str(nb_test[1]))
|
||||||
|
if (nb_test[2]>0):
|
||||||
|
print("--> Illegal Error: "+str(nb_test[2]))
|
||||||
|
if (nb_test[3]>0):
|
||||||
|
print("--> Info Error: "+str(nb_test[3]))
|
||||||
|
if (got_error>0 and just_errors==1):
|
||||||
|
print("ERROR IS LOCATED IN "+name+" "+dtests[1][dtest]+" [ "+cmdbase+" ]")
|
||||||
|
print("")
|
||||||
|
if (just_errors==0):
|
||||||
|
print("")
|
||||||
# elif (got_error>0):
|
# elif (got_error>0):
|
||||||
# print dtests[2][dtest]+".out \t"+str(nb_test[1])+"\t"+str(nb_test[2])+"\t"+str(nb_test[3])
|
# print dtests[2][dtest]+".out \t"+str(nb_test[1])+"\t"+str(nb_test[2])+"\t"+str(nb_test[3])
|
||||||
|
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
if (list_results[0][dtype] > 0 ):
|
if (list_results[0][dtype] > 0 ):
|
||||||
percent_num_error=float(list_results[1][dtype])/float(list_results[0][dtype])*100
|
percent_num_error=float(list_results[1][dtype])/float(list_results[0][dtype])*100
|
||||||
percent_error=float(list_results[2][dtype]+list_results[3][dtype])/float(list_results[0][dtype])*100
|
percent_error=float(list_results[2][dtype]+list_results[3][dtype])/float(list_results[0][dtype])*100
|
||||||
else:
|
else:
|
||||||
percent_num_error=0
|
percent_num_error=0
|
||||||
percent_error=0
|
percent_error=0
|
||||||
summary+=name+"\t"+str(list_results[0][dtype])+"\t\t"+str(list_results[1][dtype])+"\t("+"%.3f" % percent_num_error+"%)\t"+str(list_results[2][dtype]+list_results[3][dtype])+"\t("+"%.3f" % percent_error+"%)\t""\n"
|
summary+=name+"\t"+str(list_results[0][dtype])+"\t\t"+str(list_results[1][dtype])+"\t("+"%.3f" % percent_num_error+"%)\t"+str(list_results[2][dtype]+list_results[3][dtype])+"\t("+"%.3f" % percent_error+"%)\t""\n"
|
||||||
list_results[0][4]+=list_results[0][dtype]
|
list_results[0][4]+=list_results[0][dtype]
|
||||||
list_results[1][4]+=list_results[1][dtype]
|
list_results[1][4]+=list_results[1][dtype]
|
||||||
list_results[2][4]+=list_results[2][dtype]
|
list_results[2][4]+=list_results[2][dtype]
|
||||||
list_results[3][4]+=list_results[3][dtype]
|
list_results[3][4]+=list_results[3][dtype]
|
||||||
|
|
||||||
if only_numbers==1:
|
if only_numbers==1:
|
||||||
print str(list_results[1][4])+"\n"+str(list_results[2][4]+list_results[3][4])
|
print(str(list_results[1][4])+"\n"+str(list_results[2][4]+list_results[3][4]))
|
||||||
else:
|
else:
|
||||||
print summary
|
print(summary)
|
||||||
if (list_results[0][4] > 0 ):
|
if (list_results[0][4] > 0 ):
|
||||||
percent_num_error=float(list_results[1][4])/float(list_results[0][4])*100
|
percent_num_error=float(list_results[1][4])/float(list_results[0][4])*100
|
||||||
percent_error=float(list_results[2][4]+list_results[3][4])/float(list_results[0][4])*100
|
percent_error=float(list_results[2][4]+list_results[3][4])/float(list_results[0][4])*100
|
||||||
else:
|
else:
|
||||||
percent_num_error=0
|
percent_num_error=0
|
||||||
percent_error=0
|
percent_error=0
|
||||||
if (prec=='x'):
|
if (prec=='x'):
|
||||||
print "--> ALL PRECISIONS\t"+str(list_results[0][4])+"\t\t"+str(list_results[1][4])+"\t("+"%.3f" % percent_num_error+"%)\t"+str(list_results[2][4]+list_results[3][4])+"\t("+"%.3f" % percent_error+"%)\t""\n"
|
print("--> ALL PRECISIONS\t"+str(list_results[0][4])+"\t\t"+str(list_results[1][4])+"\t("+"%.3f" % percent_num_error+"%)\t"+str(list_results[2][4]+list_results[3][4])+"\t("+"%.3f" % percent_error+"%)\t""\n")
|
||||||
if list_results[0][4] == 0:
|
if list_results[0][4] == 0:
|
||||||
print "NO TESTS WERE ANALYZED, please use the -r option to run the LAPACK TESTING"
|
print("NO TESTS WERE ANALYZED, please use the -r option to run the LAPACK TESTING")
|
||||||
|
|
||||||
# This may close the sys.stdout stream, so make it the last statement
|
# This may close the sys.stdout stream, so make it the last statement
|
||||||
f.close()
|
f.close()
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
####################################################################
|
####################################################################
|
||||||
# LAPACK make include file. #
|
# LAPACK make include file. #
|
||||||
# LAPACK, Version 3.6.0 #
|
# LAPACK, Version 3.6.1 #
|
||||||
# November 2015 #
|
# June 2016 #
|
||||||
####################################################################
|
####################################################################
|
||||||
#
|
#
|
||||||
SHELL = /bin/sh
|
SHELL = /bin/sh
|
||||||
|
|
Loading…
Reference in New Issue