get_target_property(TEST_LOC ${name} LOCATION)
target_link_libraries(${name} blas)
if(EXISTS "${TEST_INPUT}")
- add_test(${name} "${CMAKE_COMMAND}"
+ add_test(BLAS-${name} "${CMAKE_COMMAND}"
-DTEST=${TEST_LOC}
-DINPUT=${TEST_INPUT}
-DINTDIR=${CMAKE_CFG_INTDIR}
-P "${LAPACK_SOURCE_DIR}/TESTING/runtest.cmake")
else()
- add_test(${name} "${CMAKE_COMMAND}"
+ add_test(BLAS-${name} "${CMAKE_COMMAND}"
-DTEST=${TEST_LOC}
-DINTDIR=${CMAKE_CFG_INTDIR}
-P "${LAPACK_SOURCE_DIR}/TESTING/runtest.cmake")
endif()
endmacro(add_blas_test)
-add_blas_test(xblat1s sblat1.f)
-add_blas_test(xblat1c cblat1.f)
-add_blas_test(xblat1d dblat1.f)
-add_blas_test(xblat1z zblat1.f)
+if(BUILD_SINGLE)
+ add_blas_test(xblat1s sblat1.f)
+ add_blas_test(xblat2s sblat2.f)
+ add_blas_test(xblat3s sblat3.f)
+endif()
-add_blas_test(xblat2s sblat2.f sblat2.in)
-add_blas_test(xblat2c cblat2.f )
-add_blas_test(xblat2d dblat2.f)
-add_blas_test(xblat2z zblat2.f)
+if(BUILD_DOUBLE)
+ add_blas_test(xblat1d dblat1.f)
+ add_blas_test(xblat2d dblat2.f)
+ add_blas_test(xblat3d dblat3.f)
+endif()
-add_blas_test(xblat3s sblat3.f)
-add_blas_test(xblat3c cblat3.f)
-add_blas_test(xblat3d dblat3.f)
-add_blas_test(xblat3z zblat3.f)
+if(BUILD_COMPLEX)
+ add_blas_test(xblat1c cblat1.f)
+ add_blas_test(xblat2c cblat2.f)
+ add_blas_test(xblat3c cblat3.f)
+endif()
+if(BUILD_COMPLEX16)
+ add_blas_test(xblat1z zblat1.f)
+ add_blas_test(xblat2z zblat2.f)
+ add_blas_test(xblat3z zblat3.f)
+endif()
set(PKG_CONFIG_DIR ${libdir}/pkgconfig)
# --------------------------------------------------
+# Precision to build
+# By default all precisions are generated
+
+option(BUILD_SINGLE "Build LAPACK Single Precision" ON)
+option(BUILD_DOUBLE "Build LAPACK Double Precision" ON)
+option(BUILD_COMPLEX "Build LAPACK Complex Precision" ON)
+option(BUILD_COMPLEX16 "Build LAPACK Double Complex Precision" ON)
+# --------------------------------------------------
# Subdirectories that need to be processed
option(USE_OPTIMIZED_BLAS "Whether or not to use an optimized BLAS library instead of included netlib BLAS" OFF)
"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
+SET(CTEST_CUSTOM_POST_TEST "./lapack_testing.py -s -d TESTING")
\ No newline at end of file
set(ALLXOBJ ${SXLASRC} ${DXLASRC} ${CXLASRC} ${ZXLASRC} ${ALLXAUX})
endif()
-set(ALLOBJ ${SLASRC} ${DLASRC} ${CLASRC} ${ZLASRC} ${SCLAUX} ${DZLAUX}
- ${ALLAUX})
if(BUILD_SINGLE)
set(ALLOBJ ${SLASRC} ${ALLAUX} ${SCLAUX} )
+message(STATUS "Building Single Precision")
endif()
if(BUILD_DOUBLE)
- set(ALLOBJ ${DLASRC} ${ALLAUX} ${DZLAUX} ${DSLASRC})
+ set(ALLOBJ ${ALLOBJ} ${DLASRC} ${ALLAUX} ${DZLAUX} ${DSLASRC})
+message(STATUS "Building Double Precision")
endif()
if(BUILD_COMPLEX)
- set(ALLOBJ ${CLASRC} ${ALLAUX} ${SCLAUX} )
+ set(ALLOBJ ${ALLOBJ} ${CLASRC} ${ALLAUX} ${SCLAUX} )
+message(STATUS "Building Complex Precision")
endif()
if(BUILD_COMPLEX16)
- set(ALLOBJ ${ZLASRC} ${ALLAUX} ${DZLAUX} ${ZCLASRC})
+ set(ALLOBJ ${ALLOBJ} ${ZLASRC} ${ALLAUX} ${DZLAUX} ${ZCLASRC})
+message(STATUS "Building Double Complex Precision")
endif()
+
+if (NOT ALLOBJ)
+ message(FATAL_ERROR "-->LAPACK SRC BUILD: NOTHING TO BUILD, NO PRECISION SELECTED:
+ PLEASE ENABLE AT LEAST ONE OF THOSE: BUILD_SINGLE, BUILD_COMPLEX, BUILD_DOUBLE, BUILD_COMPLEX16.")
+endif()
+
+list(REMOVE_DUPLICATES ALLOBJ)
+
add_library(lapack ${ALLOBJ} ${ALLXOBJ})
target_link_libraries(lapack ${BLAS_LIBRARIES} ${XBLAS_LIBRARY})
lapack_install_library(lapack)
string(REPLACE "." "_" input_name ${input})
set(testName "${target}_${input_name}")
if(EXISTS "${TEST_INPUT}")
- add_test(${testName} "${CMAKE_COMMAND}"
+ add_test(LAPACK-${testName} "${CMAKE_COMMAND}"
-DTEST=${TEST_LOC}
-DINPUT=${TEST_INPUT}
-DOUTPUT=${TEST_OUTPUT}
endif()
endmacro(add_lapack_test)
+if (BUILD_SINGLE)
add_lapack_test(stest.out stest.in xlintsts)
-
-add_lapack_test(ctest.out ctest.in xlintstc)
-#
-# ======== DOUBLE LIN TESTS ===========================
-
-add_lapack_test(dtest.out dtest.in xlintstd)
-
-#
-# ======== COMPLEX16 LIN TESTS ========================
-
-add_lapack_test(ztest.out ztest.in xlintstz)
-
-#
-# ======== SINGLE-DOUBLE PROTO LIN TESTS ==============
-
-add_lapack_test(dstest.out dstest.in xlintstds)
-
-#
-# ======== COMPLEX-COMPLEX16 LIN TESTS ========================
-
-add_lapack_test(zctest.out zctest.in xlintstzc)
-
#
# ======== SINGLE RFP LIN TESTS ========================
-
add_lapack_test(stest_rfp.out stest_rfp.in xlintstrfs)
-
-#
-# ======== COMPLEX16 RFP LIN TESTS ========================
-
-add_lapack_test(dtest_rfp.out dtest_rfp.in xlintstrfd)
-
-#
-# ======== COMPLEX16 RFP LIN TESTS ========================
-
-add_lapack_test(ctest_rfp.out ctest_rfp.in xlintstrfc)
-
-#
-# ======== COMPLEX16 RFP LIN TESTS ========================
-
-add_lapack_test(ztest_rfp.out ztest_rfp.in xlintstrfz)
-
#
#
# ======== SINGLE EIG TESTS ===========================
add_lapack_test(slse.out lse.in xeigtsts)
+endif()
+if (BUILD_DOUBLE)
#
-# ======== COMPLEX EIG TESTS ===========================
+# ======== DOUBLE LIN TESTS ===========================
+add_lapack_test(dtest.out dtest.in xlintstd)
+#
+# ======== DOUBLE RFP LIN TESTS ========================
+add_lapack_test(dtest_rfp.out dtest_rfp.in xlintstrfd)
+#
+# ======== DOUBLE EIG TESTS ===========================
-add_lapack_test(cnep.out nep.in xeigtstc)
+add_lapack_test(dnep.out nep.in xeigtstd)
-add_lapack_test(csep.out sep.in xeigtstc)
+add_lapack_test(dsep.out sep.in xeigtstd)
-add_lapack_test(csvd.out svd.in xeigtstc)
+add_lapack_test(dsvd.out svd.in xeigtstd)
-add_lapack_test(cec.out cec.in xeigtstc)
+add_lapack_test(dec.out dec.in xeigtstd)
-add_lapack_test(ced.out ced.in xeigtstc)
+add_lapack_test(ded.out ded.in xeigtstd)
-add_lapack_test(cgg.out cgg.in xeigtstc)
+add_lapack_test(dgg.out dgg.in xeigtstd)
-add_lapack_test(cgd.out cgd.in xeigtstc)
+add_lapack_test(dgd.out dgd.in xeigtstd)
-add_lapack_test(csb.out csb.in xeigtstc)
+add_lapack_test(dsb.out dsb.in xeigtstd)
-add_lapack_test(csg.out csg.in xeigtstc)
+add_lapack_test(dsg.out dsg.in xeigtstd)
-add_lapack_test(cbal.out cbal.in xeigtstc)
+add_lapack_test(dbal.out dbal.in xeigtstd)
-add_lapack_test(cbak.out cbak.in xeigtstc)
+add_lapack_test(dbak.out dbak.in xeigtstd)
-add_lapack_test(cgbal.out cgbal.in xeigtstc)
+add_lapack_test(dgbal.out dgbal.in xeigtstd)
-add_lapack_test(cgbak.out cgbak.in xeigtstc)
+add_lapack_test(dgbak.out dgbak.in xeigtstd)
-add_lapack_test(cbb.out cbb.in xeigtstc)
+add_lapack_test(dbb.out dbb.in xeigtstd)
-add_lapack_test(cglm.out glm.in xeigtstc)
+add_lapack_test(dglm.out glm.in xeigtstd)
-add_lapack_test(cgqr.out gqr.in xeigtstc)
+add_lapack_test(dgqr.out gqr.in xeigtstd)
-add_lapack_test(cgsv.out gsv.in xeigtstc)
+add_lapack_test(dgsv.out gsv.in xeigtstd)
-add_lapack_test(ccsd.out csd.in xeigtstc)
+add_lapack_test(dcsd.out csd.in xeigtstd)
-add_lapack_test(clse.out lse.in xeigtstc)
+add_lapack_test(dlse.out lse.in xeigtstd)
+endif()
+if (BUILD_COMPLEX)
+add_lapack_test(ctest.out ctest.in xlintstc)
#
-# ======== DOUBLE EIG TESTS ===========================
+# ======== COMPLEX RFP LIN TESTS ========================
+add_lapack_test(ctest_rfp.out ctest_rfp.in xlintstrfc)
+#
+# ======== COMPLEX EIG TESTS ===========================
-add_lapack_test(dnep.out nep.in xeigtstd)
+add_lapack_test(cnep.out nep.in xeigtstc)
-add_lapack_test(dsep.out sep.in xeigtstd)
+add_lapack_test(csep.out sep.in xeigtstc)
-add_lapack_test(dsvd.out svd.in xeigtstd)
+add_lapack_test(csvd.out svd.in xeigtstc)
-add_lapack_test(dec.out dec.in xeigtstd)
+add_lapack_test(cec.out cec.in xeigtstc)
-add_lapack_test(ded.out ded.in xeigtstd)
+add_lapack_test(ced.out ced.in xeigtstc)
-add_lapack_test(dgg.out dgg.in xeigtstd)
+add_lapack_test(cgg.out cgg.in xeigtstc)
-add_lapack_test(dgd.out dgd.in xeigtstd)
+add_lapack_test(cgd.out cgd.in xeigtstc)
-add_lapack_test(dsb.out dsb.in xeigtstd)
+add_lapack_test(csb.out csb.in xeigtstc)
-add_lapack_test(dsg.out dsg.in xeigtstd)
+add_lapack_test(csg.out csg.in xeigtstc)
-add_lapack_test(dbal.out dbal.in xeigtstd)
+add_lapack_test(cbal.out cbal.in xeigtstc)
-add_lapack_test(dbak.out dbak.in xeigtstd)
+add_lapack_test(cbak.out cbak.in xeigtstc)
-add_lapack_test(dgbal.out dgbal.in xeigtstd)
+add_lapack_test(cgbal.out cgbal.in xeigtstc)
-add_lapack_test(dgbak.out dgbak.in xeigtstd)
+add_lapack_test(cgbak.out cgbak.in xeigtstc)
-add_lapack_test(dbb.out dbb.in xeigtstd)
+add_lapack_test(cbb.out cbb.in xeigtstc)
-add_lapack_test(dglm.out glm.in xeigtstd)
+add_lapack_test(cglm.out glm.in xeigtstc)
-add_lapack_test(dgqr.out gqr.in xeigtstd)
+add_lapack_test(cgqr.out gqr.in xeigtstc)
-add_lapack_test(dgsv.out gsv.in xeigtstd)
+add_lapack_test(cgsv.out gsv.in xeigtstc)
-add_lapack_test(dcsd.out csd.in xeigtstd)
+add_lapack_test(ccsd.out csd.in xeigtstc)
-add_lapack_test(dlse.out lse.in xeigtstd)
+add_lapack_test(clse.out lse.in xeigtstc)
+endif()
+if (BUILD_COMPLEX16)
+#
+# ======== COMPLEX16 LIN TESTS ========================
+add_lapack_test(ztest.out ztest.in xlintstz)
+#
+# ======== COMPLEX16 RFP LIN TESTS ========================
+add_lapack_test(ztest_rfp.out ztest_rfp.in xlintstrfz)
#
# ======== COMPLEX16 EIG TESTS ===========================
add_lapack_test(zlse.out lse.in xeigtstz)
+endif()
+
+
+if (BUILD_SIMPLE)
+ if (BUILD_DOUBLE)
+#
+# ======== SINGLE-DOUBLE PROTO LIN TESTS ==============
+ add_lapack_test(dstest.out dstest.in xlintstds)
+ endif()
+endif()
+
+
+if (BUILD_COMPLEX)
+ if (BUILD_COMPLEX16)
+#
+# ======== COMPLEX-COMPLEX16 LIN TESTS ========================
+ add_lapack_test(zctest.out zctest.in xlintstzc)
+ endif()
+endif()
# ==============================================================================
target_link_libraries(${name} tmglib lapack )
endmacro(add_eig_executable)
+if (BUILD_SINGLE)
add_eig_executable(xeigtsts ${SEIGTST} ${SCIGTST} ${AEIGTST}
${SECOND_SRC} )
+endif()
+if (BUILD_COMPLEX)
add_eig_executable(xeigtstc ${CEIGTST} ${SCIGTST} ${AEIGTST}
${SECOND_SRC} )
+endif()
+if (BUILD_DOUBLE)
add_eig_executable(xeigtstd ${DEIGTST} ${DZIGTST} ${AEIGTST}
${DSECOND_SRC} )
+endif()
+if (BUILD_COMPLEX16)
add_eig_executable(xeigtstz ${ZEIGTST} ${DZIGTST} ${AEIGTST}
${DSECOND_SRC} )
+endif()
target_link_libraries(${name} tmglib lapack)
endmacro(add_lin_executable)
-add_lin_executable(xlintsts ${ALINTST} ${SCLNTST} ${SLINTST}
- ${SECOND_SRC} )
-
-add_lin_executable(xlintstc ${ALINTST} ${CLINTST} ${SCLNTST}
- ${SECOND_SRC} )
-
-add_lin_executable(xlintstd ${ALINTST} ${DLINTST} ${DZLNTST}
- ${DSECOND_SRC})
-add_lin_executable(xlintstz ${ALINTST} ${ZLINTST} ${DZLNTST}
- ${DSECOND_SRC})
-
-add_lin_executable(xlintstds ${DSLINTST}
- ${SECOND_SRC}
- ${DSECOND_SRC} )
-add_lin_executable(xlintstzc ${ZCLINTST}
- ${SECOND_SRC}
- ${DSECOND_SRC} )
-
-add_lin_executable(xlintstrfs ${SLINTSTRFP}
- ${SECOND_SRC})
-
-add_lin_executable(xlintstrfd ${DLINTSTRFP}
- ${DSECOND_SRC})
-
-add_lin_executable(xlintstrfc ${CLINTSTRFP}
- ${SECOND_SRC})
-add_lin_executable(xlintstrfz ${ZLINTSTRFP}
- ${DSECOND_SRC})
+IF(BUILD_SINGLE)
+add_lin_executable(xlintsts ${ALINTST} ${SCLNTST} ${SLINTST} ${SECOND_SRC} )
+add_lin_executable(xlintstrfs ${SLINTSTRFP} ${SECOND_SRC})
+endif()
+
+if(BUILD_DOUBLE)
+add_lin_executable(xlintstd ${ALINTST} ${DLINTST} ${DZLNTST} ${DSECOND_SRC})
+add_lin_executable(xlintstrfd ${DLINTSTRFP} ${DSECOND_SRC})
+endif()
+
+IF(BUILD_SINGLE AND BUILD_DOUBLE)
+add_lin_executable(xlintstds ${DSLINTST} ${SECOND_SRC} ${DSECOND_SRC} )
+endif()
+if(BUILD_COMPLEX)
+add_lin_executable(xlintstc ${ALINTST} ${CLINTST} ${SCLNTST} ${SECOND_SRC} )
+add_lin_executable(xlintstrfc ${CLINTSTRFP} ${SECOND_SRC})
+endif()
+
+if(BUILD_COMPLEX16)
+add_lin_executable(xlintstz ${ALINTST} ${ZLINTST} ${DZLNTST} ${DSECOND_SRC})
+add_lin_executable(xlintstrfz ${ZLINTSTRFP} ${DSECOND_SRC})
+endif()
+
+IF(BUILD_COMPLEX AND BUILD_COMPLEX16)
+add_lin_executable(xlintstzc ${ZCLINTST} ${SECOND_SRC} ${DSECOND_SRC} )
+endif()
set(CMATGEN clatms.f clatme.f clatmr.f clatmt.f
clagge.f claghe.f clagsy.f clakf2.f clarge.f claror.f clarot.f
- clatm1.f clarnd.f clatm2.f clatm3.f clatm5.f clatm6.f clahilb.f)
+ clatm1.f clarnd.f clatm2.f clatm3.f clatm5.f clatm6.f clahilb.f slatm7.f)
set(DZATGEN dlatm1.f dlaran.f dlarnd.f)
set(ZMATGEN zlatms.f zlatme.f zlatmr.f zlatmt.f
zlagge.f zlaghe.f zlagsy.f zlakf2.f zlarge.f zlaror.f zlarot.f
- zlatm1.f zlarnd.f zlatm2.f zlatm3.f zlatm5.f zlatm6.f zlahilb.f)
+ zlatm1.f zlarnd.f zlatm2.f zlatm3.f zlatm5.f zlatm6.f zlahilb.f dlatm7.f)
-set(ALLOBJ ${SMATGEN} ${CMATGEN} ${SCATGEN} ${DMATGEN} ${ZMATGEN}
- ${DZATGEN})
if(BUILD_SINGLE)
- set(ALLOBJ $(SMATGEN) $(SCATGEN))
+ set(ALLOBJ ${SMATGEN} ${SCATGEN})
endif()
if(BUILD_DOUBLE)
- set(ALLOBJ $(DMATGEN) $(DZATGEN))
+ set(ALLOBJ ${ALLOBJ} ${DMATGEN} ${DZATGEN})
endif()
if(BUILD_COMPLEX)
- set(ALLOBJ $(CMATGEN) $(SCATGEN))
+ set(ALLOBJ ${ALLOBJ} ${CMATGEN} ${SCATGEN})
endif()
if(BUILD_COMPLEX16)
- set(ALLOBJ $(ZMATGEN) $(DZATGEN))
+ set(ALLOBJ ${ALLOBJ} ${ZMATGEN} ${DZATGEN})
+endif()
+
+list(REMOVE_DUPLICATES ALLOBJ)
+
+if (NOT ALLOBJ)
+set(ALLOBJ ${SMATGEN} ${CMATGEN} ${SCATGEN} ${DMATGEN} ${ZMATGEN}
+ ${DZATGEN})
endif()
add_library(tmglib ${ALLOBJ} )
target_link_libraries(tmglib lapack)
print " - p [s/c/d/z/x] is to indicate the PRECISION to run:"
print " s=single"
print " d=double"
+ print " sd=single/double"
print " c=complex"
print " z=double complex"
+ print " cz=complex/double complex"
print " x=all [DEFAULT]"
print " - t [lin/eig/mixed/rfp/all] is to indicate which TEST FAMILY to run:"
print " lin=Linear Equation"
# process options
os.chdir(dir)
execution=1
-summary="SUMMARY \tnumerical error \tother error \n";
-summary+="================ \t=================\t================ \n";
+summary="\n\t\t\t--> LAPACK TESTING SUMMARY <--\n";
+if with_file: summary+= "\t\tProcessing LAPACK Testing output found in the "+dir+" direcory\n";
+summary+="SUMMARY \tnb test run \tnumerical error \tother error \n";
+summary+="================ \t===========\t=================\t================ \n";
nb_of_test=0
# Add current directory to the path for subshells of this shell
nb_test_fail=0
nb_test_illegal=0
nb_test_info=0
- if (with_file==1):
+ 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
pipe = open(outfile,'r')
error_message=cmdline+" did not work"
- if r != 0 and (with_file==0):
+ 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==1):
- print "---- ERROR: You used the option -f, please check that you have the LAPACK output!"
- print "---- "+error_message
+ 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))
range_prec=[0]
elif prec=='d':
range_prec=[1]
+elif prec=='sd':
+ range_prec=[0,1]
elif prec=='c':
range_prec=[2]
elif prec=='z':
range_prec=[3]
-else:
+elif prec=='cz':
+ range_prec=[2,3]
+else:
+ prec='x';
range_prec=range(4)
if test=='lin':
else:
# EIG TESTS
cmdbase="xeigtst"+letter+" < "+dtests[0][dtest]+".in > "+dtests[2][dtest]+".out"
- if (just_errors==0 and short_summary==0):
+ if (not just_errors and not short_summary):
print "--> Testing "+name+" "+dtests[1][dtest]+" [ "+cmdbase+" ]"
# Run the process: either to read the file or run the LAPACK testing
nb_test = run_summary_test(f, cmdbase, short_summary)
list_results[3][dtype]+=nb_test[3]
got_error=nb_test[1]+nb_test[2]+nb_test[3]
- if (short_summary==0):
+ if (not short_summary):
if (nb_test[0]>0 and just_errors==0):
print "--> Tests passed: "+str(nb_test[0])
if (nb_test[1]>0):
# print dtests[2][dtest]+".out \t"+str(nb_test[1])+"\t"+str(nb_test[2])+"\t"+str(nb_test[3])
sys.stdout.flush()
- 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
- summary+=name+"\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"
+ if (list_results[0][dtype] > 0 ):
+ 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
+ else:
+ percent_num_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"
list_results[0][4]+=list_results[0][dtype]
list_results[1][4]+=list_results[1][dtype]
list_results[2][4]+=list_results[2][dtype]
print str(list_results[1][4])+"\n"+str(list_results[2][4]+list_results[3][4])
else:
print summary
- 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
- print "--> ALL PRECISIONS \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 ):
+ 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
+ else:
+ percent_num_error=0
+ percent_error=0
+ 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"
+ if list_results[0][4] == 0:
+ 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
f.close()