LAPACK Archives

[Lapack] Patch for LAPACK CMake environment

Hi Tim,
Indeed there were some flows.
I corrected the CMAKE BUILD in our svn repository.
The current behavior is:
 - by default all precision are run
 - Just turn off the option BUILD_SINGLE of you do not want to build single 
precision.

Thank you for your contribution
Julie Langou



Begin forwarded message:

From: julie@Domain.Removed
Subject: [Lapack SVN] r1007 - in /lapack/trunk: BLAS/TESTING/CMakeLists.txt 
CMakeLists.txt CTestCustom.cmake.in SRC/CMakeLists.txt TESTING/CMakeLists.txt 
TESTING/EIG/CMakeLists.txt TESTING/LIN/CMakeLists.txt 
TESTING/MATGEN/CMakeLists.txt lapack_testing.py
Date: September 23, 2011 1:50:27 PM MDT
To: daniel.kressner@Domain.Removed, igor175@Domain.Removed, 
edwards@Domain.Removed, lipshitz@Domain.Removed, sven@Domain.Removed, 
julie@Domain.Removed, fike@Domain.Removed, rodney.james@Domain.Removed, 
bedrich.sousedik@Domain.Removed, julien.langou@Domain.Removed

Author: julie
Date: Fri Sep 23 15:50:27 2011
New Revision: 1007

URL: https://icl.cs.utk.edu/trac/lapack-dev/changeset/1007
Log:
Improve CMAKE BUILD system and OUTPUT PARSING when not all precisions are 
needed.
The following variables will control the precision to be built:
 BUILD_SINGLE
 BUILD_DOUBLE
 BUILD_COMPLEX
 BUILD_COMPLEX16

For mixed precision SINGLE/DOUBLE routines, both BUILD_SINGLE and 
BUILD_DOUBLE needs to be on.
(same for COMPLEX/COMPLEX16)


Modified:
   lapack/trunk/BLAS/TESTING/CMakeLists.txt
   lapack/trunk/CMakeLists.txt
   lapack/trunk/CTestCustom.cmake.in
   lapack/trunk/SRC/CMakeLists.txt
   lapack/trunk/TESTING/CMakeLists.txt
   lapack/trunk/TESTING/EIG/CMakeLists.txt
   lapack/trunk/TESTING/LIN/CMakeLists.txt
   lapack/trunk/TESTING/MATGEN/CMakeLists.txt
   lapack/trunk/lapack_testing.py

Modified: lapack/trunk/BLAS/TESTING/CMakeLists.txt
URL: 
https://icl.cs.utk.edu/trac/lapack-dev/file/lapack/trunk/BLAS/TESTING/CMakeLists.txt?rev=1007
==============================================================================
--- lapack/trunk/BLAS/TESTING/CMakeLists.txt (original)
+++ lapack/trunk/BLAS/TESTING/CMakeLists.txt Fri Sep 23 15:50:27 2011
@@ -33,31 +33,39 @@
  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()

Modified: lapack/trunk/CMakeLists.txt
URL: 
https://icl.cs.utk.edu/trac/lapack-dev/file/lapack/trunk/CMakeLists.txt?rev=1007
==============================================================================
--- lapack/trunk/CMakeLists.txt (original)
+++ lapack/trunk/CMakeLists.txt Fri Sep 23 15:50:27 2011
@@ -80,6 +80,14 @@
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)

Modified: lapack/trunk/CTestCustom.cmake.in
URL: 
https://icl.cs.utk.edu/trac/lapack-dev/file/lapack/trunk/CTestCustom.cmake.in?rev=1007
==============================================================================
--- lapack/trunk/CTestCustom.cmake.in (original)
+++ lapack/trunk/CTestCustom.cmake.in Fri Sep 23 15:50:27 2011
@@ -43,4 +43,4 @@
  "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

Modified: lapack/trunk/SRC/CMakeLists.txt
URL: 
https://icl.cs.utk.edu/trac/lapack-dev/file/lapack/trunk/SRC/CMakeLists.txt?rev=1007
==============================================================================
--- lapack/trunk/SRC/CMakeLists.txt (original)
+++ lapack/trunk/SRC/CMakeLists.txt Fri Sep 23 15:50:27 2011
@@ -377,20 +377,30 @@
  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)

Modified: lapack/trunk/TESTING/CMakeLists.txt
URL: 
https://icl.cs.utk.edu/trac/lapack-dev/file/lapack/trunk/TESTING/CMakeLists.txt?rev=1007
==============================================================================
--- lapack/trunk/TESTING/CMakeLists.txt (original)
+++ lapack/trunk/TESTING/CMakeLists.txt Fri Sep 23 15:50:27 2011
@@ -14,7 +14,7 @@
  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} 
@@ -23,49 +23,11 @@
  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 ===========================
@@ -126,125 +88,147 @@


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 ===========================

@@ -303,6 +287,25 @@


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()

# 
==============================================================================


Modified: lapack/trunk/TESTING/EIG/CMakeLists.txt
URL: 
https://icl.cs.utk.edu/trac/lapack-dev/file/lapack/trunk/TESTING/EIG/CMakeLists.txt?rev=1007
==============================================================================
--- lapack/trunk/TESTING/EIG/CMakeLists.txt (original)
+++ lapack/trunk/TESTING/EIG/CMakeLists.txt Fri Sep 23 15:50:27 2011
@@ -122,14 +122,22 @@
  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()

Modified: lapack/trunk/TESTING/LIN/CMakeLists.txt
URL: 
https://icl.cs.utk.edu/trac/lapack-dev/file/lapack/trunk/TESTING/LIN/CMakeLists.txt?rev=1007
==============================================================================
--- lapack/trunk/TESTING/LIN/CMakeLists.txt (original)
+++ lapack/trunk/TESTING/LIN/CMakeLists.txt Fri Sep 23 15:50:27 2011
@@ -192,32 +192,30 @@
  target_link_libraries(${name} tmglib lapack)
endmacro(add_lin_executable)

-add_lin_executable(xlintsts ${ALINTST} ${SCLNTST} ${SLINTST} 
-  ${SECOND_SRC} )
+IF(BUILD_SINGLE)
+add_lin_executable(xlintsts ${ALINTST} ${SCLNTST} ${SLINTST} ${SECOND_SRC} )
+add_lin_executable(xlintstrfs ${SLINTSTRFP} ${SECOND_SRC})
+endif()

-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_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()

Modified: lapack/trunk/TESTING/MATGEN/CMakeLists.txt
URL: 
https://icl.cs.utk.edu/trac/lapack-dev/file/lapack/trunk/TESTING/MATGEN/CMakeLists.txt?rev=1007
==============================================================================
--- lapack/trunk/TESTING/MATGEN/CMakeLists.txt (original)
+++ lapack/trunk/TESTING/MATGEN/CMakeLists.txt Fri Sep 23 15:50:27 2011
@@ -39,7 +39,7 @@

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)

@@ -49,21 +49,26 @@

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)

Modified: lapack/trunk/lapack_testing.py
URL: 
https://icl.cs.utk.edu/trac/lapack-dev/file/lapack/trunk/lapack_testing.py?rev=1007
==============================================================================
--- lapack/trunk/lapack_testing.py (original)
+++ lapack/trunk/lapack_testing.py Fri Sep 23 15:50:27 2011
@@ -42,8 +42,10 @@
      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"
@@ -80,8 +82,10 @@
# 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
@@ -94,10 +98,11 @@
   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
@@ -114,13 +119,14 @@
      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))
@@ -169,11 +175,16 @@
   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':
@@ -248,7 +259,7 @@
        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)
@@ -258,7 +269,7 @@
     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):
@@ -276,9 +287,13 @@
#        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]
@@ -288,11 +303,16 @@
   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()




On Sep 22, 2011, at 8:07 AM, Tim Cera wrote:

Hello,
 
I had to edit several of the CMakeList.txt files for lapack-3.3.1 in order to 
use on my system.
 
Critical change:
In TESTING/MATGEN/CMakeLists.txt there are several variable contents that use 
$(var) instead of ${var}.  At least my CMake 2.6 on Linux wouldn?t work at 
all.
 
All of the other changes involve the tests.  Basically if you confined the 
build to single, double, ?etc., the tests still tried to test all functions.  
I carried the BUILD_SIMPLE, BUILD_DOUBLE, ?etc. variables and logic into the 
TESTING CMakeLists.txt.  Also had to change the logic somewhat so that a 
plain ?make? would make all subroutines/tests.
 
Please find a patch file attached.
 
----
Tim Cera, P.E.
Senior Professional Engineer
St. Johns River Water Management District
http://www.sjrwmd.com
Phone: (386) 227-0420
4049 Reid Street/Highway 100 West
Palatka, FL 32177
 
Please note: Florida has a very broad public records law. Most written 
communications to or from government employees regarding state business are 
public records available to the public and media upon request. Your e-mail 
communications may therefore be subject to public disclosure.
 
<cmakeenv_lapack-3.3.1.patch>_______________________________________________
Lapack mailing list
Lapack@Domain.Removed
http://lists.eecs.utk.edu/mailman/listinfo/lapack

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://lists.eecs.utk.edu/mailman/private/lapack/attachments/20110923/64cf614b/attachment-0001.html
 

<Prev in Thread] Current Thread [Next in Thread>


For additional information you may use the LAPACK/ScaLAPACK Forum.
Or one of the mailing lists, or