diff -Nru lapack-3.7.0/appveyor.yml lapack-3.7.1/appveyor.yml --- lapack-3.7.0/appveyor.yml 1970-01-01 00:00:00.000000000 +0000 +++ lapack-3.7.1/appveyor.yml 2017-06-17 22:46:53.000000000 +0000 @@ -0,0 +1,64 @@ +# Windows testing. +# Syntax for this file: +# http://www.appveyor.com/docs/appveyor-yml + +shallow_clone: true + +platform: x64 + +cache: + - x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z + - i686-4.9.2-release-win32-dwarf-rt_v4-rev4.7z + +environment: + CTEST_OUTPUT_ON_FAILURE: 1 + matrix: + - MINGW_DIR: mingw64 + MINGW_URL: https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.9.2/threads-win32/seh/x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z/download + MINGW_ARCHIVE: x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z + - MINGW_DIR: mingw32 + MINGW_URL: https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.9.2/threads-win32/dwarf/i686-4.9.2-release-win32-dwarf-rt_v4-rev4.7z/download + MINGW_ARCHIVE: i686-4.9.2-release-win32-dwarf-rt_v4-rev4.7z + +install: + - if not exist "%MINGW_ARCHIVE%" appveyor DownloadFile "%MINGW_URL%" -FileName "%MINGW_ARCHIVE%" + - 7z x -y "%MINGW_ARCHIVE%" > nul + # CMake refuses to generate MinGW Makefiles if sh.exe is in the Path + - ps: Get-Command sh.exe -All | Remove-Item + +build_script: + - echo "NUMBER_OF_PROCESSORS=%NUMBER_OF_PROCESSORS%" + - set PATH=%CD%\%MINGW_DIR%\bin;%PATH% + - g++ --version + - mingw32-make --version + - cmake --version + - if "%APPVEYOR_REPO_TAG%"=="true" (set CMAKE_BUILD_TYPE=Release) else (set CMAKE_BUILD_TYPE=Debug) + - set SRC_DIR=%CD% + - echo %SRC_DIR% + - set BLD_DIR=%SRC_DIR%\..\lapack-appveyor-bld + - set INST_DIR=%SRC_DIR%\..\lapack-appveyor-install + - mkdir -p %BLD_DIR% + - cd %BLD_DIR% + # See issue #17 on github dashboard. Once resolved, use -DCBLAS=ON + # - cmake -DCMAKE_INSTALL_PREFIX=${INST_DIR} -DLAPACKE=ON ${SRC_DIR} + - cmake + -G "MinGW Makefiles" + -DBUILDNAME:STRING="appveyor-%MINGW_DIR%-%APPVEYOR_REPO_BRANCH%" + -DCMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE% + -DCMAKE_INSTALL_PREFIX=%INST_DIR% + -DCBLAS:BOOL=ON + -DLAPACKE:BOOL=ON + -DBUILD_TESTING=ON + -DLAPACKE_WITH_TMG:BOOL=ON + %SRC_DIR% + - mingw32-make -j%NUMBER_OF_PROCESSORS% + +test_script: + - ctest -D ExperimentalStart + - ctest -D ExperimentalConfigure + - ctest -D ExperimentalBuild -j%NUMBER_OF_PROCESSORS% + - ctest -D ExperimentalTest --schedule-random -j%NUMBER_OF_PROCESSORS% --output-on-failure --timeout 100 -E "CBLAS\-.*cblat1" + - ctest -D ExperimentalSubmit + +after_test: + - mingw32-make install -j%NUMBER_OF_PROCESSORS% diff -Nru lapack-3.7.0/BLAS/blas.pc.in lapack-3.7.1/BLAS/blas.pc.in --- lapack-3.7.0/BLAS/blas.pc.in 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/blas.pc.in 2017-06-17 22:46:53.000000000 +0000 @@ -1,9 +1,8 @@ -prefix=@prefix@ -libdir=@libdir@ +libdir=@CMAKE_INSTALL_FULL_LIBDIR@ +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ Name: BLAS Description: FORTRAN reference implementation of BLAS Basic Linear Algebra Subprograms Version: @LAPACK_VERSION@ URL: http://www.netlib.org/blas/ Libs: -L${libdir} -lblas -Libs.private: -lm diff -Nru lapack-3.7.0/BLAS/cblat2.in lapack-3.7.1/BLAS/cblat2.in --- lapack-3.7.0/BLAS/cblat2.in 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/cblat2.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ -'cblat2.out' NAME OF SUMMARY OUTPUT FILE -6 UNIT NUMBER OF SUMMARY FILE -'CBLA2T.SNAP' NAME OF SNAPSHOT OUTPUT FILE --1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0) -F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD. -F LOGICAL FLAG, T TO STOP ON FAILURES. -T LOGICAL FLAG, T TO TEST ERROR EXITS. -16.0 THRESHOLD VALUE OF TEST RATIO -6 NUMBER OF VALUES OF N -0 1 2 3 5 9 VALUES OF N -4 NUMBER OF VALUES OF K -0 1 2 4 VALUES OF K -4 NUMBER OF VALUES OF INCX AND INCY -1 2 -1 -2 VALUES OF INCX AND INCY -3 NUMBER OF VALUES OF ALPHA -(0.0,0.0) (1.0,0.0) (0.7,-0.9) VALUES OF ALPHA -3 NUMBER OF VALUES OF BETA -(0.0,0.0) (1.0,0.0) (1.3,-1.1) VALUES OF BETA -CGEMV T PUT F FOR NO TEST. SAME COLUMNS. -CGBMV T PUT F FOR NO TEST. SAME COLUMNS. -CHEMV T PUT F FOR NO TEST. SAME COLUMNS. -CHBMV T PUT F FOR NO TEST. SAME COLUMNS. -CHPMV T PUT F FOR NO TEST. SAME COLUMNS. -CTRMV T PUT F FOR NO TEST. SAME COLUMNS. -CTBMV T PUT F FOR NO TEST. SAME COLUMNS. -CTPMV T PUT F FOR NO TEST. SAME COLUMNS. -CTRSV T PUT F FOR NO TEST. SAME COLUMNS. -CTBSV T PUT F FOR NO TEST. SAME COLUMNS. -CTPSV T PUT F FOR NO TEST. SAME COLUMNS. -CGERC T PUT F FOR NO TEST. SAME COLUMNS. -CGERU T PUT F FOR NO TEST. SAME COLUMNS. -CHER T PUT F FOR NO TEST. SAME COLUMNS. -CHPR T PUT F FOR NO TEST. SAME COLUMNS. -CHER2 T PUT F FOR NO TEST. SAME COLUMNS. -CHPR2 T PUT F FOR NO TEST. SAME COLUMNS. diff -Nru lapack-3.7.0/BLAS/cblat3.in lapack-3.7.1/BLAS/cblat3.in --- lapack-3.7.0/BLAS/cblat3.in 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/cblat3.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -'cblat3.out' NAME OF SUMMARY OUTPUT FILE -6 UNIT NUMBER OF SUMMARY FILE -'CBLAT3.SNAP' NAME OF SNAPSHOT OUTPUT FILE --1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0) -F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD. -F LOGICAL FLAG, T TO STOP ON FAILURES. -T LOGICAL FLAG, T TO TEST ERROR EXITS. -16.0 THRESHOLD VALUE OF TEST RATIO -6 NUMBER OF VALUES OF N -0 1 2 3 5 9 VALUES OF N -3 NUMBER OF VALUES OF ALPHA -(0.0,0.0) (1.0,0.0) (0.7,-0.9) VALUES OF ALPHA -3 NUMBER OF VALUES OF BETA -(0.0,0.0) (1.0,0.0) (1.3,-1.1) VALUES OF BETA -CGEMM T PUT F FOR NO TEST. SAME COLUMNS. -CHEMM T PUT F FOR NO TEST. SAME COLUMNS. -CSYMM T PUT F FOR NO TEST. SAME COLUMNS. -CTRMM T PUT F FOR NO TEST. SAME COLUMNS. -CTRSM T PUT F FOR NO TEST. SAME COLUMNS. -CHERK T PUT F FOR NO TEST. SAME COLUMNS. -CSYRK T PUT F FOR NO TEST. SAME COLUMNS. -CHER2K T PUT F FOR NO TEST. SAME COLUMNS. -CSYR2K T PUT F FOR NO TEST. SAME COLUMNS. diff -Nru lapack-3.7.0/BLAS/CMakeLists.txt lapack-3.7.1/BLAS/CMakeLists.txt --- lapack-3.7.0/BLAS/CMakeLists.txt 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/CMakeLists.txt 2017-06-17 22:46:53.000000000 +0000 @@ -1,6 +1,6 @@ add_subdirectory(SRC) if(BUILD_TESTING) -add_subdirectory(TESTING) + add_subdirectory(TESTING) endif() configure_file(${CMAKE_CURRENT_SOURCE_DIR}/blas.pc.in ${CMAKE_CURRENT_BINARY_DIR}/blas.pc @ONLY) install(FILES diff -Nru lapack-3.7.0/BLAS/dblat2.in lapack-3.7.1/BLAS/dblat2.in --- lapack-3.7.0/BLAS/dblat2.in 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/dblat2.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -'dblat2.out' NAME OF SUMMARY OUTPUT FILE -6 UNIT NUMBER OF SUMMARY FILE -'DBLAT2.SNAP' NAME OF SNAPSHOT OUTPUT FILE --1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0) -F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD. -F LOGICAL FLAG, T TO STOP ON FAILURES. -T LOGICAL FLAG, T TO TEST ERROR EXITS. -16.0 THRESHOLD VALUE OF TEST RATIO -6 NUMBER OF VALUES OF N -0 1 2 3 5 9 VALUES OF N -4 NUMBER OF VALUES OF K -0 1 2 4 VALUES OF K -4 NUMBER OF VALUES OF INCX AND INCY -1 2 -1 -2 VALUES OF INCX AND INCY -3 NUMBER OF VALUES OF ALPHA -0.0 1.0 0.7 VALUES OF ALPHA -3 NUMBER OF VALUES OF BETA -0.0 1.0 0.9 VALUES OF BETA -DGEMV T PUT F FOR NO TEST. SAME COLUMNS. -DGBMV T PUT F FOR NO TEST. SAME COLUMNS. -DSYMV T PUT F FOR NO TEST. SAME COLUMNS. -DSBMV T PUT F FOR NO TEST. SAME COLUMNS. -DSPMV T PUT F FOR NO TEST. SAME COLUMNS. -DTRMV T PUT F FOR NO TEST. SAME COLUMNS. -DTBMV T PUT F FOR NO TEST. SAME COLUMNS. -DTPMV T PUT F FOR NO TEST. SAME COLUMNS. -DTRSV T PUT F FOR NO TEST. SAME COLUMNS. -DTBSV T PUT F FOR NO TEST. SAME COLUMNS. -DTPSV T PUT F FOR NO TEST. SAME COLUMNS. -DGER T PUT F FOR NO TEST. SAME COLUMNS. -DSYR T PUT F FOR NO TEST. SAME COLUMNS. -DSPR T PUT F FOR NO TEST. SAME COLUMNS. -DSYR2 T PUT F FOR NO TEST. SAME COLUMNS. -DSPR2 T PUT F FOR NO TEST. SAME COLUMNS. diff -Nru lapack-3.7.0/BLAS/dblat3.in lapack-3.7.1/BLAS/dblat3.in --- lapack-3.7.0/BLAS/dblat3.in 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/dblat3.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -'dblat3.out' NAME OF SUMMARY OUTPUT FILE -6 UNIT NUMBER OF SUMMARY FILE -'DBLAT3.SNAP' NAME OF SNAPSHOT OUTPUT FILE --1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0) -F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD. -F LOGICAL FLAG, T TO STOP ON FAILURES. -T LOGICAL FLAG, T TO TEST ERROR EXITS. -16.0 THRESHOLD VALUE OF TEST RATIO -6 NUMBER OF VALUES OF N -0 1 2 3 5 9 VALUES OF N -3 NUMBER OF VALUES OF ALPHA -0.0 1.0 0.7 VALUES OF ALPHA -3 NUMBER OF VALUES OF BETA -0.0 1.0 1.3 VALUES OF BETA -DGEMM T PUT F FOR NO TEST. SAME COLUMNS. -DSYMM T PUT F FOR NO TEST. SAME COLUMNS. -DTRMM T PUT F FOR NO TEST. SAME COLUMNS. -DTRSM T PUT F FOR NO TEST. SAME COLUMNS. -DSYRK T PUT F FOR NO TEST. SAME COLUMNS. -DSYR2K T PUT F FOR NO TEST. SAME COLUMNS. diff -Nru lapack-3.7.0/BLAS/Makefile lapack-3.7.1/BLAS/Makefile --- lapack-3.7.0/BLAS/Makefile 1970-01-01 00:00:00.000000000 +0000 +++ lapack-3.7.1/BLAS/Makefile 2017-06-17 22:46:53.000000000 +0000 @@ -0,0 +1,22 @@ +include ../make.inc + +all: blas + +blas: + $(MAKE) -C SRC + +blas_testing: blas + $(MAKE) -C TESTING run + +clean: + $(MAKE) -C SRC clean + $(MAKE) -C TESTING clean +cleanobj: + $(MAKE) -C SRC cleanobj + $(MAKE) -C TESTING cleanobj +cleanlib: + $(MAKE) -C SRC cleanlib +cleanexe: + $(MAKE) -C TESTING cleanexe +cleantest: + $(MAKE) -C TESTING cleantest diff -Nru lapack-3.7.0/BLAS/sblat2.in lapack-3.7.1/BLAS/sblat2.in --- lapack-3.7.0/BLAS/sblat2.in 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/sblat2.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -'sblat2.out' NAME OF SUMMARY OUTPUT FILE -6 UNIT NUMBER OF SUMMARY FILE -'SBLAT2.SNAP' NAME OF SNAPSHOT OUTPUT FILE --1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0) -F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD. -F LOGICAL FLAG, T TO STOP ON FAILURES. -T LOGICAL FLAG, T TO TEST ERROR EXITS. -16.0 THRESHOLD VALUE OF TEST RATIO -6 NUMBER OF VALUES OF N -0 1 2 3 5 9 VALUES OF N -4 NUMBER OF VALUES OF K -0 1 2 4 VALUES OF K -4 NUMBER OF VALUES OF INCX AND INCY -1 2 -1 -2 VALUES OF INCX AND INCY -3 NUMBER OF VALUES OF ALPHA -0.0 1.0 0.7 VALUES OF ALPHA -3 NUMBER OF VALUES OF BETA -0.0 1.0 0.9 VALUES OF BETA -SGEMV T PUT F FOR NO TEST. SAME COLUMNS. -SGBMV T PUT F FOR NO TEST. SAME COLUMNS. -SSYMV T PUT F FOR NO TEST. SAME COLUMNS. -SSBMV T PUT F FOR NO TEST. SAME COLUMNS. -SSPMV T PUT F FOR NO TEST. SAME COLUMNS. -STRMV T PUT F FOR NO TEST. SAME COLUMNS. -STBMV T PUT F FOR NO TEST. SAME COLUMNS. -STPMV T PUT F FOR NO TEST. SAME COLUMNS. -STRSV T PUT F FOR NO TEST. SAME COLUMNS. -STBSV T PUT F FOR NO TEST. SAME COLUMNS. -STPSV T PUT F FOR NO TEST. SAME COLUMNS. -SGER T PUT F FOR NO TEST. SAME COLUMNS. -SSYR T PUT F FOR NO TEST. SAME COLUMNS. -SSPR T PUT F FOR NO TEST. SAME COLUMNS. -SSYR2 T PUT F FOR NO TEST. SAME COLUMNS. -SSPR2 T PUT F FOR NO TEST. SAME COLUMNS. diff -Nru lapack-3.7.0/BLAS/sblat3.in lapack-3.7.1/BLAS/sblat3.in --- lapack-3.7.0/BLAS/sblat3.in 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/sblat3.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -'sblat3.out' NAME OF SUMMARY OUTPUT FILE -6 UNIT NUMBER OF SUMMARY FILE -'SBLAT3.SNAP' NAME OF SNAPSHOT OUTPUT FILE --1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0) -F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD. -F LOGICAL FLAG, T TO STOP ON FAILURES. -T LOGICAL FLAG, T TO TEST ERROR EXITS. -16.0 THRESHOLD VALUE OF TEST RATIO -6 NUMBER OF VALUES OF N -0 1 2 3 5 9 VALUES OF N -3 NUMBER OF VALUES OF ALPHA -0.0 1.0 0.7 VALUES OF ALPHA -3 NUMBER OF VALUES OF BETA -0.0 1.0 1.3 VALUES OF BETA -SGEMM T PUT F FOR NO TEST. SAME COLUMNS. -SSYMM T PUT F FOR NO TEST. SAME COLUMNS. -STRMM T PUT F FOR NO TEST. SAME COLUMNS. -STRSM T PUT F FOR NO TEST. SAME COLUMNS. -SSYRK T PUT F FOR NO TEST. SAME COLUMNS. -SSYR2K T PUT F FOR NO TEST. SAME COLUMNS. diff -Nru lapack-3.7.0/BLAS/SRC/caxpy.f lapack-3.7.1/BLAS/SRC/caxpy.f --- lapack-3.7.0/BLAS/SRC/caxpy.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/caxpy.f 2017-06-17 22:46:53.000000000 +0000 @@ -27,6 +27,43 @@ *> CAXPY constant times a vector plus a vector. *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> number of elements in input vector(s) +*> \endverbatim +*> +*> \param[in] CA +*> \verbatim +*> CA is COMPLEX +*> On entry, CA specifies the scalar alpha. +*> \endverbatim +*> +*> \param[in] CX +*> \verbatim +*> CX is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) +*> \endverbatim +*> +*> \param[in] INCX +*> \verbatim +*> INCX is INTEGER +*> storage spacing between elements of CX +*> \endverbatim +*> +*> \param[in,out] CY +*> \verbatim +*> CY is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCY ) ) +*> \endverbatim +*> +*> \param[in] INCY +*> \verbatim +*> INCY is INTEGER +*> storage spacing between elements of CY +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/ccopy.f lapack-3.7.1/BLAS/SRC/ccopy.f --- lapack-3.7.0/BLAS/SRC/ccopy.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/ccopy.f 2017-06-17 22:46:53.000000000 +0000 @@ -26,6 +26,37 @@ *> CCOPY copies a vector x to a vector y. *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> number of elements in input vector(s) +*> \endverbatim +*> +*> \param[in] CX +*> \verbatim +*> CX is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) +*> \endverbatim +*> +*> \param[in] INCX +*> \verbatim +*> INCX is INTEGER +*> storage spacing between elements of CX +*> \endverbatim +*> +*> \param[out] CY +*> \verbatim +*> CY is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCY ) ) +*> \endverbatim +*> +*> \param[in] INCY +*> \verbatim +*> INCY is INTEGER +*> storage spacing between elements of CY +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/cdotc.f lapack-3.7.1/BLAS/SRC/cdotc.f --- lapack-3.7.0/BLAS/SRC/cdotc.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/cdotc.f 2017-06-17 22:46:53.000000000 +0000 @@ -28,6 +28,37 @@ *> *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> number of elements in input vector(s) +*> \endverbatim +*> +*> \param[in] CX +*> \verbatim +*> CX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) +*> \endverbatim +*> +*> \param[in] INCX +*> \verbatim +*> INCX is INTEGER +*> storage spacing between elements of CX +*> \endverbatim +*> +*> \param[in] CY +*> \verbatim +*> CY is REAL array, dimension ( 1 + ( N - 1 )*abs( INCY ) ) +*> \endverbatim +*> +*> \param[in] INCY +*> \verbatim +*> INCY is INTEGER +*> storage spacing between elements of CY +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/cdotu.f lapack-3.7.1/BLAS/SRC/cdotu.f --- lapack-3.7.0/BLAS/SRC/cdotu.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/cdotu.f 2017-06-17 22:46:53.000000000 +0000 @@ -28,6 +28,37 @@ *> *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> number of elements in input vector(s) +*> \endverbatim +*> +*> \param[in] CX +*> \verbatim +*> CX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) +*> \endverbatim +*> +*> \param[in] INCX +*> \verbatim +*> INCX is INTEGER +*> storage spacing between elements of CX +*> \endverbatim +*> +*> \param[in] CY +*> \verbatim +*> CY is REAL array, dimension ( 1 + ( N - 1 )*abs( INCY ) ) +*> \endverbatim +*> +*> \param[in] INCY +*> \verbatim +*> INCY is INTEGER +*> storage spacing between elements of CY +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/cgbmv.f lapack-3.7.1/BLAS/SRC/cgbmv.f --- lapack-3.7.0/BLAS/SRC/cgbmv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/cgbmv.f 2017-06-17 22:46:53.000000000 +0000 @@ -87,7 +87,7 @@ *> *> \param[in] A *> \verbatim -*> A is COMPLEX array of DIMENSION ( LDA, n ). +*> A is COMPLEX array, dimension ( LDA, N ) *> Before entry, the leading ( kl + ku + 1 ) by n part of the *> array A must contain the matrix of coefficients, supplied *> column by column, with the leading diagonal of the matrix in @@ -118,7 +118,7 @@ *> *> \param[in] X *> \verbatim -*> X is COMPLEX array of DIMENSION at least +*> X is COMPLEX array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n' *> and at least *> ( 1 + ( m - 1 )*abs( INCX ) ) otherwise. @@ -142,7 +142,7 @@ *> *> \param[in,out] Y *> \verbatim -*> Y is COMPLEX array of DIMENSION at least +*> Y is COMPLEX array, dimension at least *> ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n' *> and at least *> ( 1 + ( n - 1 )*abs( INCY ) ) otherwise. diff -Nru lapack-3.7.0/BLAS/SRC/cgemm.f lapack-3.7.1/BLAS/SRC/cgemm.f --- lapack-3.7.0/BLAS/SRC/cgemm.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/cgemm.f 2017-06-17 22:46:53.000000000 +0000 @@ -97,7 +97,7 @@ *> *> \param[in] A *> \verbatim -*> A is COMPLEX array of DIMENSION ( LDA, ka ), where ka is +*> A is COMPLEX array, dimension ( LDA, ka ), where ka is *> k when TRANSA = 'N' or 'n', and is m otherwise. *> Before entry with TRANSA = 'N' or 'n', the leading m by k *> part of the array A must contain the matrix A, otherwise @@ -116,7 +116,7 @@ *> *> \param[in] B *> \verbatim -*> B is COMPLEX array of DIMENSION ( LDB, kb ), where kb is +*> B is COMPLEX array, dimension ( LDB, kb ), where kb is *> n when TRANSB = 'N' or 'n', and is k otherwise. *> Before entry with TRANSB = 'N' or 'n', the leading k by n *> part of the array B must contain the matrix B, otherwise @@ -142,7 +142,7 @@ *> *> \param[in,out] C *> \verbatim -*> C is COMPLEX array of DIMENSION ( LDC, n ). +*> C is COMPLEX array, dimension ( LDC, N ) *> Before entry, the leading m by n part of the array C must *> contain the matrix C, except when beta is zero, in which *> case C need not be set on entry. diff -Nru lapack-3.7.0/BLAS/SRC/cgemv.f lapack-3.7.1/BLAS/SRC/cgemv.f --- lapack-3.7.0/BLAS/SRC/cgemv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/cgemv.f 2017-06-17 22:46:53.000000000 +0000 @@ -73,7 +73,7 @@ *> *> \param[in] A *> \verbatim -*> A is COMPLEX array of DIMENSION ( LDA, n ). +*> A is COMPLEX array, dimension ( LDA, N ) *> Before entry, the leading m by n part of the array A must *> contain the matrix of coefficients. *> \endverbatim @@ -88,7 +88,7 @@ *> *> \param[in] X *> \verbatim -*> X is COMPLEX array of DIMENSION at least +*> X is COMPLEX array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n' *> and at least *> ( 1 + ( m - 1 )*abs( INCX ) ) otherwise. @@ -112,7 +112,7 @@ *> *> \param[in,out] Y *> \verbatim -*> Y is COMPLEX array of DIMENSION at least +*> Y is COMPLEX array, dimension at least *> ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n' *> and at least *> ( 1 + ( n - 1 )*abs( INCY ) ) otherwise. diff -Nru lapack-3.7.0/BLAS/SRC/cgerc.f lapack-3.7.1/BLAS/SRC/cgerc.f --- lapack-3.7.0/BLAS/SRC/cgerc.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/cgerc.f 2017-06-17 22:46:53.000000000 +0000 @@ -57,7 +57,7 @@ *> *> \param[in] X *> \verbatim -*> X is COMPLEX array of dimension at least +*> X is COMPLEX array, dimension at least *> ( 1 + ( m - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the m *> element vector x. @@ -72,7 +72,7 @@ *> *> \param[in] Y *> \verbatim -*> Y is COMPLEX array of dimension at least +*> Y is COMPLEX array, dimension at least *> ( 1 + ( n - 1 )*abs( INCY ) ). *> Before entry, the incremented array Y must contain the n *> element vector y. @@ -87,7 +87,7 @@ *> *> \param[in,out] A *> \verbatim -*> A is COMPLEX array of DIMENSION ( LDA, n ). +*> A is COMPLEX array, dimension ( LDA, N ) *> Before entry, the leading m by n part of the array A must *> contain the matrix of coefficients. On exit, A is *> overwritten by the updated matrix. diff -Nru lapack-3.7.0/BLAS/SRC/cgeru.f lapack-3.7.1/BLAS/SRC/cgeru.f --- lapack-3.7.0/BLAS/SRC/cgeru.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/cgeru.f 2017-06-17 22:46:53.000000000 +0000 @@ -57,7 +57,7 @@ *> *> \param[in] X *> \verbatim -*> X is COMPLEX array of dimension at least +*> X is COMPLEX array, dimension at least *> ( 1 + ( m - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the m *> element vector x. @@ -72,7 +72,7 @@ *> *> \param[in] Y *> \verbatim -*> Y is COMPLEX array of dimension at least +*> Y is COMPLEX array, dimension at least *> ( 1 + ( n - 1 )*abs( INCY ) ). *> Before entry, the incremented array Y must contain the n *> element vector y. @@ -87,7 +87,7 @@ *> *> \param[in,out] A *> \verbatim -*> A is COMPLEX array of DIMENSION ( LDA, n ). +*> A is COMPLEX array, dimension ( LDA, N ) *> Before entry, the leading m by n part of the array A must *> contain the matrix of coefficients. On exit, A is *> overwritten by the updated matrix. diff -Nru lapack-3.7.0/BLAS/SRC/chbmv.f lapack-3.7.1/BLAS/SRC/chbmv.f --- lapack-3.7.0/BLAS/SRC/chbmv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/chbmv.f 2017-06-17 22:46:53.000000000 +0000 @@ -72,7 +72,7 @@ *> *> \param[in] A *> \verbatim -*> A is COMPLEX array of DIMENSION ( LDA, n ). +*> A is COMPLEX array, dimension ( LDA, N ) *> Before entry with UPLO = 'U' or 'u', the leading ( k + 1 ) *> by n part of the array A must contain the upper triangular *> band part of the hermitian matrix, supplied column by @@ -123,7 +123,7 @@ *> *> \param[in] X *> \verbatim -*> X is COMPLEX array of DIMENSION at least +*> X is COMPLEX array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the *> vector x. @@ -144,7 +144,7 @@ *> *> \param[in,out] Y *> \verbatim -*> Y is COMPLEX array of DIMENSION at least +*> Y is COMPLEX array, dimension at least *> ( 1 + ( n - 1 )*abs( INCY ) ). *> Before entry, the incremented array Y must contain the *> vector y. On exit, Y is overwritten by the updated vector y. diff -Nru lapack-3.7.0/BLAS/SRC/chemm.f lapack-3.7.1/BLAS/SRC/chemm.f --- lapack-3.7.0/BLAS/SRC/chemm.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/chemm.f 2017-06-17 22:46:53.000000000 +0000 @@ -87,7 +87,7 @@ *> *> \param[in] A *> \verbatim -*> A is COMPLEX array of DIMENSION ( LDA, ka ), where ka is +*> A is COMPLEX array, dimension ( LDA, ka ), where ka is *> m when SIDE = 'L' or 'l' and is n otherwise. *> Before entry with SIDE = 'L' or 'l', the m by m part of *> the array A must contain the hermitian matrix, such that @@ -124,7 +124,7 @@ *> *> \param[in] B *> \verbatim -*> B is COMPLEX array of DIMENSION ( LDB, n ). +*> B is COMPLEX array, dimension ( LDB, N ) *> Before entry, the leading m by n part of the array B must *> contain the matrix B. *> \endverbatim @@ -146,7 +146,7 @@ *> *> \param[in,out] C *> \verbatim -*> C is COMPLEX array of DIMENSION ( LDC, n ). +*> C is COMPLEX array, dimension ( LDC, N ) *> Before entry, the leading m by n part of the array C must *> contain the matrix C, except when beta is zero, in which *> case C need not be set on entry. diff -Nru lapack-3.7.0/BLAS/SRC/chemv.f lapack-3.7.1/BLAS/SRC/chemv.f --- lapack-3.7.0/BLAS/SRC/chemv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/chemv.f 2017-06-17 22:46:53.000000000 +0000 @@ -65,7 +65,7 @@ *> *> \param[in] A *> \verbatim -*> A is COMPLEX array of DIMENSION ( LDA, n ). +*> A is COMPLEX array, dimension ( LDA, N ) *> Before entry with UPLO = 'U' or 'u', the leading n by n *> upper triangular part of the array A must contain the upper *> triangular part of the hermitian matrix and the strictly @@ -88,7 +88,7 @@ *> *> \param[in] X *> \verbatim -*> X is COMPLEX array of dimension at least +*> X is COMPLEX array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element vector x. @@ -110,7 +110,7 @@ *> *> \param[in,out] Y *> \verbatim -*> Y is COMPLEX array of dimension at least +*> Y is COMPLEX array, dimension at least *> ( 1 + ( n - 1 )*abs( INCY ) ). *> Before entry, the incremented array Y must contain the n *> element vector y. On exit, Y is overwritten by the updated diff -Nru lapack-3.7.0/BLAS/SRC/cher2.f lapack-3.7.1/BLAS/SRC/cher2.f --- lapack-3.7.0/BLAS/SRC/cher2.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/cher2.f 2017-06-17 22:46:53.000000000 +0000 @@ -65,7 +65,7 @@ *> *> \param[in] X *> \verbatim -*> X is COMPLEX array of dimension at least +*> X is COMPLEX array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element vector x. @@ -80,7 +80,7 @@ *> *> \param[in] Y *> \verbatim -*> Y is COMPLEX array of dimension at least +*> Y is COMPLEX array, dimension at least *> ( 1 + ( n - 1 )*abs( INCY ) ). *> Before entry, the incremented array Y must contain the n *> element vector y. @@ -95,7 +95,7 @@ *> *> \param[in,out] A *> \verbatim -*> A is COMPLEX array of DIMENSION ( LDA, n ). +*> A is COMPLEX array, dimension ( LDA, N ) *> Before entry with UPLO = 'U' or 'u', the leading n by n *> upper triangular part of the array A must contain the upper *> triangular part of the hermitian matrix and the strictly diff -Nru lapack-3.7.0/BLAS/SRC/cher2k.f lapack-3.7.1/BLAS/SRC/cher2k.f --- lapack-3.7.0/BLAS/SRC/cher2k.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/cher2k.f 2017-06-17 22:46:53.000000000 +0000 @@ -95,7 +95,7 @@ *> *> \param[in] A *> \verbatim -*> A is COMPLEX array of DIMENSION ( LDA, ka ), where ka is +*> A is COMPLEX array, dimension ( LDA, ka ), where ka is *> k when TRANS = 'N' or 'n', and is n otherwise. *> Before entry with TRANS = 'N' or 'n', the leading n by k *> part of the array A must contain the matrix A, otherwise @@ -114,7 +114,7 @@ *> *> \param[in] B *> \verbatim -*> B is COMPLEX array of DIMENSION ( LDB, kb ), where kb is +*> B is COMPLEX array, dimension ( LDB, kb ), where kb is *> k when TRANS = 'N' or 'n', and is n otherwise. *> Before entry with TRANS = 'N' or 'n', the leading n by k *> part of the array B must contain the matrix B, otherwise @@ -139,7 +139,7 @@ *> *> \param[in,out] C *> \verbatim -*> C is COMPLEX array of DIMENSION ( LDC, n ). +*> C is COMPLEX array, dimension ( LDC, N ) *> Before entry with UPLO = 'U' or 'u', the leading n by n *> upper triangular part of the array C must contain the upper *> triangular part of the hermitian matrix and the strictly diff -Nru lapack-3.7.0/BLAS/SRC/cher.f lapack-3.7.1/BLAS/SRC/cher.f --- lapack-3.7.0/BLAS/SRC/cher.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/cher.f 2017-06-17 22:46:53.000000000 +0000 @@ -65,7 +65,7 @@ *> *> \param[in] X *> \verbatim -*> X is COMPLEX array of dimension at least +*> X is COMPLEX array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element vector x. @@ -80,7 +80,7 @@ *> *> \param[in,out] A *> \verbatim -*> A is COMPLEX array of DIMENSION ( LDA, n ). +*> A is COMPLEX array, dimension ( LDA, N ) *> Before entry with UPLO = 'U' or 'u', the leading n by n *> upper triangular part of the array A must contain the upper *> triangular part of the hermitian matrix and the strictly diff -Nru lapack-3.7.0/BLAS/SRC/cherk.f lapack-3.7.1/BLAS/SRC/cherk.f --- lapack-3.7.0/BLAS/SRC/cherk.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/cherk.f 2017-06-17 22:46:53.000000000 +0000 @@ -90,7 +90,7 @@ *> *> \param[in] A *> \verbatim -*> A is COMPLEX array of DIMENSION ( LDA, ka ), where ka is +*> A is COMPLEX array, dimension ( LDA, ka ), where ka is *> k when TRANS = 'N' or 'n', and is n otherwise. *> Before entry with TRANS = 'N' or 'n', the leading n by k *> part of the array A must contain the matrix A, otherwise @@ -115,7 +115,7 @@ *> *> \param[in,out] C *> \verbatim -*> C is COMPLEX array of DIMENSION ( LDC, n ). +*> C is COMPLEX array, dimension ( LDC, N ) *> Before entry with UPLO = 'U' or 'u', the leading n by n *> upper triangular part of the array C must contain the upper *> triangular part of the hermitian matrix and the strictly diff -Nru lapack-3.7.0/BLAS/SRC/chpmv.f lapack-3.7.1/BLAS/SRC/chpmv.f --- lapack-3.7.0/BLAS/SRC/chpmv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/chpmv.f 2017-06-17 22:46:53.000000000 +0000 @@ -65,7 +65,7 @@ *> *> \param[in] AP *> \verbatim -*> AP is COMPLEX array of DIMENSION at least +*> AP is COMPLEX array, dimension at least *> ( ( n*( n + 1 ) )/2 ). *> Before entry with UPLO = 'U' or 'u', the array AP must *> contain the upper triangular part of the hermitian matrix @@ -83,7 +83,7 @@ *> *> \param[in] X *> \verbatim -*> X is COMPLEX array of dimension at least +*> X is COMPLEX array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element vector x. @@ -105,7 +105,7 @@ *> *> \param[in,out] Y *> \verbatim -*> Y is COMPLEX array of dimension at least +*> Y is COMPLEX array, dimension at least *> ( 1 + ( n - 1 )*abs( INCY ) ). *> Before entry, the incremented array Y must contain the n *> element vector y. On exit, Y is overwritten by the updated diff -Nru lapack-3.7.0/BLAS/SRC/chpr2.f lapack-3.7.1/BLAS/SRC/chpr2.f --- lapack-3.7.0/BLAS/SRC/chpr2.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/chpr2.f 2017-06-17 22:46:53.000000000 +0000 @@ -65,7 +65,7 @@ *> *> \param[in] X *> \verbatim -*> X is COMPLEX array of dimension at least +*> X is COMPLEX array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element vector x. @@ -80,7 +80,7 @@ *> *> \param[in] Y *> \verbatim -*> Y is COMPLEX array of dimension at least +*> Y is COMPLEX array, dimension at least *> ( 1 + ( n - 1 )*abs( INCY ) ). *> Before entry, the incremented array Y must contain the n *> element vector y. @@ -95,7 +95,7 @@ *> *> \param[in,out] AP *> \verbatim -*> AP is COMPLEX array of DIMENSION at least +*> AP is COMPLEX array, dimension at least *> ( ( n*( n + 1 ) )/2 ). *> Before entry with UPLO = 'U' or 'u', the array AP must *> contain the upper triangular part of the hermitian matrix diff -Nru lapack-3.7.0/BLAS/SRC/chpr.f lapack-3.7.1/BLAS/SRC/chpr.f --- lapack-3.7.0/BLAS/SRC/chpr.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/chpr.f 2017-06-17 22:46:53.000000000 +0000 @@ -65,7 +65,7 @@ *> *> \param[in] X *> \verbatim -*> X is COMPLEX array of dimension at least +*> X is COMPLEX array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element vector x. @@ -80,7 +80,7 @@ *> *> \param[in,out] AP *> \verbatim -*> AP is COMPLEX array of DIMENSION at least +*> AP is COMPLEX array, dimension at least *> ( ( n*( n + 1 ) )/2 ). *> Before entry with UPLO = 'U' or 'u', the array AP must *> contain the upper triangular part of the hermitian matrix diff -Nru lapack-3.7.0/BLAS/SRC/CMakeLists.txt lapack-3.7.1/BLAS/SRC/CMakeLists.txt --- lapack-3.7.0/BLAS/SRC/CMakeLists.txt 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/CMakeLists.txt 2017-06-17 22:46:53.000000000 +0000 @@ -23,39 +23,10 @@ # DBLAS3 -- Double precision real BLAS3 routines # ZBLAS3 -- Double precision complex BLAS3 routines # -# The library can be set up to include routines for any combination -# of the four precisions. To create or add to the library, enter make -# followed by one or more of the precisions desired. Some examples: -# make single -# make single complex -# make single double complex complex16 -# Note that these commands are not safe for parallel builds. -# -# Alternatively, the commands -# make all -# or -# make -# without any arguments creates a library of all four precisions. -# The name of the library is held in BLASLIB, which is set in the -# top-level make.inc -# -# To remove the object files after the library is created, enter -# make clean -# To force the source files to be recompiled, enter, for example, -# make single FRC=FRC -# -#--------------------------------------------------------------------- -# -# Edward Anderson, University of Tennessee -# March 26, 1990 -# Susan Ostrouchov, Last updated September 30, 1994 -# ejr, May 2006. -# ####################################################################### #--------------------------------------------------------- -# Comment out the next 6 definitions if you already have -# the Level 1 BLAS. +# Level 1 BLAS #--------------------------------------------------------- set(SBLAS1 isamax.f sasum.f saxpy.f scopy.f sdot.f snrm2.f srot.f srotg.f sscal.f sswap.f sdsdot.f srotmg.f srotm.f) @@ -74,15 +45,12 @@ set(ZB1AUX idamax.f dasum.f daxpy.f dcopy.f dnrm2.f dscal.f) #--------------------------------------------------------------------- -# The following line defines auxiliary routines needed by both the -# Level 2 and Level 3 BLAS. Comment it out only if you already have -# both the Level 2 and 3 BLAS. +# Auxiliary routines needed by both the Level 2 and Level 3 BLAS #--------------------------------------------------------------------- set(ALLBLAS lsame.f xerbla.f xerbla_array.f) #--------------------------------------------------------- -# Comment out the next 4 definitions if you already have -# the Level 2 BLAS. +# Level 2 BLAS #--------------------------------------------------------- set(SBLAS2 sgemv.f sgbmv.f ssymv.f ssbmv.f sspmv.f strmv.f stbmv.f stpmv.f strsv.f stbsv.f stpsv.f @@ -101,8 +69,7 @@ zgerc.f zgeru.f zher.f zhpr.f zher2.f zhpr2.f) #--------------------------------------------------------- -# Comment out the next 4 definitions if you already have -# the Level 3 BLAS. +# Level 3 BLAS #--------------------------------------------------------- set(SBLAS3 sgemm.f ssymm.f ssyrk.f ssyr2k.f strmm.f strsm.f) @@ -113,37 +80,27 @@ set(ZBLAS3 zgemm.f zsymm.f zsyrk.f zsyr2k.f ztrmm.f ztrsm.f zhemm.f zherk.f zher2k.f) -# default build all of it -set(ALLOBJ ${SBLAS1} ${SBLAS2} ${SBLAS3} ${DBLAS1} ${DBLAS2} ${DBLAS3} - ${CBLAS1} ${CBLAS2} ${CBLAS3} ${ZBLAS1} - ${ZBLAS2} ${ZBLAS3} ${ALLBLAS}) - -if(BLAS_SINGLE) - set(ALLOBJ ${SBLAS1} ${ALLBLAS} - ${SBLAS2} ${SBLAS3}) + + +set(SOURCES) +if(BUILD_SINGLE) + list(APPEND SOURCES ${SBLAS1} ${ALLBLAS} ${SBLAS2} ${SBLAS3}) endif() -if(BLAS_DOUBLE) - set(ALLOBJ ${DBLAS1} ${ALLBLAS} - ${DBLAS2} ${DBLAS3}) +if(BUILD_DOUBLE) + list(APPEND SOURCES ${DBLAS1} ${ALLBLAS} ${DBLAS2} ${DBLAS3}) endif() -if(BLAS_COMPLEX) - set(ALLOBJ ${BLASLIB} ${CBLAS1} ${CB1AUX} - ${ALLBLAS} ${CBLAS2}) +if(BUILD_COMPLEX) + list(APPEND SOURCES ${CBLAS1} ${CB1AUX} ${ALLBLAS} ${CBLAS2} ${CBLAS3}) endif() -if(BLAS_COMPLEX16) - set(ALLOBJ ${BLASLIB} ${ZBLAS1} ${ZB1AUX} - ${ALLBLAS} ${ZBLAS2} ${ZBLAS3}) +if(BUILD_COMPLEX16) + list(APPEND SOURCES ${ZBLAS1} ${ZB1AUX} ${ALLBLAS} ${ZBLAS2} ${ZBLAS3}) endif() +list(REMOVE_DUPLICATES SOURCES) - -add_library(blas ${ALLOBJ}) -#if(UNIX) -# target_link_libraries(blas m) -#endif() +add_library(blas ${SOURCES}) set_target_properties( blas PROPERTIES VERSION ${LAPACK_VERSION} SOVERSION ${LAPACK_MAJOR_VERSION} ) -target_link_libraries(blas) lapack_install_library(blas) diff -Nru lapack-3.7.0/BLAS/SRC/crotg.f lapack-3.7.1/BLAS/SRC/crotg.f --- lapack-3.7.0/BLAS/SRC/crotg.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/crotg.f 2017-06-17 22:46:53.000000000 +0000 @@ -24,6 +24,29 @@ *> CROTG determines a complex Givens rotation. *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] CA +*> \verbatim +*> CA is COMPLEX +*> \endverbatim +*> +*> \param[in] CB +*> \verbatim +*> CB is COMPLEX +*> \endverbatim +*> +*> \param[out] C +*> \verbatim +*> C is REAL +*> \endverbatim +*> +*> \param[out] S +*> \verbatim +*> S is COMPLEX +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/cscal.f lapack-3.7.1/BLAS/SRC/cscal.f --- lapack-3.7.0/BLAS/SRC/cscal.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/cscal.f 2017-06-17 22:46:53.000000000 +0000 @@ -27,6 +27,32 @@ *> CSCAL scales a vector by a constant. *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> number of elements in input vector(s) +*> \endverbatim +*> +*> \param[in] CA +*> \verbatim +*> CA is COMPLEX +*> On entry, CA specifies the scalar alpha. +*> \endverbatim +*> +*> \param[in,out] CX +*> \verbatim +*> CX is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) +*> \endverbatim +*> +*> \param[in] INCX +*> \verbatim +*> INCX is INTEGER +*> storage spacing between elements of CX +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/csscal.f lapack-3.7.1/BLAS/SRC/csscal.f --- lapack-3.7.0/BLAS/SRC/csscal.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/csscal.f 2017-06-17 22:46:53.000000000 +0000 @@ -27,6 +27,32 @@ *> CSSCAL scales a complex vector by a real constant. *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> number of elements in input vector(s) +*> \endverbatim +*> +*> \param[in] SA +*> \verbatim +*> SA is REAL +*> On entry, SA specifies the scalar alpha. +*> \endverbatim +*> +*> \param[in,out] CX +*> \verbatim +*> CX is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) +*> \endverbatim +*> +*> \param[in] INCX +*> \verbatim +*> INCX is INTEGER +*> storage spacing between elements of CX +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/cswap.f lapack-3.7.1/BLAS/SRC/cswap.f --- lapack-3.7.0/BLAS/SRC/cswap.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/cswap.f 2017-06-17 22:46:53.000000000 +0000 @@ -26,6 +26,37 @@ *> CSWAP interchanges two vectors. *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> number of elements in input vector(s) +*> \endverbatim +*> +*> \param[in,out] CX +*> \verbatim +*> CX is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) +*> \endverbatim +*> +*> \param[in] INCX +*> \verbatim +*> INCX is INTEGER +*> storage spacing between elements of CX +*> \endverbatim +*> +*> \param[in,out] CY +*> \verbatim +*> CY is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCY ) ) +*> \endverbatim +*> +*> \param[in] INCY +*> \verbatim +*> INCY is INTEGER +*> storage spacing between elements of CY +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/csymm.f lapack-3.7.1/BLAS/SRC/csymm.f --- lapack-3.7.0/BLAS/SRC/csymm.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/csymm.f 2017-06-17 22:46:53.000000000 +0000 @@ -87,7 +87,7 @@ *> *> \param[in] A *> \verbatim -*> A is COMPLEX array of DIMENSION ( LDA, ka ), where ka is +*> A is COMPLEX array, dimension ( LDA, ka ), where ka is *> m when SIDE = 'L' or 'l' and is n otherwise. *> Before entry with SIDE = 'L' or 'l', the m by m part of *> the array A must contain the symmetric matrix, such that @@ -122,7 +122,7 @@ *> *> \param[in] B *> \verbatim -*> B is COMPLEX array of DIMENSION ( LDB, n ). +*> B is COMPLEX array, dimension ( LDB, N ) *> Before entry, the leading m by n part of the array B must *> contain the matrix B. *> \endverbatim @@ -144,7 +144,7 @@ *> *> \param[in,out] C *> \verbatim -*> C is COMPLEX array of DIMENSION ( LDC, n ). +*> C is COMPLEX array, dimension ( LDC, N ) *> Before entry, the leading m by n part of the array C must *> contain the matrix C, except when beta is zero, in which *> case C need not be set on entry. diff -Nru lapack-3.7.0/BLAS/SRC/csyr2k.f lapack-3.7.1/BLAS/SRC/csyr2k.f --- lapack-3.7.0/BLAS/SRC/csyr2k.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/csyr2k.f 2017-06-17 22:46:53.000000000 +0000 @@ -92,7 +92,7 @@ *> *> \param[in] A *> \verbatim -*> A is COMPLEX array of DIMENSION ( LDA, ka ), where ka is +*> A is COMPLEX array, dimension ( LDA, ka ), where ka is *> k when TRANS = 'N' or 'n', and is n otherwise. *> Before entry with TRANS = 'N' or 'n', the leading n by k *> part of the array A must contain the matrix A, otherwise @@ -111,7 +111,7 @@ *> *> \param[in] B *> \verbatim -*> B is COMPLEX array of DIMENSION ( LDB, kb ), where kb is +*> B is COMPLEX array, dimension ( LDB, kb ), where kb is *> k when TRANS = 'N' or 'n', and is n otherwise. *> Before entry with TRANS = 'N' or 'n', the leading n by k *> part of the array B must contain the matrix B, otherwise @@ -136,7 +136,7 @@ *> *> \param[in,out] C *> \verbatim -*> C is COMPLEX array of DIMENSION ( LDC, n ). +*> C is COMPLEX array, dimension ( LDC, N ) *> Before entry with UPLO = 'U' or 'u', the leading n by n *> upper triangular part of the array C must contain the upper *> triangular part of the symmetric matrix and the strictly diff -Nru lapack-3.7.0/BLAS/SRC/csyrk.f lapack-3.7.1/BLAS/SRC/csyrk.f --- lapack-3.7.0/BLAS/SRC/csyrk.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/csyrk.f 2017-06-17 22:46:53.000000000 +0000 @@ -90,7 +90,7 @@ *> *> \param[in] A *> \verbatim -*> A is COMPLEX array of DIMENSION ( LDA, ka ), where ka is +*> A is COMPLEX array, dimension ( LDA, ka ), where ka is *> k when TRANS = 'N' or 'n', and is n otherwise. *> Before entry with TRANS = 'N' or 'n', the leading n by k *> part of the array A must contain the matrix A, otherwise @@ -115,7 +115,7 @@ *> *> \param[in,out] C *> \verbatim -*> C is COMPLEX array of DIMENSION ( LDC, n ). +*> C is COMPLEX array, dimension ( LDC, N ) *> Before entry with UPLO = 'U' or 'u', the leading n by n *> upper triangular part of the array C must contain the upper *> triangular part of the symmetric matrix and the strictly diff -Nru lapack-3.7.0/BLAS/SRC/ctbmv.f lapack-3.7.1/BLAS/SRC/ctbmv.f --- lapack-3.7.0/BLAS/SRC/ctbmv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/ctbmv.f 2017-06-17 22:46:53.000000000 +0000 @@ -90,7 +90,7 @@ *> *> \param[in] A *> \verbatim -*> A is COMPLEX array of DIMENSION ( LDA, n ). +*> A is COMPLEX array, dimension ( LDA, N ). *> Before entry with UPLO = 'U' or 'u', the leading ( k + 1 ) *> by n part of the array A must contain the upper triangular *> band part of the matrix of coefficients, supplied column by @@ -142,7 +142,7 @@ *> *> \param[in,out] X *> \verbatim -*> X is COMPLEX array of dimension at least +*> X is COMPLEX array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element vector x. On exit, X is overwritten with the diff -Nru lapack-3.7.0/BLAS/SRC/ctbsv.f lapack-3.7.1/BLAS/SRC/ctbsv.f --- lapack-3.7.0/BLAS/SRC/ctbsv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/ctbsv.f 2017-06-17 22:46:53.000000000 +0000 @@ -94,7 +94,7 @@ *> *> \param[in] A *> \verbatim -*> A is COMPLEX array of DIMENSION ( LDA, n ). +*> A is COMPLEX array, dimension ( LDA, N ) *> Before entry with UPLO = 'U' or 'u', the leading ( k + 1 ) *> by n part of the array A must contain the upper triangular *> band part of the matrix of coefficients, supplied column by @@ -146,7 +146,7 @@ *> *> \param[in,out] X *> \verbatim -*> X is COMPLEX array of dimension at least +*> X is COMPLEX array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element right-hand side vector b. On exit, X is overwritten diff -Nru lapack-3.7.0/BLAS/SRC/ctpmv.f lapack-3.7.1/BLAS/SRC/ctpmv.f --- lapack-3.7.0/BLAS/SRC/ctpmv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/ctpmv.f 2017-06-17 22:46:53.000000000 +0000 @@ -80,7 +80,7 @@ *> *> \param[in] AP *> \verbatim -*> AP is COMPLEX array of DIMENSION at least +*> AP is COMPLEX array, dimension at least *> ( ( n*( n + 1 ) )/2 ). *> Before entry with UPLO = 'U' or 'u', the array AP must *> contain the upper triangular matrix packed sequentially, @@ -98,7 +98,7 @@ *> *> \param[in,out] X *> \verbatim -*> X is COMPLEX array of dimension at least +*> X is COMPLEX array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element vector x. On exit, X is overwritten with the diff -Nru lapack-3.7.0/BLAS/SRC/ctpsv.f lapack-3.7.1/BLAS/SRC/ctpsv.f --- lapack-3.7.0/BLAS/SRC/ctpsv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/ctpsv.f 2017-06-17 22:46:53.000000000 +0000 @@ -83,7 +83,7 @@ *> *> \param[in] AP *> \verbatim -*> AP is COMPLEX array of DIMENSION at least +*> AP is COMPLEX array, dimension at least *> ( ( n*( n + 1 ) )/2 ). *> Before entry with UPLO = 'U' or 'u', the array AP must *> contain the upper triangular matrix packed sequentially, @@ -101,7 +101,7 @@ *> *> \param[in,out] X *> \verbatim -*> X is COMPLEX array of dimension at least +*> X is COMPLEX array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element right-hand side vector b. On exit, X is overwritten diff -Nru lapack-3.7.0/BLAS/SRC/ctrmm.f lapack-3.7.1/BLAS/SRC/ctrmm.f --- lapack-3.7.0/BLAS/SRC/ctrmm.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/ctrmm.f 2017-06-17 22:46:53.000000000 +0000 @@ -109,7 +109,7 @@ *> *> \param[in] A *> \verbatim -*> A is COMPLEX array of DIMENSION ( LDA, k ), where k is m +*> A is COMPLEX array, dimension ( LDA, k ), where k is m *> when SIDE = 'L' or 'l' and is n when SIDE = 'R' or 'r'. *> Before entry with UPLO = 'U' or 'u', the leading k by k *> upper triangular part of the array A must contain the upper @@ -134,7 +134,7 @@ *> *> \param[in,out] B *> \verbatim -*> B is COMPLEX array of DIMENSION ( LDB, n ). +*> B is COMPLEX array, dimension ( LDB, N ). *> Before entry, the leading m by n part of the array B must *> contain the matrix B, and on exit is overwritten by the *> transformed matrix. diff -Nru lapack-3.7.0/BLAS/SRC/ctrmv.f lapack-3.7.1/BLAS/SRC/ctrmv.f --- lapack-3.7.0/BLAS/SRC/ctrmv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/ctrmv.f 2017-06-17 22:46:53.000000000 +0000 @@ -80,7 +80,7 @@ *> *> \param[in] A *> \verbatim -*> A is COMPLEX array of DIMENSION ( LDA, n ). +*> A is COMPLEX array, dimension ( LDA, N ). *> Before entry with UPLO = 'U' or 'u', the leading n by n *> upper triangular part of the array A must contain the upper *> triangular matrix and the strictly lower triangular part of @@ -103,7 +103,7 @@ *> *> \param[in,out] X *> \verbatim -*> X is COMPLEX array of dimension at least +*> X is COMPLEX array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element vector x. On exit, X is overwritten with the diff -Nru lapack-3.7.0/BLAS/SRC/ctrsm.f lapack-3.7.1/BLAS/SRC/ctrsm.f --- lapack-3.7.0/BLAS/SRC/ctrsm.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/ctrsm.f 2017-06-17 22:46:53.000000000 +0000 @@ -111,7 +111,7 @@ *> *> \param[in] A *> \verbatim -*> A is COMPLEX array of DIMENSION ( LDA, k ), +*> A is COMPLEX array, dimension ( LDA, k ), *> where k is m when SIDE = 'L' or 'l' *> and k is n when SIDE = 'R' or 'r'. *> Before entry with UPLO = 'U' or 'u', the leading k by k @@ -137,7 +137,7 @@ *> *> \param[in,out] B *> \verbatim -*> B is COMPLEX array of DIMENSION ( LDB, n ). +*> B is COMPLEX array, dimension ( LDB, N ) *> Before entry, the leading m by n part of the array B must *> contain the right-hand side matrix B, and on exit is *> overwritten by the solution matrix X. diff -Nru lapack-3.7.0/BLAS/SRC/ctrsv.f lapack-3.7.1/BLAS/SRC/ctrsv.f --- lapack-3.7.0/BLAS/SRC/ctrsv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/ctrsv.f 2017-06-17 22:46:53.000000000 +0000 @@ -83,7 +83,7 @@ *> *> \param[in] A *> \verbatim -*> A is COMPLEX array of DIMENSION ( LDA, n ). +*> A is COMPLEX array, dimension ( LDA, N ) *> Before entry with UPLO = 'U' or 'u', the leading n by n *> upper triangular part of the array A must contain the upper *> triangular matrix and the strictly lower triangular part of @@ -106,7 +106,7 @@ *> *> \param[in,out] X *> \verbatim -*> X is COMPLEX array of dimension at least +*> X is COMPLEX array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element right-hand side vector b. On exit, X is overwritten diff -Nru lapack-3.7.0/BLAS/SRC/dasum.f lapack-3.7.1/BLAS/SRC/dasum.f --- lapack-3.7.0/BLAS/SRC/dasum.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/dasum.f 2017-06-17 22:46:53.000000000 +0000 @@ -26,6 +26,26 @@ *> DASUM takes the sum of the absolute values. *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> number of elements in input vector(s) +*> \endverbatim +*> +*> \param[in] DX +*> \verbatim +*> DX is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) +*> \endverbatim +*> +*> \param[in] INCX +*> \verbatim +*> INCX is INTEGER +*> storage spacing between elements of DX +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/daxpy.f lapack-3.7.1/BLAS/SRC/daxpy.f --- lapack-3.7.0/BLAS/SRC/daxpy.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/daxpy.f 2017-06-17 22:46:53.000000000 +0000 @@ -28,6 +28,43 @@ *> uses unrolled loops for increments equal to one. *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> number of elements in input vector(s) +*> \endverbatim +*> +*> \param[in] DA +*> \verbatim +*> DA is DOUBLE PRECISION +*> On entry, DA specifies the scalar alpha. +*> \endverbatim +*> +*> \param[in] DX +*> \verbatim +*> DX is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) +*> \endverbatim +*> +*> \param[in] INCX +*> \verbatim +*> INCX is INTEGER +*> storage spacing between elements of DX +*> \endverbatim +*> +*> \param[in,out] DY +*> \verbatim +*> DY is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCY ) ) +*> \endverbatim +*> +*> \param[in] INCY +*> \verbatim +*> INCY is INTEGER +*> storage spacing between elements of DY +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/dcabs1.f lapack-3.7.1/BLAS/SRC/dcabs1.f --- lapack-3.7.0/BLAS/SRC/dcabs1.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/dcabs1.f 2017-06-17 22:46:53.000000000 +0000 @@ -24,6 +24,14 @@ *> DCABS1 computes |Re(.)| + |Im(.)| of a double complex number *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] Z +*> \verbatim +*> Z is COMPLEX*16 +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/dcopy.f lapack-3.7.1/BLAS/SRC/dcopy.f --- lapack-3.7.0/BLAS/SRC/dcopy.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/dcopy.f 2017-06-17 22:46:53.000000000 +0000 @@ -24,7 +24,38 @@ *> \verbatim *> *> DCOPY copies a vector, x, to a vector, y. -*> uses unrolled loops for increments equal to one. +*> uses unrolled loops for increments equal to 1. +*> \endverbatim +* +* Arguments: +* ========== +* +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> number of elements in input vector(s) +*> \endverbatim +*> +*> \param[in] DX +*> \verbatim +*> DX is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) +*> \endverbatim +*> +*> \param[in] INCX +*> \verbatim +*> INCX is INTEGER +*> storage spacing between elements of DX +*> \endverbatim +*> +*> \param[out] DY +*> \verbatim +*> DY is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCY ) ) +*> \endverbatim +*> +*> \param[in] INCY +*> \verbatim +*> INCY is INTEGER +*> storage spacing between elements of DY *> \endverbatim * * Authors: diff -Nru lapack-3.7.0/BLAS/SRC/ddot.f lapack-3.7.1/BLAS/SRC/ddot.f --- lapack-3.7.0/BLAS/SRC/ddot.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/ddot.f 2017-06-17 22:46:53.000000000 +0000 @@ -27,6 +27,37 @@ *> uses unrolled loops for increments equal to one. *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> number of elements in input vector(s) +*> \endverbatim +*> +*> \param[in] DX +*> \verbatim +*> DX is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) +*> \endverbatim +*> +*> \param[in] INCX +*> \verbatim +*> INCX is INTEGER +*> storage spacing between elements of DX +*> \endverbatim +*> +*> \param[in] DY +*> \verbatim +*> DY is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCY ) ) +*> \endverbatim +*> +*> \param[in] INCY +*> \verbatim +*> INCY is INTEGER +*> storage spacing between elements of DY +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/dgbmv.f lapack-3.7.1/BLAS/SRC/dgbmv.f --- lapack-3.7.0/BLAS/SRC/dgbmv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/dgbmv.f 2017-06-17 22:46:53.000000000 +0000 @@ -85,7 +85,7 @@ *> *> \param[in] A *> \verbatim -*> A is DOUBLE PRECISION array of DIMENSION ( LDA, n ). +*> A is DOUBLE PRECISION array, dimension ( LDA, N ) *> Before entry, the leading ( kl + ku + 1 ) by n part of the *> array A must contain the matrix of coefficients, supplied *> column by column, with the leading diagonal of the matrix in @@ -116,7 +116,7 @@ *> *> \param[in] X *> \verbatim -*> X is DOUBLE PRECISION array of DIMENSION at least +*> X is DOUBLE PRECISION array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n' *> and at least *> ( 1 + ( m - 1 )*abs( INCX ) ) otherwise. @@ -140,7 +140,7 @@ *> *> \param[in,out] Y *> \verbatim -*> Y is DOUBLE PRECISION array of DIMENSION at least +*> Y is DOUBLE PRECISION array, dimension at least *> ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n' *> and at least *> ( 1 + ( n - 1 )*abs( INCY ) ) otherwise. diff -Nru lapack-3.7.0/BLAS/SRC/dgemm.f lapack-3.7.1/BLAS/SRC/dgemm.f --- lapack-3.7.0/BLAS/SRC/dgemm.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/dgemm.f 2017-06-17 22:46:53.000000000 +0000 @@ -97,7 +97,7 @@ *> *> \param[in] A *> \verbatim -*> A is DOUBLE PRECISION array of DIMENSION ( LDA, ka ), where ka is +*> A is DOUBLE PRECISION array, dimension ( LDA, ka ), where ka is *> k when TRANSA = 'N' or 'n', and is m otherwise. *> Before entry with TRANSA = 'N' or 'n', the leading m by k *> part of the array A must contain the matrix A, otherwise @@ -116,7 +116,7 @@ *> *> \param[in] B *> \verbatim -*> B is DOUBLE PRECISION array of DIMENSION ( LDB, kb ), where kb is +*> B is DOUBLE PRECISION array, dimension ( LDB, kb ), where kb is *> n when TRANSB = 'N' or 'n', and is k otherwise. *> Before entry with TRANSB = 'N' or 'n', the leading k by n *> part of the array B must contain the matrix B, otherwise @@ -142,7 +142,7 @@ *> *> \param[in,out] C *> \verbatim -*> C is DOUBLE PRECISION array of DIMENSION ( LDC, n ). +*> C is DOUBLE PRECISION array, dimension ( LDC, N ) *> Before entry, the leading m by n part of the array C must *> contain the matrix C, except when beta is zero, in which *> case C need not be set on entry. diff -Nru lapack-3.7.0/BLAS/SRC/dgemv.f lapack-3.7.1/BLAS/SRC/dgemv.f --- lapack-3.7.0/BLAS/SRC/dgemv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/dgemv.f 2017-06-17 22:46:53.000000000 +0000 @@ -71,7 +71,7 @@ *> *> \param[in] A *> \verbatim -*> A is DOUBLE PRECISION array of DIMENSION ( LDA, n ). +*> A is DOUBLE PRECISION array, dimension ( LDA, N ) *> Before entry, the leading m by n part of the array A must *> contain the matrix of coefficients. *> \endverbatim @@ -86,7 +86,7 @@ *> *> \param[in] X *> \verbatim -*> X is DOUBLE PRECISION array of DIMENSION at least +*> X is DOUBLE PRECISION array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n' *> and at least *> ( 1 + ( m - 1 )*abs( INCX ) ) otherwise. @@ -110,7 +110,7 @@ *> *> \param[in,out] Y *> \verbatim -*> Y is DOUBLE PRECISION array of DIMENSION at least +*> Y is DOUBLE PRECISION array, dimension at least *> ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n' *> and at least *> ( 1 + ( n - 1 )*abs( INCY ) ) otherwise. diff -Nru lapack-3.7.0/BLAS/SRC/dger.f lapack-3.7.1/BLAS/SRC/dger.f --- lapack-3.7.0/BLAS/SRC/dger.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/dger.f 2017-06-17 22:46:53.000000000 +0000 @@ -57,7 +57,7 @@ *> *> \param[in] X *> \verbatim -*> X is DOUBLE PRECISION array of dimension at least +*> X is DOUBLE PRECISION array, dimension at least *> ( 1 + ( m - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the m *> element vector x. @@ -72,7 +72,7 @@ *> *> \param[in] Y *> \verbatim -*> Y is DOUBLE PRECISION array of dimension at least +*> Y is DOUBLE PRECISION array, dimension at least *> ( 1 + ( n - 1 )*abs( INCY ) ). *> Before entry, the incremented array Y must contain the n *> element vector y. @@ -87,7 +87,7 @@ *> *> \param[in,out] A *> \verbatim -*> A is DOUBLE PRECISION array of DIMENSION ( LDA, n ). +*> A is DOUBLE PRECISION array, dimension ( LDA, N ) *> Before entry, the leading m by n part of the array A must *> contain the matrix of coefficients. On exit, A is *> overwritten by the updated matrix. diff -Nru lapack-3.7.0/BLAS/SRC/dnrm2.f lapack-3.7.1/BLAS/SRC/dnrm2.f --- lapack-3.7.0/BLAS/SRC/dnrm2.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/dnrm2.f 2017-06-17 22:46:53.000000000 +0000 @@ -29,6 +29,26 @@ *> DNRM2 := sqrt( x'*x ) *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> number of elements in input vector(s) +*> \endverbatim +*> +*> \param[in] X +*> \verbatim +*> X is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) +*> \endverbatim +*> +*> \param[in] INCX +*> \verbatim +*> INCX is INTEGER +*> storage spacing between elements of DX +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/drot.f lapack-3.7.1/BLAS/SRC/drot.f --- lapack-3.7.0/BLAS/SRC/drot.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/drot.f 2017-06-17 22:46:53.000000000 +0000 @@ -27,6 +27,47 @@ *> DROT applies a plane rotation. *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> number of elements in input vector(s) +*> \endverbatim +*> +*> \param[in,out] DX +*> \verbatim +*> DX is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) +*> \endverbatim +*> +*> \param[in] INCX +*> \verbatim +*> INCX is INTEGER +*> storage spacing between elements of DX +*> \endverbatim +*> +*> \param[in,out] DY +*> \verbatim +*> DY is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCY ) ) +*> \endverbatim +*> +*> \param[in] INCY +*> \verbatim +*> INCY is INTEGER +*> storage spacing between elements of DY +*> \endverbatim +*> +*> \param[in] C +*> \verbatim +*> C is DOUBLE PRECISION +*> \endverbatim +*> +*> \param[in] S +*> \verbatim +*> S is DOUBLE PRECISION +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/drotg.f lapack-3.7.1/BLAS/SRC/drotg.f --- lapack-3.7.0/BLAS/SRC/drotg.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/drotg.f 2017-06-17 22:46:53.000000000 +0000 @@ -23,6 +23,29 @@ *> DROTG construct givens plane rotation. *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] DA +*> \verbatim +*> DA is DOUBLE PRECISION +*> \endverbatim +*> +*> \param[in] DB +*> \verbatim +*> DB is DOUBLE PRECISION +*> \endverbatim +*> +*> \param[out] C +*> \verbatim +*> C is DOUBLE PRECISION +*> \endverbatim +*> +*> \param[out] S +*> \verbatim +*> S is DOUBLE PRECISION +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/drotm.f lapack-3.7.1/BLAS/SRC/drotm.f --- lapack-3.7.0/BLAS/SRC/drotm.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/drotm.f 2017-06-17 22:46:53.000000000 +0000 @@ -51,8 +51,7 @@ *> *> \param[in,out] DX *> \verbatim -*> DX is DOUBLE PRECISION array, dimension N -*> double precision vector with N elements +*> DX is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) *> \endverbatim *> *> \param[in] INCX @@ -63,8 +62,7 @@ *> *> \param[in,out] DY *> \verbatim -*> DY is DOUBLE PRECISION array, dimension N -*> double precision vector with N elements +*> DY is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCY ) ) *> \endverbatim *> *> \param[in] INCY @@ -73,9 +71,9 @@ *> storage spacing between elements of DY *> \endverbatim *> -*> \param[in,out] DPARAM +*> \param[in] DPARAM *> \verbatim -*> DPARAM is DOUBLE PRECISION array, dimension 5 +*> DPARAM is DOUBLE PRECISION array, dimension (5) *> DPARAM(1)=DFLAG *> DPARAM(2)=DH11 *> DPARAM(3)=DH21 diff -Nru lapack-3.7.0/BLAS/SRC/drotmg.f lapack-3.7.1/BLAS/SRC/drotmg.f --- lapack-3.7.0/BLAS/SRC/drotmg.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/drotmg.f 2017-06-17 22:46:53.000000000 +0000 @@ -65,9 +65,9 @@ *> DY1 is DOUBLE PRECISION *> \endverbatim *> -*> \param[in,out] DPARAM +*> \param[out] DPARAM *> \verbatim -*> DPARAM is DOUBLE PRECISION array, dimension 5 +*> DPARAM is DOUBLE PRECISION array, dimension (5) *> DPARAM(1)=DFLAG *> DPARAM(2)=DH11 *> DPARAM(3)=DH21 diff -Nru lapack-3.7.0/BLAS/SRC/dsbmv.f lapack-3.7.1/BLAS/SRC/dsbmv.f --- lapack-3.7.0/BLAS/SRC/dsbmv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/dsbmv.f 2017-06-17 22:46:53.000000000 +0000 @@ -72,7 +72,7 @@ *> *> \param[in] A *> \verbatim -*> A is DOUBLE PRECISION array of DIMENSION ( LDA, n ). +*> A is DOUBLE PRECISION array, dimension ( LDA, N ) *> Before entry with UPLO = 'U' or 'u', the leading ( k + 1 ) *> by n part of the array A must contain the upper triangular *> band part of the symmetric matrix, supplied column by @@ -120,7 +120,7 @@ *> *> \param[in] X *> \verbatim -*> X is DOUBLE PRECISION array of DIMENSION at least +*> X is DOUBLE PRECISION array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the *> vector x. @@ -141,7 +141,7 @@ *> *> \param[in,out] Y *> \verbatim -*> Y is DOUBLE PRECISION array of DIMENSION at least +*> Y is DOUBLE PRECISION array, dimension at least *> ( 1 + ( n - 1 )*abs( INCY ) ). *> Before entry, the incremented array Y must contain the *> vector y. On exit, Y is overwritten by the updated vector y. diff -Nru lapack-3.7.0/BLAS/SRC/dscal.f lapack-3.7.1/BLAS/SRC/dscal.f --- lapack-3.7.0/BLAS/SRC/dscal.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/dscal.f 2017-06-17 22:46:53.000000000 +0000 @@ -25,7 +25,33 @@ *> \verbatim *> *> DSCAL scales a vector by a constant. -*> uses unrolled loops for increment equal to one. +*> uses unrolled loops for increment equal to 1. +*> \endverbatim +* +* Arguments: +* ========== +* +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> number of elements in input vector(s) +*> \endverbatim +*> +*> \param[in] DA +*> \verbatim +*> DA is DOUBLE PRECISION +*> On entry, DA specifies the scalar alpha. +*> \endverbatim +*> +*> \param[in,out] DX +*> \verbatim +*> DX is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) +*> \endverbatim +*> +*> \param[in] INCX +*> \verbatim +*> INCX is INTEGER +*> storage spacing between elements of DX *> \endverbatim * * Authors: diff -Nru lapack-3.7.0/BLAS/SRC/dspmv.f lapack-3.7.1/BLAS/SRC/dspmv.f --- lapack-3.7.0/BLAS/SRC/dspmv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/dspmv.f 2017-06-17 22:46:53.000000000 +0000 @@ -65,7 +65,7 @@ *> *> \param[in] AP *> \verbatim -*> AP is DOUBLE PRECISION array of DIMENSION at least +*> AP is DOUBLE PRECISION array, dimension at least *> ( ( n*( n + 1 ) )/2 ). *> Before entry with UPLO = 'U' or 'u', the array AP must *> contain the upper triangular part of the symmetric matrix @@ -81,7 +81,7 @@ *> *> \param[in] X *> \verbatim -*> X is DOUBLE PRECISION array of dimension at least +*> X is DOUBLE PRECISION array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element vector x. @@ -103,7 +103,7 @@ *> *> \param[in,out] Y *> \verbatim -*> Y is DOUBLE PRECISION array of dimension at least +*> Y is DOUBLE PRECISION array, dimension at least *> ( 1 + ( n - 1 )*abs( INCY ) ). *> Before entry, the incremented array Y must contain the n *> element vector y. On exit, Y is overwritten by the updated diff -Nru lapack-3.7.0/BLAS/SRC/dspr2.f lapack-3.7.1/BLAS/SRC/dspr2.f --- lapack-3.7.0/BLAS/SRC/dspr2.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/dspr2.f 2017-06-17 22:46:53.000000000 +0000 @@ -65,7 +65,7 @@ *> *> \param[in] X *> \verbatim -*> X is DOUBLE PRECISION array of dimension at least +*> X is DOUBLE PRECISION array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element vector x. @@ -80,7 +80,7 @@ *> *> \param[in] Y *> \verbatim -*> Y is DOUBLE PRECISION array of dimension at least +*> Y is DOUBLE PRECISION array, dimension at least *> ( 1 + ( n - 1 )*abs( INCY ) ). *> Before entry, the incremented array Y must contain the n *> element vector y. @@ -95,7 +95,7 @@ *> *> \param[in,out] AP *> \verbatim -*> AP is DOUBLE PRECISION array of DIMENSION at least +*> AP is DOUBLE PRECISION array, dimension at least *> ( ( n*( n + 1 ) )/2 ). *> Before entry with UPLO = 'U' or 'u', the array AP must *> contain the upper triangular part of the symmetric matrix diff -Nru lapack-3.7.0/BLAS/SRC/dspr.f lapack-3.7.1/BLAS/SRC/dspr.f --- lapack-3.7.0/BLAS/SRC/dspr.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/dspr.f 2017-06-17 22:46:53.000000000 +0000 @@ -65,7 +65,7 @@ *> *> \param[in] X *> \verbatim -*> X is DOUBLE PRECISION array of dimension at least +*> X is DOUBLE PRECISION array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element vector x. @@ -80,7 +80,7 @@ *> *> \param[in,out] AP *> \verbatim -*> AP is DOUBLE PRECISION array of DIMENSION at least +*> AP is DOUBLE PRECISION array, dimension at least *> ( ( n*( n + 1 ) )/2 ). *> Before entry with UPLO = 'U' or 'u', the array AP must *> contain the upper triangular part of the symmetric matrix diff -Nru lapack-3.7.0/BLAS/SRC/dswap.f lapack-3.7.1/BLAS/SRC/dswap.f --- lapack-3.7.0/BLAS/SRC/dswap.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/dswap.f 2017-06-17 22:46:53.000000000 +0000 @@ -23,8 +23,39 @@ *> *> \verbatim *> -*> interchanges two vectors. -*> uses unrolled loops for increments equal one. +*> DSWAP interchanges two vectors. +*> uses unrolled loops for increments equal to 1. +*> \endverbatim +* +* Arguments: +* ========== +* +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> number of elements in input vector(s) +*> \endverbatim +*> +*> \param[in,out] DX +*> \verbatim +*> DX is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) +*> \endverbatim +*> +*> \param[in] INCX +*> \verbatim +*> INCX is INTEGER +*> storage spacing between elements of DX +*> \endverbatim +*> +*> \param[in,out] DY +*> \verbatim +*> DY is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCY ) ) +*> \endverbatim +*> +*> \param[in] INCY +*> \verbatim +*> INCY is INTEGER +*> storage spacing between elements of DY *> \endverbatim * * Authors: diff -Nru lapack-3.7.0/BLAS/SRC/dsymm.f lapack-3.7.1/BLAS/SRC/dsymm.f --- lapack-3.7.0/BLAS/SRC/dsymm.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/dsymm.f 2017-06-17 22:46:53.000000000 +0000 @@ -87,7 +87,7 @@ *> *> \param[in] A *> \verbatim -*> A is DOUBLE PRECISION array of DIMENSION ( LDA, ka ), where ka is +*> A is DOUBLE PRECISION array, dimension ( LDA, ka ), where ka is *> m when SIDE = 'L' or 'l' and is n otherwise. *> Before entry with SIDE = 'L' or 'l', the m by m part of *> the array A must contain the symmetric matrix, such that @@ -122,7 +122,7 @@ *> *> \param[in] B *> \verbatim -*> B is DOUBLE PRECISION array of DIMENSION ( LDB, n ). +*> B is DOUBLE PRECISION array, dimension ( LDB, N ) *> Before entry, the leading m by n part of the array B must *> contain the matrix B. *> \endverbatim @@ -144,7 +144,7 @@ *> *> \param[in,out] C *> \verbatim -*> C is DOUBLE PRECISION array of DIMENSION ( LDC, n ). +*> C is DOUBLE PRECISION array, dimension ( LDC, N ) *> Before entry, the leading m by n part of the array C must *> contain the matrix C, except when beta is zero, in which *> case C need not be set on entry. diff -Nru lapack-3.7.0/BLAS/SRC/dsymv.f lapack-3.7.1/BLAS/SRC/dsymv.f --- lapack-3.7.0/BLAS/SRC/dsymv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/dsymv.f 2017-06-17 22:46:53.000000000 +0000 @@ -65,7 +65,7 @@ *> *> \param[in] A *> \verbatim -*> A is DOUBLE PRECISION array of DIMENSION ( LDA, n ). +*> A is DOUBLE PRECISION array, dimension ( LDA, N ) *> Before entry with UPLO = 'U' or 'u', the leading n by n *> upper triangular part of the array A must contain the upper *> triangular part of the symmetric matrix and the strictly @@ -86,7 +86,7 @@ *> *> \param[in] X *> \verbatim -*> X is DOUBLE PRECISION array of dimension at least +*> X is DOUBLE PRECISION array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element vector x. @@ -108,7 +108,7 @@ *> *> \param[in,out] Y *> \verbatim -*> Y is DOUBLE PRECISION array of dimension at least +*> Y is DOUBLE PRECISION array, dimension at least *> ( 1 + ( n - 1 )*abs( INCY ) ). *> Before entry, the incremented array Y must contain the n *> element vector y. On exit, Y is overwritten by the updated diff -Nru lapack-3.7.0/BLAS/SRC/dsyr2.f lapack-3.7.1/BLAS/SRC/dsyr2.f --- lapack-3.7.0/BLAS/SRC/dsyr2.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/dsyr2.f 2017-06-17 22:46:53.000000000 +0000 @@ -65,7 +65,7 @@ *> *> \param[in] X *> \verbatim -*> X is DOUBLE PRECISION array of dimension at least +*> X is DOUBLE PRECISION array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element vector x. @@ -80,7 +80,7 @@ *> *> \param[in] Y *> \verbatim -*> Y is DOUBLE PRECISION array of dimension at least +*> Y is DOUBLE PRECISION array, dimension at least *> ( 1 + ( n - 1 )*abs( INCY ) ). *> Before entry, the incremented array Y must contain the n *> element vector y. @@ -95,7 +95,7 @@ *> *> \param[in,out] A *> \verbatim -*> A is DOUBLE PRECISION array of DIMENSION ( LDA, n ). +*> A is DOUBLE PRECISION array, dimension ( LDA, N ) *> Before entry with UPLO = 'U' or 'u', the leading n by n *> upper triangular part of the array A must contain the upper *> triangular part of the symmetric matrix and the strictly diff -Nru lapack-3.7.0/BLAS/SRC/dsyr2k.f lapack-3.7.1/BLAS/SRC/dsyr2k.f --- lapack-3.7.0/BLAS/SRC/dsyr2k.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/dsyr2k.f 2017-06-17 22:46:53.000000000 +0000 @@ -95,7 +95,7 @@ *> *> \param[in] A *> \verbatim -*> A is DOUBLE PRECISION array of DIMENSION ( LDA, ka ), where ka is +*> A is DOUBLE PRECISION array, dimension ( LDA, ka ), where ka is *> k when TRANS = 'N' or 'n', and is n otherwise. *> Before entry with TRANS = 'N' or 'n', the leading n by k *> part of the array A must contain the matrix A, otherwise @@ -114,7 +114,7 @@ *> *> \param[in] B *> \verbatim -*> B is DOUBLE PRECISION array of DIMENSION ( LDB, kb ), where kb is +*> B is DOUBLE PRECISION array, dimension ( LDB, kb ), where kb is *> k when TRANS = 'N' or 'n', and is n otherwise. *> Before entry with TRANS = 'N' or 'n', the leading n by k *> part of the array B must contain the matrix B, otherwise @@ -139,7 +139,7 @@ *> *> \param[in,out] C *> \verbatim -*> C is DOUBLE PRECISION array of DIMENSION ( LDC, n ). +*> C is DOUBLE PRECISION array, dimension ( LDC, N ) *> Before entry with UPLO = 'U' or 'u', the leading n by n *> upper triangular part of the array C must contain the upper *> triangular part of the symmetric matrix and the strictly diff -Nru lapack-3.7.0/BLAS/SRC/dsyr.f lapack-3.7.1/BLAS/SRC/dsyr.f --- lapack-3.7.0/BLAS/SRC/dsyr.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/dsyr.f 2017-06-17 22:46:53.000000000 +0000 @@ -65,7 +65,7 @@ *> *> \param[in] X *> \verbatim -*> X is DOUBLE PRECISION array of dimension at least +*> X is DOUBLE PRECISION array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element vector x. @@ -80,7 +80,7 @@ *> *> \param[in,out] A *> \verbatim -*> A is DOUBLE PRECISION array of DIMENSION ( LDA, n ). +*> A is DOUBLE PRECISION array, dimension ( LDA, N ) *> Before entry with UPLO = 'U' or 'u', the leading n by n *> upper triangular part of the array A must contain the upper *> triangular part of the symmetric matrix and the strictly diff -Nru lapack-3.7.0/BLAS/SRC/dsyrk.f lapack-3.7.1/BLAS/SRC/dsyrk.f --- lapack-3.7.0/BLAS/SRC/dsyrk.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/dsyrk.f 2017-06-17 22:46:53.000000000 +0000 @@ -92,7 +92,7 @@ *> *> \param[in] A *> \verbatim -*> A is DOUBLE PRECISION array of DIMENSION ( LDA, ka ), where ka is +*> A is DOUBLE PRECISION array, dimension ( LDA, ka ), where ka is *> k when TRANS = 'N' or 'n', and is n otherwise. *> Before entry with TRANS = 'N' or 'n', the leading n by k *> part of the array A must contain the matrix A, otherwise @@ -117,7 +117,7 @@ *> *> \param[in,out] C *> \verbatim -*> C is DOUBLE PRECISION array of DIMENSION ( LDC, n ). +*> C is DOUBLE PRECISION array, dimension ( LDC, N ) *> Before entry with UPLO = 'U' or 'u', the leading n by n *> upper triangular part of the array C must contain the upper *> triangular part of the symmetric matrix and the strictly diff -Nru lapack-3.7.0/BLAS/SRC/dtbmv.f lapack-3.7.1/BLAS/SRC/dtbmv.f --- lapack-3.7.0/BLAS/SRC/dtbmv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/dtbmv.f 2017-06-17 22:46:53.000000000 +0000 @@ -90,7 +90,7 @@ *> *> \param[in] A *> \verbatim -*> A is DOUBLE PRECISION array of DIMENSION ( LDA, n ). +*> A is DOUBLE PRECISION array, dimension ( LDA, N ) *> Before entry with UPLO = 'U' or 'u', the leading ( k + 1 ) *> by n part of the array A must contain the upper triangular *> band part of the matrix of coefficients, supplied column by @@ -142,7 +142,7 @@ *> *> \param[in,out] X *> \verbatim -*> X is DOUBLE PRECISION array of dimension at least +*> X is DOUBLE PRECISION array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element vector x. On exit, X is overwritten with the diff -Nru lapack-3.7.0/BLAS/SRC/dtbsv.f lapack-3.7.1/BLAS/SRC/dtbsv.f --- lapack-3.7.0/BLAS/SRC/dtbsv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/dtbsv.f 2017-06-17 22:46:53.000000000 +0000 @@ -94,7 +94,7 @@ *> *> \param[in] A *> \verbatim -*> A is DOUBLE PRECISION array of DIMENSION ( LDA, n ). +*> A is DOUBLE PRECISION array, dimension ( LDA, N ) *> Before entry with UPLO = 'U' or 'u', the leading ( k + 1 ) *> by n part of the array A must contain the upper triangular *> band part of the matrix of coefficients, supplied column by @@ -146,7 +146,7 @@ *> *> \param[in,out] X *> \verbatim -*> X is DOUBLE PRECISION array of dimension at least +*> X is DOUBLE PRECISION array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element right-hand side vector b. On exit, X is overwritten diff -Nru lapack-3.7.0/BLAS/SRC/dtpmv.f lapack-3.7.1/BLAS/SRC/dtpmv.f --- lapack-3.7.0/BLAS/SRC/dtpmv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/dtpmv.f 2017-06-17 22:46:53.000000000 +0000 @@ -80,7 +80,7 @@ *> *> \param[in] AP *> \verbatim -*> AP is DOUBLE PRECISION array of DIMENSION at least +*> AP is DOUBLE PRECISION array, dimension at least *> ( ( n*( n + 1 ) )/2 ). *> Before entry with UPLO = 'U' or 'u', the array AP must *> contain the upper triangular matrix packed sequentially, @@ -98,7 +98,7 @@ *> *> \param[in,out] X *> \verbatim -*> X is DOUBLE PRECISION array of dimension at least +*> X is DOUBLE PRECISION array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element vector x. On exit, X is overwritten with the diff -Nru lapack-3.7.0/BLAS/SRC/dtpsv.f lapack-3.7.1/BLAS/SRC/dtpsv.f --- lapack-3.7.0/BLAS/SRC/dtpsv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/dtpsv.f 2017-06-17 22:46:53.000000000 +0000 @@ -83,7 +83,7 @@ *> *> \param[in] AP *> \verbatim -*> AP is DOUBLE PRECISION array of DIMENSION at least +*> AP is DOUBLE PRECISION array, dimension at least *> ( ( n*( n + 1 ) )/2 ). *> Before entry with UPLO = 'U' or 'u', the array AP must *> contain the upper triangular matrix packed sequentially, @@ -101,7 +101,7 @@ *> *> \param[in,out] X *> \verbatim -*> X is DOUBLE PRECISION array of dimension at least +*> X is DOUBLE PRECISION array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element right-hand side vector b. On exit, X is overwritten diff -Nru lapack-3.7.0/BLAS/SRC/dtrmm.f lapack-3.7.1/BLAS/SRC/dtrmm.f --- lapack-3.7.0/BLAS/SRC/dtrmm.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/dtrmm.f 2017-06-17 22:46:53.000000000 +0000 @@ -109,7 +109,7 @@ *> *> \param[in] A *> \verbatim -*> A is DOUBLE PRECISION array of DIMENSION ( LDA, k ), where k is m +*> A is DOUBLE PRECISION array, dimension ( LDA, k ), where k is m *> when SIDE = 'L' or 'l' and is n when SIDE = 'R' or 'r'. *> Before entry with UPLO = 'U' or 'u', the leading k by k *> upper triangular part of the array A must contain the upper @@ -134,7 +134,7 @@ *> *> \param[in,out] B *> \verbatim -*> B is DOUBLE PRECISION array of DIMENSION ( LDB, n ). +*> B is DOUBLE PRECISION array, dimension ( LDB, N ) *> Before entry, the leading m by n part of the array B must *> contain the matrix B, and on exit is overwritten by the *> transformed matrix. diff -Nru lapack-3.7.0/BLAS/SRC/dtrmv.f lapack-3.7.1/BLAS/SRC/dtrmv.f --- lapack-3.7.0/BLAS/SRC/dtrmv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/dtrmv.f 2017-06-17 22:46:53.000000000 +0000 @@ -80,7 +80,7 @@ *> *> \param[in] A *> \verbatim -*> A is DOUBLE PRECISION array of DIMENSION ( LDA, n ). +*> A is DOUBLE PRECISION array, dimension ( LDA, N ) *> Before entry with UPLO = 'U' or 'u', the leading n by n *> upper triangular part of the array A must contain the upper *> triangular matrix and the strictly lower triangular part of @@ -103,7 +103,7 @@ *> *> \param[in,out] X *> \verbatim -*> X is DOUBLE PRECISION array of dimension at least +*> X is DOUBLE PRECISION array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element vector x. On exit, X is overwritten with the diff -Nru lapack-3.7.0/BLAS/SRC/dtrsm.f lapack-3.7.1/BLAS/SRC/dtrsm.f --- lapack-3.7.0/BLAS/SRC/dtrsm.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/dtrsm.f 2017-06-17 22:46:53.000000000 +0000 @@ -111,7 +111,7 @@ *> *> \param[in] A *> \verbatim -*> A is DOUBLE PRECISION array of DIMENSION ( LDA, k ), +*> A is DOUBLE PRECISION array, dimension ( LDA, k ), *> where k is m when SIDE = 'L' or 'l' *> and k is n when SIDE = 'R' or 'r'. *> Before entry with UPLO = 'U' or 'u', the leading k by k @@ -137,7 +137,7 @@ *> *> \param[in,out] B *> \verbatim -*> B is DOUBLE PRECISION array of DIMENSION ( LDB, n ). +*> B is DOUBLE PRECISION array, dimension ( LDB, N ) *> Before entry, the leading m by n part of the array B must *> contain the right-hand side matrix B, and on exit is *> overwritten by the solution matrix X. diff -Nru lapack-3.7.0/BLAS/SRC/dtrsv.f lapack-3.7.1/BLAS/SRC/dtrsv.f --- lapack-3.7.0/BLAS/SRC/dtrsv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/dtrsv.f 2017-06-17 22:46:53.000000000 +0000 @@ -83,7 +83,7 @@ *> *> \param[in] A *> \verbatim -*> A is DOUBLE PRECISION array of DIMENSION ( LDA, n ). +*> A is DOUBLE PRECISION array, dimension ( LDA, N ) *> Before entry with UPLO = 'U' or 'u', the leading n by n *> upper triangular part of the array A must contain the upper *> triangular matrix and the strictly lower triangular part of @@ -106,7 +106,7 @@ *> *> \param[in,out] X *> \verbatim -*> X is DOUBLE PRECISION array of dimension at least +*> X is DOUBLE PRECISION array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element right-hand side vector b. On exit, X is overwritten diff -Nru lapack-3.7.0/BLAS/SRC/dzasum.f lapack-3.7.1/BLAS/SRC/dzasum.f --- lapack-3.7.0/BLAS/SRC/dzasum.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/dzasum.f 2017-06-17 22:46:53.000000000 +0000 @@ -27,6 +27,26 @@ *> returns a single precision result. *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> number of elements in input vector(s) +*> \endverbatim +*> +*> \param[in,out] ZX +*> \verbatim +*> ZX is COMPLEX*16 array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) +*> \endverbatim +*> +*> \param[in] INCX +*> \verbatim +*> INCX is INTEGER +*> storage spacing between elements of ZX +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/dznrm2.f lapack-3.7.1/BLAS/SRC/dznrm2.f --- lapack-3.7.0/BLAS/SRC/dznrm2.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/dznrm2.f 2017-06-17 22:46:53.000000000 +0000 @@ -29,6 +29,27 @@ *> DZNRM2 := sqrt( x**H*x ) *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> number of elements in input vector(s) +*> \endverbatim +*> +*> \param[in] X +*> \verbatim +*> X is COMPLEX*16 array, dimension (N) +*> complex vector with N elements +*> \endverbatim +*> +*> \param[in] INCX +*> \verbatim +*> INCX is INTEGER +*> storage spacing between elements of X +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/icamax.f lapack-3.7.1/BLAS/SRC/icamax.f --- lapack-3.7.0/BLAS/SRC/icamax.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/icamax.f 2017-06-17 22:46:53.000000000 +0000 @@ -26,6 +26,26 @@ *> ICAMAX finds the index of the first element having maximum |Re(.)| + |Im(.)| *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> number of elements in input vector(s) +*> \endverbatim +*> +*> \param[in] CX +*> \verbatim +*> CX is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) +*> \endverbatim +*> +*> \param[in] INCX +*> \verbatim +*> INCX is INTEGER +*> storage spacing between elements of SX +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/idamax.f lapack-3.7.1/BLAS/SRC/idamax.f --- lapack-3.7.0/BLAS/SRC/idamax.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/idamax.f 2017-06-17 22:46:53.000000000 +0000 @@ -26,6 +26,26 @@ *> IDAMAX finds the index of the first element having maximum absolute value. *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> number of elements in input vector(s) +*> \endverbatim +*> +*> \param[in] DX +*> \verbatim +*> DX is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) +*> \endverbatim +*> +*> \param[in] INCX +*> \verbatim +*> INCX is INTEGER +*> storage spacing between elements of SX +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/isamax.f lapack-3.7.1/BLAS/SRC/isamax.f --- lapack-3.7.0/BLAS/SRC/isamax.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/isamax.f 2017-06-17 22:46:53.000000000 +0000 @@ -26,6 +26,26 @@ *> ISAMAX finds the index of the first element having maximum absolute value. *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> number of elements in input vector(s) +*> \endverbatim +*> +*> \param[in] SX +*> \verbatim +*> SX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) +*> \endverbatim +*> +*> \param[in] INCX +*> \verbatim +*> INCX is INTEGER +*> storage spacing between elements of SX +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/izamax.f lapack-3.7.1/BLAS/SRC/izamax.f --- lapack-3.7.0/BLAS/SRC/izamax.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/izamax.f 2017-06-17 22:46:53.000000000 +0000 @@ -26,6 +26,26 @@ *> IZAMAX finds the index of the first element having maximum |Re(.)| + |Im(.)| *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> number of elements in input vector(s) +*> \endverbatim +*> +*> \param[in] ZX +*> \verbatim +*> ZX is COMPLEX*16 array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) +*> \endverbatim +*> +*> \param[in] INCX +*> \verbatim +*> INCX is INTEGER +*> storage spacing between elements of SX +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/Makefile lapack-3.7.1/BLAS/SRC/Makefile --- lapack-3.7.0/BLAS/SRC/Makefile 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/Makefile 2017-06-17 22:46:53.000000000 +0000 @@ -42,7 +42,7 @@ # top-level make.inc # # To remove the object files after the library is created, enter -# make clean +# make cleanobj # To force the source files to be recompiled, enter, for example, # make single FRC=FRC # @@ -138,34 +138,33 @@ $(ZBLAS2) $(ZBLAS3) $(ALLBLAS) $(BLASLIB): $(ALLOBJ) - $(ARCH) $(ARCHFLAGS) $@ $(ALLOBJ) + $(ARCH) $(ARCHFLAGS) $@ $^ $(RANLIB) $@ single: $(SBLAS1) $(ALLBLAS) $(SBLAS2) $(SBLAS3) - $(ARCH) $(ARCHFLAGS) $(BLASLIB) $(SBLAS1) $(ALLBLAS) \ - $(SBLAS2) $(SBLAS3) + $(ARCH) $(ARCHFLAGS) $(BLASLIB) $^ $(RANLIB) $(BLASLIB) double: $(DBLAS1) $(ALLBLAS) $(DBLAS2) $(DBLAS3) - $(ARCH) $(ARCHFLAGS) $(BLASLIB) $(DBLAS1) $(ALLBLAS) \ - $(DBLAS2) $(DBLAS3) + $(ARCH) $(ARCHFLAGS) $(BLASLIB) $^ $(RANLIB) $(BLASLIB) complex: $(CBLAS1) $(CB1AUX) $(ALLBLAS) $(CBLAS2) $(CBLAS3) - $(ARCH) $(ARCHFLAGS) $(BLASLIB) $(CBLAS1) $(CB1AUX) \ - $(ALLBLAS) $(CBLAS2) $(CBLAS3) + $(ARCH) $(ARCHFLAGS) $(BLASLIB) $^ $(RANLIB) $(BLASLIB) complex16: $(ZBLAS1) $(ZB1AUX) $(ALLBLAS) $(ZBLAS2) $(ZBLAS3) - $(ARCH) $(ARCHFLAGS) $(BLASLIB) $(ZBLAS1) $(ZB1AUX) \ - $(ALLBLAS) $(ZBLAS2) $(ZBLAS3) + $(ARCH) $(ARCHFLAGS) $(BLASLIB) $^ $(RANLIB) $(BLASLIB) FRC: @FRC=$(FRC) -clean: +clean: cleanobj cleanlib +cleanobj: rm -f *.o +cleanlib: + #rm -f $(BLASLIB) # May point to a system lib, e.g. -lblas .f.o: $(FORTRAN) $(OPTS) -c -o $@ $< diff -Nru lapack-3.7.0/BLAS/SRC/sasum.f lapack-3.7.1/BLAS/SRC/sasum.f --- lapack-3.7.0/BLAS/SRC/sasum.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/sasum.f 2017-06-17 22:46:53.000000000 +0000 @@ -27,6 +27,26 @@ *> uses unrolled loops for increment equal to one. *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> number of elements in input vector(s) +*> \endverbatim +*> +*> \param[in] SX +*> \verbatim +*> SX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) +*> \endverbatim +*> +*> \param[in] INCX +*> \verbatim +*> INCX is INTEGER +*> storage spacing between elements of SX +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/saxpy.f lapack-3.7.1/BLAS/SRC/saxpy.f --- lapack-3.7.0/BLAS/SRC/saxpy.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/saxpy.f 2017-06-17 22:46:53.000000000 +0000 @@ -28,6 +28,43 @@ *> uses unrolled loops for increments equal to one. *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> number of elements in input vector(s) +*> \endverbatim +*> +*> \param[in] SA +*> \verbatim +*> SA is REAL +*> On entry, SA specifies the scalar alpha. +*> \endverbatim +*> +*> \param[in] SX +*> \verbatim +*> SX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) +*> \endverbatim +*> +*> \param[in] INCX +*> \verbatim +*> INCX is INTEGER +*> storage spacing between elements of SX +*> \endverbatim +*> +*> \param[in,out] SY +*> \verbatim +*> SY is REAL array, dimension ( 1 + ( N - 1 )*abs( INCY ) ) +*> \endverbatim +*> +*> \param[in] INCY +*> \verbatim +*> INCY is INTEGER +*> storage spacing between elements of SY +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/scabs1.f lapack-3.7.1/BLAS/SRC/scabs1.f --- lapack-3.7.0/BLAS/SRC/scabs1.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/scabs1.f 2017-06-17 22:46:53.000000000 +0000 @@ -23,6 +23,14 @@ *> SCABS1 computes |Re(.)| + |Im(.)| of a complex number *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] Z +*> \verbatim +*> Z is COMPLEX +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/scasum.f lapack-3.7.1/BLAS/SRC/scasum.f --- lapack-3.7.0/BLAS/SRC/scasum.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/scasum.f 2017-06-17 22:46:53.000000000 +0000 @@ -27,6 +27,26 @@ *> returns a single precision result. *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> number of elements in input vector(s) +*> \endverbatim +*> +*> \param[in,out] CX +*> \verbatim +*> CX is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) +*> \endverbatim +*> +*> \param[in] INCX +*> \verbatim +*> INCX is INTEGER +*> storage spacing between elements of SX +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/scnrm2.f lapack-3.7.1/BLAS/SRC/scnrm2.f --- lapack-3.7.0/BLAS/SRC/scnrm2.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/scnrm2.f 2017-06-17 22:46:53.000000000 +0000 @@ -29,6 +29,27 @@ *> SCNRM2 := sqrt( x**H*x ) *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> number of elements in input vector(s) +*> \endverbatim +*> +*> \param[in] X +*> \verbatim +*> X is COMPLEX array, dimension (N) +*> complex vector with N elements +*> \endverbatim +*> +*> \param[in] INCX +*> \verbatim +*> INCX is INTEGER +*> storage spacing between elements of X +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/scopy.f lapack-3.7.1/BLAS/SRC/scopy.f --- lapack-3.7.0/BLAS/SRC/scopy.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/scopy.f 2017-06-17 22:46:53.000000000 +0000 @@ -27,6 +27,37 @@ *> uses unrolled loops for increments equal to 1. *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> number of elements in input vector(s) +*> \endverbatim +*> +*> \param[in] SX +*> \verbatim +*> SX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) +*> \endverbatim +*> +*> \param[in] INCX +*> \verbatim +*> INCX is INTEGER +*> storage spacing between elements of SX +*> \endverbatim +*> +*> \param[out] SY +*> \verbatim +*> SY is REAL array, dimension ( 1 + ( N - 1 )*abs( INCY ) ) +*> \endverbatim +*> +*> \param[in] INCY +*> \verbatim +*> INCY is INTEGER +*> storage spacing between elements of SY +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/sdot.f lapack-3.7.1/BLAS/SRC/sdot.f --- lapack-3.7.0/BLAS/SRC/sdot.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/sdot.f 2017-06-17 22:46:53.000000000 +0000 @@ -27,6 +27,37 @@ *> uses unrolled loops for increments equal to one. *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> number of elements in input vector(s) +*> \endverbatim +*> +*> \param[in] SX +*> \verbatim +*> SX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) +*> \endverbatim +*> +*> \param[in] INCX +*> \verbatim +*> INCX is INTEGER +*> storage spacing between elements of SX +*> \endverbatim +*> +*> \param[in] SY +*> \verbatim +*> SY is REAL array, dimension ( 1 + ( N - 1 )*abs( INCY ) ) +*> \endverbatim +*> +*> \param[in] INCY +*> \verbatim +*> INCY is INTEGER +*> storage spacing between elements of SY +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/sdsdot.f lapack-3.7.1/BLAS/SRC/sdsdot.f --- lapack-3.7.0/BLAS/SRC/sdsdot.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/sdsdot.f 2017-06-17 22:46:53.000000000 +0000 @@ -18,9 +18,11 @@ * REAL SX(*),SY(*) * .. * -* PURPOSE -* ======= -* +*> \par Purpose: +* ============= +*> +*> \verbatim +*> * Compute the inner product of two vectors with extended * precision accumulation. * @@ -28,56 +30,78 @@ * SDSDOT = SB + sum for I = 0 to N-1 of SX(LX+I*INCX)*SY(LY+I*INCY), * where LX = 1 if INCX .GE. 0, else LX = 1+(1-N)*INCX, and LY is * defined in a similar way using INCY. +*> \endverbatim * -* AUTHOR -* ====== -* Lawson, C. L., (JPL), Hanson, R. J., (SNLA), -* Kincaid, D. R., (U. of Texas), Krogh, F. T., (JPL) -* -* ARGUMENTS -* ========= -* -* N (input) INTEGER -* number of elements in input vector(s) -* -* SB (input) REAL -* single precision scalar to be added to inner product -* -* SX (input) REAL array, dimension (N) -* single precision vector with N elements -* -* INCX (input) INTEGER -* storage spacing between elements of SX -* -* SY (input) REAL array, dimension (N) -* single precision vector with N elements -* -* INCY (input) INTEGER -* storage spacing between elements of SY -* -* SDSDOT (output) REAL -* single precision dot product (SB if N .LE. 0) -* -* Further Details -* =============== -* -* REFERENCES -* -* C. L. Lawson, R. J. Hanson, D. R. Kincaid and F. T. -* Krogh, Basic linear algebra subprograms for Fortran -* usage, Algorithm No. 539, Transactions on Mathematical -* Software 5, 3 (September 1979), pp. 308-323. -* -* REVISION HISTORY (YYMMDD) +* Arguments: +* ========== * -* 791001 DATE WRITTEN -* 890531 Changed all specific intrinsics to generic. (WRB) -* 890831 Modified array declarations. (WRB) -* 890831 REVISION DATE from Version 3.2 -* 891214 Prologue converted to Version 4.0 format. (BAB) -* 920310 Corrected definition of LX in DESCRIPTION. (WRB) -* 920501 Reformatted the REFERENCES section. (WRB) -* 070118 Reformat to LAPACK coding style +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> number of elements in input vector(s) +*> \endverbatim +*> +*> \param[in] SB +*> \verbatim +*> SB is REAL +*> single precision scalar to be added to inner product +*> \endverbatim +*> +*> \param[in] SX +*> \verbatim +*> SX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) +*> single precision vector with N elements +*> \endverbatim +*> +*> \param[in] INCX +*> \verbatim +*> INCX is INTEGER +*> storage spacing between elements of SX +*> \endverbatim +*> +*> \param[in] SY +*> \verbatim +*> SY is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) +*> single precision vector with N elements +*> \endverbatim +*> +*> \param[in] INCY +*> \verbatim +*> INCY is INTEGER +*> storage spacing between elements of SY +*> \endverbatim +* +* Authors: +* ======== +* +*> \author Lawson, C. L., (JPL), Hanson, R. J., (SNLA), +*> \author Kincaid, D. R., (U. of Texas), Krogh, F. T., (JPL) +* +*> \ingroup complex_blas_level1 +* +*> \par Further Details: +* ===================== +*> +*> \verbatim +*> +*> REFERENCES +*> +*> C. L. Lawson, R. J. Hanson, D. R. Kincaid and F. T. +*> Krogh, Basic linear algebra subprograms for Fortran +*> usage, Algorithm No. 539, Transactions on Mathematical +*> Software 5, 3 (September 1979), pp. 308-323. +*> +*> REVISION HISTORY (YYMMDD) +*> +*> 791001 DATE WRITTEN +*> 890531 Changed all specific intrinsics to generic. (WRB) +*> 890831 Modified array declarations. (WRB) +*> 890831 REVISION DATE from Version 3.2 +*> 891214 Prologue converted to Version 4.0 format. (BAB) +*> 920310 Corrected definition of LX in DESCRIPTION. (WRB) +*> 920501 Reformatted the REFERENCES section. (WRB) +*> 070118 Reformat to LAPACK coding style +*> \endverbatim * * ===================================================================== * diff -Nru lapack-3.7.0/BLAS/SRC/sgbmv.f lapack-3.7.1/BLAS/SRC/sgbmv.f --- lapack-3.7.0/BLAS/SRC/sgbmv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/sgbmv.f 2017-06-17 22:46:53.000000000 +0000 @@ -85,7 +85,7 @@ *> *> \param[in] A *> \verbatim -*> A is REAL array of DIMENSION ( LDA, n ). +*> A is REAL array, dimension ( LDA, N ) *> Before entry, the leading ( kl + ku + 1 ) by n part of the *> array A must contain the matrix of coefficients, supplied *> column by column, with the leading diagonal of the matrix in @@ -116,7 +116,7 @@ *> *> \param[in] X *> \verbatim -*> X is REAL array of DIMENSION at least +*> X is REAL array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n' *> and at least *> ( 1 + ( m - 1 )*abs( INCX ) ) otherwise. @@ -140,7 +140,7 @@ *> *> \param[in,out] Y *> \verbatim -*> Y is REAL array of DIMENSION at least +*> Y is REAL array, dimension at least *> ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n' *> and at least *> ( 1 + ( n - 1 )*abs( INCY ) ) otherwise. diff -Nru lapack-3.7.0/BLAS/SRC/sgemm.f lapack-3.7.1/BLAS/SRC/sgemm.f --- lapack-3.7.0/BLAS/SRC/sgemm.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/sgemm.f 2017-06-17 22:46:53.000000000 +0000 @@ -97,7 +97,7 @@ *> *> \param[in] A *> \verbatim -*> A is REAL array of DIMENSION ( LDA, ka ), where ka is +*> A is REAL array, dimension ( LDA, ka ), where ka is *> k when TRANSA = 'N' or 'n', and is m otherwise. *> Before entry with TRANSA = 'N' or 'n', the leading m by k *> part of the array A must contain the matrix A, otherwise @@ -116,7 +116,7 @@ *> *> \param[in] B *> \verbatim -*> B is REAL array of DIMENSION ( LDB, kb ), where kb is +*> B is REAL array, dimension ( LDB, kb ), where kb is *> n when TRANSB = 'N' or 'n', and is k otherwise. *> Before entry with TRANSB = 'N' or 'n', the leading k by n *> part of the array B must contain the matrix B, otherwise @@ -142,7 +142,7 @@ *> *> \param[in,out] C *> \verbatim -*> C is REAL array of DIMENSION ( LDC, n ). +*> C is REAL array, dimension ( LDC, N ) *> Before entry, the leading m by n part of the array C must *> contain the matrix C, except when beta is zero, in which *> case C need not be set on entry. diff -Nru lapack-3.7.0/BLAS/SRC/sgemv.f lapack-3.7.1/BLAS/SRC/sgemv.f --- lapack-3.7.0/BLAS/SRC/sgemv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/sgemv.f 2017-06-17 22:46:53.000000000 +0000 @@ -71,7 +71,7 @@ *> *> \param[in] A *> \verbatim -*> A is REAL array of DIMENSION ( LDA, n ). +*> A is REAL array, dimension ( LDA, N ) *> Before entry, the leading m by n part of the array A must *> contain the matrix of coefficients. *> \endverbatim @@ -86,7 +86,7 @@ *> *> \param[in] X *> \verbatim -*> X is REAL array of DIMENSION at least +*> X is REAL array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n' *> and at least *> ( 1 + ( m - 1 )*abs( INCX ) ) otherwise. @@ -110,7 +110,7 @@ *> *> \param[in,out] Y *> \verbatim -*> Y is REAL array of DIMENSION at least +*> Y is REAL array, dimension at least *> ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n' *> and at least *> ( 1 + ( n - 1 )*abs( INCY ) ) otherwise. diff -Nru lapack-3.7.0/BLAS/SRC/sger.f lapack-3.7.1/BLAS/SRC/sger.f --- lapack-3.7.0/BLAS/SRC/sger.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/sger.f 2017-06-17 22:46:53.000000000 +0000 @@ -57,7 +57,7 @@ *> *> \param[in] X *> \verbatim -*> X is REAL array of dimension at least +*> X is REAL array, dimension at least *> ( 1 + ( m - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the m *> element vector x. @@ -72,7 +72,7 @@ *> *> \param[in] Y *> \verbatim -*> Y is REAL array of dimension at least +*> Y is REAL array, dimension at least *> ( 1 + ( n - 1 )*abs( INCY ) ). *> Before entry, the incremented array Y must contain the n *> element vector y. @@ -87,7 +87,7 @@ *> *> \param[in,out] A *> \verbatim -*> A is REAL array of DIMENSION ( LDA, n ). +*> A is REAL array, dimension ( LDA, N ) *> Before entry, the leading m by n part of the array A must *> contain the matrix of coefficients. On exit, A is *> overwritten by the updated matrix. diff -Nru lapack-3.7.0/BLAS/SRC/snrm2.f lapack-3.7.1/BLAS/SRC/snrm2.f --- lapack-3.7.0/BLAS/SRC/snrm2.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/snrm2.f 2017-06-17 22:46:53.000000000 +0000 @@ -29,6 +29,26 @@ *> SNRM2 := sqrt( x'*x ). *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> number of elements in input vector(s) +*> \endverbatim +*> +*> \param[in] X +*> \verbatim +*> X is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) +*> \endverbatim +*> +*> \param[in] INCX +*> \verbatim +*> INCX is INTEGER +*> storage spacing between elements of SX +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/srot.f lapack-3.7.1/BLAS/SRC/srot.f --- lapack-3.7.0/BLAS/SRC/srot.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/srot.f 2017-06-17 22:46:53.000000000 +0000 @@ -27,6 +27,47 @@ *> applies a plane rotation. *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> number of elements in input vector(s) +*> \endverbatim +*> +*> \param[in,out] SX +*> \verbatim +*> SX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) +*> \endverbatim +*> +*> \param[in] INCX +*> \verbatim +*> INCX is INTEGER +*> storage spacing between elements of SX +*> \endverbatim +*> +*> \param[in,out] SY +*> \verbatim +*> SY is REAL array, dimension ( 1 + ( N - 1 )*abs( INCY ) ) +*> \endverbatim +*> +*> \param[in] INCY +*> \verbatim +*> INCY is INTEGER +*> storage spacing between elements of SY +*> \endverbatim +*> +*> \param[in] C +*> \verbatim +*> C is REAL +*> \endverbatim +*> +*> \param[in] S +*> \verbatim +*> S is REAL +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/srotg.f lapack-3.7.1/BLAS/SRC/srotg.f --- lapack-3.7.0/BLAS/SRC/srotg.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/srotg.f 2017-06-17 22:46:53.000000000 +0000 @@ -23,6 +23,29 @@ *> SROTG construct givens plane rotation. *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] SA +*> \verbatim +*> SA is REAL +*> \endverbatim +*> +*> \param[in] SB +*> \verbatim +*> SB is REAL +*> \endverbatim +*> +*> \param[out] C +*> \verbatim +*> C is REAL +*> \endverbatim +*> +*> \param[out] S +*> \verbatim +*> S is REAL +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/srotm.f lapack-3.7.1/BLAS/SRC/srotm.f --- lapack-3.7.0/BLAS/SRC/srotm.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/srotm.f 2017-06-17 22:46:53.000000000 +0000 @@ -52,8 +52,7 @@ *> *> \param[in,out] SX *> \verbatim -*> SX is REAL array, dimension N -*> double precision vector with N elements +*> SX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) *> \endverbatim *> *> \param[in] INCX @@ -64,8 +63,7 @@ *> *> \param[in,out] SY *> \verbatim -*> SY is REAL array, dimension N -*> double precision vector with N elements +*> SY is REAL array, dimension ( 1 + ( N - 1 )*abs( INCY ) ) *> \endverbatim *> *> \param[in] INCY @@ -74,9 +72,9 @@ *> storage spacing between elements of SY *> \endverbatim *> -*> \param[in,out] SPARAM +*> \param[in] SPARAM *> \verbatim -*> SPARAM is REAL array, dimension 5 +*> SPARAM is REAL array, dimension (5) *> SPARAM(1)=SFLAG *> SPARAM(2)=SH11 *> SPARAM(3)=SH21 diff -Nru lapack-3.7.0/BLAS/SRC/srotmg.f lapack-3.7.1/BLAS/SRC/srotmg.f --- lapack-3.7.0/BLAS/SRC/srotmg.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/srotmg.f 2017-06-17 22:46:53.000000000 +0000 @@ -65,9 +65,9 @@ *> SY1 is REAL *> \endverbatim *> -*> \param[in,out] SPARAM +*> \param[out] SPARAM *> \verbatim -*> SPARAM is REAL array, dimension 5 +*> SPARAM is REAL array, dimension (5) *> SPARAM(1)=SFLAG *> SPARAM(2)=SH11 *> SPARAM(3)=SH21 diff -Nru lapack-3.7.0/BLAS/SRC/ssbmv.f lapack-3.7.1/BLAS/SRC/ssbmv.f --- lapack-3.7.0/BLAS/SRC/ssbmv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/ssbmv.f 2017-06-17 22:46:53.000000000 +0000 @@ -72,7 +72,7 @@ *> *> \param[in] A *> \verbatim -*> A is REAL array of DIMENSION ( LDA, n ). +*> A is REAL array, dimension ( LDA, N ) *> Before entry with UPLO = 'U' or 'u', the leading ( k + 1 ) *> by n part of the array A must contain the upper triangular *> band part of the symmetric matrix, supplied column by @@ -120,7 +120,7 @@ *> *> \param[in] X *> \verbatim -*> X is REAL array of DIMENSION at least +*> X is REAL array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the *> vector x. @@ -141,7 +141,7 @@ *> *> \param[in,out] Y *> \verbatim -*> Y is REAL array of DIMENSION at least +*> Y is REAL array, dimension at least *> ( 1 + ( n - 1 )*abs( INCY ) ). *> Before entry, the incremented array Y must contain the *> vector y. On exit, Y is overwritten by the updated vector y. diff -Nru lapack-3.7.0/BLAS/SRC/sscal.f lapack-3.7.1/BLAS/SRC/sscal.f --- lapack-3.7.0/BLAS/SRC/sscal.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/sscal.f 2017-06-17 22:46:53.000000000 +0000 @@ -24,10 +24,36 @@ *> *> \verbatim *> -*> scales a vector by a constant. +*> SSCAL scales a vector by a constant. *> uses unrolled loops for increment equal to 1. *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> number of elements in input vector(s) +*> \endverbatim +*> +*> \param[in] SA +*> \verbatim +*> SA is REAL +*> On entry, SA specifies the scalar alpha. +*> \endverbatim +*> +*> \param[in,out] SX +*> \verbatim +*> SX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) +*> \endverbatim +*> +*> \param[in] INCX +*> \verbatim +*> INCX is INTEGER +*> storage spacing between elements of SX +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/sspmv.f lapack-3.7.1/BLAS/SRC/sspmv.f --- lapack-3.7.0/BLAS/SRC/sspmv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/sspmv.f 2017-06-17 22:46:53.000000000 +0000 @@ -65,7 +65,7 @@ *> *> \param[in] AP *> \verbatim -*> AP is REAL array of DIMENSION at least +*> AP is REAL array, dimension at least *> ( ( n*( n + 1 ) )/2 ). *> Before entry with UPLO = 'U' or 'u', the array AP must *> contain the upper triangular part of the symmetric matrix @@ -81,7 +81,7 @@ *> *> \param[in] X *> \verbatim -*> X is REAL array of dimension at least +*> X is REAL array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element vector x. @@ -103,7 +103,7 @@ *> *> \param[in,out] Y *> \verbatim -*> Y is REAL array of dimension at least +*> Y is REAL array, dimension at least *> ( 1 + ( n - 1 )*abs( INCY ) ). *> Before entry, the incremented array Y must contain the n *> element vector y. On exit, Y is overwritten by the updated diff -Nru lapack-3.7.0/BLAS/SRC/sspr2.f lapack-3.7.1/BLAS/SRC/sspr2.f --- lapack-3.7.0/BLAS/SRC/sspr2.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/sspr2.f 2017-06-17 22:46:53.000000000 +0000 @@ -65,7 +65,7 @@ *> *> \param[in] X *> \verbatim -*> X is REAL array of dimension at least +*> X is REAL array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element vector x. @@ -80,7 +80,7 @@ *> *> \param[in] Y *> \verbatim -*> Y is REAL array of dimension at least +*> Y is REAL array, dimension at least *> ( 1 + ( n - 1 )*abs( INCY ) ). *> Before entry, the incremented array Y must contain the n *> element vector y. @@ -95,7 +95,7 @@ *> *> \param[in,out] AP *> \verbatim -*> AP is REAL array of DIMENSION at least +*> AP is REAL array, dimension at least *> ( ( n*( n + 1 ) )/2 ). *> Before entry with UPLO = 'U' or 'u', the array AP must *> contain the upper triangular part of the symmetric matrix diff -Nru lapack-3.7.0/BLAS/SRC/sspr.f lapack-3.7.1/BLAS/SRC/sspr.f --- lapack-3.7.0/BLAS/SRC/sspr.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/sspr.f 2017-06-17 22:46:53.000000000 +0000 @@ -65,7 +65,7 @@ *> *> \param[in] X *> \verbatim -*> X is REAL array of dimension at least +*> X is REAL array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element vector x. @@ -80,7 +80,7 @@ *> *> \param[in,out] AP *> \verbatim -*> AP is REAL array of DIMENSION at least +*> AP is REAL array, dimension at least *> ( ( n*( n + 1 ) )/2 ). *> Before entry with UPLO = 'U' or 'u', the array AP must *> contain the upper triangular part of the symmetric matrix diff -Nru lapack-3.7.0/BLAS/SRC/sswap.f lapack-3.7.1/BLAS/SRC/sswap.f --- lapack-3.7.0/BLAS/SRC/sswap.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/sswap.f 2017-06-17 22:46:53.000000000 +0000 @@ -23,10 +23,41 @@ *> *> \verbatim *> -*> interchanges two vectors. +*> SSWAP interchanges two vectors. *> uses unrolled loops for increments equal to 1. *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> number of elements in input vector(s) +*> \endverbatim +*> +*> \param[in,out] SX +*> \verbatim +*> SX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) +*> \endverbatim +*> +*> \param[in] INCX +*> \verbatim +*> INCX is INTEGER +*> storage spacing between elements of SX +*> \endverbatim +*> +*> \param[in,out] SY +*> \verbatim +*> SY is REAL array, dimension ( 1 + ( N - 1 )*abs( INCY ) ) +*> \endverbatim +*> +*> \param[in] INCY +*> \verbatim +*> INCY is INTEGER +*> storage spacing between elements of SY +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/ssymm.f lapack-3.7.1/BLAS/SRC/ssymm.f --- lapack-3.7.0/BLAS/SRC/ssymm.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/ssymm.f 2017-06-17 22:46:53.000000000 +0000 @@ -87,7 +87,7 @@ *> *> \param[in] A *> \verbatim -*> A is REAL array of DIMENSION ( LDA, ka ), where ka is +*> A is REAL array, dimension ( LDA, ka ), where ka is *> m when SIDE = 'L' or 'l' and is n otherwise. *> Before entry with SIDE = 'L' or 'l', the m by m part of *> the array A must contain the symmetric matrix, such that @@ -122,7 +122,7 @@ *> *> \param[in] B *> \verbatim -*> B is REAL array of DIMENSION ( LDB, n ). +*> B is REAL array, dimension ( LDB, N ) *> Before entry, the leading m by n part of the array B must *> contain the matrix B. *> \endverbatim @@ -144,7 +144,7 @@ *> *> \param[in,out] C *> \verbatim -*> C is REAL array of DIMENSION ( LDC, n ). +*> C is REAL array, dimension ( LDC, N ) *> Before entry, the leading m by n part of the array C must *> contain the matrix C, except when beta is zero, in which *> case C need not be set on entry. diff -Nru lapack-3.7.0/BLAS/SRC/ssymv.f lapack-3.7.1/BLAS/SRC/ssymv.f --- lapack-3.7.0/BLAS/SRC/ssymv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/ssymv.f 2017-06-17 22:46:53.000000000 +0000 @@ -65,7 +65,7 @@ *> *> \param[in] A *> \verbatim -*> A is REAL array of DIMENSION ( LDA, n ). +*> A is REAL array, dimension ( LDA, N ) *> Before entry with UPLO = 'U' or 'u', the leading n by n *> upper triangular part of the array A must contain the upper *> triangular part of the symmetric matrix and the strictly @@ -86,7 +86,7 @@ *> *> \param[in] X *> \verbatim -*> X is REAL array of dimension at least +*> X is REAL array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element vector x. @@ -108,7 +108,7 @@ *> *> \param[in,out] Y *> \verbatim -*> Y is REAL array of dimension at least +*> Y is REAL array, dimension at least *> ( 1 + ( n - 1 )*abs( INCY ) ). *> Before entry, the incremented array Y must contain the n *> element vector y. On exit, Y is overwritten by the updated diff -Nru lapack-3.7.0/BLAS/SRC/ssyr2.f lapack-3.7.1/BLAS/SRC/ssyr2.f --- lapack-3.7.0/BLAS/SRC/ssyr2.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/ssyr2.f 2017-06-17 22:46:53.000000000 +0000 @@ -65,7 +65,7 @@ *> *> \param[in] X *> \verbatim -*> X is REAL array of dimension at least +*> X is REAL array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element vector x. @@ -80,7 +80,7 @@ *> *> \param[in] Y *> \verbatim -*> Y is REAL array of dimension at least +*> Y is REAL array, dimension at least *> ( 1 + ( n - 1 )*abs( INCY ) ). *> Before entry, the incremented array Y must contain the n *> element vector y. @@ -95,7 +95,7 @@ *> *> \param[in,out] A *> \verbatim -*> A is REAL array of DIMENSION ( LDA, n ). +*> A is REAL array, dimension ( LDA, N ) *> Before entry with UPLO = 'U' or 'u', the leading n by n *> upper triangular part of the array A must contain the upper *> triangular part of the symmetric matrix and the strictly diff -Nru lapack-3.7.0/BLAS/SRC/ssyr2k.f lapack-3.7.1/BLAS/SRC/ssyr2k.f --- lapack-3.7.0/BLAS/SRC/ssyr2k.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/ssyr2k.f 2017-06-17 22:46:53.000000000 +0000 @@ -95,7 +95,7 @@ *> *> \param[in] A *> \verbatim -*> A is REAL array of DIMENSION ( LDA, ka ), where ka is +*> A is REAL array, dimension ( LDA, ka ), where ka is *> k when TRANS = 'N' or 'n', and is n otherwise. *> Before entry with TRANS = 'N' or 'n', the leading n by k *> part of the array A must contain the matrix A, otherwise @@ -114,7 +114,7 @@ *> *> \param[in] B *> \verbatim -*> B is REAL array of DIMENSION ( LDB, kb ), where kb is +*> B is REAL array, dimension ( LDB, kb ), where kb is *> k when TRANS = 'N' or 'n', and is n otherwise. *> Before entry with TRANS = 'N' or 'n', the leading n by k *> part of the array B must contain the matrix B, otherwise @@ -139,7 +139,7 @@ *> *> \param[in,out] C *> \verbatim -*> C is REAL array of DIMENSION ( LDC, n ). +*> C is REAL array, dimension ( LDC, N ) *> Before entry with UPLO = 'U' or 'u', the leading n by n *> upper triangular part of the array C must contain the upper *> triangular part of the symmetric matrix and the strictly diff -Nru lapack-3.7.0/BLAS/SRC/ssyr.f lapack-3.7.1/BLAS/SRC/ssyr.f --- lapack-3.7.0/BLAS/SRC/ssyr.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/ssyr.f 2017-06-17 22:46:53.000000000 +0000 @@ -65,7 +65,7 @@ *> *> \param[in] X *> \verbatim -*> X is REAL array of dimension at least +*> X is REAL array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element vector x. @@ -80,7 +80,7 @@ *> *> \param[in,out] A *> \verbatim -*> A is REAL array of DIMENSION ( LDA, n ). +*> A is REAL array, dimension ( LDA, N ) *> Before entry with UPLO = 'U' or 'u', the leading n by n *> upper triangular part of the array A must contain the upper *> triangular part of the symmetric matrix and the strictly diff -Nru lapack-3.7.0/BLAS/SRC/ssyrk.f lapack-3.7.1/BLAS/SRC/ssyrk.f --- lapack-3.7.0/BLAS/SRC/ssyrk.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/ssyrk.f 2017-06-17 22:46:53.000000000 +0000 @@ -92,7 +92,7 @@ *> *> \param[in] A *> \verbatim -*> A is REAL array of DIMENSION ( LDA, ka ), where ka is +*> A is REAL array, dimension ( LDA, ka ), where ka is *> k when TRANS = 'N' or 'n', and is n otherwise. *> Before entry with TRANS = 'N' or 'n', the leading n by k *> part of the array A must contain the matrix A, otherwise @@ -117,7 +117,7 @@ *> *> \param[in,out] C *> \verbatim -*> C is REAL array of DIMENSION ( LDC, n ). +*> C is REAL array, dimension ( LDC, N ) *> Before entry with UPLO = 'U' or 'u', the leading n by n *> upper triangular part of the array C must contain the upper *> triangular part of the symmetric matrix and the strictly diff -Nru lapack-3.7.0/BLAS/SRC/stbmv.f lapack-3.7.1/BLAS/SRC/stbmv.f --- lapack-3.7.0/BLAS/SRC/stbmv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/stbmv.f 2017-06-17 22:46:53.000000000 +0000 @@ -90,7 +90,7 @@ *> *> \param[in] A *> \verbatim -*> A is REAL array of DIMENSION ( LDA, n ). +*> A is REAL array, dimension ( LDA, N ) *> Before entry with UPLO = 'U' or 'u', the leading ( k + 1 ) *> by n part of the array A must contain the upper triangular *> band part of the matrix of coefficients, supplied column by @@ -142,7 +142,7 @@ *> *> \param[in,out] X *> \verbatim -*> X is REAL array of dimension at least +*> X is REAL array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element vector x. On exit, X is overwritten with the diff -Nru lapack-3.7.0/BLAS/SRC/stbsv.f lapack-3.7.1/BLAS/SRC/stbsv.f --- lapack-3.7.0/BLAS/SRC/stbsv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/stbsv.f 2017-06-17 22:46:53.000000000 +0000 @@ -94,7 +94,7 @@ *> *> \param[in] A *> \verbatim -*> A is REAL array of DIMENSION ( LDA, n ). +*> A is REAL array, dimension ( LDA, N ) *> Before entry with UPLO = 'U' or 'u', the leading ( k + 1 ) *> by n part of the array A must contain the upper triangular *> band part of the matrix of coefficients, supplied column by @@ -146,7 +146,7 @@ *> *> \param[in,out] X *> \verbatim -*> X is REAL array of dimension at least +*> X is REAL array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element right-hand side vector b. On exit, X is overwritten diff -Nru lapack-3.7.0/BLAS/SRC/stpmv.f lapack-3.7.1/BLAS/SRC/stpmv.f --- lapack-3.7.0/BLAS/SRC/stpmv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/stpmv.f 2017-06-17 22:46:53.000000000 +0000 @@ -80,7 +80,7 @@ *> *> \param[in] AP *> \verbatim -*> AP is REAL array of DIMENSION at least +*> AP is REAL array, dimension at least *> ( ( n*( n + 1 ) )/2 ). *> Before entry with UPLO = 'U' or 'u', the array AP must *> contain the upper triangular matrix packed sequentially, @@ -98,7 +98,7 @@ *> *> \param[in,out] X *> \verbatim -*> X is REAL array of dimension at least +*> X is REAL array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element vector x. On exit, X is overwritten with the diff -Nru lapack-3.7.0/BLAS/SRC/stpsv.f lapack-3.7.1/BLAS/SRC/stpsv.f --- lapack-3.7.0/BLAS/SRC/stpsv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/stpsv.f 2017-06-17 22:46:53.000000000 +0000 @@ -83,7 +83,7 @@ *> *> \param[in] AP *> \verbatim -*> AP is REAL array of DIMENSION at least +*> AP is REAL array, dimension at least *> ( ( n*( n + 1 ) )/2 ). *> Before entry with UPLO = 'U' or 'u', the array AP must *> contain the upper triangular matrix packed sequentially, @@ -101,7 +101,7 @@ *> *> \param[in,out] X *> \verbatim -*> X is REAL array of dimension at least +*> X is REAL array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element right-hand side vector b. On exit, X is overwritten diff -Nru lapack-3.7.0/BLAS/SRC/strmm.f lapack-3.7.1/BLAS/SRC/strmm.f --- lapack-3.7.0/BLAS/SRC/strmm.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/strmm.f 2017-06-17 22:46:53.000000000 +0000 @@ -109,7 +109,7 @@ *> *> \param[in] A *> \verbatim -*> A is REAL array of DIMENSION ( LDA, k ), where k is m +*> A is REAL array, dimension ( LDA, k ), where k is m *> when SIDE = 'L' or 'l' and is n when SIDE = 'R' or 'r'. *> Before entry with UPLO = 'U' or 'u', the leading k by k *> upper triangular part of the array A must contain the upper @@ -134,7 +134,7 @@ *> *> \param[in,out] B *> \verbatim -*> B is REAL array of DIMENSION ( LDB, n ). +*> B is REAL array, dimension ( LDB, N ) *> Before entry, the leading m by n part of the array B must *> contain the matrix B, and on exit is overwritten by the *> transformed matrix. diff -Nru lapack-3.7.0/BLAS/SRC/strmv.f lapack-3.7.1/BLAS/SRC/strmv.f --- lapack-3.7.0/BLAS/SRC/strmv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/strmv.f 2017-06-17 22:46:53.000000000 +0000 @@ -80,7 +80,7 @@ *> *> \param[in] A *> \verbatim -*> A is REAL array of DIMENSION ( LDA, n ). +*> A is REAL array, dimension ( LDA, N ) *> Before entry with UPLO = 'U' or 'u', the leading n by n *> upper triangular part of the array A must contain the upper *> triangular matrix and the strictly lower triangular part of @@ -103,7 +103,7 @@ *> *> \param[in,out] X *> \verbatim -*> X is REAL array of dimension at least +*> X is REAL array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element vector x. On exit, X is overwritten with the diff -Nru lapack-3.7.0/BLAS/SRC/strsm.f lapack-3.7.1/BLAS/SRC/strsm.f --- lapack-3.7.0/BLAS/SRC/strsm.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/strsm.f 2017-06-17 22:46:53.000000000 +0000 @@ -111,7 +111,7 @@ *> *> \param[in] A *> \verbatim -*> A is REAL array of DIMENSION ( LDA, k ), +*> A is REAL array, dimension ( LDA, k ), *> where k is m when SIDE = 'L' or 'l' *> and k is n when SIDE = 'R' or 'r'. *> Before entry with UPLO = 'U' or 'u', the leading k by k @@ -137,7 +137,7 @@ *> *> \param[in,out] B *> \verbatim -*> B is REAL array of DIMENSION ( LDB, n ). +*> B is REAL array, dimension ( LDB, N ) *> Before entry, the leading m by n part of the array B must *> contain the right-hand side matrix B, and on exit is *> overwritten by the solution matrix X. diff -Nru lapack-3.7.0/BLAS/SRC/strsv.f lapack-3.7.1/BLAS/SRC/strsv.f --- lapack-3.7.0/BLAS/SRC/strsv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/strsv.f 2017-06-17 22:46:53.000000000 +0000 @@ -83,7 +83,7 @@ *> *> \param[in] A *> \verbatim -*> A is REAL array of DIMENSION ( LDA, n ). +*> A is REAL array, dimension ( LDA, N ) *> Before entry with UPLO = 'U' or 'u', the leading n by n *> upper triangular part of the array A must contain the upper *> triangular matrix and the strictly lower triangular part of @@ -106,7 +106,7 @@ *> *> \param[in,out] X *> \verbatim -*> X is REAL array of dimension at least +*> X is REAL array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element right-hand side vector b. On exit, X is overwritten diff -Nru lapack-3.7.0/BLAS/SRC/zaxpy.f lapack-3.7.1/BLAS/SRC/zaxpy.f --- lapack-3.7.0/BLAS/SRC/zaxpy.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/zaxpy.f 2017-06-17 22:46:53.000000000 +0000 @@ -27,6 +27,43 @@ *> ZAXPY constant times a vector plus a vector. *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> number of elements in input vector(s) +*> \endverbatim +*> +*> \param[in] ZA +*> \verbatim +*> ZA is COMPLEX*16 +*> On entry, ZA specifies the scalar alpha. +*> \endverbatim +*> +*> \param[in] ZX +*> \verbatim +*> ZX is COMPLEX*16 array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) +*> \endverbatim +*> +*> \param[in] INCX +*> \verbatim +*> INCX is INTEGER +*> storage spacing between elements of ZX +*> \endverbatim +*> +*> \param[in,out] ZY +*> \verbatim +*> ZY is COMPLEX*16 array, dimension ( 1 + ( N - 1 )*abs( INCY ) ) +*> \endverbatim +*> +*> \param[in] INCY +*> \verbatim +*> INCY is INTEGER +*> storage spacing between elements of ZY +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/zcopy.f lapack-3.7.1/BLAS/SRC/zcopy.f --- lapack-3.7.0/BLAS/SRC/zcopy.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/zcopy.f 2017-06-17 22:46:53.000000000 +0000 @@ -26,6 +26,37 @@ *> ZCOPY copies a vector, x, to a vector, y. *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> number of elements in input vector(s) +*> \endverbatim +*> +*> \param[in] ZX +*> \verbatim +*> ZX is COMPLEX*16 array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) +*> \endverbatim +*> +*> \param[in] INCX +*> \verbatim +*> INCX is INTEGER +*> storage spacing between elements of ZX +*> \endverbatim +*> +*> \param[out] ZY +*> \verbatim +*> ZY is COMPLEX*16 array, dimension ( 1 + ( N - 1 )*abs( INCY ) ) +*> \endverbatim +*> +*> \param[in] INCY +*> \verbatim +*> INCY is INTEGER +*> storage spacing between elements of ZY +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/zdotc.f lapack-3.7.1/BLAS/SRC/zdotc.f --- lapack-3.7.0/BLAS/SRC/zdotc.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/zdotc.f 2017-06-17 22:46:53.000000000 +0000 @@ -28,6 +28,37 @@ *> *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> number of elements in input vector(s) +*> \endverbatim +*> +*> \param[in] ZX +*> \verbatim +*> ZX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) +*> \endverbatim +*> +*> \param[in] INCX +*> \verbatim +*> INCX is INTEGER +*> storage spacing between elements of ZX +*> \endverbatim +*> +*> \param[in] ZY +*> \verbatim +*> ZY is REAL array, dimension ( 1 + ( N - 1 )*abs( INCY ) ) +*> \endverbatim +*> +*> \param[in] INCY +*> \verbatim +*> INCY is INTEGER +*> storage spacing between elements of ZY +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/zdotu.f lapack-3.7.1/BLAS/SRC/zdotu.f --- lapack-3.7.0/BLAS/SRC/zdotu.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/zdotu.f 2017-06-17 22:46:53.000000000 +0000 @@ -28,6 +28,37 @@ *> *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> number of elements in input vector(s) +*> \endverbatim +*> +*> \param[in] ZX +*> \verbatim +*> ZX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) +*> \endverbatim +*> +*> \param[in] INCX +*> \verbatim +*> INCX is INTEGER +*> storage spacing between elements of ZX +*> \endverbatim +*> +*> \param[in] ZY +*> \verbatim +*> ZY is REAL array, dimension ( 1 + ( N - 1 )*abs( INCY ) ) +*> \endverbatim +*> +*> \param[in] INCY +*> \verbatim +*> INCY is INTEGER +*> storage spacing between elements of ZY +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/zdscal.f lapack-3.7.1/BLAS/SRC/zdscal.f --- lapack-3.7.0/BLAS/SRC/zdscal.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/zdscal.f 2017-06-17 22:46:53.000000000 +0000 @@ -27,6 +27,32 @@ *> ZDSCAL scales a vector by a constant. *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> number of elements in input vector(s) +*> \endverbatim +*> +*> \param[in] DA +*> \verbatim +*> DA is DOUBLE PRECISION +*> On entry, DA specifies the scalar alpha. +*> \endverbatim +*> +*> \param[in,out] ZX +*> \verbatim +*> ZX is COMPLEX*16 array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) +*> \endverbatim +*> +*> \param[in] INCX +*> \verbatim +*> INCX is INTEGER +*> storage spacing between elements of ZX +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/zgbmv.f lapack-3.7.1/BLAS/SRC/zgbmv.f --- lapack-3.7.0/BLAS/SRC/zgbmv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/zgbmv.f 2017-06-17 22:46:53.000000000 +0000 @@ -87,7 +87,7 @@ *> *> \param[in] A *> \verbatim -*> A is COMPLEX*16 array of DIMENSION ( LDA, n ). +*> A is COMPLEX*16 array, dimension ( LDA, N ) *> Before entry, the leading ( kl + ku + 1 ) by n part of the *> array A must contain the matrix of coefficients, supplied *> column by column, with the leading diagonal of the matrix in @@ -118,7 +118,7 @@ *> *> \param[in] X *> \verbatim -*> X is COMPLEX*16 array of DIMENSION at least +*> X is COMPLEX*16 array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n' *> and at least *> ( 1 + ( m - 1 )*abs( INCX ) ) otherwise. @@ -142,7 +142,7 @@ *> *> \param[in,out] Y *> \verbatim -*> Y is COMPLEX*16 array of DIMENSION at least +*> Y is COMPLEX*16 array, dimension at least *> ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n' *> and at least *> ( 1 + ( n - 1 )*abs( INCY ) ) otherwise. diff -Nru lapack-3.7.0/BLAS/SRC/zgemm.f lapack-3.7.1/BLAS/SRC/zgemm.f --- lapack-3.7.0/BLAS/SRC/zgemm.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/zgemm.f 2017-06-17 22:46:53.000000000 +0000 @@ -97,7 +97,7 @@ *> *> \param[in] A *> \verbatim -*> A is COMPLEX*16 array of DIMENSION ( LDA, ka ), where ka is +*> A is COMPLEX*16 array, dimension ( LDA, ka ), where ka is *> k when TRANSA = 'N' or 'n', and is m otherwise. *> Before entry with TRANSA = 'N' or 'n', the leading m by k *> part of the array A must contain the matrix A, otherwise @@ -116,7 +116,7 @@ *> *> \param[in] B *> \verbatim -*> B is COMPLEX*16 array of DIMENSION ( LDB, kb ), where kb is +*> B is COMPLEX*16 array, dimension ( LDB, kb ), where kb is *> n when TRANSB = 'N' or 'n', and is k otherwise. *> Before entry with TRANSB = 'N' or 'n', the leading k by n *> part of the array B must contain the matrix B, otherwise @@ -142,7 +142,7 @@ *> *> \param[in,out] C *> \verbatim -*> C is COMPLEX*16 array of DIMENSION ( LDC, n ). +*> C is COMPLEX*16 array, dimension ( LDC, N ) *> Before entry, the leading m by n part of the array C must *> contain the matrix C, except when beta is zero, in which *> case C need not be set on entry. diff -Nru lapack-3.7.0/BLAS/SRC/zgemv.f lapack-3.7.1/BLAS/SRC/zgemv.f --- lapack-3.7.0/BLAS/SRC/zgemv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/zgemv.f 2017-06-17 22:46:53.000000000 +0000 @@ -73,7 +73,7 @@ *> *> \param[in] A *> \verbatim -*> A is COMPLEX*16 array of DIMENSION ( LDA, n ). +*> A is COMPLEX*16 array, dimension ( LDA, N ) *> Before entry, the leading m by n part of the array A must *> contain the matrix of coefficients. *> \endverbatim @@ -88,7 +88,7 @@ *> *> \param[in] X *> \verbatim -*> X is COMPLEX*16 array of DIMENSION at least +*> X is COMPLEX*16 array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n' *> and at least *> ( 1 + ( m - 1 )*abs( INCX ) ) otherwise. @@ -112,7 +112,7 @@ *> *> \param[in,out] Y *> \verbatim -*> Y is COMPLEX*16 array of DIMENSION at least +*> Y is COMPLEX*16 array, dimension at least *> ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n' *> and at least *> ( 1 + ( n - 1 )*abs( INCY ) ) otherwise. diff -Nru lapack-3.7.0/BLAS/SRC/zgerc.f lapack-3.7.1/BLAS/SRC/zgerc.f --- lapack-3.7.0/BLAS/SRC/zgerc.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/zgerc.f 2017-06-17 22:46:53.000000000 +0000 @@ -57,7 +57,7 @@ *> *> \param[in] X *> \verbatim -*> X is COMPLEX*16 array of dimension at least +*> X is COMPLEX*16 array, dimension at least *> ( 1 + ( m - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the m *> element vector x. @@ -72,7 +72,7 @@ *> *> \param[in] Y *> \verbatim -*> Y is COMPLEX*16 array of dimension at least +*> Y is COMPLEX*16 array, dimension at least *> ( 1 + ( n - 1 )*abs( INCY ) ). *> Before entry, the incremented array Y must contain the n *> element vector y. @@ -87,7 +87,7 @@ *> *> \param[in,out] A *> \verbatim -*> A is COMPLEX*16 array of DIMENSION ( LDA, n ). +*> A is COMPLEX*16 array, dimension ( LDA, N ) *> Before entry, the leading m by n part of the array A must *> contain the matrix of coefficients. On exit, A is *> overwritten by the updated matrix. diff -Nru lapack-3.7.0/BLAS/SRC/zgeru.f lapack-3.7.1/BLAS/SRC/zgeru.f --- lapack-3.7.0/BLAS/SRC/zgeru.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/zgeru.f 2017-06-17 22:46:53.000000000 +0000 @@ -57,7 +57,7 @@ *> *> \param[in] X *> \verbatim -*> X is COMPLEX*16 array of dimension at least +*> X is COMPLEX*16 array, dimension at least *> ( 1 + ( m - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the m *> element vector x. @@ -72,7 +72,7 @@ *> *> \param[in] Y *> \verbatim -*> Y is COMPLEX*16 array of dimension at least +*> Y is COMPLEX*16 array, dimension at least *> ( 1 + ( n - 1 )*abs( INCY ) ). *> Before entry, the incremented array Y must contain the n *> element vector y. @@ -87,7 +87,7 @@ *> *> \param[in,out] A *> \verbatim -*> A is COMPLEX*16 array of DIMENSION ( LDA, n ). +*> A is COMPLEX*16 array, dimension ( LDA, N ) *> Before entry, the leading m by n part of the array A must *> contain the matrix of coefficients. On exit, A is *> overwritten by the updated matrix. diff -Nru lapack-3.7.0/BLAS/SRC/zhbmv.f lapack-3.7.1/BLAS/SRC/zhbmv.f --- lapack-3.7.0/BLAS/SRC/zhbmv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/zhbmv.f 2017-06-17 22:46:53.000000000 +0000 @@ -72,7 +72,7 @@ *> *> \param[in] A *> \verbatim -*> A is COMPLEX*16 array of DIMENSION ( LDA, n ). +*> A is COMPLEX*16 array, dimension ( LDA, N ) *> Before entry with UPLO = 'U' or 'u', the leading ( k + 1 ) *> by n part of the array A must contain the upper triangular *> band part of the hermitian matrix, supplied column by @@ -123,7 +123,7 @@ *> *> \param[in] X *> \verbatim -*> X is COMPLEX*16 array of DIMENSION at least +*> X is COMPLEX*16 array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the *> vector x. @@ -144,7 +144,7 @@ *> *> \param[in,out] Y *> \verbatim -*> Y is COMPLEX*16 array of DIMENSION at least +*> Y is COMPLEX*16 array, dimension at least *> ( 1 + ( n - 1 )*abs( INCY ) ). *> Before entry, the incremented array Y must contain the *> vector y. On exit, Y is overwritten by the updated vector y. diff -Nru lapack-3.7.0/BLAS/SRC/zhemm.f lapack-3.7.1/BLAS/SRC/zhemm.f --- lapack-3.7.0/BLAS/SRC/zhemm.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/zhemm.f 2017-06-17 22:46:53.000000000 +0000 @@ -87,7 +87,7 @@ *> *> \param[in] A *> \verbatim -*> A is COMPLEX*16 array of DIMENSION ( LDA, ka ), where ka is +*> A is COMPLEX*16 array, dimension ( LDA, ka ), where ka is *> m when SIDE = 'L' or 'l' and is n otherwise. *> Before entry with SIDE = 'L' or 'l', the m by m part of *> the array A must contain the hermitian matrix, such that @@ -124,7 +124,7 @@ *> *> \param[in] B *> \verbatim -*> B is COMPLEX*16 array of DIMENSION ( LDB, n ). +*> B is COMPLEX*16 array, dimension ( LDB, N ) *> Before entry, the leading m by n part of the array B must *> contain the matrix B. *> \endverbatim @@ -146,7 +146,7 @@ *> *> \param[in,out] C *> \verbatim -*> C is COMPLEX*16 array of DIMENSION ( LDC, n ). +*> C is COMPLEX*16 array, dimension ( LDC, N ) *> Before entry, the leading m by n part of the array C must *> contain the matrix C, except when beta is zero, in which *> case C need not be set on entry. diff -Nru lapack-3.7.0/BLAS/SRC/zhemv.f lapack-3.7.1/BLAS/SRC/zhemv.f --- lapack-3.7.0/BLAS/SRC/zhemv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/zhemv.f 2017-06-17 22:46:53.000000000 +0000 @@ -65,7 +65,7 @@ *> *> \param[in] A *> \verbatim -*> A is COMPLEX*16 array of DIMENSION ( LDA, n ). +*> A is COMPLEX*16 array, dimension ( LDA, N ) *> Before entry with UPLO = 'U' or 'u', the leading n by n *> upper triangular part of the array A must contain the upper *> triangular part of the hermitian matrix and the strictly @@ -88,7 +88,7 @@ *> *> \param[in] X *> \verbatim -*> X is COMPLEX*16 array of dimension at least +*> X is COMPLEX*16 array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element vector x. @@ -110,7 +110,7 @@ *> *> \param[in,out] Y *> \verbatim -*> Y is COMPLEX*16 array of dimension at least +*> Y is COMPLEX*16 array, dimension at least *> ( 1 + ( n - 1 )*abs( INCY ) ). *> Before entry, the incremented array Y must contain the n *> element vector y. On exit, Y is overwritten by the updated diff -Nru lapack-3.7.0/BLAS/SRC/zher2.f lapack-3.7.1/BLAS/SRC/zher2.f --- lapack-3.7.0/BLAS/SRC/zher2.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/zher2.f 2017-06-17 22:46:53.000000000 +0000 @@ -65,7 +65,7 @@ *> *> \param[in] X *> \verbatim -*> X is COMPLEX*16 array of dimension at least +*> X is COMPLEX*16 array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element vector x. @@ -80,7 +80,7 @@ *> *> \param[in] Y *> \verbatim -*> Y is COMPLEX*16 array of dimension at least +*> Y is COMPLEX*16 array, dimension at least *> ( 1 + ( n - 1 )*abs( INCY ) ). *> Before entry, the incremented array Y must contain the n *> element vector y. @@ -95,7 +95,7 @@ *> *> \param[in,out] A *> \verbatim -*> A is COMPLEX*16 array of DIMENSION ( LDA, n ). +*> A is COMPLEX*16 array, dimension ( LDA, N ) *> Before entry with UPLO = 'U' or 'u', the leading n by n *> upper triangular part of the array A must contain the upper *> triangular part of the hermitian matrix and the strictly diff -Nru lapack-3.7.0/BLAS/SRC/zher2k.f lapack-3.7.1/BLAS/SRC/zher2k.f --- lapack-3.7.0/BLAS/SRC/zher2k.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/zher2k.f 2017-06-17 22:46:53.000000000 +0000 @@ -95,7 +95,7 @@ *> *> \param[in] A *> \verbatim -*> A is COMPLEX*16 array of DIMENSION ( LDA, ka ), where ka is +*> A is COMPLEX*16 array, dimension ( LDA, ka ), where ka is *> k when TRANS = 'N' or 'n', and is n otherwise. *> Before entry with TRANS = 'N' or 'n', the leading n by k *> part of the array A must contain the matrix A, otherwise @@ -114,7 +114,7 @@ *> *> \param[in] B *> \verbatim -*> B is COMPLEX*16 array of DIMENSION ( LDB, kb ), where kb is +*> B is COMPLEX*16 array, dimension ( LDB, kb ), where kb is *> k when TRANS = 'N' or 'n', and is n otherwise. *> Before entry with TRANS = 'N' or 'n', the leading n by k *> part of the array B must contain the matrix B, otherwise @@ -140,7 +140,7 @@ *> *> \param[in,out] C *> \verbatim -*> C is COMPLEX*16 array of DIMENSION ( LDC, n ). +*> C is COMPLEX*16 array, dimension ( LDC, N ) *> Before entry with UPLO = 'U' or 'u', the leading n by n *> upper triangular part of the array C must contain the upper *> triangular part of the hermitian matrix and the strictly diff -Nru lapack-3.7.0/BLAS/SRC/zher.f lapack-3.7.1/BLAS/SRC/zher.f --- lapack-3.7.0/BLAS/SRC/zher.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/zher.f 2017-06-17 22:46:53.000000000 +0000 @@ -65,7 +65,7 @@ *> *> \param[in] X *> \verbatim -*> X is COMPLEX*16 array of dimension at least +*> X is COMPLEX*16 array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element vector x. @@ -80,7 +80,7 @@ *> *> \param[in,out] A *> \verbatim -*> A is COMPLEX*16 array of DIMENSION ( LDA, n ). +*> A is COMPLEX*16 array, dimension ( LDA, N ) *> Before entry with UPLO = 'U' or 'u', the leading n by n *> upper triangular part of the array A must contain the upper *> triangular part of the hermitian matrix and the strictly diff -Nru lapack-3.7.0/BLAS/SRC/zherk.f lapack-3.7.1/BLAS/SRC/zherk.f --- lapack-3.7.0/BLAS/SRC/zherk.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/zherk.f 2017-06-17 22:46:53.000000000 +0000 @@ -90,7 +90,7 @@ *> *> \param[in] A *> \verbatim -*> A is COMPLEX*16 array of DIMENSION ( LDA, ka ), where ka is +*> A is COMPLEX*16 array, dimension ( LDA, ka ), where ka is *> k when TRANS = 'N' or 'n', and is n otherwise. *> Before entry with TRANS = 'N' or 'n', the leading n by k *> part of the array A must contain the matrix A, otherwise @@ -115,7 +115,7 @@ *> *> \param[in,out] C *> \verbatim -*> C is COMPLEX*16 array of DIMENSION ( LDC, n ). +*> C is COMPLEX*16 array, dimension ( LDC, N ) *> Before entry with UPLO = 'U' or 'u', the leading n by n *> upper triangular part of the array C must contain the upper *> triangular part of the hermitian matrix and the strictly diff -Nru lapack-3.7.0/BLAS/SRC/zhpmv.f lapack-3.7.1/BLAS/SRC/zhpmv.f --- lapack-3.7.0/BLAS/SRC/zhpmv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/zhpmv.f 2017-06-17 22:46:53.000000000 +0000 @@ -65,7 +65,7 @@ *> *> \param[in] AP *> \verbatim -*> AP is COMPLEX*16 array of DIMENSION at least +*> AP is COMPLEX*16 array, dimension at least *> ( ( n*( n + 1 ) )/2 ). *> Before entry with UPLO = 'U' or 'u', the array AP must *> contain the upper triangular part of the hermitian matrix @@ -83,7 +83,7 @@ *> *> \param[in] X *> \verbatim -*> X is COMPLEX*16 array of dimension at least +*> X is COMPLEX*16 array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element vector x. @@ -105,7 +105,7 @@ *> *> \param[in,out] Y *> \verbatim -*> Y is COMPLEX*16 array of dimension at least +*> Y is COMPLEX*16 array, dimension at least *> ( 1 + ( n - 1 )*abs( INCY ) ). *> Before entry, the incremented array Y must contain the n *> element vector y. On exit, Y is overwritten by the updated diff -Nru lapack-3.7.0/BLAS/SRC/zhpr2.f lapack-3.7.1/BLAS/SRC/zhpr2.f --- lapack-3.7.0/BLAS/SRC/zhpr2.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/zhpr2.f 2017-06-17 22:46:53.000000000 +0000 @@ -65,7 +65,7 @@ *> *> \param[in] X *> \verbatim -*> X is COMPLEX*16 array of dimension at least +*> X is COMPLEX*16 array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element vector x. @@ -80,7 +80,7 @@ *> *> \param[in] Y *> \verbatim -*> Y is COMPLEX*16 array of dimension at least +*> Y is COMPLEX*16 array, dimension at least *> ( 1 + ( n - 1 )*abs( INCY ) ). *> Before entry, the incremented array Y must contain the n *> element vector y. @@ -95,7 +95,7 @@ *> *> \param[in,out] AP *> \verbatim -*> AP is COMPLEX*16 array of DIMENSION at least +*> AP is COMPLEX*16 array, dimension at least *> ( ( n*( n + 1 ) )/2 ). *> Before entry with UPLO = 'U' or 'u', the array AP must *> contain the upper triangular part of the hermitian matrix diff -Nru lapack-3.7.0/BLAS/SRC/zhpr.f lapack-3.7.1/BLAS/SRC/zhpr.f --- lapack-3.7.0/BLAS/SRC/zhpr.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/zhpr.f 2017-06-17 22:46:53.000000000 +0000 @@ -65,7 +65,7 @@ *> *> \param[in] X *> \verbatim -*> X is COMPLEX*16 array of dimension at least +*> X is COMPLEX*16 array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element vector x. @@ -80,7 +80,7 @@ *> *> \param[in,out] AP *> \verbatim -*> AP is COMPLEX*16 array of DIMENSION at least +*> AP is COMPLEX*16 array, dimension at least *> ( ( n*( n + 1 ) )/2 ). *> Before entry with UPLO = 'U' or 'u', the array AP must *> contain the upper triangular part of the hermitian matrix diff -Nru lapack-3.7.0/BLAS/SRC/zrotg.f lapack-3.7.1/BLAS/SRC/zrotg.f --- lapack-3.7.0/BLAS/SRC/zrotg.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/zrotg.f 2017-06-17 22:46:53.000000000 +0000 @@ -24,6 +24,29 @@ *> ZROTG determines a double complex Givens rotation. *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] CA +*> \verbatim +*> CA is COMPLEX*16 +*> \endverbatim +*> +*> \param[in] CB +*> \verbatim +*> CB is COMPLEX*16 +*> \endverbatim +*> +*> \param[out] C +*> \verbatim +*> C is DOUBLE PRECISION +*> \endverbatim +*> +*> \param[out] S +*> \verbatim +*> S is COMPLEX*16 +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/zscal.f lapack-3.7.1/BLAS/SRC/zscal.f --- lapack-3.7.0/BLAS/SRC/zscal.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/zscal.f 2017-06-17 22:46:53.000000000 +0000 @@ -27,6 +27,32 @@ *> ZSCAL scales a vector by a constant. *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> number of elements in input vector(s) +*> \endverbatim +*> +*> \param[in] ZA +*> \verbatim +*> ZA is COMPLEX*16 +*> On entry, ZA specifies the scalar alpha. +*> \endverbatim +*> +*> \param[in,out] ZX +*> \verbatim +*> ZX is COMPLEX*16 array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) +*> \endverbatim +*> +*> \param[in] INCX +*> \verbatim +*> INCX is INTEGER +*> storage spacing between elements of ZX +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/zswap.f lapack-3.7.1/BLAS/SRC/zswap.f --- lapack-3.7.0/BLAS/SRC/zswap.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/zswap.f 2017-06-17 22:46:53.000000000 +0000 @@ -26,6 +26,37 @@ *> ZSWAP interchanges two vectors. *> \endverbatim * +* Arguments: +* ========== +* +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> number of elements in input vector(s) +*> \endverbatim +*> +*> \param[in,out] ZX +*> \verbatim +*> ZX is COMPLEX*16 array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) +*> \endverbatim +*> +*> \param[in] INCX +*> \verbatim +*> INCX is INTEGER +*> storage spacing between elements of ZX +*> \endverbatim +*> +*> \param[in,out] ZY +*> \verbatim +*> ZY is COMPLEX*16 array, dimension ( 1 + ( N - 1 )*abs( INCY ) ) +*> \endverbatim +*> +*> \param[in] INCY +*> \verbatim +*> INCY is INTEGER +*> storage spacing between elements of ZY +*> \endverbatim +* * Authors: * ======== * diff -Nru lapack-3.7.0/BLAS/SRC/zsymm.f lapack-3.7.1/BLAS/SRC/zsymm.f --- lapack-3.7.0/BLAS/SRC/zsymm.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/zsymm.f 2017-06-17 22:46:53.000000000 +0000 @@ -87,7 +87,7 @@ *> *> \param[in] A *> \verbatim -*> A is COMPLEX*16 array of DIMENSION ( LDA, ka ), where ka is +*> A is COMPLEX*16 array, dimension ( LDA, ka ), where ka is *> m when SIDE = 'L' or 'l' and is n otherwise. *> Before entry with SIDE = 'L' or 'l', the m by m part of *> the array A must contain the symmetric matrix, such that @@ -122,7 +122,7 @@ *> *> \param[in] B *> \verbatim -*> B is COMPLEX*16 array of DIMENSION ( LDB, n ). +*> B is COMPLEX*16 array, dimension ( LDB, N ) *> Before entry, the leading m by n part of the array B must *> contain the matrix B. *> \endverbatim @@ -144,7 +144,7 @@ *> *> \param[in,out] C *> \verbatim -*> C is COMPLEX*16 array of DIMENSION ( LDC, n ). +*> C is COMPLEX*16 array, dimension ( LDC, N ) *> Before entry, the leading m by n part of the array C must *> contain the matrix C, except when beta is zero, in which *> case C need not be set on entry. diff -Nru lapack-3.7.0/BLAS/SRC/zsyr2k.f lapack-3.7.1/BLAS/SRC/zsyr2k.f --- lapack-3.7.0/BLAS/SRC/zsyr2k.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/zsyr2k.f 2017-06-17 22:46:53.000000000 +0000 @@ -92,7 +92,7 @@ *> *> \param[in] A *> \verbatim -*> A is COMPLEX*16 array of DIMENSION ( LDA, ka ), where ka is +*> A is COMPLEX*16 array, dimension ( LDA, ka ), where ka is *> k when TRANS = 'N' or 'n', and is n otherwise. *> Before entry with TRANS = 'N' or 'n', the leading n by k *> part of the array A must contain the matrix A, otherwise @@ -111,7 +111,7 @@ *> *> \param[in] B *> \verbatim -*> B is COMPLEX*16 array of DIMENSION ( LDB, kb ), where kb is +*> B is COMPLEX*16 array, dimension ( LDB, kb ), where kb is *> k when TRANS = 'N' or 'n', and is n otherwise. *> Before entry with TRANS = 'N' or 'n', the leading n by k *> part of the array B must contain the matrix B, otherwise @@ -136,7 +136,7 @@ *> *> \param[in,out] C *> \verbatim -*> C is COMPLEX*16 array of DIMENSION ( LDC, n ). +*> C is COMPLEX*16 array, dimension ( LDC, N ) *> Before entry with UPLO = 'U' or 'u', the leading n by n *> upper triangular part of the array C must contain the upper *> triangular part of the symmetric matrix and the strictly diff -Nru lapack-3.7.0/BLAS/SRC/zsyrk.f lapack-3.7.1/BLAS/SRC/zsyrk.f --- lapack-3.7.0/BLAS/SRC/zsyrk.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/zsyrk.f 2017-06-17 22:46:53.000000000 +0000 @@ -90,7 +90,7 @@ *> *> \param[in] A *> \verbatim -*> A is COMPLEX*16 array of DIMENSION ( LDA, ka ), where ka is +*> A is COMPLEX*16 array, dimension ( LDA, ka ), where ka is *> k when TRANS = 'N' or 'n', and is n otherwise. *> Before entry with TRANS = 'N' or 'n', the leading n by k *> part of the array A must contain the matrix A, otherwise @@ -115,7 +115,7 @@ *> *> \param[in,out] C *> \verbatim -*> C is COMPLEX*16 array of DIMENSION ( LDC, n ). +*> C is COMPLEX*16 array, dimension ( LDC, N ) *> Before entry with UPLO = 'U' or 'u', the leading n by n *> upper triangular part of the array C must contain the upper *> triangular part of the symmetric matrix and the strictly diff -Nru lapack-3.7.0/BLAS/SRC/ztbmv.f lapack-3.7.1/BLAS/SRC/ztbmv.f --- lapack-3.7.0/BLAS/SRC/ztbmv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/ztbmv.f 2017-06-17 22:46:53.000000000 +0000 @@ -90,7 +90,7 @@ *> *> \param[in] A *> \verbatim -*> A is COMPLEX*16 array of DIMENSION ( LDA, n ). +*> A is COMPLEX*16 array, dimension ( LDA, N ). *> Before entry with UPLO = 'U' or 'u', the leading ( k + 1 ) *> by n part of the array A must contain the upper triangular *> band part of the matrix of coefficients, supplied column by @@ -140,9 +140,9 @@ *> ( k + 1 ). *> \endverbatim *> -*> \param[in] X +*> \param[in,out] X *> \verbatim -*> X is (input/output) COMPLEX*16 array of dimension at least +*> X is COMPLEX*16 array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element vector x. On exit, X is overwritten with the diff -Nru lapack-3.7.0/BLAS/SRC/ztbsv.f lapack-3.7.1/BLAS/SRC/ztbsv.f --- lapack-3.7.0/BLAS/SRC/ztbsv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/ztbsv.f 2017-06-17 22:46:53.000000000 +0000 @@ -94,7 +94,7 @@ *> *> \param[in] A *> \verbatim -*> A is COMPLEX*16 array of DIMENSION ( LDA, n ). +*> A is COMPLEX*16 array, dimension ( LDA, N ) *> Before entry with UPLO = 'U' or 'u', the leading ( k + 1 ) *> by n part of the array A must contain the upper triangular *> band part of the matrix of coefficients, supplied column by @@ -146,7 +146,7 @@ *> *> \param[in,out] X *> \verbatim -*> X is COMPLEX*16 array of dimension at least +*> X is COMPLEX*16 array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element right-hand side vector b. On exit, X is overwritten diff -Nru lapack-3.7.0/BLAS/SRC/ztpmv.f lapack-3.7.1/BLAS/SRC/ztpmv.f --- lapack-3.7.0/BLAS/SRC/ztpmv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/ztpmv.f 2017-06-17 22:46:53.000000000 +0000 @@ -80,7 +80,7 @@ *> *> \param[in] AP *> \verbatim -*> AP is COMPLEX*16 array of DIMENSION at least +*> AP is COMPLEX*16 array, dimension at least *> ( ( n*( n + 1 ) )/2 ). *> Before entry with UPLO = 'U' or 'u', the array AP must *> contain the upper triangular matrix packed sequentially, @@ -96,9 +96,9 @@ *> A are not referenced, but are assumed to be unity. *> \endverbatim *> -*> \param[in] X +*> \param[in,out] X *> \verbatim -*> X is (input/output) COMPLEX*16 array of dimension at least +*> X is COMPLEX*16 array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element vector x. On exit, X is overwritten with the diff -Nru lapack-3.7.0/BLAS/SRC/ztpsv.f lapack-3.7.1/BLAS/SRC/ztpsv.f --- lapack-3.7.0/BLAS/SRC/ztpsv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/ztpsv.f 2017-06-17 22:46:53.000000000 +0000 @@ -83,7 +83,7 @@ *> *> \param[in] AP *> \verbatim -*> AP is COMPLEX*16 array of DIMENSION at least +*> AP is COMPLEX*16 array, dimension at least *> ( ( n*( n + 1 ) )/2 ). *> Before entry with UPLO = 'U' or 'u', the array AP must *> contain the upper triangular matrix packed sequentially, @@ -101,7 +101,7 @@ *> *> \param[in,out] X *> \verbatim -*> X is COMPLEX*16 array of dimension at least +*> X is COMPLEX*16 array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element right-hand side vector b. On exit, X is overwritten diff -Nru lapack-3.7.0/BLAS/SRC/ztrmm.f lapack-3.7.1/BLAS/SRC/ztrmm.f --- lapack-3.7.0/BLAS/SRC/ztrmm.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/ztrmm.f 2017-06-17 22:46:53.000000000 +0000 @@ -109,7 +109,7 @@ *> *> \param[in] A *> \verbatim -*> A is COMPLEX*16 array of DIMENSION ( LDA, k ), where k is m +*> A is COMPLEX*16 array, dimension ( LDA, k ), where k is m *> when SIDE = 'L' or 'l' and is n when SIDE = 'R' or 'r'. *> Before entry with UPLO = 'U' or 'u', the leading k by k *> upper triangular part of the array A must contain the upper @@ -132,9 +132,9 @@ *> then LDA must be at least max( 1, n ). *> \endverbatim *> -*> \param[in] B +*> \param[in,out] B *> \verbatim -*> B is (input/output) COMPLEX*16 array of DIMENSION ( LDB, n ). +*> B is COMPLEX*16 array, dimension ( LDB, N ). *> Before entry, the leading m by n part of the array B must *> contain the matrix B, and on exit is overwritten by the *> transformed matrix. diff -Nru lapack-3.7.0/BLAS/SRC/ztrmv.f lapack-3.7.1/BLAS/SRC/ztrmv.f --- lapack-3.7.0/BLAS/SRC/ztrmv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/ztrmv.f 2017-06-17 22:46:53.000000000 +0000 @@ -80,7 +80,7 @@ *> *> \param[in] A *> \verbatim -*> A is COMPLEX*16 array of DIMENSION ( LDA, n ). +*> A is COMPLEX*16 array, dimension ( LDA, N ). *> Before entry with UPLO = 'U' or 'u', the leading n by n *> upper triangular part of the array A must contain the upper *> triangular matrix and the strictly lower triangular part of @@ -101,9 +101,9 @@ *> max( 1, n ). *> \endverbatim *> -*> \param[in] X +*> \param[in,out] X *> \verbatim -*> X is (input/output) COMPLEX*16 array of dimension at least +*> X is COMPLEX*16 array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element vector x. On exit, X is overwritten with the diff -Nru lapack-3.7.0/BLAS/SRC/ztrsm.f lapack-3.7.1/BLAS/SRC/ztrsm.f --- lapack-3.7.0/BLAS/SRC/ztrsm.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/ztrsm.f 2017-06-17 22:46:53.000000000 +0000 @@ -111,7 +111,7 @@ *> *> \param[in] A *> \verbatim -*> A is COMPLEX*16 array of DIMENSION ( LDA, k ), +*> A is COMPLEX*16 array, dimension ( LDA, k ), *> where k is m when SIDE = 'L' or 'l' *> and k is n when SIDE = 'R' or 'r'. *> Before entry with UPLO = 'U' or 'u', the leading k by k @@ -137,7 +137,7 @@ *> *> \param[in,out] B *> \verbatim -*> B is COMPLEX*16 array of DIMENSION ( LDB, n ). +*> B is COMPLEX*16 array, dimension ( LDB, N ) *> Before entry, the leading m by n part of the array B must *> contain the right-hand side matrix B, and on exit is *> overwritten by the solution matrix X. diff -Nru lapack-3.7.0/BLAS/SRC/ztrsv.f lapack-3.7.1/BLAS/SRC/ztrsv.f --- lapack-3.7.0/BLAS/SRC/ztrsv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/SRC/ztrsv.f 2017-06-17 22:46:53.000000000 +0000 @@ -83,7 +83,7 @@ *> *> \param[in] A *> \verbatim -*> A is COMPLEX*16 array of DIMENSION ( LDA, n ). +*> A is COMPLEX*16 array, dimension ( LDA, N ) *> Before entry with UPLO = 'U' or 'u', the leading n by n *> upper triangular part of the array A must contain the upper *> triangular matrix and the strictly lower triangular part of @@ -106,7 +106,7 @@ *> *> \param[in,out] X *> \verbatim -*> X is COMPLEX*16 array of dimension at least +*> X is COMPLEX*16 array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ). *> Before entry, the incremented array X must contain the n *> element right-hand side vector b. On exit, X is overwritten diff -Nru lapack-3.7.0/BLAS/TESTING/cblat2.in lapack-3.7.1/BLAS/TESTING/cblat2.in --- lapack-3.7.0/BLAS/TESTING/cblat2.in 1970-01-01 00:00:00.000000000 +0000 +++ lapack-3.7.1/BLAS/TESTING/cblat2.in 2017-06-17 22:46:53.000000000 +0000 @@ -0,0 +1,35 @@ +'cblat2.out' NAME OF SUMMARY OUTPUT FILE +6 UNIT NUMBER OF SUMMARY FILE +'CBLA2T.SNAP' NAME OF SNAPSHOT OUTPUT FILE +-1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0) +F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD. +F LOGICAL FLAG, T TO STOP ON FAILURES. +T LOGICAL FLAG, T TO TEST ERROR EXITS. +16.0 THRESHOLD VALUE OF TEST RATIO +6 NUMBER OF VALUES OF N +0 1 2 3 5 9 VALUES OF N +4 NUMBER OF VALUES OF K +0 1 2 4 VALUES OF K +4 NUMBER OF VALUES OF INCX AND INCY +1 2 -1 -2 VALUES OF INCX AND INCY +3 NUMBER OF VALUES OF ALPHA +(0.0,0.0) (1.0,0.0) (0.7,-0.9) VALUES OF ALPHA +3 NUMBER OF VALUES OF BETA +(0.0,0.0) (1.0,0.0) (1.3,-1.1) VALUES OF BETA +CGEMV T PUT F FOR NO TEST. SAME COLUMNS. +CGBMV T PUT F FOR NO TEST. SAME COLUMNS. +CHEMV T PUT F FOR NO TEST. SAME COLUMNS. +CHBMV T PUT F FOR NO TEST. SAME COLUMNS. +CHPMV T PUT F FOR NO TEST. SAME COLUMNS. +CTRMV T PUT F FOR NO TEST. SAME COLUMNS. +CTBMV T PUT F FOR NO TEST. SAME COLUMNS. +CTPMV T PUT F FOR NO TEST. SAME COLUMNS. +CTRSV T PUT F FOR NO TEST. SAME COLUMNS. +CTBSV T PUT F FOR NO TEST. SAME COLUMNS. +CTPSV T PUT F FOR NO TEST. SAME COLUMNS. +CGERC T PUT F FOR NO TEST. SAME COLUMNS. +CGERU T PUT F FOR NO TEST. SAME COLUMNS. +CHER T PUT F FOR NO TEST. SAME COLUMNS. +CHPR T PUT F FOR NO TEST. SAME COLUMNS. +CHER2 T PUT F FOR NO TEST. SAME COLUMNS. +CHPR2 T PUT F FOR NO TEST. SAME COLUMNS. diff -Nru lapack-3.7.0/BLAS/TESTING/cblat3.in lapack-3.7.1/BLAS/TESTING/cblat3.in --- lapack-3.7.0/BLAS/TESTING/cblat3.in 1970-01-01 00:00:00.000000000 +0000 +++ lapack-3.7.1/BLAS/TESTING/cblat3.in 2017-06-17 22:46:53.000000000 +0000 @@ -0,0 +1,23 @@ +'cblat3.out' NAME OF SUMMARY OUTPUT FILE +6 UNIT NUMBER OF SUMMARY FILE +'CBLAT3.SNAP' NAME OF SNAPSHOT OUTPUT FILE +-1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0) +F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD. +F LOGICAL FLAG, T TO STOP ON FAILURES. +T LOGICAL FLAG, T TO TEST ERROR EXITS. +16.0 THRESHOLD VALUE OF TEST RATIO +6 NUMBER OF VALUES OF N +0 1 2 3 5 9 VALUES OF N +3 NUMBER OF VALUES OF ALPHA +(0.0,0.0) (1.0,0.0) (0.7,-0.9) VALUES OF ALPHA +3 NUMBER OF VALUES OF BETA +(0.0,0.0) (1.0,0.0) (1.3,-1.1) VALUES OF BETA +CGEMM T PUT F FOR NO TEST. SAME COLUMNS. +CHEMM T PUT F FOR NO TEST. SAME COLUMNS. +CSYMM T PUT F FOR NO TEST. SAME COLUMNS. +CTRMM T PUT F FOR NO TEST. SAME COLUMNS. +CTRSM T PUT F FOR NO TEST. SAME COLUMNS. +CHERK T PUT F FOR NO TEST. SAME COLUMNS. +CSYRK T PUT F FOR NO TEST. SAME COLUMNS. +CHER2K T PUT F FOR NO TEST. SAME COLUMNS. +CSYR2K T PUT F FOR NO TEST. SAME COLUMNS. diff -Nru lapack-3.7.0/BLAS/TESTING/CMakeLists.txt lapack-3.7.1/BLAS/TESTING/CMakeLists.txt --- lapack-3.7.0/BLAS/TESTING/CMakeLists.txt 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/TESTING/CMakeLists.txt 2017-06-17 22:46:53.000000000 +0000 @@ -1,34 +1,6 @@ -####################################################################### -# This makefile creates the test programs for the BLAS 1 routines. -# The test files are grouped as follows: -# SBLAT1 -- Single precision real test routines -# CBLAT1 -- Single precision complex test routines -# DBLAT1 -- Double precision real test routines -# ZBLAT1 -- Double precision complex test routines -# -# Test programs can be generated for all or some of the four different -# precisions. To create the test programs, enter make followed by one -# or more of the precisions desired. Some examples: -# make single -# make single complex -# make single double complex complex16 -# Alternatively, the command -# make -# without any arguments creates all four test programs. -# The executable files which are created are called -# ../xblat1s, ../xblat1d, ../xblat1c, and ../xblat1z -# -# To remove the object files after the executable files have been -# created, enter -# make clean -# To force the source files to be recompiled, enter, for example, -# make single FRC=FRC -# -####################################################################### - macro(add_blas_test name src) get_filename_component(baseNAME ${src} NAME_WE) - set(TEST_INPUT "${LAPACK_SOURCE_DIR}/BLAS/${baseNAME}.in") + set(TEST_INPUT "${CMAKE_CURRENT_SOURCE_DIR}/${baseNAME}.in") add_executable(${name} ${src}) target_link_libraries(${name} blas) if(EXISTS "${TEST_INPUT}") diff -Nru lapack-3.7.0/BLAS/TESTING/dblat2.in lapack-3.7.1/BLAS/TESTING/dblat2.in --- lapack-3.7.0/BLAS/TESTING/dblat2.in 1970-01-01 00:00:00.000000000 +0000 +++ lapack-3.7.1/BLAS/TESTING/dblat2.in 2017-06-17 22:46:53.000000000 +0000 @@ -0,0 +1,34 @@ +'dblat2.out' NAME OF SUMMARY OUTPUT FILE +6 UNIT NUMBER OF SUMMARY FILE +'DBLAT2.SNAP' NAME OF SNAPSHOT OUTPUT FILE +-1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0) +F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD. +F LOGICAL FLAG, T TO STOP ON FAILURES. +T LOGICAL FLAG, T TO TEST ERROR EXITS. +16.0 THRESHOLD VALUE OF TEST RATIO +6 NUMBER OF VALUES OF N +0 1 2 3 5 9 VALUES OF N +4 NUMBER OF VALUES OF K +0 1 2 4 VALUES OF K +4 NUMBER OF VALUES OF INCX AND INCY +1 2 -1 -2 VALUES OF INCX AND INCY +3 NUMBER OF VALUES OF ALPHA +0.0 1.0 0.7 VALUES OF ALPHA +3 NUMBER OF VALUES OF BETA +0.0 1.0 0.9 VALUES OF BETA +DGEMV T PUT F FOR NO TEST. SAME COLUMNS. +DGBMV T PUT F FOR NO TEST. SAME COLUMNS. +DSYMV T PUT F FOR NO TEST. SAME COLUMNS. +DSBMV T PUT F FOR NO TEST. SAME COLUMNS. +DSPMV T PUT F FOR NO TEST. SAME COLUMNS. +DTRMV T PUT F FOR NO TEST. SAME COLUMNS. +DTBMV T PUT F FOR NO TEST. SAME COLUMNS. +DTPMV T PUT F FOR NO TEST. SAME COLUMNS. +DTRSV T PUT F FOR NO TEST. SAME COLUMNS. +DTBSV T PUT F FOR NO TEST. SAME COLUMNS. +DTPSV T PUT F FOR NO TEST. SAME COLUMNS. +DGER T PUT F FOR NO TEST. SAME COLUMNS. +DSYR T PUT F FOR NO TEST. SAME COLUMNS. +DSPR T PUT F FOR NO TEST. SAME COLUMNS. +DSYR2 T PUT F FOR NO TEST. SAME COLUMNS. +DSPR2 T PUT F FOR NO TEST. SAME COLUMNS. diff -Nru lapack-3.7.0/BLAS/TESTING/dblat3.in lapack-3.7.1/BLAS/TESTING/dblat3.in --- lapack-3.7.0/BLAS/TESTING/dblat3.in 1970-01-01 00:00:00.000000000 +0000 +++ lapack-3.7.1/BLAS/TESTING/dblat3.in 2017-06-17 22:46:53.000000000 +0000 @@ -0,0 +1,20 @@ +'dblat3.out' NAME OF SUMMARY OUTPUT FILE +6 UNIT NUMBER OF SUMMARY FILE +'DBLAT3.SNAP' NAME OF SNAPSHOT OUTPUT FILE +-1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0) +F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD. +F LOGICAL FLAG, T TO STOP ON FAILURES. +T LOGICAL FLAG, T TO TEST ERROR EXITS. +16.0 THRESHOLD VALUE OF TEST RATIO +6 NUMBER OF VALUES OF N +0 1 2 3 5 9 VALUES OF N +3 NUMBER OF VALUES OF ALPHA +0.0 1.0 0.7 VALUES OF ALPHA +3 NUMBER OF VALUES OF BETA +0.0 1.0 1.3 VALUES OF BETA +DGEMM T PUT F FOR NO TEST. SAME COLUMNS. +DSYMM T PUT F FOR NO TEST. SAME COLUMNS. +DTRMM T PUT F FOR NO TEST. SAME COLUMNS. +DTRSM T PUT F FOR NO TEST. SAME COLUMNS. +DSYRK T PUT F FOR NO TEST. SAME COLUMNS. +DSYR2K T PUT F FOR NO TEST. SAME COLUMNS. diff -Nru lapack-3.7.0/BLAS/TESTING/Makeblat1 lapack-3.7.1/BLAS/TESTING/Makeblat1 --- lapack-3.7.0/BLAS/TESTING/Makeblat1 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/TESTING/Makeblat1 1970-01-01 00:00:00.000000000 +0000 @@ -1,67 +0,0 @@ -include ../../make.inc - -####################################################################### -# This makefile creates the test programs for the BLAS 1 routines. -# The test files are grouped as follows: -# SBLAT1 -- Single precision real test routines -# CBLAT1 -- Single precision complex test routines -# DBLAT1 -- Double precision real test routines -# ZBLAT1 -- Double precision complex test routines -# -# Test programs can be generated for all or some of the four different -# precisions. To create the test programs, enter make followed by one -# or more of the precisions desired. Some examples: -# make single -# make single complex -# make single double complex complex16 -# Alternatively, the command -# make -# without any arguments creates all four test programs. -# The executable files which are created are called -# ../xblat1s, ../xblat1d, ../xblat1c, and ../xblat1z -# -# To remove the object files after the executable files have been -# created, enter -# make clean -# To force the source files to be recompiled, enter, for example, -# make single FRC=FRC -# -####################################################################### - -SBLAT1 = sblat1.o -CBLAT1 = cblat1.o -DBLAT1 = dblat1.o -ZBLAT1 = zblat1.o - -all: single double complex complex16 - -single: ../xblat1s -double: ../xblat1d -complex: ../xblat1c -complex16: ../xblat1z - -../xblat1s: $(SBLAT1) - $(LOADER) $(LOADOPTS) -o $@ $(SBLAT1) $(BLASLIB) - -../xblat1c: $(CBLAT1) - $(LOADER) $(LOADOPTS) -o $@ $(CBLAT1) $(BLASLIB) - -../xblat1d: $(DBLAT1) - $(LOADER) $(LOADOPTS) -o $@ $(DBLAT1) $(BLASLIB) - -../xblat1z: $(ZBLAT1) - $(LOADER) $(LOADOPTS) -o $@ $(ZBLAT1) $(BLASLIB) - -$(SBLAT1): $(FRC) -$(CBLAT1): $(FRC) -$(DBLAT1): $(FRC) -$(ZBLAT1): $(FRC) - -FRC: - @FRC=$(FRC) - -clean: - rm -f *.o - -.f.o: - $(FORTRAN) $(OPTS) -c -o $@ $< diff -Nru lapack-3.7.0/BLAS/TESTING/Makeblat2 lapack-3.7.1/BLAS/TESTING/Makeblat2 --- lapack-3.7.0/BLAS/TESTING/Makeblat2 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/TESTING/Makeblat2 1970-01-01 00:00:00.000000000 +0000 @@ -1,67 +0,0 @@ -include ../../make.inc - -####################################################################### -# This makefile creates the test programs for the BLAS 2 routines. -# The test files are grouped as follows: -# SBLAT2 -- Single precision real test routines -# CBLAT2 -- Single precision complex test routines -# DBLAT2 -- Double precision real test routines -# ZBLAT2 -- Double precision complex test routines -# -# Test programs can be generated for all or some of the four different -# precisions. To create the test programs, enter make followed by one -# or more of the precisions desired. Some examples: -# make single -# make single complex -# make single double complex complex16 -# Alternatively, the command -# make -# without any arguments creates all four test programs. -# The executable files which are created are called -# ../xblat2s, ../xblat2d, ../xblat2c, and ../xblat2z -# -# To remove the object files after the executable files have been -# created, enter -# make clean -# To force the source files to be recompiled, enter, for example, -# make single FRC=FRC -# -####################################################################### - -SBLAT2 = sblat2.o -CBLAT2 = cblat2.o -DBLAT2 = dblat2.o -ZBLAT2 = zblat2.o - -all: single double complex complex16 - -single: ../xblat2s -double: ../xblat2d -complex: ../xblat2c -complex16: ../xblat2z - -../xblat2s: $(SBLAT2) - $(LOADER) $(LOADOPTS) -o $@ $(SBLAT2) $(BLASLIB) - -../xblat2c: $(CBLAT2) - $(LOADER) $(LOADOPTS) -o $@ $(CBLAT2) $(BLASLIB) - -../xblat2d: $(DBLAT2) - $(LOADER) $(LOADOPTS) -o $@ $(DBLAT2) $(BLASLIB) - -../xblat2z: $(ZBLAT2) - $(LOADER) $(LOADOPTS) -o $@ $(ZBLAT2) $(BLASLIB) - -$(SBLAT2): $(FRC) -$(CBLAT2): $(FRC) -$(DBLAT2): $(FRC) -$(ZBLAT2): $(FRC) - -FRC: - @FRC=$(FRC) - -clean: - rm -f *.o - -.f.o: - $(FORTRAN) $(OPTS) -c -o $@ $< diff -Nru lapack-3.7.0/BLAS/TESTING/Makeblat3 lapack-3.7.1/BLAS/TESTING/Makeblat3 --- lapack-3.7.0/BLAS/TESTING/Makeblat3 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/TESTING/Makeblat3 1970-01-01 00:00:00.000000000 +0000 @@ -1,67 +0,0 @@ -include ../../make.inc - -####################################################################### -# This makefile creates the test programs for the BLAS 3 routines. -# The test files are grouped as follows: -# SBLAT3 -- Single precision real test routines -# CBLAT3 -- Single precision complex test routines -# DBLAT3 -- Double precision real test routines -# ZBLAT3 -- Double precision complex test routines -# -# Test programs can be generated for all or some of the four different -# precisions. To create the test programs, enter make followed by one -# or more of the precisions desired. Some examples: -# make single -# make single complex -# make single double complex complex16 -# Alternatively, the command -# make -# without any arguments creates all four test programs. -# The executable files which are created are called -# ../xblat3s, ../xblat3d, ../xblat3c, and ../xblat3z -# -# To remove the object files after the executable files have been -# created, enter -# make clean -# To force the source files to be recompiled, enter, for example, -# make single FRC=FRC -# -####################################################################### - -SBLAT3 = sblat3.o -CBLAT3 = cblat3.o -DBLAT3 = dblat3.o -ZBLAT3 = zblat3.o - -all: single double complex complex16 - -single: ../xblat3s -double: ../xblat3d -complex: ../xblat3c -complex16: ../xblat3z - -../xblat3s: $(SBLAT3) - $(LOADER) $(LOADOPTS) -o $@ $(SBLAT3) $(BLASLIB) - -../xblat3c: $(CBLAT3) - $(LOADER) $(LOADOPTS) -o $@ $(CBLAT3) $(BLASLIB) - -../xblat3d: $(DBLAT3) - $(LOADER) $(LOADOPTS) -o $@ $(DBLAT3) $(BLASLIB) - -../xblat3z: $(ZBLAT3) - $(LOADER) $(LOADOPTS) -o $@ $(ZBLAT3) $(BLASLIB) - -$(SBLAT3): $(FRC) -$(CBLAT3): $(FRC) -$(DBLAT3): $(FRC) -$(ZBLAT3): $(FRC) - -FRC: - @FRC=$(FRC) - -clean: - rm -f *.o - -.f.o: - $(FORTRAN) $(OPTS) -c -o $@ $< diff -Nru lapack-3.7.0/BLAS/TESTING/Makefile lapack-3.7.1/BLAS/TESTING/Makefile --- lapack-3.7.0/BLAS/TESTING/Makefile 1970-01-01 00:00:00.000000000 +0000 +++ lapack-3.7.1/BLAS/TESTING/Makefile 2017-06-17 22:46:53.000000000 +0000 @@ -0,0 +1,59 @@ +include ../../make.inc + +all: single double complex complex16 +single: xblat1s xblat2s xblat3s +double: xblat1d xblat2d xblat3d +complex: xblat1c xblat2c xblat3c +complex16: xblat1z xblat2z xblat3z + +xblat1s: sblat1.o $(BLASLIB) + $(LOADER) $(LOADOPTS) -o $@ $^ +xblat1d: dblat1.o $(BLASLIB) + $(LOADER) $(LOADOPTS) -o $@ $^ +xblat1c: cblat1.o $(BLASLIB) + $(LOADER) $(LOADOPTS) -o $@ $^ +xblat1z: zblat1.o $(BLASLIB) + $(LOADER) $(LOADOPTS) -o $@ $^ + +xblat2s: sblat2.o $(BLASLIB) + $(LOADER) $(LOADOPTS) -o $@ $^ +xblat2d: dblat2.o $(BLASLIB) + $(LOADER) $(LOADOPTS) -o $@ $^ +xblat2c: cblat2.o $(BLASLIB) + $(LOADER) $(LOADOPTS) -o $@ $^ +xblat2z: zblat2.o $(BLASLIB) + $(LOADER) $(LOADOPTS) -o $@ $^ + +xblat3s: sblat3.o $(BLASLIB) + $(LOADER) $(LOADOPTS) -o $@ $^ +xblat3d: dblat3.o $(BLASLIB) + $(LOADER) $(LOADOPTS) -o $@ $^ +xblat3c: cblat3.o $(BLASLIB) + $(LOADER) $(LOADOPTS) -o $@ $^ +xblat3z: zblat3.o $(BLASLIB) + $(LOADER) $(LOADOPTS) -o $@ $^ + +run: all + ./xblat1s > sblat1.out + ./xblat1d > dblat1.out + ./xblat1c > cblat1.out + ./xblat1z > zblat1.out + ./xblat2s < sblat2.in + ./xblat2d < dblat2.in + ./xblat2c < cblat2.in + ./xblat2z < zblat2.in + ./xblat3s < sblat3.in + ./xblat3d < dblat3.in + ./xblat3c < cblat3.in + ./xblat3z < zblat3.in + +clean: cleanobj cleanexe cleantest +cleanobj: + rm -f *.o +cleanexe: + rm -f xblat* +cleantest: + rm -f *.out core + +.f.o: + $(FORTRAN) $(OPTS) -c -o $@ $< diff -Nru lapack-3.7.0/BLAS/TESTING/sblat2.in lapack-3.7.1/BLAS/TESTING/sblat2.in --- lapack-3.7.0/BLAS/TESTING/sblat2.in 1970-01-01 00:00:00.000000000 +0000 +++ lapack-3.7.1/BLAS/TESTING/sblat2.in 2017-06-17 22:46:53.000000000 +0000 @@ -0,0 +1,34 @@ +'sblat2.out' NAME OF SUMMARY OUTPUT FILE +6 UNIT NUMBER OF SUMMARY FILE +'SBLAT2.SNAP' NAME OF SNAPSHOT OUTPUT FILE +-1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0) +F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD. +F LOGICAL FLAG, T TO STOP ON FAILURES. +T LOGICAL FLAG, T TO TEST ERROR EXITS. +16.0 THRESHOLD VALUE OF TEST RATIO +6 NUMBER OF VALUES OF N +0 1 2 3 5 9 VALUES OF N +4 NUMBER OF VALUES OF K +0 1 2 4 VALUES OF K +4 NUMBER OF VALUES OF INCX AND INCY +1 2 -1 -2 VALUES OF INCX AND INCY +3 NUMBER OF VALUES OF ALPHA +0.0 1.0 0.7 VALUES OF ALPHA +3 NUMBER OF VALUES OF BETA +0.0 1.0 0.9 VALUES OF BETA +SGEMV T PUT F FOR NO TEST. SAME COLUMNS. +SGBMV T PUT F FOR NO TEST. SAME COLUMNS. +SSYMV T PUT F FOR NO TEST. SAME COLUMNS. +SSBMV T PUT F FOR NO TEST. SAME COLUMNS. +SSPMV T PUT F FOR NO TEST. SAME COLUMNS. +STRMV T PUT F FOR NO TEST. SAME COLUMNS. +STBMV T PUT F FOR NO TEST. SAME COLUMNS. +STPMV T PUT F FOR NO TEST. SAME COLUMNS. +STRSV T PUT F FOR NO TEST. SAME COLUMNS. +STBSV T PUT F FOR NO TEST. SAME COLUMNS. +STPSV T PUT F FOR NO TEST. SAME COLUMNS. +SGER T PUT F FOR NO TEST. SAME COLUMNS. +SSYR T PUT F FOR NO TEST. SAME COLUMNS. +SSPR T PUT F FOR NO TEST. SAME COLUMNS. +SSYR2 T PUT F FOR NO TEST. SAME COLUMNS. +SSPR2 T PUT F FOR NO TEST. SAME COLUMNS. diff -Nru lapack-3.7.0/BLAS/TESTING/sblat3.in lapack-3.7.1/BLAS/TESTING/sblat3.in --- lapack-3.7.0/BLAS/TESTING/sblat3.in 1970-01-01 00:00:00.000000000 +0000 +++ lapack-3.7.1/BLAS/TESTING/sblat3.in 2017-06-17 22:46:53.000000000 +0000 @@ -0,0 +1,20 @@ +'sblat3.out' NAME OF SUMMARY OUTPUT FILE +6 UNIT NUMBER OF SUMMARY FILE +'SBLAT3.SNAP' NAME OF SNAPSHOT OUTPUT FILE +-1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0) +F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD. +F LOGICAL FLAG, T TO STOP ON FAILURES. +T LOGICAL FLAG, T TO TEST ERROR EXITS. +16.0 THRESHOLD VALUE OF TEST RATIO +6 NUMBER OF VALUES OF N +0 1 2 3 5 9 VALUES OF N +3 NUMBER OF VALUES OF ALPHA +0.0 1.0 0.7 VALUES OF ALPHA +3 NUMBER OF VALUES OF BETA +0.0 1.0 1.3 VALUES OF BETA +SGEMM T PUT F FOR NO TEST. SAME COLUMNS. +SSYMM T PUT F FOR NO TEST. SAME COLUMNS. +STRMM T PUT F FOR NO TEST. SAME COLUMNS. +STRSM T PUT F FOR NO TEST. SAME COLUMNS. +SSYRK T PUT F FOR NO TEST. SAME COLUMNS. +SSYR2K T PUT F FOR NO TEST. SAME COLUMNS. diff -Nru lapack-3.7.0/BLAS/TESTING/zblat2.in lapack-3.7.1/BLAS/TESTING/zblat2.in --- lapack-3.7.0/BLAS/TESTING/zblat2.in 1970-01-01 00:00:00.000000000 +0000 +++ lapack-3.7.1/BLAS/TESTING/zblat2.in 2017-06-17 22:46:53.000000000 +0000 @@ -0,0 +1,35 @@ +'zblat2.out' NAME OF SUMMARY OUTPUT FILE +6 UNIT NUMBER OF SUMMARY FILE +'CBLA2T.SNAP' NAME OF SNAPSHOT OUTPUT FILE +-1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0) +F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD. +F LOGICAL FLAG, T TO STOP ON FAILURES. +T LOGICAL FLAG, T TO TEST ERROR EXITS. +16.0 THRESHOLD VALUE OF TEST RATIO +6 NUMBER OF VALUES OF N +0 1 2 3 5 9 VALUES OF N +4 NUMBER OF VALUES OF K +0 1 2 4 VALUES OF K +4 NUMBER OF VALUES OF INCX AND INCY +1 2 -1 -2 VALUES OF INCX AND INCY +3 NUMBER OF VALUES OF ALPHA +(0.0,0.0) (1.0,0.0) (0.7,-0.9) VALUES OF ALPHA +3 NUMBER OF VALUES OF BETA +(0.0,0.0) (1.0,0.0) (1.3,-1.1) VALUES OF BETA +ZGEMV T PUT F FOR NO TEST. SAME COLUMNS. +ZGBMV T PUT F FOR NO TEST. SAME COLUMNS. +ZHEMV T PUT F FOR NO TEST. SAME COLUMNS. +ZHBMV T PUT F FOR NO TEST. SAME COLUMNS. +ZHPMV T PUT F FOR NO TEST. SAME COLUMNS. +ZTRMV T PUT F FOR NO TEST. SAME COLUMNS. +ZTBMV T PUT F FOR NO TEST. SAME COLUMNS. +ZTPMV T PUT F FOR NO TEST. SAME COLUMNS. +ZTRSV T PUT F FOR NO TEST. SAME COLUMNS. +ZTBSV T PUT F FOR NO TEST. SAME COLUMNS. +ZTPSV T PUT F FOR NO TEST. SAME COLUMNS. +ZGERC T PUT F FOR NO TEST. SAME COLUMNS. +ZGERU T PUT F FOR NO TEST. SAME COLUMNS. +ZHER T PUT F FOR NO TEST. SAME COLUMNS. +ZHPR T PUT F FOR NO TEST. SAME COLUMNS. +ZHER2 T PUT F FOR NO TEST. SAME COLUMNS. +ZHPR2 T PUT F FOR NO TEST. SAME COLUMNS. diff -Nru lapack-3.7.0/BLAS/TESTING/zblat3.in lapack-3.7.1/BLAS/TESTING/zblat3.in --- lapack-3.7.0/BLAS/TESTING/zblat3.in 1970-01-01 00:00:00.000000000 +0000 +++ lapack-3.7.1/BLAS/TESTING/zblat3.in 2017-06-17 22:46:53.000000000 +0000 @@ -0,0 +1,23 @@ +'zblat3.out' NAME OF SUMMARY OUTPUT FILE +6 UNIT NUMBER OF SUMMARY FILE +'ZBLAT3.SNAP' NAME OF SNAPSHOT OUTPUT FILE +-1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0) +F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD. +F LOGICAL FLAG, T TO STOP ON FAILURES. +T LOGICAL FLAG, T TO TEST ERROR EXITS. +16.0 THRESHOLD VALUE OF TEST RATIO +6 NUMBER OF VALUES OF N +0 1 2 3 5 9 VALUES OF N +3 NUMBER OF VALUES OF ALPHA +(0.0,0.0) (1.0,0.0) (0.7,-0.9) VALUES OF ALPHA +3 NUMBER OF VALUES OF BETA +(0.0,0.0) (1.0,0.0) (1.3,-1.1) VALUES OF BETA +ZGEMM T PUT F FOR NO TEST. SAME COLUMNS. +ZHEMM T PUT F FOR NO TEST. SAME COLUMNS. +ZSYMM T PUT F FOR NO TEST. SAME COLUMNS. +ZTRMM T PUT F FOR NO TEST. SAME COLUMNS. +ZTRSM T PUT F FOR NO TEST. SAME COLUMNS. +ZHERK T PUT F FOR NO TEST. SAME COLUMNS. +ZSYRK T PUT F FOR NO TEST. SAME COLUMNS. +ZHER2K T PUT F FOR NO TEST. SAME COLUMNS. +ZSYR2K T PUT F FOR NO TEST. SAME COLUMNS. diff -Nru lapack-3.7.0/BLAS/zblat2.in lapack-3.7.1/BLAS/zblat2.in --- lapack-3.7.0/BLAS/zblat2.in 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/zblat2.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ -'zblat2.out' NAME OF SUMMARY OUTPUT FILE -6 UNIT NUMBER OF SUMMARY FILE -'CBLA2T.SNAP' NAME OF SNAPSHOT OUTPUT FILE --1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0) -F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD. -F LOGICAL FLAG, T TO STOP ON FAILURES. -T LOGICAL FLAG, T TO TEST ERROR EXITS. -16.0 THRESHOLD VALUE OF TEST RATIO -6 NUMBER OF VALUES OF N -0 1 2 3 5 9 VALUES OF N -4 NUMBER OF VALUES OF K -0 1 2 4 VALUES OF K -4 NUMBER OF VALUES OF INCX AND INCY -1 2 -1 -2 VALUES OF INCX AND INCY -3 NUMBER OF VALUES OF ALPHA -(0.0,0.0) (1.0,0.0) (0.7,-0.9) VALUES OF ALPHA -3 NUMBER OF VALUES OF BETA -(0.0,0.0) (1.0,0.0) (1.3,-1.1) VALUES OF BETA -ZGEMV T PUT F FOR NO TEST. SAME COLUMNS. -ZGBMV T PUT F FOR NO TEST. SAME COLUMNS. -ZHEMV T PUT F FOR NO TEST. SAME COLUMNS. -ZHBMV T PUT F FOR NO TEST. SAME COLUMNS. -ZHPMV T PUT F FOR NO TEST. SAME COLUMNS. -ZTRMV T PUT F FOR NO TEST. SAME COLUMNS. -ZTBMV T PUT F FOR NO TEST. SAME COLUMNS. -ZTPMV T PUT F FOR NO TEST. SAME COLUMNS. -ZTRSV T PUT F FOR NO TEST. SAME COLUMNS. -ZTBSV T PUT F FOR NO TEST. SAME COLUMNS. -ZTPSV T PUT F FOR NO TEST. SAME COLUMNS. -ZGERC T PUT F FOR NO TEST. SAME COLUMNS. -ZGERU T PUT F FOR NO TEST. SAME COLUMNS. -ZHER T PUT F FOR NO TEST. SAME COLUMNS. -ZHPR T PUT F FOR NO TEST. SAME COLUMNS. -ZHER2 T PUT F FOR NO TEST. SAME COLUMNS. -ZHPR2 T PUT F FOR NO TEST. SAME COLUMNS. diff -Nru lapack-3.7.0/BLAS/zblat3.in lapack-3.7.1/BLAS/zblat3.in --- lapack-3.7.0/BLAS/zblat3.in 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/BLAS/zblat3.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -'zblat3.out' NAME OF SUMMARY OUTPUT FILE -6 UNIT NUMBER OF SUMMARY FILE -'ZBLAT3.SNAP' NAME OF SNAPSHOT OUTPUT FILE --1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0) -F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD. -F LOGICAL FLAG, T TO STOP ON FAILURES. -T LOGICAL FLAG, T TO TEST ERROR EXITS. -16.0 THRESHOLD VALUE OF TEST RATIO -6 NUMBER OF VALUES OF N -0 1 2 3 5 9 VALUES OF N -3 NUMBER OF VALUES OF ALPHA -(0.0,0.0) (1.0,0.0) (0.7,-0.9) VALUES OF ALPHA -3 NUMBER OF VALUES OF BETA -(0.0,0.0) (1.0,0.0) (1.3,-1.1) VALUES OF BETA -ZGEMM T PUT F FOR NO TEST. SAME COLUMNS. -ZHEMM T PUT F FOR NO TEST. SAME COLUMNS. -ZSYMM T PUT F FOR NO TEST. SAME COLUMNS. -ZTRMM T PUT F FOR NO TEST. SAME COLUMNS. -ZTRSM T PUT F FOR NO TEST. SAME COLUMNS. -ZHERK T PUT F FOR NO TEST. SAME COLUMNS. -ZSYRK T PUT F FOR NO TEST. SAME COLUMNS. -ZHER2K T PUT F FOR NO TEST. SAME COLUMNS. -ZSYR2K T PUT F FOR NO TEST. SAME COLUMNS. diff -Nru lapack-3.7.0/CBLAS/cblas.pc.in lapack-3.7.1/CBLAS/cblas.pc.in --- lapack-3.7.0/CBLAS/cblas.pc.in 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/CBLAS/cblas.pc.in 2017-06-17 22:46:53.000000000 +0000 @@ -1,9 +1,10 @@ -prefix=@prefix@ -libdir=@libdir@ +libdir=@CMAKE_INSTALL_FULL_LIBDIR@ +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ Name: CBLAS Description: C Standard Interface to BLAS Basic Linear Algebra Subprograms Version: @LAPACK_VERSION@ URL: http://www.netlib.org/blas/#_cblas Libs: -L${libdir} -lcblas -Requires: blas +Cflags: -I${includedir} +Requires.private: blas diff -Nru lapack-3.7.0/CBLAS/CMakeLists.txt lapack-3.7.1/CBLAS/CMakeLists.txt --- lapack-3.7.0/CBLAS/CMakeLists.txt 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/CBLAS/CMakeLists.txt 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ endmacro() append_subdir_files(CBLAS_INCLUDE "include") -install(FILES ${CBLAS_INCLUDE} ${LAPACK_BINARY_DIR}/include/cblas_mangling.h DESTINATION include) +install(FILES ${CBLAS_INCLUDE} ${LAPACK_BINARY_DIR}/include/cblas_mangling.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) # -------------------------------------------------- if(BUILD_TESTING) @@ -45,7 +45,7 @@ set(_cblas_config_install_guard_target "") if(ALL_TARGETS) install(EXPORT cblas-targets - DESTINATION ${LIBRARY_DIR}/cmake/cblas-${LAPACK_VERSION}) + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/cblas-${LAPACK_VERSION}) # Choose one of the cblas targets to use as a guard for # cblas-config.cmake to load targets from the install tree. list(GET ALL_TARGETS 0 _cblas_config_install_guard_target) @@ -78,8 +78,8 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/cblas-config.cmake ${LAPACK_BINARY_DIR}/cblas-config-version.cmake - DESTINATION ${LIBRARY_DIR}/cmake/cblas-${LAPACK_VERSION} + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/cblas-${LAPACK_VERSION} ) #install(EXPORT cblas-targets -# DESTINATION ${LIBRARY_DIR}/cmake/cblas-${LAPACK_VERSION}) +# DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/cblas-${LAPACK_VERSION}) diff -Nru lapack-3.7.0/CBLAS/examples/CMakeLists.txt lapack-3.7.1/CBLAS/examples/CMakeLists.txt --- lapack-3.7.0/CBLAS/examples/CMakeLists.txt 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/CBLAS/examples/CMakeLists.txt 2017-06-17 22:46:53.000000000 +0000 @@ -1,7 +1,7 @@ add_executable(xexample1_CBLAS cblas_example1.c) add_executable(xexample2_CBLAS cblas_example2.c) -target_link_libraries(xexample1_CBLAS cblas ${BLAS_LIBRARIES}) +target_link_libraries(xexample1_CBLAS cblas) target_link_libraries(xexample2_CBLAS cblas ${BLAS_LIBRARIES}) add_test(example1_CBLAS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/xexample1_CBLAS) diff -Nru lapack-3.7.0/CBLAS/examples/Makefile lapack-3.7.1/CBLAS/examples/Makefile --- lapack-3.7.0/CBLAS/examples/Makefile 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/CBLAS/examples/Makefile 2017-06-17 22:46:53.000000000 +0000 @@ -1,14 +1,17 @@ include ../../make.inc -all: example1 example2 +all: cblas_ex1 cblas_ex2 -example1: - $(CC) $(CFLAGS) -I../include -c cblas_example1.c - $(LOADER) $(LOADOPTS) -o cblas_ex1 cblas_example1.o $(CBLASLIB) $(BLASLIB) +cblas_ex1: cblas_example1.o $(CBLASLIB) $(BLASLIB) + $(LOADER) $(LOADOPTS) -o $@ $^ +cblas_ex2: cblas_example2.o $(CBLASLIB) $(BLASLIB) + $(LOADER) $(LOADOPTS) -o $@ $^ -example2: - $(CC) $(CFLAGS) -I../include -c cblas_example2.c - $(LOADER) $(LOADOPTS) -o cblas_ex2 cblas_example2.o $(CBLASLIB) $(BLASLIB) +clean: cleanobj cleanexe +cleanobj: + rm -f *.o +cleanexe: + rm -f cblas_ex1 cblas_ex2 -cleanall: - rm -f *.o cblas_ex1 cblas_ex2 +.c.o: + $(CC) $(CFLAGS) -I../include -c -o $@ $< diff -Nru lapack-3.7.0/CBLAS/Makefile lapack-3.7.1/CBLAS/Makefile --- lapack-3.7.0/CBLAS/Makefile 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/CBLAS/Makefile 2017-06-17 22:46:53.000000000 +0000 @@ -1,27 +1,31 @@ include ../make.inc -all: - cd include && cp cblas_mangling_with_flags.h.in cblas_mangling.h - cd src && $(MAKE) all +all: cblas +cblas: include/cblas_mangling.h + $(MAKE) -C src -clean: cleanlib +include/cblas_mangling.h: include/cblas_mangling_with_flags.h.in + cp $< $@ +cblas_testing: cblas + $(MAKE) -C testing run + +cblas_example: cblas + $(MAKE) -C examples + +clean: + $(MAKE) -C src clean + $(MAKE) -C testing clean + $(MAKE) -C examples clean +cleanobj: + $(MAKE) -C src cleanobj + $(MAKE) -C testing cleanobj + $(MAKE) -C examples cleanobj cleanlib: - cd src && $(MAKE) clean - + $(MAKE) -C src cleanlib cleanexe: - cd testing && $(MAKE) cleanexe - -cleanall: clean cleanexe - rm -f $(CBLASLIB) - cd examples && rm -f *.o cblas_ex1 cblas_ex2 - -cblas_testing: - cd testing && $(MAKE) all - -runtst: - cd testing && $(MAKE) run - -example: all - cd examples && $(MAKE) all + $(MAKE) -C testing cleanexe + $(MAKE) -C examples cleanexe +cleantest: + $(MAKE) -C testing cleantest diff -Nru lapack-3.7.0/CBLAS/src/CMakeLists.txt lapack-3.7.1/CBLAS/src/CMakeLists.txt --- lapack-3.7.0/CBLAS/src/CMakeLists.txt 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/CBLAS/src/CMakeLists.txt 2017-06-17 22:46:53.000000000 +0000 @@ -1,7 +1,6 @@ # This Makefile compiles the CBLAS routines -# -# Error handling routines for level 2 & 3 +# Error handling routines for level 2 & 3 set(ERRHAND cblas_globals.c cblas_xerbla.c xerbla.c) # @@ -12,50 +11,35 @@ # # -# -# All object files for single real precision -# +# Files for level 1 single precision real set(SLEV1 cblas_srotg.c cblas_srotmg.c cblas_srot.c cblas_srotm.c cblas_sswap.c cblas_sscal.c cblas_scopy.c cblas_saxpy.c cblas_sdot.c cblas_sdsdot.c cblas_snrm2.c cblas_sasum.c cblas_isamax.c sdotsub.f sdsdotsub.f snrm2sub.f sasumsub.f isamaxsub.f) -# -# All object files for double real precision -# +# Files for level 1 double precision real set(DLEV1 cblas_drotg.c cblas_drotmg.c cblas_drot.c cblas_drotm.c cblas_dswap.c cblas_dscal.c cblas_dcopy.c cblas_daxpy.c cblas_ddot.c cblas_dsdot.c cblas_dnrm2.c cblas_dasum.c cblas_idamax.c ddotsub.f dsdotsub.f dnrm2sub.f dasumsub.f idamaxsub.f) -# -# All object files for single complex precision -# +# Files for level 1 single precision complex set(CLEV1 cblas_cswap.c cblas_cscal.c cblas_csscal.c cblas_ccopy.c cblas_caxpy.c cblas_cdotu_sub.c cblas_cdotc_sub.c cblas_icamax.c cdotcsub.f cdotusub.f icamaxsub.f) -# -# All object files for double complex precision -# +# Files for level 1 double precision complex set(ZLEV1 cblas_zswap.c cblas_zscal.c cblas_zdscal.c cblas_zcopy.c cblas_zaxpy.c cblas_zdotu_sub.c cblas_zdotc_sub.c cblas_dznrm2.c cblas_dzasum.c cblas_izamax.c zdotcsub.f zdotusub.f dzasumsub.f dznrm2sub.f izamaxsub.f) -# -# Common files for single complex precision -# +# Common files for level 1 single precision set(SCLEV1 cblas_scasum.c scasumsub.f cblas_scnrm2.c scnrm2sub.f) # -# All object files -# -set(ALEV1 ${slev1} ${dlev1} ${clev1} ${zlev1} ${sclev1}) - -# # # CBLAS routines # @@ -63,44 +47,31 @@ # # -# -# All object files for single real precision -# +# Files for level 2 single precision real set(SLEV2 cblas_sgemv.c cblas_sgbmv.c cblas_sger.c cblas_ssbmv.c cblas_sspmv.c cblas_sspr.c cblas_sspr2.c cblas_ssymv.c cblas_ssyr.c cblas_ssyr2.c cblas_stbmv.c cblas_stbsv.c cblas_stpmv.c cblas_stpsv.c cblas_strmv.c cblas_strsv.c) -# -# All object files for double real precision -# +# Files for level 2 double precision real set(DLEV2 cblas_dgemv.c cblas_dgbmv.c cblas_dger.c cblas_dsbmv.c cblas_dspmv.c cblas_dspr.c cblas_dspr2.c cblas_dsymv.c cblas_dsyr.c cblas_dsyr2.c cblas_dtbmv.c cblas_dtbsv.c cblas_dtpmv.c cblas_dtpsv.c cblas_dtrmv.c cblas_dtrsv.c) -# -# All object files for single complex precision -# +# Files for level 2 single precision complex set(CLEV2 cblas_cgemv.c cblas_cgbmv.c cblas_chemv.c cblas_chbmv.c cblas_chpmv.c cblas_ctrmv.c cblas_ctbmv.c cblas_ctpmv.c cblas_ctrsv.c cblas_ctbsv.c cblas_ctpsv.c cblas_cgeru.c cblas_cgerc.c cblas_cher.c cblas_cher2.c cblas_chpr.c cblas_chpr2.c) -# -# All object files for double complex precision -# +# Files for level 2 double precision complex set(ZLEV2 cblas_zgemv.c cblas_zgbmv.c cblas_zhemv.c cblas_zhbmv.c cblas_zhpmv.c cblas_ztrmv.c cblas_ztbmv.c cblas_ztpmv.c cblas_ztrsv.c cblas_ztbsv.c cblas_ztpsv.c cblas_zgeru.c cblas_zgerc.c cblas_zher.c cblas_zher2.c cblas_zhpr.c cblas_zhpr2.c) # -# All object files -# -set(AVEL2 ${slev2} ${dlev2} ${clev2} ${zlev2}) - -# # # CBLAS routines # @@ -108,63 +79,46 @@ # # -# -# All object files for single real precision -# +# Files for level 3 single precision real set(SLEV3 cblas_sgemm.c cblas_ssymm.c cblas_ssyrk.c cblas_ssyr2k.c cblas_strmm.c cblas_strsm.c) -# -# All object files for double real precision -# +# Files for level 3 double precision real set(DLEV3 cblas_dgemm.c cblas_dsymm.c cblas_dsyrk.c cblas_dsyr2k.c cblas_dtrmm.c cblas_dtrsm.c) -# -# All object files for single complex precision -# +# Files for level 3 single precision complex set(CLEV3 cblas_cgemm.c cblas_csymm.c cblas_chemm.c cblas_cherk.c cblas_cher2k.c cblas_ctrmm.c cblas_ctrsm.c cblas_csyrk.c cblas_csyr2k.c) -# -# All object files for double complex precision -# +# Files for level 3 double precision complex set(ZLEV3 cblas_zgemm.c cblas_zsymm.c cblas_zhemm.c cblas_zherk.c cblas_zher2k.c cblas_ztrmm.c cblas_ztrsm.c cblas_zsyrk.c cblas_zsyr2k.c) -# -# All object files -# -set(ALEV3 ${slev3} ${dlev3} ${clev3} ${zlev3}) -# default build all of it -set(ALLOBJ ${SCLEV1} ${SLEV1} ${SLEV2} ${SLEV3} ${ERRHAND} - ${DLEV1} ${DLEV2} ${DLEV3} - ${CLEV1} ${CLEV2} ${CLEV3} - ${ZLEV1} ${ZLEV2} ${ZLEV3}) - -# Single real precision -if(CBLAS_SINGLE) - set(ALLOBJ ${SCLEV1} ${SLEV1} ${SLEV2} ${SLEV3} ${ERRHAND}) +set(SOURCES) +if(BUILD_SINGLE) + list(APPEND SOURCES ${SLEV1} ${SCLEV1} ${SLEV2} ${SLEV3} ${ERRHAND}) endif() - -# Double real precision -if(CBLAS_DOUBLE) - set(ALLOBJ ${DLEV1} ${DLEV2} ${DLEV3} ${ERRHAND}) +if(BUILD_DOUBLE) + list(APPEND SOURCES ${DLEV1} ${DLEV2} ${DLEV3} ${ERRHAND}) endif() - -# Single complex precision -if(CBLAS_COMPLEX) - set(ALLOBJ ${CLEV1} ${SCLEV1} ${CLEV2} ${CLEV3} ${ERRHAND}) +if(BUILD_COMPLEX) + list(APPEND SOURCES ${CLEV1} ${SCLEV1} ${CLEV2} ${CLEV3} ${ERRHAND}) endif() - -# Double complex precision -if(CBLAS_COMPLEX16) - set(ALLOBJ ${ZLEV1} ${ZLEV2} ${ZLEV3} ${ERRHAND}) +if(BUILD_COMPLEX16) + list(APPEND SOURCES ${ZLEV1} ${ZLEV2} ${ZLEV3} ${ERRHAND}) endif() +list(REMOVE_DUPLICATES SOURCES) -add_library(cblas ${ALLOBJ}) -target_link_libraries(cblas ${BLAS_LIBRARIES}) +add_library(cblas ${SOURCES}) +set_target_properties( + cblas PROPERTIES + LINKER_LANGUAGE C + VERSION ${LAPACK_VERSION} + SOVERSION ${LAPACK_MAJOR_VERSION} + ) +target_link_libraries(cblas PRIVATE ${BLAS_LIBRARIES}) lapack_install_library(cblas) diff -Nru lapack-3.7.0/CBLAS/src/Makefile lapack-3.7.1/CBLAS/src/Makefile --- lapack-3.7.0/CBLAS/src/Makefile 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/CBLAS/src/Makefile 2017-06-17 22:46:53.000000000 +0000 @@ -1,22 +1,12 @@ # This Makefile compiles the CBLAS routines -# -include ../../make.inc -# -# Erase all object and archive files -# -all: cblaslib +include ../../make.inc -clean: - rm -f *.o a.out core +all: $(CBLASLIB) # Error handling routines for level 2 & 3 - errhand = cblas_globals.o cblas_xerbla.o xerbla.o -# Object files of all routines -alev = $(alev1) $(alev2) $(alev3) $(errhand) - # # # CBLAS routines @@ -25,76 +15,52 @@ # # -# -# All object files for single real precision -# +# Files for level 1 single precision real slev1 = cblas_srotg.o cblas_srotmg.o cblas_srot.o cblas_srotm.o \ cblas_sswap.o cblas_sscal.o cblas_scopy.o cblas_saxpy.o \ cblas_sdot.o cblas_sdsdot.o cblas_snrm2.o cblas_sasum.o \ cblas_isamax.o sdotsub.o sdsdotsub.o snrm2sub.o sasumsub.o \ isamaxsub.o -# -# All object files for double real precision -# +# Files for level 1 double precision real dlev1 = cblas_drotg.o cblas_drotmg.o cblas_drot.o cblas_drotm.o \ cblas_dswap.o cblas_dscal.o cblas_dcopy.o cblas_daxpy.o \ cblas_ddot.o cblas_dsdot.o cblas_dnrm2.o cblas_dasum.o \ cblas_idamax.o ddotsub.o dsdotsub.o dnrm2sub.o \ dasumsub.o idamaxsub.o -# -# All object files for single complex precision -# +# Files for level 1 single precision complex clev1 = cblas_cswap.o cblas_cscal.o cblas_csscal.o cblas_ccopy.o \ cblas_caxpy.o cblas_cdotu_sub.o cblas_cdotc_sub.o \ cblas_icamax.o cdotcsub.o cdotusub.o icamaxsub.o -# -# All object files for double complex precision -# +# Files for level 1 double precision complex zlev1 = cblas_zswap.o cblas_zscal.o cblas_zdscal.o cblas_zcopy.o \ cblas_zaxpy.o cblas_zdotu_sub.o cblas_zdotc_sub.o cblas_dznrm2.o \ cblas_dzasum.o cblas_izamax.o zdotcsub.o zdotusub.o \ dzasumsub.o dznrm2sub.o izamaxsub.o -# -# Common files for single / complex precision -# +# Common files for level 1 single precision sclev1 = cblas_scasum.o scasumsub.o cblas_scnrm2.o scnrm2sub.o -# -# All object files -# -alev1 = $(slev1) $(dlev1) $(clev1) $(zlev1) $(sclev1) - -# -# Make an archive file -# - -# Single real precision +# Single precision real slib1: $(slev1) $(sclev1) - $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(slev1) $(sclev1) + $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^ $(RANLIB) $(CBLASLIB) -# Double real precision +# Double precision real dlib1: $(dlev1) - $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(dlev1) + $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^ $(RANLIB) $(CBLASLIB) -# Single complex precision +# Single precision complex clib1: $(clev1) $(sclev1) - $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(clev1) $(sclev1) + $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^ $(RANLIB) $(CBLASLIB) -# Double complex precision +# Double precision complex zlib1: $(zlev1) - $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(zlev1) - $(RANLIB) $(CBLASLIB) - -# All precisions -all1: $(alev1) - $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(alev1) + $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^ $(RANLIB) $(CBLASLIB) # @@ -105,70 +71,48 @@ # # -# -# All object files for single real precision -# +# Files for level 2 single precision real slev2 = cblas_sgemv.o cblas_sgbmv.o cblas_sger.o cblas_ssbmv.o cblas_sspmv.o \ cblas_sspr.o cblas_sspr2.o cblas_ssymv.o cblas_ssyr.o cblas_ssyr2.o \ cblas_stbmv.o cblas_stbsv.o cblas_stpmv.o cblas_stpsv.o cblas_strmv.o \ cblas_strsv.o -# -# All object files for double real precision -# +# Files for level 2 double precision real dlev2 = cblas_dgemv.o cblas_dgbmv.o cblas_dger.o cblas_dsbmv.o cblas_dspmv.o \ cblas_dspr.o cblas_dspr2.o cblas_dsymv.o cblas_dsyr.o cblas_dsyr2.o \ cblas_dtbmv.o cblas_dtbsv.o cblas_dtpmv.o cblas_dtpsv.o cblas_dtrmv.o \ cblas_dtrsv.o -# -# All object files for single complex precision -# +# Files for level 2 single precision complex clev2 = cblas_cgemv.o cblas_cgbmv.o cblas_chemv.o cblas_chbmv.o cblas_chpmv.o \ cblas_ctrmv.o cblas_ctbmv.o cblas_ctpmv.o cblas_ctrsv.o cblas_ctbsv.o \ cblas_ctpsv.o cblas_cgeru.o cblas_cgerc.o cblas_cher.o cblas_cher2.o \ cblas_chpr.o cblas_chpr2.o -# -# All object files for double complex precision -# +# Files for level 2 double precision complex zlev2 = cblas_zgemv.o cblas_zgbmv.o cblas_zhemv.o cblas_zhbmv.o cblas_zhpmv.o \ cblas_ztrmv.o cblas_ztbmv.o cblas_ztpmv.o cblas_ztrsv.o cblas_ztbsv.o \ cblas_ztpsv.o cblas_zgeru.o cblas_zgerc.o cblas_zher.o cblas_zher2.o \ cblas_zhpr.o cblas_zhpr2.o -# -# All object files -# -alev2 = $(slev2) $(dlev2) $(clev2) $(zlev2) - -# -# Make an archive file -# - -# Single real precision +# Single precision real slib2: $(slev2) $(errhand) - $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(slev2) $(errhand) + $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^ $(RANLIB) $(CBLASLIB) -# Double real precision +# Double precision real dlib2: $(dlev2) $(errhand) - $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(dlev2) $(errhand) + $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^ $(RANLIB) $(CBLASLIB) -# Single complex precision +# Single precision complex clib2: $(clev2) $(errhand) - $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(clev2) $(errhand) + $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^ $(RANLIB) $(CBLASLIB) -# Double complex precision +# Double precision complex zlib2: $(zlev2) $(errhand) - $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(zlev2) $(errhand) - $(RANLIB) $(CBLASLIB) - -# All precisions -all2: $(alev2) $(errhand) - $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(alev2) $(errhand) + $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^ $(RANLIB) $(CBLASLIB) # @@ -179,76 +123,79 @@ # # -# -# All object files for single real precision -# +# Files for level 3 single precision real slev3 = cblas_sgemm.o cblas_ssymm.o cblas_ssyrk.o cblas_ssyr2k.o cblas_strmm.o \ cblas_strsm.o -# -# All object files for double real precision -# +# Files for level 3 double precision real dlev3 = cblas_dgemm.o cblas_dsymm.o cblas_dsyrk.o cblas_dsyr2k.o cblas_dtrmm.o \ cblas_dtrsm.o -# -# All object files for single complex precision -# +# Files for level 3 single precision complex clev3 = cblas_cgemm.o cblas_csymm.o cblas_chemm.o cblas_cherk.o \ cblas_cher2k.o cblas_ctrmm.o cblas_ctrsm.o cblas_csyrk.o \ cblas_csyr2k.o -# -# All object files for double complex precision -# +# Files for level 3 double precision complex zlev3 = cblas_zgemm.o cblas_zsymm.o cblas_zhemm.o cblas_zherk.o \ cblas_zher2k.o cblas_ztrmm.o cblas_ztrsm.o cblas_zsyrk.o \ cblas_zsyr2k.o -# -# All object files -# -alev3 = $(slev3) $(dlev3) $(clev3) $(zlev3) - -# -# Make an archive file -# - -# Single real precision +# Single precision real slib3: $(slev3) $(errhand) - $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(slev3) $(errhand) + $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^ $(RANLIB) $(CBLASLIB) -# Double real precision +# Double precision real dlib3: $(dlev3) $(errhand) - $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(dlev3) $(errhand) + $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^ $(RANLIB) $(CBLASLIB) -# Single complex precision +# Single precision complex clib3: $(clev3) $(errhand) - $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(clev3) $(errhand) + $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^ $(RANLIB) $(CBLASLIB) -# Single complex precision +# Double precision complex zlib3: $(zlev3) $(errhand) - $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(zlev3) $(errhand) + $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^ + $(RANLIB) $(CBLASLIB) + + +alev1 = $(slev1) $(dlev1) $(clev1) $(zlev1) $(sclev1) +alev2 = $(slev2) $(dlev2) $(clev2) $(zlev2) +alev3 = $(slev3) $(dlev3) $(clev3) $(zlev3) + +# All level 1 +all1: $(alev1) + $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^ $(RANLIB) $(CBLASLIB) -# All precisions +# All level 2 +all2: $(alev2) $(errhand) + $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^ + $(RANLIB) $(CBLASLIB) + +# All level 3 all3: $(alev3) $(errhand) - $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(alev3) + $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $^ $(RANLIB) $(CBLASLIB) # All levels and precisions -cblaslib: $(alev) - $(ARCH) $(ARCHFLAGS) $(CBLASLIB) $(alev) - $(RANLIB) $(CBLASLIB) +$(CBLASLIB): $(alev1) $(alev2) $(alev3) $(errhand) + $(ARCH) $(ARCHFLAGS) $@ $^ + $(RANLIB) $@ FRC: @FRC=$(FRC) +clean: cleanobj cleanlib +cleanobj: + rm -f *.o +cleanlib: + rm -f $(CBLASLIB) + .c.o: $(CC) $(CFLAGS) -I../include -c -o $@ $< - .f.o: $(FORTRAN) $(OPTS) -c -o $@ $< diff -Nru lapack-3.7.0/CBLAS/testing/CMakeLists.txt lapack-3.7.1/CBLAS/testing/CMakeLists.txt --- lapack-3.7.0/CBLAS/testing/CMakeLists.txt 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/CBLAS/testing/CMakeLists.txt 2017-06-17 22:46:53.000000000 +0000 @@ -25,22 +25,22 @@ endmacro() -# Object files for single real precision +# Object files for single precision real set(STESTL1O c_sblas1.c) set(STESTL2O c_sblas2.c c_s2chke.c auxiliary.c c_xerbla.c) set(STESTL3O c_sblas3.c c_s3chke.c auxiliary.c c_xerbla.c) -# Object files for double real precision +# Object files for double precision real set(DTESTL1O c_dblas1.c) set(DTESTL2O c_dblas2.c c_d2chke.c auxiliary.c c_xerbla.c) set(DTESTL3O c_dblas3.c c_d3chke.c auxiliary.c c_xerbla.c) -# Object files for single complex precision +# Object files for single precision complex set(CTESTL1O c_cblat1.f c_cblas1.c) set(CTESTL2O c_cblas2.c c_c2chke.c auxiliary.c c_xerbla.c) set(CTESTL3O c_cblas3.c c_c3chke.c auxiliary.c c_xerbla.c) -# Object files for double complex precision +# Object files for double precision complex set(ZTESTL1O c_zblas1.c) set(ZTESTL2O c_zblas2.c c_z2chke.c auxiliary.c c_xerbla.c) set(ZTESTL3O c_zblas3.c c_z3chke.c auxiliary.c c_xerbla.c) @@ -52,9 +52,9 @@ add_executable(xscblat2 c_sblat2.f ${STESTL2O} ${LAPACK_BINARY_DIR}/include/cblas_test.h) add_executable(xscblat3 c_sblat3.f ${STESTL3O} ${LAPACK_BINARY_DIR}/include/cblas_test.h) - target_link_libraries(xscblat1 cblas ${BLAS_LIBRARIES}) - target_link_libraries(xscblat2 cblas ${BLAS_LIBRARIES}) - target_link_libraries(xscblat3 cblas ${BLAS_LIBRARIES}) + target_link_libraries(xscblat1 cblas) + target_link_libraries(xscblat2 cblas) + target_link_libraries(xscblat3 cblas) add_cblas_test(stest1.out "" xscblat1) add_cblas_test(stest2.out sin2 xscblat2) @@ -66,9 +66,9 @@ add_executable(xdcblat2 c_dblat2.f ${DTESTL2O} ${LAPACK_BINARY_DIR}/include/cblas_test.h) add_executable(xdcblat3 c_dblat3.f ${DTESTL3O} ${LAPACK_BINARY_DIR}/include/cblas_test.h) - target_link_libraries(xdcblat1 cblas ${BLAS_LIBRARIES}) - target_link_libraries(xdcblat2 cblas ${BLAS_LIBRARIES}) - target_link_libraries(xdcblat3 cblas ${BLAS_LIBRARIES}) + target_link_libraries(xdcblat1 cblas) + target_link_libraries(xdcblat2 cblas) + target_link_libraries(xdcblat3 cblas) add_cblas_test(dtest1.out "" xdcblat1) add_cblas_test(dtest2.out din2 xdcblat2) @@ -81,8 +81,8 @@ add_executable(xccblat3 c_cblat3.f ${CTESTL3O} ${LAPACK_BINARY_DIR}/include/cblas_test.h) target_link_libraries(xccblat1 cblas ${BLAS_LIBRARIES}) - target_link_libraries(xccblat2 cblas ${BLAS_LIBRARIES}) - target_link_libraries(xccblat3 cblas ${BLAS_LIBRARIES}) + target_link_libraries(xccblat2 cblas) + target_link_libraries(xccblat3 cblas) add_cblas_test(ctest1.out "" xccblat1) add_cblas_test(ctest2.out cin2 xccblat2) @@ -94,9 +94,9 @@ add_executable(xzcblat2 c_zblat2.f ${ZTESTL2O} ${LAPACK_BINARY_DIR}/include/cblas_test.h) add_executable(xzcblat3 c_zblat3.f ${ZTESTL3O} ${LAPACK_BINARY_DIR}/include/cblas_test.h) - target_link_libraries(xzcblat1 cblas ${BLAS_LIBRARIES}) - target_link_libraries(xzcblat2 cblas ${BLAS_LIBRARIES}) - target_link_libraries(xzcblat3 cblas ${BLAS_LIBRARIES}) + target_link_libraries(xzcblat1 cblas) + target_link_libraries(xzcblat2 cblas) + target_link_libraries(xzcblat3 cblas) add_cblas_test(ztest1.out "" xzcblat1) add_cblas_test(ztest2.out zin2 xzcblat2) diff -Nru lapack-3.7.0/CBLAS/testing/Makefile lapack-3.7.1/CBLAS/testing/Makefile --- lapack-3.7.0/CBLAS/testing/Makefile 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/CBLAS/testing/Makefile 2017-06-17 22:46:53.000000000 +0000 @@ -7,120 +7,104 @@ # Archive files necessary to compile LIB = $(CBLASLIB) $(BLASLIB) -# Object files for single real precision +# Object files for single precision real stestl1o = c_sblas1.o stestl2o = c_sblas2.o c_s2chke.o auxiliary.o c_xerbla.o stestl3o = c_sblas3.o c_s3chke.o auxiliary.o c_xerbla.o -# Object files for double real precision +# Object files for double precision real dtestl1o = c_dblas1.o dtestl2o = c_dblas2.o c_d2chke.o auxiliary.o c_xerbla.o dtestl3o = c_dblas3.o c_d3chke.o auxiliary.o c_xerbla.o -# Object files for single complex precision +# Object files for single precision complex ctestl1o = c_cblas1.o ctestl2o = c_cblas2.o c_c2chke.o auxiliary.o c_xerbla.o ctestl3o = c_cblas3.o c_c3chke.o auxiliary.o c_xerbla.o -# Object files for double complex precision +# Object files for double precision complex ztestl1o = c_zblas1.o ztestl2o = c_zblas2.o c_z2chke.o auxiliary.o c_xerbla.o ztestl3o = c_zblas3.o c_z3chke.o auxiliary.o c_xerbla.o all: all1 all2 all3 -all1: stest1 dtest1 ctest1 ztest1 -all2: stest2 dtest2 ctest2 ztest2 -all3: stest3 dtest3 ctest3 ztest3 - -clean: - rm -f core *.o *.out x* -cleanobj: - rm -f core *.o a.out -cleanexe: - rm -f x* - -stest1: xscblat1 -dtest1: xdcblat1 -ctest1: xccblat1 -ztest1: xzcblat1 - -stest2: xscblat2 -dtest2: xdcblat2 -ctest2: xccblat2 -ztest2: xzcblat2 - -stest3: xscblat3 -dtest3: xdcblat3 -ctest3: xccblat3 -ztest3: xzcblat3 +all1: xscblat1 xdcblat1 xccblat1 xzcblat1 +all2: xscblat2 xdcblat2 xccblat2 xzcblat2 +all3: xscblat3 xdcblat3 xccblat3 xzcblat3 # # Compile each precision # # Single real -xscblat1: $(stestl1o) c_sblat1.o - $(LOADER) $(LOADOPTS) -o $@ c_sblat1.o $(stestl1o) $(LIB) -xscblat2: $(stestl2o) c_sblat2.o - $(LOADER) $(LOADOPTS) -o $@ c_sblat2.o $(stestl2o) $(LIB) -xscblat3: $(stestl3o) c_sblat3.o - $(LOADER) $(LOADOPTS) -o $@ c_sblat3.o $(stestl3o) $(LIB) +xscblat1: c_sblat1.o $(stestl1o) $(LIB) + $(LOADER) $(LOADOPTS) -o $@ $^ +xscblat2: c_sblat2.o $(stestl2o) $(LIB) + $(LOADER) $(LOADOPTS) -o $@ $^ +xscblat3: c_sblat3.o $(stestl3o) $(LIB) + $(LOADER) $(LOADOPTS) -o $@ $^ # Double real -xdcblat1: $(dtestl1o) c_dblat1.o - $(LOADER) $(LOADOPTS) -o $@ c_dblat1.o $(dtestl1o) $(LIB) -xdcblat2: $(dtestl2o) c_dblat2.o - $(LOADER) $(LOADOPTS) -o $@ c_dblat2.o $(dtestl2o) $(LIB) -xdcblat3: $(dtestl3o) c_dblat3.o - $(LOADER) $(LOADOPTS) -o $@ c_dblat3.o $(dtestl3o) $(LIB) +xdcblat1: c_dblat1.o $(dtestl1o) $(LIB) + $(LOADER) $(LOADOPTS) -o $@ $^ +xdcblat2: c_dblat2.o $(dtestl2o) $(LIB) + $(LOADER) $(LOADOPTS) -o $@ $^ +xdcblat3: c_dblat3.o $(dtestl3o) $(LIB) + $(LOADER) $(LOADOPTS) -o $@ $^ # Single complex -xccblat1: $(ctestl1o) c_cblat1.o - $(LOADER) $(LOADOPTS) -o $@ c_cblat1.o $(ctestl1o) $(LIB) -xccblat2: $(ctestl2o) c_cblat2.o - $(LOADER) $(LOADOPTS) -o $@ c_cblat2.o $(ctestl2o) $(LIB) -xccblat3: $(ctestl3o) c_cblat3.o - $(LOADER) $(LOADOPTS) -o $@ c_cblat3.o $(ctestl3o) $(LIB) +xccblat1: c_cblat1.o $(ctestl1o) $(LIB) + $(LOADER) $(LOADOPTS) -o $@ $^ +xccblat2: c_cblat2.o $(ctestl2o) $(LIB) + $(LOADER) $(LOADOPTS) -o $@ $^ +xccblat3: c_cblat3.o $(ctestl3o) $(LIB) + $(LOADER) $(LOADOPTS) -o $@ $^ # Double complex -xzcblat1: $(ztestl1o) c_zblat1.o - $(LOADER) $(LOADOPTS) -o $@ c_zblat1.o $(ztestl1o) $(LIB) -xzcblat2: $(ztestl2o) c_zblat2.o - $(LOADER) $(LOADOPTS) -o $@ c_zblat2.o $(ztestl2o) $(LIB) -xzcblat3: $(ztestl3o) c_zblat3.o - $(LOADER) $(LOADOPTS) -o $@ c_zblat3.o $(ztestl3o) $(LIB) +xzcblat1: c_zblat1.o $(ztestl1o) $(LIB) + $(LOADER) $(LOADOPTS) -o $@ $^ +xzcblat2: c_zblat2.o $(ztestl2o) $(LIB) + $(LOADER) $(LOADOPTS) -o $@ $^ +xzcblat3: c_zblat3.o $(ztestl3o) $(LIB) + $(LOADER) $(LOADOPTS) -o $@ $^ # RUN TESTS -run: - @echo "--> TESTING CBLAS 1 - SINGLE PRECISION <--" +run: all + @echo "--> TESTING CBLAS 1 - SINGLE PRECISION REAL <--" @./xscblat1 > stest1.out - @echo "--> TESTING CBLAS 1 - DOUBLE PRECISION <--" + @echo "--> TESTING CBLAS 1 - DOUBLE PRECISION REAL <--" @./xdcblat1 > dtest1.out - @echo "--> TESTING CBLAS 1 - COMPLEX PRECISION <--" + @echo "--> TESTING CBLAS 1 - SINGLE PRECISION COMPLEX <--" @./xccblat1 > ctest1.out - @echo "--> TESTING CBLAS 1 - DOUBLE COMPLEX PRECISION <--" + @echo "--> TESTING CBLAS 1 - DOUBLE PRECISION COMPLEX <--" @./xzcblat1 > ztest1.out - @echo "--> TESTING CBLAS 2 - SINGLE PRECISION <--" + @echo "--> TESTING CBLAS 2 - SINGLE PRECISION REAL <--" @./xscblat2 < sin2 > stest2.out - @echo "--> TESTING CBLAS 2 - DOUBLE PRECISION <--" + @echo "--> TESTING CBLAS 2 - DOUBLE PRECISION REAL <--" @./xdcblat2 < din2 > dtest2.out - @echo "--> TESTING CBLAS 2 - COMPLEX PRECISION <--" + @echo "--> TESTING CBLAS 2 - SINGLE PRECISION COMPLEX <--" @./xccblat2 < cin2 > ctest2.out - @echo "--> TESTING CBLAS 2 - DOUBLE COMPLEX PRECISION <--" + @echo "--> TESTING CBLAS 2 - DOUBLE PRECISION COMPLEX <--" @./xzcblat2 < zin2 > ztest2.out - @echo "--> TESTING CBLAS 3 - SINGLE PRECISION <--" + @echo "--> TESTING CBLAS 3 - SINGLE PRECISION REAL <--" @./xscblat3 < sin3 > stest3.out - @echo "--> TESTING CBLAS 3 - DOUBLE PRECISION <--" + @echo "--> TESTING CBLAS 3 - DOUBLE PRECISION REAL <--" @./xdcblat3 < din3 > dtest3.out - @echo "--> TESTING CBLAS 3 - COMPLEX PRECISION <--" + @echo "--> TESTING CBLAS 3 - SINGLE PRECISION COMPLEX <--" @./xccblat3 < cin3 > ctest3.out - @echo "--> TESTING CBLAS 3 - DOUBLE COMPLEX PRECISION <--" + @echo "--> TESTING CBLAS 3 - DOUBLE PRECISION COMPLEX <--" @./xzcblat3 < zin3 > ztest3.out -.SUFFIXES: .o .f .c +clean: cleanobj cleanexe cleantest +cleanobj: + rm -f *.o +cleanexe: + rm -f x* +cleantest: + rm -f *.out core +.SUFFIXES: .o .f .c .c.o: $(CC) $(CFLAGS) -I../include -c -o $@ $< - .f.o: $(FORTRAN) $(OPTS) -c -o $@ $< diff -Nru lapack-3.7.0/CMAKE/Findcodecov.cmake lapack-3.7.1/CMAKE/Findcodecov.cmake --- lapack-3.7.0/CMAKE/Findcodecov.cmake 1970-01-01 00:00:00.000000000 +0000 +++ lapack-3.7.1/CMAKE/Findcodecov.cmake 2017-06-17 22:46:53.000000000 +0000 @@ -0,0 +1,202 @@ +# This file is part of CMake-codecov. +# +# https://github.com/RWTH-ELP/CMake-codecov +# +# Copyright (c) +# 2015-2016 RWTH Aachen University, Federal Republic of Germany +# +# LICENSE : BSD 3-Clause License +# +# Written by Alexander Haase, alexander.haase@rwth-aachen.de +# Updated by Guillaume Jacquenot, guillaume.jacquenot@gmail.com + +set(COVERAGE_FLAG_CANDIDATES + # gcc and clang + "-O0 -g -fprofile-arcs -ftest-coverage" + + # gcc and clang fallback + "-O0 -g --coverage" +) + + +# To avoid error messages about CMP0051, this policy will be set to new. There +# will be no problem, as TARGET_OBJECTS generator expressions will be filtered +# with a regular expression from the sources. +if(POLICY CMP0051) + cmake_policy(SET CMP0051 NEW) +endif() + + +# Add coverage support for target ${TNAME} and register target for coverage +# evaluation. +function(add_coverage TNAME) + foreach (TNAME ${ARGV}) + add_coverage_target(${TNAME}) + endforeach() +endfunction() + + +# Find the reuired flags foreach language. +set(CMAKE_REQUIRED_QUIET_SAVE ${CMAKE_REQUIRED_QUIET}) +set(CMAKE_REQUIRED_QUIET ${codecov_FIND_QUIETLY}) + +get_property(ENABLED_LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES) +foreach (LANG ${ENABLED_LANGUAGES}) + # Coverage flags are not dependend on language, but the used compiler. So + # instead of searching flags foreach language, search flags foreach compiler + # used. + set(COMPILER ${CMAKE_${LANG}_COMPILER_ID}) + if(NOT COVERAGE_${COMPILER}_FLAGS) + foreach (FLAG ${COVERAGE_FLAG_CANDIDATES}) + if(NOT CMAKE_REQUIRED_QUIET) + message(STATUS "Try ${COMPILER} code coverage flag = [${FLAG}]") + endif() + + set(CMAKE_REQUIRED_FLAGS "${FLAG}") + unset(COVERAGE_FLAG_DETECTED CACHE) + + if(${LANG} STREQUAL "C") + include(CheckCCompilerFlag) + check_c_compiler_flag("${FLAG}" COVERAGE_FLAG_DETECTED) + + elseif(${LANG} STREQUAL "CXX") + include(CheckCXXCompilerFlag) + check_cxx_compiler_flag("${FLAG}" COVERAGE_FLAG_DETECTED) + + elseif(${LANG} STREQUAL "Fortran") + # CheckFortranCompilerFlag was introduced in CMake 3.x. To be + # compatible with older Cmake versions, we will check if this + # module is present before we use it. Otherwise we will define + # Fortran coverage support as not available. + include(CheckFortranCompilerFlag OPTIONAL + RESULT_VARIABLE INCLUDED) + if(INCLUDED) + check_fortran_compiler_flag("${FLAG}" + COVERAGE_FLAG_DETECTED) + elseif(NOT CMAKE_REQUIRED_QUIET) + message("-- Performing Test COVERAGE_FLAG_DETECTED") + message("-- Performing Test COVERAGE_FLAG_DETECTED - Failed" + " (Check not supported)") + endif() + endif() + + if(COVERAGE_FLAG_DETECTED) + set(COVERAGE_${COMPILER}_FLAGS "${FLAG}" + CACHE STRING "${COMPILER} flags for code coverage.") + mark_as_advanced(COVERAGE_${COMPILER}_FLAGS) + break() + endif() + endforeach() + endif() +endforeach() + +set(CMAKE_REQUIRED_QUIET ${CMAKE_REQUIRED_QUIET_SAVE}) + +# Helper function to get the language of a source file. +function (codecov_lang_of_source FILE RETURN_VAR) + get_filename_component(FILE_EXT "${FILE}" EXT) + string(TOLOWER "${FILE_EXT}" FILE_EXT) + string(SUBSTRING "${FILE_EXT}" 1 -1 FILE_EXT) + + get_property(ENABLED_LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES) + foreach (LANG ${ENABLED_LANGUAGES}) + list(FIND CMAKE_${LANG}_SOURCE_FILE_EXTENSIONS "${FILE_EXT}" TEMP) + if(NOT ${TEMP} EQUAL -1) + set(${RETURN_VAR} "${LANG}" PARENT_SCOPE) + return() + endif() + endforeach() + + set(${RETURN_VAR} "" PARENT_SCOPE) +endfunction() + +# Helper function to get the relative path of the source file destination path. +# This path is needed by FindGcov and FindLcov cmake files to locate the +# captured data. +function (codecov_path_of_source FILE RETURN_VAR) + string(REGEX MATCH "TARGET_OBJECTS:([^ >]+)" _source ${FILE}) + + # If expression was found, SOURCEFILE is a generator-expression for an + # object library. Currently we found no way to call this function automatic + # for the referenced target, so it must be called in the directoryso of the + # object library definition. + if(NOT "${_source}" STREQUAL "") + set(${RETURN_VAR} "" PARENT_SCOPE) + return() + endif() + + string(REPLACE "${CMAKE_CURRENT_BINARY_DIR}/" "" FILE "${FILE}") + if(IS_ABSOLUTE ${FILE}) + file(RELATIVE_PATH FILE ${CMAKE_CURRENT_SOURCE_DIR} ${FILE}) + endif() + + # get the right path for file + string(REPLACE ".." "__" PATH "${FILE}") + + set(${RETURN_VAR} "${PATH}" PARENT_SCOPE) +endfunction() + +# Add coverage support for target ${TNAME} and register target for coverage +# evaluation. +function(add_coverage_target TNAME) + # Check if all sources for target use the same compiler. If a target uses + # e.g. C and Fortran mixed and uses different compilers (e.g. clang and + # gfortran) this can trigger huge problems, because different compilers may + # use different implementations for code coverage. + get_target_property(TSOURCES ${TNAME} SOURCES) + set(TARGET_COMPILER "") + set(ADDITIONAL_FILES "") + foreach (FILE ${TSOURCES}) + # If expression was found, FILE is a generator-expression for an object + # library. Object libraries will be ignored. + string(REGEX MATCH "TARGET_OBJECTS:([^ >]+)" _file ${FILE}) + if("${_file}" STREQUAL "") + codecov_lang_of_source(${FILE} LANG) + if(LANG) + list(APPEND TARGET_COMPILER ${CMAKE_${LANG}_COMPILER_ID}) + + list(APPEND ADDITIONAL_FILES "${FILE}.gcno") + list(APPEND ADDITIONAL_FILES "${FILE}.gcda") + endif() + endif() + endforeach () + + list(REMOVE_DUPLICATES TARGET_COMPILER) + list(LENGTH TARGET_COMPILER NUM_COMPILERS) + + if(NUM_COMPILERS GREATER 1) + message(AUTHOR_WARNING "Coverage disabled for target ${TNAME} because " + "it will be compiled by different compilers.") + return() + + elseif((NUM_COMPILERS EQUAL 0) OR + (NOT DEFINED "COVERAGE_${TARGET_COMPILER}_FLAGS")) + message(AUTHOR_WARNING "Coverage disabled for target ${TNAME} " + "because there is no sanitizer available for target sources.") + return() + endif() + + + # enable coverage for target + set_property(TARGET ${TNAME} APPEND_STRING + PROPERTY COMPILE_FLAGS " ${COVERAGE_${TARGET_COMPILER}_FLAGS}") + set_property(TARGET ${TNAME} APPEND_STRING + PROPERTY LINK_FLAGS " ${COVERAGE_${TARGET_COMPILER}_FLAGS}") + + + # Add gcov files generated by compiler to clean target. + set(CLEAN_FILES "") + foreach (FILE ${ADDITIONAL_FILES}) + codecov_path_of_source(${FILE} FILE) + list(APPEND CLEAN_FILES "CMakeFiles/${TNAME}.dir/${FILE}") + endforeach() + + set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES + "${CLEAN_FILES}") + + add_gcov_target(${TNAME}) +endfunction() + +# Include modules for parsing the collected data and output it in a readable +# format (like gcov). +find_package(Gcov) diff -Nru lapack-3.7.0/CMAKE/FindGcov.cmake lapack-3.7.1/CMAKE/FindGcov.cmake --- lapack-3.7.0/CMAKE/FindGcov.cmake 1970-01-01 00:00:00.000000000 +0000 +++ lapack-3.7.1/CMAKE/FindGcov.cmake 2017-06-17 22:46:53.000000000 +0000 @@ -0,0 +1,155 @@ +# This file is part of CMake-codecov. +# +# https://github.com/RWTH-ELP/CMake-codecov +# +# Copyright (c) +# 2015-2016 RWTH Aachen University, Federal Republic of Germany +# +# LICENSE : BSD 3-Clause License +# +# Written by Alexander Haase, alexander.haase@rwth-aachen.de +# Updated by Guillaume Jacquenot, guillaume.jacquenot@gmail.com + +# include required Modules +include(FindPackageHandleStandardArgs) + + +# Search for gcov binary. +set(CMAKE_REQUIRED_QUIET_SAVE ${CMAKE_REQUIRED_QUIET}) +set(CMAKE_REQUIRED_QUIET ${codecov_FIND_QUIETLY}) + +get_property(ENABLED_LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES) +foreach (LANG ${ENABLED_LANGUAGES}) + # Gcov evaluation is dependend on the used compiler. Check gcov support for + # each compiler that is used. If gcov binary was already found for this + # compiler, do not try to find it again. + if(NOT GCOV_${CMAKE_${LANG}_COMPILER_ID}_BIN) + get_filename_component(COMPILER_PATH "${CMAKE_${LANG}_COMPILER}" PATH) + + if("${CMAKE_${LANG}_COMPILER_ID}" STREQUAL "GNU") + # Some distributions like OSX (homebrew) ship gcov with the compiler + # version appended as gcov-x. To find this binary we'll build the + # suggested binary name with the compiler version. + string(REGEX MATCH "^[0-9]+" GCC_VERSION + "${CMAKE_${LANG}_COMPILER_VERSION}") + + find_program(GCOV_BIN NAMES gcov-${GCC_VERSION} gcov + HINTS ${COMPILER_PATH}) + + elseif("${CMAKE_${LANG}_COMPILER_ID}" STREQUAL "Clang") + # Some distributions like Debian ship llvm-cov with the compiler + # version appended as llvm-cov-x.y. To find this binary we'll build + # the suggested binary name with the compiler version. + string(REGEX MATCH "^[0-9]+.[0-9]+" LLVM_VERSION + "${CMAKE_${LANG}_COMPILER_VERSION}") + + # llvm-cov prior version 3.5 seems to be not working with coverage + # evaluation tools, but these versions are compatible with the gcc + # gcov tool. + if(LLVM_VERSION VERSION_GREATER 3.4) + find_program(LLVM_COV_BIN NAMES "llvm-cov-${LLVM_VERSION}" + "llvm-cov" HINTS ${COMPILER_PATH}) + mark_as_advanced(LLVM_COV_BIN) + + if(LLVM_COV_BIN) + find_program(LLVM_COV_WRAPPER "llvm-cov-wrapper" PATHS + ${CMAKE_MODULE_PATH}) + if(LLVM_COV_WRAPPER) + set(GCOV_BIN "${LLVM_COV_WRAPPER}" CACHE FILEPATH "") + + # set additional parameters + set(GCOV_${CMAKE_${LANG}_COMPILER_ID}_ENV + "LLVM_COV_BIN=${LLVM_COV_BIN}" CACHE STRING + "Environment variables for llvm-cov-wrapper.") + mark_as_advanced(GCOV_${CMAKE_${LANG}_COMPILER_ID}_ENV) + endif() + endif() + endif() + + if(NOT GCOV_BIN) + # Fall back to gcov binary if llvm-cov was not found or is + # incompatible. This is the default on OSX, but may crash on + # recent Linux versions. + find_program(GCOV_BIN gcov HINTS ${COMPILER_PATH}) + endif() + endif() + + + if(GCOV_BIN) + set(GCOV_${CMAKE_${LANG}_COMPILER_ID}_BIN "${GCOV_BIN}" CACHE STRING + "${LANG} gcov binary.") + + if(NOT CMAKE_REQUIRED_QUIET) + message("-- Found gcov evaluation for " + "${CMAKE_${LANG}_COMPILER_ID}: ${GCOV_BIN}") + endif() + + unset(GCOV_BIN CACHE) + endif() + endif() +endforeach () + + +# Add a new global target for all gcov targets. This target could be used to +# generate the gcov files for the whole project instead of calling -gcov +# for each target. +if(NOT TARGET coverage) + add_custom_target(coverage) +endif() + + +# This function will add gcov evaluation for target . Only sources of +# this target will be evaluated and no dependencies will be added. It will call +# Gcov on any source file of once and store the gcov file in the same +# directory. +function (add_gcov_target TNAME) + set(TDIR ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${TNAME}.dir) + + # We don't have to check, if the target has support for coverage, thus this + # will be checked by add_coverage_target in Findcoverage.cmake. Instead we + # have to determine which gcov binary to use. + get_target_property(TSOURCES ${TNAME} SOURCES) + set(SOURCES "") + set(TCOMPILER "") + foreach (FILE ${TSOURCES}) + codecov_path_of_source(${FILE} FILE) + if(NOT "${FILE}" STREQUAL "") + codecov_lang_of_source(${FILE} LANG) + if(NOT "${LANG}" STREQUAL "") + list(APPEND SOURCES "${FILE}") + set(TCOMPILER ${CMAKE_${LANG}_COMPILER_ID}) + endif() + endif() + endforeach() + + # If no gcov binary was found, coverage data can't be evaluated. + if(NOT GCOV_${TCOMPILER}_BIN) + message(WARNING "No coverage evaluation binary found for ${TCOMPILER}.") + return() + endif() + + set(GCOV_BIN "${GCOV_${TCOMPILER}_BIN}") + set(GCOV_ENV "${GCOV_${TCOMPILER}_ENV}") + + + set(BUFFER "") + foreach(FILE ${SOURCES}) + get_filename_component(FILE_PATH "${TDIR}/${FILE}" PATH) + + # call gcov + add_custom_command(OUTPUT ${TDIR}/${FILE}.gcov + COMMAND ${GCOV_ENV} ${GCOV_BIN} ${TDIR}/${FILE}.gcno > /dev/null + DEPENDS ${TNAME} ${TDIR}/${FILE}.gcno + WORKING_DIRECTORY ${FILE_PATH} + ) + + list(APPEND BUFFER ${TDIR}/${FILE}.gcov) + endforeach() + + + # add target for gcov evaluation of + add_custom_target(${TNAME}-gcov DEPENDS ${BUFFER}) + + # add evaluation target to the global gcov target. + add_dependencies(coverage ${TNAME}-gcov) +endfunction() diff -Nru lapack-3.7.0/CMakeLists.txt lapack-3.7.1/CMakeLists.txt --- lapack-3.7.0/CMakeLists.txt 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/CMakeLists.txt 2017-06-17 22:46:53.000000000 +0000 @@ -5,19 +5,21 @@ message(STATUS "Setting build type to 'Release' as none was specified.") set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE) # Set the possible values of build type for cmake-gui - set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo") + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo" "Coverage") endif() -project(LAPACK Fortran) +project(LAPACK Fortran C) set(LAPACK_MAJOR_VERSION 3) set(LAPACK_MINOR_VERSION 7) -set(LAPACK_PATCH_VERSION 0) +set(LAPACK_PATCH_VERSION 1) set( LAPACK_VERSION ${LAPACK_MAJOR_VERSION}.${LAPACK_MINOR_VERSION}.${LAPACK_PATCH_VERSION} ) +include(GNUInstallDirs) + # Updated OSX RPATH settings # In response to CMake 3.0 generating warnings regarding policy CMP0042, # the OSX RPATH settings have been updated per recommendations found @@ -26,9 +28,9 @@ set(CMAKE_MACOSX_RPATH ON) set(CMAKE_SKIP_BUILD_RPATH FALSE) set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) -list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" isSystemDir) +list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES ${CMAKE_INSTALL_FULL_LIBDIR} isSystemDir) if("${isSystemDir}" STREQUAL "-1") - set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}") + set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}) set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) endif() @@ -96,33 +98,16 @@ set(LAPACK_INSTALL_EXPORT_NAME lapack-targets) -if(UNIX) - include(GNUInstallDirs) - set(ARCHIVE_DIR ${CMAKE_INSTALL_LIBDIR}) - set(LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}) - set(RUNTIME_DIR ${CMAKE_INSTALL_BINDIR}) -else() - set(ARCHIVE_DIR lib${LIB_SUFFIX}) - set(LIBRARY_DIR lib${LIB_SUFFIX}) - set(RUNTIME_DIR bin) -endif() - macro(lapack_install_library lib) install(TARGETS ${lib} EXPORT ${LAPACK_INSTALL_EXPORT_NAME} - ARCHIVE DESTINATION ${ARCHIVE_DIR} - LIBRARY DESTINATION ${LIBRARY_DIR} - RUNTIME DESTINATION ${RUNTIME_DIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) endmacro() -set(PKG_CONFIG_DIR ${LIBRARY_DIR}/pkgconfig) -set(prefix ${CMAKE_INSTALL_PREFIX}) -if(NOT IS_ABSOLUTE ${LIBRARY_DIR}) - set(libdir "\${prefix}/${LIBRARY_DIR}") -else() - set(libdir "${LIBRARY_DIR}") -endif() +set(PKG_CONFIG_DIR ${CMAKE_INSTALL_LIBDIR}/pkgconfig) # -------------------------------------------------- # Testing @@ -143,6 +128,12 @@ include(CheckLAPACKCompilerFlags) CheckLAPACKCompilerFlags() +string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_UPPER) +if(${CMAKE_BUILD_TYPE_UPPER} STREQUAL "COVERAGE") + message(STATUS "Adding coverage") + find_package(codecov) +endif() + # -------------------------------------------------- # Check second function @@ -162,17 +153,29 @@ option(BUILD_SHARED_LIBS "Build shared libraries" OFF) option(BUILD_TESTING "Build tests" OFF) +message(STATUS "Build tests: ${BUILD_TESTING}") -# deprecated LAPACK routines +# deprecated LAPACK and LAPACKE routines option(BUILD_DEPRECATED "Build deprecated routines" OFF) +message(STATUS "Build deprecated routines: ${BUILD_DEPRECATED}") # -------------------------------------------------- # 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) +option(BUILD_SINGLE "Build single precision real" ON) +option(BUILD_DOUBLE "Build double precision real" ON) +option(BUILD_COMPLEX "Build single precision complex" ON) +option(BUILD_COMPLEX16 "Build double precision complex" ON) +message(STATUS "Build single precision real: ${BUILD_SINGLE}") +message(STATUS "Build double precision real: ${BUILD_DOUBLE}") +message(STATUS "Build single precision complex: ${BUILD_COMPLEX}") +message(STATUS "Build double precision complex: ${BUILD_COMPLEX16}") + +if(NOT (BUILD_SINGLE OR BUILD_DOUBLE OR BUILD_COMPLEX OR BUILD_COMPLEX16)) + message(FATAL_ERROR "Nothing to build, no precision selected. + Please enable at least one of these: + BUILD_SINGLE, BUILD_DOUBLE, BUILD_COMPLEX, BUILD_COMPLEX16.") +endif() # -------------------------------------------------- # Subdirectories that need to be processed @@ -275,7 +278,6 @@ CACHE STRING "Linker flags for shared libs" FORCE) endif() -message(STATUS "BUILD TESTING : ${BUILD_TESTING}") if(BUILD_TESTING) add_subdirectory(TESTING) endif() @@ -346,7 +348,7 @@ set(_lapack_config_install_guard_target "") if(ALL_TARGETS) install(EXPORT lapack-targets - DESTINATION ${LIBRARY_DIR}/cmake/lapack-${LAPACK_VERSION}) + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/lapack-${LAPACK_VERSION}) # Choose one of the lapack targets to use as a guard for # lapack-config.cmake to load targets from the install tree. @@ -396,5 +398,5 @@ install(FILES ${LAPACK_BINARY_DIR}/CMakeFiles/lapack-config.cmake ${LAPACK_BINARY_DIR}/lapack-config-version.cmake - DESTINATION ${LIBRARY_DIR}/cmake/lapack-${LAPACK_VERSION} + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/lapack-${LAPACK_VERSION} ) diff -Nru lapack-3.7.0/debian/changelog lapack-3.7.1/debian/changelog --- lapack-3.7.0/debian/changelog 2017-05-24 14:24:37.000000000 +0000 +++ lapack-3.7.1/debian/changelog 2017-07-04 13:48:07.000000000 +0000 @@ -1,3 +1,33 @@ +lapack (3.7.1-1) unstable; urgency=medium + + * New upstream version 3.7.1 + * d/copyright: + + Reflect upstream changes. + + Use secure URL for format. + * d/p/test-numbering.patch: drop patch, applied upstream. + * d/p/fix-typos.patch: former patch applied upstream, but new typos detected + by lintian, so update the patch. + * Drop stub files in manpages and HTML documentation. + - d/p/doxygen-downsize.patch: new patch, disable EXTRACT_ALL in Doxygen. + - d/p/doxygen-strips-source.patch: drop patch, merge with the former. + (Closes: #852166) + * Drop transitional package libblas-doc. + * Merge liblapack-doc-man into liblapack-doc. + Now that both packages are smaller, it makes sense to merge them. + liblapack-doc-man is now a transitional package. + * Ship README.md in liblapack-doc. + * d/watch: bump to format version 4. + * d/rules: add support for "nodoc" tag of DEB_BUILD_OPTIONS. + * d/control: + + Use canonical URL for Vcs-Browser. + + Remove unnecessary versioned build-dep on dpkg-dev. + + Use the new Build-Depends-Arch field. + + Bump to Standards-Version 4.0.0. + + Drop obsolete Breaks against liblapack3gf. + + Mark liblapack-doc{,-man} as M-A foreign. + + -- Sébastien Villemot Tue, 04 Jul 2017 15:48:07 +0200 + lapack (3.7.0-2) unstable; urgency=medium * Fix regression in libblas.a, which was empty since 3.6.1-1. diff -Nru lapack-3.7.0/debian/control lapack-3.7.1/debian/control --- lapack-3.7.0/debian/control 2017-05-24 14:15:44.000000000 +0000 +++ lapack-3.7.1/debian/control 2017-07-04 13:48:07.000000000 +0000 @@ -1,20 +1,23 @@ Source: lapack -Section: libs -Priority: optional Maintainer: Debian Science Team Uploaders: Sébastien Villemot -Build-Depends: debhelper (>= 10), gfortran, python, dpkg-dev (>= 1.16.1~) -Build-Depends-Indep: doxygen, graphviz -Standards-Version: 3.9.8 -Homepage: http://www.netlib.org/lapack/ +Section: libs +Priority: optional +Build-Depends: debhelper (>= 10) +Build-Depends-Arch: gfortran, + python +Build-Depends-Indep: doxygen, + graphviz +Standards-Version: 4.0.0 +Vcs-Browser: https://anonscm.debian.org/cgit/debian-science/packages/lapack.git Vcs-Git: https://anonscm.debian.org/git/debian-science/packages/lapack.git -Vcs-Browser: https://anonscm.debian.org/git/debian-science/packages/lapack.git +Homepage: http://www.netlib.org/lapack/ Package: liblapack3 Architecture: any -Depends: ${misc:Depends}, ${shlibs:Depends} +Depends: ${misc:Depends}, + ${shlibs:Depends} Provides: liblapack.so.3 -Breaks: liblapack3gf Description: Library of linear algebra routines 3 - shared version LAPACK version 3.X is a comprehensive FORTRAN library that does linear algebra operations including matrix inversions, least @@ -27,7 +30,8 @@ Package: liblapacke Architecture: any -Depends: ${misc:Depends}, ${shlibs:Depends} +Depends: ${misc:Depends}, + ${shlibs:Depends} Provides: liblapacke.so.3 Description: Library of linear algebra routines 3 - C lib shared version LAPACK version 3.X is a comprehensive FORTRAN library that does @@ -40,11 +44,14 @@ This package contains the Standard C language library for LAPACK. Package: liblapacke-dev -Section: libdevel Architecture: any -Depends: ${misc:Depends}, liblapacke (= ${binary:Version}), libblas-dev | libblas.so, - liblapack-dev | liblapack.so, libtmglib-dev -Suggests: liblapack-doc-man, liblapack-doc +Section: libdevel +Depends: ${misc:Depends}, + liblapacke (= ${binary:Version}), + libblas-dev | libblas.so, + liblapack-dev | liblapack.so, + libtmglib-dev +Suggests: liblapack-doc Description: Library of linear algebra routines 3 - Headers LAPACK version 3.X is a comprehensive FORTRAN library that does linear algebra operations including matrix inversions, least @@ -58,7 +65,8 @@ Package: libtmglib3 Architecture: any -Depends: ${misc:Depends}, ${shlibs:Depends} +Depends: ${misc:Depends}, + ${shlibs:Depends} Description: test matrix generators of LAPACK - shared version libtmglib is a component of the LAPACK library, containing routines for generation of input matrices for testing and timing of LAPACK. @@ -66,9 +74,11 @@ This package contains a shared version of the library. Package: libtmglib-dev -Section: libdevel Architecture: any -Depends: ${misc:Depends}, libtmglib3 (= ${binary:Version}), libblas-dev | libblas.so, +Section: libdevel +Depends: ${misc:Depends}, + libtmglib3 (= ${binary:Version}), + libblas-dev | libblas.so, liblapack-dev | liblapack.so Description: test matrix generators of LAPACK - development files libtmglib is a component of the LAPACK library, containing routines for @@ -78,12 +88,13 @@ library. Package: liblapack-dev -Section: libdevel Architecture: any -Depends: ${misc:Depends}, liblapack3 (= ${binary:Version}), - libblas-dev | libblas.so +Section: libdevel +Depends: ${misc:Depends}, + liblapack3 (= ${binary:Version}), + libblas-dev | libblas.so +Suggests: liblapack-doc Provides: liblapack.so -Suggests: liblapack-doc-man, liblapack-doc Description: Library of linear algebra routines 3 - static version LAPACK version 3.X is a comprehensive FORTRAN library that does linear algebra operations including matrix inversions, least @@ -95,9 +106,10 @@ This package contains a static version of the library. Package: liblapack-pic -Section: libdevel Architecture: any -Depends: ${misc:Depends}, liblapack3 (= ${binary:Version}) +Section: libdevel +Depends: ${misc:Depends}, + liblapack3 (= ${binary:Version}) Description: Library of linear algebra routines 3 - static PIC version LAPACK version 3.X is a comprehensive FORTRAN library that does linear algebra operations including matrix inversions, least @@ -112,10 +124,11 @@ objects in their own build process. Package: liblapack-test +Architecture: any Section: devel Priority: extra -Architecture: any -Depends: ${misc:Depends}, ${shlibs:Depends} +Depends: ${misc:Depends}, + ${shlibs:Depends} Recommends: python Description: Library of linear algebra routines 3 - testing programs LAPACK version 3.X is a comprehensive FORTRAN library that does @@ -134,26 +147,13 @@ package. Package: liblapack-doc -Section: doc Architecture: all -Depends: ${misc:Depends} -Description: Library of linear algebra routines 3 - documentation (HTML) - LAPACK version 3.X is a comprehensive FORTRAN library that does - linear algebra operations including matrix inversions, least - squared solutions to linear sets of equations, eigenvector - analysis, singular value decomposition, etc. It is a very - comprehensive and reputable package that has found extensive - use in the scientific community. - . - This package contains the Lapack User's Guide manual in HTML format. - -Package: liblapack-doc-man Section: doc -Architecture: all Depends: ${misc:Depends} -Breaks: libblas-doc (<< 3.6.0) -Replaces: libblas-doc (<< 3.6.0) -Description: Library of linear algebra routines 3 - documentation (manual pages) +Breaks: liblapack-doc-man (<< 3.7.1) +Replaces: liblapack-doc-man (<< 3.7.1) +Multi-Arch: foreign +Description: Library of linear algebra routines 3 - documentation LAPACK version 3.X is a comprehensive FORTRAN library that does linear algebra operations including matrix inversions, least squared solutions to linear sets of equations, eigenvector @@ -161,12 +161,17 @@ comprehensive and reputable package that has found extensive use in the scientific community. . - This package contains manpages for all BLAS and LAPACK routines. + This package contains: + - manpages of BLAS and LAPACK routines, + - the Lapack User's Guide manual (in HTML), + - the manual for the LAPACKE C interface to LAPACK (in PDF). Package: libblas3 Architecture: any +Depends: ${shlibs:Depends}, + ${misc:Depends}, + libblas-common Provides: libblas.so.3 -Depends: ${shlibs:Depends}, ${misc:Depends}, libblas-common Description: Basic Linear Algebra Reference implementations, shared library BLAS (Basic Linear Algebra Subroutines) is a set of efficient routines for most of the basic vector and matrix operations. @@ -179,7 +184,8 @@ Package: libblas-common Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} +Depends: ${shlibs:Depends}, + ${misc:Depends} Description: Dependency package for all BLAS implementations The only purpose of this empty package is to ensure multi-arch safety of different BLAS implementations. See bug #760936 for more details. @@ -187,9 +193,11 @@ Package: libblas-dev Architecture: any Section: libdevel +Depends: libblas3 (= ${binary:Version}), + ${misc:Depends}, + gfortran +Suggests: liblapack-doc Provides: libblas.so -Depends: libblas3 (= ${binary:Version}), ${misc:Depends}, gfortran -Suggests: liblapack-doc-man, liblapack-doc Description: Basic Linear Algebra Subroutines 3, static library This package is a binary incompatible upgrade to the blas-dev package. Several minor changes to the C interface have been @@ -208,7 +216,8 @@ Architecture: any Section: devel Priority: extra -Depends: ${shlibs:Depends}, ${misc:Depends} +Depends: ${shlibs:Depends}, + ${misc:Depends} Description: Basic Linear Algebra Subroutines 3, testing programs BLAS (Basic Linear Algebra Subroutines) is a set of efficient routines for most of the basic vector and matrix operations. @@ -226,10 +235,11 @@ environment variables. Likewise, one can display the library selected using the ldd program in an identical environment. -Package: libblas-doc +Package: liblapack-doc-man Architecture: all Section: oldlibs Priority: extra -Depends: ${misc:Depends}, liblapack-doc-man -Description: Transitional package for BLAS manpages +Depends: ${misc:Depends}, liblapack-doc +Multi-Arch: foreign +Description: Transitional package for BLAS and LAPACK manpages This is a transitional dummy package. It can be safely removed. diff -Nru lapack-3.7.0/debian/copyright lapack-3.7.1/debian/copyright --- lapack-3.7.0/debian/copyright 2016-12-29 08:53:09.000000000 +0000 +++ lapack-3.7.1/debian/copyright 2017-07-02 19:36:00.000000000 +0000 @@ -1,16 +1,21 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: LAPACK — Linear Algebra PACKage Upstream-Contact: http://icl.cs.utk.edu/lapack-forum/ Source: http://www.netlib.org/lapack/ Files: * -Copyright: 1992-2016 The University of Tennessee and The University of Tennessee Research Foundation - 2000-2016 The University of California Berkeley - 2006-2016 The University of Colorado Denverf +Copyright: 1992-2017 The University of Tennessee and The University of Tennessee Research Foundation + 2000-2017 The University of California Berkeley + 2006-2017 The University of Colorado Denverf +License: BSD-3-clause + +Files: CMAKE/FindGcov.cmake + CMAKE/Findcodecov.cmake +Copyright: 2015-2016 RWTH Aachen University, Federal Republic of Germany License: BSD-3-clause Files: LAPACKE/* -Copyright: 2010-2015 Intel Corp +Copyright: 2010-2017 Intel Corp License: BSD-3-clause-intel Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -52,7 +57,7 @@ 2010 Laurent Bigonville 2013 Julian Taylor 2008-2013 Sylvestre Ledru - 2012-2016 Sébastien Villemot + 2012-2017 Sébastien Villemot License: BSD-3-clause Redistribution and use in source and binary forms, with or without diff -Nru lapack-3.7.0/debian/libblas-test.install lapack-3.7.1/debian/libblas-test.install --- lapack-3.7.0/debian/libblas-test.install 2015-12-23 18:27:28.000000000 +0000 +++ lapack-3.7.1/debian/libblas-test.install 2017-07-04 13:46:04.000000000 +0000 @@ -1,23 +1,23 @@ -BLAS/xblat1c /usr/lib/libblas/ -BLAS/xblat2c /usr/lib/libblas/ -BLAS/xblat3c /usr/lib/libblas/ -BLAS/xblat1d /usr/lib/libblas/ -BLAS/xblat2d /usr/lib/libblas/ -BLAS/xblat3d /usr/lib/libblas/ -BLAS/xblat1s /usr/lib/libblas/ -BLAS/xblat2s /usr/lib/libblas/ -BLAS/xblat3s /usr/lib/libblas/ -BLAS/xblat1z /usr/lib/libblas/ -BLAS/xblat2z /usr/lib/libblas/ -BLAS/xblat3z /usr/lib/libblas/ -BLAS/cblat2.in /usr/lib/libblas/ -BLAS/cblat3.in /usr/lib/libblas/ -BLAS/dblat2.in /usr/lib/libblas/ -BLAS/dblat3.in /usr/lib/libblas/ -BLAS/sblat2.in /usr/lib/libblas/ -BLAS/sblat3.in /usr/lib/libblas/ -BLAS/zblat2.in /usr/lib/libblas/ -BLAS/zblat3.in /usr/lib/libblas/ +BLAS/TESTING/xblat1c /usr/lib/libblas/ +BLAS/TESTING/xblat2c /usr/lib/libblas/ +BLAS/TESTING/xblat3c /usr/lib/libblas/ +BLAS/TESTING/xblat1d /usr/lib/libblas/ +BLAS/TESTING/xblat2d /usr/lib/libblas/ +BLAS/TESTING/xblat3d /usr/lib/libblas/ +BLAS/TESTING/xblat1s /usr/lib/libblas/ +BLAS/TESTING/xblat2s /usr/lib/libblas/ +BLAS/TESTING/xblat3s /usr/lib/libblas/ +BLAS/TESTING/xblat1z /usr/lib/libblas/ +BLAS/TESTING/xblat2z /usr/lib/libblas/ +BLAS/TESTING/xblat3z /usr/lib/libblas/ +BLAS/TESTING/cblat2.in /usr/lib/libblas/ +BLAS/TESTING/cblat3.in /usr/lib/libblas/ +BLAS/TESTING/dblat2.in /usr/lib/libblas/ +BLAS/TESTING/dblat3.in /usr/lib/libblas/ +BLAS/TESTING/sblat2.in /usr/lib/libblas/ +BLAS/TESTING/sblat3.in /usr/lib/libblas/ +BLAS/TESTING/zblat2.in /usr/lib/libblas/ +BLAS/TESTING/zblat3.in /usr/lib/libblas/ CBLAS/testing/xccblat1 /usr/lib/libblas/ CBLAS/testing/xccblat2 /usr/lib/libblas/ CBLAS/testing/xccblat3 /usr/lib/libblas/ diff -Nru lapack-3.7.0/debian/liblapack3.docs lapack-3.7.1/debian/liblapack3.docs --- lapack-3.7.0/debian/liblapack3.docs 2016-06-26 12:07:10.000000000 +0000 +++ lapack-3.7.1/debian/liblapack3.docs 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -README diff -Nru lapack-3.7.0/debian/liblapack-doc.docs lapack-3.7.1/debian/liblapack-doc.docs --- lapack-3.7.0/debian/liblapack-doc.docs 2013-11-21 19:40:54.000000000 +0000 +++ lapack-3.7.1/debian/liblapack-doc.docs 2017-07-04 13:46:14.000000000 +0000 @@ -1,2 +1,3 @@ DOCS/explore-html/ DOCS/lapacke.pdf +README.md diff -Nru lapack-3.7.0/debian/liblapack-doc.lintian-overrides lapack-3.7.1/debian/liblapack-doc.lintian-overrides --- lapack-3.7.0/debian/liblapack-doc.lintian-overrides 2016-01-02 22:16:03.000000000 +0000 +++ lapack-3.7.1/debian/liblapack-doc.lintian-overrides 2017-07-04 13:46:14.000000000 +0000 @@ -1,2 +1,4 @@ # Using the jquery.js from libjs-jquery instead of the Doxygen-generated breaks the HTML doc embedded-javascript-library usr/share/doc/liblapack-doc/explore-html/jquery.js please use libjs-jquery +# Upstream does not provide a meaningful brief description of functions +manpage-has-bad-whatis-entry * diff -Nru lapack-3.7.0/debian/liblapack-doc-man.lintian-overrides lapack-3.7.1/debian/liblapack-doc-man.lintian-overrides --- lapack-3.7.0/debian/liblapack-doc-man.lintian-overrides 2013-09-14 15:28:27.000000000 +0000 +++ lapack-3.7.1/debian/liblapack-doc-man.lintian-overrides 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -# Upstream does not provide a meaningful brief description of functions -manpage-has-bad-whatis-entry * diff -Nru lapack-3.7.0/debian/liblapack-doc-man.manpages lapack-3.7.1/debian/liblapack-doc-man.manpages --- lapack-3.7.0/debian/liblapack-doc-man.manpages 2013-09-14 15:27:26.000000000 +0000 +++ lapack-3.7.1/debian/liblapack-doc-man.manpages 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -DOCS/man/man3/* \ No newline at end of file diff -Nru lapack-3.7.0/debian/liblapack-doc.manpages lapack-3.7.1/debian/liblapack-doc.manpages --- lapack-3.7.0/debian/liblapack-doc.manpages 1970-01-01 00:00:00.000000000 +0000 +++ lapack-3.7.1/debian/liblapack-doc.manpages 2017-07-04 13:46:14.000000000 +0000 @@ -0,0 +1 @@ +DOCS/man/man3/* \ No newline at end of file diff -Nru lapack-3.7.0/debian/liblapack-pic.install lapack-3.7.1/debian/liblapack-pic.install --- lapack-3.7.0/debian/liblapack-pic.install 2017-05-24 14:15:44.000000000 +0000 +++ lapack-3.7.1/debian/liblapack-pic.install 2017-07-04 13:46:04.000000000 +0000 @@ -1 +1 @@ -liblapack_pic.a usr/lib/lapack/ +pic/liblapack_pic.a usr/lib/lapack/ diff -Nru lapack-3.7.0/debian/liblapack-test.install lapack-3.7.1/debian/liblapack-test.install --- lapack-3.7.0/debian/liblapack-test.install 2016-01-06 10:18:59.000000000 +0000 +++ lapack-3.7.1/debian/liblapack-test.install 2017-07-04 13:46:04.000000000 +0000 @@ -1,16 +1,16 @@ TESTING/*.in usr/lib/lapack/ -TESTING/xeigtstc usr/lib/lapack/ -TESTING/xeigtstd usr/lib/lapack/ -TESTING/xeigtsts usr/lib/lapack/ -TESTING/xeigtstz usr/lib/lapack/ -TESTING/xlintstc usr/lib/lapack/ -TESTING/xlintstd usr/lib/lapack/ -TESTING/xlintsts usr/lib/lapack/ -TESTING/xlintstz usr/lib/lapack/ -TESTING/xlintstds usr/lib/lapack/ -TESTING/xlintstrfc usr/lib/lapack/ -TESTING/xlintstrfd usr/lib/lapack/ -TESTING/xlintstrfs usr/lib/lapack/ -TESTING/xlintstrfz usr/lib/lapack/ -TESTING/xlintstzc usr/lib/lapack/ +TESTING/EIG/xeigtstc usr/lib/lapack/ +TESTING/EIG/xeigtstd usr/lib/lapack/ +TESTING/EIG/xeigtsts usr/lib/lapack/ +TESTING/EIG/xeigtstz usr/lib/lapack/ +TESTING/LIN/xlintstc usr/lib/lapack/ +TESTING/LIN/xlintstd usr/lib/lapack/ +TESTING/LIN/xlintsts usr/lib/lapack/ +TESTING/LIN/xlintstz usr/lib/lapack/ +TESTING/LIN/xlintstds usr/lib/lapack/ +TESTING/LIN/xlintstrfc usr/lib/lapack/ +TESTING/LIN/xlintstrfd usr/lib/lapack/ +TESTING/LIN/xlintstrfs usr/lib/lapack/ +TESTING/LIN/xlintstrfz usr/lib/lapack/ +TESTING/LIN/xlintstzc usr/lib/lapack/ lapack_testing.py usr/lib/lapack/ diff -Nru lapack-3.7.0/debian/patches/doxygen-downsize.patch lapack-3.7.1/debian/patches/doxygen-downsize.patch --- lapack-3.7.0/debian/patches/doxygen-downsize.patch 1970-01-01 00:00:00.000000000 +0000 +++ lapack-3.7.1/debian/patches/doxygen-downsize.patch 2017-07-04 13:46:14.000000000 +0000 @@ -0,0 +1,77 @@ +Description: Downsize documentation (HTML and manpages) + - Set EXTRACT_ALL=no, to avoid generating tons of files containing only doc + stubs. + - Do not include verbatim source code in Doxygen output (redundant with the + source package). + - Drop the call graphs. +Author: Sébastien Villemot +Bug-Debian: https://bugs.debian.org/852166 +Forwarded: not-needed +Last-Update: 2017-07-04 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/DOCS/Doxyfile ++++ b/DOCS/Doxyfile +@@ -416,7 +416,7 @@ LOOKUP_CACHE_SIZE = 0 + # normally produced when WARNINGS is set to YES. + # The default value is: NO. + +-EXTRACT_ALL = YES ++EXTRACT_ALL = NO + + # If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will + # be included in the documentation. +@@ -953,13 +953,13 @@ USE_MDFILE_AS_MAINPAGE = + # also VERBATIM_HEADERS is set to NO. + # The default value is: NO. + +-SOURCE_BROWSER = YES ++SOURCE_BROWSER = NO + + # Setting the INLINE_SOURCES tag to YES will include the body of functions, + # classes and enums directly into the documentation. + # The default value is: NO. + +-INLINE_SOURCES = YES ++INLINE_SOURCES = NO + + # Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any + # special comment blocks from generated source code fragments. Normal C, C++ and +@@ -2281,7 +2281,7 @@ INCLUDED_BY_GRAPH = YES + # The default value is: NO. + # This tag requires that the tag HAVE_DOT is set to YES. + +-CALL_GRAPH = YES ++CALL_GRAPH = NO + + # If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller + # dependency graph for every global function or class method. +@@ -2293,7 +2293,7 @@ CALL_GRAPH = YES + # The default value is: NO. + # This tag requires that the tag HAVE_DOT is set to YES. + +-CALLER_GRAPH = YES ++CALLER_GRAPH = NO + + # If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical + # hierarchy of all classes instead of a textual one. +--- a/DOCS/Doxyfile_man ++++ b/DOCS/Doxyfile_man +@@ -416,7 +416,7 @@ LOOKUP_CACHE_SIZE = 0 + # normally produced when WARNINGS is set to YES. + # The default value is: NO. + +-EXTRACT_ALL = YES ++EXTRACT_ALL = NO + + # If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will + # be included in the documentation. +@@ -933,7 +933,7 @@ USE_MDFILE_AS_MAINPAGE = + # also VERBATIM_HEADERS is set to NO. + # The default value is: NO. + +-SOURCE_BROWSER = YES ++SOURCE_BROWSER = NO + + # Setting the INLINE_SOURCES tag to YES will include the body of functions, + # classes and enums directly into the documentation. diff -Nru lapack-3.7.0/debian/patches/doxygen-strip-source.patch lapack-3.7.1/debian/patches/doxygen-strip-source.patch --- lapack-3.7.0/debian/patches/doxygen-strip-source.patch 2016-12-29 11:59:39.000000000 +0000 +++ lapack-3.7.1/debian/patches/doxygen-strip-source.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,55 +0,0 @@ -Description: Do not include verbatim source code in Doxygen output - This takes a lot of space, and is redundant with the source package. - Also drop the call graphs. -Author: Sébastien Villemot -Forwarded: not-needed -Last-Update: 2016-01-02 ---- -This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ ---- a/DOCS/Doxyfile -+++ b/DOCS/Doxyfile -@@ -953,13 +953,13 @@ USE_MDFILE_AS_MAINPAGE = - # also VERBATIM_HEADERS is set to NO. - # The default value is: NO. - --SOURCE_BROWSER = YES -+SOURCE_BROWSER = NO - - # Setting the INLINE_SOURCES tag to YES will include the body of functions, - # classes and enums directly into the documentation. - # The default value is: NO. - --INLINE_SOURCES = YES -+INLINE_SOURCES = NO - - # Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any - # special comment blocks from generated source code fragments. Normal C, C++ and -@@ -2281,7 +2281,7 @@ INCLUDED_BY_GRAPH = YES - # The default value is: NO. - # This tag requires that the tag HAVE_DOT is set to YES. - --CALL_GRAPH = YES -+CALL_GRAPH = NO - - # If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller - # dependency graph for every global function or class method. -@@ -2293,7 +2293,7 @@ CALL_GRAPH = YES - # The default value is: NO. - # This tag requires that the tag HAVE_DOT is set to YES. - --CALLER_GRAPH = YES -+CALLER_GRAPH = NO - - # If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical - # hierarchy of all classes instead of a textual one. ---- a/DOCS/Doxyfile_man -+++ b/DOCS/Doxyfile_man -@@ -933,7 +933,7 @@ USE_MDFILE_AS_MAINPAGE = - # also VERBATIM_HEADERS is set to NO. - # The default value is: NO. - --SOURCE_BROWSER = YES -+SOURCE_BROWSER = NO - - # Setting the INLINE_SOURCES tag to YES will include the body of functions, - # classes and enums directly into the documentation. diff -Nru lapack-3.7.0/debian/patches/fix-typos.patch lapack-3.7.1/debian/patches/fix-typos.patch --- lapack-3.7.0/debian/patches/fix-typos.patch 2016-12-29 20:31:55.000000000 +0000 +++ lapack-3.7.1/debian/patches/fix-typos.patch 2017-07-04 13:48:07.000000000 +0000 @@ -1,478 +1,28 @@ Description: Fix various typos Author: Sébastien Villemot -Forwarded: https://github.com/Reference-LAPACK/lapack/pull/104 -Applied-Upstream: https://github.com/Reference-LAPACK/lapack/commit/c77258510e861765109d99270f54fecd583a0301 -Last-Update: 2016-12-29 +Forwarded: https://github.com/Reference-LAPACK/lapack/pull/174 +Last-Update: 2017-07-04 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ ---- a/SRC/dlarrb.f -+++ b/SRC/dlarrb.f -@@ -107,7 +107,7 @@ - *> \verbatim - *> W is DOUBLE PRECISION array, dimension (N) - *> On input, W( IFIRST-OFFSET ) through W( ILAST-OFFSET ) are --*> estimates of the eigenvalues of L D L^T indexed IFIRST throug -+*> estimates of the eigenvalues of L D L^T indexed IFIRST through - *> ILAST. - *> On output, these estimates are refined. - *> \endverbatim ---- a/SRC/slarrb.f -+++ b/SRC/slarrb.f -@@ -107,7 +107,7 @@ - *> \verbatim - *> W is REAL array, dimension (N) - *> On input, W( IFIRST-OFFSET ) through W( ILAST-OFFSET ) are --*> estimates of the eigenvalues of L D L^T indexed IFIRST throug -+*> estimates of the eigenvalues of L D L^T indexed IFIRST through - *> ILAST. - *> On output, these estimates are refined. - *> \endverbatim ---- a/SRC/zgejsv.f -+++ b/SRC/zgejsv.f -@@ -339,7 +339,7 @@ - *> the minimal requirement is LWORK >= 5*N+2*N*N. - *> 4.2. if JOBV.EQ.'J' the minimal requirement is - *> LWORK >= 4*N+N*N. --*> In both cases, the allocated CWORK can accomodate blocked runs -+*> In both cases, the allocated CWORK can accommodate blocked runs - *> of ZGEQP3, ZGEQRF, ZGELQF, SUNMQR, ZUNMLQ. - *> - *> If the call to ZGEJSV is a workspace query (indicated by LWORK=-1 or -@@ -423,7 +423,7 @@ - *> then LRWORK = max( 7, 2 * M ). - *> 4.2. Otherwise, LRWORK = max( 7, N ). - *> --*> If, on entry, LRWORK = -1 ot LWORK=-1, a workspace query is assumed and -+*> If, on entry, LRWORK = -1 or LWORK=-1, a workspace query is assumed and - *> the length of RWORK is returned in RWORK(1). - *> \endverbatim - *> ---- a/SRC/cgejsv.f -+++ b/SRC/cgejsv.f -@@ -424,7 +424,7 @@ - *> then LRWORK = max( 7, 2 * M ). - *> 4.2. Otherwise, LRWORK = max( 7, N ). - *> --*> If, on entry, LRWORK = -1 ot LWORK=-1, a workspace query is assumed and -+*> If, on entry, LRWORK = -1 or LWORK=-1, a workspace query is assumed and - *> the length of RWORK is returned in RWORK(1). - *> \endverbatim - *> ---- a/SRC/checon_3.f -+++ b/SRC/checon_3.f -@@ -95,7 +95,7 @@ - *> On entry, contains the superdiagonal (or subdiagonal) - *> elements of the Hermitian block diagonal matrix D - *> with 1-by-1 or 2-by-2 diagonal blocks, where --*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; -+*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; - *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. - *> - *> NOTE: For 1-by-1 diagonal block D(k), where ---- a/SRC/chetri_3.f -+++ b/SRC/chetri_3.f -@@ -102,7 +102,7 @@ - *> On entry, contains the superdiagonal (or subdiagonal) - *> elements of the Hermitian block diagonal matrix D - *> with 1-by-1 or 2-by-2 diagonal blocks, where --*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; -+*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; - *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. - *> - *> NOTE: For 1-by-1 diagonal block D(k), where ---- a/SRC/chetri_3x.f -+++ b/SRC/chetri_3x.f -@@ -99,7 +99,7 @@ - *> On entry, contains the superdiagonal (or subdiagonal) - *> elements of the Hermitian block diagonal matrix D - *> with 1-by-1 or 2-by-2 diagonal blocks, where --*> If UPLO = 'U': E(i) = D(i-1,i), i=2:N, E(1) not refernced; -+*> If UPLO = 'U': E(i) = D(i-1,i), i=2:N, E(1) not referenced; - *> If UPLO = 'L': E(i) = D(i+1,i), i=1:N-1, E(N) not referenced. - *> - *> NOTE: For 1-by-1 diagonal block D(k), where ---- a/SRC/chetrs_3.f -+++ b/SRC/chetrs_3.f -@@ -99,7 +99,7 @@ - *> On entry, contains the superdiagonal (or subdiagonal) - *> elements of the Hermitian block diagonal matrix D - *> with 1-by-1 or 2-by-2 diagonal blocks, where --*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; -+*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; - *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. - *> - *> NOTE: For 1-by-1 diagonal block D(k), where ---- a/SRC/csycon_3.f -+++ b/SRC/csycon_3.f -@@ -95,7 +95,7 @@ - *> On entry, contains the superdiagonal (or subdiagonal) - *> elements of the symmetric block diagonal matrix D - *> with 1-by-1 or 2-by-2 diagonal blocks, where --*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; -+*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; - *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. - *> - *> NOTE: For 1-by-1 diagonal block D(k), where ---- a/SRC/csytri_3.f -+++ b/SRC/csytri_3.f -@@ -102,7 +102,7 @@ - *> On entry, contains the superdiagonal (or subdiagonal) - *> elements of the symmetric block diagonal matrix D - *> with 1-by-1 or 2-by-2 diagonal blocks, where --*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; -+*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; - *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. - *> - *> NOTE: For 1-by-1 diagonal block D(k), where ---- a/SRC/csytri_3x.f -+++ b/SRC/csytri_3x.f -@@ -99,7 +99,7 @@ - *> On entry, contains the superdiagonal (or subdiagonal) - *> elements of the symmetric block diagonal matrix D - *> with 1-by-1 or 2-by-2 diagonal blocks, where --*> If UPLO = 'U': E(i) = D(i-1,i), i=2:N, E(1) not refernced; -+*> If UPLO = 'U': E(i) = D(i-1,i), i=2:N, E(1) not referenced; - *> If UPLO = 'L': E(i) = D(i+1,i), i=1:N-1, E(N) not referenced. - *> - *> NOTE: For 1-by-1 diagonal block D(k), where ---- a/SRC/csytrs_3.f -+++ b/SRC/csytrs_3.f -@@ -99,7 +99,7 @@ - *> On entry, contains the superdiagonal (or subdiagonal) - *> elements of the symmetric block diagonal matrix D - *> with 1-by-1 or 2-by-2 diagonal blocks, where --*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; -+*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; - *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. - *> - *> NOTE: For 1-by-1 diagonal block D(k), where ---- a/SRC/dsycon_3.f -+++ b/SRC/dsycon_3.f -@@ -95,7 +95,7 @@ - *> On entry, contains the superdiagonal (or subdiagonal) - *> elements of the symmetric block diagonal matrix D - *> with 1-by-1 or 2-by-2 diagonal blocks, where --*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; -+*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; - *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. - *> - *> NOTE: For 1-by-1 diagonal block D(k), where ---- a/SRC/dsytri_3.f -+++ b/SRC/dsytri_3.f -@@ -102,7 +102,7 @@ - *> On entry, contains the superdiagonal (or subdiagonal) - *> elements of the symmetric block diagonal matrix D - *> with 1-by-1 or 2-by-2 diagonal blocks, where --*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; -+*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; - *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. - *> - *> NOTE: For 1-by-1 diagonal block D(k), where ---- a/SRC/dsytri_3x.f -+++ b/SRC/dsytri_3x.f -@@ -99,7 +99,7 @@ - *> On entry, contains the superdiagonal (or subdiagonal) - *> elements of the symmetric block diagonal matrix D - *> with 1-by-1 or 2-by-2 diagonal blocks, where --*> If UPLO = 'U': E(i) = D(i-1,i), i=2:N, E(1) not refernced; -+*> If UPLO = 'U': E(i) = D(i-1,i), i=2:N, E(1) not referenced; - *> If UPLO = 'L': E(i) = D(i+1,i), i=1:N-1, E(N) not referenced. - *> - *> NOTE: For 1-by-1 diagonal block D(k), where ---- a/SRC/dsytrs_3.f -+++ b/SRC/dsytrs_3.f -@@ -99,7 +99,7 @@ - *> On entry, contains the superdiagonal (or subdiagonal) - *> elements of the symmetric block diagonal matrix D - *> with 1-by-1 or 2-by-2 diagonal blocks, where --*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; -+*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; - *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. - *> - *> NOTE: For 1-by-1 diagonal block D(k), where ---- a/SRC/ssycon_3.f -+++ b/SRC/ssycon_3.f -@@ -95,7 +95,7 @@ - *> On entry, contains the superdiagonal (or subdiagonal) - *> elements of the symmetric block diagonal matrix D - *> with 1-by-1 or 2-by-2 diagonal blocks, where --*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; -+*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; - *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. - *> - *> NOTE: For 1-by-1 diagonal block D(k), where ---- a/SRC/ssytri_3.f -+++ b/SRC/ssytri_3.f -@@ -102,7 +102,7 @@ - *> On entry, contains the superdiagonal (or subdiagonal) - *> elements of the symmetric block diagonal matrix D - *> with 1-by-1 or 2-by-2 diagonal blocks, where --*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; -+*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; - *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. - *> - *> NOTE: For 1-by-1 diagonal block D(k), where ---- a/SRC/ssytri_3x.f -+++ b/SRC/ssytri_3x.f -@@ -99,7 +99,7 @@ - *> On entry, contains the superdiagonal (or subdiagonal) - *> elements of the symmetric block diagonal matrix D - *> with 1-by-1 or 2-by-2 diagonal blocks, where --*> If UPLO = 'U': E(i) = D(i-1,i), i=2:N, E(1) not refernced; -+*> If UPLO = 'U': E(i) = D(i-1,i), i=2:N, E(1) not referenced; - *> If UPLO = 'L': E(i) = D(i+1,i), i=1:N-1, E(N) not referenced. - *> - *> NOTE: For 1-by-1 diagonal block D(k), where ---- a/SRC/ssytrs_3.f -+++ b/SRC/ssytrs_3.f -@@ -99,7 +99,7 @@ - *> On entry, contains the superdiagonal (or subdiagonal) - *> elements of the symmetric block diagonal matrix D - *> with 1-by-1 or 2-by-2 diagonal blocks, where --*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; -+*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; - *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. - *> - *> NOTE: For 1-by-1 diagonal block D(k), where ---- a/SRC/zhecon_3.f -+++ b/SRC/zhecon_3.f -@@ -95,7 +95,7 @@ - *> On entry, contains the superdiagonal (or subdiagonal) - *> elements of the Hermitian block diagonal matrix D - *> with 1-by-1 or 2-by-2 diagonal blocks, where --*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; -+*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; - *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. - *> - *> NOTE: For 1-by-1 diagonal block D(k), where ---- a/SRC/zhetri_3.f -+++ b/SRC/zhetri_3.f -@@ -102,7 +102,7 @@ - *> On entry, contains the superdiagonal (or subdiagonal) - *> elements of the Hermitian block diagonal matrix D - *> with 1-by-1 or 2-by-2 diagonal blocks, where --*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; -+*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; - *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. - *> - *> NOTE: For 1-by-1 diagonal block D(k), where ---- a/SRC/zhetri_3x.f -+++ b/SRC/zhetri_3x.f -@@ -99,7 +99,7 @@ - *> On entry, contains the superdiagonal (or subdiagonal) - *> elements of the Hermitian block diagonal matrix D - *> with 1-by-1 or 2-by-2 diagonal blocks, where --*> If UPLO = 'U': E(i) = D(i-1,i), i=2:N, E(1) not refernced; -+*> If UPLO = 'U': E(i) = D(i-1,i), i=2:N, E(1) not referenced; - *> If UPLO = 'L': E(i) = D(i+1,i), i=1:N-1, E(N) not referenced. - *> - *> NOTE: For 1-by-1 diagonal block D(k), where ---- a/SRC/zhetrs_3.f -+++ b/SRC/zhetrs_3.f -@@ -99,7 +99,7 @@ - *> On entry, contains the superdiagonal (or subdiagonal) - *> elements of the Hermitian block diagonal matrix D - *> with 1-by-1 or 2-by-2 diagonal blocks, where --*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; -+*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; - *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. - *> - *> NOTE: For 1-by-1 diagonal block D(k), where ---- a/SRC/zsycon_3.f -+++ b/SRC/zsycon_3.f -@@ -95,7 +95,7 @@ - *> On entry, contains the superdiagonal (or subdiagonal) - *> elements of the symmetric block diagonal matrix D - *> with 1-by-1 or 2-by-2 diagonal blocks, where --*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; -+*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; - *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. - *> - *> NOTE: For 1-by-1 diagonal block D(k), where ---- a/SRC/zsytri_3.f -+++ b/SRC/zsytri_3.f -@@ -102,7 +102,7 @@ - *> On entry, contains the superdiagonal (or subdiagonal) - *> elements of the symmetric block diagonal matrix D - *> with 1-by-1 or 2-by-2 diagonal blocks, where --*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; -+*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; - *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. - *> - *> NOTE: For 1-by-1 diagonal block D(k), where ---- a/SRC/zsytri_3x.f -+++ b/SRC/zsytri_3x.f -@@ -99,7 +99,7 @@ - *> On entry, contains the superdiagonal (or subdiagonal) - *> elements of the symmetric block diagonal matrix D - *> with 1-by-1 or 2-by-2 diagonal blocks, where --*> If UPLO = 'U': E(i) = D(i-1,i), i=2:N, E(1) not refernced; -+*> If UPLO = 'U': E(i) = D(i-1,i), i=2:N, E(1) not referenced; - *> If UPLO = 'L': E(i) = D(i+1,i), i=1:N-1, E(N) not referenced. - *> - *> NOTE: For 1-by-1 diagonal block D(k), where ---- a/SRC/zsytrs_3.f -+++ b/SRC/zsytrs_3.f -@@ -99,7 +99,7 @@ - *> On entry, contains the superdiagonal (or subdiagonal) - *> elements of the symmetric block diagonal matrix D - *> with 1-by-1 or 2-by-2 diagonal blocks, where --*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; -+*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; - *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. - *> - *> NOTE: For 1-by-1 diagonal block D(k), where ---- a/TESTING/LIN/chet01_3.f -+++ b/TESTING/LIN/chet01_3.f -@@ -92,7 +92,7 @@ - *> On entry, contains the superdiagonal (or subdiagonal) - *> elements of the Hermitian block diagonal matrix D - *> with 1-by-1 or 2-by-2 diagonal blocks, where --*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; -+*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; - *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. - *> \endverbatim - *> ---- a/TESTING/LIN/csyt01_3.f -+++ b/TESTING/LIN/csyt01_3.f -@@ -92,7 +92,7 @@ - *> On entry, contains the superdiagonal (or subdiagonal) - *> elements of the symmetric block diagonal matrix D - *> with 1-by-1 or 2-by-2 diagonal blocks, where --*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; -+*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; - *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. - *> \endverbatim - *> ---- a/TESTING/LIN/dsyt01_3.f -+++ b/TESTING/LIN/dsyt01_3.f -@@ -91,7 +91,7 @@ - *> On entry, contains the superdiagonal (or subdiagonal) - *> elements of the symmetric block diagonal matrix D - *> with 1-by-1 or 2-by-2 diagonal blocks, where --*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; -+*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; - *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. - *> \endverbatim - *> ---- a/TESTING/LIN/ssyt01_3.f -+++ b/TESTING/LIN/ssyt01_3.f -@@ -91,7 +91,7 @@ - *> On entry, contains the superdiagonal (or subdiagonal) - *> elements of the symmetric block diagonal matrix D - *> with 1-by-1 or 2-by-2 diagonal blocks, where --*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; -+*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; - *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. - *> \endverbatim - *> ---- a/TESTING/LIN/zhet01_3.f -+++ b/TESTING/LIN/zhet01_3.f -@@ -92,7 +92,7 @@ - *> On entry, contains the superdiagonal (or subdiagonal) - *> elements of the Hermitian block diagonal matrix D - *> with 1-by-1 or 2-by-2 diagonal blocks, where --*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; -+*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; - *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. - *> \endverbatim - *> ---- a/TESTING/LIN/zsyt01_3.f -+++ b/TESTING/LIN/zsyt01_3.f -@@ -92,7 +92,7 @@ - *> On entry, contains the superdiagonal (or subdiagonal) - *> elements of the symmetric block diagonal matrix D - *> with 1-by-1 or 2-by-2 diagonal blocks, where --*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; -+*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; - *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. - *> \endverbatim - *> ---- a/SRC/csyconvf.f -+++ b/SRC/csyconvf.f -@@ -45,7 +45,7 @@ - *> If parameter WAY = 'R': - *> CSYCONVF performs the conversion in reverse direction, i.e. - *> converts the factorization output format used in CSYTRF_RK --*> (or CSYTRF_BK) provided on entry in parametes A and E into -+*> (or CSYTRF_BK) provided on entry in parameters A and E into - *> the factorization output format used in CSYTRF that is stored - *> on exit in parameter A. It also coverts in place details of - *> the intechanges stored in IPIV from the format used in CSYTRF_RK ---- a/SRC/csyconvf_rook.f -+++ b/SRC/csyconvf_rook.f -@@ -44,7 +44,7 @@ - *> If parameter WAY = 'R': - *> CSYCONVF_ROOK performs the conversion in reverse direction, i.e. - *> converts the factorization output format used in CSYTRF_RK --*> (or CSYTRF_BK) provided on entry in parametes A and E into -+*> (or CSYTRF_BK) provided on entry in parameters A and E into - *> the factorization output format used in CSYTRF_ROOK that is stored - *> on exit in parameter A. IPIV format for CSYTRF_ROOK and - *> CSYTRF_RK (or CSYTRF_BK) is the same and is not converted. ---- a/SRC/dsyconvf.f -+++ b/SRC/dsyconvf.f -@@ -45,7 +45,7 @@ - *> If parameter WAY = 'R': - *> DSYCONVF performs the conversion in reverse direction, i.e. - *> converts the factorization output format used in DSYTRF_RK --*> (or DSYTRF_BK) provided on entry in parametes A and E into -+*> (or DSYTRF_BK) provided on entry in parameters A and E into - *> the factorization output format used in DSYTRF that is stored - *> on exit in parameter A. It also coverts in place details of - *> the intechanges stored in IPIV from the format used in DSYTRF_RK ---- a/SRC/dsyconvf_rook.f -+++ b/SRC/dsyconvf_rook.f -@@ -44,7 +44,7 @@ - *> If parameter WAY = 'R': - *> DSYCONVF_ROOK performs the conversion in reverse direction, i.e. - *> converts the factorization output format used in DSYTRF_RK --*> (or DSYTRF_BK) provided on entry in parametes A and E into -+*> (or DSYTRF_BK) provided on entry in parameters A and E into - *> the factorization output format used in DSYTRF_ROOK that is stored - *> on exit in parameter A. IPIV format for DSYTRF_ROOK and - *> DSYTRF_RK (or DSYTRF_BK) is the same and is not converted. ---- a/SRC/ssyconvf.f -+++ b/SRC/ssyconvf.f -@@ -45,7 +45,7 @@ - *> If parameter WAY = 'R': - *> SSYCONVF performs the conversion in reverse direction, i.e. - *> converts the factorization output format used in SSYTRF_RK --*> (or SSYTRF_BK) provided on entry in parametes A and E into -+*> (or SSYTRF_BK) provided on entry in parameters A and E into - *> the factorization output format used in SSYTRF that is stored - *> on exit in parameter A. It also coverts in place details of - *> the intechanges stored in IPIV from the format used in SSYTRF_RK ---- a/SRC/ssyconvf_rook.f -+++ b/SRC/ssyconvf_rook.f -@@ -44,7 +44,7 @@ - *> If parameter WAY = 'R': - *> SSYCONVF_ROOK performs the conversion in reverse direction, i.e. - *> converts the factorization output format used in SSYTRF_RK --*> (or SSYTRF_BK) provided on entry in parametes A and E into -+*> (or SSYTRF_BK) provided on entry in parameters A and E into - *> the factorization output format used in SSYTRF_ROOK that is stored - *> on exit in parameter A. IPIV format for SSYTRF_ROOK and - *> SSYTRF_RK (or SSYTRF_BK) is the same and is not converted. ---- a/SRC/zsyconvf.f -+++ b/SRC/zsyconvf.f -@@ -45,7 +45,7 @@ - *> If parameter WAY = 'R': - *> ZSYCONVF performs the conversion in reverse direction, i.e. - *> converts the factorization output format used in ZSYTRF_RK --*> (or ZSYTRF_BK) provided on entry in parametes A and E into -+*> (or ZSYTRF_BK) provided on entry in parameters A and E into - *> the factorization output format used in ZSYTRF that is stored - *> on exit in parameter A. It also coverts in place details of - *> the intechanges stored in IPIV from the format used in ZSYTRF_RK ---- a/SRC/zsyconvf_rook.f -+++ b/SRC/zsyconvf_rook.f -@@ -44,7 +44,7 @@ - *> If parameter WAY = 'R': - *> ZSYCONVF_ROOK performs the conversion in reverse direction, i.e. - *> converts the factorization output format used in ZSYTRF_RK --*> (or ZSYTRF_BK) provided on entry in parametes A and E into -+*> (or ZSYTRF_BK) provided on entry in parameters A and E into - *> the factorization output format used in ZSYTRF_ROOK that is stored - *> on exit in parameter A. IPIV format for ZSYTRF_ROOK and - *> ZSYTRF_RK (or ZSYTRF_BK) is the same and is not converted. +--- a/SRC/dlarrv.f ++++ b/SRC/dlarrv.f +@@ -69,7 +69,7 @@ + *> VU is DOUBLE PRECISION + *> Upper bound of the interval that contains the desired + *> eigenvalues. VL < VU. +-*> Note: VU is currently not used by this implmentation of DLARRV, VU is ++*> Note: VU is currently not used by this implementation of DLARRV, VU is + *> passed to DLARRV because it could be used compute gaps on the right end + *> of the extremal eigenvalues. However, with not much initial accuracy in + *> LAMBDA and VU, the formula can lead to an overestimation of the right gap +--- a/SRC/slarrv.f ++++ b/SRC/slarrv.f +@@ -69,7 +69,7 @@ + *> VU is REAL + *> Upper bound of the interval that contains the desired + *> eigenvalues. VL < VU. +-*> Note: VU is currently not used by this implmentation of SLARRV, VU is ++*> Note: VU is currently not used by this implementation of SLARRV, VU is + *> passed to SLARRV because it could be used compute gaps on the right end + *> of the extremal eigenvalues. However, with not much initial accuracy in + *> LAMBDA and VU, the formula can lead to an overestimation of the right gap diff -Nru lapack-3.7.0/debian/patches/icamax-izamax-extended-precision.patch lapack-3.7.1/debian/patches/icamax-izamax-extended-precision.patch --- lapack-3.7.0/debian/patches/icamax-izamax-extended-precision.patch 2016-12-29 08:57:49.000000000 +0000 +++ lapack-3.7.1/debian/patches/icamax-izamax-extended-precision.patch 2017-07-02 19:36:20.000000000 +0000 @@ -11,7 +11,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- a/BLAS/SRC/Makefile +++ b/BLAS/SRC/Makefile -@@ -169,3 +169,9 @@ clean: +@@ -168,3 +168,9 @@ cleanlib: .f.o: $(FORTRAN) $(OPTS) -c -o $@ $< diff -Nru lapack-3.7.0/debian/patches/series lapack-3.7.1/debian/patches/series --- lapack-3.7.0/debian/patches/series 2016-12-29 15:47:41.000000000 +0000 +++ lapack-3.7.1/debian/patches/series 2017-07-04 13:48:07.000000000 +0000 @@ -1,4 +1,3 @@ icamax-izamax-extended-precision.patch -doxygen-strip-source.patch +doxygen-downsize.patch fix-typos.patch -test-numbering.patch diff -Nru lapack-3.7.0/debian/patches/test-numbering.patch lapack-3.7.1/debian/patches/test-numbering.patch --- lapack-3.7.0/debian/patches/test-numbering.patch 2016-12-29 20:31:31.000000000 +0000 +++ lapack-3.7.1/debian/patches/test-numbering.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,55 +0,0 @@ -Description: Fix -r option of lapack_testing.py. - The numbering of tests had been broken in commit ed4e95e. -Author: Sébastien Villemot -Forwarded: https://github.com/Reference-LAPACK/lapack/pull/104 -Applied-Upstream: https://github.com/Reference-LAPACK/lapack/commit/6c3b79b35e83df36e30bd2ceadc9b927a3287740 -Last-Update: 2016-12-29 ---- -This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ ---- a/lapack_testing.py -+++ b/lapack_testing.py -@@ -197,16 +197,16 @@ else: - range_prec=list(range(4)) - - if test=='lin': -- range_test=[15] --elif test=='mixed': - range_test=[16] -+elif test=='mixed': -+ range_test=[17] - range_prec=[1,3] - elif test=='rfp': -- range_test=[17] -+ range_test=[18] - elif test=='eig': -- range_test=list(range(15)) -+ range_test=list(range(16)) - else: -- range_test=list(range(18)) -+ range_test=list(range(19)) - - list_results = [ - [0, 0, 0, 0, 0], -@@ -250,18 +250,18 @@ for dtype in range_prec: - for dtest in range_test: - nb_of_test=0 - # 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==17 and (letter=="s" or letter=="c"): - continue - if (with_file==1): - cmdbase=dtests[2][dtest]+".out" - else: -- if dtest==15: -+ if dtest==16: - # LIN TESTS - cmdbase="xlintst"+letter+" < "+dtests[0][dtest]+".in > "+dtests[2][dtest]+".out" -- elif dtest==16: -+ elif dtest==17: - # PROTO LIN TESTS - cmdbase="xlintst"+letter+dtypes[0][dtype-1]+" < "+dtests[0][dtest]+".in > "+dtests[2][dtest]+".out" -- elif dtest==17: -+ elif dtest==18: - # PROTO LIN TESTS - cmdbase="xlintstrf"+letter+" < "+dtests[0][dtest]+".in > "+dtests[2][dtest]+".out" - else: diff -Nru lapack-3.7.0/debian/rules lapack-3.7.1/debian/rules --- lapack-3.7.0/debian/rules 2017-05-24 14:15:47.000000000 +0000 +++ lapack-3.7.1/debian/rules 2017-07-04 13:44:14.000000000 +0000 @@ -2,9 +2,6 @@ include /usr/share/dpkg/default.mk -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - SO:=3 # xerblas_ and LAPACK_xerblas must be overrideable by applications @@ -63,8 +60,8 @@ echo "BUILD_DEPRECATED=1" >> $@ override_dh_auto_clean: make.inc - $(MAKE) cleanall - rm -rf debian/*_stamp debian/*_results lib*.so* + $(MAKE) clean + rm -rf debian/*_stamp debian/*_results lib*.so* pic/ rm -rf debian/test/ debian/time/ rm -f TESTING/tmp TESTING/testing_results.txt rm -f LAPACKE/include/lapacke_mangling.h @@ -77,33 +74,34 @@ override_dh_auto_configure: make.inc # Create lapack-netlib.pc sed -e "s%@LAPACK_VERSION@%$(DEB_VERSION_UPSTREAM)%" \ - -e "s%@prefix@%/usr%" \ - -e "s%@libdir@%/usr/lib%" < lapack.pc.in > lapack-netlib.pc + -e "s%@CMAKE_INSTALL_FULL_INCLUDEDIR@%/usr/include%" \ + -e "s%@CMAKE_INSTALL_FULL_LIBDIR@%/usr/lib%" < lapack.pc.in > lapack-netlib.pc # Create lapacke.pc sed -e "s%@LAPACK_VERSION@%$(DEB_VERSION_UPSTREAM)%" \ - -e "s%@prefix@%/usr%" \ - -e "s%@libdir@%/usr/lib%" < LAPACKE/lapacke.pc.in > LAPACKE/lapacke.pc + -e "s%@CMAKE_INSTALL_FULL_INCLUDEDIR@%/usr/include%" \ + -e "s%@CMAKE_INSTALL_FULL_LIBDIR@%/usr/lib%" < LAPACKE/lapacke.pc.in > LAPACKE/lapacke.pc # Create blas-netlib.pc sed -e "s%@LAPACK_VERSION@%$(DEB_VERSION_UPSTREAM)%" \ - -e "s%@prefix@%/usr%" \ - -e "s%@libdir@%/usr/lib%" < BLAS/blas.pc.in > BLAS/blas-netlib.pc + -e "s%@CMAKE_INSTALL_FULL_INCLUDEDIR@%/usr/include%" \ + -e "s%@CMAKE_INSTALL_FULL_LIBDIR@%/usr/lib%" < BLAS/blas.pc.in > BLAS/blas-netlib.pc override_dh_auto_build-arch: # Build pic libraries $(MAKE) cleanlib $(MAKE) blaslib cblaslib lapacklib tmglib lapackelib PICOPTS=-fPIC - mv librefblas.a librefblas_pic.a - mv libcblas.a libcblas_pic.a - mv liblapack.a liblapack_pic.a - mv libtmglib.a libtmglib_pic.a - mv liblapacke.a liblapacke_pic.a + mkdir -p pic + mv librefblas.a pic/librefblas_pic.a + mv libcblas.a pic/libcblas_pic.a + mv liblapack.a pic/liblapack_pic.a + mv libtmglib.a pic/libtmglib_pic.a + mv liblapacke.a pic/liblapacke_pic.a # Build libblas.so.* - ar d librefblas_pic.a xerbla.o # We want to use the xerbla.o from libcblas_pic.a + ar d pic/librefblas_pic.a xerbla.o # We want to use the xerbla.o from libcblas_pic.a mkdir -p tmp - cd tmp && ar x ../librefblas_pic.a && ar x ../libcblas_pic.a + cd tmp && ar x ../pic/librefblas_pic.a && ar x ../pic/libcblas_pic.a $(F77) -shared -Wl,-soname=libblas.so.$(SO) -o libblas.so.$(DEB_VERSION_UPSTREAM) tmp/*.o $(LDFLAGS) rm -rf tmp ln -s libblas.so.$(DEB_VERSION_UPSTREAM) libblas.so.$(SO) @@ -111,7 +109,7 @@ # Build liblapack.so.* mkdir -p tmp - cd tmp && ar x ../liblapack_pic.a + cd tmp && ar x ../pic/liblapack_pic.a $(F77) -shared -Wl,-soname=liblapack.so.$(SO) -o liblapack.so.$(DEB_VERSION_UPSTREAM) tmp/*.o -L. -lblas $(LDFLAGS) rm -rf tmp ln -s liblapack.so.$(DEB_VERSION_UPSTREAM) liblapack.so.$(SO) @@ -119,7 +117,7 @@ # Build libtmglib.so.* mkdir -p tmp - cd tmp && ar x ../libtmglib_pic.a + cd tmp && ar x ../pic/libtmglib_pic.a $(F77) -shared -Wl,-soname=libtmglib.so.$(SO) -o libtmglib.so.$(DEB_VERSION_UPSTREAM) tmp/*.o -L. -lblas -llapack $(LDFLAGS) rm -rf tmp ln -s libtmglib.so.$(DEB_VERSION_UPSTREAM) libtmglib.so.$(SO) @@ -127,7 +125,7 @@ # Build liblapacke.so.* mkdir -p tmp - cd tmp && ar x ../liblapacke_pic.a + cd tmp && ar x ../pic/liblapacke_pic.a $(CC) -shared -Wl,-soname=liblapacke.so.$(SO) -o liblapacke.so.$(DEB_VERSION_UPSTREAM) tmp/*.o -L. -lblas -llapack -ltmglib $(LDFLAGS) rm -rf tmp ln -s liblapacke.so.$(DEB_VERSION_UPSTREAM) liblapacke.so.$(SO) @@ -145,13 +143,12 @@ rm -rf tmp # Build the test programs, in order to avoid FTBFS if DEB_BUILD_OPTIONS contains nocheck - $(MAKE) OPTS="$(FFLAGS_BLAS_TESTSUITE)" BLASLIB="../../libblas.so" -C BLAS/TESTING -f Makeblat1 - $(MAKE) OPTS="$(FFLAGS_BLAS_TESTSUITE)" BLASLIB="../../libblas.so" -C BLAS/TESTING -f Makeblat2 - $(MAKE) OPTS="$(FFLAGS_BLAS_TESTSUITE)" BLASLIB="../../libblas.so" -C BLAS/TESTING -f Makeblat3 + $(MAKE) OPTS="$(FFLAGS_BLAS_TESTSUITE)" BLASLIB="../../libblas.so" -C BLAS/TESTING $(MAKE) OPTS="$(FFLAGS_BLAS_TESTSUITE)" BLASLIB="../../libblas.so" CBLASLIB="" -C CBLAS/testing - $(MAKE) OPTS="$(FFLAGS_LAPACK_TESTSUITE)" BLASLIB="../../libblas.so" LAPACKLIB="liblapack.so" TMGLIB="libtmglib.so" -C TESTING xeigtstc xeigtstd xeigtsts xeigtstz xlintstc xlintstd xlintsts xlintstz xlintstds xlintstrfc xlintstrfd xlintstrfs xlintstrfz xlintstzc + $(MAKE) OPTS="$(FFLAGS_LAPACK_TESTSUITE)" BLASLIB="../../libblas.so" LAPACKLIB="liblapack.so" TMGLIB="libtmglib.so" -C TESTING EIG/xeigtstc EIG/xeigtstd EIG/xeigtsts EIG/xeigtstz LIN/xlintstc LIN/xlintstd LIN/xlintsts LIN/xlintstz LIN/xlintstds LIN/xlintstrfc LIN/xlintstrfd LIN/xlintstrfs LIN/xlintstrfz LIN/xlintstzc override_dh_auto_build-indep: +ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS))) $(MAKE) html # Remove useless doxygen-generated files find DOCS/explore-html/ \( -name '*.map' -or -name '*.md5' \) -delete @@ -160,13 +157,14 @@ # Remove directory reference files, because they include local build pathnames # (but don't delete some __*__.3 files) rm DOCS/man/man3/_[a-zA-Z]* +endif -ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) override_dh_auto_test-arch: +ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) # Run BLAS tests, output the result, and stop if one test fails LD_LIBRARY_PATH=$$(pwd):$$LD_LIBRARY_PATH $(MAKE) blas_testing - cat BLAS/*.out - ! grep -q -i fail BLAS/*.out + cat BLAS/TESTING/*.out + ! grep -q -i fail BLAS/TESTING/*.out # Run CBLAS tests, output the result, and stop if one test fails LD_LIBRARY_PATH=$$(pwd):$$LD_LIBRARY_PATH $(MAKE) cblas_testing @@ -176,9 +174,6 @@ # Run LAPACK tests, but don't stop if one test fails # Only a summary is displayed; full test results in TESTING/testing_results.txt LD_LIBRARY_PATH=$$(pwd):$$LD_LIBRARY_PATH $(MAKE) lapack_testing -else -override_dh_auto_test-arch: - touch TESTING/testing_results.txt endif override_dh_makeshlibs: @@ -188,6 +183,3 @@ override_dh_shlibdeps: dh_shlibdeps -a -l $$(pwd) - -override_dh_strip: - dh_strip --dbgsym-migration='liblapack-dbg (<< 3.6.0-1~)' diff -Nru lapack-3.7.0/debian/watch lapack-3.7.1/debian/watch --- lapack-3.7.0/debian/watch 2015-12-22 15:25:35.000000000 +0000 +++ lapack-3.7.1/debian/watch 2017-07-02 19:31:29.000000000 +0000 @@ -1,2 +1,2 @@ -version=3 +version=4 http://www.netlib.org/lapack/ lapack-([\d\.]+)\.tgz diff -Nru lapack-3.7.0/DOCS/Doxyfile lapack-3.7.1/DOCS/Doxyfile --- lapack-3.7.0/DOCS/Doxyfile 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/DOCS/Doxyfile 2017-06-17 22:46:53.000000000 +0000 @@ -38,7 +38,7 @@ # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 3.7.0 +PROJECT_NUMBER = 3.7.1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff -Nru lapack-3.7.0/DOCS/Doxyfile_man lapack-3.7.1/DOCS/Doxyfile_man --- lapack-3.7.0/DOCS/Doxyfile_man 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/DOCS/Doxyfile_man 2017-06-17 22:46:53.000000000 +0000 @@ -38,7 +38,7 @@ # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 3.7.0 +PROJECT_NUMBER = 3.7.1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff -Nru lapack-3.7.0/DOCS/lawn81.tex lapack-3.7.1/DOCS/lawn81.tex --- lapack-3.7.0/DOCS/lawn81.tex 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/DOCS/lawn81.tex 2017-06-17 22:46:53.000000000 +0000 @@ -507,7 +507,7 @@ \begin{verbatim} lapacklib: - ( cd SRC; $(MAKE) single ) + $(MAKE) -C SRC single \end{verbatim} Likewise, you could specify \texttt{double, complex, or complex16} to @@ -560,7 +560,7 @@ \begin{list}{}{} \item \texttt{cd LAPACK} -\item \texttt{make clean} +\item \texttt{make cleanobj} \end{list} \section{Further Details of the Installation Process}\label{furtherdetails} diff -Nru lapack-3.7.0/.gitignore lapack-3.7.1/.gitignore --- lapack-3.7.0/.gitignore 1970-01-01 00:00:00.000000000 +0000 +++ lapack-3.7.1/.gitignore 2017-06-17 22:46:53.000000000 +0000 @@ -0,0 +1,37 @@ +# ignore objects and archives, anywhere in the tree. +*.[oa] + +# test in INSTALL +INSTALL/test* + +# local make.inc +make.inc + +# BLAS testing +BLAS/TESTING/*.out +BLAS/TESTING/x* + +# CBLAS +CBLAS/include/cblas_mangling.h + +# CBLAS testing +CBLAS/testing/*.out +CBLAS/testing/x* + +# CBLAS examples +CBLAS/examples/cblas_ex1 +CBLAS/examples/cblas_ex2 + +# LAPACK testing +TESTING/LIN/xlintst* +TESTING/EIG/xeigtst* +TESTING/*.out +TESTING/*.txt +TESTING/x* + +# LAPACKE example +LAPACKE/example/xexample* + +# SED +SRC/*-e +LAPACKE/src/*-e diff -Nru lapack-3.7.0/INSTALL/ilaver.f lapack-3.7.1/INSTALL/ilaver.f --- lapack-3.7.0/INSTALL/ilaver.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/INSTALL/ilaver.f 2017-06-17 22:46:53.000000000 +0000 @@ -41,17 +41,17 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup auxOTHERauxiliary * * ===================================================================== SUBROUTINE ILAVER( VERS_MAJOR, VERS_MINOR, VERS_PATCH ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* June 2016 +* June 2017 * * ===================================================================== * @@ -59,7 +59,7 @@ * ===================================================================== VERS_MAJOR = 3 VERS_MINOR = 7 - VERS_PATCH = 0 + VERS_PATCH = 1 * ===================================================================== * RETURN diff -Nru lapack-3.7.0/INSTALL/Makefile lapack-3.7.1/INSTALL/Makefile --- lapack-3.7.0/INSTALL/Makefile 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/INSTALL/Makefile 2017-06-17 22:46:53.000000000 +0000 @@ -1,33 +1,48 @@ include ../make.inc -.SUFFIXES: .o .f all: testlsame testslamch testdlamch testsecond testdsecnd testieee testversion testlsame: lsame.o lsametst.o - $(LOADER) $(LOADOPTS) -o $@ lsame.o lsametst.o + $(LOADER) $(LOADOPTS) -o $@ $^ testslamch: slamch.o lsame.o slamchtst.o - $(LOADER) $(LOADOPTS) -o $@ slamch.o lsame.o slamchtst.o + $(LOADER) $(LOADOPTS) -o $@ $^ testdlamch: dlamch.o lsame.o dlamchtst.o - $(LOADER) $(LOADOPTS) -o $@ dlamch.o lsame.o dlamchtst.o + $(LOADER) $(LOADOPTS) -o $@ $^ testsecond: second_$(TIMER).o secondtst.o @echo "[INFO] : TIMER value: $(TIMER) (given by make.inc)" - $(LOADER) $(LOADOPTS) -o $@ second_$(TIMER).o secondtst.o + $(LOADER) $(LOADOPTS) -o $@ $^ testdsecnd: dsecnd_$(TIMER).o dsecndtst.o @echo "[INFO] : TIMER value: $(TIMER) (given by make.inc)" - $(LOADER) $(LOADOPTS) -o $@ dsecnd_$(TIMER).o dsecndtst.o + $(LOADER) $(LOADOPTS) -o $@ $^ testieee: tstiee.o - $(LOADER) $(LOADOPTS) -o $@ tstiee.o + $(LOADER) $(LOADOPTS) -o $@ $^ testversion: ilaver.o LAPACK_version.o - $(LOADER) $(LOADOPTS) -o $@ ilaver.o LAPACK_version.o + $(LOADER) $(LOADOPTS) -o $@ $^ + +run: all + ./testlsame + ./testslamch + ./testdlamch + ./testsecond + ./testdsecnd + ./testieee + ./testversion -clean: +clean: cleanobj cleanexe cleantest +cleanobj: rm -f *.o +cleanexe: + rm -f test* +cleantest: + rm -f core + +.SUFFIXES: .o .f .f.o: $(FORTRAN) $(OPTS) -c -o $@ $< diff -Nru lapack-3.7.0/INSTALL/make.inc.ALPHA lapack-3.7.1/INSTALL/make.inc.ALPHA --- lapack-3.7.0/INSTALL/make.inc.ALPHA 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/INSTALL/make.inc.ALPHA 2017-06-17 22:46:53.000000000 +0000 @@ -1,76 +1,81 @@ #################################################################### # LAPACK make include file. # -# LAPACK, Version 3.6.0 # -# November 2015 # +# LAPACK, Version 3.7.0 # +# December 2016 # #################################################################### -# + SHELL = /bin/sh + +# CC is the C compiler, normally invoked with options CFLAGS. +# +CC = cc +CFLAGS = -O4 + +# Modify the FORTRAN and OPTS definitions to refer to the compiler +# and desired compiler options for your machine. NOOPT refers to +# the compiler options desired when NO OPTIMIZATION is selected. +# +FORTRAN = f77 +OPTS = -O4 -fpe1 +DRVOPTS = $(OPTS) +NOOPT = + +# Define LOADER and LOADOPTS to refer to the loader and desired +# load options for your machine. # -# Modify the FORTRAN and OPTS definitions to refer to the -# compiler and desired compiler options for your machine. NOOPT -# refers to the compiler options desired when NO OPTIMIZATION is -# selected. Define LOADER and LOADOPTS to refer to the loader and -# desired load options for your machine. -# -FORTRAN = f77 -OPTS = -O4 -fpe1 -DRVOPTS = $(OPTS) -NOOPT = LOADER = f77 LOADOPTS = + +# The archiver and the flag(s) to use when building an archive +# (library). If your system has no ranlib, set RANLIB = echo. +# +ARCH = ar +ARCHFLAGS = cr +RANLIB = ranlib + +# Timer for the SECOND and DSECND routines +# +# Default: SECOND and DSECND will use a call to the +# EXTERNAL FUNCTION ETIME +TIMER = EXT_ETIME +# For RS6K: SECOND and DSECND will use a call to the +# EXTERNAL FUNCTION ETIME_ +#TIMER = EXT_ETIME_ +# For gfortran compiler: SECOND and DSECND will use a call to the +# INTERNAL FUNCTION ETIME +#TIMER = INT_ETIME +# If your Fortran compiler does not provide etime (like Nag Fortran +# Compiler, etc...) SECOND and DSECND will use a call to the +# INTERNAL FUNCTION CPU_TIME +#TIMER = INT_CPU_TIME +# If none of these work, you can use the NONE value. +# In that case, SECOND and DSECND will always return 0. +#TIMER = NONE + +# Uncomment the following line to include deprecated routines in +# the LAPACK library. +# +#BUILD_DEPRECATED = Yes + +# LAPACKE has the interface to some routines from tmglib. +# If LAPACKE_WITH_TMG is defined, add those routines to LAPACKE. # -# Timer for the SECOND and DSECND routines -# -# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME -TIMER = EXT_ETIME -# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_ -# TIMER = EXT_ETIME_ -# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME -# TIMER = INT_ETIME -# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...) -# SECOND and DSECND will use a call to the INTERNAL FUNCTION CPU_TIME -# TIMER = INT_CPU_TIME -# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0 -# TIMER = NONE -# -# Configuration LAPACKE: Native C interface to LAPACK -# To generate LAPACKE library: type 'make lapackelib' -# Configuration file: turned off (default) -# Complex types: C99 (default) -# Name pattern: mixed case (default) -# (64-bit) Data model: LP64 (default) -# -# CC is the C compiler, normally invoked with options CFLAGS. -# -CC = cc -CFLAGS = -O4 -# -# LAPACKE has also the interface to some routines from tmglib, -# if LAPACKE_WITH_TMG is selected, we need to add those routines to LAPACKE #LAPACKE_WITH_TMG = Yes -# -# The archiver and the flag(s) to use when building archive (library) -# If you system has no ranlib, set RANLIB = echo. -# -ARCH = ar -ARCHFLAGS= cr -RANLIB = ranlib -# + # Location of the extended-precision BLAS (XBLAS) Fortran library # used for building and testing extended-precision routines. The -# relevant routines will be compiled and XBLAS will be linked only if -# USEXBLAS is defined. -# -# USEXBLAS = Yes -XBLASLIB = -# XBLASLIB = -lxblas +# relevant routines will be compiled and XBLAS will be linked only +# if USEXBLAS is defined. # +#USEXBLAS = Yes +#XBLASLIB = -lxblas + # The location of the libraries to which you will link. (The # machine-specific, optimized BLAS library should be used whenever # possible.) # #BLASLIB = ../../librefblas.a -BLASLIB = -ldxml +BLASLIB = -ldxml CBLASLIB = ../../libcblas.a LAPACKLIB = liblapack.a TMGLIB = libtmglib.a diff -Nru lapack-3.7.0/INSTALL/make.inc.gfortran lapack-3.7.1/INSTALL/make.inc.gfortran --- lapack-3.7.0/INSTALL/make.inc.gfortran 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/INSTALL/make.inc.gfortran 2017-06-17 22:46:53.000000000 +0000 @@ -1,74 +1,79 @@ #################################################################### # LAPACK make include file. # -# LAPACK, Version 3.6.0 # -# November 2015 # +# LAPACK, Version 3.7.0 # +# December 2016 # #################################################################### -# + SHELL = /bin/sh + +# CC is the C compiler, normally invoked with options CFLAGS. # -# Modify the FORTRAN and OPTS definitions to refer to the -# compiler and desired compiler options for your machine. NOOPT -# refers to the compiler options desired when NO OPTIMIZATION is -# selected. Define LOADER and LOADOPTS to refer to the loader and -# desired load options for your machine. +CC = gcc +CFLAGS = -O3 + +# Modify the FORTRAN and OPTS definitions to refer to the compiler +# and desired compiler options for your machine. NOOPT refers to +# the compiler options desired when NO OPTIMIZATION is selected. # # Note: During a regular execution, LAPACK might create NaN and Inf # and handle these quantities appropriately. As a consequence, one # should not compile LAPACK with flags such as -ffpe-trap=overflow. # -FORTRAN = gfortran -OPTS = -O2 -frecursive -DRVOPTS = $(OPTS) -NOOPT = -O0 -frecursive +FORTRAN = gfortran +OPTS = -O2 -frecursive +DRVOPTS = $(OPTS) +NOOPT = -O0 -frecursive + +# Define LOADER and LOADOPTS to refer to the loader and desired +# load options for your machine. +# LOADER = gfortran LOADOPTS = + +# The archiver and the flag(s) to use when building an archive +# (library). If your system has no ranlib, set RANLIB = echo. +# +ARCH = ar +ARCHFLAGS = cr +RANLIB = ranlib + +# Timer for the SECOND and DSECND routines +# +# Default: SECOND and DSECND will use a call to the +# EXTERNAL FUNCTION ETIME +#TIMER = EXT_ETIME +# For RS6K: SECOND and DSECND will use a call to the +# EXTERNAL FUNCTION ETIME_ +#TIMER = EXT_ETIME_ +# For gfortran compiler: SECOND and DSECND will use a call to the +# INTERNAL FUNCTION ETIME +TIMER = INT_ETIME +# If your Fortran compiler does not provide etime (like Nag Fortran +# Compiler, etc...) SECOND and DSECND will use a call to the +# INTERNAL FUNCTION CPU_TIME +#TIMER = INT_CPU_TIME +# If none of these work, you can use the NONE value. +# In that case, SECOND and DSECND will always return 0. +#TIMER = NONE + +# Uncomment the following line to include deprecated routines in +# the LAPACK library. +# +#BUILD_DEPRECATED = Yes + +# LAPACKE has the interface to some routines from tmglib. +# If LAPACKE_WITH_TMG is defined, add those routines to LAPACKE. # -# Timer for the SECOND and DSECND routines -# -# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME -#TIMER = EXT_ETIME -# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_ -# TIMER = EXT_ETIME_ -# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME -TIMER = INT_ETIME -# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...) -# SECOND and DSECND will use a call to the INTERNAL FUNCTION CPU_TIME -# TIMER = INT_CPU_TIME -# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0 -# TIMER = NONE -# -# Configuration LAPACKE: Native C interface to LAPACK -# To generate LAPACKE library: type 'make lapackelib' -# Configuration file: turned off (default) -# Complex types: C99 (default) -# Name pattern: mixed case (default) -# (64-bit) Data model: LP64 (default) -# -# CC is the C compiler, normally invoked with options CFLAGS. -# -CC = gcc -CFLAGS = -O3 -# -# LAPACKE has also the interface to some routines from tmglib, -# if LAPACKE_WITH_TMG is selected, we need to add those routines to LAPACKE #LAPACKE_WITH_TMG = Yes -# -# The archiver and the flag(s) to use when building archive (library) -# If you system has no ranlib, set RANLIB = echo. -# -ARCH = ar -ARCHFLAGS= cr -RANLIB = ranlib -# + # Location of the extended-precision BLAS (XBLAS) Fortran library # used for building and testing extended-precision routines. The -# relevant routines will be compiled and XBLAS will be linked only if -# USEXBLAS is defined. -# -# USEXBLAS = Yes -XBLASLIB = -# XBLASLIB = -lxblas +# relevant routines will be compiled and XBLAS will be linked only +# if USEXBLAS is defined. # +#USEXBLAS = Yes +#XBLASLIB = -lxblas + # The location of the libraries to which you will link. (The # machine-specific, optimized BLAS library should be used whenever # possible.) diff -Nru lapack-3.7.0/INSTALL/make.inc.gfortran_debug lapack-3.7.1/INSTALL/make.inc.gfortran_debug --- lapack-3.7.0/INSTALL/make.inc.gfortran_debug 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/INSTALL/make.inc.gfortran_debug 2017-06-17 22:46:53.000000000 +0000 @@ -1,74 +1,79 @@ #################################################################### # LAPACK make include file. # -# LAPACK, Version 3.6.0 # -# November 2015 # +# LAPACK, Version 3.7.0 # +# December 2016 # #################################################################### -# + SHELL = /bin/sh + +# CC is the C compiler, normally invoked with options CFLAGS. # -# Modify the FORTRAN and OPTS definitions to refer to the -# compiler and desired compiler options for your machine. NOOPT -# refers to the compiler options desired when NO OPTIMIZATION is -# selected. Define LOADER and LOADOPTS to refer to the loader -# and desired load options for your machine. +CC = gcc +CFLAGS = -g + +# Modify the FORTRAN and OPTS definitions to refer to the compiler +# and desired compiler options for your machine. NOOPT refers to +# the compiler options desired when NO OPTIMIZATION is selected. # # Note: During a regular execution, LAPACK might create NaN and Inf # and handle these quantities appropriately. As a consequence, one # should not compile LAPACK with flags such as -ffpe-trap=overflow. # -FORTRAN = gfortran -fimplicit-none -g -frecursive -OPTS = -DRVOPTS = $(OPTS) -NOOPT = -g -O0 -frecursive +FORTRAN = gfortran -fimplicit-none -g -frecursive +OPTS = +DRVOPTS = $(OPTS) +NOOPT = -g -O0 -frecursive + +# Define LOADER and LOADOPTS to refer to the loader and desired +# load options for your machine. +# LOADER = gfortran -g LOADOPTS = + +# The archiver and the flag(s) to use when building an archive +# (library). If your system has no ranlib, set RANLIB = echo. +# +ARCH = ar +ARCHFLAGS = cr +RANLIB = ranlib + +# Timer for the SECOND and DSECND routines +# +# Default: SECOND and DSECND will use a call to the +# EXTERNAL FUNCTION ETIME +#TIMER = EXT_ETIME +# For RS6K: SECOND and DSECND will use a call to the +# EXTERNAL FUNCTION ETIME_ +#TIMER = EXT_ETIME_ +# For gfortran compiler: SECOND and DSECND will use a call to the +# INTERNAL FUNCTION ETIME +#TIMER = INT_ETIME +# If your Fortran compiler does not provide etime (like Nag Fortran +# Compiler, etc...) SECOND and DSECND will use a call to the +# INTERNAL FUNCTION CPU_TIME +TIMER = INT_CPU_TIME +# If none of these work, you can use the NONE value. +# In that case, SECOND and DSECND will always return 0. +#TIMER = NONE + +# Uncomment the following line to include deprecated routines in +# the LAPACK library. +# +#BUILD_DEPRECATED = Yes + +# LAPACKE has the interface to some routines from tmglib. +# If LAPACKE_WITH_TMG is defined, add those routines to LAPACKE. # -# Timer for the SECOND and DSECND routines -# -# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME -# TIMER = EXT_ETIME -# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_ -# TIMER = EXT_ETIME_ -# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME -# TIMER = INT_ETIME -# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...) -# SECOND and DSECND will use a call to the Fortran standard INTERNAL FUNCTION CPU_TIME -TIMER = INT_CPU_TIME -# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0 -# TIMER = NONE -# -# Configuration LAPACKE: Native C interface to LAPACK -# To generate LAPACKE library: type 'make lapackelib' -# Configuration file: turned off (default) -# Complex types: C99 (default) -# Name pattern: mixed case (default) -# (64-bit) Data model: LP64 (default) -# -# CC is the C compiler, normally invoked with options CFLAGS. -# -CC = gcc -CFLAGS = -g -# -# LAPACKE has also the interface to some routines from tmglib, -# if LAPACKE_WITH_TMG is selected, we need to add those routines to LAPACKE #LAPACKE_WITH_TMG = Yes -# -# The archiver and the flag(s) to use when building archive (library) -# If you system has no ranlib, set RANLIB = echo. -# -ARCH = ar -ARCHFLAGS= cr -RANLIB = ranlib -# + # Location of the extended-precision BLAS (XBLAS) Fortran library # used for building and testing extended-precision routines. The -# relevant routines will be compiled and XBLAS will be linked only if -# USEXBLAS is defined. -# -# USEXBLAS = Yes -XBLASLIB = -# XBLASLIB = -lxblas +# relevant routines will be compiled and XBLAS will be linked only +# if USEXBLAS is defined. # +#USEXBLAS = Yes +#XBLASLIB = -lxblas + # The location of the libraries to which you will link. (The # machine-specific, optimized BLAS library should be used whenever # possible.) diff -Nru lapack-3.7.0/INSTALL/make.inc.HPPA lapack-3.7.1/INSTALL/make.inc.HPPA --- lapack-3.7.0/INSTALL/make.inc.HPPA 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/INSTALL/make.inc.HPPA 2017-06-17 22:46:53.000000000 +0000 @@ -1,76 +1,81 @@ #################################################################### # LAPACK make include file. # -# LAPACK, Version 3.6.0 # -# November 2015 # +# LAPACK, Version 3.7.0 # +# December 2016 # #################################################################### -# + SHELL = /bin/sh + +# CC is the C compiler, normally invoked with options CFLAGS. +# +CC = cc +CFLAGS = + +# Modify the FORTRAN and OPTS definitions to refer to the compiler +# and desired compiler options for your machine. NOOPT refers to +# the compiler options desired when NO OPTIMIZATION is selected. +# +FORTRAN = f77 +OPTS = +O4 +U77 +DRVOPTS = $(OPTS) -K +NOOPT = +U77 + +# Define LOADER and LOADOPTS to refer to the loader and desired +# load options for your machine. # -# Modify the FORTRAN and OPTS definitions to refer to the -# compiler and desired compiler options for your machine. NOOPT -# refers to the compiler options desired when NO OPTIMIZATION is -# selected. Define LOADER and LOADOPTS to refer to the loader and -# desired load options for your machine. -# -FORTRAN = f77 -OPTS = +O4 +U77 -DRVOPTS = $(OPTS) -K -NOOPT = +U77 LOADER = f77 LOADOPTS = -Aa +U77 + +# The archiver and the flag(s) to use when building an archive +# (library). If your system has no ranlib, set RANLIB = echo. +# +ARCH = ar +ARCHFLAGS = cr +RANLIB = echo + +# Timer for the SECOND and DSECND routines +# +# Default: SECOND and DSECND will use a call to the +# EXTERNAL FUNCTION ETIME +TIMER = EXT_ETIME +# For RS6K: SECOND and DSECND will use a call to the +# EXTERNAL FUNCTION ETIME_ +#TIMER = EXT_ETIME_ +# For gfortran compiler: SECOND and DSECND will use a call to the +# INTERNAL FUNCTION ETIME +#TIMER = INT_ETIME +# If your Fortran compiler does not provide etime (like Nag Fortran +# Compiler, etc...) SECOND and DSECND will use a call to the +# INTERNAL FUNCTION CPU_TIME +#TIMER = INT_CPU_TIME +# If none of these work, you can use the NONE value. +# In that case, SECOND and DSECND will always return 0. +#TIMER = NONE + +# Uncomment the following line to include deprecated routines in +# the LAPACK library. +# +#BUILD_DEPRECATED = Yes + +# LAPACKE has the interface to some routines from tmglib. +# If LAPACKE_WITH_TMG is defined, add those routines to LAPACKE. # -# Timer for the SECOND and DSECND routines -# -# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME -TIMER = EXT_ETIME -# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_ -# TIMER = EXT_ETIME_ -# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME -# TIMER = INT_ETIME -# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...) -# SECOND and DSECND will use a call to the INTERNAL FUNCTION CPU_TIME -# TIMER = INT_CPU_TIME -# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0 -# TIMER = NONE -# -# Configuration LAPACKE: Native C interface to LAPACK -# To generate LAPACKE library: type 'make lapackelib' -# Configuration file: turned off (default) -# Complex types: C99 (default) -# Name pattern: mixed case (default) -# (64-bit) Data model: LP64 (default) -# -# CC is the C compiler, normally invoked with options CFLAGS. -# -CC = cc -CFLAGS = -# -# LAPACKE has also the interface to some routines from tmglib, -# if LAPACKE_WITH_TMG is selected, we need to add those routines to LAPACKE #LAPACKE_WITH_TMG = Yes -# -# The archiver and the flag(s) to use when building archive (library) -# If you system has no ranlib, set RANLIB = echo. -# -ARCH = ar -ARCHFLAGS= cr -RANLIB = echo -# + # Location of the extended-precision BLAS (XBLAS) Fortran library # used for building and testing extended-precision routines. The -# relevant routines will be compiled and XBLAS will be linked only if -# USEXBLAS is defined. -# -# USEXBLAS = Yes -XBLASLIB = -# XBLASLIB = -lxblas +# relevant routines will be compiled and XBLAS will be linked only +# if USEXBLAS is defined. # +#USEXBLAS = Yes +#XBLASLIB = -lxblas + # The location of the libraries to which you will link. (The # machine-specific, optimized BLAS library should be used whenever # possible.) # #BLASLIB = ../../librefblas.a -BLASLIB = -lblas +BLASLIB = -lblas CBLASLIB = ../../libcblas.a LAPACKLIB = liblapack.a TMGLIB = libtmglib.a diff -Nru lapack-3.7.0/INSTALL/make.inc.ifort lapack-3.7.1/INSTALL/make.inc.ifort --- lapack-3.7.0/INSTALL/make.inc.ifort 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/INSTALL/make.inc.ifort 2017-06-17 22:46:53.000000000 +0000 @@ -1,70 +1,75 @@ #################################################################### # LAPACK make include file. # -# LAPACK, Version 3.6.0 # -# June 2016 # +# LAPACK, Version 3.7.0 # +# December 2016 # #################################################################### -# + SHELL = /bin/sh + +# CC is the C compiler, normally invoked with options CFLAGS. +# +CC = icc +CFLAGS = -O3 + +# Modify the FORTRAN and OPTS definitions to refer to the compiler +# and desired compiler options for your machine. NOOPT refers to +# the compiler options desired when NO OPTIMIZATION is selected. +# +FORTRAN = ifort +OPTS = -O3 -fp-model strict -assume protect_parens +DRVOPTS = $(OPTS) +NOOPT = -O0 -fp-model strict -assume protect_parens + +# Define LOADER and LOADOPTS to refer to the loader and desired +# load options for your machine. # -# Modify the FORTRAN and OPTS definitions to refer to the -# compiler and desired compiler options for your machine. NOOPT -# refers to the compiler options desired when NO OPTIMIZATION is -# selected. Define LOADER and LOADOPTS to refer to the loader -# and desired load options for your machine. -# -FORTRAN = ifort -OPTS = -O3 -fp-model strict -assume protect_parens -DRVOPTS = $(OPTS) -NOOPT = -O0 -fp-model strict -assume protect_parens LOADER = ifort LOADOPTS = + +# The archiver and the flag(s) to use when building an archive +# (library). If your system has no ranlib, set RANLIB = echo. +# +ARCH = ar +ARCHFLAGS = cr +RANLIB = ranlib + +# Timer for the SECOND and DSECND routines +# +# Default: SECOND and DSECND will use a call to the +# EXTERNAL FUNCTION ETIME +TIMER = EXT_ETIME +# For RS6K: SECOND and DSECND will use a call to the +# EXTERNAL FUNCTION ETIME_ +#TIMER = EXT_ETIME_ +# For gfortran compiler: SECOND and DSECND will use a call to the +# INTERNAL FUNCTION ETIME +#TIMER = INT_ETIME +# If your Fortran compiler does not provide etime (like Nag Fortran +# Compiler, etc...) SECOND and DSECND will use a call to the +# INTERNAL FUNCTION CPU_TIME +#TIMER = INT_CPU_TIME +# If none of these work, you can use the NONE value. +# In that case, SECOND and DSECND will always return 0. +#TIMER = NONE + +# Uncomment the following line to include deprecated routines in +# the LAPACK library. +# +#BUILD_DEPRECATED = Yes + +# LAPACKE has the interface to some routines from tmglib. +# If LAPACKE_WITH_TMG is defined, add those routines to LAPACKE. # -# Timer for the SECOND and DSECND routines -# -# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME -TIMER = EXT_ETIME -# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_ -# TIMER = EXT_ETIME_ -# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME -# TIMER = INT_ETIME -# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...) -# SECOND and DSECND will use a call to the Fortran standard INTERNAL FUNCTION CPU_TIME -# TIMER = INT_CPU_TIME -# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0 -# TIMER = NONE -# -# Configuration LAPACKE: Native C interface to LAPACK -# To generate LAPACKE library: type 'make lapackelib' -# Configuration file: turned off (default) -# Complex types: C99 (default) -# Name pattern: mixed case (default) -# (64-bit) Data model: LP64 (default) -# -# CC is the C compiler, normally invoked with options CFLAGS. -# -CC = icc -CFLAGS = -O3 -# -# LAPACKE has also the interface to some routines from tmglib, -# if LAPACKE_WITH_TMG is selected, we need to add those routines to LAPACKE #LAPACKE_WITH_TMG = Yes -# -# The archiver and the flag(s) to use when building archive (library) -# If you system has no ranlib, set RANLIB = echo. -# -ARCH = ar -ARCHFLAGS= cr -RANLIB = ranlib -# + # Location of the extended-precision BLAS (XBLAS) Fortran library # used for building and testing extended-precision routines. The -# relevant routines will be compiled and XBLAS will be linked only if -# USEXBLAS is defined. -# -# USEXBLAS = Yes -XBLASLIB = -# XBLASLIB = -lxblas +# relevant routines will be compiled and XBLAS will be linked only +# if USEXBLAS is defined. # +#USEXBLAS = Yes +#XBLASLIB = -lxblas + # The location of the libraries to which you will link. (The # machine-specific, optimized BLAS library should be used whenever # possible.) diff -Nru lapack-3.7.0/INSTALL/make.inc.IRIX64 lapack-3.7.1/INSTALL/make.inc.IRIX64 --- lapack-3.7.0/INSTALL/make.inc.IRIX64 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/INSTALL/make.inc.IRIX64 2017-06-17 22:46:53.000000000 +0000 @@ -1,78 +1,83 @@ #################################################################### # LAPACK make include file. # -# LAPACK, Version 3.6.0 # -# November 2015 # +# LAPACK, Version 3.7.0 # +# December 2016 # #################################################################### -# + SHELL = /sbin/sh + +# CC is the C compiler, normally invoked with options CFLAGS. +# +CC = cc +CFLAGS = -O3 + +# Modify the FORTRAN and OPTS definitions to refer to the compiler +# and desired compiler options for your machine. NOOPT refers to +# the compiler options desired when NO OPTIMIZATION is selected. +# +FORTRAN = f77 +OPTS = -O3 -64 -mips4 -r10000 -OPT:IEEE_NaN_inf=ON +#OPTS = -g -DEBUG:subscript_check=ON -trapuv -OPT:IEEE_NaN_inf=ON +DRVOPTS = $(OPTS) -static +NOOPT = -64 -mips4 -r10000 -OPT:IEEE_NaN_inf=ON +#NOOPT = -g -DEBUG:subscript_check=ON -trapuv -OPT:IEEE_NaN_inf=ON + +# Define LOADER and LOADOPTS to refer to the loader and desired +# load options for your machine. # -# Modify the FORTRAN and OPTS definitions to refer to the -# compiler and desired compiler options for your machine. NOOPT -# refers to the compiler options desired when NO OPTIMIZATION is -# selected. Define LOADER and LOADOPTS to refer to the loader and -# desired load options for your machine. -# -FORTRAN = f77 -OPTS = -O3 -64 -mips4 -r10000 -OPT:IEEE_NaN_inf=ON -#OPTS = -g -DEBUG:subscript_check=ON -trapuv -OPT:IEEE_NaN_inf=ON -DRVOPTS = $(OPTS) -static -NOOPT = -64 -mips4 -r10000 -OPT:IEEE_NaN_inf=ON -#NOOPT = -g -DEBUG:subscript_check=ON -trapuv -OPT:IEEE_NaN_inf=ON LOADER = f77 LOADOPTS = -O3 -64 -mips4 -r10000 -OPT:IEEE_NaN_inf=ON #LOADOPTS = -g -DEBUG:subscript_check=ON -trapuv -OPT:IEEE_NaN_inf=ON + +# The archiver and the flag(s) to use when building an archive +# (library). If your system has no ranlib, set RANLIB = echo. +# +ARCH = ar +ARCHFLAGS = cr +RANLIB = echo + +# Timer for the SECOND and DSECND routines +# +# Default: SECOND and DSECND will use a call to the +# EXTERNAL FUNCTION ETIME +TIMER = EXT_ETIME +# For RS6K: SECOND and DSECND will use a call to the +# EXTERNAL FUNCTION ETIME_ +#TIMER = EXT_ETIME_ +# For gfortran compiler: SECOND and DSECND will use a call to the +# INTERNAL FUNCTION ETIME +#TIMER = INT_ETIME +# If your Fortran compiler does not provide etime (like Nag Fortran +# Compiler, etc...) SECOND and DSECND will use a call to the +# INTERNAL FUNCTION CPU_TIME +#TIMER = INT_CPU_TIME +# If none of these work, you can use the NONE value. +# In that case, SECOND and DSECND will always return 0. +#TIMER = NONE + +# Uncomment the following line to include deprecated routines in +# the LAPACK library. +# +#BUILD_DEPRECATED = Yes + +# LAPACKE has the interface to some routines from tmglib. +# If LAPACKE_WITH_TMG is defined, add those routines to LAPACKE. # -# Timer for the SECOND and DSECND routines -# -# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME -TIMER = EXT_ETIME -# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_ -# TIMER = EXT_ETIME_ -# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME -# TIMER = INT_ETIME -# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...) -# SECOND and DSECND will use a call to the INTERNAL FUNCTION CPU_TIME -# TIMER = INT_CPU_TIME -# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0 -# TIMER = NONE -# -# Configuration LAPACKE: Native C interface to LAPACK -# To generate LAPACKE library: type 'make lapackelib' -# Configuration file: turned off (default) -# Complex types: C99 (default) -# Name pattern: mixed case (default) -# (64-bit) Data model: LP64 (default) -# -# CC is the C compiler, normally invoked with options CFLAGS. -# -CC = cc -CFLAGS = -O3 -# -# LAPACKE has also the interface to some routines from tmglib, -# if LAPACKE_WITH_TMG is selected, we need to add those routines to LAPACKE #LAPACKE_WITH_TMG = Yes -# -# The archiver and the flag(s) to use when building archive (library) -# If you system has no ranlib, set RANLIB = echo. -# -ARCH = ar -ARCHFLAGS= cr -RANLIB = echo -# + # Location of the extended-precision BLAS (XBLAS) Fortran library # used for building and testing extended-precision routines. The -# relevant routines will be compiled and XBLAS will be linked only if -# USEXBLAS is defined. -# -# USEXBLAS = Yes -XBLASLIB = -# XBLASLIB = -lxblas +# relevant routines will be compiled and XBLAS will be linked only +# if USEXBLAS is defined. # +#USEXBLAS = Yes +#XBLASLIB = -lxblas + # The location of the libraries to which you will link. (The # machine-specific, optimized BLAS library should be used whenever # possible.) # -#BLASLIB = -lblas +#BLASLIB = -lblas BLASLIB = ../../librefblas.a CBLASLIB = ../../libcblas.a LAPACKLIB = liblapack.a diff -Nru lapack-3.7.0/INSTALL/make.inc.O2K lapack-3.7.1/INSTALL/make.inc.O2K --- lapack-3.7.0/INSTALL/make.inc.O2K 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/INSTALL/make.inc.O2K 2017-06-17 22:46:53.000000000 +0000 @@ -1,79 +1,84 @@ #################################################################### # LAPACK make include file. # -# LAPACK, Version 3.6.0 # -# November 2015 # +# LAPACK, Version 3.7.0 # +# December 2016 # #################################################################### -# + SHELL = /sbin/sh + +# CC is the C compiler, normally invoked with options CFLAGS. +# +CC = cc +CFLAGS = -O3 + +# Modify the FORTRAN and OPTS definitions to refer to the compiler +# and desired compiler options for your machine. NOOPT refers to +# the compiler options desired when NO OPTIMIZATION is selected. +# +FORTRAN = f77 +OPTS = -O3 -64 -mips4 -r10000 +#OPTS = -O3 -64 -mips4 -r10000 -mp +DRVOPTS = $(OPTS) -static +NOOPT = -64 -mips4 -r10000 +#NOOPT = -64 -mips4 -r10000 -mp + +# Define LOADER and LOADOPTS to refer to the loader and desired +# load options for your machine. # -# Modify the FORTRAN and OPTS definitions to refer to the -# compiler and desired compiler options for your machine. NOOPT -# refers to the compiler options desired when NO OPTIMIZATION is -# selected. Define LOADER and LOADOPTS to refer to the loader and -# desired load options for your machine. -# -FORTRAN = f77 -OPTS = -O3 -64 -mips4 -r10000 -#OPTS = -O3 -64 -mips4 -r10000 -mp -DRVOPTS = $(OPTS) -static -NOOPT = -64 -mips4 -r10000 -#NOOPT = -64 -mips4 -r10000 -mp LOADER = f77 LOADOPTS = -O3 -64 -mips4 -r10000 #LOADOPTS = -O3 -64 -mips4 -r10000 -mp + +# The archiver and the flag(s) to use when building an archive +# (library). If your system has no ranlib, set RANLIB = echo. +# +ARCH = ar +ARCHFLAGS = cr +RANLIB = echo + +# Timer for the SECOND and DSECND routines +# +# Default: SECOND and DSECND will use a call to the +# EXTERNAL FUNCTION ETIME +TIMER = EXT_ETIME +# For RS6K: SECOND and DSECND will use a call to the +# EXTERNAL FUNCTION ETIME_ +#TIMER = EXT_ETIME_ +# For gfortran compiler: SECOND and DSECND will use a call to the +# INTERNAL FUNCTION ETIME +#TIMER = INT_ETIME +# If your Fortran compiler does not provide etime (like Nag Fortran +# Compiler, etc...) SECOND and DSECND will use a call to the +# INTERNAL FUNCTION CPU_TIME +#TIMER = INT_CPU_TIME +# If none of these work, you can use the NONE value. +# In that case, SECOND and DSECND will always return 0. +#TIMER = NONE + +# Uncomment the following line to include deprecated routines in +# the LAPACK library. +# +#BUILD_DEPRECATED = Yes + +# LAPACKE has the interface to some routines from tmglib. +# If LAPACKE_WITH_TMG is defined, add those routines to LAPACKE. # -# Timer for the SECOND and DSECND routines -# -# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME -TIMER = EXT_ETIME -# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_ -# TIMER = EXT_ETIME_ -# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME -# TIMER = INT_ETIME -# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...) -# SECOND and DSECND will use a call to the INTERNAL FUNCTION CPU_TIME -# TIMER = INT_CPU_TIME -# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0 -# TIMER = NONE -# -# Configuration LAPACKE: Native C interface to LAPACK -# To generate LAPACKE library: type 'make lapackelib' -# Configuration file: turned off (default) -# Complex types: C99 (default) -# Name pattern: mixed case (default) -# (64-bit) Data model: LP64 (default) -# -# CC is the C compiler, normally invoked with options CFLAGS. -# -CC = cc -CFLAGS = -O3 -# -# LAPACKE has also the interface to some routines from tmglib, -# if LAPACKE_WITH_TMG is selected, we need to add those routines to LAPACKE #LAPACKE_WITH_TMG = Yes -# -# The archiver and the flag(s) to use when building archive (library) -# If you system has no ranlib, set RANLIB = echo. -# -ARCH = ar -ARCHFLAGS= cr -RANLIB = echo -# + # Location of the extended-precision BLAS (XBLAS) Fortran library # used for building and testing extended-precision routines. The -# relevant routines will be compiled and XBLAS will be linked only if -# USEXBLAS is defined. -# -# USEXBLAS = Yes -XBLASLIB = -# XBLASLIB = -lxblas +# relevant routines will be compiled and XBLAS will be linked only +# if USEXBLAS is defined. # +#USEXBLAS = Yes +#XBLASLIB = -lxblas + # The location of the libraries to which you will link. (The # machine-specific, optimized BLAS library should be used whenever # possible.) # -BLASLIB = -lblas -#BLASLIB = -lblas_mp +BLASLIB = -lblas +#BLASLIB = -lblas_mp #BLASLIB = ../../librefblas.a CBLASLIB = ../../libcblas.a LAPACKLIB = liblapack.a diff -Nru lapack-3.7.0/INSTALL/make.inc.pgf95 lapack-3.7.1/INSTALL/make.inc.pgf95 --- lapack-3.7.0/INSTALL/make.inc.pgf95 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/INSTALL/make.inc.pgf95 2017-06-17 22:46:53.000000000 +0000 @@ -1,70 +1,75 @@ #################################################################### # LAPACK make include file. # -# LAPACK, Version 3.6.0 # -# November 2015 # +# LAPACK, Version 3.7.0 # +# December 2016 # #################################################################### -# + SHELL = /bin/sh + +# CC is the C compiler, normally invoked with options CFLAGS. +# +CC = pgcc +CFLAGS = + +# Modify the FORTRAN and OPTS definitions to refer to the compiler +# and desired compiler options for your machine. NOOPT refers to +# the compiler options desired when NO OPTIMIZATION is selected. +# +FORTRAN = pgf95 +OPTS = -O3 +DRVOPTS = $(OPTS) +NOOPT = -O0 + +# Define LOADER and LOADOPTS to refer to the loader and desired +# load options for your machine. # -# Modify the FORTRAN and OPTS definitions to refer to the -# compiler and desired compiler options for your machine. NOOPT -# refers to the compiler options desired when NO OPTIMIZATION is -# selected. Define LOADER and LOADOPTS to refer to the loader and -# desired load options for your machine. -# -FORTRAN = pgf95 -OPTS = -O3 -DRVOPTS = $(OPTS) -NOOPT = -O0 LOADER = $(FORTRAN) LOADOPTS = + +# The archiver and the flag(s) to use when building an archive +# (library). If your system has no ranlib, set RANLIB = echo. +# +ARCH = ar +ARCHFLAGS = cr +RANLIB = echo + +# Timer for the SECOND and DSECND routines +# +# Default: SECOND and DSECND will use a call to the +# EXTERNAL FUNCTION ETIME +#TIMER = EXT_ETIME +# For RS6K: SECOND and DSECND will use a call to the +# EXTERNAL FUNCTION ETIME_ +#TIMER = EXT_ETIME_ +# For gfortran compiler: SECOND and DSECND will use a call to the +# INTERNAL FUNCTION ETIME +#TIMER = INT_ETIME +# If your Fortran compiler does not provide etime (like Nag Fortran +# Compiler, etc...) SECOND and DSECND will use a call to the +# INTERNAL FUNCTION CPU_TIME +TIMER = INT_CPU_TIME +# If none of these work, you can use the NONE value. +# In that case, SECOND and DSECND will always return 0. +#TIMER = NONE + +# Uncomment the following line to include deprecated routines in +# the LAPACK library. +# +#BUILD_DEPRECATED = Yes + +# LAPACKE has the interface to some routines from tmglib. +# If LAPACKE_WITH_TMG is defined, add those routines to LAPACKE. # -# Timer for the SECOND and DSECND routines -# -# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME -# TIMER = EXT_ETIME -# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_ -# TIMER = EXT_ETIME_ -# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME -# TIMER = INT_ETIME -# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...) -# SECOND and DSECND will use a call to the INTERNAL FUNCTION CPU_TIME - TIMER = INT_CPU_TIME -# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0 -# TIMER = NONE -# -# Configuration LAPACKE: Native C interface to LAPACK -# To generate LAPACKE library: type 'make lapackelib' -# Configuration file: turned off (default) -# Complex types: C99 (default) -# Name pattern: mixed case (default) -# (64-bit) Data model: LP64 (default) -# -# CC is the C compiler, normally invoked with options CFLAGS. -# -CC = pgcc -CFLAGS = -# -# LAPACKE has also the interface to some routines from tmglib, -# if LAPACKE_WITH_TMG is selected, we need to add those routines to LAPACKE #LAPACKE_WITH_TMG = Yes -# -# The archiver and the flag(s) to use when building archive (library) -# If you system has no ranlib, set RANLIB = echo. -# -ARCH = ar -ARCHFLAGS= cr -RANLIB = echo -# + # Location of the extended-precision BLAS (XBLAS) Fortran library # used for building and testing extended-precision routines. The -# relevant routines will be compiled and XBLAS will be linked only if -# USEXBLAS is defined. -# -# USEXBLAS = Yes -XBLASLIB = -# XBLASLIB = -lxblas +# relevant routines will be compiled and XBLAS will be linked only +# if USEXBLAS is defined. # +#USEXBLAS = Yes +#XBLASLIB = -lxblas + # The location of the libraries to which you will link. (The # machine-specific, optimized BLAS library should be used whenever # possible.) diff -Nru lapack-3.7.0/INSTALL/make.inc.pghpf lapack-3.7.1/INSTALL/make.inc.pghpf --- lapack-3.7.0/INSTALL/make.inc.pghpf 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/INSTALL/make.inc.pghpf 2017-06-17 22:46:53.000000000 +0000 @@ -1,77 +1,82 @@ #################################################################### # LAPACK make include file. # -# LAPACK, Version 3.6.0 # -# November 2015 # +# LAPACK, Version 3.7.0 # +# December 2016 # #################################################################### -# + SHELL = /bin/sh + +# CC is the C compiler, normally invoked with options CFLAGS. +# +CC = pghpc +CFLAGS = + +# Modify the FORTRAN and OPTS definitions to refer to the compiler +# and desired compiler options for your machine. NOOPT refers to +# the compiler options desired when NO OPTIMIZATION is selected. +# +FORTRAN = pghpf +OPTS = -O4 -Mnohpfc -Mdclchk +DRVOPTS = $(OPTS) +NOOPT = -Mnohpfc -Mdclchk + +# Define LOADER and LOADOPTS to refer to the loader and desired +# load options for your machine. # -# Modify the FORTRAN and OPTS definitions to refer to the -# compiler and desired compiler options for your machine. NOOPT -# refers to the compiler options desired when NO OPTIMIZATION is -# selected. Define LOADER and LOADOPTS to refer to the loader and -# desired load options for your machine. -# -FORTRAN = pghpf -OPTS = -O4 -Mnohpfc -Mdclchk -DRVOPTS = $(OPTS) -NOOPT = -Mnohpfc -Mdclchk LOADER = pghpf LOADOPTS = + +# The archiver and the flag(s) to use when building an archive +# (library). If your system has no ranlib, set RANLIB = echo. +# +ARCH = ar +ARCHFLAGS = cr +RANLIB = echo + +# Timer for the SECOND and DSECND routines +# +# Default: SECOND and DSECND will use a call to the +# EXTERNAL FUNCTION ETIME +TIMER = EXT_ETIME +# For RS6K: SECOND and DSECND will use a call to the +# EXTERNAL FUNCTION ETIME_ +#TIMER = EXT_ETIME_ +# For gfortran compiler: SECOND and DSECND will use a call to the +# INTERNAL FUNCTION ETIME +#TIMER = INT_ETIME +# If your Fortran compiler does not provide etime (like Nag Fortran +# Compiler, etc...) SECOND and DSECND will use a call to the +# INTERNAL FUNCTION CPU_TIME +#TIMER = INT_CPU_TIME +# If none of these work, you can use the NONE value. +# In that case, SECOND and DSECND will always return 0. +#TIMER = NONE + +# Uncomment the following line to include deprecated routines in +# the LAPACK library. +# +#BUILD_DEPRECATED = Yes + +# LAPACKE has the interface to some routines from tmglib. +# If LAPACKE_WITH_TMG is defined, add those routines to LAPACKE. # -# Timer for the SECOND and DSECND routines -# -# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME -TIMER = EXT_ETIME -# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_ -# TIMER = EXT_ETIME_ -# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME -# TIMER = INT_ETIME -# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...) -# SECOND and DSECND will use a call to the INTERNAL FUNCTION CPU_TIME -# TIMER = INT_CPU_TIME -# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0 -# TIMER = NONE -# -# Configuration LAPACKE: Native C interface to LAPACK -# To generate LAPACKE library: type 'make lapackelib' -# Configuration file: turned off (default) -# Complex types: C99 (default) -# Name pattern: mixed case (default) -# (64-bit) Data model: LP64 (default) -# -# CC is the C compiler, normally invoked with options CFLAGS. -# -CC = pghpc -CFLAGS = -# -# LAPACKE has also the interface to some routines from tmglib, -# if LAPACKE_WITH_TMG is selected, we need to add those routines to LAPACKE #LAPACKE_WITH_TMG = Yes -# -# The archiver and the flag(s) to use when building archive (library) -# If you system has no ranlib, set RANLIB = echo. -# -ARCH = ar -ARCHFLAGS= cr -RANLIB = echo -# + # Location of the extended-precision BLAS (XBLAS) Fortran library # used for building and testing extended-precision routines. The -# relevant routines will be compiled and XBLAS will be linked only if -# USEXBLAS is defined. -# -# USEXBLAS = Yes -XBLASLIB = -# XBLASLIB = -lxblas +# relevant routines will be compiled and XBLAS will be linked only +# if USEXBLAS is defined. # +#USEXBLAS = Yes +#XBLASLIB = -lxblas + # The location of the libraries to which you will link. (The # machine-specific, optimized BLAS library should be used whenever # possible.) # -#BLASLIB = -lessl +#BLASLIB = -lessl BLASLIB = ../../librefblas.a -CBLASLIB = ../../libcblas.a +CBLASLIB = ../../libcblas.a LAPACKLIB = liblapack.a TMGLIB = libtmglib.a LAPACKELIB = liblapacke.a diff -Nru lapack-3.7.0/INSTALL/make.inc.SGI5 lapack-3.7.1/INSTALL/make.inc.SGI5 --- lapack-3.7.0/INSTALL/make.inc.SGI5 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/INSTALL/make.inc.SGI5 2017-06-17 22:46:53.000000000 +0000 @@ -1,75 +1,80 @@ #################################################################### # LAPACK make include file. # -# LAPACK, Version 3.6.0 # -# November 2015 # +# LAPACK, Version 3.7.0 # +# December 2016 # #################################################################### -# + SHELL = /sbin/sh + +# CC is the C compiler, normally invoked with options CFLAGS. +# +CC = cc +CFLAGS = -O4 + +# Modify the FORTRAN and OPTS definitions to refer to the compiler +# and desired compiler options for your machine. NOOPT refers to +# the compiler options desired when NO OPTIMIZATION is selected. +# +FORTRAN = f77 +OPTS = -O4 +DRVOPTS = $(OPTS) -static +NOOPT = + +# Define LOADER and LOADOPTS to refer to the loader and desired +# load options for your machine. # -# Modify the FORTRAN and OPTS definitions to refer to the -# compiler and desired compiler options for your machine. NOOPT -# refers to the compiler options desired when NO OPTIMIZATION is -# selected. Define LOADER and LOADOPTS to refer to the loader and -# desired load options for your machine. -# -FORTRAN = f77 -OPTS = -O4 -DRVOPTS = $(OPTS) -static -NOOPT = LOADER = f77 LOADOPTS = + +# The archiver and the flag(s) to use when building an archive +# (library). If your system has no ranlib, set RANLIB = echo. +# +ARCH = ar +ARCHFLAGS = cr +RANLIB = echo + +# Timer for the SECOND and DSECND routines +# +# Default: SECOND and DSECND will use a call to the +# EXTERNAL FUNCTION ETIME +TIMER = EXT_ETIME +# For RS6K: SECOND and DSECND will use a call to the +# EXTERNAL FUNCTION ETIME_ +#TIMER = EXT_ETIME_ +# For gfortran compiler: SECOND and DSECND will use a call to the +# INTERNAL FUNCTION ETIME +#TIMER = INT_ETIME +# If your Fortran compiler does not provide etime (like Nag Fortran +# Compiler, etc...) SECOND and DSECND will use a call to the +# INTERNAL FUNCTION CPU_TIME +#TIMER = INT_CPU_TIME +# If none of these work, you can use the NONE value. +# In that case, SECOND and DSECND will always return 0. +#TIMER = NONE + +# Uncomment the following line to include deprecated routines in +# the LAPACK library. +# +#BUILD_DEPRECATED = Yes + +# LAPACKE has the interface to some routines from tmglib. +# If LAPACKE_WITH_TMG is defined, add those routines to LAPACKE. # -# Timer for the SECOND and DSECND routines -# -# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME -TIMER = EXT_ETIME -# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_ -# TIMER = EXT_ETIME_ -# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME -# TIMER = INT_ETIME -# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...) -# SECOND and DSECND will use a call to the INTERNAL FUNCTION CPU_TIME -# TIMER = INT_CPU_TIME -# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0 -# TIMER = NONE -# -# Configuration LAPACKE: Native C interface to LAPACK -# To generate LAPACKE library: type 'make lapackelib' -# Configuration file: turned off (default) -# Complex types: C99 (default) -# Name pattern: mixed case (default) -# (64-bit) Data model: LP64 (default) -# -# CC is the C compiler, normally invoked with options CFLAGS. -# -CC = cc -CFLAGS = -O4 -# -# LAPACKE has also the interface to some routines from tmglib, -# if LAPACKE_WITH_TMG is selected, we need to add those routines to LAPACKE #LAPACKE_WITH_TMG = Yes -# -# The archiver and the flag(s) to use when building archive (library) -# If you system has no ranlib, set RANLIB = echo. -# -ARCH = ar -ARCHFLAGS= cr -RANLIB = echo -# + # Location of the extended-precision BLAS (XBLAS) Fortran library # used for building and testing extended-precision routines. The -# relevant routines will be compiled and XBLAS will be linked only if -# USEXBLAS is defined. -# -# USEXBLAS = Yes -XBLASLIB = -# XBLASLIB = -lxblas +# relevant routines will be compiled and XBLAS will be linked only +# if USEXBLAS is defined. # +#USEXBLAS = Yes +#XBLASLIB = -lxblas + # The location of the libraries to which you will link. (The # machine-specific, optimized BLAS library should be used whenever # possible.) # -#BLASLIB = -lblas +#BLASLIB = -lblas BLASLIB = ../../librefblas.a CBLASLIB = ../../libcblas.a LAPACKLIB = liblapack.a diff -Nru lapack-3.7.0/INSTALL/make.inc.SUN4 lapack-3.7.1/INSTALL/make.inc.SUN4 --- lapack-3.7.0/INSTALL/make.inc.SUN4 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/INSTALL/make.inc.SUN4 2017-06-17 22:46:53.000000000 +0000 @@ -1,75 +1,80 @@ #################################################################### # LAPACK make include file. # -# LAPACK, Version 3.6.0 # -# November 2015 # +# LAPACK, Version 3.7.0 # +# December 2016 # #################################################################### -# + SHELL = /bin/sh + +# CC is the C compiler, normally invoked with options CFLAGS. +# +CC = cc +CFLAGS = -O3 + +# Modify the FORTRAN and OPTS definitions to refer to the compiler +# and desired compiler options for your machine. NOOPT refers to +# the compiler options desired when NO OPTIMIZATION is selected. +# +FORTRAN = f77 +OPTS = -dalign -O4 -fast +DRVOPTS = $(OPTS) +NOOPT = + +# Define LOADER and LOADOPTS to refer to the loader and desired +# load options for your machine. # -# Modify the FORTRAN and OPTS definitions to refer to the -# compiler and desired compiler options for your machine. NOOPT -# refers to the compiler options desired when NO OPTIMIZATION is -# selected. Define LOADER and LOADOPTS to refer to the loader and -# desired load options for your machine. -# -FORTRAN = f77 -OPTS = -dalign -O4 -fast -DRVOPTS = $(OPTS) -NOOPT = LOADER = f77 LOADOPTS = -dalign -O4 -fast + +# The archiver and the flag(s) to use when building an archive +# (library). If your system has no ranlib, set RANLIB = echo. +# +ARCH = ar +ARCHFLAGS = cr +RANLIB = ranlib + +# Timer for the SECOND and DSECND routines +# +# Default: SECOND and DSECND will use a call to the +# EXTERNAL FUNCTION ETIME +TIMER = EXT_ETIME +# For RS6K: SECOND and DSECND will use a call to the +# EXTERNAL FUNCTION ETIME_ +#TIMER = EXT_ETIME_ +# For gfortran compiler: SECOND and DSECND will use a call to the +# INTERNAL FUNCTION ETIME +#TIMER = INT_ETIME +# If your Fortran compiler does not provide etime (like Nag Fortran +# Compiler, etc...) SECOND and DSECND will use a call to the +# INTERNAL FUNCTION CPU_TIME +#TIMER = INT_CPU_TIME +# If none of these work, you can use the NONE value. +# In that case, SECOND and DSECND will always return 0. +#TIMER = NONE + +# Uncomment the following line to include deprecated routines in +# the LAPACK library. +# +#BUILD_DEPRECATED = Yes + +# LAPACKE has the interface to some routines from tmglib. +# If LAPACKE_WITH_TMG is defined, add those routines to LAPACKE. # -# Timer for the SECOND and DSECND routines -# -# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME -TIMER = EXT_ETIME -# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_ -# TIMER = EXT_ETIME_ -# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME -# TIMER = INT_ETIME -# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...) -# SECOND and DSECND will use a call to the INTERNAL FUNCTION CPU_TIME -# TIMER = INT_CPU_TIME -# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0 -# TIMER = NONE -# -# Configuration LAPACKE: Native C interface to LAPACK -# To generate LAPACKE library: type 'make lapackelib' -# Configuration file: turned off (default) -# Complex types: C99 (default) -# Name pattern: mixed case (default) -# (64-bit) Data model: LP64 (default) -# -# CC is the C compiler, normally invoked with options CFLAGS. -# -CC = cc -CFLAGS = -O3 -# -# LAPACKE has also the interface to some routines from tmglib, -# if LAPACKE_WITH_TMG is selected, we need to add those routines to LAPACKE #LAPACKE_WITH_TMG = Yes -# -# The archiver and the flag(s) to use when building archive (library) -# If you system has no ranlib, set RANLIB = echo. -# -ARCH = ar -ARCHFLAGS= cr -RANLIB = ranlib -# + # Location of the extended-precision BLAS (XBLAS) Fortran library # used for building and testing extended-precision routines. The -# relevant routines will be compiled and XBLAS will be linked only if -# USEXBLAS is defined. -# -# USEXBLAS = Yes -XBLASLIB = -# XBLASLIB = -lxblas +# relevant routines will be compiled and XBLAS will be linked only +# if USEXBLAS is defined. # +#USEXBLAS = Yes +#XBLASLIB = -lxblas + # The location of the libraries to which you will link. (The # machine-specific, optimized BLAS library should be used whenever # possible.) # -#BLASLIB = -lblas +#BLASLIB = -lblas BLASLIB = ../../librefblas.a CBLASLIB = ../../libcblas.a LAPACKLIB = liblapack.a diff -Nru lapack-3.7.0/INSTALL/make.inc.SUN4SOL2 lapack-3.7.1/INSTALL/make.inc.SUN4SOL2 --- lapack-3.7.0/INSTALL/make.inc.SUN4SOL2 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/INSTALL/make.inc.SUN4SOL2 2017-06-17 22:46:53.000000000 +0000 @@ -1,81 +1,86 @@ #################################################################### # LAPACK make include file. # -# LAPACK, Version 3.6.0 # -# November 2015 # +# LAPACK, Version 3.7.0 # +# December 2016 # #################################################################### -# + SHELL = /bin/sh + +# CC is the C compiler, normally invoked with options CFLAGS. +# +CC = cc +CFLAGS = -O3 + +# Modify the FORTRAN and OPTS definitions to refer to the compiler +# and desired compiler options for your machine. NOOPT refers to +# the compiler options desired when NO OPTIMIZATION is selected. +# +FORTRAN = f77 +#OPTS = -O4 -u -f -mt +#OPTS = -u -f -dalign -native -xO5 -xarch=v8plusa +OPTS = -u -f -dalign -native -xO2 -xarch=v8plusa +DRVOPTS = $(OPTS) +NOOPT = -u -f +#NOOPT = -u -f -mt + +# Define LOADER and LOADOPTS to refer to the loader and desired +# load options for your machine. # -# Modify the FORTRAN and OPTS definitions to refer to the -# compiler and desired compiler options for your machine. NOOPT -# refers to the compiler options desired when NO OPTIMIZATION is -# selected. Define LOADER and LOADOPTS to refer to the loader and -# desired load options for your machine. -# -FORTRAN = f77 -#OPTS = -O4 -u -f -mt -#OPTS = -u -f -dalign -native -xO5 -xarch=v8plusa -OPTS = -u -f -dalign -native -xO2 -xarch=v8plusa -DRVOPTS = $(OPTS) -NOOPT = -u -f -#NOOPT = -u -f -mt LOADER = f77 #LOADOPTS = -mt LOADOPTS = -f -dalign -native -xO2 -xarch=v8plusa + +# The archiver and the flag(s) to use when building an archive +# (library). If your system has no ranlib, set RANLIB = echo. +# +ARCH = ar +ARCHFLAGS = cr +RANLIB = echo + +# Timer for the SECOND and DSECND routines +# +# Default: SECOND and DSECND will use a call to the +# EXTERNAL FUNCTION ETIME +TIMER = EXT_ETIME +# For RS6K: SECOND and DSECND will use a call to the +# EXTERNAL FUNCTION ETIME_ +#TIMER = EXT_ETIME_ +# For gfortran compiler: SECOND and DSECND will use a call to the +# INTERNAL FUNCTION ETIME +#TIMER = INT_ETIME +# If your Fortran compiler does not provide etime (like Nag Fortran +# Compiler, etc...) SECOND and DSECND will use a call to the +# INTERNAL FUNCTION CPU_TIME +#TIMER = INT_CPU_TIME +# If none of these work, you can use the NONE value. +# In that case, SECOND and DSECND will always return 0. +#TIMER = NONE + +# Uncomment the following line to include deprecated routines in +# the LAPACK library. +# +#BUILD_DEPRECATED = Yes + +# LAPACKE has the interface to some routines from tmglib. +# If LAPACKE_WITH_TMG is defined, add those routines to LAPACKE. # -# Timer for the SECOND and DSECND routines -# -# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME -TIMER = EXT_ETIME -# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_ -# TIMER = EXT_ETIME_ -# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME -# TIMER = INT_ETIME -# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...) -# SECOND and DSECND will use a call to the INTERNAL FUNCTION CPU_TIME -# TIMER = INT_CPU_TIME -# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0 -# TIMER = NONE -# -# Configuration LAPACKE: Native C interface to LAPACK -# To generate LAPACKE library: type 'make lapackelib' -# Configuration file: turned off (default) -# Complex types: C99 (default) -# Name pattern: mixed case (default) -# (64-bit) Data model: LP64 (default) -# -# CC is the C compiler, normally invoked with options CFLAGS. -# -CC = cc -CFLAGS = -O3 -# -# LAPACKE has also the interface to some routines from tmglib, -# if LAPACKE_WITH_TMG is selected, we need to add those routines to LAPACKE #LAPACKE_WITH_TMG = Yes -# -# The archiver and the flag(s) to use when building archive (library) -# If you system has no ranlib, set RANLIB = echo. -# -ARCH = ar -ARCHFLAGS= cr -RANLIB = echo -# + # Location of the extended-precision BLAS (XBLAS) Fortran library # used for building and testing extended-precision routines. The -# relevant routines will be compiled and XBLAS will be linked only if -# USEXBLAS is defined. -# -# USEXBLAS = Yes -XBLASLIB = -# XBLASLIB = -lxblas +# relevant routines will be compiled and XBLAS will be linked only +# if USEXBLAS is defined. # +#USEXBLAS = Yes +#XBLASLIB = -lxblas + # The location of the libraries to which you will link. (The # machine-specific, optimized BLAS library should be used whenever # possible.) # #BLASLIB = ../../librefblas.a -#BLASLIB = -xlic_lib=sunperf_mt -BLASLIB = -xlic_lib=sunperf +#BLASLIB = -xlic_lib=sunperf_mt +BLASLIB = -xlic_lib=sunperf CBLASLIB = ../../libcblas.a LAPACKLIB = liblapack.a TMGLIB = libtmglib.a diff -Nru lapack-3.7.0/INSTALL/make.inc.XLF lapack-3.7.1/INSTALL/make.inc.XLF --- lapack-3.7.0/INSTALL/make.inc.XLF 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/INSTALL/make.inc.XLF 2017-06-17 22:46:53.000000000 +0000 @@ -1,77 +1,82 @@ #################################################################### # LAPACK make include file. # -# LAPACK, Version 3.6.0 # -# November 2015 # +# LAPACK, Version 3.7.0 # +# December 2016 # #################################################################### -# + SHELL = /bin/sh + +# CC is the C compiler, normally invoked with options CFLAGS. # -# Modify the FORTRAN and OPTS definitions to refer to the -# compiler and desired compiler options for your machine. NOOPT -# refers to the compiler options desired when NO OPTIMIZATION is -# selected. Define LOADER and LOADOPTS to refer to the loader and -# desired load options for your machine. +CC = xlc +CFLAGS = -O3 -qnosave + +# Modify the FORTRAN and OPTS definitions to refer to the compiler +# and desired compiler options for your machine. NOOPT refers to +# the compiler options desired when NO OPTIMIZATION is selected. # -FORTRAN = xlf -OPTS = -O3 -qfixed -qnosave +FORTRAN = xlf +OPTS = -O3 -qfixed -qnosave # For -O2, add -qstrict=none -DRVOPTS = $(OPTS) -NOOPT = -O0 -qfixed -qnosave +DRVOPTS = $(OPTS) +NOOPT = -O0 -qfixed -qnosave + +# Define LOADER and LOADOPTS to refer to the loader and desired +# load options for your machine. +# LOADER = xlf LOADOPTS = -qnosave + +# The archiver and the flag(s) to use when building an archive +# (library). If your system has no ranlib, set RANLIB = echo. +# +ARCH = ar +ARCHFLAGS = cr +RANLIB = ranlib + +# Timer for the SECOND and DSECND routines +# +# Default: SECOND and DSECND will use a call to the +# EXTERNAL FUNCTION ETIME +#TIMER = EXT_ETIME +# For RS6K: SECOND and DSECND will use a call to the +# EXTERNAL FUNCTION ETIME_ +TIMER = EXT_ETIME_ +# For gfortran compiler: SECOND and DSECND will use a call to the +# INTERNAL FUNCTION ETIME +#TIMER = INT_ETIME +# If your Fortran compiler does not provide etime (like Nag Fortran +# Compiler, etc...) SECOND and DSECND will use a call to the +# INTERNAL FUNCTION CPU_TIME +#TIMER = INT_CPU_TIME +# If none of these work, you can use the NONE value. +# In that case, SECOND and DSECND will always return 0. +#TIMER = NONE + +# Uncomment the following line to include deprecated routines in +# the LAPACK library. +# +#BUILD_DEPRECATED = Yes + +# LAPACKE has the interface to some routines from tmglib. +# If LAPACKE_WITH_TMG is defined, add those routines to LAPACKE. # -# Timer for the SECOND and DSECND routines -# -# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME -#TIMER = EXT_ETIME -# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_ -TIMER = EXT_ETIME_ -# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME -# TIMER = INT_ETIME -# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...) -# SECOND and DSECND will use a call to the INTERNAL FUNCTION CPU_TIME -# TIMER = INT_CPU_TIME -# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0 -# TIMER = NONE -# -# Configuration LAPACKE: Native C interface to LAPACK -# To generate LAPACKE library: type 'make lapackelib' -# Configuration file: turned off (default) -# Complex types: C99 (default) -# Name pattern: mixed case (default) -# (64-bit) Data model: LP64 (default) -# -# CC is the C compiler, normally invoked with options CFLAGS. -# -CC = xlc -CFLAGS = -O3 -qnosave -# -# LAPACKE has also the interface to some routines from tmglib, -# if LAPACKE_WITH_TMG is selected, we need to add those routines to LAPACKE #LAPACKE_WITH_TMG = Yes -# -# The archiver and the flag(s) to use when building archive (library) -# If you system has no ranlib, set RANLIB = echo. -# -ARCH = ar -ARCHFLAGS= cr -RANLIB = ranlib -# + # Location of the extended-precision BLAS (XBLAS) Fortran library # used for building and testing extended-precision routines. The -# relevant routines will be compiled and XBLAS will be linked only if -# USEXBLAS is defined. -# -# USEXBLAS = Yes -XBLASLIB = -# XBLASLIB = -lxblas +# relevant routines will be compiled and XBLAS will be linked only +# if USEXBLAS is defined. # +#USEXBLAS = Yes +#XBLASLIB = -lxblas + # The location of the libraries to which you will link. (The # machine-specific, optimized BLAS library should be used whenever # possible.) # #BLASLIB = ../../librefblas.a -BLASLIB = -lessl +BLASLIB = -lessl CBLASLIB = ../../libcblas.a LAPACKLIB = liblapack.a TMGLIB = libtmglib.a diff -Nru lapack-3.7.0/LAPACKE/CMakeLists.txt lapack-3.7.1/LAPACKE/CMakeLists.txt --- lapack-3.7.0/LAPACKE/CMakeLists.txt 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/CMakeLists.txt 2017-06-17 22:46:53.000000000 +0000 @@ -36,26 +36,38 @@ endmacro() append_subdir_files(LAPACKE_INCLUDE "include") -append_subdir_files(SRC_OBJ "src") -append_subdir_files(SRCX_OBJ "src") -append_subdir_files(MATGEN_OBJ "src") -append_subdir_files(UTILS_OBJ "utils") +append_subdir_files(SOURCES "src") +append_subdir_files(DEPRECATED "src") +append_subdir_files(EXTENDED "src") +append_subdir_files(MATGEN "src") +append_subdir_files(UTILS "utils") +if(BUILD_DEPRECATED) + list(APPEND SOURCES ${DEPRECATED}) +endif() if(USE_XBLAS) - add_library(lapacke ${SRC_OBJ} ${SRCX_OBJ} ${UTILS_OBJ}) - target_link_libraries(lapacke ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES} ${XBLAS_LIBRARY}) -else() - if(LAPACKE_WITH_TMG) - add_library(lapacke ${SRC_OBJ} ${MATGEN_OBJ} ${UTILS_OBJ}) - target_link_libraries(lapacke tmglib ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) - else() - add_library(lapacke ${SRC_OBJ} ${UTILS_OBJ}) - target_link_libraries(lapacke ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) - endif() + list(APPEND SOURCES ${EXTENDED}) +endif() +if(LAPACKE_WITH_TMG) + list(APPEND SOURCES ${MATGEN}) +endif() +list(APPEND SOURCES ${UTILS}) + +add_library(lapacke ${SOURCES}) +set_target_properties( + lapacke PROPERTIES + LINKER_LANGUAGE C + VERSION ${LAPACK_VERSION} + SOVERSION ${LAPACK_MAJOR_VERSION} + ) + +if(LAPACKE_WITH_TMG) + target_link_libraries(lapacke PRIVATE tmglib) endif() +target_link_libraries(lapacke PRIVATE ${LAPACK_LIBRARIES}) lapack_install_library(lapacke) -install(FILES ${LAPACKE_INCLUDE} ${LAPACK_BINARY_DIR}/include/lapacke_mangling.h DESTINATION include) +install(FILES ${LAPACKE_INCLUDE} ${LAPACK_BINARY_DIR}/include/lapacke_mangling.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) if(BUILD_TESTING) add_subdirectory(example) @@ -78,8 +90,8 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/lapacke-config.cmake ${LAPACK_BINARY_DIR}/lapacke-config-version.cmake - DESTINATION ${LIBRARY_DIR}/cmake/lapacke-${LAPACK_VERSION} + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/lapacke-${LAPACK_VERSION} ) install(EXPORT lapacke-targets - DESTINATION ${LIBRARY_DIR}/cmake/lapacke-${LAPACK_VERSION}) + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/lapacke-${LAPACK_VERSION}) diff -Nru lapack-3.7.0/LAPACKE/example/CMakeLists.txt lapack-3.7.1/LAPACKE/example/CMakeLists.txt --- lapack-3.7.0/LAPACKE/example/CMakeLists.txt 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/example/CMakeLists.txt 2017-06-17 22:46:53.000000000 +0000 @@ -3,10 +3,10 @@ add_executable(xexample_DGELS_rowmajor example_DGELS_rowmajor.c lapacke_example_aux.c lapacke_example_aux.h) add_executable(xexample_DGELS_colmajor example_DGELS_colmajor.c lapacke_example_aux.c lapacke_example_aux.h) -target_link_libraries(xexample_DGESV_rowmajor lapacke ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) -target_link_libraries(xexample_DGESV_colmajor lapacke ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) -target_link_libraries(xexample_DGELS_rowmajor lapacke ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) -target_link_libraries(xexample_DGELS_colmajor lapacke ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) +target_link_libraries(xexample_DGESV_rowmajor lapacke) +target_link_libraries(xexample_DGESV_colmajor lapacke) +target_link_libraries(xexample_DGELS_rowmajor lapacke) +target_link_libraries(xexample_DGELS_colmajor lapacke) add_test(example_DGESV_rowmajor ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/xexample_DGESV_rowmajor) add_test(example_DGESV_colmajor ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/xexample_DGESV_colmajor) diff -Nru lapack-3.7.0/LAPACKE/example/Makefile lapack-3.7.1/LAPACKE/example/Makefile --- lapack-3.7.0/LAPACKE/example/Makefile 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/example/Makefile 2017-06-17 22:46:53.000000000 +0000 @@ -9,23 +9,26 @@ # Double Precision Examples xexample_DGESV_rowmajor: example_DGESV_rowmajor.o lapacke_example_aux.o $(LIBRARIES) - $(LOADER) $(LOADOPTS) -o $@ example_DGESV_rowmajor.o lapacke_example_aux.o $(LIBRARIES) + $(LOADER) $(LOADOPTS) -o $@ $^ ./$@ xexample_DGESV_colmajor: example_DGESV_colmajor.o lapacke_example_aux.o $(LIBRARIES) - $(LOADER) $(LOADOPTS) -o $@ example_DGESV_colmajor.o lapacke_example_aux.o $(LIBRARIES) + $(LOADER) $(LOADOPTS) -o $@ $^ ./$@ xexample_DGELS_rowmajor: example_DGELS_rowmajor.o lapacke_example_aux.o $(LIBRARIES) - $(LOADER) $(LOADOPTS) -o $@ example_DGELS_rowmajor.o lapacke_example_aux.o $(LIBRARIES) + $(LOADER) $(LOADOPTS) -o $@ $^ ./$@ xexample_DGELS_colmajor: example_DGELS_colmajor.o lapacke_example_aux.o $(LIBRARIES) - $(LOADER) $(LOADOPTS) -o $@ example_DGELS_colmajor.o lapacke_example_aux.o $(LIBRARIES) + $(LOADER) $(LOADOPTS) -o $@ $^ ./$@ +clean: cleanobj cleanexe +cleanobj: + rm -f *.o +cleanexe: + rm -f x* + .c.o: $(CC) $(CFLAGS) -I. -I../include -c -o $@ $< - -clean: - rm -f *.o x* diff -Nru lapack-3.7.0/LAPACKE/include/lapacke.h lapack-3.7.1/LAPACKE/include/lapacke.h --- lapack-3.7.0/LAPACKE/include/lapacke.h 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/include/lapacke.h 2017-06-17 22:46:53.000000000 +0000 @@ -2533,6 +2533,11 @@ lapack_int LAPACKE_slasrt( char id, lapack_int n, float* d ); lapack_int LAPACKE_dlasrt( char id, lapack_int n, double* d ); +lapack_int LAPACKE_slassq( lapack_int n, float* x, lapack_int incx, float* scale, float* sumsq ); +lapack_int LAPACKE_dlassq( lapack_int n, double* x, lapack_int incx, double* scale, double* sumsq ); +lapack_int LAPACKE_classq( lapack_int n, lapack_complex_float* x, lapack_int incx, float* scale, float* sumsq ); +lapack_int LAPACKE_zlassq( lapack_int n, lapack_complex_double* x, lapack_int incx, double* scale, double* sumsq ); + lapack_int LAPACKE_slaswp( int matrix_layout, lapack_int n, float* a, lapack_int lda, lapack_int k1, lapack_int k2, const lapack_int* ipiv, lapack_int incx ); @@ -5759,35 +5764,35 @@ lapack_int lwork, double* rwork ); lapack_int LAPACKE_sgesvdx_work( int matrix_layout, char jobu, char jobvt, char range, - lapack_int m, lapack_int n, float* a, - lapack_int lda, float vl, float vu, - lapack_int il, lapack_int iu, lapack_int* ns, - float* s, float* u, lapack_int ldu, - float* vt, lapack_int ldvt, - float* work, lapack_int lwork, lapack_int* iwork ); + lapack_int m, lapack_int n, float* a, + lapack_int lda, float vl, float vu, + lapack_int il, lapack_int iu, lapack_int* ns, + float* s, float* u, lapack_int ldu, + float* vt, lapack_int ldvt, + float* work, lapack_int lwork, lapack_int* iwork ); lapack_int LAPACKE_dgesvdx_work( int matrix_layout, char jobu, char jobvt, char range, - lapack_int m, lapack_int n, double* a, - lapack_int lda, double vl, double vu, - lapack_int il, lapack_int iu, lapack_int* ns, - double* s, double* u, lapack_int ldu, - double* vt, lapack_int ldvt, - double* work, lapack_int lwork, lapack_int* iwork ); + lapack_int m, lapack_int n, double* a, + lapack_int lda, double vl, double vu, + lapack_int il, lapack_int iu, lapack_int* ns, + double* s, double* u, lapack_int ldu, + double* vt, lapack_int ldvt, + double* work, lapack_int lwork, lapack_int* iwork ); lapack_int LAPACKE_cgesvdx_work( int matrix_layout, char jobu, char jobvt, char range, - lapack_int m, lapack_int n, lapack_complex_float* a, - lapack_int lda, float vl, float vu, - lapack_int il, lapack_int iu, lapack_int* ns, - float* s, lapack_complex_float* u, lapack_int ldu, - lapack_complex_float* vt, lapack_int ldvt, - lapack_complex_float* work, lapack_int lwork, - float* rwork, lapack_int* iwork ); + lapack_int m, lapack_int n, lapack_complex_float* a, + lapack_int lda, float vl, float vu, + lapack_int il, lapack_int iu, lapack_int* ns, + float* s, lapack_complex_float* u, lapack_int ldu, + lapack_complex_float* vt, lapack_int ldvt, + lapack_complex_float* work, lapack_int lwork, + float* rwork, lapack_int* iwork ); lapack_int LAPACKE_zgesvdx_work( int matrix_layout, char jobu, char jobvt, char range, - lapack_int m, lapack_int n, lapack_complex_double* a, - lapack_int lda, double vl, double vu, - lapack_int il, lapack_int iu, lapack_int* ns, - double* s, lapack_complex_double* u, lapack_int ldu, - lapack_complex_double* vt, lapack_int ldvt, - lapack_complex_double* work, lapack_int lwork, - double* rwork, lapack_int* iwork ); + lapack_int m, lapack_int n, lapack_complex_double* a, + lapack_int lda, double vl, double vu, + lapack_int il, lapack_int iu, lapack_int* ns, + double* s, lapack_complex_double* u, lapack_int ldu, + lapack_complex_double* vt, lapack_int ldvt, + lapack_complex_double* work, lapack_int lwork, + double* rwork, lapack_int* iwork ); lapack_int LAPACKE_sgesvj_work( int matrix_layout, char joba, char jobu, char jobv, lapack_int m, lapack_int n, float* a, @@ -5804,7 +5809,7 @@ lapack_int lda, float* sva, lapack_int mv, lapack_complex_float* v, lapack_int ldv, lapack_complex_float* cwork, lapack_int lwork, - float* rwork,lapack_int lrwork ); + float* rwork,lapack_int lrwork ); lapack_int LAPACKE_zgesvj_work( int matrix_layout, char joba, char jobu, char jobv, lapack_int m, lapack_int n, lapack_complex_double* a, lapack_int lda, double* sva, @@ -7729,6 +7734,11 @@ lapack_int LAPACKE_slasrt_work( char id, lapack_int n, float* d ); lapack_int LAPACKE_dlasrt_work( char id, lapack_int n, double* d ); +lapack_int LAPACKE_slassq_work( lapack_int n, float* x, lapack_int incx, float* scale, float* sumsq ); +lapack_int LAPACKE_dlassq_work( lapack_int n, double* x, lapack_int incx, double* scale, double* sumsq ); +lapack_int LAPACKE_classq_work( lapack_int n, lapack_complex_float* x, lapack_int incx, float* scale, float* sumsq ); +lapack_int LAPACKE_zlassq_work( lapack_int n, lapack_complex_double* x, lapack_int incx, double* scale, double* sumsq ); + lapack_int LAPACKE_slaswp_work( int matrix_layout, lapack_int n, float* a, lapack_int lda, lapack_int k1, lapack_int k2, const lapack_int* ipiv, lapack_int incx ); @@ -11619,7 +11629,7 @@ lapack_int lda, lapack_complex_double* e, lapack_int* ipiv, lapack_complex_double* b, lapack_int ldb, lapack_complex_double* work, lapack_int lwork ); - + lapack_int LAPACKE_ssytrf_rk( int matrix_layout, char uplo, lapack_int n, float* a, lapack_int lda, float* e, lapack_int* ipiv ); lapack_int LAPACKE_dsytrf_rk( int matrix_layout, char uplo, lapack_int n, double* a, @@ -11773,12 +11783,12 @@ const lapack_int* ipiv, float anorm, float* rcond ); lapack_int LAPACKE_zsycon_3( int matrix_layout, char uplo, lapack_int n, const lapack_complex_double* a, lapack_int lda, - const lapack_complex_double* e, + const lapack_complex_double* e, const lapack_int* ipiv, double anorm, double* rcond ); lapack_int LAPACKE_checon_3( int matrix_layout, char uplo, lapack_int n, const lapack_complex_float* a, lapack_int lda, - const lapack_complex_float* e, + const lapack_complex_float* e, const lapack_int* ipiv, float anorm, float* rcond ); lapack_int LAPACKE_zhecon_3( int matrix_layout, char uplo, lapack_int n, const lapack_complex_double* a, lapack_int lda, @@ -11803,7 +11813,7 @@ const lapack_complex_double* a, lapack_int lda, const lapack_complex_double* e, const lapack_int* ipiv, double anorm, - double* rcond, lapack_complex_double* work ); + double* rcond, lapack_complex_double* work ); lapack_int LAPACKE_checon_3_work( int matrix_layout, char uplo, lapack_int n, const lapack_complex_float* a, lapack_int lda, const lapack_complex_float* e, @@ -13359,6 +13369,10 @@ #define LAPACK_dlarfg LAPACK_GLOBAL(dlarfg,DLARFG) #define LAPACK_clarfg LAPACK_GLOBAL(clarfg,CLARFG) #define LAPACK_zlarfg LAPACK_GLOBAL(zlarfg,ZLARFG) +#define LAPACK_slassq LAPACK_GLOBAL(slassq,SLASSQ) +#define LAPACK_dlassq LAPACK_GLOBAL(dlassq,DLASSQ) +#define LAPACK_classq LAPACK_GLOBAL(classq,CLASSQ) +#define LAPACK_zlassq LAPACK_GLOBAL(zlassq,ZLASSQ) #define LAPACK_slarft LAPACK_GLOBAL(slarft,SLARFT) #define LAPACK_dlarft LAPACK_GLOBAL(dlarft,DLARFT) #define LAPACK_clarft LAPACK_GLOBAL(clarft,CLARFT) @@ -17943,6 +17957,10 @@ void LAPACK_zlarfg( lapack_int* n, lapack_complex_double* alpha, lapack_complex_double* x, lapack_int* incx, lapack_complex_double* tau ); +void LAPACK_slassq( lapack_int *n, float* x, lapack_int *incx, float* scale, float* sumsq ); +void LAPACK_dlassq( lapack_int *n, double* x, lapack_int *incx, double* scale, double* sumsq ); +void LAPACK_classq( lapack_int *n, lapack_complex_float* x, lapack_int *incx, float* scale, float* sumsq ); +void LAPACK_zlassq( lapack_int *n, lapack_complex_double* x, lapack_int *incx, double* scale, double* sumsq ); void LAPACK_slarft( char* direct, char* storev, lapack_int* n, lapack_int* k, const float* v, lapack_int* ldv, const float* tau, float* t, lapack_int* ldt ); @@ -18758,7 +18776,7 @@ const lapack_int* ipiv, lapack_complex_double* b, lapack_int* ldb, lapack_int *info ); -void LAPACK_ssytri_3( char* uplo, lapack_int* n, float* a, lapack_int* lda, const float* e, +void LAPACK_ssytri_3( char* uplo, lapack_int* n, float* a, lapack_int* lda, const float* e, const lapack_int* ipiv, float* work, lapack_int* lwork, lapack_int *info ); void LAPACK_dsytri_3( char* uplo, lapack_int* n, double* a, lapack_int* lda, const double* e, const lapack_int* ipiv, double* work, lapack_int* lwork, lapack_int *info ); @@ -18775,7 +18793,7 @@ lapack_int* lda, const lapack_complex_double* e, const lapack_int* ipiv, lapack_complex_double* work, lapack_int* lwork, lapack_int *info ); -void LAPACK_ssycon_3( char* uplo, lapack_int* n, const float* a, lapack_int* lda, const float* e, +void LAPACK_ssycon_3( char* uplo, lapack_int* n, const float* a, lapack_int* lda, const float* e, const lapack_int* ipiv, float* anorm, float* rcond, float* work, lapack_int* iwork, lapack_int *info ); void LAPACK_dsycon_3( char* uplo, lapack_int* n, const double* a, lapack_int* lda, const double* e, diff -Nru lapack-3.7.0/LAPACKE/lapacke.pc.in lapack-3.7.1/LAPACKE/lapacke.pc.in --- lapack-3.7.0/LAPACKE/lapacke.pc.in 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/lapacke.pc.in 2017-06-17 22:46:53.000000000 +0000 @@ -1,9 +1,10 @@ -prefix=@prefix@ -libdir=@libdir@ +libdir=@CMAKE_INSTALL_FULL_LIBDIR@ +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ Name: LAPACKE Description: C Standard Interface to LAPACK Linear Algebra PACKage Version: @LAPACK_VERSION@ URL: http://www.netlib.org/lapack/#_standard_c_language_apis_for_lapack Libs: -L${libdir} -llapacke -Requires: lapack blas +Cflags: -I${includedir} +Requires.private: lapack diff -Nru lapack-3.7.0/LAPACKE/Makefile lapack-3.7.1/LAPACKE/Makefile --- lapack-3.7.0/LAPACKE/Makefile 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/Makefile 2017-06-17 22:46:53.000000000 +0000 @@ -35,7 +35,7 @@ # To generate lapacke library type 'make lapacke' # To make both just type 'make' # -# To remove lapacke object files type 'make cleanlib' +# To remove lapacke object files type 'make cleanobj' # To clean all above type 'make clean' # To clean everything including lapacke library type # 'make cleanall' @@ -44,20 +44,25 @@ all: lapacke -lapacke: - cd include && cp lapacke_mangling_with_flags.h.in lapacke_mangling.h - cd src && $(MAKE) - cd utils && $(MAKE) +lapacke: include/lapacke_mangling.h + $(MAKE) -C src + $(MAKE) -C utils -lapacke_example: - cd example && $(MAKE) +include/lapacke_mangling.h: include/lapacke_mangling_with_flags.h.in + cp $< $@ -clean: cleanlib +lapacke_example: lapacke + $(MAKE) -C example +clean: cleanlib + $(MAKE) -C src clean + $(MAKE) -C utils clean + $(MAKE) -C example clean +cleanobj: + $(MAKE) -C src cleanobj + $(MAKE) -C utils cleanobj + $(MAKE) -C example cleanobj cleanlib: - cd src && $(MAKE) clean - cd utils && $(MAKE) clean - -cleanall: clean - rm -f $(LAPACKE) - cd example && $(MAKE) clean + rm -f ../$(LAPACKELIB) +cleanexe: + $(MAKE) -C example cleanexe diff -Nru lapack-3.7.0/LAPACKE/src/CMakeLists.txt lapack-3.7.1/LAPACKE/src/CMakeLists.txt --- lapack-3.7.0/LAPACKE/src/CMakeLists.txt 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/CMakeLists.txt 2017-06-17 22:46:53.000000000 +0000 @@ -1,6 +1,4 @@ -#aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR} SRC_OBJ) - -set(SRC_OBJ +set(SOURCES lapacke_cbbcsd.c lapacke_cbbcsd_work.c lapacke_cbdsqr.c @@ -47,6 +45,8 @@ lapacke_cgehrd_work.c lapacke_cgejsv.c lapacke_cgejsv_work.c +lapacke_cgelq.c +lapacke_cgelq_work.c lapacke_cgelq2.c lapacke_cgelq2_work.c lapacke_cgelqf.c @@ -59,6 +59,8 @@ lapacke_cgelss_work.c lapacke_cgelsy.c lapacke_cgelsy_work.c +lapacke_cgemlq.c +lapacke_cgemlq_work.c lapacke_cgemqr.c lapacke_cgemqr_work.c lapacke_cgemqrt.c @@ -67,6 +69,8 @@ lapacke_cgeqlf_work.c lapacke_cgeqp3.c lapacke_cgeqp3_work.c +lapacke_cgeqr.c +lapacke_cgeqr_work.c lapacke_cgeqr2.c lapacke_cgeqr2_work.c lapacke_cgeqrf.c @@ -319,6 +323,8 @@ lapacke_clascl_work.c lapacke_claset.c lapacke_claset_work.c +lapacke_classq.c +lapacke_classq_work.c lapacke_claswp.c lapacke_claswp_work.c lapacke_clauum.c @@ -631,6 +637,8 @@ lapacke_dgehrd_work.c lapacke_dgejsv.c lapacke_dgejsv_work.c +lapacke_dgelq.c +lapacke_dgelq_work.c lapacke_dgelq2.c lapacke_dgelq2_work.c lapacke_dgelqf.c @@ -643,6 +651,8 @@ lapacke_dgelss_work.c lapacke_dgelsy.c lapacke_dgelsy_work.c +lapacke_dgemlq.c +lapacke_dgemlq_work.c lapacke_dgemqr.c lapacke_dgemqr_work.c lapacke_dgemqrt.c @@ -651,6 +661,8 @@ lapacke_dgeqlf_work.c lapacke_dgeqp3.c lapacke_dgeqp3_work.c +lapacke_dgeqr.c +lapacke_dgeqr_work.c lapacke_dgeqr2.c lapacke_dgeqr2_work.c lapacke_dgeqrf.c @@ -783,6 +795,8 @@ lapacke_dlaset_work.c lapacke_dlasrt.c lapacke_dlasrt_work.c +lapacke_dlassq.c +lapacke_dlassq_work.c lapacke_dlaswp.c lapacke_dlaswp_work.c lapacke_dlauum.c @@ -1179,6 +1193,8 @@ lapacke_sgehrd_work.c lapacke_sgejsv.c lapacke_sgejsv_work.c +lapacke_sgelq.c +lapacke_sgelq_work.c lapacke_sgelq2.c lapacke_sgelq2_work.c lapacke_sgelqf.c @@ -1191,6 +1207,8 @@ lapacke_sgelss_work.c lapacke_sgelsy.c lapacke_sgelsy_work.c +lapacke_sgemlq.c +lapacke_sgemlq_work.c lapacke_sgemqr.c lapacke_sgemqr_work.c lapacke_sgemqrt.c @@ -1199,6 +1217,8 @@ lapacke_sgeqlf_work.c lapacke_sgeqp3.c lapacke_sgeqp3_work.c +lapacke_sgeqr.c +lapacke_sgeqr_work.c lapacke_sgeqr2.c lapacke_sgeqr2_work.c lapacke_sgeqrf.c @@ -1331,6 +1351,8 @@ lapacke_slaset_work.c lapacke_slasrt.c lapacke_slasrt_work.c +lapacke_slassq.c +lapacke_slassq_work.c lapacke_slaswp.c lapacke_slaswp_work.c lapacke_slauum.c @@ -1721,6 +1743,8 @@ lapacke_zgehrd_work.c lapacke_zgejsv.c lapacke_zgejsv_work.c +lapacke_zgelq.c +lapacke_zgelq_work.c lapacke_zgelq2.c lapacke_zgelq2_work.c lapacke_zgelqf.c @@ -1733,6 +1757,8 @@ lapacke_zgelss_work.c lapacke_zgelsy.c lapacke_zgelsy_work.c +lapacke_zgemlq.c +lapacke_zgemlq_work.c lapacke_zgemqr.c lapacke_zgemqr_work.c lapacke_zgemqrt.c @@ -1741,6 +1767,8 @@ lapacke_zgeqlf_work.c lapacke_zgeqp3.c lapacke_zgeqp3_work.c +lapacke_zgeqr.c +lapacke_zgeqr_work.c lapacke_zgeqr2.c lapacke_zgeqr2_work.c lapacke_zgeqrf.c @@ -1987,6 +2015,8 @@ lapacke_zlascl_work.c lapacke_zlaset.c lapacke_zlaset_work.c +lapacke_zlassq.c +lapacke_zlassq_work.c lapacke_zlaswp.c lapacke_zlaswp_work.c lapacke_zlauum.c @@ -2254,36 +2284,34 @@ lapacke_ilaver.c ) -if(BUILD_DEPRECATED) - list(APPEND SRC_OBJ - lapacke_cggsvp.c - lapacke_cggsvp_work.c - lapacke_dggsvp.c - lapacke_dggsvp_work.c - lapacke_sggsvp.c - lapacke_sggsvp_work.c - lapacke_zggsvp.c - lapacke_zggsvp_work.c - lapacke_cggsvd.c - lapacke_cggsvd_work.c - lapacke_dggsvd.c - lapacke_dggsvd_work.c - lapacke_sggsvd.c - lapacke_sggsvd_work.c - lapacke_zggsvd.c - lapacke_zggsvd_work.c - lapacke_cgeqpf.c - lapacke_cgeqpf_work.c - lapacke_dgeqpf.c - lapacke_dgeqpf_work.c - lapacke_sgeqpf.c - lapacke_sgeqpf_work.c - lapacke_zgeqpf.c - lapacke_zgeqpf_work.c) - message(STATUS "Building LAPACKE deprecated routines") -endif() +set(DEPRECATED +lapacke_cggsvp.c +lapacke_cggsvp_work.c +lapacke_dggsvp.c +lapacke_dggsvp_work.c +lapacke_sggsvp.c +lapacke_sggsvp_work.c +lapacke_zggsvp.c +lapacke_zggsvp_work.c +lapacke_cggsvd.c +lapacke_cggsvd_work.c +lapacke_dggsvd.c +lapacke_dggsvd_work.c +lapacke_sggsvd.c +lapacke_sggsvd_work.c +lapacke_zggsvd.c +lapacke_zggsvd_work.c +lapacke_cgeqpf.c +lapacke_cgeqpf_work.c +lapacke_dgeqpf.c +lapacke_dgeqpf_work.c +lapacke_sgeqpf.c +lapacke_sgeqpf_work.c +lapacke_zgeqpf.c +lapacke_zgeqpf_work.c +) -set(SRCX_OBJ +set(EXTENDED lapacke_cgbrfsx.c lapacke_cporfsx.c lapacke_dgerfsx.c lapacke_sgbrfsx.c lapacke_ssyrfsx.c lapacke_zherfsx.c lapacke_cgbrfsx_work.c lapacke_cporfsx_work.c lapacke_dgerfsx_work.c lapacke_sgbrfsx_work.c lapacke_ssyrfsx_work.c lapacke_zherfsx_work.c lapacke_cgerfsx.c lapacke_csyrfsx.c lapacke_dporfsx.c lapacke_sgerfsx.c lapacke_zgbrfsx.c lapacke_zporfsx.c @@ -2299,7 +2327,7 @@ ) # FILE PARTS OF TMGLIB -set(MATGEN_OBJ +set(MATGEN lapacke_clatms.c lapacke_clatms_work.c lapacke_dlatms.c diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_cbbcsd.c lapack-3.7.1/LAPACKE/src/lapacke_cbbcsd.c --- lapack-3.7.0/LAPACKE/src/lapacke_cbbcsd.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_cbbcsd.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function cbbcsd * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -47,17 +47,18 @@ lapack_int lrwork = -1; float* rwork = NULL; float rwork_query; - lapack_int nrows_u1, nrows_u2, nrows_v1t, nrows_v2t; + int lapack_layout; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_cbbcsd", -1 ); return -1; } + if( LAPACKE_lsame( trans, 'n' ) && matrix_layout == LAPACK_COL_MAJOR ) { + lapack_layout = LAPACK_COL_MAJOR; + } else { + lapack_layout = LAPACK_ROW_MAJOR; + } #ifndef LAPACK_DISABLE_NAN_CHECK /* Optionally check input matrices for NaNs */ - nrows_u1 = ( LAPACKE_lsame( jobu1, 'y' ) ? p : 1); - nrows_u2 = ( LAPACKE_lsame( jobu2, 'y' ) ? m-p : 1); - nrows_v1t = ( LAPACKE_lsame( jobv1t, 'y' ) ? q : 1); - nrows_v2t = ( LAPACKE_lsame( jobv2t, 'y' ) ? m-q : 1); if( LAPACKE_s_nancheck( q-1, phi, 1 ) ) { return -11; } @@ -65,22 +66,22 @@ return -10; } if( LAPACKE_lsame( jobu1, 'y' ) ) { - if( LAPACKE_cge_nancheck( matrix_layout, nrows_u1, p, u1, ldu1 ) ) { + if( LAPACKE_cge_nancheck( lapack_layout, p, p, u1, ldu1 ) ) { return -12; } } if( LAPACKE_lsame( jobu2, 'y' ) ) { - if( LAPACKE_cge_nancheck( matrix_layout, nrows_u2, m-p, u2, ldu2 ) ) { + if( LAPACKE_cge_nancheck( lapack_layout, m-p, m-p, u2, ldu2 ) ) { return -14; } } if( LAPACKE_lsame( jobv1t, 'y' ) ) { - if( LAPACKE_cge_nancheck( matrix_layout, nrows_v1t, q, v1t, ldv1t ) ) { + if( LAPACKE_cge_nancheck( lapack_layout, q, q, v1t, ldv1t ) ) { return -16; } } if( LAPACKE_lsame( jobv2t, 'y' ) ) { - if( LAPACKE_cge_nancheck( matrix_layout, nrows_v2t, m-q, v2t, ldv2t ) ) { + if( LAPACKE_cge_nancheck( lapack_layout, m-q, m-q, v2t, ldv2t ) ) { return -18; } } diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_cbbcsd_work.c lapack-3.7.1/LAPACKE/src/lapacke_cbbcsd_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_cbbcsd_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_cbbcsd_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function cbbcsd * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -47,156 +47,36 @@ lapack_int lrwork ) { lapack_int info = 0; - if( matrix_layout == LAPACK_COL_MAJOR ) { + /* LAPACK function works with matrices in both layouts. It is supported + * through TRANS parameter. So all conversion between layouts can be + * completed in LAPACK function. See the table below which describes how + * every LAPACKE call is forwarded to corresponding LAPACK call. + * + * matrix_layout | trans_LAPACKE | -> trans_LAPACK + * | (trans) | (ltrans) + * -----------------+---------------+---------------- + * LAPACK_COL_MAJOR | 'N' | -> 'N' + * LAPACK_COL_MAJOR | 'T' | -> 'T' + * LAPACK_ROW_MAJOR | 'N' | -> 'T' + * LAPACK_ROW_MAJOR | 'T' | -> 'T' + * (note that for row major layout trans parameter is ignored) + */ + if( matrix_layout == LAPACK_COL_MAJOR || + matrix_layout == LAPACK_ROW_MAJOR ) { + char ltrans; + if( !LAPACKE_lsame( trans, 't' ) && matrix_layout == LAPACK_COL_MAJOR ) { + ltrans = 'n'; + } else { + ltrans = 't'; + } /* Call LAPACK function and adjust info */ - LAPACK_cbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &m, &p, &q, + LAPACK_cbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, <rans, &m, &p, &q, theta, phi, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, v2t, &ldv2t, b11d, b11e, b12d, b12e, b21d, b21e, b22d, b22e, rwork, &lrwork, &info ); if( info < 0 ) { info = info - 1; } - } else if( matrix_layout == LAPACK_ROW_MAJOR ) { - lapack_int nrows_u1 = ( LAPACKE_lsame( jobu1, 'y' ) ? p : 1); - lapack_int nrows_u2 = ( LAPACKE_lsame( jobu2, 'y' ) ? m-p : 1); - lapack_int nrows_v1t = ( LAPACKE_lsame( jobv1t, 'y' ) ? q : 1); - lapack_int nrows_v2t = ( LAPACKE_lsame( jobv2t, 'y' ) ? m-q : 1); - lapack_int ldu1_t = MAX(1,nrows_u1); - lapack_int ldu2_t = MAX(1,nrows_u2); - lapack_int ldv1t_t = MAX(1,nrows_v1t); - lapack_int ldv2t_t = MAX(1,nrows_v2t); - lapack_complex_float* u1_t = NULL; - lapack_complex_float* u2_t = NULL; - lapack_complex_float* v1t_t = NULL; - lapack_complex_float* v2t_t = NULL; - /* Check leading dimension(s) */ - if( ldu1 < p ) { - info = -13; - LAPACKE_xerbla( "LAPACKE_cbbcsd_work", info ); - return info; - } - if( ldu2 < m-p ) { - info = -15; - LAPACKE_xerbla( "LAPACKE_cbbcsd_work", info ); - return info; - } - if( ldv1t < q ) { - info = -17; - LAPACKE_xerbla( "LAPACKE_cbbcsd_work", info ); - return info; - } - if( ldv2t < m-q ) { - info = -19; - LAPACKE_xerbla( "LAPACKE_cbbcsd_work", info ); - return info; - } - /* Query optimal working array(s) size if requested */ - if( lrwork == -1 ) { - LAPACK_cbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &m, &p, &q, - theta, phi, u1, &ldu1_t, u2, &ldu2_t, v1t, &ldv1t_t, - v2t, &ldv2t_t, b11d, b11e, b12d, b12e, b21d, b21e, - b22d, b22e, rwork, &lrwork, &info ); - return (info < 0) ? (info - 1) : info; - } - /* Allocate memory for temporary array(s) */ - if( LAPACKE_lsame( jobu1, 'y' ) ) { - u1_t = (lapack_complex_float*) - LAPACKE_malloc( sizeof(lapack_complex_float) * - ldu1_t * MAX(1,p) ); - if( u1_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_0; - } - } - if( LAPACKE_lsame( jobu2, 'y' ) ) { - u2_t = (lapack_complex_float*) - LAPACKE_malloc( sizeof(lapack_complex_float) * - ldu2_t * MAX(1,m-p) ); - if( u2_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_1; - } - } - if( LAPACKE_lsame( jobv1t, 'y' ) ) { - v1t_t = (lapack_complex_float*) - LAPACKE_malloc( sizeof(lapack_complex_float) * - ldv1t_t * MAX(1,q) ); - if( v1t_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_2; - } - } - if( LAPACKE_lsame( jobv2t, 'y' ) ) { - v2t_t = (lapack_complex_float*) - LAPACKE_malloc( sizeof(lapack_complex_float) * - ldv2t_t * MAX(1,m-q) ); - if( v2t_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_3; - } - } - /* Transpose input matrices */ - if( LAPACKE_lsame( jobu1, 'y' ) ) { - LAPACKE_cge_trans( matrix_layout, nrows_u1, p, u1, ldu1, u1_t, - ldu1_t ); - } - if( LAPACKE_lsame( jobu2, 'y' ) ) { - LAPACKE_cge_trans( matrix_layout, nrows_u2, m-p, u2, ldu2, u2_t, - ldu2_t ); - } - if( LAPACKE_lsame( jobv1t, 'y' ) ) { - LAPACKE_cge_trans( matrix_layout, nrows_v1t, q, v1t, ldv1t, v1t_t, - ldv1t_t ); - } - if( LAPACKE_lsame( jobv2t, 'y' ) ) { - LAPACKE_cge_trans( matrix_layout, nrows_v2t, m-q, v2t, ldv2t, v2t_t, - ldv2t_t ); - } - /* Call LAPACK function and adjust info */ - LAPACK_cbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &m, &p, &q, - theta, phi, u1_t, &ldu1_t, u2_t, &ldu2_t, v1t_t, - &ldv1t_t, v2t_t, &ldv2t_t, b11d, b11e, b12d, b12e, b21d, - b21e, b22d, b22e, rwork, &lrwork, &info ); - if( info < 0 ) { - info = info - 1; - } - /* Transpose output matrices */ - if( LAPACKE_lsame( jobu1, 'y' ) ) { - LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_u1, p, u1_t, ldu1_t, u1, - ldu1 ); - } - if( LAPACKE_lsame( jobu2, 'y' ) ) { - LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_u2, m-p, u2_t, ldu2_t, - u2, ldu2 ); - } - if( LAPACKE_lsame( jobv1t, 'y' ) ) { - LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_v1t, q, v1t_t, ldv1t_t, - v1t, ldv1t ); - } - if( LAPACKE_lsame( jobv2t, 'y' ) ) { - LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_v2t, m-q, v2t_t, ldv2t_t, - v2t, ldv2t ); - } - /* Release memory and exit */ - if( LAPACKE_lsame( jobv2t, 'y' ) ) { - LAPACKE_free( v2t_t ); - } -exit_level_3: - if( LAPACKE_lsame( jobv1t, 'y' ) ) { - LAPACKE_free( v1t_t ); - } -exit_level_2: - if( LAPACKE_lsame( jobu2, 'y' ) ) { - LAPACKE_free( u2_t ); - } -exit_level_1: - if( LAPACKE_lsame( jobu1, 'y' ) ) { - LAPACKE_free( u1_t ); - } -exit_level_0: - if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) { - LAPACKE_xerbla( "LAPACKE_cbbcsd_work", info ); - } } else { info = -1; LAPACKE_xerbla( "LAPACKE_cbbcsd_work", info ); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_cgejsv.c lapack-3.7.1/LAPACKE/src/lapacke_cgejsv.c --- lapack-3.7.0/LAPACKE/src/lapacke_cgejsv.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_cgejsv.c 2017-06-17 22:46:53.000000000 +0000 @@ -41,22 +41,22 @@ { lapack_int info = 0; lapack_int lwork = ( - // 1.1 - ( LAPACKE_lsame( jobu, 'n' ) && LAPACKE_lsame( jobv, 'n' ) && + // 1.1 + ( LAPACKE_lsame( jobu, 'n' ) && LAPACKE_lsame( jobv, 'n' ) && ( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) )) ? 2*n+1 : //1.2 - ( ( LAPACKE_lsame( jobu, 'n' ) && LAPACKE_lsame( jobv, 'n' ) && + ( ( LAPACKE_lsame( jobu, 'n' ) && LAPACKE_lsame( jobv, 'n' ) && !( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) )) ? n*n+3*n : //2.1 - ( ( ( LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' ) ) && - !( LAPACKE_lsame( jobu, 'u' ) || LAPACKE_lsame( jobu, 'f' ) ) && + ( ( ( LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' ) ) && + !( LAPACKE_lsame( jobu, 'u') || LAPACKE_lsame( jobu, 'f' ) )&& ( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) ))? 3*n : //2.2 - ( ( ( LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' ) ) && + ( ( ( LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' ) ) && !( LAPACKE_lsame( jobu, 'u' ) || LAPACKE_lsame( jobu, 'f' ) ) && !( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) ))? 3*n : @@ -81,8 +81,8 @@ ( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) ))? 4*n*n: 1) ) ) ) ) ) ) ); lapack_int lrwork = ( - // 1.1 - ( LAPACKE_lsame( jobu, 'n' ) && LAPACKE_lsame( jobv, 'n' ) && + // 1.1 + ( LAPACKE_lsame( jobu, 'n' ) && LAPACKE_lsame( jobv, 'n' ) && ( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) )) ? MAX(7,n+2*m) : //1.2 @@ -90,13 +90,13 @@ !( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) )) ? MAX(7,2*n) : //2.1 - ( ( ( LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' ) ) && - !( LAPACKE_lsame( jobu, 'u' ) || LAPACKE_lsame( jobu, 'f' ) ) && + ( ( ( LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' ) ) && + !( LAPACKE_lsame( jobu, 'u') || LAPACKE_lsame( jobu, 'f' ) ) && ( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) ))? MAX( 7, n+ 2*m ) : //2.2 - ( ( ( LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' ) ) && + ( ( ( LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' ) ) && !( LAPACKE_lsame( jobu, 'u' ) || LAPACKE_lsame( jobu, 'f' ) ) && !( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) ))? MAX(7,2*n) : @@ -119,7 +119,7 @@ ( ( ( LAPACKE_lsame( jobu, 'u' ) || LAPACKE_lsame( jobu, 'f' ) ) && ( LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' ) ) && ( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) ))? MAX(7,2*n) : - 7 )))))))); + 7) ) ) ) ) ) ) ); lapack_int* iwork = NULL; float* rwork = NULL; lapack_complex_float* cwork = NULL; diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_cgelq.c lapack-3.7.1/LAPACKE/src/lapacke_cgelq.c --- lapack-3.7.0/LAPACKE/src/lapacke_cgelq.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_cgelq.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,14 +28,14 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function cgelq * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" -lapack_int LAPACKE_cgelq_work( int matrix_layout, lapack_int m, lapack_int n, - lapack_complex_float* a, lapack_int lda, - lapack_complex_float* t, lapack_int tsize ) +lapack_int LAPACKE_cgelq( int matrix_layout, lapack_int m, lapack_int n, + lapack_complex_float* a, lapack_int lda, + lapack_complex_float* t, lapack_int tsize ) { lapack_int info = 0; lapack_int lwork = -1; @@ -60,7 +60,7 @@ if( tsize == -1 || tsize == -2 ) { goto exit_level_0; } - lwork = (lapack_int)work_query; + lwork = LAPACK_C2INT( work_query ); /* Allocate memory for work arrays */ work = (lapack_complex_float*)LAPACKE_malloc( sizeof(lapack_complex_float) * lwork ); if( work == NULL ) { diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_cgemlq.c lapack-3.7.1/LAPACKE/src/lapacke_cgemlq.c --- lapack-3.7.0/LAPACKE/src/lapacke_cgemlq.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_cgemlq.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function cgemlq * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -55,7 +55,7 @@ if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) { return -10; } - if( LAPACKE_d_nancheck( tsize, t, 1 ) ) { + if( LAPACKE_c_nancheck( tsize, t, 1 ) ) { return -9; } #endif @@ -65,7 +65,7 @@ if( info != 0 ) { goto exit_level_0; } - lwork = (lapack_int)work_query; + lwork = LAPACK_C2INT( work_query ); /* Allocate memory for work arrays */ work = (lapack_complex_float*)LAPACKE_malloc( sizeof(lapack_complex_float) * lwork ); if( work == NULL ) { diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_cgeqr.c lapack-3.7.1/LAPACKE/src/lapacke_cgeqr.c --- lapack-3.7.0/LAPACKE/src/lapacke_cgeqr.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_cgeqr.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function cgeqr * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -60,7 +60,7 @@ if( tsize == -1 || tsize == -2 ) { goto exit_level_0; } - lwork = (lapack_int)work_query; + lwork = LAPACK_C2INT( work_query ); /* Allocate memory for work arrays */ work = (lapack_complex_float*) LAPACKE_malloc( sizeof(lapack_complex_float) * lwork ); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_cgesdd.c lapack-3.7.1/LAPACKE/src/lapacke_cgesdd.c --- lapack-3.7.0/LAPACKE/src/lapacke_cgesdd.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_cgesdd.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function cgesdd * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -61,7 +61,7 @@ if( LAPACKE_lsame( jobz, 'n' ) ) { lrwork = MAX(1,7*MIN(m,n)); } else { - lrwork = (size_t)MIN(m,n)*MAX(5*MIN(m,n)+7,2*MAX(m,n)+2*MIN(m,n)+1); + lrwork = (size_t)MAX(1,MIN(m,n)*MAX(5*MIN(m,n)+7,2*MAX(m,n)+2*MIN(m,n)+1)); } /* Allocate memory for working array(s) */ iwork = (lapack_int*) diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_cgesvdx.c lapack-3.7.1/LAPACKE/src/lapacke_cgesvdx.c --- lapack-3.7.0/LAPACKE/src/lapacke_cgesvdx.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_cgesvdx.c 2017-06-17 22:46:53.000000000 +0000 @@ -61,7 +61,7 @@ #endif /* Query optimal working array(s) size */ info = LAPACKE_cgesvdx_work( matrix_layout, jobu, jobvt, range, - m, n, a, lda, vl, vu, il, iu, ns, s, u, + m, n, a, lda, vl, vu, il, iu, ns, s, u, ldu, vt, ldvt, &work_query, lwork, rwork, iwork ); if( info != 0 ) { goto exit_level_0; @@ -69,7 +69,7 @@ lwork = LAPACK_C2INT (work_query); /* Allocate memory for work arrays */ work = (lapack_complex_float*) - LAPACKE_malloc( sizeof(lapack_complex_float) * lwork ); + LAPACKE_malloc( sizeof(lapack_complex_float) * lwork ); if( work == NULL ) { info = LAPACK_WORK_MEMORY_ERROR; goto exit_level_1; @@ -86,8 +86,8 @@ } /* Call middle-level interface */ info = LAPACKE_cgesvdx_work( matrix_layout, jobu, jobvt, range, - m, n, a, lda, vl, vu, il, iu, ns, s, u, - ldu, vt, ldvt, work, lwork, rwork, iwork ); + m, n, a, lda, vl, vu, il, iu, ns, s, u, + ldu, vt, ldvt, work, lwork, rwork, iwork ); /* Backup significant data from working array(s) */ for( i=0; i<12*MIN(m,n)-1; i++ ) { superb[i] = iwork[i+1]; diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_cgesvdx_work.c lapack-3.7.1/LAPACKE/src/lapacke_cgesvdx_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_cgesvdx_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_cgesvdx_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -34,19 +34,19 @@ #include "lapacke_utils.h" lapack_int LAPACKE_cgesvdx_work( int matrix_layout, char jobu, char jobvt, char range, - lapack_int m, lapack_int n, lapack_complex_float* a, - lapack_int lda, float vl, float vu, - lapack_int il, lapack_int iu, lapack_int* ns, - float* s, lapack_complex_float* u, lapack_int ldu, - lapack_complex_float* vt, lapack_int ldvt, - lapack_complex_float* work, lapack_int lwork, - float* rwork, lapack_int* iwork ) + lapack_int m, lapack_int n, lapack_complex_float* a, + lapack_int lda, float vl, float vu, + lapack_int il, lapack_int iu, lapack_int* ns, + float* s, lapack_complex_float* u, lapack_int ldu, + lapack_complex_float* vt, lapack_int ldvt, + lapack_complex_float* work, lapack_int lwork, + float* rwork, lapack_int* iwork ) { lapack_int info = 0; if( matrix_layout == LAPACK_COL_MAJOR ) { /* Call LAPACK function and adjust info */ LAPACK_cgesvdx( &jobu, &jobvt, &range, &m, &n, a, &lda, &vl, &vu, - &il, &iu, ns, s, u, &ldu, vt, &ldvt, + &il, &iu, ns, s, u, &ldu, vt, &ldvt, work, &lwork, rwork, iwork, &info ); if( info < 0 ) { info = info - 1; @@ -85,7 +85,7 @@ /* Query optimal working array(s) size if requested */ if( lwork == -1 ) { LAPACK_cgesvdx( &jobu, &jobvt, &range, &m, &n, a, &lda_t, &vl, &vu, - &il, &iu, ns, s, u, &ldu_t, vt, + &il, &iu, ns, s, u, &ldu_t, vt, &ldvt_t, work, &lwork, rwork, iwork, &info ); return (info < 0) ? (info - 1) : info; } @@ -116,8 +116,8 @@ LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t ); /* Call LAPACK function and adjust info */ LAPACK_cgesvdx( &jobu, &jobvt, &range, &m, &n, a_t, &lda_t, &vl, &vu, - &il, &iu, ns, s, u_t, &ldu_t, vt_t, - &ldvt_t, work, &lwork, rwork, iwork, &info ); + &il, &iu, ns, s, u_t, &ldu_t, vt_t, + &ldvt_t, work, &lwork, rwork, iwork, &info ); if( info < 0 ) { info = info - 1; } diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_cgesvj_work.c lapack-3.7.1/LAPACKE/src/lapacke_cgesvj_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_cgesvj_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_cgesvj_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -76,7 +76,7 @@ } if( LAPACKE_lsame( jobv, 'a' ) || LAPACKE_lsame( jobv, 'v' ) ) { v_t = (lapack_complex_float*) - LAPACKE_malloc( sizeof(lapack_complex_float) * ldv_t * MAX(1,n) ); + LAPACKE_malloc( sizeof(lapack_complex_float) * ldv_t * MAX(1,n) ); if( v_t == NULL ) { info = LAPACK_TRANSPOSE_MEMORY_ERROR; goto exit_level_1; diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_cggsvd3.c lapack-3.7.1/LAPACKE/src/lapacke_cggsvd3.c --- lapack-3.7.0/LAPACKE/src/lapacke_cggsvd3.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_cggsvd3.c 2017-06-17 22:46:53.000000000 +0000 @@ -45,7 +45,7 @@ { lapack_int info = 0; float* rwork = NULL; - lapack_int lwork = -1; + lapack_int lwork = -1; lapack_complex_float* work = NULL; lapack_complex_float work_query; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { @@ -65,9 +65,9 @@ info = LAPACKE_cggsvd3_work( matrix_layout, jobu, jobv, jobq, m, n, p, k, l, a, lda, b, ldb, alpha, beta, u, ldu, v, ldv, q, ldq, &work_query, lwork, rwork, iwork ); - if( info != 0 ) - goto exit_level_0; - lwork = LAPACK_C2INT( work_query ); + if( info != 0 ) + goto exit_level_0; + lwork = LAPACK_C2INT( work_query ); /* Allocate memory for working array(s) */ rwork = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,2*n) ); if( rwork == NULL ) { diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_chbev_2stage_work.c lapack-3.7.1/LAPACKE/src/lapacke_chbev_2stage_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_chbev_2stage_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_chbev_2stage_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function chbev_2stage * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -44,7 +44,7 @@ if( matrix_layout == LAPACK_COL_MAJOR ) { /* Call LAPACK function and adjust info */ LAPACK_chbev_2stage( &jobz, &uplo, &n, &kd, ab, &ldab, w, z, &ldz, work, &lwork, - rwork, &info ); + rwork, &info ); if( info < 0 ) { info = info - 1; } diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_checon_3.c lapack-3.7.1/LAPACKE/src/lapacke_checon_3.c --- lapack-3.7.0/LAPACKE/src/lapacke_checon_3.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_checon_3.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function checon_3 * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -40,6 +40,7 @@ { lapack_int info = 0; lapack_complex_float* work = NULL; + lapack_int e_start = LAPACKE_lsame( uplo, 'U' ) ? 1 : 0; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_checon_3", -1 ); return -1; @@ -49,7 +50,7 @@ if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) { return -4; } - if( LAPACKE_c_nancheck( n, e, 1 ) ) { + if( LAPACKE_c_nancheck( n-1, e + e_start, 1 ) ) { return -6; } if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) { diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_cheevr_work.c lapack-3.7.1/LAPACKE/src/lapacke_cheevr_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_cheevr_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_cheevr_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function cheevr * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -54,8 +54,9 @@ info = info - 1; } } else if( matrix_layout == LAPACK_ROW_MAJOR ) { - lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) || - LAPACKE_lsame( range, 'v' ) ) ? n : + lapack_int ncols_z = ( !LAPACKE_lsame( jobz, 'v' ) ) ? 1 : + ( LAPACKE_lsame( range, 'a' ) || + LAPACKE_lsame( range, 'v' ) ) ? n : ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1); lapack_int lda_t = MAX(1,n); lapack_int ldz_t = MAX(1,n); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_cheevx_work.c lapack-3.7.1/LAPACKE/src/lapacke_cheevx_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_cheevx_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_cheevx_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function cheevx * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -53,8 +53,9 @@ info = info - 1; } } else if( matrix_layout == LAPACK_ROW_MAJOR ) { - lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) || - LAPACKE_lsame( range, 'v' ) ) ? n : + lapack_int ncols_z = ( !LAPACKE_lsame( jobz, 'v' ) ) ? 1 : + ( LAPACKE_lsame( range, 'a' ) || + LAPACKE_lsame( range, 'v' ) ) ? n : ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1); lapack_int lda_t = MAX(1,n); lapack_int ldz_t = MAX(1,n); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_chegvx_work.c lapack-3.7.1/LAPACKE/src/lapacke_chegvx_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_chegvx_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_chegvx_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function chegvx * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -110,7 +110,7 @@ } /* Transpose input matrices */ LAPACKE_che_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t ); - LAPACKE_cge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t ); + LAPACKE_che_trans( matrix_layout, uplo, n, b, ldb, b_t, ldb_t ); /* Call LAPACK function and adjust info */ LAPACK_chegvx( &itype, &jobz, &range, &uplo, &n, a_t, &lda_t, b_t, &ldb_t, &vl, &vu, &il, &iu, &abstol, m, w, z_t, &ldz_t, @@ -120,7 +120,7 @@ } /* Transpose output matrices */ LAPACKE_che_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda ); - LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb ); + LAPACKE_che_trans( LAPACK_COL_MAJOR, uplo, n, b_t, ldb_t, b, ldb ); if( LAPACKE_lsame( jobz, 'v' ) ) { LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, ncols_z, z_t, ldz_t, z, ldz ); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_chesv_rk.c lapack-3.7.1/LAPACKE/src/lapacke_chesv_rk.c --- lapack-3.7.0/LAPACKE/src/lapacke_chesv_rk.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_chesv_rk.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function chesv_rk * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -52,9 +52,6 @@ if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) { return -5; } - if( LAPACKE_c_nancheck( n, e, 1) ) { - return -7; - } if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) { return -10; } diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_chetrf_rk.c lapack-3.7.1/LAPACKE/src/lapacke_chetrf_rk.c --- lapack-3.7.0/LAPACKE/src/lapacke_chetrf_rk.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_chetrf_rk.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function chetrf_rk * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -50,9 +50,6 @@ if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) { return -4; } - if( LAPACKE_c_nancheck( n, e, 1 ) ) { - return -6; - } #endif /* Query optimal working array(s) size */ info = LAPACKE_chetrf_rk_work( matrix_layout, uplo, n, a, lda, e, ipiv, diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_chetrf_rk_work.c lapack-3.7.1/LAPACKE/src/lapacke_chetrf_rk_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_chetrf_rk_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_chetrf_rk_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,14 +28,14 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function chetrf_rk * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" lapack_int LAPACKE_chetrf_rk_work( int matrix_layout, char uplo, lapack_int n, lapack_complex_float* a, lapack_int lda, - lapack_complex_float* e, + lapack_complex_float* e, lapack_int* ipiv, lapack_complex_float* work, lapack_int lwork ) { diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_chetri_3.c lapack-3.7.1/LAPACKE/src/lapacke_chetri_3.c --- lapack-3.7.0/LAPACKE/src/lapacke_chetri_3.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_chetri_3.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function chetri_3 * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -41,6 +41,7 @@ lapack_int lwork = -1; lapack_complex_float* work = NULL; lapack_complex_float work_query; + lapack_int e_start = LAPACKE_lsame( uplo, 'U' ) ? 1 : 0; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_chetri_3", -1 ); return -1; @@ -50,7 +51,7 @@ if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) { return -4; } - if( LAPACKE_c_nancheck( n, e, 1 ) ) { + if( LAPACKE_c_nancheck( n-1, e + e_start, 1 ) ) { return -6; } #endif @@ -60,7 +61,7 @@ if( info != 0 ) { goto exit_level_0; } - lwork = (lapack_int)work_query; + lwork = LAPACK_C2INT( work_query ); /* Allocate memory for working array(s) */ work = (lapack_complex_float*) LAPACKE_malloc( sizeof(lapack_complex_float) * lwork ); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_chetrs_3.c lapack-3.7.1/LAPACKE/src/lapacke_chetrs_3.c --- lapack-3.7.0/LAPACKE/src/lapacke_chetrs_3.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_chetrs_3.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function chetrs_3 * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -56,5 +56,5 @@ } #endif return LAPACKE_chetrs_3_work( matrix_layout, uplo, n, nrhs, a, lda, - e, ipiv, b, ldb ); + e, ipiv, b, ldb ); } diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_clacp2_work.c lapack-3.7.1/LAPACKE/src/lapacke_clacp2_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_clacp2_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_clacp2_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -31,7 +31,6 @@ * Generated January, 2013 *****************************************************************************/ -#include "lapacke.h" #include "lapacke_utils.h" lapack_int LAPACKE_clacp2_work( int matrix_layout, char uplo, lapack_int m, diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_clange_work.c lapack-3.7.1/LAPACKE/src/lapacke_clange_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_clange_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_clange_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function clange * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -39,37 +39,41 @@ { lapack_int info = 0; float res = 0.; + char norm_lapack; if( matrix_layout == LAPACK_COL_MAJOR ) { - /* Call LAPACK function and adjust info */ + /* Call LAPACK function */ res = LAPACK_clange( &norm, &m, &n, a, &lda, work ); - if( info < 0 ) { - info = info - 1; - } } else if( matrix_layout == LAPACK_ROW_MAJOR ) { - lapack_int lda_t = MAX(1,m); - lapack_complex_float* a_t = NULL; + float* work_lapack = NULL; /* Check leading dimension(s) */ if( lda < n ) { info = -6; LAPACKE_xerbla( "LAPACKE_clange_work", info ); return info; } - /* Allocate memory for temporary array(s) */ - a_t = (lapack_complex_float*) - LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) ); - if( a_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_0; + if( LAPACKE_lsame( norm, '1' ) || LAPACKE_lsame( norm, 'o' ) ) { + norm_lapack = 'i'; + } else if( LAPACKE_lsame( norm, 'i' ) ) { + norm_lapack = '1'; + } else { + norm_lapack = norm; + } + /* Allocate memory for work array(s) */ + if( LAPACKE_lsame( norm_lapack, 'i' ) ) { + work_lapack = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) ); + if( work_lapack == NULL ) { + info = LAPACK_WORK_MEMORY_ERROR; + goto exit_level_0; + } } - /* Transpose input matrices */ - LAPACKE_cge_trans( matrix_layout, m, n, a, lda, a_t, lda_t ); - /* Call LAPACK function and adjust info */ - res = LAPACK_clange( &norm, &m, &n, a_t, &lda_t, work ); - info = 0; /* LAPACK call is ok! */ + /* Call LAPACK function */ + res = LAPACK_clange( &norm_lapack, &n, &m, a, &lda, work_lapack ); /* Release memory and exit */ - LAPACKE_free( a_t ); + if( work_lapack ) { + LAPACKE_free( work_lapack ); + } exit_level_0: - if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) { + if( info == LAPACK_WORK_MEMORY_ERROR ) { LAPACKE_xerbla( "LAPACKE_clange_work", info ); } } else { diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_clarfb.c lapack-3.7.1/LAPACKE/src/lapacke_clarfb.c --- lapack-3.7.0/LAPACKE/src/lapacke_clarfb.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_clarfb.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function clarfb * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -41,7 +41,7 @@ lapack_int ldc ) { lapack_int info = 0; - lapack_int ldwork = ( side=='l')?n:(( side=='r')?m:1); + lapack_int ldwork; lapack_complex_float* work = NULL; lapack_int ncols_v, nrows_v; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { @@ -100,6 +100,13 @@ return -9; } #endif + if( LAPACKE_lsame( side, 'l' ) ) { + ldwork = n; + } else if( LAPACKE_lsame( side, 'r' ) ) { + ldwork = m; + } else { + ldwork = 1; + } /* Allocate memory for working array(s) */ work = (lapack_complex_float*) LAPACKE_malloc( sizeof(lapack_complex_float) * ldwork * MAX(1,k) ); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_classq.c lapack-3.7.1/LAPACKE/src/lapacke_classq.c --- lapack-3.7.0/LAPACKE/src/lapacke_classq.c 1970-01-01 00:00:00.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_classq.c 2017-06-17 22:46:53.000000000 +0000 @@ -0,0 +1,52 @@ +/***************************************************************************** + Copyright (c) 2017, Intel Corp. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + THE POSSIBILITY OF SUCH DAMAGE. +***************************************************************************** +* Contents: Native high-level C interface to LAPACK function classq +* Author: Julien Langou +* Generated February, 2017 +*****************************************************************************/ + +#include "lapacke_utils.h" + +lapack_int LAPACKE_classq( lapack_int n, lapack_complex_float* x, + lapack_int incx, float* scale, float* sumsq ) +{ +#ifndef LAPACK_DISABLE_NAN_CHECK + /* Optionally check input vector `x` and in/out scalars `scale` and `sumsq` for NaNs */ + if( LAPACKE_c_nancheck( 1+(n-2)*ABS(incx), x, incx ) ) { + return -2; + } + if( LAPACKE_s_nancheck( 1, scale, 1 ) ) { + return -4; + } + if( LAPACKE_s_nancheck( 1, sumsq, 1 ) ) { + return -5; + } +#endif + return LAPACKE_classq_work( n, x, incx, scale, sumsq ); +} diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_classq_work.c lapack-3.7.1/LAPACKE/src/lapacke_classq_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_classq_work.c 1970-01-01 00:00:00.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_classq_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -0,0 +1,41 @@ +/***************************************************************************** + Copyright (c) 2017, Intel Corp. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + THE POSSIBILITY OF SUCH DAMAGE. +***************************************************************************** +* Contents: Native middle-level C interface to LAPACK function classq +* Author: Julien Langou +* Generated February, 2017 +*****************************************************************************/ + +#include "lapacke_utils.h" + +lapack_int LAPACKE_classq_work( lapack_int n, lapack_complex_float* x, lapack_int incx, float* scale, float* sumsq ) +{ + lapack_int info = 0; + LAPACK_classq( &n, x, &incx, scale, sumsq ); + return info; +} diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_claswp_work.c lapack-3.7.1/LAPACKE/src/lapacke_claswp_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_claswp_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_claswp_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function claswp * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -46,7 +46,11 @@ info = info - 1; } } else if( matrix_layout == LAPACK_ROW_MAJOR ) { - lapack_int lda_t = MAX(1,lda); + lapack_int lda_t = MAX(1,k2); + lapack_int i; + for( i = k1; i <= k2; i++ ) { + lda_t = MAX( lda_t, ipiv[k1 + ( i - k1 ) * ABS( incx ) - 1] ); + } lapack_complex_float* a_t = NULL; /* Check leading dimension(s) */ if( lda < n ) { @@ -62,12 +66,12 @@ goto exit_level_0; } /* Transpose input matrices */ - LAPACKE_cge_trans( matrix_layout, lda, n, a, lda, a_t, lda_t ); + LAPACKE_cge_trans( matrix_layout, lda_t, n, a, lda, a_t, lda_t ); /* Call LAPACK function and adjust info */ LAPACK_claswp( &n, a_t, &lda_t, &k1, &k2, ipiv, &incx ); info = 0; /* LAPACK call is ok! */ /* Transpose output matrices */ - LAPACKE_cge_trans( LAPACK_COL_MAJOR, lda, n, a_t, lda_t, a, lda ); + LAPACKE_cge_trans( LAPACK_COL_MAJOR, lda_t, n, a_t, lda_t, a, lda ); /* Release memory and exit */ LAPACKE_free( a_t ); exit_level_0: diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_cstegr.c lapack-3.7.1/LAPACKE/src/lapacke_cstegr.c --- lapack-3.7.0/LAPACKE/src/lapacke_cstegr.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_cstegr.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function cstegr * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -58,7 +58,7 @@ if( LAPACKE_s_nancheck( n, d, 1 ) ) { return -5; } - if( LAPACKE_s_nancheck( n, e, 1 ) ) { + if( LAPACKE_s_nancheck( n-1, e, 1 ) ) { return -6; } if( LAPACKE_lsame( range, 'v' ) ) { diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_cstein.c lapack-3.7.1/LAPACKE/src/lapacke_cstein.c --- lapack-3.7.0/LAPACKE/src/lapacke_cstein.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_cstein.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function cstein * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -51,7 +51,7 @@ if( LAPACKE_s_nancheck( n, d, 1 ) ) { return -3; } - if( LAPACKE_s_nancheck( n, e, 1 ) ) { + if( LAPACKE_s_nancheck( n-1, e, 1 ) ) { return -4; } if( LAPACKE_s_nancheck( n, w, 1 ) ) { diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_cstemr_work.c lapack-3.7.1/LAPACKE/src/lapacke_cstemr_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_cstemr_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_cstemr_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function cstemr * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -56,7 +56,7 @@ lapack_int ldz_t = MAX(1,n); lapack_complex_float* z_t = NULL; /* Check leading dimension(s) */ - if( ldz < n ) { + if( ldz < 1 || ( LAPACKE_lsame( jobz, 'v' ) && ldz < n ) ) { info = -14; LAPACKE_xerbla( "LAPACKE_cstemr_work", info ); return info; diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_csycon_3.c lapack-3.7.1/LAPACKE/src/lapacke_csycon_3.c --- lapack-3.7.0/LAPACKE/src/lapacke_csycon_3.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_csycon_3.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function csycon_3 * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -40,6 +40,7 @@ { lapack_int info = 0; lapack_complex_float* work = NULL; + lapack_int e_start = LAPACKE_lsame( uplo, 'U' ) ? 1 : 0; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_csycon_3", -1 ); return -1; @@ -49,7 +50,7 @@ if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) { return -4; } - if( LAPACKE_c_nancheck( n, e, 1 ) ) { + if( LAPACKE_c_nancheck( n-1, e + e_start, 1 ) ) { return -6; } if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) { diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_csycon_3_work.c lapack-3.7.1/LAPACKE/src/lapacke_csycon_3_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_csycon_3_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_csycon_3_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,14 +28,14 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function csycon_3 * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" lapack_int LAPACKE_csycon_3_work( int matrix_layout, char uplo, lapack_int n, const lapack_complex_float* a, lapack_int lda, - const lapack_complex_float* e, + const lapack_complex_float* e, const lapack_int* ipiv, float anorm, float* rcond, lapack_complex_float* work ) { diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_csysv_rk.c lapack-3.7.1/LAPACKE/src/lapacke_csysv_rk.c --- lapack-3.7.0/LAPACKE/src/lapacke_csysv_rk.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_csysv_rk.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function csysv_rk * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -52,9 +52,6 @@ if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) { return -5; } - if( LAPACKE_c_nancheck( n, e, 1) ) { - return -7; - } if( LAPACKE_cge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) { return -9; } diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_csytrf_rk.c lapack-3.7.1/LAPACKE/src/lapacke_csytrf_rk.c --- lapack-3.7.0/LAPACKE/src/lapacke_csytrf_rk.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_csytrf_rk.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function csytrf_rk * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -50,9 +50,6 @@ if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) { return -4; } - if( LAPACKE_c_nancheck( n, e, 1 ) ) { - return -6; - } #endif /* Query optimal working array(s) size */ info = LAPACKE_csytrf_rk_work( matrix_layout, uplo, n, a, lda, e, ipiv, diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_csytri_3.c lapack-3.7.1/LAPACKE/src/lapacke_csytri_3.c --- lapack-3.7.0/LAPACKE/src/lapacke_csytri_3.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_csytri_3.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function csytri_3 * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -41,6 +41,7 @@ lapack_int lwork = -1; lapack_complex_float* work = NULL; lapack_complex_float work_query; + lapack_int e_start = LAPACKE_lsame( uplo, 'U' ) ? 1 : 0; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_csytri_3", -1 ); return -1; @@ -50,7 +51,7 @@ if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) { return -4; } - if( LAPACKE_c_nancheck( n, e, 1 ) ) { + if( LAPACKE_c_nancheck( n-1, e + e_start, 1 ) ) { return -6; } #endif @@ -60,7 +61,7 @@ if( info != 0 ) { goto exit_level_0; } - lwork = (lapack_int)work_query; + lwork = LAPACK_C2INT( work_query ); /* Allocate memory for working array(s) */ work = (lapack_complex_float*) LAPACKE_malloc( sizeof(lapack_complex_float) * lwork ); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_ctpmqrt.c lapack-3.7.1/LAPACKE/src/lapacke_ctpmqrt.c --- lapack-3.7.0/LAPACKE/src/lapacke_ctpmqrt.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_ctpmqrt.c 2017-06-17 22:46:53.000000000 +0000 @@ -43,6 +43,7 @@ { lapack_int ncols_a, nrows_a; lapack_int nrows_v; + lapack_int lwork; lapack_int info = 0; lapack_complex_float* work = NULL; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { @@ -71,8 +72,10 @@ } #endif /* Allocate memory for working array(s) */ + lwork = LAPACKE_lsame( side, 'L' ) ? MAX(1,nb) * MAX(1,n) : + ( LAPACKE_lsame( side, 'R' ) ? MAX(1,m) * MAX(1,nb) : 0 ); work = (lapack_complex_float*) - LAPACKE_malloc( sizeof(lapack_complex_float) * MAX(1,m) * MAX(1,nb) ); + LAPACKE_malloc( sizeof(lapack_complex_float) * lwork ); if( work == NULL ) { info = LAPACK_WORK_MEMORY_ERROR; goto exit_level_0; diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_cunbdb.c lapack-3.7.1/LAPACKE/src/lapacke_cunbdb.c --- lapack-3.7.0/LAPACKE/src/lapacke_cunbdb.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_cunbdb.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function cunbdb * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -49,27 +49,28 @@ lapack_int lwork = -1; lapack_complex_float* work = NULL; lapack_complex_float work_query; - lapack_int nrows_x11, nrows_x12, nrows_x21, nrows_x22; + int lapack_layout; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_cunbdb", -1 ); return -1; } + if( LAPACKE_lsame( trans, 'n' ) && matrix_layout == LAPACK_COL_MAJOR ) { + lapack_layout = LAPACK_COL_MAJOR; + } else { + lapack_layout = LAPACK_ROW_MAJOR; + } #ifndef LAPACK_DISABLE_NAN_CHECK /* Optionally check input matrices for NaNs */ - nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q); - nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q); - nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q); - nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q); - if( LAPACKE_cge_nancheck( matrix_layout, nrows_x11, q, x11, ldx11 ) ) { + if( LAPACKE_cge_nancheck( lapack_layout, p, q, x11, ldx11 ) ) { return -7; } - if( LAPACKE_cge_nancheck( matrix_layout, nrows_x12, m-q, x12, ldx12 ) ) { + if( LAPACKE_cge_nancheck( lapack_layout, p, m-q, x12, ldx12 ) ) { return -9; } - if( LAPACKE_cge_nancheck( matrix_layout, nrows_x21, q, x21, ldx21 ) ) { + if( LAPACKE_cge_nancheck( lapack_layout, m-p, q, x21, ldx21 ) ) { return -11; } - if( LAPACKE_cge_nancheck( matrix_layout, nrows_x22, m-q, x22, ldx22 ) ) { + if( LAPACKE_cge_nancheck( lapack_layout, m-p, m-q, x22, ldx22 ) ) { return -13; } #endif diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_cunbdb_work.c lapack-3.7.1/LAPACKE/src/lapacke_cunbdb_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_cunbdb_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_cunbdb_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function cunbdb * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -47,119 +47,35 @@ lapack_complex_float* work, lapack_int lwork ) { lapack_int info = 0; - if( matrix_layout == LAPACK_COL_MAJOR ) { + /* LAPACK function works with matrices in both layouts. It is supported + * through TRANS parameter. So all conversion between layouts can be + * completed in LAPACK function. See the table below which describes how + * every LAPACKE call is forwarded to corresponding LAPACK call. + * + * matrix_layout | trans_LAPACKE | -> trans_LAPACK + * | (trans) | (ltrans) + * -----------------+---------------+---------------- + * LAPACK_COL_MAJOR | 'N' | -> 'N' + * LAPACK_COL_MAJOR | 'T' | -> 'T' + * LAPACK_ROW_MAJOR | 'N' | -> 'T' + * LAPACK_ROW_MAJOR | 'T' | -> 'T' + * (note that for row major layout trans parameter is ignored) + */ + if( matrix_layout == LAPACK_COL_MAJOR || + matrix_layout == LAPACK_ROW_MAJOR ) { + char ltrans; + if( !LAPACKE_lsame( trans, 't' ) && matrix_layout == LAPACK_COL_MAJOR ) { + ltrans = 'n'; + } else { + ltrans = 't'; + } /* Call LAPACK function and adjust info */ - LAPACK_cunbdb( &trans, &signs, &m, &p, &q, x11, &ldx11, x12, &ldx12, + LAPACK_cunbdb( <rans, &signs, &m, &p, &q, x11, &ldx11, x12, &ldx12, x21, &ldx21, x22, &ldx22, theta, phi, taup1, taup2, tauq1, tauq2, work, &lwork, &info ); if( info < 0 ) { info = info - 1; } - } else if( matrix_layout == LAPACK_ROW_MAJOR ) { - lapack_int nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q); - lapack_int nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q); - lapack_int nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q); - lapack_int nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q); - lapack_int ldx11_t = MAX(1,nrows_x11); - lapack_int ldx12_t = MAX(1,nrows_x12); - lapack_int ldx21_t = MAX(1,nrows_x21); - lapack_int ldx22_t = MAX(1,nrows_x22); - lapack_complex_float* x11_t = NULL; - lapack_complex_float* x12_t = NULL; - lapack_complex_float* x21_t = NULL; - lapack_complex_float* x22_t = NULL; - /* Check leading dimension(s) */ - if( ldx11 < q ) { - info = -8; - LAPACKE_xerbla( "LAPACKE_cunbdb_work", info ); - return info; - } - if( ldx12 < m-q ) { - info = -10; - LAPACKE_xerbla( "LAPACKE_cunbdb_work", info ); - return info; - } - if( ldx21 < q ) { - info = -12; - LAPACKE_xerbla( "LAPACKE_cunbdb_work", info ); - return info; - } - if( ldx22 < m-q ) { - info = -14; - LAPACKE_xerbla( "LAPACKE_cunbdb_work", info ); - return info; - } - /* Query optimal working array(s) size if requested */ - if( lwork == -1 ) { - LAPACK_cunbdb( &trans, &signs, &m, &p, &q, x11, &ldx11_t, x12, - &ldx12_t, x21, &ldx21_t, x22, &ldx22_t, theta, phi, - taup1, taup2, tauq1, tauq2, work, &lwork, &info ); - return (info < 0) ? (info - 1) : info; - } - /* Allocate memory for temporary array(s) */ - x11_t = (lapack_complex_float*) - LAPACKE_malloc( sizeof(lapack_complex_float) * ldx11_t * MAX(1,q) ); - if( x11_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_0; - } - x12_t = (lapack_complex_float*) - LAPACKE_malloc( sizeof(lapack_complex_float) * - ldx12_t * MAX(1,m-q) ); - if( x12_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_1; - } - x21_t = (lapack_complex_float*) - LAPACKE_malloc( sizeof(lapack_complex_float) * ldx21_t * MAX(1,q) ); - if( x21_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_2; - } - x22_t = (lapack_complex_float*) - LAPACKE_malloc( sizeof(lapack_complex_float) * - ldx22_t * MAX(1,m-q) ); - if( x22_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_3; - } - /* Transpose input matrices */ - LAPACKE_cge_trans( matrix_layout, nrows_x11, q, x11, ldx11, x11_t, - ldx11_t ); - LAPACKE_cge_trans( matrix_layout, nrows_x12, m-q, x12, ldx12, x12_t, - ldx12_t ); - LAPACKE_cge_trans( matrix_layout, nrows_x21, q, x21, ldx21, x21_t, - ldx21_t ); - LAPACKE_cge_trans( matrix_layout, nrows_x22, m-q, x22, ldx22, x22_t, - ldx22_t ); - /* Call LAPACK function and adjust info */ - LAPACK_cunbdb( &trans, &signs, &m, &p, &q, x11_t, &ldx11_t, x12_t, - &ldx12_t, x21_t, &ldx21_t, x22_t, &ldx22_t, theta, phi, - taup1, taup2, tauq1, tauq2, work, &lwork, &info ); - if( info < 0 ) { - info = info - 1; - } - /* Transpose output matrices */ - LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_x11, q, x11_t, ldx11_t, x11, - ldx11 ); - LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_x12, m-q, x12_t, ldx12_t, - x12, ldx12 ); - LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_x21, q, x21_t, ldx21_t, x21, - ldx21 ); - LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_x22, m-q, x22_t, ldx22_t, - x22, ldx22 ); - /* Release memory and exit */ - LAPACKE_free( x22_t ); -exit_level_3: - LAPACKE_free( x21_t ); -exit_level_2: - LAPACKE_free( x12_t ); -exit_level_1: - LAPACKE_free( x11_t ); -exit_level_0: - if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) { - LAPACKE_xerbla( "LAPACKE_cunbdb_work", info ); - } } else { info = -1; LAPACKE_xerbla( "LAPACKE_cunbdb_work", info ); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_cuncsd.c lapack-3.7.1/LAPACKE/src/lapacke_cuncsd.c --- lapack-3.7.0/LAPACKE/src/lapacke_cuncsd.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_cuncsd.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function cuncsd * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -54,27 +54,28 @@ lapack_complex_float* work = NULL; float rwork_query; lapack_complex_float work_query; - lapack_int nrows_x11, nrows_x12, nrows_x21, nrows_x22; + int lapack_layout; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_cuncsd", -1 ); return -1; } + if( LAPACKE_lsame( trans, 'n' ) && matrix_layout == LAPACK_COL_MAJOR ) { + lapack_layout = LAPACK_COL_MAJOR; + } else { + lapack_layout = LAPACK_ROW_MAJOR; + } #ifndef LAPACK_DISABLE_NAN_CHECK /* Optionally check input matrices for NaNs */ - nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q); - nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q); - nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q); - nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q); - if( LAPACKE_cge_nancheck( matrix_layout, nrows_x11, q, x11, ldx11 ) ) { + if( LAPACKE_cge_nancheck( lapack_layout, p, q, x11, ldx11 ) ) { return -11; } - if( LAPACKE_cge_nancheck( matrix_layout, nrows_x12, m-q, x12, ldx12 ) ) { + if( LAPACKE_cge_nancheck( lapack_layout, p, m-q, x12, ldx12 ) ) { return -13; } - if( LAPACKE_cge_nancheck( matrix_layout, nrows_x21, q, x21, ldx21 ) ) { + if( LAPACKE_cge_nancheck( lapack_layout, m-p, q, x21, ldx21 ) ) { return -15; } - if( LAPACKE_cge_nancheck( matrix_layout, nrows_x22, m-q, x22, ldx22 ) ) { + if( LAPACKE_cge_nancheck( lapack_layout, m-p, m-q, x22, ldx22 ) ) { return -17; } #endif diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_cuncsd_work.c lapack-3.7.1/LAPACKE/src/lapacke_cuncsd_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_cuncsd_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_cuncsd_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function cuncsd * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -50,224 +50,36 @@ lapack_int* iwork ) { lapack_int info = 0; - if( matrix_layout == LAPACK_COL_MAJOR ) { - /* Call LAPACK function and adjust info */ - LAPACK_cuncsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &signs, &m, &p, - &q, x11, &ldx11, x12, &ldx12, x21, &ldx21, x22, &ldx22, - theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, v2t, &ldv2t, - work, &lwork, rwork, &lrwork, iwork, &info ); - if( info < 0 ) { - info = info - 1; - } - } else if( matrix_layout == LAPACK_ROW_MAJOR ) { - lapack_int nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q); - lapack_int nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q); - lapack_int nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q); - lapack_int nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q); - lapack_int nrows_u1 = ( LAPACKE_lsame( jobu1, 'y' ) ? p : 1); - lapack_int nrows_u2 = ( LAPACKE_lsame( jobu2, 'y' ) ? m-p : 1); - lapack_int nrows_v1t = ( LAPACKE_lsame( jobv1t, 'y' ) ? q : 1); - lapack_int nrows_v2t = ( LAPACKE_lsame( jobv2t, 'y' ) ? m-q : 1); - lapack_int ldu1_t = MAX(1,nrows_u1); - lapack_int ldu2_t = MAX(1,nrows_u2); - lapack_int ldv1t_t = MAX(1,nrows_v1t); - lapack_int ldv2t_t = MAX(1,nrows_v2t); - lapack_int ldx11_t = MAX(1,nrows_x11); - lapack_int ldx12_t = MAX(1,nrows_x12); - lapack_int ldx21_t = MAX(1,nrows_x21); - lapack_int ldx22_t = MAX(1,nrows_x22); - lapack_complex_float* x11_t = NULL; - lapack_complex_float* x12_t = NULL; - lapack_complex_float* x21_t = NULL; - lapack_complex_float* x22_t = NULL; - lapack_complex_float* u1_t = NULL; - lapack_complex_float* u2_t = NULL; - lapack_complex_float* v1t_t = NULL; - lapack_complex_float* v2t_t = NULL; - /* Check leading dimension(s) */ - if( ldu1 < p ) { - info = -21; - LAPACKE_xerbla( "LAPACKE_cuncsd_work", info ); - return info; - } - if( ldu2 < m-p ) { - info = -23; - LAPACKE_xerbla( "LAPACKE_cuncsd_work", info ); - return info; - } - if( ldv1t < q ) { - info = -25; - LAPACKE_xerbla( "LAPACKE_cuncsd_work", info ); - return info; - } - if( ldv2t < m-q ) { - info = -27; - LAPACKE_xerbla( "LAPACKE_cuncsd_work", info ); - return info; - } - if( ldx11 < q ) { - info = -12; - LAPACKE_xerbla( "LAPACKE_cuncsd_work", info ); - return info; - } - if( ldx12 < m-q ) { - info = -14; - LAPACKE_xerbla( "LAPACKE_cuncsd_work", info ); - return info; - } - if( ldx21 < q ) { - info = -16; - LAPACKE_xerbla( "LAPACKE_cuncsd_work", info ); - return info; - } - if( ldx22 < m-q ) { - info = -18; - LAPACKE_xerbla( "LAPACKE_cuncsd_work", info ); - return info; - } - /* Query optimal working array(s) size if requested */ - if( lrwork == -1 || lwork == -1 ) { - LAPACK_cuncsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &signs, &m, - &p, &q, x11, &ldx11_t, x12, &ldx12_t, x21, &ldx21_t, - x22, &ldx22_t, theta, u1, &ldu1_t, u2, &ldu2_t, v1t, - &ldv1t_t, v2t, &ldv2t_t, work, &lwork, rwork, - &lrwork, iwork, &info ); - return (info < 0) ? (info - 1) : info; - } - /* Allocate memory for temporary array(s) */ - x11_t = (lapack_complex_float*) - LAPACKE_malloc( sizeof(lapack_complex_float) * ldx11_t * MAX(1,q) ); - if( x11_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_0; - } - x12_t = (lapack_complex_float*) - LAPACKE_malloc( sizeof(lapack_complex_float) * - ldx12_t * MAX(1,m-q) ); - if( x12_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_1; - } - x21_t = (lapack_complex_float*) - LAPACKE_malloc( sizeof(lapack_complex_float) * ldx21_t * MAX(1,q) ); - if( x21_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_2; + /* LAPACK function works with matrices in both layouts. It is supported + * through TRANS parameter. So all conversion between layouts can be + * completed in LAPACK function. See the table below which describes how + * every LAPACKE call is forwarded to corresponding LAPACK call. + * + * matrix_layout | trans_LAPACKE | -> trans_LAPACK + * | (trans) | (ltrans) + * -----------------+---------------+---------------- + * LAPACK_COL_MAJOR | 'N' | -> 'N' + * LAPACK_COL_MAJOR | 'T' | -> 'T' + * LAPACK_ROW_MAJOR | 'N' | -> 'T' + * LAPACK_ROW_MAJOR | 'T' | -> 'T' + * (note that for row major layout trans parameter is ignored) + */ + if( matrix_layout == LAPACK_COL_MAJOR || + matrix_layout == LAPACK_ROW_MAJOR ) { + char ltrans; + if( !LAPACKE_lsame( trans, 't' ) && matrix_layout == LAPACK_COL_MAJOR ) { + ltrans = 'n'; + } else { + ltrans = 't'; } - x22_t = (lapack_complex_float*) - LAPACKE_malloc( sizeof(lapack_complex_float) * - ldx22_t * MAX(1,m-q) ); - if( x22_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_3; - } - if( LAPACKE_lsame( jobu1, 'y' ) ) { - u1_t = (lapack_complex_float*) - LAPACKE_malloc( sizeof(lapack_complex_float) * - ldu1_t * MAX(1,p) ); - if( u1_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_4; - } - } - if( LAPACKE_lsame( jobu2, 'y' ) ) { - u2_t = (lapack_complex_float*) - LAPACKE_malloc( sizeof(lapack_complex_float) * - ldu2_t * MAX(1,m-p) ); - if( u2_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_5; - } - } - if( LAPACKE_lsame( jobv1t, 'y' ) ) { - v1t_t = (lapack_complex_float*) - LAPACKE_malloc( sizeof(lapack_complex_float) * - ldv1t_t * MAX(1,q) ); - if( v1t_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_6; - } - } - if( LAPACKE_lsame( jobv2t, 'y' ) ) { - v2t_t = (lapack_complex_float*) - LAPACKE_malloc( sizeof(lapack_complex_float) * - ldv2t_t * MAX(1,m-q) ); - if( v2t_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_7; - } - } - /* Transpose input matrices */ - LAPACKE_cge_trans( matrix_layout, nrows_x11, q, x11, ldx11, x11_t, - ldx11_t ); - LAPACKE_cge_trans( matrix_layout, nrows_x12, m-q, x12, ldx12, x12_t, - ldx12_t ); - LAPACKE_cge_trans( matrix_layout, nrows_x21, q, x21, ldx21, x21_t, - ldx21_t ); - LAPACKE_cge_trans( matrix_layout, nrows_x22, m-q, x22, ldx22, x22_t, - ldx22_t ); /* Call LAPACK function and adjust info */ - LAPACK_cuncsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &signs, &m, &p, - &q, x11_t, &ldx11_t, x12_t, &ldx12_t, x21_t, &ldx21_t, - x22_t, &ldx22_t, theta, u1_t, &ldu1_t, u2_t, &ldu2_t, - v1t_t, &ldv1t_t, v2t_t, &ldv2t_t, work, &lwork, rwork, - &lrwork, iwork, &info ); + LAPACK_cuncsd( &jobu1, &jobu2, &jobv1t, &jobv2t, <rans, &signs, &m, + &p, &q, x11, &ldx11, x12, &ldx12, x21, &ldx21, x22, + &ldx22, theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, v2t, + &ldv2t, work, &lwork, rwork, &lrwork, iwork, &info ); if( info < 0 ) { info = info - 1; } - /* Transpose output matrices */ - LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_x11, q, x11_t, ldx11_t, x11, - ldx11 ); - LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_x12, m-q, x12_t, ldx12_t, - x12, ldx12 ); - LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_x21, q, x21_t, ldx21_t, x21, - ldx21 ); - LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_x22, m-q, x22_t, ldx22_t, - x22, ldx22 ); - if( LAPACKE_lsame( jobu1, 'y' ) ) { - LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_u1, p, u1_t, ldu1_t, u1, - ldu1 ); - } - if( LAPACKE_lsame( jobu2, 'y' ) ) { - LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_u2, m-p, u2_t, ldu2_t, - u2, ldu2 ); - } - if( LAPACKE_lsame( jobv1t, 'y' ) ) { - LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_v1t, q, v1t_t, ldv1t_t, - v1t, ldv1t ); - } - if( LAPACKE_lsame( jobv2t, 'y' ) ) { - LAPACKE_cge_trans( LAPACK_COL_MAJOR, nrows_v2t, m-q, v2t_t, ldv2t_t, - v2t, ldv2t ); - } - /* Release memory and exit */ - if( LAPACKE_lsame( jobv2t, 'y' ) ) { - LAPACKE_free( v2t_t ); - } -exit_level_7: - if( LAPACKE_lsame( jobv1t, 'y' ) ) { - LAPACKE_free( v1t_t ); - } -exit_level_6: - if( LAPACKE_lsame( jobu2, 'y' ) ) { - LAPACKE_free( u2_t ); - } -exit_level_5: - if( LAPACKE_lsame( jobu1, 'y' ) ) { - LAPACKE_free( u1_t ); - } -exit_level_4: - LAPACKE_free( x22_t ); -exit_level_3: - LAPACKE_free( x21_t ); -exit_level_2: - LAPACKE_free( x12_t ); -exit_level_1: - LAPACKE_free( x11_t ); -exit_level_0: - if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) { - LAPACKE_xerbla( "LAPACKE_cuncsd_work", info ); - } } else { info = -1; LAPACKE_xerbla( "LAPACKE_cuncsd_work", info ); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_cunmlq_work.c lapack-3.7.1/LAPACKE/src/lapacke_cunmlq_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_cunmlq_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_cunmlq_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -42,9 +42,6 @@ { lapack_int info = 0; lapack_int r; - lapack_int lda_t, ldc_t; - lapack_complex_float* a_t = NULL; - lapack_complex_float* c_t = NULL; if( matrix_layout == LAPACK_COL_MAJOR ) { /* Call LAPACK function and adjust info */ LAPACK_cunmlq( &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, work, @@ -54,8 +51,10 @@ } } else if( matrix_layout == LAPACK_ROW_MAJOR ) { r = LAPACKE_lsame( side, 'l' ) ? m : n; - lda_t = MAX(1,k); - ldc_t = MAX(1,m); + lapack_int lda_t = MAX(1,k); + lapack_int ldc_t = MAX(1,m); + lapack_complex_float* a_t = NULL; + lapack_complex_float* c_t = NULL; /* Check leading dimension(s) */ if( lda < r ) { info = -8; diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dbbcsd.c lapack-3.7.1/LAPACKE/src/lapacke_dbbcsd.c --- lapack-3.7.0/LAPACKE/src/lapacke_dbbcsd.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dbbcsd.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function dbbcsd * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -47,17 +47,18 @@ lapack_int lwork = -1; double* work = NULL; double work_query; - lapack_int nrows_u1, nrows_u2, nrows_v1t, nrows_v2t; + int lapack_layout; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_dbbcsd", -1 ); return -1; } + if( LAPACKE_lsame( trans, 'n' ) && matrix_layout == LAPACK_COL_MAJOR ) { + lapack_layout = LAPACK_COL_MAJOR; + } else { + lapack_layout = LAPACK_ROW_MAJOR; + } #ifndef LAPACK_DISABLE_NAN_CHECK /* Optionally check input matrices for NaNs */ - nrows_u1 = ( LAPACKE_lsame( jobu1, 'y' ) ? p : 1); - nrows_u2 = ( LAPACKE_lsame( jobu2, 'y' ) ? m-p : 1); - nrows_v1t = ( LAPACKE_lsame( jobv1t, 'y' ) ? q : 1); - nrows_v2t = ( LAPACKE_lsame( jobv2t, 'y' ) ? m-q : 1); if( LAPACKE_d_nancheck( q-1, phi, 1 ) ) { return -11; } @@ -65,22 +66,22 @@ return -10; } if( LAPACKE_lsame( jobu1, 'y' ) ) { - if( LAPACKE_dge_nancheck( matrix_layout, nrows_u1, p, u1, ldu1 ) ) { + if( LAPACKE_dge_nancheck( lapack_layout, p, p, u1, ldu1 ) ) { return -12; } } if( LAPACKE_lsame( jobu2, 'y' ) ) { - if( LAPACKE_dge_nancheck( matrix_layout, nrows_u2, m-p, u2, ldu2 ) ) { + if( LAPACKE_dge_nancheck( lapack_layout, m-p, m-p, u2, ldu2 ) ) { return -14; } } if( LAPACKE_lsame( jobv1t, 'y' ) ) { - if( LAPACKE_dge_nancheck( matrix_layout, nrows_v1t, q, v1t, ldv1t ) ) { + if( LAPACKE_dge_nancheck( lapack_layout, q, q, v1t, ldv1t ) ) { return -16; } } if( LAPACKE_lsame( jobv2t, 'y' ) ) { - if( LAPACKE_dge_nancheck( matrix_layout, nrows_v2t, m-q, v2t, ldv2t ) ) { + if( LAPACKE_dge_nancheck( lapack_layout, m-q, m-q, v2t, ldv2t ) ) { return -18; } } diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dbbcsd_work.c lapack-3.7.1/LAPACKE/src/lapacke_dbbcsd_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_dbbcsd_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dbbcsd_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function dbbcsd * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -45,152 +45,36 @@ double* work, lapack_int lwork ) { lapack_int info = 0; - if( matrix_layout == LAPACK_COL_MAJOR ) { + /* LAPACK function works with matrices in both layouts. It is supported + * through TRANS parameter. So all conversion between layouts can be + * completed in LAPACK function. See the table below which describes how + * every LAPACKE call is forwarded to corresponding LAPACK call. + * + * matrix_layout | trans_LAPACKE | -> trans_LAPACK + * | (trans) | (ltrans) + * -----------------+---------------+---------------- + * LAPACK_COL_MAJOR | 'N' | -> 'N' + * LAPACK_COL_MAJOR | 'T' | -> 'T' + * LAPACK_ROW_MAJOR | 'N' | -> 'T' + * LAPACK_ROW_MAJOR | 'T' | -> 'T' + * (note that for row major layout trans parameter is ignored) + */ + if( matrix_layout == LAPACK_COL_MAJOR || + matrix_layout == LAPACK_ROW_MAJOR ) { + char ltrans; + if( !LAPACKE_lsame( trans, 't' ) && matrix_layout == LAPACK_COL_MAJOR ) { + ltrans = 'n'; + } else { + ltrans = 't'; + } /* Call LAPACK function and adjust info */ - LAPACK_dbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &m, &p, &q, + LAPACK_dbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, <rans, &m, &p, &q, theta, phi, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, v2t, &ldv2t, b11d, b11e, b12d, b12e, b21d, b21e, b22d, b22e, work, &lwork, &info ); if( info < 0 ) { info = info - 1; } - } else if( matrix_layout == LAPACK_ROW_MAJOR ) { - lapack_int nrows_u1 = ( LAPACKE_lsame( jobu1, 'y' ) ? p : 1); - lapack_int nrows_u2 = ( LAPACKE_lsame( jobu2, 'y' ) ? m-p : 1); - lapack_int nrows_v1t = ( LAPACKE_lsame( jobv1t, 'y' ) ? q : 1); - lapack_int nrows_v2t = ( LAPACKE_lsame( jobv2t, 'y' ) ? m-q : 1); - lapack_int ldu1_t = MAX(1,nrows_u1); - lapack_int ldu2_t = MAX(1,nrows_u2); - lapack_int ldv1t_t = MAX(1,nrows_v1t); - lapack_int ldv2t_t = MAX(1,nrows_v2t); - double* u1_t = NULL; - double* u2_t = NULL; - double* v1t_t = NULL; - double* v2t_t = NULL; - /* Check leading dimension(s) */ - if( ldu1 < p ) { - info = -13; - LAPACKE_xerbla( "LAPACKE_dbbcsd_work", info ); - return info; - } - if( ldu2 < m-p ) { - info = -15; - LAPACKE_xerbla( "LAPACKE_dbbcsd_work", info ); - return info; - } - if( ldv1t < q ) { - info = -17; - LAPACKE_xerbla( "LAPACKE_dbbcsd_work", info ); - return info; - } - if( ldv2t < m-q ) { - info = -19; - LAPACKE_xerbla( "LAPACKE_dbbcsd_work", info ); - return info; - } - /* Query optimal working array(s) size if requested */ - if( lwork == -1 ) { - LAPACK_dbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &m, &p, &q, - theta, phi, u1, &ldu1_t, u2, &ldu2_t, v1t, &ldv1t_t, - v2t, &ldv2t_t, b11d, b11e, b12d, b12e, b21d, b21e, - b22d, b22e, work, &lwork, &info ); - return (info < 0) ? (info - 1) : info; - } - /* Allocate memory for temporary array(s) */ - if( LAPACKE_lsame( jobu1, 'y' ) ) { - u1_t = (double*) - LAPACKE_malloc( sizeof(double) * ldu1_t * MAX(1,p) ); - if( u1_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_0; - } - } - if( LAPACKE_lsame( jobu2, 'y' ) ) { - u2_t = (double*) - LAPACKE_malloc( sizeof(double) * ldu2_t * MAX(1,m-p) ); - if( u2_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_1; - } - } - if( LAPACKE_lsame( jobv1t, 'y' ) ) { - v1t_t = (double*) - LAPACKE_malloc( sizeof(double) * ldv1t_t * MAX(1,q) ); - if( v1t_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_2; - } - } - if( LAPACKE_lsame( jobv2t, 'y' ) ) { - v2t_t = (double*) - LAPACKE_malloc( sizeof(double) * ldv2t_t * MAX(1,m-q) ); - if( v2t_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_3; - } - } - /* Transpose input matrices */ - if( LAPACKE_lsame( jobu1, 'y' ) ) { - LAPACKE_dge_trans( matrix_layout, nrows_u1, p, u1, ldu1, u1_t, - ldu1_t ); - } - if( LAPACKE_lsame( jobu2, 'y' ) ) { - LAPACKE_dge_trans( matrix_layout, nrows_u2, m-p, u2, ldu2, u2_t, - ldu2_t ); - } - if( LAPACKE_lsame( jobv1t, 'y' ) ) { - LAPACKE_dge_trans( matrix_layout, nrows_v1t, q, v1t, ldv1t, v1t_t, - ldv1t_t ); - } - if( LAPACKE_lsame( jobv2t, 'y' ) ) { - LAPACKE_dge_trans( matrix_layout, nrows_v2t, m-q, v2t, ldv2t, v2t_t, - ldv2t_t ); - } - /* Call LAPACK function and adjust info */ - LAPACK_dbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &m, &p, &q, - theta, phi, u1_t, &ldu1_t, u2_t, &ldu2_t, v1t_t, - &ldv1t_t, v2t_t, &ldv2t_t, b11d, b11e, b12d, b12e, b21d, - b21e, b22d, b22e, work, &lwork, &info ); - if( info < 0 ) { - info = info - 1; - } - /* Transpose output matrices */ - if( LAPACKE_lsame( jobu1, 'y' ) ) { - LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_u1, p, u1_t, ldu1_t, u1, - ldu1 ); - } - if( LAPACKE_lsame( jobu2, 'y' ) ) { - LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_u2, m-p, u2_t, ldu2_t, - u2, ldu2 ); - } - if( LAPACKE_lsame( jobv1t, 'y' ) ) { - LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_v1t, q, v1t_t, ldv1t_t, - v1t, ldv1t ); - } - if( LAPACKE_lsame( jobv2t, 'y' ) ) { - LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_v2t, m-q, v2t_t, ldv2t_t, - v2t, ldv2t ); - } - /* Release memory and exit */ - if( LAPACKE_lsame( jobv2t, 'y' ) ) { - LAPACKE_free( v2t_t ); - } -exit_level_3: - if( LAPACKE_lsame( jobv1t, 'y' ) ) { - LAPACKE_free( v1t_t ); - } -exit_level_2: - if( LAPACKE_lsame( jobu2, 'y' ) ) { - LAPACKE_free( u2_t ); - } -exit_level_1: - if( LAPACKE_lsame( jobu1, 'y' ) ) { - LAPACKE_free( u1_t ); - } -exit_level_0: - if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) { - LAPACKE_xerbla( "LAPACKE_dbbcsd_work", info ); - } } else { info = -1; LAPACKE_xerbla( "LAPACKE_dbbcsd_work", info ); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dbdsdc.c lapack-3.7.1/LAPACKE/src/lapacke_dbdsdc.c --- lapack-3.7.0/LAPACKE/src/lapacke_dbdsdc.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dbdsdc.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function dbdsdc * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -52,7 +52,7 @@ if( LAPACKE_d_nancheck( n, d, 1 ) ) { return -5; } - if( LAPACKE_d_nancheck( n, e, 1 ) ) { + if( LAPACKE_d_nancheck( n-1, e, 1 ) ) { return -6; } #endif diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dbdsvdx.c lapack-3.7.1/LAPACKE/src/lapacke_dbdsvdx.c --- lapack-3.7.0/LAPACKE/src/lapacke_dbdsvdx.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dbdsvdx.c 2017-06-17 22:46:53.000000000 +0000 @@ -71,8 +71,8 @@ } /* Call middle-level interface */ info = LAPACKE_dbdsvdx_work( matrix_layout, uplo, jobz, range, - n, d, e, vl, vu, il, iu, ns, s, z, - ldz, work, iwork); + n, d, e, vl, vu, il, iu, ns, s, z, + ldz, work, iwork); /* Backup significant data from working array(s) */ for( i=0; i<12*n-1; i++ ) { superb[i] = iwork[i+1]; diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dbdsvdx_work.c lapack-3.7.1/LAPACKE/src/lapacke_dbdsvdx_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_dbdsvdx_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dbdsvdx_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -34,17 +34,17 @@ #include "lapacke_utils.h" lapack_int LAPACKE_dbdsvdx_work( int matrix_layout, char uplo, char jobz, char range, - lapack_int n, double* d, double* e, - double vl, double vu, - lapack_int il, lapack_int iu, lapack_int* ns, - double* s, double* z, lapack_int ldz, - double* work, lapack_int* iwork ) + lapack_int n, double* d, double* e, + double vl, double vu, + lapack_int il, lapack_int iu, lapack_int* ns, + double* s, double* z, lapack_int ldz, + double* work, lapack_int* iwork ) { lapack_int info = 0; if( matrix_layout == LAPACK_COL_MAJOR ) { /* Call LAPACK function and adjust info */ LAPACK_dbdsvdx( &uplo, &jobz, &range, &n, d, e, &vl, &vu, - &il, &iu, ns, s, z, &ldz, + &il, &iu, ns, s, z, &ldz, work, iwork, &info ); if( info < 0 ) { info = info - 1; @@ -64,7 +64,7 @@ /* Allocate memory for temporary array(s) */ if( LAPACKE_lsame( jobz, 'v' ) ) { z_t = (double*) - LAPACKE_malloc( sizeof(double) * ldz_t * MAX(2*n,1) ); + LAPACKE_malloc( sizeof(double) * ldz_t * MAX(ncols_z,1) ); if( z_t == NULL ) { info = LAPACK_TRANSPOSE_MEMORY_ERROR; goto exit_level_0; @@ -72,8 +72,8 @@ } /* Call LAPACK function and adjust info */ LAPACK_dbdsvdx( &uplo, &jobz, &range, &n, d, e, &vl, &vu, - &il, &iu, ns, s, z_t, &ldz_t, work, - iwork, &info ); + &il, &iu, ns, s, z_t, &ldz_t, work, + iwork, &info ); if( info < 0 ) { info = info - 1; } diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dgelq.c lapack-3.7.1/LAPACKE/src/lapacke_dgelq.c --- lapack-3.7.0/LAPACKE/src/lapacke_dgelq.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dgelq.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,14 +28,14 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function dgelq * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" -lapack_int LAPACKE_dgelq_work( int matrix_layout, lapack_int m, lapack_int n, - double* a, lapack_int lda, - double* t, lapack_int tsize ) +lapack_int LAPACKE_dgelq( int matrix_layout, lapack_int m, lapack_int n, + double* a, lapack_int lda, + double* t, lapack_int tsize ) { lapack_int info = 0; lapack_int lwork = -1; diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dgesvdx.c lapack-3.7.1/LAPACKE/src/lapacke_dgesvdx.c --- lapack-3.7.0/LAPACKE/src/lapacke_dgesvdx.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dgesvdx.c 2017-06-17 22:46:53.000000000 +0000 @@ -59,7 +59,7 @@ #endif /* Query optimal working array(s) size */ info = LAPACKE_dgesvdx_work( matrix_layout, jobu, jobvt, range, - m, n, a, lda, vl, vu, il, iu, ns, s, u, + m, n, a, lda, vl, vu, il, iu, ns, s, u, ldu, vt, ldvt, &work_query, lwork, iwork ); if( info != 0 ) { goto exit_level_0; @@ -78,8 +78,8 @@ } /* Call middle-level interface */ info = LAPACKE_dgesvdx_work( matrix_layout, jobu, jobvt, range, - m, n, a, lda, vl, vu, il, iu, ns, s, u, - ldu, vt, ldvt, work, lwork, iwork ); + m, n, a, lda, vl, vu, il, iu, ns, s, u, + ldu, vt, ldvt, work, lwork, iwork ); /* Backup significant data from working array(s) */ for( i=0; i<12*MIN(m,n)-1; i++ ) { superb[i] = iwork[i+1]; diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dgesvdx_work.c lapack-3.7.1/LAPACKE/src/lapacke_dgesvdx_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_dgesvdx_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dgesvdx_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -34,18 +34,18 @@ #include "lapacke_utils.h" lapack_int LAPACKE_dgesvdx_work( int matrix_layout, char jobu, char jobvt, char range, - lapack_int m, lapack_int n, double* a, - lapack_int lda, double vl, double vu, - lapack_int il, lapack_int iu, lapack_int* ns, - double* s, double* u, lapack_int ldu, - double* vt, lapack_int ldvt, - double* work, lapack_int lwork, lapack_int* iwork ) + lapack_int m, lapack_int n, double* a, + lapack_int lda, double vl, double vu, + lapack_int il, lapack_int iu, lapack_int* ns, + double* s, double* u, lapack_int ldu, + double* vt, lapack_int ldvt, + double* work, lapack_int lwork, lapack_int* iwork ) { lapack_int info = 0; if( matrix_layout == LAPACK_COL_MAJOR ) { /* Call LAPACK function and adjust info */ LAPACK_dgesvdx( &jobu, &jobvt, &range, &m, &n, a, &lda, &vl, &vu, - &il, &iu, ns, s, u, &ldu, vt, &ldvt, + &il, &iu, ns, s, u, &ldu, vt, &ldvt, work, &lwork, iwork, &info ); if( info < 0 ) { info = info - 1; @@ -84,7 +84,7 @@ /* Query optimal working array(s) size if requested */ if( lwork == -1 ) { LAPACK_dgesvdx( &jobu, &jobvt, &range, &m, &n, a, &lda_t, &vl, &vu, - &il, &iu, ns, s, u, &ldu_t, vt, + &il, &iu, ns, s, u, &ldu_t, vt, &ldvt_t, work, &lwork, iwork, &info ); return (info < 0) ? (info - 1) : info; } @@ -114,8 +114,8 @@ LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t ); /* Call LAPACK function and adjust info */ LAPACK_dgesvdx( &jobu, &jobvt, &range, &m, &n, a_t, &lda_t, &vl, &vu, - &il, &iu, ns, s, u_t, &ldu_t, vt_t, - &ldvt_t, work, &lwork, iwork, &info ); + &il, &iu, ns, s, u_t, &ldu_t, vt_t, + &ldvt_t, work, &lwork, iwork, &info ); if( info < 0 ) { info = info - 1; } diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dlange.c lapack-3.7.1/LAPACKE/src/lapacke_dlange.c --- lapack-3.7.0/LAPACKE/src/lapacke_dlange.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dlange.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function dlange * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -37,7 +37,7 @@ lapack_int n, const double* a, lapack_int lda ) { lapack_int info = 0; - double res = 0.; + double res = 0.; double* work = NULL; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_dlange", -1 ); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dlange_work.c lapack-3.7.1/LAPACKE/src/lapacke_dlange_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_dlange_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dlange_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function dlange * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -38,37 +38,42 @@ double* work ) { lapack_int info = 0; - double res = 0.; + double res = 0.; + char norm_lapack; if( matrix_layout == LAPACK_COL_MAJOR ) { - /* Call LAPACK function and adjust info */ + /* Call LAPACK function */ res = LAPACK_dlange( &norm, &m, &n, a, &lda, work ); - if( info < 0 ) { - info = info - 1; - } } else if( matrix_layout == LAPACK_ROW_MAJOR ) { - lapack_int lda_t = MAX(1,m); - double* a_t = NULL; + double* work_lapack = NULL; /* Check leading dimension(s) */ if( lda < n ) { info = -6; LAPACKE_xerbla( "LAPACKE_dlange_work", info ); return info; } - /* Allocate memory for temporary array(s) */ - a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) ); - if( a_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_0; + if( LAPACKE_lsame( norm, '1' ) || LAPACKE_lsame( norm, 'o' ) ) { + norm_lapack = 'i'; + } else if( LAPACKE_lsame( norm, 'i' ) ) { + norm_lapack = '1'; + } else { + norm_lapack = norm; + } + /* Allocate memory for work array(s) */ + if( LAPACKE_lsame( norm_lapack, 'i' ) ) { + work_lapack = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) ); + if( work_lapack == NULL ) { + info = LAPACK_WORK_MEMORY_ERROR; + goto exit_level_0; + } } - /* Transpose input matrices */ - LAPACKE_dge_trans( matrix_layout, m, n, a, lda, a_t, lda_t ); - /* Call LAPACK function and adjust info */ - res = LAPACK_dlange( &norm, &m, &n, a_t, &lda_t, work ); - info = 0; /* LAPACK call is ok! */ + /* Call LAPACK function */ + res = LAPACK_dlange( &norm_lapack, &n, &m, a, &lda, work_lapack ); /* Release memory and exit */ - LAPACKE_free( a_t ); + if( work_lapack ) { + LAPACKE_free( work_lapack ); + } exit_level_0: - if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) { + if( info == LAPACK_WORK_MEMORY_ERROR ) { LAPACKE_xerbla( "LAPACKE_dlange_work", info ); } } else { diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dlansy.c lapack-3.7.1/LAPACKE/src/lapacke_dlansy.c --- lapack-3.7.0/LAPACKE/src/lapacke_dlansy.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dlansy.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function dlansy * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -37,7 +37,7 @@ const double* a, lapack_int lda ) { lapack_int info = 0; - double res = 0.; + double res = 0.; double* work = NULL; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_dlansy", -1 ); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dlansy_work.c lapack-3.7.1/LAPACKE/src/lapacke_dlansy_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_dlansy_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dlansy_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function dlansy * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -38,7 +38,7 @@ double* work ) { lapack_int info = 0; - double res = 0.; + double res = 0.; if( matrix_layout == LAPACK_COL_MAJOR ) { /* Call LAPACK function and adjust info */ res = LAPACK_dlansy( &norm, &uplo, &n, a, &lda, work ); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dlantr.c lapack-3.7.1/LAPACKE/src/lapacke_dlantr.c --- lapack-3.7.0/LAPACKE/src/lapacke_dlantr.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dlantr.c 2017-06-17 22:46:53.000000000 +0000 @@ -38,7 +38,7 @@ lapack_int lda ) { lapack_int info = 0; - double res = 0.; + double res = 0.; double* work = NULL; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_dlantr", -1 ); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dlarfb.c lapack-3.7.1/LAPACKE/src/lapacke_dlarfb.c --- lapack-3.7.0/LAPACKE/src/lapacke_dlarfb.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dlarfb.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function dlarfb * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -40,7 +40,7 @@ lapack_int ldc ) { lapack_int info = 0; - lapack_int ldwork = ( side=='l')?n:(( side=='r')?m:1); + lapack_int ldwork; double* work = NULL; lapack_int ncols_v, nrows_v; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { @@ -99,6 +99,13 @@ return -9; } #endif + if( LAPACKE_lsame( side, 'l' ) ) { + ldwork = n; + } else if( LAPACKE_lsame( side, 'r' ) ) { + ldwork = m; + } else { + ldwork = 1; + } /* Allocate memory for working array(s) */ work = (double*)LAPACKE_malloc( sizeof(double) * ldwork * MAX(1,k) ); if( work == NULL ) { diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dlassq.c lapack-3.7.1/LAPACKE/src/lapacke_dlassq.c --- lapack-3.7.0/LAPACKE/src/lapacke_dlassq.c 1970-01-01 00:00:00.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dlassq.c 2017-06-17 22:46:53.000000000 +0000 @@ -0,0 +1,51 @@ +/***************************************************************************** + Copyright (c) 2017, Intel Corp. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + THE POSSIBILITY OF SUCH DAMAGE. +***************************************************************************** +* Contents: Native high-level C interface to LAPACK function dlassq +* Author: Julien langou +* Generated February 2017 +*****************************************************************************/ + +#include "lapacke_utils.h" + +lapack_int LAPACKE_dlassq( lapack_int n, double* x, lapack_int incx, double* scale, double* sumsq ) +{ +#ifndef LAPACK_DISABLE_NAN_CHECK + /* Optionally check input vector `x` and in/out scalars `scale` and `sumsq` for NaNs */ + if( LAPACKE_d_nancheck( 1+(n-2)*ABS(incx), x, incx ) ) { + return -2; + } + if( LAPACKE_d_nancheck( 1, scale, 1 ) ) { + return -4; + } + if( LAPACKE_d_nancheck( 1, sumsq, 1 ) ) { + return -5; + } +#endif + return LAPACKE_dlassq_work( n, x, incx, scale, sumsq ); +} diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dlassq_work.c lapack-3.7.1/LAPACKE/src/lapacke_dlassq_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_dlassq_work.c 1970-01-01 00:00:00.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dlassq_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -0,0 +1,41 @@ +/***************************************************************************** + Copyright (c) 2017, Intel Corp. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + THE POSSIBILITY OF SUCH DAMAGE. +***************************************************************************** +* Contents: Native middle-level C interface to LAPACK function dlassq +* Author: Julien Langou +* Generated February, 2017 +*****************************************************************************/ + +#include "lapacke_utils.h" + +lapack_int LAPACKE_dlassq_work( lapack_int n, double* x, lapack_int incx, double* scale, double* sumsq ) +{ + lapack_int info = 0; + LAPACK_dlassq( &n, x, &incx, scale, sumsq ); + return info; +} diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dlaswp_work.c lapack-3.7.1/LAPACKE/src/lapacke_dlaswp_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_dlaswp_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dlaswp_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function dlaswp * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -45,7 +45,11 @@ info = info - 1; } } else if( matrix_layout == LAPACK_ROW_MAJOR ) { - lapack_int lda_t = MAX(1,lda); + lapack_int lda_t = MAX(1,k2); + lapack_int i; + for( i = k1; i <= k2; i++ ) { + lda_t = MAX( lda_t, ipiv[k1 + ( i - k1 ) * ABS( incx ) - 1] ); + } double* a_t = NULL; /* Check leading dimension(s) */ if( lda < n ) { @@ -60,12 +64,12 @@ goto exit_level_0; } /* Transpose input matrices */ - LAPACKE_dge_trans( matrix_layout, lda, n, a, lda, a_t, lda_t ); + LAPACKE_dge_trans( matrix_layout, lda_t, n, a, lda, a_t, lda_t ); /* Call LAPACK function and adjust info */ LAPACK_dlaswp( &n, a_t, &lda_t, &k1, &k2, ipiv, &incx ); info = 0; /* LAPACK call is ok! */ /* Transpose output matrices */ - LAPACKE_dge_trans( LAPACK_COL_MAJOR, lda, n, a_t, lda_t, a, lda ); + LAPACKE_dge_trans( LAPACK_COL_MAJOR, lda_t, n, a_t, lda_t, a, lda ); /* Release memory and exit */ LAPACKE_free( a_t ); exit_level_0: diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dorbdb.c lapack-3.7.1/LAPACKE/src/lapacke_dorbdb.c --- lapack-3.7.0/LAPACKE/src/lapacke_dorbdb.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dorbdb.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function dorbdb * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -45,27 +45,28 @@ lapack_int lwork = -1; double* work = NULL; double work_query; - lapack_int nrows_x11, nrows_x12, nrows_x21, nrows_x22; + int lapack_layout; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_dorbdb", -1 ); return -1; } + if( LAPACKE_lsame( trans, 'n' ) && matrix_layout == LAPACK_COL_MAJOR ) { + lapack_layout = LAPACK_COL_MAJOR; + } else { + lapack_layout = LAPACK_ROW_MAJOR; + } #ifndef LAPACK_DISABLE_NAN_CHECK /* Optionally check input matrices for NaNs */ - nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q); - nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q); - nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q); - nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q); - if( LAPACKE_dge_nancheck( matrix_layout, nrows_x11, q, x11, ldx11 ) ) { + if( LAPACKE_dge_nancheck( lapack_layout, p, q, x11, ldx11 ) ) { return -7; } - if( LAPACKE_dge_nancheck( matrix_layout, nrows_x12, m-q, x12, ldx12 ) ) { + if( LAPACKE_dge_nancheck( lapack_layout, p, m-q, x12, ldx12 ) ) { return -9; } - if( LAPACKE_dge_nancheck( matrix_layout, nrows_x21, q, x21, ldx21 ) ) { + if( LAPACKE_dge_nancheck( lapack_layout, m-p, q, x21, ldx21 ) ) { return -11; } - if( LAPACKE_dge_nancheck( matrix_layout, nrows_x22, m-q, x22, ldx22 ) ) { + if( LAPACKE_dge_nancheck( lapack_layout, m-p, m-q, x22, ldx22 ) ) { return -13; } #endif diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dorbdb_work.c lapack-3.7.1/LAPACKE/src/lapacke_dorbdb_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_dorbdb_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dorbdb_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function dorbdb * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -43,115 +43,35 @@ lapack_int lwork ) { lapack_int info = 0; - if( matrix_layout == LAPACK_COL_MAJOR ) { + /* LAPACK function works with matrices in both layouts. It is supported + * through TRANS parameter. So all conversion between layouts can be + * completed in LAPACK function. See the table below which describes how + * every LAPACKE call is forwarded to corresponding LAPACK call. + * + * matrix_layout | trans_LAPACKE | -> trans_LAPACK + * | (trans) | (ltrans) + * -----------------+---------------+---------------- + * LAPACK_COL_MAJOR | 'N' | -> 'N' + * LAPACK_COL_MAJOR | 'T' | -> 'T' + * LAPACK_ROW_MAJOR | 'N' | -> 'T' + * LAPACK_ROW_MAJOR | 'T' | -> 'T' + * (note that for row major layout trans parameter is ignored) + */ + if( matrix_layout == LAPACK_COL_MAJOR || + matrix_layout == LAPACK_ROW_MAJOR ) { + char ltrans; + if( !LAPACKE_lsame( trans, 't' ) && matrix_layout == LAPACK_COL_MAJOR ) { + ltrans = 'n'; + } else { + ltrans = 't'; + } /* Call LAPACK function and adjust info */ - LAPACK_dorbdb( &trans, &signs, &m, &p, &q, x11, &ldx11, x12, &ldx12, + LAPACK_dorbdb( <rans, &signs, &m, &p, &q, x11, &ldx11, x12, &ldx12, x21, &ldx21, x22, &ldx22, theta, phi, taup1, taup2, tauq1, tauq2, work, &lwork, &info ); if( info < 0 ) { info = info - 1; } - } else if( matrix_layout == LAPACK_ROW_MAJOR ) { - lapack_int nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q); - lapack_int nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q); - lapack_int nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q); - lapack_int nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q); - lapack_int ldx11_t = MAX(1,nrows_x11); - lapack_int ldx12_t = MAX(1,nrows_x12); - lapack_int ldx21_t = MAX(1,nrows_x21); - lapack_int ldx22_t = MAX(1,nrows_x22); - double* x11_t = NULL; - double* x12_t = NULL; - double* x21_t = NULL; - double* x22_t = NULL; - /* Check leading dimension(s) */ - if( ldx11 < q ) { - info = -8; - LAPACKE_xerbla( "LAPACKE_dorbdb_work", info ); - return info; - } - if( ldx12 < m-q ) { - info = -10; - LAPACKE_xerbla( "LAPACKE_dorbdb_work", info ); - return info; - } - if( ldx21 < q ) { - info = -12; - LAPACKE_xerbla( "LAPACKE_dorbdb_work", info ); - return info; - } - if( ldx22 < m-q ) { - info = -14; - LAPACKE_xerbla( "LAPACKE_dorbdb_work", info ); - return info; - } - /* Query optimal working array(s) size if requested */ - if( lwork == -1 ) { - LAPACK_dorbdb( &trans, &signs, &m, &p, &q, x11, &ldx11_t, x12, - &ldx12_t, x21, &ldx21_t, x22, &ldx22_t, theta, phi, - taup1, taup2, tauq1, tauq2, work, &lwork, &info ); - return (info < 0) ? (info - 1) : info; - } - /* Allocate memory for temporary array(s) */ - x11_t = (double*)LAPACKE_malloc( sizeof(double) * ldx11_t * MAX(1,q) ); - if( x11_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_0; - } - x12_t = (double*) - LAPACKE_malloc( sizeof(double) * ldx12_t * MAX(1,m-q) ); - if( x12_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_1; - } - x21_t = (double*)LAPACKE_malloc( sizeof(double) * ldx21_t * MAX(1,q) ); - if( x21_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_2; - } - x22_t = (double*) - LAPACKE_malloc( sizeof(double) * ldx22_t * MAX(1,m-q) ); - if( x22_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_3; - } - /* Transpose input matrices */ - LAPACKE_dge_trans( matrix_layout, nrows_x11, q, x11, ldx11, x11_t, - ldx11_t ); - LAPACKE_dge_trans( matrix_layout, nrows_x12, m-q, x12, ldx12, x12_t, - ldx12_t ); - LAPACKE_dge_trans( matrix_layout, nrows_x21, q, x21, ldx21, x21_t, - ldx21_t ); - LAPACKE_dge_trans( matrix_layout, nrows_x22, m-q, x22, ldx22, x22_t, - ldx22_t ); - /* Call LAPACK function and adjust info */ - LAPACK_dorbdb( &trans, &signs, &m, &p, &q, x11_t, &ldx11_t, x12_t, - &ldx12_t, x21_t, &ldx21_t, x22_t, &ldx22_t, theta, phi, - taup1, taup2, tauq1, tauq2, work, &lwork, &info ); - if( info < 0 ) { - info = info - 1; - } - /* Transpose output matrices */ - LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_x11, q, x11_t, ldx11_t, x11, - ldx11 ); - LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_x12, m-q, x12_t, ldx12_t, - x12, ldx12 ); - LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_x21, q, x21_t, ldx21_t, x21, - ldx21 ); - LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_x22, m-q, x22_t, ldx22_t, - x22, ldx22 ); - /* Release memory and exit */ - LAPACKE_free( x22_t ); -exit_level_3: - LAPACKE_free( x21_t ); -exit_level_2: - LAPACKE_free( x12_t ); -exit_level_1: - LAPACKE_free( x11_t ); -exit_level_0: - if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) { - LAPACKE_xerbla( "LAPACKE_dorbdb_work", info ); - } } else { info = -1; LAPACKE_xerbla( "LAPACKE_dorbdb_work", info ); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dorcsd.c lapack-3.7.1/LAPACKE/src/lapacke_dorcsd.c --- lapack-3.7.0/LAPACKE/src/lapacke_dorcsd.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dorcsd.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function dorcsd * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -48,27 +48,28 @@ lapack_int* iwork = NULL; double* work = NULL; double work_query; - lapack_int nrows_x11, nrows_x12, nrows_x21, nrows_x22; + int lapack_layout; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_dorcsd", -1 ); return -1; } + if( LAPACKE_lsame( trans, 'n' ) && matrix_layout == LAPACK_COL_MAJOR ) { + lapack_layout = LAPACK_COL_MAJOR; + } else { + lapack_layout = LAPACK_ROW_MAJOR; + } #ifndef LAPACK_DISABLE_NAN_CHECK /* Optionally check input matrices for NaNs */ - nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q); - nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q); - nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q); - nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q); - if( LAPACKE_dge_nancheck( matrix_layout, nrows_x11, q, x11, ldx11 ) ) { + if( LAPACKE_dge_nancheck( lapack_layout, p, q, x11, ldx11 ) ) { return -11; } - if( LAPACKE_dge_nancheck( matrix_layout, nrows_x12, m-q, x12, ldx12 ) ) { + if( LAPACKE_dge_nancheck( lapack_layout, p, m-q, x12, ldx12 ) ) { return -13; } - if( LAPACKE_dge_nancheck( matrix_layout, nrows_x21, q, x21, ldx21 ) ) { + if( LAPACKE_dge_nancheck( lapack_layout, m-p, q, x21, ldx21 ) ) { return -15; } - if( LAPACKE_dge_nancheck( matrix_layout, nrows_x22, m-q, x22, ldx22 ) ) { + if( LAPACKE_dge_nancheck( lapack_layout, m-p, m-q, x22, ldx22 ) ) { return -17; } #endif diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dorcsd_work.c lapack-3.7.1/LAPACKE/src/lapacke_dorcsd_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_dorcsd_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dorcsd_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function dorcsd * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -46,216 +46,36 @@ lapack_int* iwork ) { lapack_int info = 0; - if( matrix_layout == LAPACK_COL_MAJOR ) { - /* Call LAPACK function and adjust info */ - LAPACK_dorcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &signs, &m, &p, - &q, x11, &ldx11, x12, &ldx12, x21, &ldx21, x22, &ldx22, - theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, v2t, &ldv2t, - work, &lwork, iwork, &info ); - if( info < 0 ) { - info = info - 1; - } - } else if( matrix_layout == LAPACK_ROW_MAJOR ) { - lapack_int nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q); - lapack_int nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q); - lapack_int nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q); - lapack_int nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q); - lapack_int nrows_u1 = ( LAPACKE_lsame( jobu1, 'y' ) ? p : 1); - lapack_int nrows_u2 = ( LAPACKE_lsame( jobu2, 'y' ) ? m-p : 1); - lapack_int nrows_v1t = ( LAPACKE_lsame( jobv1t, 'y' ) ? q : 1); - lapack_int nrows_v2t = ( LAPACKE_lsame( jobv2t, 'y' ) ? m-q : 1); - lapack_int ldu1_t = MAX(1,nrows_u1); - lapack_int ldu2_t = MAX(1,nrows_u2); - lapack_int ldv1t_t = MAX(1,nrows_v1t); - lapack_int ldv2t_t = MAX(1,nrows_v2t); - lapack_int ldx11_t = MAX(1,nrows_x11); - lapack_int ldx12_t = MAX(1,nrows_x12); - lapack_int ldx21_t = MAX(1,nrows_x21); - lapack_int ldx22_t = MAX(1,nrows_x22); - double* x11_t = NULL; - double* x12_t = NULL; - double* x21_t = NULL; - double* x22_t = NULL; - double* u1_t = NULL; - double* u2_t = NULL; - double* v1t_t = NULL; - double* v2t_t = NULL; - /* Check leading dimension(s) */ - if( ldu1 < p ) { - info = -21; - LAPACKE_xerbla( "LAPACKE_dorcsd_work", info ); - return info; - } - if( ldu2 < m-p ) { - info = -23; - LAPACKE_xerbla( "LAPACKE_dorcsd_work", info ); - return info; - } - if( ldv1t < q ) { - info = -25; - LAPACKE_xerbla( "LAPACKE_dorcsd_work", info ); - return info; - } - if( ldv2t < m-q ) { - info = -27; - LAPACKE_xerbla( "LAPACKE_dorcsd_work", info ); - return info; - } - if( ldx11 < q ) { - info = -12; - LAPACKE_xerbla( "LAPACKE_dorcsd_work", info ); - return info; - } - if( ldx12 < m-q ) { - info = -14; - LAPACKE_xerbla( "LAPACKE_dorcsd_work", info ); - return info; - } - if( ldx21 < q ) { - info = -16; - LAPACKE_xerbla( "LAPACKE_dorcsd_work", info ); - return info; - } - if( ldx22 < m-q ) { - info = -18; - LAPACKE_xerbla( "LAPACKE_dorcsd_work", info ); - return info; - } - /* Query optimal working array(s) size if requested */ - if( lwork == -1 ) { - LAPACK_dorcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &signs, &m, - &p, &q, x11, &ldx11_t, x12, &ldx12_t, x21, &ldx21_t, - x22, &ldx22_t, theta, u1, &ldu1_t, u2, &ldu2_t, v1t, - &ldv1t_t, v2t, &ldv2t_t, work, &lwork, iwork, - &info ); - return (info < 0) ? (info - 1) : info; - } - /* Allocate memory for temporary array(s) */ - x11_t = (double*)LAPACKE_malloc( sizeof(double) * ldx11_t * MAX(1,q) ); - if( x11_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_0; - } - x12_t = (double*) - LAPACKE_malloc( sizeof(double) * ldx12_t * MAX(1,m-q) ); - if( x12_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_1; - } - x21_t = (double*)LAPACKE_malloc( sizeof(double) * ldx21_t * MAX(1,q) ); - if( x21_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_2; + /* LAPACK function works with matrices in both layouts. It is supported + * through TRANS parameter. So all conversion between layouts can be + * completed in LAPACK function. See the table below which describes how + * every LAPACKE call is forwarded to corresponding LAPACK call. + * + * matrix_layout | trans_LAPACKE | -> trans_LAPACK + * | (trans) | (ltrans) + * -----------------+---------------+---------------- + * LAPACK_COL_MAJOR | 'N' | -> 'N' + * LAPACK_COL_MAJOR | 'T' | -> 'T' + * LAPACK_ROW_MAJOR | 'N' | -> 'T' + * LAPACK_ROW_MAJOR | 'T' | -> 'T' + * (note that for row major layout trans parameter is ignored) + */ + if( matrix_layout == LAPACK_COL_MAJOR || + matrix_layout == LAPACK_ROW_MAJOR ) { + char ltrans; + if( !LAPACKE_lsame( trans, 't' ) && matrix_layout == LAPACK_COL_MAJOR ) { + ltrans = 'n'; + } else { + ltrans = 't'; } - x22_t = (double*) - LAPACKE_malloc( sizeof(double) * ldx22_t * MAX(1,m-q) ); - if( x22_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_3; - } - if( LAPACKE_lsame( jobu1, 'y' ) ) { - u1_t = (double*) - LAPACKE_malloc( sizeof(double) * ldu1_t * MAX(1,p) ); - if( u1_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_4; - } - } - if( LAPACKE_lsame( jobu2, 'y' ) ) { - u2_t = (double*) - LAPACKE_malloc( sizeof(double) * ldu2_t * MAX(1,m-p) ); - if( u2_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_5; - } - } - if( LAPACKE_lsame( jobv1t, 'y' ) ) { - v1t_t = (double*) - LAPACKE_malloc( sizeof(double) * ldv1t_t * MAX(1,q) ); - if( v1t_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_6; - } - } - if( LAPACKE_lsame( jobv2t, 'y' ) ) { - v2t_t = (double*) - LAPACKE_malloc( sizeof(double) * ldv2t_t * MAX(1,m-q) ); - if( v2t_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_7; - } - } - /* Transpose input matrices */ - LAPACKE_dge_trans( matrix_layout, nrows_x11, q, x11, ldx11, x11_t, - ldx11_t ); - LAPACKE_dge_trans( matrix_layout, nrows_x12, m-q, x12, ldx12, x12_t, - ldx12_t ); - LAPACKE_dge_trans( matrix_layout, nrows_x21, q, x21, ldx21, x21_t, - ldx21_t ); - LAPACKE_dge_trans( matrix_layout, nrows_x22, m-q, x22, ldx22, x22_t, - ldx22_t ); /* Call LAPACK function and adjust info */ - LAPACK_dorcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &signs, &m, &p, - &q, x11_t, &ldx11_t, x12_t, &ldx12_t, x21_t, &ldx21_t, - x22_t, &ldx22_t, theta, u1_t, &ldu1_t, u2_t, &ldu2_t, - v1t_t, &ldv1t_t, v2t_t, &ldv2t_t, work, &lwork, iwork, - &info ); + LAPACK_dorcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, <rans, &signs, &m, + &p, &q, x11, &ldx11, x12, &ldx12, x21, &ldx21, x22, + &ldx22, theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, v2t, + &ldv2t, work, &lwork, iwork, &info ); if( info < 0 ) { info = info - 1; } - /* Transpose output matrices */ - LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_x11, q, x11_t, ldx11_t, x11, - ldx11 ); - LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_x12, m-q, x12_t, ldx12_t, - x12, ldx12 ); - LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_x21, q, x21_t, ldx21_t, x21, - ldx21 ); - LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_x22, m-q, x22_t, ldx22_t, - x22, ldx22 ); - if( LAPACKE_lsame( jobu1, 'y' ) ) { - LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_u1, p, u1_t, ldu1_t, u1, - ldu1 ); - } - if( LAPACKE_lsame( jobu2, 'y' ) ) { - LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_u2, m-p, u2_t, ldu2_t, - u2, ldu2 ); - } - if( LAPACKE_lsame( jobv1t, 'y' ) ) { - LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_v1t, q, v1t_t, ldv1t_t, - v1t, ldv1t ); - } - if( LAPACKE_lsame( jobv2t, 'y' ) ) { - LAPACKE_dge_trans( LAPACK_COL_MAJOR, nrows_v2t, m-q, v2t_t, ldv2t_t, - v2t, ldv2t ); - } - /* Release memory and exit */ - if( LAPACKE_lsame( jobv2t, 'y' ) ) { - LAPACKE_free( v2t_t ); - } -exit_level_7: - if( LAPACKE_lsame( jobv1t, 'y' ) ) { - LAPACKE_free( v1t_t ); - } -exit_level_6: - if( LAPACKE_lsame( jobu2, 'y' ) ) { - LAPACKE_free( u2_t ); - } -exit_level_5: - if( LAPACKE_lsame( jobu1, 'y' ) ) { - LAPACKE_free( u1_t ); - } -exit_level_4: - LAPACKE_free( x22_t ); -exit_level_3: - LAPACKE_free( x21_t ); -exit_level_2: - LAPACKE_free( x12_t ); -exit_level_1: - LAPACKE_free( x11_t ); -exit_level_0: - if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) { - LAPACKE_xerbla( "LAPACKE_dorcsd_work", info ); - } } else { info = -1; LAPACKE_xerbla( "LAPACKE_dorcsd_work", info ); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dormbr.c lapack-3.7.1/LAPACKE/src/lapacke_dormbr.c --- lapack-3.7.0/LAPACKE/src/lapacke_dormbr.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dormbr.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function dormbr * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -42,7 +42,7 @@ lapack_int lwork = -1; double* work = NULL; double work_query; - lapack_int nq, r; + lapack_int nq, ar, ac; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_dormbr", -1 ); return -1; @@ -50,8 +50,9 @@ #ifndef LAPACK_DISABLE_NAN_CHECK /* Optionally check input matrices for NaNs */ nq = LAPACKE_lsame( side, 'l' ) ? m : n; - r = LAPACKE_lsame( vect, 'q' ) ? nq : MIN(nq,k); - if( LAPACKE_dge_nancheck( matrix_layout, r, MIN(nq,k), a, lda ) ) { + ar = LAPACKE_lsame( vect, 'q' ) ? nq : MIN(nq,k); + ac = LAPACKE_lsame( vect, 'q' ) ? MIN(nq,k) : nq; + if( LAPACKE_dge_nancheck( matrix_layout, ar, ac, a, lda ) ) { return -8; } if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) { diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dormbr_work.c lapack-3.7.1/LAPACKE/src/lapacke_dormbr_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_dormbr_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dormbr_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -40,9 +40,6 @@ double* work, lapack_int lwork ) { lapack_int info = 0; - lapack_int nq, r; - lapack_int lda_t, ldc_t; - double *a_t = NULL, *c_t = NULL; if( matrix_layout == LAPACK_COL_MAJOR ) { /* Call LAPACK function and adjust info */ LAPACK_dormbr( &vect, &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, @@ -51,12 +48,15 @@ info = info - 1; } } else if( matrix_layout == LAPACK_ROW_MAJOR ) { - nq = LAPACKE_lsame( side, 'l' ) ? m : n; - r = LAPACKE_lsame( vect, 'q' ) ? nq : MIN(nq,k); - lda_t = MAX(1,r); - ldc_t = MAX(1,m); + lapack_int nq = LAPACKE_lsame( side, 'l' ) ? m : n; + lapack_int ar = LAPACKE_lsame( vect, 'q' ) ? nq : MIN(nq,k); + lapack_int ac = LAPACKE_lsame( vect, 'q' ) ? MIN(nq,k) : nq; + lapack_int lda_t = MAX(1,ar); + lapack_int ldc_t = MAX(1,m); + double *a_t = NULL; + double *c_t = NULL; /* Check leading dimension(s) */ - if( lda < MIN(nq,k) ) { + if( lda < ac ) { info = -9; LAPACKE_xerbla( "LAPACKE_dormbr_work", info ); return info; @@ -73,11 +73,7 @@ return (info < 0) ? (info - 1) : info; } /* Allocate memory for temporary array(s) */ - if( LAPACKE_lsame( vect, 'q' ) ) { - a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,k) ); - } else { - a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,nq) ); - } + a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,ac) ); if( a_t == NULL ) { info = LAPACK_TRANSPOSE_MEMORY_ERROR; goto exit_level_0; @@ -88,7 +84,7 @@ goto exit_level_1; } /* Transpose input matrices */ - LAPACKE_dge_trans( matrix_layout, r, MIN(nq,k), a, lda, a_t, lda_t ); + LAPACKE_dge_trans( matrix_layout, ar, ac, a, lda, a_t, lda_t ); LAPACKE_dge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t ); /* Call LAPACK function and adjust info */ LAPACK_dormbr( &vect, &side, &trans, &m, &n, &k, a_t, &lda_t, tau, c_t, diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dormlq.c lapack-3.7.1/LAPACKE/src/lapacke_dormlq.c --- lapack-3.7.0/LAPACKE/src/lapacke_dormlq.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dormlq.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function dormlq * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -48,7 +48,8 @@ } #ifndef LAPACK_DISABLE_NAN_CHECK /* Optionally check input matrices for NaNs */ - if( LAPACKE_dge_nancheck( matrix_layout, k, m, a, lda ) ) { + lapack_int r = LAPACKE_lsame( side, 'l' ) ? m : n; + if( LAPACKE_dge_nancheck( matrix_layout, k, r, a, lda ) ) { return -7; } if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) { diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dormlq_work.c lapack-3.7.1/LAPACKE/src/lapacke_dormlq_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_dormlq_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dormlq_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -40,9 +40,6 @@ double* work, lapack_int lwork ) { lapack_int info = 0; - lapack_int r; - lapack_int lda_t, ldc_t; - double *a_t = NULL, *c_t = NULL; if( matrix_layout == LAPACK_COL_MAJOR ) { /* Call LAPACK function and adjust info */ LAPACK_dormlq( &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, work, @@ -51,9 +48,11 @@ info = info - 1; } } else if( matrix_layout == LAPACK_ROW_MAJOR ) { - r = LAPACKE_lsame( side, 'l' ) ? m : n; - lda_t = MAX(1,k); - ldc_t = MAX(1,m); + lapack_int r = LAPACKE_lsame( side, 'l' ) ? m : n; + lapack_int lda_t = MAX(1,k); + lapack_int ldc_t = MAX(1,m); + double *a_t = NULL; + double *c_t = NULL; /* Check leading dimension(s) */ if( lda < r ) { info = -8; @@ -72,11 +71,7 @@ return (info < 0) ? (info - 1) : info; } /* Allocate memory for temporary array(s) */ - if( LAPACKE_lsame( side, 'l' ) ) { - a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,m) ); - } else { - a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) ); - } + a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,r) ); if( a_t == NULL ) { info = LAPACK_TRANSPOSE_MEMORY_ERROR; goto exit_level_0; @@ -87,7 +82,7 @@ goto exit_level_1; } /* Transpose input matrices */ - LAPACKE_dge_trans( matrix_layout, k, m, a, lda, a_t, lda_t ); + LAPACKE_dge_trans( matrix_layout, k, r, a, lda, a_t, lda_t ); LAPACKE_dge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t ); /* Call LAPACK function and adjust info */ LAPACK_dormlq( &side, &trans, &m, &n, &k, a_t, &lda_t, tau, c_t, &ldc_t, diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dstegr.c lapack-3.7.1/LAPACKE/src/lapacke_dstegr.c --- lapack-3.7.0/LAPACKE/src/lapacke_dstegr.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dstegr.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function dstegr * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -58,7 +58,7 @@ if( LAPACKE_d_nancheck( n, d, 1 ) ) { return -5; } - if( LAPACKE_d_nancheck( n, e, 1 ) ) { + if( LAPACKE_d_nancheck( n-1, e, 1 ) ) { return -6; } if( LAPACKE_lsame( range, 'v' ) ) { diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dstein.c lapack-3.7.1/LAPACKE/src/lapacke_dstein.c --- lapack-3.7.0/LAPACKE/src/lapacke_dstein.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dstein.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function dstein * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -50,7 +50,7 @@ if( LAPACKE_d_nancheck( n, d, 1 ) ) { return -3; } - if( LAPACKE_d_nancheck( n, e, 1 ) ) { + if( LAPACKE_d_nancheck( n-1, e, 1 ) ) { return -4; } if( LAPACKE_d_nancheck( n, w, 1 ) ) { diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dstemr_work.c lapack-3.7.1/LAPACKE/src/lapacke_dstemr_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_dstemr_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dstemr_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function dstemr * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -55,7 +55,7 @@ lapack_int ldz_t = MAX(1,n); double* z_t = NULL; /* Check leading dimension(s) */ - if( ldz < n ) { + if( ldz < 1 || ( LAPACKE_lsame( jobz, 'v' ) && ldz < n ) ) { info = -14; LAPACKE_xerbla( "LAPACKE_dstemr_work", info ); return info; diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dstev.c lapack-3.7.1/LAPACKE/src/lapacke_dstev.c --- lapack-3.7.0/LAPACKE/src/lapacke_dstev.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dstev.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function dstev * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -47,7 +47,7 @@ if( LAPACKE_d_nancheck( n, d, 1 ) ) { return -4; } - if( LAPACKE_d_nancheck( n, e, 1 ) ) { + if( LAPACKE_d_nancheck( n-1, e, 1 ) ) { return -5; } #endif diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dstevd.c lapack-3.7.1/LAPACKE/src/lapacke_dstevd.c --- lapack-3.7.0/LAPACKE/src/lapacke_dstevd.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dstevd.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function dstevd * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -52,7 +52,7 @@ if( LAPACKE_d_nancheck( n, d, 1 ) ) { return -4; } - if( LAPACKE_d_nancheck( n, e, 1 ) ) { + if( LAPACKE_d_nancheck( n-1, e, 1 ) ) { return -5; } #endif diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dstevx.c lapack-3.7.1/LAPACKE/src/lapacke_dstevx.c --- lapack-3.7.0/LAPACKE/src/lapacke_dstevx.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dstevx.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function dstevx * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -54,7 +54,7 @@ if( LAPACKE_d_nancheck( n, d, 1 ) ) { return -5; } - if( LAPACKE_d_nancheck( n, e, 1 ) ) { + if( LAPACKE_d_nancheck( n-1, e, 1 ) ) { return -6; } if( LAPACKE_lsame( range, 'v' ) ) { diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dsycon_3.c lapack-3.7.1/LAPACKE/src/lapacke_dsycon_3.c --- lapack-3.7.0/LAPACKE/src/lapacke_dsycon_3.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dsycon_3.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function dsycon_3 * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -40,6 +40,7 @@ lapack_int info = 0; lapack_int* iwork = NULL; double* work = NULL; + lapack_int e_start = LAPACKE_lsame( uplo, 'U' ) ? 1 : 0; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_dsycon_3", -1 ); return -1; @@ -49,7 +50,7 @@ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) { return -4; } - if( LAPACKE_d_nancheck( n, e, 1 ) ) { + if( LAPACKE_d_nancheck( n-1, e + e_start, 1 ) ) { return -6; } if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) { diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dsyevr_work.c lapack-3.7.1/LAPACKE/src/lapacke_dsyevr_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_dsyevr_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dsyevr_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function dsyevr * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -52,8 +52,9 @@ info = info - 1; } } else if( matrix_layout == LAPACK_ROW_MAJOR ) { - lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) || - LAPACKE_lsame( range, 'v' ) ) ? n : + lapack_int ncols_z = ( !LAPACKE_lsame( jobz, 'v' ) ) ? 1 : + ( LAPACKE_lsame( range, 'a' ) || + LAPACKE_lsame( range, 'v' ) ) ? n : ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1); lapack_int lda_t = MAX(1,n); lapack_int ldz_t = MAX(1,n); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dsyevx_work.c lapack-3.7.1/LAPACKE/src/lapacke_dsyevx_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_dsyevx_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dsyevx_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function dsyevx * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -51,8 +51,9 @@ info = info - 1; } } else if( matrix_layout == LAPACK_ROW_MAJOR ) { - lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) || - LAPACKE_lsame( range, 'v' ) ) ? n : + lapack_int ncols_z = ( !LAPACKE_lsame( jobz, 'v' ) ) ? 1 : + ( LAPACKE_lsame( range, 'a' ) || + LAPACKE_lsame( range, 'v' ) ) ? n : ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1); lapack_int lda_t = MAX(1,n); lapack_int ldz_t = MAX(1,n); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dsygvx_work.c lapack-3.7.1/LAPACKE/src/lapacke_dsygvx_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_dsygvx_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dsygvx_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function dsygvx * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -105,7 +105,7 @@ } /* Transpose input matrices */ LAPACKE_dsy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t ); - LAPACKE_dge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t ); + LAPACKE_dsy_trans( matrix_layout, uplo, n, b, ldb, b_t, ldb_t ); /* Call LAPACK function and adjust info */ LAPACK_dsygvx( &itype, &jobz, &range, &uplo, &n, a_t, &lda_t, b_t, &ldb_t, &vl, &vu, &il, &iu, &abstol, m, w, z_t, &ldz_t, @@ -115,7 +115,7 @@ } /* Transpose output matrices */ LAPACKE_dsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda ); - LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb ); + LAPACKE_dsy_trans( LAPACK_COL_MAJOR, uplo, n, b_t, ldb_t, b, ldb ); if( LAPACKE_lsame( jobz, 'v' ) ) { LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, ncols_z, z_t, ldz_t, z, ldz ); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dsysv_rk.c lapack-3.7.1/LAPACKE/src/lapacke_dsysv_rk.c --- lapack-3.7.0/LAPACKE/src/lapacke_dsysv_rk.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dsysv_rk.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function dsysv_rk * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -50,9 +50,6 @@ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) { return -5; } - if( LAPACKE_d_nancheck( n, e, 1) ) { - return -7; - } if( LAPACKE_dge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) { return -9; } diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dsytrf_rk.c lapack-3.7.1/LAPACKE/src/lapacke_dsytrf_rk.c --- lapack-3.7.0/LAPACKE/src/lapacke_dsytrf_rk.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dsytrf_rk.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function dsytrf_rk * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -49,9 +49,6 @@ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) { return -4; } - if( LAPACKE_d_nancheck( n, e, 1 ) ) { - return -6; - } #endif /* Query optimal working array(s) size */ info = LAPACKE_dsytrf_rk_work( matrix_layout, uplo, n, a, lda, e, ipiv, diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dsytri_3.c lapack-3.7.1/LAPACKE/src/lapacke_dsytri_3.c --- lapack-3.7.0/LAPACKE/src/lapacke_dsytri_3.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dsytri_3.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function dsytri_3 * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -40,6 +40,7 @@ lapack_int lwork = -1; double* work = NULL; double work_query; + lapack_int e_start = LAPACKE_lsame( uplo, 'U' ) ? 1 : 0; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_dsytri_3", -1 ); return -1; @@ -49,7 +50,7 @@ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) { return -4; } - if( LAPACKE_d_nancheck( n, e, 1 ) ) { + if( LAPACKE_d_nancheck( n-1, e + e_start, 1 ) ) { return -6; } #endif diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dsytrs_3.c lapack-3.7.1/LAPACKE/src/lapacke_dsytrs_3.c --- lapack-3.7.0/LAPACKE/src/lapacke_dsytrs_3.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dsytrs_3.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function dsytrs_3 * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -55,5 +55,5 @@ } #endif return LAPACKE_dsytrs_3_work( matrix_layout, uplo, n, nrhs, a, lda, - e, ipiv, b, ldb ); + e, ipiv, b, ldb ); } diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dsytrs_aa.c lapack-3.7.1/LAPACKE/src/lapacke_dsytrs_aa.c --- lapack-3.7.0/LAPACKE/src/lapacke_dsytrs_aa.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dsytrs_aa.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function dsytrs_aa * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -60,7 +60,7 @@ if( info != 0 ) { goto exit_level_0; } - lwork = (lapack_int)work_query; + lwork = (lapack_int)work_query; /* Allocate memory for work arrays */ work = (double*) LAPACKE_malloc( sizeof(double) * lwork ); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_dtpmqrt.c lapack-3.7.1/LAPACKE/src/lapacke_dtpmqrt.c --- lapack-3.7.0/LAPACKE/src/lapacke_dtpmqrt.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_dtpmqrt.c 2017-06-17 22:46:53.000000000 +0000 @@ -42,6 +42,7 @@ { lapack_int ncols_a, nrows_a; lapack_int nrows_v; + lapack_int lwork; lapack_int info = 0; double* work = NULL; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { @@ -70,7 +71,9 @@ } #endif /* Allocate memory for working array(s) */ - work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,m) * MAX(1,nb) ); + lwork = LAPACKE_lsame( side, 'L' ) ? MAX(1,nb) * MAX(1,n) : + ( LAPACKE_lsame( side, 'R' ) ? MAX(1,m) * MAX(1,nb) : 0 ); + work = (double*)LAPACKE_malloc( sizeof(double) * lwork ); if( work == NULL ) { info = LAPACK_WORK_MEMORY_ERROR; goto exit_level_0; diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_sbbcsd.c lapack-3.7.1/LAPACKE/src/lapacke_sbbcsd.c --- lapack-3.7.0/LAPACKE/src/lapacke_sbbcsd.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_sbbcsd.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function sbbcsd * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -46,17 +46,18 @@ lapack_int lwork = -1; float* work = NULL; float work_query; - lapack_int nrows_u1, nrows_u2, nrows_v1t, nrows_v2t; + int lapack_layout; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_sbbcsd", -1 ); return -1; } + if( LAPACKE_lsame( trans, 'n' ) && matrix_layout == LAPACK_COL_MAJOR ) { + lapack_layout = LAPACK_COL_MAJOR; + } else { + lapack_layout = LAPACK_ROW_MAJOR; + } #ifndef LAPACK_DISABLE_NAN_CHECK /* Optionally check input matrices for NaNs */ - nrows_u1 = ( LAPACKE_lsame( jobu1, 'y' ) ? p : 1); - nrows_u2 = ( LAPACKE_lsame( jobu2, 'y' ) ? m-p : 1); - nrows_v1t = ( LAPACKE_lsame( jobv1t, 'y' ) ? q : 1); - nrows_v2t = ( LAPACKE_lsame( jobv2t, 'y' ) ? m-q : 1); if( LAPACKE_s_nancheck( q-1, phi, 1 ) ) { return -11; } @@ -64,22 +65,22 @@ return -10; } if( LAPACKE_lsame( jobu1, 'y' ) ) { - if( LAPACKE_sge_nancheck( matrix_layout, nrows_u1, p, u1, ldu1 ) ) { + if( LAPACKE_sge_nancheck( lapack_layout, p, p, u1, ldu1 ) ) { return -12; } } if( LAPACKE_lsame( jobu2, 'y' ) ) { - if( LAPACKE_sge_nancheck( matrix_layout, nrows_u2, m-p, u2, ldu2 ) ) { + if( LAPACKE_sge_nancheck( lapack_layout, m-p, m-p, u2, ldu2 ) ) { return -14; } } if( LAPACKE_lsame( jobv1t, 'y' ) ) { - if( LAPACKE_sge_nancheck( matrix_layout, nrows_v1t, q, v1t, ldv1t ) ) { + if( LAPACKE_sge_nancheck( lapack_layout, q, q, v1t, ldv1t ) ) { return -16; } } if( LAPACKE_lsame( jobv2t, 'y' ) ) { - if( LAPACKE_sge_nancheck( matrix_layout, nrows_v2t, m-q, v2t, ldv2t ) ) { + if( LAPACKE_sge_nancheck( lapack_layout, m-q, m-q, v2t, ldv2t ) ) { return -18; } } diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_sbbcsd_work.c lapack-3.7.1/LAPACKE/src/lapacke_sbbcsd_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_sbbcsd_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_sbbcsd_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function sbbcsd * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -45,151 +45,36 @@ float* work, lapack_int lwork ) { lapack_int info = 0; - if( matrix_layout == LAPACK_COL_MAJOR ) { + /* LAPACK function works with matrices in both layouts. It is supported + * through TRANS parameter. So all conversion between layouts can be + * completed in LAPACK function. See the table below which describes how + * every LAPACKE call is forwarded to corresponding LAPACK call. + * + * matrix_layout | trans_LAPACKE | -> trans_LAPACK + * | (trans) | (ltrans) + * -----------------+---------------+---------------- + * LAPACK_COL_MAJOR | 'N' | -> 'N' + * LAPACK_COL_MAJOR | 'T' | -> 'T' + * LAPACK_ROW_MAJOR | 'N' | -> 'T' + * LAPACK_ROW_MAJOR | 'T' | -> 'T' + * (note that for row major layout trans parameter is ignored) + */ + if( matrix_layout == LAPACK_COL_MAJOR || + matrix_layout == LAPACK_ROW_MAJOR ) { + char ltrans; + if( !LAPACKE_lsame( trans, 't' ) && matrix_layout == LAPACK_COL_MAJOR ) { + ltrans = 'n'; + } else { + ltrans = 't'; + } /* Call LAPACK function and adjust info */ - LAPACK_sbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &m, &p, &q, + LAPACK_sbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, <rans, &m, &p, &q, theta, phi, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, v2t, &ldv2t, b11d, b11e, b12d, b12e, b21d, b21e, b22d, b22e, work, &lwork, &info ); if( info < 0 ) { info = info - 1; } - } else if( matrix_layout == LAPACK_ROW_MAJOR ) { - lapack_int nrows_u1 = ( LAPACKE_lsame( jobu1, 'y' ) ? p : 1); - lapack_int nrows_u2 = ( LAPACKE_lsame( jobu2, 'y' ) ? m-p : 1); - lapack_int nrows_v1t = ( LAPACKE_lsame( jobv1t, 'y' ) ? q : 1); - lapack_int nrows_v2t = ( LAPACKE_lsame( jobv2t, 'y' ) ? m-q : 1); - lapack_int ldu1_t = MAX(1,nrows_u1); - lapack_int ldu2_t = MAX(1,nrows_u2); - lapack_int ldv1t_t = MAX(1,nrows_v1t); - lapack_int ldv2t_t = MAX(1,nrows_v2t); - float* u1_t = NULL; - float* u2_t = NULL; - float* v1t_t = NULL; - float* v2t_t = NULL; - /* Check leading dimension(s) */ - if( ldu1 < p ) { - info = -13; - LAPACKE_xerbla( "LAPACKE_sbbcsd_work", info ); - return info; - } - if( ldu2 < m-p ) { - info = -15; - LAPACKE_xerbla( "LAPACKE_sbbcsd_work", info ); - return info; - } - if( ldv1t < q ) { - info = -17; - LAPACKE_xerbla( "LAPACKE_sbbcsd_work", info ); - return info; - } - if( ldv2t < m-q ) { - info = -19; - LAPACKE_xerbla( "LAPACKE_sbbcsd_work", info ); - return info; - } - /* Query optimal working array(s) size if requested */ - if( lwork == -1 ) { - LAPACK_sbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &m, &p, &q, - theta, phi, u1, &ldu1_t, u2, &ldu2_t, v1t, &ldv1t_t, - v2t, &ldv2t_t, b11d, b11e, b12d, b12e, b21d, b21e, - b22d, b22e, work, &lwork, &info ); - return (info < 0) ? (info - 1) : info; - } - /* Allocate memory for temporary array(s) */ - if( LAPACKE_lsame( jobu1, 'y' ) ) { - u1_t = (float*)LAPACKE_malloc( sizeof(float) * ldu1_t * MAX(1,p) ); - if( u1_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_0; - } - } - if( LAPACKE_lsame( jobu2, 'y' ) ) { - u2_t = (float*) - LAPACKE_malloc( sizeof(float) * ldu2_t * MAX(1,m-p) ); - if( u2_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_1; - } - } - if( LAPACKE_lsame( jobv1t, 'y' ) ) { - v1t_t = (float*) - LAPACKE_malloc( sizeof(float) * ldv1t_t * MAX(1,q) ); - if( v1t_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_2; - } - } - if( LAPACKE_lsame( jobv2t, 'y' ) ) { - v2t_t = (float*) - LAPACKE_malloc( sizeof(float) * ldv2t_t * MAX(1,m-q) ); - if( v2t_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_3; - } - } - /* Transpose input matrices */ - if( LAPACKE_lsame( jobu1, 'y' ) ) { - LAPACKE_sge_trans( matrix_layout, nrows_u1, p, u1, ldu1, u1_t, - ldu1_t ); - } - if( LAPACKE_lsame( jobu2, 'y' ) ) { - LAPACKE_sge_trans( matrix_layout, nrows_u2, m-p, u2, ldu2, u2_t, - ldu2_t ); - } - if( LAPACKE_lsame( jobv1t, 'y' ) ) { - LAPACKE_sge_trans( matrix_layout, nrows_v1t, q, v1t, ldv1t, v1t_t, - ldv1t_t ); - } - if( LAPACKE_lsame( jobv2t, 'y' ) ) { - LAPACKE_sge_trans( matrix_layout, nrows_v2t, m-q, v2t, ldv2t, v2t_t, - ldv2t_t ); - } - /* Call LAPACK function and adjust info */ - LAPACK_sbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &m, &p, &q, - theta, phi, u1_t, &ldu1_t, u2_t, &ldu2_t, v1t_t, - &ldv1t_t, v2t_t, &ldv2t_t, b11d, b11e, b12d, b12e, b21d, - b21e, b22d, b22e, work, &lwork, &info ); - if( info < 0 ) { - info = info - 1; - } - /* Transpose output matrices */ - if( LAPACKE_lsame( jobu1, 'y' ) ) { - LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_u1, p, u1_t, ldu1_t, u1, - ldu1 ); - } - if( LAPACKE_lsame( jobu2, 'y' ) ) { - LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_u2, m-p, u2_t, ldu2_t, - u2, ldu2 ); - } - if( LAPACKE_lsame( jobv1t, 'y' ) ) { - LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_v1t, q, v1t_t, ldv1t_t, - v1t, ldv1t ); - } - if( LAPACKE_lsame( jobv2t, 'y' ) ) { - LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_v2t, m-q, v2t_t, ldv2t_t, - v2t, ldv2t ); - } - /* Release memory and exit */ - if( LAPACKE_lsame( jobv2t, 'y' ) ) { - LAPACKE_free( v2t_t ); - } -exit_level_3: - if( LAPACKE_lsame( jobv1t, 'y' ) ) { - LAPACKE_free( v1t_t ); - } -exit_level_2: - if( LAPACKE_lsame( jobu2, 'y' ) ) { - LAPACKE_free( u2_t ); - } -exit_level_1: - if( LAPACKE_lsame( jobu1, 'y' ) ) { - LAPACKE_free( u1_t ); - } -exit_level_0: - if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) { - LAPACKE_xerbla( "LAPACKE_sbbcsd_work", info ); - } } else { info = -1; LAPACKE_xerbla( "LAPACKE_sbbcsd_work", info ); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_sbdsdc.c lapack-3.7.1/LAPACKE/src/lapacke_sbdsdc.c --- lapack-3.7.0/LAPACKE/src/lapacke_sbdsdc.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_sbdsdc.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function sbdsdc * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -52,7 +52,7 @@ if( LAPACKE_s_nancheck( n, d, 1 ) ) { return -5; } - if( LAPACKE_s_nancheck( n, e, 1 ) ) { + if( LAPACKE_s_nancheck( n-1, e, 1 ) ) { return -6; } #endif diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_sbdsvdx.c lapack-3.7.1/LAPACKE/src/lapacke_sbdsvdx.c --- lapack-3.7.0/LAPACKE/src/lapacke_sbdsvdx.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_sbdsvdx.c 2017-06-17 22:46:53.000000000 +0000 @@ -71,8 +71,8 @@ } /* Call middle-level interface */ info = LAPACKE_sbdsvdx_work( matrix_layout, uplo, jobz, range, - n, d, e, vl, vu, il, iu, ns, s, z, - ldz, work, iwork); + n, d, e, vl, vu, il, iu, ns, s, z, + ldz, work, iwork); /* Backup significant data from working array(s) */ for( i=0; i<12*n-1; i++ ) { superb[i] = iwork[i+1]; diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_sbdsvdx_work.c lapack-3.7.1/LAPACKE/src/lapacke_sbdsvdx_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_sbdsvdx_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_sbdsvdx_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -34,17 +34,17 @@ #include "lapacke_utils.h" lapack_int LAPACKE_sbdsvdx_work( int matrix_layout, char uplo, char jobz, char range, - lapack_int n, float* d, float* e, - float vl, float vu, - lapack_int il, lapack_int iu, lapack_int* ns, - float* s, float* z, lapack_int ldz, - float* work, lapack_int* iwork ) + lapack_int n, float* d, float* e, + float vl, float vu, + lapack_int il, lapack_int iu, lapack_int* ns, + float* s, float* z, lapack_int ldz, + float* work, lapack_int* iwork ) { lapack_int info = 0; if( matrix_layout == LAPACK_COL_MAJOR ) { /* Call LAPACK function and adjust info */ LAPACK_sbdsvdx( &uplo, &jobz, &range, &n, d, e, &vl, &vu, - &il, &iu, ns, s, z, &ldz, + &il, &iu, ns, s, z, &ldz, work, iwork, &info ); if( info < 0 ) { info = info - 1; @@ -64,7 +64,7 @@ /* Allocate memory for temporary array(s) */ if( LAPACKE_lsame( jobz, 'v' ) ) { z_t = (float*) - LAPACKE_malloc( sizeof(float) * ldz_t * MAX(2*n,1) ); + LAPACKE_malloc( sizeof(float) * ldz_t * MAX(ncols_z,1) ); if( z_t == NULL ) { info = LAPACK_TRANSPOSE_MEMORY_ERROR; goto exit_level_0; @@ -72,8 +72,8 @@ } /* Call LAPACK function and adjust info */ LAPACK_sbdsvdx( &uplo, &jobz, &range, &n, d, e, &vl, &vu, - &il, &iu, ns, s, z_t, &ldz_t, work, - iwork, &info ); + &il, &iu, ns, s, z_t, &ldz_t, work, + iwork, &info ); if( info < 0 ) { info = info - 1; } diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_sgelq.c lapack-3.7.1/LAPACKE/src/lapacke_sgelq.c --- lapack-3.7.0/LAPACKE/src/lapacke_sgelq.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_sgelq.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,14 +28,14 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function sgelq * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" -lapack_int LAPACKE_sgelq_work( int matrix_layout, lapack_int m, lapack_int n, - float* a, lapack_int lda, - float* t, lapack_int tsize ) +lapack_int LAPACKE_sgelq( int matrix_layout, lapack_int m, lapack_int n, + float* a, lapack_int lda, + float* t, lapack_int tsize ) { lapack_int info = 0; lapack_int lwork = -1; diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_sgemlq.c lapack-3.7.1/LAPACKE/src/lapacke_sgemlq.c --- lapack-3.7.0/LAPACKE/src/lapacke_sgemlq.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_sgemlq.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function sgemlq * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -55,7 +55,7 @@ if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) { return -10; } - if( LAPACKE_d_nancheck( tsize, t, 1 ) ) { + if( LAPACKE_s_nancheck( tsize, t, 1 ) ) { return -9; } #endif diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_sgesvdx.c lapack-3.7.1/LAPACKE/src/lapacke_sgesvdx.c --- lapack-3.7.0/LAPACKE/src/lapacke_sgesvdx.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_sgesvdx.c 2017-06-17 22:46:53.000000000 +0000 @@ -59,7 +59,7 @@ #endif /* Query optimal working array(s) size */ info = LAPACKE_sgesvdx_work( matrix_layout, jobu, jobvt, range, - m, n, a, lda, vl, vu, il, iu, ns, s, u, + m, n, a, lda, vl, vu, il, iu, ns, s, u, ldu, vt, ldvt, &work_query, lwork, iwork ); if( info != 0 ) { goto exit_level_0; @@ -78,8 +78,8 @@ } /* Call middle-level interface */ info = LAPACKE_sgesvdx_work( matrix_layout, jobu, jobvt, range, - m, n, a, lda, vl, vu, il, iu, ns, s, u, - ldu, vt, ldvt, work, lwork, iwork ); + m, n, a, lda, vl, vu, il, iu, ns, s, u, + ldu, vt, ldvt, work, lwork, iwork ); /* Backup significant data from working array(s) */ for( i=0; i<12*MIN(m,n)-1; i++ ) { superb[i] = iwork[i+1]; diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_sgesvdx_work.c lapack-3.7.1/LAPACKE/src/lapacke_sgesvdx_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_sgesvdx_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_sgesvdx_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -34,18 +34,18 @@ #include "lapacke_utils.h" lapack_int LAPACKE_sgesvdx_work( int matrix_layout, char jobu, char jobvt, char range, - lapack_int m, lapack_int n, float* a, - lapack_int lda, float vl, float vu, - lapack_int il, lapack_int iu, lapack_int* ns, - float* s, float* u, lapack_int ldu, - float* vt, lapack_int ldvt, - float* work, lapack_int lwork, lapack_int* iwork ) + lapack_int m, lapack_int n, float* a, + lapack_int lda, float vl, float vu, + lapack_int il, lapack_int iu, lapack_int* ns, + float* s, float* u, lapack_int ldu, + float* vt, lapack_int ldvt, + float* work, lapack_int lwork, lapack_int* iwork ) { lapack_int info = 0; if( matrix_layout == LAPACK_COL_MAJOR ) { /* Call LAPACK function and adjust info */ LAPACK_sgesvdx( &jobu, &jobvt, &range, &m, &n, a, &lda, &vl, &vu, - &il, &iu, ns, s, u, &ldu, vt, &ldvt, + &il, &iu, ns, s, u, &ldu, vt, &ldvt, work, &lwork, iwork, &info ); if( info < 0 ) { info = info - 1; @@ -84,7 +84,7 @@ /* Query optimal working array(s) size if requested */ if( lwork == -1 ) { LAPACK_sgesvdx( &jobu, &jobvt, &range, &m, &n, a, &lda_t, &vl, &vu, - &il, &iu, ns, s, u, &ldu_t, vt, + &il, &iu, ns, s, u, &ldu_t, vt, &ldvt_t, work, &lwork, iwork, &info ); return (info < 0) ? (info - 1) : info; } @@ -114,8 +114,8 @@ LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t ); /* Call LAPACK function and adjust info */ LAPACK_sgesvdx( &jobu, &jobvt, &range, &m, &n, a_t, &lda_t, &vl, &vu, - &il, &iu, ns, s, u_t, &ldu_t, vt_t, - &ldvt_t, work, &lwork, iwork, &info ); + &il, &iu, ns, s, u_t, &ldu_t, vt_t, + &ldvt_t, work, &lwork, iwork, &info ); if( info < 0 ) { info = info - 1; } diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_slange.c lapack-3.7.1/LAPACKE/src/lapacke_slange.c --- lapack-3.7.0/LAPACKE/src/lapacke_slange.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_slange.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function slange * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -37,7 +37,7 @@ lapack_int n, const float* a, lapack_int lda ) { lapack_int info = 0; - float res = 0.; + float res = 0.; float* work = NULL; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_slange", -1 ); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_slange_work.c lapack-3.7.1/LAPACKE/src/lapacke_slange_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_slange_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_slange_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function slange * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -38,37 +38,42 @@ float* work ) { lapack_int info = 0; - float res = 0.; + float res = 0.; + char norm_lapack; if( matrix_layout == LAPACK_COL_MAJOR ) { - /* Call LAPACK function and adjust info */ + /* Call LAPACK function */ res = LAPACK_slange( &norm, &m, &n, a, &lda, work ); - if( info < 0 ) { - info = info - 1; - } } else if( matrix_layout == LAPACK_ROW_MAJOR ) { - lapack_int lda_t = MAX(1,m); - float* a_t = NULL; + float* work_lapack = NULL; /* Check leading dimension(s) */ if( lda < n ) { info = -6; LAPACKE_xerbla( "LAPACKE_slange_work", info ); return info; } - /* Allocate memory for temporary array(s) */ - a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) ); - if( a_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_0; + if( LAPACKE_lsame( norm, '1' ) || LAPACKE_lsame( norm, 'o' ) ) { + norm_lapack = 'i'; + } else if( LAPACKE_lsame( norm, 'i' ) ) { + norm_lapack = '1'; + } else { + norm_lapack = norm; + } + /* Allocate memory for work array(s) */ + if( LAPACKE_lsame( norm_lapack, 'i' ) ) { + work_lapack = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) ); + if( work_lapack == NULL ) { + info = LAPACK_WORK_MEMORY_ERROR; + goto exit_level_0; + } } - /* Transpose input matrices */ - LAPACKE_sge_trans( matrix_layout, m, n, a, lda, a_t, lda_t ); - /* Call LAPACK function and adjust info */ - res = LAPACK_slange( &norm, &m, &n, a_t, &lda_t, work ); - info = 0; /* LAPACK call is ok! */ + /* Call LAPACK function */ + res = LAPACK_slange( &norm_lapack, &n, &m, a, &lda, work_lapack ); /* Release memory and exit */ - LAPACKE_free( a_t ); + if( work_lapack ) { + LAPACKE_free( work_lapack ); + } exit_level_0: - if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) { + if( info == LAPACK_WORK_MEMORY_ERROR ) { LAPACKE_xerbla( "LAPACKE_slange_work", info ); } } else { diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_slansy.c lapack-3.7.1/LAPACKE/src/lapacke_slansy.c --- lapack-3.7.0/LAPACKE/src/lapacke_slansy.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_slansy.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function slansy * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -37,7 +37,7 @@ const float* a, lapack_int lda ) { lapack_int info = 0; - float res = 0.; + float res = 0.; float* work = NULL; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_slansy", -1 ); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_slansy_work.c lapack-3.7.1/LAPACKE/src/lapacke_slansy_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_slansy_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_slansy_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function slansy * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -38,7 +38,7 @@ float* work ) { lapack_int info = 0; - float res = 0.; + float res = 0.; if( matrix_layout == LAPACK_COL_MAJOR ) { /* Call LAPACK function and adjust info */ res = LAPACK_slansy( &norm, &uplo, &n, a, &lda, work ); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_slarfb.c lapack-3.7.1/LAPACKE/src/lapacke_slarfb.c --- lapack-3.7.0/LAPACKE/src/lapacke_slarfb.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_slarfb.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function slarfb * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -40,7 +40,7 @@ lapack_int ldc ) { lapack_int info = 0; - lapack_int ldwork = ( side=='l')?n:(( side=='r')?m:1); + lapack_int ldwork; float* work = NULL; lapack_int ncols_v, nrows_v; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { @@ -99,6 +99,13 @@ return -9; } #endif + if( LAPACKE_lsame( side, 'l' ) ) { + ldwork = n; + } else if( LAPACKE_lsame( side, 'r' ) ) { + ldwork = m; + } else { + ldwork = 1; + } /* Allocate memory for working array(s) */ work = (float*)LAPACKE_malloc( sizeof(float) * ldwork * MAX(1,k) ); if( work == NULL ) { diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_slassq.c lapack-3.7.1/LAPACKE/src/lapacke_slassq.c --- lapack-3.7.0/LAPACKE/src/lapacke_slassq.c 1970-01-01 00:00:00.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_slassq.c 2017-06-17 22:46:53.000000000 +0000 @@ -0,0 +1,51 @@ +/***************************************************************************** + Copyright (c) 2017, Intel Corp. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + THE POSSIBILITY OF SUCH DAMAGE. +***************************************************************************** +* Contents: Native high-level C interface to LAPACK function slassq +* Author: Julien Langou +* Generated February, 2017 +*****************************************************************************/ + +#include "lapacke_utils.h" + +lapack_int LAPACKE_slassq( lapack_int n, float* x, lapack_int incx, float* scale, float* sumsq ) +{ +#ifndef LAPACK_DISABLE_NAN_CHECK + /* Optionally check input vector `x` and in/out scalars `scale` and `sumsq` for NaNs */ + if( LAPACKE_s_nancheck( 1+(n-2)*ABS(incx), x, incx ) ) { + return -2; + } + if( LAPACKE_s_nancheck( 1, scale, 1 ) ) { + return -4; + } + if( LAPACKE_s_nancheck( 1, sumsq, 1 ) ) { + return -5; + } +#endif + return LAPACKE_slassq_work( n, x, incx, scale, sumsq ); +} diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_slassq_work.c lapack-3.7.1/LAPACKE/src/lapacke_slassq_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_slassq_work.c 1970-01-01 00:00:00.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_slassq_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -0,0 +1,41 @@ +/***************************************************************************** + Copyright (c) 2017, Intel Corp. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + THE POSSIBILITY OF SUCH DAMAGE. +***************************************************************************** +* Contents: Native middle-level C interface to LAPACK function slassq +* Author: Julien Langou +* Generated February, 2017 +*****************************************************************************/ + +#include "lapacke_utils.h" + +lapack_int LAPACKE_slassq_work( lapack_int n, float* x, lapack_int incx, float* scale, float* sumsq ) +{ + lapack_int info = 0; + LAPACK_slassq( &n, x, &incx, scale, sumsq ); + return info; +} diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_slaswp_work.c lapack-3.7.1/LAPACKE/src/lapacke_slaswp_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_slaswp_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_slaswp_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function slaswp * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -45,7 +45,11 @@ info = info - 1; } } else if( matrix_layout == LAPACK_ROW_MAJOR ) { - lapack_int lda_t = MAX(1,lda); + lapack_int lda_t = MAX(1,k2); + lapack_int i; + for( i = k1; i <= k2; i++ ) { + lda_t = MAX( lda_t, ipiv[k1 + ( i - k1 ) * ABS( incx ) - 1] ); + } float* a_t = NULL; /* Check leading dimension(s) */ if( lda < n ) { @@ -60,12 +64,12 @@ goto exit_level_0; } /* Transpose input matrices */ - LAPACKE_sge_trans( matrix_layout, lda, n, a, lda, a_t, lda_t ); + LAPACKE_sge_trans( matrix_layout, lda_t, n, a, lda, a_t, lda_t ); /* Call LAPACK function and adjust info */ LAPACK_slaswp( &n, a_t, &lda_t, &k1, &k2, ipiv, &incx ); info = 0; /* LAPACK call is ok! */ /* Transpose output matrices */ - LAPACKE_sge_trans( LAPACK_COL_MAJOR, lda, n, a_t, lda_t, a, lda ); + LAPACKE_sge_trans( LAPACK_COL_MAJOR, lda_t, n, a_t, lda_t, a, lda ); /* Release memory and exit */ LAPACKE_free( a_t ); exit_level_0: diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_sorbdb.c lapack-3.7.1/LAPACKE/src/lapacke_sorbdb.c --- lapack-3.7.0/LAPACKE/src/lapacke_sorbdb.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_sorbdb.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function sorbdb * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -45,27 +45,28 @@ lapack_int lwork = -1; float* work = NULL; float work_query; - lapack_int nrows_x11, nrows_x12, nrows_x21, nrows_x22; + int lapack_layout; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_sorbdb", -1 ); return -1; } + if( LAPACKE_lsame( trans, 'n' ) && matrix_layout == LAPACK_COL_MAJOR ) { + lapack_layout = LAPACK_COL_MAJOR; + } else { + lapack_layout = LAPACK_ROW_MAJOR; + } #ifndef LAPACK_DISABLE_NAN_CHECK /* Optionally check input matrices for NaNs */ - nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q); - nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q); - nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q); - nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q); - if( LAPACKE_sge_nancheck( matrix_layout, nrows_x11, q, x11, ldx11 ) ) { + if( LAPACKE_sge_nancheck( lapack_layout, p, q, x11, ldx11 ) ) { return -7; } - if( LAPACKE_sge_nancheck( matrix_layout, nrows_x12, m-q, x12, ldx12 ) ) { + if( LAPACKE_sge_nancheck( lapack_layout, p, m-q, x12, ldx12 ) ) { return -9; } - if( LAPACKE_sge_nancheck( matrix_layout, nrows_x21, q, x21, ldx21 ) ) { + if( LAPACKE_sge_nancheck( lapack_layout, m-p, q, x21, ldx21 ) ) { return -11; } - if( LAPACKE_sge_nancheck( matrix_layout, nrows_x22, m-q, x22, ldx22 ) ) { + if( LAPACKE_sge_nancheck( lapack_layout, m-p, m-q, x22, ldx22 ) ) { return -13; } #endif diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_sorbdb_work.c lapack-3.7.1/LAPACKE/src/lapacke_sorbdb_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_sorbdb_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_sorbdb_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function sorbdb * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -43,113 +43,35 @@ lapack_int lwork ) { lapack_int info = 0; - if( matrix_layout == LAPACK_COL_MAJOR ) { + /* LAPACK function works with matrices in both layouts. It is supported + * through TRANS parameter. So all conversion between layouts can be + * completed in LAPACK function. See the table below which describes how + * every LAPACKE call is forwarded to corresponding LAPACK call. + * + * matrix_layout | trans_LAPACKE | -> trans_LAPACK + * | (trans) | (ltrans) + * -----------------+---------------+---------------- + * LAPACK_COL_MAJOR | 'N' | -> 'N' + * LAPACK_COL_MAJOR | 'T' | -> 'T' + * LAPACK_ROW_MAJOR | 'N' | -> 'T' + * LAPACK_ROW_MAJOR | 'T' | -> 'T' + * (note that for row major layout trans parameter is ignored) + */ + if( matrix_layout == LAPACK_COL_MAJOR || + matrix_layout == LAPACK_ROW_MAJOR ) { + char ltrans; + if( !LAPACKE_lsame( trans, 't' ) && matrix_layout == LAPACK_COL_MAJOR ) { + ltrans = 'n'; + } else { + ltrans = 't'; + } /* Call LAPACK function and adjust info */ - LAPACK_sorbdb( &trans, &signs, &m, &p, &q, x11, &ldx11, x12, &ldx12, + LAPACK_sorbdb( <rans, &signs, &m, &p, &q, x11, &ldx11, x12, &ldx12, x21, &ldx21, x22, &ldx22, theta, phi, taup1, taup2, tauq1, tauq2, work, &lwork, &info ); if( info < 0 ) { info = info - 1; } - } else if( matrix_layout == LAPACK_ROW_MAJOR ) { - lapack_int nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q); - lapack_int nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q); - lapack_int nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q); - lapack_int nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q); - lapack_int ldx11_t = MAX(1,nrows_x11); - lapack_int ldx12_t = MAX(1,nrows_x12); - lapack_int ldx21_t = MAX(1,nrows_x21); - lapack_int ldx22_t = MAX(1,nrows_x22); - float* x11_t = NULL; - float* x12_t = NULL; - float* x21_t = NULL; - float* x22_t = NULL; - /* Check leading dimension(s) */ - if( ldx11 < q ) { - info = -8; - LAPACKE_xerbla( "LAPACKE_sorbdb_work", info ); - return info; - } - if( ldx12 < m-q ) { - info = -10; - LAPACKE_xerbla( "LAPACKE_sorbdb_work", info ); - return info; - } - if( ldx21 < q ) { - info = -12; - LAPACKE_xerbla( "LAPACKE_sorbdb_work", info ); - return info; - } - if( ldx22 < m-q ) { - info = -14; - LAPACKE_xerbla( "LAPACKE_sorbdb_work", info ); - return info; - } - /* Query optimal working array(s) size if requested */ - if( lwork == -1 ) { - LAPACK_sorbdb( &trans, &signs, &m, &p, &q, x11, &ldx11_t, x12, - &ldx12_t, x21, &ldx21_t, x22, &ldx22_t, theta, phi, - taup1, taup2, tauq1, tauq2, work, &lwork, &info ); - return (info < 0) ? (info - 1) : info; - } - /* Allocate memory for temporary array(s) */ - x11_t = (float*)LAPACKE_malloc( sizeof(float) * ldx11_t * MAX(1,q) ); - if( x11_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_0; - } - x12_t = (float*)LAPACKE_malloc( sizeof(float) * ldx12_t * MAX(1,m-q) ); - if( x12_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_1; - } - x21_t = (float*)LAPACKE_malloc( sizeof(float) * ldx21_t * MAX(1,q) ); - if( x21_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_2; - } - x22_t = (float*)LAPACKE_malloc( sizeof(float) * ldx22_t * MAX(1,m-q) ); - if( x22_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_3; - } - /* Transpose input matrices */ - LAPACKE_sge_trans( matrix_layout, nrows_x11, q, x11, ldx11, x11_t, - ldx11_t ); - LAPACKE_sge_trans( matrix_layout, nrows_x12, m-q, x12, ldx12, x12_t, - ldx12_t ); - LAPACKE_sge_trans( matrix_layout, nrows_x21, q, x21, ldx21, x21_t, - ldx21_t ); - LAPACKE_sge_trans( matrix_layout, nrows_x22, m-q, x22, ldx22, x22_t, - ldx22_t ); - /* Call LAPACK function and adjust info */ - LAPACK_sorbdb( &trans, &signs, &m, &p, &q, x11_t, &ldx11_t, x12_t, - &ldx12_t, x21_t, &ldx21_t, x22_t, &ldx22_t, theta, phi, - taup1, taup2, tauq1, tauq2, work, &lwork, &info ); - if( info < 0 ) { - info = info - 1; - } - /* Transpose output matrices */ - LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_x11, q, x11_t, ldx11_t, x11, - ldx11 ); - LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_x12, m-q, x12_t, ldx12_t, - x12, ldx12 ); - LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_x21, q, x21_t, ldx21_t, x21, - ldx21 ); - LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_x22, m-q, x22_t, ldx22_t, - x22, ldx22 ); - /* Release memory and exit */ - LAPACKE_free( x22_t ); -exit_level_3: - LAPACKE_free( x21_t ); -exit_level_2: - LAPACKE_free( x12_t ); -exit_level_1: - LAPACKE_free( x11_t ); -exit_level_0: - if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) { - LAPACKE_xerbla( "LAPACKE_sorbdb_work", info ); - } } else { info = -1; LAPACKE_xerbla( "LAPACKE_sorbdb_work", info ); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_sorcsd.c lapack-3.7.1/LAPACKE/src/lapacke_sorcsd.c --- lapack-3.7.0/LAPACKE/src/lapacke_sorcsd.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_sorcsd.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function sorcsd * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -48,27 +48,28 @@ lapack_int* iwork = NULL; float* work = NULL; float work_query; - lapack_int nrows_x11, nrows_x12, nrows_x21, nrows_x22; + int lapack_layout; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_sorcsd", -1 ); return -1; } + if( LAPACKE_lsame( trans, 'n' ) && matrix_layout == LAPACK_COL_MAJOR ) { + lapack_layout = LAPACK_COL_MAJOR; + } else { + lapack_layout = LAPACK_ROW_MAJOR; + } #ifndef LAPACK_DISABLE_NAN_CHECK /* Optionally check input matrices for NaNs */ - nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q); - nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q); - nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q); - nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q); - if( LAPACKE_sge_nancheck( matrix_layout, nrows_x11, q, x11, ldx11 ) ) { + if( LAPACKE_sge_nancheck( lapack_layout, p, q, x11, ldx11 ) ) { return -11; } - if( LAPACKE_sge_nancheck( matrix_layout, nrows_x12, m-q, x12, ldx12 ) ) { + if( LAPACKE_sge_nancheck( lapack_layout, p, m-q, x12, ldx12 ) ) { return -13; } - if( LAPACKE_sge_nancheck( matrix_layout, nrows_x21, q, x21, ldx21 ) ) { + if( LAPACKE_sge_nancheck( lapack_layout, m-p, q, x21, ldx21 ) ) { return -15; } - if( LAPACKE_sge_nancheck( matrix_layout, nrows_x22, m-q, x22, ldx22 ) ) { + if( LAPACKE_sge_nancheck( lapack_layout, m-p, m-q, x22, ldx22 ) ) { return -17; } #endif diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_sorcsd_work.c lapack-3.7.1/LAPACKE/src/lapacke_sorcsd_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_sorcsd_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_sorcsd_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function sorcsd * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -46,213 +46,36 @@ lapack_int* iwork ) { lapack_int info = 0; - if( matrix_layout == LAPACK_COL_MAJOR ) { - /* Call LAPACK function and adjust info */ - LAPACK_sorcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &signs, &m, &p, - &q, x11, &ldx11, x12, &ldx12, x21, &ldx21, x22, &ldx22, - theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, v2t, &ldv2t, - work, &lwork, iwork, &info ); - if( info < 0 ) { - info = info - 1; - } - } else if( matrix_layout == LAPACK_ROW_MAJOR ) { - lapack_int nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q); - lapack_int nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q); - lapack_int nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q); - lapack_int nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q); - lapack_int nrows_u1 = ( LAPACKE_lsame( jobu1, 'y' ) ? p : 1); - lapack_int nrows_u2 = ( LAPACKE_lsame( jobu2, 'y' ) ? m-p : 1); - lapack_int nrows_v1t = ( LAPACKE_lsame( jobv1t, 'y' ) ? q : 1); - lapack_int nrows_v2t = ( LAPACKE_lsame( jobv2t, 'y' ) ? m-q : 1); - lapack_int ldu1_t = MAX(1,nrows_u1); - lapack_int ldu2_t = MAX(1,nrows_u2); - lapack_int ldv1t_t = MAX(1,nrows_v1t); - lapack_int ldv2t_t = MAX(1,nrows_v2t); - lapack_int ldx11_t = MAX(1,nrows_x11); - lapack_int ldx12_t = MAX(1,nrows_x12); - lapack_int ldx21_t = MAX(1,nrows_x21); - lapack_int ldx22_t = MAX(1,nrows_x22); - float* x11_t = NULL; - float* x12_t = NULL; - float* x21_t = NULL; - float* x22_t = NULL; - float* u1_t = NULL; - float* u2_t = NULL; - float* v1t_t = NULL; - float* v2t_t = NULL; - /* Check leading dimension(s) */ - if( ldu1 < p ) { - info = -21; - LAPACKE_xerbla( "LAPACKE_sorcsd_work", info ); - return info; - } - if( ldu2 < m-p ) { - info = -23; - LAPACKE_xerbla( "LAPACKE_sorcsd_work", info ); - return info; - } - if( ldv1t < q ) { - info = -25; - LAPACKE_xerbla( "LAPACKE_sorcsd_work", info ); - return info; - } - if( ldv2t < m-q ) { - info = -27; - LAPACKE_xerbla( "LAPACKE_sorcsd_work", info ); - return info; - } - if( ldx11 < q ) { - info = -12; - LAPACKE_xerbla( "LAPACKE_sorcsd_work", info ); - return info; - } - if( ldx12 < m-q ) { - info = -14; - LAPACKE_xerbla( "LAPACKE_sorcsd_work", info ); - return info; - } - if( ldx21 < q ) { - info = -16; - LAPACKE_xerbla( "LAPACKE_sorcsd_work", info ); - return info; - } - if( ldx22 < m-q ) { - info = -18; - LAPACKE_xerbla( "LAPACKE_sorcsd_work", info ); - return info; - } - /* Query optimal working array(s) size if requested */ - if( lwork == -1 ) { - LAPACK_sorcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &signs, &m, - &p, &q, x11, &ldx11_t, x12, &ldx12_t, x21, &ldx21_t, - x22, &ldx22_t, theta, u1, &ldu1_t, u2, &ldu2_t, v1t, - &ldv1t_t, v2t, &ldv2t_t, work, &lwork, iwork, - &info ); - return (info < 0) ? (info - 1) : info; - } - /* Allocate memory for temporary array(s) */ - x11_t = (float*)LAPACKE_malloc( sizeof(float) * ldx11_t * MAX(1,q) ); - if( x11_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_0; - } - x12_t = (float*)LAPACKE_malloc( sizeof(float) * ldx12_t * MAX(1,m-q) ); - if( x12_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_1; - } - x21_t = (float*)LAPACKE_malloc( sizeof(float) * ldx21_t * MAX(1,q) ); - if( x21_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_2; + /* LAPACK function works with matrices in both layouts. It is supported + * through TRANS parameter. So all conversion between layouts can be + * completed in LAPACK function. See the table below which describes how + * every LAPACKE call is forwarded to corresponding LAPACK call. + * + * matrix_layout | trans_LAPACKE | -> trans_LAPACK + * | (trans) | (ltrans) + * -----------------+---------------+---------------- + * LAPACK_COL_MAJOR | 'N' | -> 'N' + * LAPACK_COL_MAJOR | 'T' | -> 'T' + * LAPACK_ROW_MAJOR | 'N' | -> 'T' + * LAPACK_ROW_MAJOR | 'T' | -> 'T' + * (note that for row major layout trans parameter is ignored) + */ + if( matrix_layout == LAPACK_COL_MAJOR || + matrix_layout == LAPACK_ROW_MAJOR ) { + char ltrans; + if( !LAPACKE_lsame( trans, 't' ) && matrix_layout == LAPACK_COL_MAJOR ) { + ltrans = 'n'; + } else { + ltrans = 't'; } - x22_t = (float*)LAPACKE_malloc( sizeof(float) * ldx22_t * MAX(1,m-q) ); - if( x22_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_3; - } - if( LAPACKE_lsame( jobu1, 'y' ) ) { - u1_t = (float*)LAPACKE_malloc( sizeof(float) * ldu1_t * MAX(1,p) ); - if( u1_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_4; - } - } - if( LAPACKE_lsame( jobu2, 'y' ) ) { - u2_t = (float*) - LAPACKE_malloc( sizeof(float) * ldu2_t * MAX(1,m-p) ); - if( u2_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_5; - } - } - if( LAPACKE_lsame( jobv1t, 'y' ) ) { - v1t_t = (float*) - LAPACKE_malloc( sizeof(float) * ldv1t_t * MAX(1,q) ); - if( v1t_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_6; - } - } - if( LAPACKE_lsame( jobv2t, 'y' ) ) { - v2t_t = (float*) - LAPACKE_malloc( sizeof(float) * ldv2t_t * MAX(1,m-q) ); - if( v2t_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_7; - } - } - /* Transpose input matrices */ - LAPACKE_sge_trans( matrix_layout, nrows_x11, q, x11, ldx11, x11_t, - ldx11_t ); - LAPACKE_sge_trans( matrix_layout, nrows_x12, m-q, x12, ldx12, x12_t, - ldx12_t ); - LAPACKE_sge_trans( matrix_layout, nrows_x21, q, x21, ldx21, x21_t, - ldx21_t ); - LAPACKE_sge_trans( matrix_layout, nrows_x22, m-q, x22, ldx22, x22_t, - ldx22_t ); /* Call LAPACK function and adjust info */ - LAPACK_sorcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &signs, &m, &p, - &q, x11_t, &ldx11_t, x12_t, &ldx12_t, x21_t, &ldx21_t, - x22_t, &ldx22_t, theta, u1_t, &ldu1_t, u2_t, &ldu2_t, - v1t_t, &ldv1t_t, v2t_t, &ldv2t_t, work, &lwork, iwork, - &info ); + LAPACK_sorcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, <rans, &signs, &m, + &p, &q, x11, &ldx11, x12, &ldx12, x21, &ldx21, x22, + &ldx22, theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, v2t, + &ldv2t, work, &lwork, iwork, &info ); if( info < 0 ) { info = info - 1; } - /* Transpose output matrices */ - LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_x11, q, x11_t, ldx11_t, x11, - ldx11 ); - LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_x12, m-q, x12_t, ldx12_t, - x12, ldx12 ); - LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_x21, q, x21_t, ldx21_t, x21, - ldx21 ); - LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_x22, m-q, x22_t, ldx22_t, - x22, ldx22 ); - if( LAPACKE_lsame( jobu1, 'y' ) ) { - LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_u1, p, u1_t, ldu1_t, u1, - ldu1 ); - } - if( LAPACKE_lsame( jobu2, 'y' ) ) { - LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_u2, m-p, u2_t, ldu2_t, - u2, ldu2 ); - } - if( LAPACKE_lsame( jobv1t, 'y' ) ) { - LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_v1t, q, v1t_t, ldv1t_t, - v1t, ldv1t ); - } - if( LAPACKE_lsame( jobv2t, 'y' ) ) { - LAPACKE_sge_trans( LAPACK_COL_MAJOR, nrows_v2t, m-q, v2t_t, ldv2t_t, - v2t, ldv2t ); - } - /* Release memory and exit */ - if( LAPACKE_lsame( jobv2t, 'y' ) ) { - LAPACKE_free( v2t_t ); - } -exit_level_7: - if( LAPACKE_lsame( jobv1t, 'y' ) ) { - LAPACKE_free( v1t_t ); - } -exit_level_6: - if( LAPACKE_lsame( jobu2, 'y' ) ) { - LAPACKE_free( u2_t ); - } -exit_level_5: - if( LAPACKE_lsame( jobu1, 'y' ) ) { - LAPACKE_free( u1_t ); - } -exit_level_4: - LAPACKE_free( x22_t ); -exit_level_3: - LAPACKE_free( x21_t ); -exit_level_2: - LAPACKE_free( x12_t ); -exit_level_1: - LAPACKE_free( x11_t ); -exit_level_0: - if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) { - LAPACKE_xerbla( "LAPACKE_sorcsd_work", info ); - } } else { info = -1; LAPACKE_xerbla( "LAPACKE_sorcsd_work", info ); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_sormbr.c lapack-3.7.1/LAPACKE/src/lapacke_sormbr.c --- lapack-3.7.0/LAPACKE/src/lapacke_sormbr.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_sormbr.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function sormbr * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -42,7 +42,7 @@ lapack_int lwork = -1; float* work = NULL; float work_query; - lapack_int nq, r; + lapack_int nq, ar, ac; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_sormbr", -1 ); return -1; @@ -50,8 +50,9 @@ #ifndef LAPACK_DISABLE_NAN_CHECK /* Optionally check input matrices for NaNs */ nq = LAPACKE_lsame( side, 'l' ) ? m : n; - r = LAPACKE_lsame( vect, 'q' ) ? nq : MIN(nq,k); - if( LAPACKE_sge_nancheck( matrix_layout, r, MIN(nq,k), a, lda ) ) { + ar = LAPACKE_lsame( vect, 'q' ) ? nq : MIN(nq,k); + ac = LAPACKE_lsame( vect, 'q' ) ? MIN(nq,k) : nq; + if( LAPACKE_sge_nancheck( matrix_layout, ar, ac, a, lda ) ) { return -8; } if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) { diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_sormbr_work.c lapack-3.7.1/LAPACKE/src/lapacke_sormbr_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_sormbr_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_sormbr_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -40,9 +40,6 @@ float* work, lapack_int lwork ) { lapack_int info = 0; - lapack_int nq, r; - lapack_int lda_t, ldc_t; - float *a_t = NULL, *c_t = NULL; if( matrix_layout == LAPACK_COL_MAJOR ) { /* Call LAPACK function and adjust info */ LAPACK_sormbr( &vect, &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, @@ -51,12 +48,15 @@ info = info - 1; } } else if( matrix_layout == LAPACK_ROW_MAJOR ) { - nq = LAPACKE_lsame( side, 'l' ) ? m : n; - r = LAPACKE_lsame( vect, 'q' ) ? nq : MIN(nq,k); - lda_t = MAX(1,r); - ldc_t = MAX(1,m); + lapack_int nq = LAPACKE_lsame( side, 'l' ) ? m : n; + lapack_int ar = LAPACKE_lsame( vect, 'q' ) ? nq : MIN(nq,k); + lapack_int ac = LAPACKE_lsame( vect, 'q' ) ? MIN(nq,k) : nq; + lapack_int lda_t = MAX(1,ar); + lapack_int ldc_t = MAX(1,m); + float *a_t = NULL; + float *c_t = NULL; /* Check leading dimension(s) */ - if( lda < MIN(nq,k) ) { + if( lda < ac ) { info = -9; LAPACKE_xerbla( "LAPACKE_sormbr_work", info ); return info; @@ -73,11 +73,7 @@ return (info < 0) ? (info - 1) : info; } /* Allocate memory for temporary array(s) */ - if( LAPACKE_lsame( vect, 'q' ) ) { - a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,k) ); - } else { - a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,nq) ); - } + a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,ac) ); if( a_t == NULL ) { info = LAPACK_TRANSPOSE_MEMORY_ERROR; goto exit_level_0; @@ -88,7 +84,7 @@ goto exit_level_1; } /* Transpose input matrices */ - LAPACKE_sge_trans( matrix_layout, r, MIN(nq,k), a, lda, a_t, lda_t ); + LAPACKE_sge_trans( matrix_layout, ar, ac, a, lda, a_t, lda_t ); LAPACKE_sge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t ); /* Call LAPACK function and adjust info */ LAPACK_sormbr( &vect, &side, &trans, &m, &n, &k, a_t, &lda_t, tau, c_t, diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_sormlq.c lapack-3.7.1/LAPACKE/src/lapacke_sormlq.c --- lapack-3.7.0/LAPACKE/src/lapacke_sormlq.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_sormlq.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function sormlq * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -48,7 +48,8 @@ } #ifndef LAPACK_DISABLE_NAN_CHECK /* Optionally check input matrices for NaNs */ - if( LAPACKE_sge_nancheck( matrix_layout, k, m, a, lda ) ) { + lapack_int r = LAPACKE_lsame( side, 'l' ) ? m : n; + if( LAPACKE_sge_nancheck( matrix_layout, k, r, a, lda ) ) { return -7; } if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) { diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_sormlq_work.c lapack-3.7.1/LAPACKE/src/lapacke_sormlq_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_sormlq_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_sormlq_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -40,9 +40,6 @@ float* work, lapack_int lwork ) { lapack_int info = 0; - lapack_int r; - lapack_int lda_t, ldc_t; - float *a_t = NULL, *c_t = NULL; if( matrix_layout == LAPACK_COL_MAJOR ) { /* Call LAPACK function and adjust info */ LAPACK_sormlq( &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, work, @@ -51,9 +48,11 @@ info = info - 1; } } else if( matrix_layout == LAPACK_ROW_MAJOR ) { - r = LAPACKE_lsame( side, 'l' ) ? m : n; - lda_t = MAX(1,k); - ldc_t = MAX(1,m); + lapack_int r = LAPACKE_lsame( side, 'l' ) ? m : n; + lapack_int lda_t = MAX(1,k); + lapack_int ldc_t = MAX(1,m); + float *a_t = NULL; + float *c_t = NULL; /* Check leading dimension(s) */ if( lda < r ) { info = -8; @@ -72,11 +71,7 @@ return (info < 0) ? (info - 1) : info; } /* Allocate memory for temporary array(s) */ - if( LAPACKE_lsame( side, 'l' ) ) { - a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,m) ); - } else { - a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) ); - } + a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,r) ); if( a_t == NULL ) { info = LAPACK_TRANSPOSE_MEMORY_ERROR; goto exit_level_0; @@ -87,7 +82,7 @@ goto exit_level_1; } /* Transpose input matrices */ - LAPACKE_sge_trans( matrix_layout, k, m, a, lda, a_t, lda_t ); + LAPACKE_sge_trans( matrix_layout, k, r, a, lda, a_t, lda_t ); LAPACKE_sge_trans( matrix_layout, m, n, c, ldc, c_t, ldc_t ); /* Call LAPACK function and adjust info */ LAPACK_sormlq( &side, &trans, &m, &n, &k, a_t, &lda_t, tau, c_t, &ldc_t, diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_sstegr.c lapack-3.7.1/LAPACKE/src/lapacke_sstegr.c --- lapack-3.7.0/LAPACKE/src/lapacke_sstegr.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_sstegr.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function sstegr * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -58,7 +58,7 @@ if( LAPACKE_s_nancheck( n, d, 1 ) ) { return -5; } - if( LAPACKE_s_nancheck( n, e, 1 ) ) { + if( LAPACKE_s_nancheck( n-1, e, 1 ) ) { return -6; } if( LAPACKE_lsame( range, 'v' ) ) { diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_sstein.c lapack-3.7.1/LAPACKE/src/lapacke_sstein.c --- lapack-3.7.0/LAPACKE/src/lapacke_sstein.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_sstein.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function sstein * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -50,7 +50,7 @@ if( LAPACKE_s_nancheck( n, d, 1 ) ) { return -3; } - if( LAPACKE_s_nancheck( n, e, 1 ) ) { + if( LAPACKE_s_nancheck( n-1, e, 1 ) ) { return -4; } if( LAPACKE_s_nancheck( n, w, 1 ) ) { diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_sstemr_work.c lapack-3.7.1/LAPACKE/src/lapacke_sstemr_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_sstemr_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_sstemr_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function sstemr * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -55,7 +55,7 @@ lapack_int ldz_t = MAX(1,n); float* z_t = NULL; /* Check leading dimension(s) */ - if( ldz < n ) { + if( ldz < 1 || ( LAPACKE_lsame( jobz, 'v' ) && ldz < n ) ) { info = -14; LAPACKE_xerbla( "LAPACKE_sstemr_work", info ); return info; diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_sstev.c lapack-3.7.1/LAPACKE/src/lapacke_sstev.c --- lapack-3.7.0/LAPACKE/src/lapacke_sstev.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_sstev.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function sstev * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -47,7 +47,7 @@ if( LAPACKE_s_nancheck( n, d, 1 ) ) { return -4; } - if( LAPACKE_s_nancheck( n, e, 1 ) ) { + if( LAPACKE_s_nancheck( n-1, e, 1 ) ) { return -5; } #endif diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_sstevd.c lapack-3.7.1/LAPACKE/src/lapacke_sstevd.c --- lapack-3.7.0/LAPACKE/src/lapacke_sstevd.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_sstevd.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function sstevd * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -52,7 +52,7 @@ if( LAPACKE_s_nancheck( n, d, 1 ) ) { return -4; } - if( LAPACKE_s_nancheck( n, e, 1 ) ) { + if( LAPACKE_s_nancheck( n-1, e, 1 ) ) { return -5; } #endif diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_sstevx.c lapack-3.7.1/LAPACKE/src/lapacke_sstevx.c --- lapack-3.7.0/LAPACKE/src/lapacke_sstevx.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_sstevx.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function sstevx * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -54,7 +54,7 @@ if( LAPACKE_s_nancheck( n, d, 1 ) ) { return -5; } - if( LAPACKE_s_nancheck( n, e, 1 ) ) { + if( LAPACKE_s_nancheck( n-1, e, 1 ) ) { return -6; } if( LAPACKE_lsame( range, 'v' ) ) { diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_ssycon_3.c lapack-3.7.1/LAPACKE/src/lapacke_ssycon_3.c --- lapack-3.7.0/LAPACKE/src/lapacke_ssycon_3.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_ssycon_3.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function ssycon_3 * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -40,6 +40,7 @@ lapack_int info = 0; lapack_int* iwork = NULL; float* work = NULL; + lapack_int e_start = LAPACKE_lsame( uplo, 'U' ) ? 1 : 0; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_ssycon_3", -1 ); return -1; @@ -49,7 +50,7 @@ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) { return -4; } - if( LAPACKE_s_nancheck( n, e, 1 ) ) { + if( LAPACKE_s_nancheck( n-1, e + e_start, 1 ) ) { return -6; } if( LAPACKE_s_nancheck( 1, &anorm, 1 ) ) { diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_ssyevr_work.c lapack-3.7.1/LAPACKE/src/lapacke_ssyevr_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_ssyevr_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_ssyevr_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function ssyevr * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -52,8 +52,9 @@ info = info - 1; } } else if( matrix_layout == LAPACK_ROW_MAJOR ) { - lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) || - LAPACKE_lsame( range, 'v' ) ) ? n : + lapack_int ncols_z = ( !LAPACKE_lsame( jobz, 'v' ) ) ? 1 : + ( LAPACKE_lsame( range, 'a' ) || + LAPACKE_lsame( range, 'v' ) ) ? n : ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1); lapack_int lda_t = MAX(1,n); lapack_int ldz_t = MAX(1,n); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_ssyevx_work.c lapack-3.7.1/LAPACKE/src/lapacke_ssyevx_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_ssyevx_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_ssyevx_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function ssyevx * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -51,8 +51,9 @@ info = info - 1; } } else if( matrix_layout == LAPACK_ROW_MAJOR ) { - lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) || - LAPACKE_lsame( range, 'v' ) ) ? n : + lapack_int ncols_z = ( !LAPACKE_lsame( jobz, 'v' ) ) ? 1 : + ( LAPACKE_lsame( range, 'a' ) || + LAPACKE_lsame( range, 'v' ) ) ? n : ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1); lapack_int lda_t = MAX(1,n); lapack_int ldz_t = MAX(1,n); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_ssygvx_work.c lapack-3.7.1/LAPACKE/src/lapacke_ssygvx_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_ssygvx_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_ssygvx_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function ssygvx * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -105,7 +105,7 @@ } /* Transpose input matrices */ LAPACKE_ssy_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t ); - LAPACKE_sge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t ); + LAPACKE_ssy_trans( matrix_layout, uplo, n, b, ldb, b_t, ldb_t ); /* Call LAPACK function and adjust info */ LAPACK_ssygvx( &itype, &jobz, &range, &uplo, &n, a_t, &lda_t, b_t, &ldb_t, &vl, &vu, &il, &iu, &abstol, m, w, z_t, &ldz_t, @@ -115,7 +115,7 @@ } /* Transpose output matrices */ LAPACKE_ssy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda ); - LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb ); + LAPACKE_ssy_trans( LAPACK_COL_MAJOR, uplo, n, b_t, ldb_t, b, ldb ); if( LAPACKE_lsame( jobz, 'v' ) ) { LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, ncols_z, z_t, ldz_t, z, ldz ); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_ssysv_rk.c lapack-3.7.1/LAPACKE/src/lapacke_ssysv_rk.c --- lapack-3.7.0/LAPACKE/src/lapacke_ssysv_rk.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_ssysv_rk.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function ssysv_rk * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -50,9 +50,6 @@ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) { return -5; } - if( LAPACKE_s_nancheck( n, e, 1) ) { - return -7; - } if( LAPACKE_sge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) { return -9; } diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_ssytrf_rk.c lapack-3.7.1/LAPACKE/src/lapacke_ssytrf_rk.c --- lapack-3.7.0/LAPACKE/src/lapacke_ssytrf_rk.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_ssytrf_rk.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function ssytrf_rk * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -49,9 +49,6 @@ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) { return -4; } - if( LAPACKE_s_nancheck( n, e, 1 ) ) { - return -6; - } #endif /* Query optimal working array(s) size */ info = LAPACKE_ssytrf_rk_work( matrix_layout, uplo, n, a, lda, e, ipiv, diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_ssytri_3.c lapack-3.7.1/LAPACKE/src/lapacke_ssytri_3.c --- lapack-3.7.0/LAPACKE/src/lapacke_ssytri_3.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_ssytri_3.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function ssytri_3 * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -40,6 +40,7 @@ lapack_int lwork = -1; float* work = NULL; float work_query; + lapack_int e_start = LAPACKE_lsame( uplo, 'U' ) ? 1 : 0; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_ssytri_3", -1 ); return -1; @@ -49,7 +50,7 @@ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) { return -4; } - if( LAPACKE_s_nancheck( n, e, 1 ) ) { + if( LAPACKE_s_nancheck( n-1, e + e_start, 1 ) ) { return -6; } #endif diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_ssytrs_aa.c lapack-3.7.1/LAPACKE/src/lapacke_ssytrs_aa.c --- lapack-3.7.0/LAPACKE/src/lapacke_ssytrs_aa.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_ssytrs_aa.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function ssytrs_aa * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -60,7 +60,7 @@ if( info != 0 ) { goto exit_level_0; } - lwork = (lapack_int)work_query; + lwork = (lapack_int)work_query; /* Allocate memory for work arrays */ work = (float*) LAPACKE_malloc( sizeof(float) * lwork ); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_stpmqrt.c lapack-3.7.1/LAPACKE/src/lapacke_stpmqrt.c --- lapack-3.7.0/LAPACKE/src/lapacke_stpmqrt.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_stpmqrt.c 2017-06-17 22:46:53.000000000 +0000 @@ -41,6 +41,7 @@ { lapack_int ncols_a, nrows_a; lapack_int nrows_v; + lapack_int lwork; lapack_int info = 0; float* work = NULL; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { @@ -69,7 +70,9 @@ } #endif /* Allocate memory for working array(s) */ - work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,m) * MAX(1,nb) ); + lwork = LAPACKE_lsame( side, 'L' ) ? MAX(1,nb) * MAX(1,n) : + ( LAPACKE_lsame( side, 'R' ) ? MAX(1,m) * MAX(1,nb) : 0 ); + work = (float*)LAPACKE_malloc( sizeof(float) * lwork ); if( work == NULL ) { info = LAPACK_WORK_MEMORY_ERROR; goto exit_level_0; diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zbbcsd.c lapack-3.7.1/LAPACKE/src/lapacke_zbbcsd.c --- lapack-3.7.0/LAPACKE/src/lapacke_zbbcsd.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zbbcsd.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function zbbcsd * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -48,17 +48,18 @@ lapack_int lrwork = -1; double* rwork = NULL; double rwork_query; - lapack_int nrows_u1, nrows_u2, nrows_v1t, nrows_v2t; + int lapack_layout; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_zbbcsd", -1 ); return -1; } + if( LAPACKE_lsame( trans, 'n' ) && matrix_layout == LAPACK_COL_MAJOR ) { + lapack_layout = LAPACK_COL_MAJOR; + } else { + lapack_layout = LAPACK_ROW_MAJOR; + } #ifndef LAPACK_DISABLE_NAN_CHECK /* Optionally check input matrices for NaNs */ - nrows_u1 = ( LAPACKE_lsame( jobu1, 'y' ) ? p : 1); - nrows_u2 = ( LAPACKE_lsame( jobu2, 'y' ) ? m-p : 1); - nrows_v1t = ( LAPACKE_lsame( jobv1t, 'y' ) ? q : 1); - nrows_v2t = ( LAPACKE_lsame( jobv2t, 'y' ) ? m-q : 1); if( LAPACKE_d_nancheck( q-1, phi, 1 ) ) { return -11; } @@ -66,22 +67,22 @@ return -10; } if( LAPACKE_lsame( jobu1, 'y' ) ) { - if( LAPACKE_zge_nancheck( matrix_layout, nrows_u1, p, u1, ldu1 ) ) { + if( LAPACKE_zge_nancheck( lapack_layout, p, p, u1, ldu1 ) ) { return -12; } } if( LAPACKE_lsame( jobu2, 'y' ) ) { - if( LAPACKE_zge_nancheck( matrix_layout, nrows_u2, m-p, u2, ldu2 ) ) { + if( LAPACKE_zge_nancheck( lapack_layout, m-p, m-p, u2, ldu2 ) ) { return -14; } } if( LAPACKE_lsame( jobv1t, 'y' ) ) { - if( LAPACKE_zge_nancheck( matrix_layout, nrows_v1t, q, v1t, ldv1t ) ) { + if( LAPACKE_zge_nancheck( lapack_layout, q, q, v1t, ldv1t ) ) { return -16; } } if( LAPACKE_lsame( jobv2t, 'y' ) ) { - if( LAPACKE_zge_nancheck( matrix_layout, nrows_v2t, m-q, v2t, ldv2t ) ) { + if( LAPACKE_zge_nancheck( lapack_layout, m-q, m-q, v2t, ldv2t ) ) { return -18; } } diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zbbcsd_work.c lapack-3.7.1/LAPACKE/src/lapacke_zbbcsd_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_zbbcsd_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zbbcsd_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function zbbcsd * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -47,156 +47,36 @@ lapack_int lrwork ) { lapack_int info = 0; - if( matrix_layout == LAPACK_COL_MAJOR ) { + /* LAPACK function works with matrices in both layouts. It is supported + * through TRANS parameter. So all conversion between layouts can be + * completed in LAPACK function. See the table below which describes how + * every LAPACKE call is forwarded to corresponding LAPACK call. + * + * matrix_layout | trans_LAPACKE | -> trans_LAPACK + * | (trans) | (ltrans) + * -----------------+---------------+---------------- + * LAPACK_COL_MAJOR | 'N' | -> 'N' + * LAPACK_COL_MAJOR | 'T' | -> 'T' + * LAPACK_ROW_MAJOR | 'N' | -> 'T' + * LAPACK_ROW_MAJOR | 'T' | -> 'T' + * (note that for row major layout trans parameter is ignored) + */ + if( matrix_layout == LAPACK_COL_MAJOR || + matrix_layout == LAPACK_ROW_MAJOR ) { + char ltrans; + if( !LAPACKE_lsame( trans, 't' ) && matrix_layout == LAPACK_COL_MAJOR ) { + ltrans = 'n'; + } else { + ltrans = 't'; + } /* Call LAPACK function and adjust info */ - LAPACK_zbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &m, &p, &q, + LAPACK_zbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, <rans, &m, &p, &q, theta, phi, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, v2t, &ldv2t, b11d, b11e, b12d, b12e, b21d, b21e, b22d, b22e, rwork, &lrwork, &info ); if( info < 0 ) { info = info - 1; } - } else if( matrix_layout == LAPACK_ROW_MAJOR ) { - lapack_int nrows_u1 = ( LAPACKE_lsame( jobu1, 'y' ) ? p : 1); - lapack_int nrows_u2 = ( LAPACKE_lsame( jobu2, 'y' ) ? m-p : 1); - lapack_int nrows_v1t = ( LAPACKE_lsame( jobv1t, 'y' ) ? q : 1); - lapack_int nrows_v2t = ( LAPACKE_lsame( jobv2t, 'y' ) ? m-q : 1); - lapack_int ldu1_t = MAX(1,nrows_u1); - lapack_int ldu2_t = MAX(1,nrows_u2); - lapack_int ldv1t_t = MAX(1,nrows_v1t); - lapack_int ldv2t_t = MAX(1,nrows_v2t); - lapack_complex_double* u1_t = NULL; - lapack_complex_double* u2_t = NULL; - lapack_complex_double* v1t_t = NULL; - lapack_complex_double* v2t_t = NULL; - /* Check leading dimension(s) */ - if( ldu1 < p ) { - info = -13; - LAPACKE_xerbla( "LAPACKE_zbbcsd_work", info ); - return info; - } - if( ldu2 < m-p ) { - info = -15; - LAPACKE_xerbla( "LAPACKE_zbbcsd_work", info ); - return info; - } - if( ldv1t < q ) { - info = -17; - LAPACKE_xerbla( "LAPACKE_zbbcsd_work", info ); - return info; - } - if( ldv2t < m-q ) { - info = -19; - LAPACKE_xerbla( "LAPACKE_zbbcsd_work", info ); - return info; - } - /* Query optimal working array(s) size if requested */ - if( lrwork == -1 ) { - LAPACK_zbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &m, &p, &q, - theta, phi, u1, &ldu1_t, u2, &ldu2_t, v1t, &ldv1t_t, - v2t, &ldv2t_t, b11d, b11e, b12d, b12e, b21d, b21e, - b22d, b22e, rwork, &lrwork, &info ); - return (info < 0) ? (info - 1) : info; - } - /* Allocate memory for temporary array(s) */ - if( LAPACKE_lsame( jobu1, 'y' ) ) { - u1_t = (lapack_complex_double*) - LAPACKE_malloc( sizeof(lapack_complex_double) * - ldu1_t * MAX(1,p) ); - if( u1_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_0; - } - } - if( LAPACKE_lsame( jobu2, 'y' ) ) { - u2_t = (lapack_complex_double*) - LAPACKE_malloc( sizeof(lapack_complex_double) * - ldu2_t * MAX(1,m-p) ); - if( u2_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_1; - } - } - if( LAPACKE_lsame( jobv1t, 'y' ) ) { - v1t_t = (lapack_complex_double*) - LAPACKE_malloc( sizeof(lapack_complex_double) * - ldv1t_t * MAX(1,q) ); - if( v1t_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_2; - } - } - if( LAPACKE_lsame( jobv2t, 'y' ) ) { - v2t_t = (lapack_complex_double*) - LAPACKE_malloc( sizeof(lapack_complex_double) * - ldv2t_t * MAX(1,m-q) ); - if( v2t_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_3; - } - } - /* Transpose input matrices */ - if( LAPACKE_lsame( jobu1, 'y' ) ) { - LAPACKE_zge_trans( matrix_layout, nrows_u1, p, u1, ldu1, u1_t, - ldu1_t ); - } - if( LAPACKE_lsame( jobu2, 'y' ) ) { - LAPACKE_zge_trans( matrix_layout, nrows_u2, m-p, u2, ldu2, u2_t, - ldu2_t ); - } - if( LAPACKE_lsame( jobv1t, 'y' ) ) { - LAPACKE_zge_trans( matrix_layout, nrows_v1t, q, v1t, ldv1t, v1t_t, - ldv1t_t ); - } - if( LAPACKE_lsame( jobv2t, 'y' ) ) { - LAPACKE_zge_trans( matrix_layout, nrows_v2t, m-q, v2t, ldv2t, v2t_t, - ldv2t_t ); - } - /* Call LAPACK function and adjust info */ - LAPACK_zbbcsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &m, &p, &q, - theta, phi, u1_t, &ldu1_t, u2_t, &ldu2_t, v1t_t, - &ldv1t_t, v2t_t, &ldv2t_t, b11d, b11e, b12d, b12e, b21d, - b21e, b22d, b22e, rwork, &lrwork, &info ); - if( info < 0 ) { - info = info - 1; - } - /* Transpose output matrices */ - if( LAPACKE_lsame( jobu1, 'y' ) ) { - LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_u1, p, u1_t, ldu1_t, u1, - ldu1 ); - } - if( LAPACKE_lsame( jobu2, 'y' ) ) { - LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_u2, m-p, u2_t, ldu2_t, - u2, ldu2 ); - } - if( LAPACKE_lsame( jobv1t, 'y' ) ) { - LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_v1t, q, v1t_t, ldv1t_t, - v1t, ldv1t ); - } - if( LAPACKE_lsame( jobv2t, 'y' ) ) { - LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_v2t, m-q, v2t_t, ldv2t_t, - v2t, ldv2t ); - } - /* Release memory and exit */ - if( LAPACKE_lsame( jobv2t, 'y' ) ) { - LAPACKE_free( v2t_t ); - } -exit_level_3: - if( LAPACKE_lsame( jobv1t, 'y' ) ) { - LAPACKE_free( v1t_t ); - } -exit_level_2: - if( LAPACKE_lsame( jobu2, 'y' ) ) { - LAPACKE_free( u2_t ); - } -exit_level_1: - if( LAPACKE_lsame( jobu1, 'y' ) ) { - LAPACKE_free( u1_t ); - } -exit_level_0: - if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) { - LAPACKE_xerbla( "LAPACKE_zbbcsd_work", info ); - } } else { info = -1; LAPACKE_xerbla( "LAPACKE_zbbcsd_work", info ); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zgejsv.c lapack-3.7.1/LAPACKE/src/lapacke_zgejsv.c --- lapack-3.7.0/LAPACKE/src/lapacke_zgejsv.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zgejsv.c 2017-06-17 22:46:53.000000000 +0000 @@ -41,22 +41,22 @@ { lapack_int info = 0; lapack_int lwork = ( - // 1.1 - ( LAPACKE_lsame( jobu, 'n' ) && LAPACKE_lsame( jobv, 'n' ) && + // 1.1 + ( LAPACKE_lsame( jobu, 'n' ) && LAPACKE_lsame( jobv, 'n' ) && ( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) )) ? 2*n+1 : //1.2 - ( ( LAPACKE_lsame( jobu, 'n' ) && LAPACKE_lsame( jobv, 'n' ) && + ( ( LAPACKE_lsame( jobu, 'n' ) && LAPACKE_lsame( jobv, 'n' ) && !( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) )) ? n*n+3*n : //2.1 - ( ( ( LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' ) ) && - (!( LAPACKE_lsame( jobu, 'u') || LAPACKE_lsame( jobu, 'f' ) )&& + ( ( ( LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' ) ) && + !( LAPACKE_lsame( jobu, 'u') || LAPACKE_lsame( jobu, 'f' ) )&& ( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) ))? 3*n : //2.2 - ( ( ( LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' ) ) && + ( ( ( LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' ) ) && !( LAPACKE_lsame( jobu, 'u' ) || LAPACKE_lsame( jobu, 'f' ) ) && !( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) ))? 3*n : @@ -79,10 +79,10 @@ ( ( ( LAPACKE_lsame( jobu, 'u' ) || LAPACKE_lsame( jobu, 'f' ) ) && ( LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' ) ) && ( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) ))? 4*n*n: - 1) ) ) ) ) ) ) ) ); + 1) ) ) ) ) ) ) ); lapack_int lrwork = ( - // 1.1 - ( LAPACKE_lsame( jobu, 'n' ) && LAPACKE_lsame( jobv, 'n' ) && + // 1.1 + ( LAPACKE_lsame( jobu, 'n' ) && LAPACKE_lsame( jobv, 'n' ) && ( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) )) ? MAX(7,n+2*m) : //1.2 @@ -90,13 +90,13 @@ !( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) )) ? MAX(7,2*n) : //2.1 - ( ( ( LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' ) ) && - (!( LAPACKE_lsame( jobu, 'u') || LAPACKE_lsame( jobu, 'f' ) ) && + ( ( ( LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' ) ) && + !( LAPACKE_lsame( jobu, 'u') || LAPACKE_lsame( jobu, 'f' ) ) && ( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) ))? MAX( 7, n+ 2*m ) : //2.2 - ( ( ( LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' ) ) && + ( ( ( LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' ) ) && !( LAPACKE_lsame( jobu, 'u' ) || LAPACKE_lsame( jobu, 'f' ) ) && !( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) ))? MAX(7,2*n) : @@ -119,7 +119,7 @@ ( ( ( LAPACKE_lsame( jobu, 'u' ) || LAPACKE_lsame( jobu, 'f' ) ) && ( LAPACKE_lsame( jobv, 'v' ) || LAPACKE_lsame( jobv, 'j' ) ) && ( LAPACKE_lsame( jobt, 't' ) || LAPACKE_lsame( joba, 'f' ) || LAPACKE_lsame( joba, 'g' ) ))? MAX(7,2*n) : - 7) ) ) ) ) ) ) ) ); + 7) ) ) ) ) ) ) ); lapack_int* iwork = NULL; double* rwork = NULL; lapack_complex_double* cwork = NULL; diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zgelq.c lapack-3.7.1/LAPACKE/src/lapacke_zgelq.c --- lapack-3.7.0/LAPACKE/src/lapacke_zgelq.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zgelq.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,14 +28,14 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function zgelq * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" -lapack_int LAPACKE_zgelq_work( int matrix_layout, lapack_int m, lapack_int n, - lapack_complex_double* a, lapack_int lda, - lapack_complex_double* t, lapack_int tsize ) +lapack_int LAPACKE_zgelq( int matrix_layout, lapack_int m, lapack_int n, + lapack_complex_double* a, lapack_int lda, + lapack_complex_double* t, lapack_int tsize ) { lapack_int info = 0; lapack_int lwork = -1; @@ -60,7 +60,7 @@ if( tsize == -1 || tsize == -2 ) { goto exit_level_0; } - lwork = (lapack_int)work_query; + lwork = LAPACK_Z2INT( work_query ); /* Allocate memory for work arrays */ work = (lapack_complex_double*)LAPACKE_malloc( sizeof(lapack_complex_double) * lwork ); if( work == NULL ) { diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zgemlq.c lapack-3.7.1/LAPACKE/src/lapacke_zgemlq.c --- lapack-3.7.0/LAPACKE/src/lapacke_zgemlq.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zgemlq.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function zgemlq * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -55,7 +55,7 @@ if( LAPACKE_zge_nancheck( matrix_layout, m, n, c, ldc ) ) { return -10; } - if( LAPACKE_d_nancheck( tsize, t, 1 ) ) { + if( LAPACKE_z_nancheck( tsize, t, 1 ) ) { return -9; } #endif @@ -65,7 +65,7 @@ if( info != 0 ) { goto exit_level_0; } - lwork = (lapack_int)work_query; + lwork = LAPACK_Z2INT( work_query ); /* Allocate memory for work arrays */ work = (lapack_complex_double*)LAPACKE_malloc( sizeof(lapack_complex_double) * lwork ); if( work == NULL ) { diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zgeqr.c lapack-3.7.1/LAPACKE/src/lapacke_zgeqr.c --- lapack-3.7.0/LAPACKE/src/lapacke_zgeqr.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zgeqr.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function zgeqr * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -60,7 +60,7 @@ if( tsize == -1 || tsize == -2 ) { goto exit_level_0; } - lwork = (lapack_int)work_query; + lwork = LAPACK_Z2INT( work_query ); /* Allocate memory for work arrays */ work = (lapack_complex_double*) LAPACKE_malloc( sizeof(lapack_complex_double) * lwork ); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zgesdd.c lapack-3.7.1/LAPACKE/src/lapacke_zgesdd.c --- lapack-3.7.0/LAPACKE/src/lapacke_zgesdd.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zgesdd.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function zgesdd * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -61,7 +61,7 @@ if( LAPACKE_lsame( jobz, 'n' ) ) { lrwork = MAX(1,7*MIN(m,n)); } else { - lrwork = (size_t)MIN(m,n)*MAX(5*MIN(m,n)+7,2*MAX(m,n)+2*MIN(m,n)+1); + lrwork = (size_t)MAX(1,MIN(m,n)*MAX(5*MIN(m,n)+7,2*MAX(m,n)+2*MIN(m,n)+1)); } /* Allocate memory for working array(s) */ iwork = (lapack_int*) diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zgesvdx.c lapack-3.7.1/LAPACKE/src/lapacke_zgesvdx.c --- lapack-3.7.0/LAPACKE/src/lapacke_zgesvdx.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zgesvdx.c 2017-06-17 22:46:53.000000000 +0000 @@ -34,12 +34,12 @@ #include "lapacke_utils.h" lapack_int LAPACKE_zgesvdx( int matrix_layout, char jobu, char jobvt, char range, - lapack_int m, lapack_int n, lapack_complex_double* a, - lapack_int lda, double vl, double vu, - lapack_int il, lapack_int iu, lapack_int* ns, - double* s, lapack_complex_double* u, lapack_int ldu, - lapack_complex_double* vt, lapack_int ldvt, - lapack_int* superb ) + lapack_int m, lapack_int n, lapack_complex_double* a, + lapack_int lda, double vl, double vu, + lapack_int il, lapack_int iu, lapack_int* ns, + double* s, lapack_complex_double* u, lapack_int ldu, + lapack_complex_double* vt, lapack_int ldvt, + lapack_int* superb ) { lapack_int info = 0; lapack_int lwork = -1; @@ -61,7 +61,7 @@ #endif /* Query optimal working array(s) size */ info = LAPACKE_zgesvdx_work( matrix_layout, jobu, jobvt, range, - m, n, a, lda, vl, vu, il, iu, ns, s, u, + m, n, a, lda, vl, vu, il, iu, ns, s, u, ldu, vt, ldvt, &work_query, lwork, rwork, iwork ); if( info != 0 ) { goto exit_level_0; @@ -69,7 +69,7 @@ lwork = LAPACK_Z2INT (work_query); /* Allocate memory for work arrays */ work = (lapack_complex_double*) - LAPACKE_malloc( sizeof(lapack_complex_double) * lwork ); + LAPACKE_malloc( sizeof(lapack_complex_double) * lwork ); if( work == NULL ) { info = LAPACK_WORK_MEMORY_ERROR; goto exit_level_1; @@ -86,8 +86,8 @@ } /* Call middle-level interface */ info = LAPACKE_zgesvdx_work( matrix_layout, jobu, jobvt, range, - m, n, a, lda, vl, vu, il, iu, ns, s, u, - ldu, vt, ldvt, work, lwork, rwork, iwork ); + m, n, a, lda, vl, vu, il, iu, ns, s, u, + ldu, vt, ldvt, work, lwork, rwork, iwork ); /* Backup significant data from working array(s) */ for( i=0; i<12*MIN(m,n)-1; i++ ) { superb[i] = iwork[i+1]; diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zgesvdx_work.c lapack-3.7.1/LAPACKE/src/lapacke_zgesvdx_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_zgesvdx_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zgesvdx_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -34,19 +34,19 @@ #include "lapacke_utils.h" lapack_int LAPACKE_zgesvdx_work( int matrix_layout, char jobu, char jobvt, char range, - lapack_int m, lapack_int n, lapack_complex_double* a, - lapack_int lda, double vl, double vu, - lapack_int il, lapack_int iu, lapack_int* ns, - double* s, lapack_complex_double* u, lapack_int ldu, - lapack_complex_double* vt, lapack_int ldvt, - lapack_complex_double* work, lapack_int lwork, - double* rwork, lapack_int* iwork ) + lapack_int m, lapack_int n, lapack_complex_double* a, + lapack_int lda, double vl, double vu, + lapack_int il, lapack_int iu, lapack_int* ns, + double* s, lapack_complex_double* u, lapack_int ldu, + lapack_complex_double* vt, lapack_int ldvt, + lapack_complex_double* work, lapack_int lwork, + double* rwork, lapack_int* iwork ) { lapack_int info = 0; if( matrix_layout == LAPACK_COL_MAJOR ) { /* Call LAPACK function and adjust info */ LAPACK_zgesvdx( &jobu, &jobvt, &range, &m, &n, a, &lda, &vl, &vu, - &il, &iu, ns, s, u, &ldu, vt, &ldvt, + &il, &iu, ns, s, u, &ldu, vt, &ldvt, work, &lwork, rwork, iwork, &info ); if( info < 0 ) { info = info - 1; @@ -85,7 +85,7 @@ /* Query optimal working array(s) size if requested */ if( lwork == -1 ) { LAPACK_zgesvdx( &jobu, &jobvt, &range, &m, &n, a, &lda_t, &vl, &vu, - &il, &iu, ns, s, u, &ldu_t, vt, + &il, &iu, ns, s, u, &ldu_t, vt, &ldvt_t, work, &lwork, rwork, iwork, &info ); return (info < 0) ? (info - 1) : info; } @@ -116,7 +116,7 @@ LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t ); /* Call LAPACK function and adjust info */ LAPACK_zgesvdx( &jobu, &jobvt, &range, &m, &n, a_t, &lda_t, &vl, &vu, - &il, &iu, ns, s, u_t, &ldu_t, vt_t, + &il, &iu, ns, s, u_t, &ldu_t, vt_t, &ldvt_t, work, &lwork, rwork, iwork, &info ); if( info < 0 ) { info = info - 1; diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zgesvj_work.c lapack-3.7.1/LAPACKE/src/lapacke_zgesvj_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_zgesvj_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zgesvj_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -76,7 +76,7 @@ } if( LAPACKE_lsame( jobv, 'a' ) || LAPACKE_lsame( jobv, 'v' ) ) { v_t = (lapack_complex_double*) - LAPACKE_malloc( sizeof(lapack_complex_double) * ldv_t * MAX(1,n) ); + LAPACKE_malloc( sizeof(lapack_complex_double) * ldv_t * MAX(1,n) ); if( v_t == NULL ) { info = LAPACK_TRANSPOSE_MEMORY_ERROR; goto exit_level_1; diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zhecon_3.c lapack-3.7.1/LAPACKE/src/lapacke_zhecon_3.c --- lapack-3.7.0/LAPACKE/src/lapacke_zhecon_3.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zhecon_3.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function zhecon_3 * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -40,6 +40,7 @@ { lapack_int info = 0; lapack_complex_double* work = NULL; + lapack_int e_start = LAPACKE_lsame( uplo, 'U' ) ? 1 : 0; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_zhecon_3", -1 ); return -1; @@ -49,7 +50,7 @@ if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) { return -4; } - if( LAPACKE_z_nancheck( n, e, 1 ) ) { + if( LAPACKE_z_nancheck( n-1, e + e_start, 1 ) ) { return -6; } if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) { diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zheevr_work.c lapack-3.7.1/LAPACKE/src/lapacke_zheevr_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_zheevr_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zheevr_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function zheevr * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -54,8 +54,9 @@ info = info - 1; } } else if( matrix_layout == LAPACK_ROW_MAJOR ) { - lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) || - LAPACKE_lsame( range, 'v' ) ) ? n : + lapack_int ncols_z = ( !LAPACKE_lsame( jobz, 'v' ) ) ? 1 : + ( LAPACKE_lsame( range, 'a' ) || + LAPACKE_lsame( range, 'v' ) ) ? n : ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1); lapack_int lda_t = MAX(1,n); lapack_int ldz_t = MAX(1,n); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zheevx_work.c lapack-3.7.1/LAPACKE/src/lapacke_zheevx_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_zheevx_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zheevx_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function zheevx * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -53,8 +53,9 @@ info = info - 1; } } else if( matrix_layout == LAPACK_ROW_MAJOR ) { - lapack_int ncols_z = ( LAPACKE_lsame( range, 'a' ) || - LAPACKE_lsame( range, 'v' ) ) ? n : + lapack_int ncols_z = ( !LAPACKE_lsame( jobz, 'v' ) ) ? 1 : + ( LAPACKE_lsame( range, 'a' ) || + LAPACKE_lsame( range, 'v' ) ) ? n : ( LAPACKE_lsame( range, 'i' ) ? (iu-il+1) : 1); lapack_int lda_t = MAX(1,n); lapack_int ldz_t = MAX(1,n); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zhegvx_work.c lapack-3.7.1/LAPACKE/src/lapacke_zhegvx_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_zhegvx_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zhegvx_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function zhegvx * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -110,7 +110,7 @@ } /* Transpose input matrices */ LAPACKE_zhe_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t ); - LAPACKE_zge_trans( matrix_layout, n, n, b, ldb, b_t, ldb_t ); + LAPACKE_zhe_trans( matrix_layout, uplo, n, b, ldb, b_t, ldb_t ); /* Call LAPACK function and adjust info */ LAPACK_zhegvx( &itype, &jobz, &range, &uplo, &n, a_t, &lda_t, b_t, &ldb_t, &vl, &vu, &il, &iu, &abstol, m, w, z_t, &ldz_t, @@ -120,7 +120,7 @@ } /* Transpose output matrices */ LAPACKE_zhe_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda ); - LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, b_t, ldb_t, b, ldb ); + LAPACKE_zhe_trans( LAPACK_COL_MAJOR, uplo, n, b_t, ldb_t, b, ldb ); if( LAPACKE_lsame( jobz, 'v' ) ) { LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, ncols_z, z_t, ldz_t, z, ldz ); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zhesv_rk.c lapack-3.7.1/LAPACKE/src/lapacke_zhesv_rk.c --- lapack-3.7.0/LAPACKE/src/lapacke_zhesv_rk.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zhesv_rk.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function zhesv_rk * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -51,9 +51,6 @@ if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) { return -5; } - if( LAPACKE_z_nancheck( n, e, 1) ) { - return -7; - } if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) { return -9; } diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zhetrf_rk.c lapack-3.7.1/LAPACKE/src/lapacke_zhetrf_rk.c --- lapack-3.7.0/LAPACKE/src/lapacke_zhetrf_rk.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zhetrf_rk.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function zhetrf_rk * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -50,9 +50,6 @@ if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) { return -4; } - if( LAPACKE_z_nancheck( n, e, 1 ) ) { - return -6; - } #endif /* Query optimal working array(s) size */ info = LAPACKE_zhetrf_rk_work( matrix_layout, uplo, n, a, lda, e, ipiv, diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zhetrf_rk_work.c lapack-3.7.1/LAPACKE/src/lapacke_zhetrf_rk_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_zhetrf_rk_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zhetrf_rk_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,14 +28,14 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function zhetrf_rk * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" lapack_int LAPACKE_zhetrf_rk_work( int matrix_layout, char uplo, lapack_int n, lapack_complex_double* a, lapack_int lda, - lapack_complex_double* e, + lapack_complex_double* e, lapack_int* ipiv, lapack_complex_double* work, lapack_int lwork ) { diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zhetri_3.c lapack-3.7.1/LAPACKE/src/lapacke_zhetri_3.c --- lapack-3.7.0/LAPACKE/src/lapacke_zhetri_3.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zhetri_3.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function zhetri_3 * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -41,6 +41,7 @@ lapack_int lwork = -1; lapack_complex_double* work = NULL; lapack_complex_double work_query; + lapack_int e_start = LAPACKE_lsame( uplo, 'U' ) ? 1 : 0; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_zhetri_3", -1 ); return -1; @@ -50,7 +51,7 @@ if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) { return -4; } - if( LAPACKE_z_nancheck( n, e, 1 ) ) { + if( LAPACKE_z_nancheck( n-1, e + e_start, 1 ) ) { return -6; } #endif @@ -60,7 +61,7 @@ if( info != 0 ) { goto exit_level_0; } - lwork = (lapack_int)work_query; + lwork = LAPACK_Z2INT( work_query ); /* Allocate memory for working array(s) */ work = (lapack_complex_double*) LAPACKE_malloc( sizeof(lapack_complex_double) * lwork ); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zhetrs_3.c lapack-3.7.1/LAPACKE/src/lapacke_zhetrs_3.c --- lapack-3.7.0/LAPACKE/src/lapacke_zhetrs_3.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zhetrs_3.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function zhetrs_3 * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -56,5 +56,5 @@ } #endif return LAPACKE_zhetrs_3_work( matrix_layout, uplo, n, nrhs, a, lda, - e, ipiv, b, ldb ); + e, ipiv, b, ldb ); } diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zlacp2_work.c lapack-3.7.1/LAPACKE/src/lapacke_zlacp2_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_zlacp2_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zlacp2_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -31,7 +31,6 @@ * Generated January, 2013 *****************************************************************************/ -#include "lapacke.h" #include "lapacke_utils.h" lapack_int LAPACKE_zlacp2_work( int matrix_layout, char uplo, lapack_int m, diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zlange.c lapack-3.7.1/LAPACKE/src/lapacke_zlange.c --- lapack-3.7.0/LAPACKE/src/lapacke_zlange.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zlange.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function zlange * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -38,7 +38,7 @@ lapack_int lda ) { lapack_int info = 0; - double res = 0.; + double res = 0.; double* work = NULL; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_zlange", -1 ); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zlange_work.c lapack-3.7.1/LAPACKE/src/lapacke_zlange_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_zlange_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zlange_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function zlange * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -38,38 +38,42 @@ lapack_int lda, double* work ) { lapack_int info = 0; - double res = 0.; + double res = 0.; + char norm_lapack; if( matrix_layout == LAPACK_COL_MAJOR ) { - /* Call LAPACK function and adjust info */ + /* Call LAPACK function */ res = LAPACK_zlange( &norm, &m, &n, a, &lda, work ); - if( info < 0 ) { - info = info - 1; - } } else if( matrix_layout == LAPACK_ROW_MAJOR ) { - lapack_int lda_t = MAX(1,m); - lapack_complex_double* a_t = NULL; + double* work_lapack = NULL; /* Check leading dimension(s) */ if( lda < n ) { info = -6; LAPACKE_xerbla( "LAPACKE_zlange_work", info ); return info; } - /* Allocate memory for temporary array(s) */ - a_t = (lapack_complex_double*) - LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) ); - if( a_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_0; + if( LAPACKE_lsame( norm, '1' ) || LAPACKE_lsame( norm, 'o' ) ) { + norm_lapack = 'i'; + } else if( LAPACKE_lsame( norm, 'i' ) ) { + norm_lapack = '1'; + } else { + norm_lapack = norm; + } + /* Allocate memory for work array(s) */ + if( LAPACKE_lsame( norm_lapack, 'i' ) ) { + work_lapack = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) ); + if( work_lapack == NULL ) { + info = LAPACK_WORK_MEMORY_ERROR; + goto exit_level_0; + } } - /* Transpose input matrices */ - LAPACKE_zge_trans( matrix_layout, m, n, a, lda, a_t, lda_t ); - /* Call LAPACK function and adjust info */ - res = LAPACK_zlange( &norm, &m, &n, a_t, &lda_t, work ); - info = 0; /* LAPACK call is ok! */ + /* Call LAPACK function */ + res = LAPACK_zlange( &norm_lapack, &n, &m, a, &lda, work_lapack ); /* Release memory and exit */ - LAPACKE_free( a_t ); + if( work_lapack ) { + LAPACKE_free( work_lapack ); + } exit_level_0: - if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) { + if( info == LAPACK_WORK_MEMORY_ERROR ) { LAPACKE_xerbla( "LAPACKE_zlange_work", info ); } } else { diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zlanhe.c lapack-3.7.1/LAPACKE/src/lapacke_zlanhe.c --- lapack-3.7.0/LAPACKE/src/lapacke_zlanhe.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zlanhe.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function zlanhe * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -37,7 +37,7 @@ const lapack_complex_double* a, lapack_int lda ) { lapack_int info = 0; - double res = 0.; + double res = 0.; double* work = NULL; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_zlanhe", -1 ); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zlanhe_work.c lapack-3.7.1/LAPACKE/src/lapacke_zlanhe_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_zlanhe_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zlanhe_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function zlanhe * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -38,7 +38,7 @@ lapack_int lda, double* work ) { lapack_int info = 0; - double res = 0.; + double res = 0.; if( matrix_layout == LAPACK_COL_MAJOR ) { /* Call LAPACK function and adjust info */ res = LAPACK_zlanhe( &norm, &uplo, &n, a, &lda, work ); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zlansy.c lapack-3.7.1/LAPACKE/src/lapacke_zlansy.c --- lapack-3.7.0/LAPACKE/src/lapacke_zlansy.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zlansy.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function zlansy * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -37,7 +37,7 @@ const lapack_complex_double* a, lapack_int lda ) { lapack_int info = 0; - double res = 0.; + double res = 0.; double* work = NULL; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_zlansy", -1 ); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zlansy_work.c lapack-3.7.1/LAPACKE/src/lapacke_zlansy_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_zlansy_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zlansy_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function zlansy * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -38,7 +38,7 @@ lapack_int lda, double* work ) { lapack_int info = 0; - double res = 0.; + double res = 0.; if( matrix_layout == LAPACK_COL_MAJOR ) { /* Call LAPACK function and adjust info */ res = LAPACK_zlansy( &norm, &uplo, &n, a, &lda, work ); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zlantr.c lapack-3.7.1/LAPACKE/src/lapacke_zlantr.c --- lapack-3.7.0/LAPACKE/src/lapacke_zlantr.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zlantr.c 2017-06-17 22:46:53.000000000 +0000 @@ -38,7 +38,7 @@ const lapack_complex_double* a, lapack_int lda ) { lapack_int info = 0; - double res = 0.; + double res = 0.; double* work = NULL; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_zlantr", -1 ); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zlarfb.c lapack-3.7.1/LAPACKE/src/lapacke_zlarfb.c --- lapack-3.7.0/LAPACKE/src/lapacke_zlarfb.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zlarfb.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function zlarfb * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -41,7 +41,7 @@ lapack_int ldc ) { lapack_int info = 0; - lapack_int ldwork = ( side=='l')?n:(( side=='r')?m:1); + lapack_int ldwork; lapack_complex_double* work = NULL; lapack_int ncols_v, nrows_v; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { @@ -100,6 +100,13 @@ return -9; } #endif + if( LAPACKE_lsame( side, 'l' ) ) { + ldwork = n; + } else if( LAPACKE_lsame( side, 'r' ) ) { + ldwork = m; + } else { + ldwork = 1; + } /* Allocate memory for working array(s) */ work = (lapack_complex_double*) LAPACKE_malloc( sizeof(lapack_complex_double) * ldwork * MAX(1,k) ); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zlassq.c lapack-3.7.1/LAPACKE/src/lapacke_zlassq.c --- lapack-3.7.0/LAPACKE/src/lapacke_zlassq.c 1970-01-01 00:00:00.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zlassq.c 2017-06-17 22:46:53.000000000 +0000 @@ -0,0 +1,52 @@ +/***************************************************************************** + Copyright (c) 2017, Intel Corp. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + THE POSSIBILITY OF SUCH DAMAGE. +***************************************************************************** +* Contents: Native high-level C interface to LAPACK function zlassq +* Author: Julien langou +* Generated February 2017 +*****************************************************************************/ + +#include "lapacke_utils.h" + +lapack_int LAPACKE_zlassq( lapack_int n, lapack_complex_double* x, + lapack_int incx, double* scale, double* sumsq ) +{ +#ifndef LAPACK_DISABLE_NAN_CHECK + /* Optionally check input vector `x` and in/out scalars `scale` and `sumsq` for NaNs */ + if( LAPACKE_z_nancheck( 1+(n-2)*ABS(incx), x, incx ) ) { + return -2; + } + if( LAPACKE_d_nancheck( 1, scale, 1 ) ) { + return -4; + } + if( LAPACKE_d_nancheck( 1, sumsq, 1 ) ) { + return -5; + } +#endif + return LAPACKE_zlassq_work( n, x, incx, scale, sumsq ); +} diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zlassq_work.c lapack-3.7.1/LAPACKE/src/lapacke_zlassq_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_zlassq_work.c 1970-01-01 00:00:00.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zlassq_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -0,0 +1,42 @@ +/***************************************************************************** + Copyright (c) 2017, Intel Corp. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + THE POSSIBILITY OF SUCH DAMAGE. +***************************************************************************** +* Contents: Native middle-level C interface to LAPACK function zlassq +* Author: Julien Langou +* Generated February, 2017 +*****************************************************************************/ + +#include "lapacke_utils.h" + +lapack_int LAPACKE_zlassq_work( lapack_int n, lapack_complex_double* x, + lapack_int incx, double* scale, double* sumsq ) +{ + lapack_int info = 0; + LAPACK_zlassq( &n, x, &incx, scale, sumsq ); + return info; +} diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zlaswp_work.c lapack-3.7.1/LAPACKE/src/lapacke_zlaswp_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_zlaswp_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zlaswp_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function zlaswp * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -46,7 +46,11 @@ info = info - 1; } } else if( matrix_layout == LAPACK_ROW_MAJOR ) { - lapack_int lda_t = MAX(1,lda); + lapack_int lda_t = MAX(1,k2); + lapack_int i; + for( i = k1; i <= k2; i++ ) { + lda_t = MAX( lda_t, ipiv[k1 + ( i - k1 ) * ABS( incx ) - 1] ); + } lapack_complex_double* a_t = NULL; /* Check leading dimension(s) */ if( lda < n ) { @@ -62,12 +66,12 @@ goto exit_level_0; } /* Transpose input matrices */ - LAPACKE_zge_trans( matrix_layout, lda, n, a, lda, a_t, lda_t ); + LAPACKE_zge_trans( matrix_layout, lda_t, n, a, lda, a_t, lda_t ); /* Call LAPACK function and adjust info */ LAPACK_zlaswp( &n, a_t, &lda_t, &k1, &k2, ipiv, &incx ); info = 0; /* LAPACK call is ok! */ /* Transpose output matrices */ - LAPACKE_zge_trans( LAPACK_COL_MAJOR, lda, n, a_t, lda_t, a, lda ); + LAPACKE_zge_trans( LAPACK_COL_MAJOR, lda_t, n, a_t, lda_t, a, lda ); /* Release memory and exit */ LAPACKE_free( a_t ); exit_level_0: diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zstegr.c lapack-3.7.1/LAPACKE/src/lapacke_zstegr.c --- lapack-3.7.0/LAPACKE/src/lapacke_zstegr.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zstegr.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function zstegr * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -59,7 +59,7 @@ if( LAPACKE_d_nancheck( n, d, 1 ) ) { return -5; } - if( LAPACKE_d_nancheck( n, e, 1 ) ) { + if( LAPACKE_d_nancheck( n-1, e, 1 ) ) { return -6; } if( LAPACKE_lsame( range, 'v' ) ) { diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zstein.c lapack-3.7.1/LAPACKE/src/lapacke_zstein.c --- lapack-3.7.0/LAPACKE/src/lapacke_zstein.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zstein.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function zstein * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -51,7 +51,7 @@ if( LAPACKE_d_nancheck( n, d, 1 ) ) { return -3; } - if( LAPACKE_d_nancheck( n, e, 1 ) ) { + if( LAPACKE_d_nancheck( n-1, e, 1 ) ) { return -4; } if( LAPACKE_d_nancheck( n, w, 1 ) ) { diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zstemr_work.c lapack-3.7.1/LAPACKE/src/lapacke_zstemr_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_zstemr_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zstemr_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function zstemr * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -56,7 +56,7 @@ lapack_int ldz_t = MAX(1,n); lapack_complex_double* z_t = NULL; /* Check leading dimension(s) */ - if( ldz < n ) { + if( ldz < 1 || ( LAPACKE_lsame( jobz, 'v' ) && ldz < n ) ) { info = -14; LAPACKE_xerbla( "LAPACKE_zstemr_work", info ); return info; diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zsycon_3.c lapack-3.7.1/LAPACKE/src/lapacke_zsycon_3.c --- lapack-3.7.0/LAPACKE/src/lapacke_zsycon_3.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zsycon_3.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function zsycon_3 * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -40,6 +40,7 @@ { lapack_int info = 0; lapack_complex_double* work = NULL; + lapack_int e_start = LAPACKE_lsame( uplo, 'U' ) ? 1 : 0; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_zsycon_3", -1 ); return -1; @@ -49,7 +50,7 @@ if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) { return -4; } - if( LAPACKE_z_nancheck( n, e, 1 ) ) { + if( LAPACKE_z_nancheck( n-1, e + e_start, 1 ) ) { return -6; } if( LAPACKE_d_nancheck( 1, &anorm, 1 ) ) { diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zsysv_rk.c lapack-3.7.1/LAPACKE/src/lapacke_zsysv_rk.c --- lapack-3.7.0/LAPACKE/src/lapacke_zsysv_rk.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zsysv_rk.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function zsysv_rk * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -51,9 +51,6 @@ if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) { return -5; } - if( LAPACKE_z_nancheck( n, e, 1) ) { - return -7; - } if( LAPACKE_zge_nancheck( matrix_layout, n, nrhs, b, ldb ) ) { return -9; } diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zsytrf_rk.c lapack-3.7.1/LAPACKE/src/lapacke_zsytrf_rk.c --- lapack-3.7.0/LAPACKE/src/lapacke_zsytrf_rk.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zsytrf_rk.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function zsytrf_rk * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -50,9 +50,6 @@ if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) { return -4; } - if( LAPACKE_z_nancheck( n, e, 1 ) ) { - return -6; - } #endif /* Query optimal working array(s) size */ info = LAPACKE_zsytrf_rk_work( matrix_layout, uplo, n, a, lda, e, ipiv, diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zsytri_3.c lapack-3.7.1/LAPACKE/src/lapacke_zsytri_3.c --- lapack-3.7.0/LAPACKE/src/lapacke_zsytri_3.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zsytri_3.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function zsytri_3 * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -41,6 +41,7 @@ lapack_int lwork = -1; lapack_complex_double* work = NULL; lapack_complex_double work_query; + lapack_int e_start = LAPACKE_lsame( uplo, 'U' ) ? 1 : 0; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_zsytri_3", -1 ); return -1; @@ -50,7 +51,7 @@ if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) { return -4; } - if( LAPACKE_z_nancheck( n, e, 1 ) ) { + if( LAPACKE_z_nancheck( n-1, e + e_start, 1 ) ) { return -6; } #endif @@ -60,7 +61,7 @@ if( info != 0 ) { goto exit_level_0; } - lwork = (lapack_int)work_query; + lwork = LAPACK_Z2INT( work_query ); /* Allocate memory for working array(s) */ work = (lapack_complex_double*) LAPACKE_malloc( sizeof(lapack_complex_double) * lwork ); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zsytrs_3.c lapack-3.7.1/LAPACKE/src/lapacke_zsytrs_3.c --- lapack-3.7.0/LAPACKE/src/lapacke_zsytrs_3.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zsytrs_3.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function zsytrs_3 * Author: Intel Corporation -* Generated December 2016 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -56,5 +56,5 @@ } #endif return LAPACKE_zsytrs_3_work( matrix_layout, uplo, n, nrhs, a, lda, - e, ipiv, b, ldb ); + e, ipiv, b, ldb ); } diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_ztpmqrt.c lapack-3.7.1/LAPACKE/src/lapacke_ztpmqrt.c --- lapack-3.7.0/LAPACKE/src/lapacke_ztpmqrt.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_ztpmqrt.c 2017-06-17 22:46:53.000000000 +0000 @@ -43,6 +43,7 @@ { lapack_int ncols_a, nrows_a; lapack_int nrows_v; + lapack_int lwork; lapack_int info = 0; lapack_complex_double* work = NULL; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { @@ -71,8 +72,10 @@ } #endif /* Allocate memory for working array(s) */ + lwork = LAPACKE_lsame( side, 'L' ) ? MAX(1,nb) * MAX(1,n) : + ( LAPACKE_lsame( side, 'R' ) ? MAX(1,m) * MAX(1,nb) : 0 ); work = (lapack_complex_double*) - LAPACKE_malloc( sizeof(lapack_complex_double) * MAX(1,m) * MAX(1,nb) ); + LAPACKE_malloc( sizeof(lapack_complex_double) * lwork ); if( work == NULL ) { info = LAPACK_WORK_MEMORY_ERROR; goto exit_level_0; diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zunbdb.c lapack-3.7.1/LAPACKE/src/lapacke_zunbdb.c --- lapack-3.7.0/LAPACKE/src/lapacke_zunbdb.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zunbdb.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function zunbdb * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -49,27 +49,28 @@ lapack_int lwork = -1; lapack_complex_double* work = NULL; lapack_complex_double work_query; - lapack_int nrows_x11, nrows_x12, nrows_x21, nrows_x22; + int lapack_layout; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_zunbdb", -1 ); return -1; } + if( LAPACKE_lsame( trans, 'n' ) && matrix_layout == LAPACK_COL_MAJOR ) { + lapack_layout = LAPACK_COL_MAJOR; + } else { + lapack_layout = LAPACK_ROW_MAJOR; + } #ifndef LAPACK_DISABLE_NAN_CHECK /* Optionally check input matrices for NaNs */ - nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q); - nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q); - nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q); - nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q); - if( LAPACKE_zge_nancheck( matrix_layout, nrows_x11, q, x11, ldx11 ) ) { + if( LAPACKE_zge_nancheck( lapack_layout, p, q, x11, ldx11 ) ) { return -7; } - if( LAPACKE_zge_nancheck( matrix_layout, nrows_x12, m-q, x12, ldx12 ) ) { + if( LAPACKE_zge_nancheck( lapack_layout, p, m-q, x12, ldx12 ) ) { return -9; } - if( LAPACKE_zge_nancheck( matrix_layout, nrows_x21, q, x21, ldx21 ) ) { + if( LAPACKE_zge_nancheck( lapack_layout, m-p, q, x21, ldx21 ) ) { return -11; } - if( LAPACKE_zge_nancheck( matrix_layout, nrows_x22, m-q, x22, ldx22 ) ) { + if( LAPACKE_zge_nancheck( lapack_layout, m-p, m-q, x22, ldx22 ) ) { return -13; } #endif diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zunbdb_work.c lapack-3.7.1/LAPACKE/src/lapacke_zunbdb_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_zunbdb_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zunbdb_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function zunbdb * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -47,121 +47,35 @@ lapack_complex_double* work, lapack_int lwork ) { lapack_int info = 0; - if( matrix_layout == LAPACK_COL_MAJOR ) { + /* LAPACK function works with matrices in both layouts. It is supported + * through TRANS parameter. So all conversion between layouts can be + * completed in LAPACK function. See the table below which describes how + * every LAPACKE call is forwarded to corresponding LAPACK call. + * + * matrix_layout | trans_LAPACKE | -> trans_LAPACK + * | (trans) | (ltrans) + * -----------------+---------------+---------------- + * LAPACK_COL_MAJOR | 'N' | -> 'N' + * LAPACK_COL_MAJOR | 'T' | -> 'T' + * LAPACK_ROW_MAJOR | 'N' | -> 'T' + * LAPACK_ROW_MAJOR | 'T' | -> 'T' + * (note that for row major layout trans parameter is ignored) + */ + if( matrix_layout == LAPACK_COL_MAJOR || + matrix_layout == LAPACK_ROW_MAJOR ) { + char ltrans; + if( !LAPACKE_lsame( trans, 't' ) && matrix_layout == LAPACK_COL_MAJOR ) { + ltrans = 'n'; + } else { + ltrans = 't'; + } /* Call LAPACK function and adjust info */ - LAPACK_zunbdb( &trans, &signs, &m, &p, &q, x11, &ldx11, x12, &ldx12, + LAPACK_zunbdb( <rans, &signs, &m, &p, &q, x11, &ldx11, x12, &ldx12, x21, &ldx21, x22, &ldx22, theta, phi, taup1, taup2, tauq1, tauq2, work, &lwork, &info ); if( info < 0 ) { info = info - 1; } - } else if( matrix_layout == LAPACK_ROW_MAJOR ) { - lapack_int nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q); - lapack_int nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q); - lapack_int nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q); - lapack_int nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q); - lapack_int ldx11_t = MAX(1,nrows_x11); - lapack_int ldx12_t = MAX(1,nrows_x12); - lapack_int ldx21_t = MAX(1,nrows_x21); - lapack_int ldx22_t = MAX(1,nrows_x22); - lapack_complex_double* x11_t = NULL; - lapack_complex_double* x12_t = NULL; - lapack_complex_double* x21_t = NULL; - lapack_complex_double* x22_t = NULL; - /* Check leading dimension(s) */ - if( ldx11 < q ) { - info = -8; - LAPACKE_xerbla( "LAPACKE_zunbdb_work", info ); - return info; - } - if( ldx12 < m-q ) { - info = -10; - LAPACKE_xerbla( "LAPACKE_zunbdb_work", info ); - return info; - } - if( ldx21 < q ) { - info = -12; - LAPACKE_xerbla( "LAPACKE_zunbdb_work", info ); - return info; - } - if( ldx22 < m-q ) { - info = -14; - LAPACKE_xerbla( "LAPACKE_zunbdb_work", info ); - return info; - } - /* Query optimal working array(s) size if requested */ - if( lwork == -1 ) { - LAPACK_zunbdb( &trans, &signs, &m, &p, &q, x11, &ldx11_t, x12, - &ldx12_t, x21, &ldx21_t, x22, &ldx22_t, theta, phi, - taup1, taup2, tauq1, tauq2, work, &lwork, &info ); - return (info < 0) ? (info - 1) : info; - } - /* Allocate memory for temporary array(s) */ - x11_t = (lapack_complex_double*) - LAPACKE_malloc( sizeof(lapack_complex_double) * - ldx11_t * MAX(1,q) ); - if( x11_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_0; - } - x12_t = (lapack_complex_double*) - LAPACKE_malloc( sizeof(lapack_complex_double) * - ldx12_t * MAX(1,m-q) ); - if( x12_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_1; - } - x21_t = (lapack_complex_double*) - LAPACKE_malloc( sizeof(lapack_complex_double) * - ldx21_t * MAX(1,q) ); - if( x21_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_2; - } - x22_t = (lapack_complex_double*) - LAPACKE_malloc( sizeof(lapack_complex_double) * - ldx22_t * MAX(1,m-q) ); - if( x22_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_3; - } - /* Transpose input matrices */ - LAPACKE_zge_trans( matrix_layout, nrows_x11, q, x11, ldx11, x11_t, - ldx11_t ); - LAPACKE_zge_trans( matrix_layout, nrows_x12, m-q, x12, ldx12, x12_t, - ldx12_t ); - LAPACKE_zge_trans( matrix_layout, nrows_x21, q, x21, ldx21, x21_t, - ldx21_t ); - LAPACKE_zge_trans( matrix_layout, nrows_x22, m-q, x22, ldx22, x22_t, - ldx22_t ); - /* Call LAPACK function and adjust info */ - LAPACK_zunbdb( &trans, &signs, &m, &p, &q, x11_t, &ldx11_t, x12_t, - &ldx12_t, x21_t, &ldx21_t, x22_t, &ldx22_t, theta, phi, - taup1, taup2, tauq1, tauq2, work, &lwork, &info ); - if( info < 0 ) { - info = info - 1; - } - /* Transpose output matrices */ - LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_x11, q, x11_t, ldx11_t, x11, - ldx11 ); - LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_x12, m-q, x12_t, ldx12_t, - x12, ldx12 ); - LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_x21, q, x21_t, ldx21_t, x21, - ldx21 ); - LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_x22, m-q, x22_t, ldx22_t, - x22, ldx22 ); - /* Release memory and exit */ - LAPACKE_free( x22_t ); -exit_level_3: - LAPACKE_free( x21_t ); -exit_level_2: - LAPACKE_free( x12_t ); -exit_level_1: - LAPACKE_free( x11_t ); -exit_level_0: - if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) { - LAPACKE_xerbla( "LAPACKE_zunbdb_work", info ); - } } else { info = -1; LAPACKE_xerbla( "LAPACKE_zunbdb_work", info ); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zuncsd.c lapack-3.7.1/LAPACKE/src/lapacke_zuncsd.c --- lapack-3.7.0/LAPACKE/src/lapacke_zuncsd.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zuncsd.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native high-level C interface to LAPACK function zuncsd * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -54,27 +54,28 @@ lapack_complex_double* work = NULL; double rwork_query; lapack_complex_double work_query; - lapack_int nrows_x11, nrows_x12, nrows_x21, nrows_x22; + int lapack_layout; if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { LAPACKE_xerbla( "LAPACKE_zuncsd", -1 ); return -1; } + if( LAPACKE_lsame( trans, 'n' ) && matrix_layout == LAPACK_COL_MAJOR ) { + lapack_layout = LAPACK_COL_MAJOR; + } else { + lapack_layout = LAPACK_ROW_MAJOR; + } #ifndef LAPACK_DISABLE_NAN_CHECK /* Optionally check input matrices for NaNs */ - nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q); - nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q); - nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q); - nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q); - if( LAPACKE_zge_nancheck( matrix_layout, nrows_x11, q, x11, ldx11 ) ) { + if( LAPACKE_zge_nancheck( lapack_layout, p, q, x11, ldx11 ) ) { return -11; } - if( LAPACKE_zge_nancheck( matrix_layout, nrows_x12, m-q, x12, ldx12 ) ) { + if( LAPACKE_zge_nancheck( lapack_layout, p, m-q, x12, ldx12 ) ) { return -13; } - if( LAPACKE_zge_nancheck( matrix_layout, nrows_x21, q, x21, ldx21 ) ) { + if( LAPACKE_zge_nancheck( lapack_layout, m-p, q, x21, ldx21 ) ) { return -15; } - if( LAPACKE_zge_nancheck( matrix_layout, nrows_x22, m-q, x22, ldx22 ) ) { + if( LAPACKE_zge_nancheck( lapack_layout, m-p, m-q, x22, ldx22 ) ) { return -17; } #endif diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zuncsd_work.c lapack-3.7.1/LAPACKE/src/lapacke_zuncsd_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_zuncsd_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zuncsd_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -28,7 +28,7 @@ ***************************************************************************** * Contents: Native middle-level C interface to LAPACK function zuncsd * Author: Intel Corporation -* Generated November 2015 +* Generated June 2017 *****************************************************************************/ #include "lapacke_utils.h" @@ -50,226 +50,36 @@ lapack_int* iwork ) { lapack_int info = 0; - if( matrix_layout == LAPACK_COL_MAJOR ) { - /* Call LAPACK function and adjust info */ - LAPACK_zuncsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &signs, &m, &p, - &q, x11, &ldx11, x12, &ldx12, x21, &ldx21, x22, &ldx22, - theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, v2t, &ldv2t, - work, &lwork, rwork, &lrwork, iwork, &info ); - if( info < 0 ) { - info = info - 1; - } - } else if( matrix_layout == LAPACK_ROW_MAJOR ) { - lapack_int nrows_x11 = ( LAPACKE_lsame( trans, 'n' ) ? p : q); - lapack_int nrows_x12 = ( LAPACKE_lsame( trans, 'n' ) ? p : m-q); - lapack_int nrows_x21 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : q); - lapack_int nrows_x22 = ( LAPACKE_lsame( trans, 'n' ) ? m-p : m-q); - lapack_int nrows_u1 = ( LAPACKE_lsame( jobu1, 'y' ) ? p : 1); - lapack_int nrows_u2 = ( LAPACKE_lsame( jobu2, 'y' ) ? m-p : 1); - lapack_int nrows_v1t = ( LAPACKE_lsame( jobv1t, 'y' ) ? q : 1); - lapack_int nrows_v2t = ( LAPACKE_lsame( jobv2t, 'y' ) ? m-q : 1); - lapack_int ldu1_t = MAX(1,nrows_u1); - lapack_int ldu2_t = MAX(1,nrows_u2); - lapack_int ldv1t_t = MAX(1,nrows_v1t); - lapack_int ldv2t_t = MAX(1,nrows_v2t); - lapack_int ldx11_t = MAX(1,nrows_x11); - lapack_int ldx12_t = MAX(1,nrows_x12); - lapack_int ldx21_t = MAX(1,nrows_x21); - lapack_int ldx22_t = MAX(1,nrows_x22); - lapack_complex_double* x11_t = NULL; - lapack_complex_double* x12_t = NULL; - lapack_complex_double* x21_t = NULL; - lapack_complex_double* x22_t = NULL; - lapack_complex_double* u1_t = NULL; - lapack_complex_double* u2_t = NULL; - lapack_complex_double* v1t_t = NULL; - lapack_complex_double* v2t_t = NULL; - /* Check leading dimension(s) */ - if( ldu1 < p ) { - info = -21; - LAPACKE_xerbla( "LAPACKE_zuncsd_work", info ); - return info; - } - if( ldu2 < m-p ) { - info = -23; - LAPACKE_xerbla( "LAPACKE_zuncsd_work", info ); - return info; - } - if( ldv1t < q ) { - info = -25; - LAPACKE_xerbla( "LAPACKE_zuncsd_work", info ); - return info; - } - if( ldv2t < m-q ) { - info = -27; - LAPACKE_xerbla( "LAPACKE_zuncsd_work", info ); - return info; - } - if( ldx11 < q ) { - info = -12; - LAPACKE_xerbla( "LAPACKE_zuncsd_work", info ); - return info; - } - if( ldx12 < m-q ) { - info = -14; - LAPACKE_xerbla( "LAPACKE_zuncsd_work", info ); - return info; - } - if( ldx21 < q ) { - info = -16; - LAPACKE_xerbla( "LAPACKE_zuncsd_work", info ); - return info; - } - if( ldx22 < m-q ) { - info = -18; - LAPACKE_xerbla( "LAPACKE_zuncsd_work", info ); - return info; - } - /* Query optimal working array(s) size if requested */ - if( lrwork == -1 || lwork == -1 ) { - LAPACK_zuncsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &signs, &m, - &p, &q, x11, &ldx11_t, x12, &ldx12_t, x21, &ldx21_t, - x22, &ldx22_t, theta, u1, &ldu1_t, u2, &ldu2_t, v1t, - &ldv1t_t, v2t, &ldv2t_t, work, &lwork, rwork, - &lrwork, iwork, &info ); - return (info < 0) ? (info - 1) : info; - } - /* Allocate memory for temporary array(s) */ - x11_t = (lapack_complex_double*) - LAPACKE_malloc( sizeof(lapack_complex_double) * - ldx11_t * MAX(1,q) ); - if( x11_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_0; - } - x12_t = (lapack_complex_double*) - LAPACKE_malloc( sizeof(lapack_complex_double) * - ldx12_t * MAX(1,m-q) ); - if( x12_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_1; - } - x21_t = (lapack_complex_double*) - LAPACKE_malloc( sizeof(lapack_complex_double) * - ldx21_t * MAX(1,q) ); - if( x21_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_2; + /* LAPACK function works with matrices in both layouts. It is supported + * through TRANS parameter. So all conversion between layouts can be + * completed in LAPACK function. See the table below which describes how + * every LAPACKE call is forwarded to corresponding LAPACK call. + * + * matrix_layout | trans_LAPACKE | -> trans_LAPACK + * | (trans) | (ltrans) + * -----------------+---------------+---------------- + * LAPACK_COL_MAJOR | 'N' | -> 'N' + * LAPACK_COL_MAJOR | 'T' | -> 'T' + * LAPACK_ROW_MAJOR | 'N' | -> 'T' + * LAPACK_ROW_MAJOR | 'T' | -> 'T' + * (note that for row major layout trans parameter is ignored) + */ + if( matrix_layout == LAPACK_COL_MAJOR || + matrix_layout == LAPACK_ROW_MAJOR ) { + char ltrans; + if( !LAPACKE_lsame( trans, 't' ) && matrix_layout == LAPACK_COL_MAJOR ) { + ltrans = 'n'; + } else { + ltrans = 't'; } - x22_t = (lapack_complex_double*) - LAPACKE_malloc( sizeof(lapack_complex_double) * - ldx22_t * MAX(1,m-q) ); - if( x22_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_3; - } - if( LAPACKE_lsame( jobu1, 'y' ) ) { - u1_t = (lapack_complex_double*) - LAPACKE_malloc( sizeof(lapack_complex_double) * - ldu1_t * MAX(1,p) ); - if( u1_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_4; - } - } - if( LAPACKE_lsame( jobu2, 'y' ) ) { - u2_t = (lapack_complex_double*) - LAPACKE_malloc( sizeof(lapack_complex_double) * - ldu2_t * MAX(1,m-p) ); - if( u2_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_5; - } - } - if( LAPACKE_lsame( jobv1t, 'y' ) ) { - v1t_t = (lapack_complex_double*) - LAPACKE_malloc( sizeof(lapack_complex_double) * - ldv1t_t * MAX(1,q) ); - if( v1t_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_6; - } - } - if( LAPACKE_lsame( jobv2t, 'y' ) ) { - v2t_t = (lapack_complex_double*) - LAPACKE_malloc( sizeof(lapack_complex_double) * - ldv2t_t * MAX(1,m-q) ); - if( v2t_t == NULL ) { - info = LAPACK_TRANSPOSE_MEMORY_ERROR; - goto exit_level_7; - } - } - /* Transpose input matrices */ - LAPACKE_zge_trans( matrix_layout, nrows_x11, q, x11, ldx11, x11_t, - ldx11_t ); - LAPACKE_zge_trans( matrix_layout, nrows_x12, m-q, x12, ldx12, x12_t, - ldx12_t ); - LAPACKE_zge_trans( matrix_layout, nrows_x21, q, x21, ldx21, x21_t, - ldx21_t ); - LAPACKE_zge_trans( matrix_layout, nrows_x22, m-q, x22, ldx22, x22_t, - ldx22_t ); /* Call LAPACK function and adjust info */ - LAPACK_zuncsd( &jobu1, &jobu2, &jobv1t, &jobv2t, &trans, &signs, &m, &p, - &q, x11_t, &ldx11_t, x12_t, &ldx12_t, x21_t, &ldx21_t, - x22_t, &ldx22_t, theta, u1_t, &ldu1_t, u2_t, &ldu2_t, - v1t_t, &ldv1t_t, v2t_t, &ldv2t_t, work, &lwork, rwork, - &lrwork, iwork, &info ); + LAPACK_zuncsd( &jobu1, &jobu2, &jobv1t, &jobv2t, <rans, &signs, &m, + &p, &q, x11, &ldx11, x12, &ldx12, x21, &ldx21, x22, + &ldx22, theta, u1, &ldu1, u2, &ldu2, v1t, &ldv1t, v2t, + &ldv2t, work, &lwork, rwork, &lrwork, iwork, &info ); if( info < 0 ) { info = info - 1; } - /* Transpose output matrices */ - LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_x11, q, x11_t, ldx11_t, x11, - ldx11 ); - LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_x12, m-q, x12_t, ldx12_t, - x12, ldx12 ); - LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_x21, q, x21_t, ldx21_t, x21, - ldx21 ); - LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_x22, m-q, x22_t, ldx22_t, - x22, ldx22 ); - if( LAPACKE_lsame( jobu1, 'y' ) ) { - LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_u1, p, u1_t, ldu1_t, u1, - ldu1 ); - } - if( LAPACKE_lsame( jobu2, 'y' ) ) { - LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_u2, m-p, u2_t, ldu2_t, - u2, ldu2 ); - } - if( LAPACKE_lsame( jobv1t, 'y' ) ) { - LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_v1t, q, v1t_t, ldv1t_t, - v1t, ldv1t ); - } - if( LAPACKE_lsame( jobv2t, 'y' ) ) { - LAPACKE_zge_trans( LAPACK_COL_MAJOR, nrows_v2t, m-q, v2t_t, ldv2t_t, - v2t, ldv2t ); - } - /* Release memory and exit */ - if( LAPACKE_lsame( jobv2t, 'y' ) ) { - LAPACKE_free( v2t_t ); - } -exit_level_7: - if( LAPACKE_lsame( jobv1t, 'y' ) ) { - LAPACKE_free( v1t_t ); - } -exit_level_6: - if( LAPACKE_lsame( jobu2, 'y' ) ) { - LAPACKE_free( u2_t ); - } -exit_level_5: - if( LAPACKE_lsame( jobu1, 'y' ) ) { - LAPACKE_free( u1_t ); - } -exit_level_4: - LAPACKE_free( x22_t ); -exit_level_3: - LAPACKE_free( x21_t ); -exit_level_2: - LAPACKE_free( x12_t ); -exit_level_1: - LAPACKE_free( x11_t ); -exit_level_0: - if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) { - LAPACKE_xerbla( "LAPACKE_zuncsd_work", info ); - } } else { info = -1; LAPACKE_xerbla( "LAPACKE_zuncsd_work", info ); diff -Nru lapack-3.7.0/LAPACKE/src/lapacke_zunmlq_work.c lapack-3.7.1/LAPACKE/src/lapacke_zunmlq_work.c --- lapack-3.7.0/LAPACKE/src/lapacke_zunmlq_work.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/lapacke_zunmlq_work.c 2017-06-17 22:46:53.000000000 +0000 @@ -42,9 +42,6 @@ { lapack_int info = 0; lapack_int r; - lapack_int lda_t, ldc_t; - lapack_complex_double* a_t = NULL; - lapack_complex_double* c_t = NULL; if( matrix_layout == LAPACK_COL_MAJOR ) { /* Call LAPACK function and adjust info */ LAPACK_zunmlq( &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, work, @@ -54,8 +51,10 @@ } } else if( matrix_layout == LAPACK_ROW_MAJOR ) { r = LAPACKE_lsame( side, 'l' ) ? m : n; - lda_t = MAX(1,k); - ldc_t = MAX(1,m); + lapack_int lda_t = MAX(1,k); + lapack_int ldc_t = MAX(1,m); + lapack_complex_double* a_t = NULL; + lapack_complex_double* c_t = NULL; /* Check leading dimension(s) */ if( lda < r ) { info = -8; diff -Nru lapack-3.7.0/LAPACKE/src/Makefile lapack-3.7.1/LAPACKE/src/Makefile --- lapack-3.7.0/LAPACKE/src/Makefile 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/src/Makefile 2017-06-17 22:46:53.000000000 +0000 @@ -32,9 +32,12 @@ ############################################################################## # makefile for LAPACKE, used to build lapacke binary. # +# Note: we use multiple OBJ_A, OBJ_B, etc, instead of a single OBJ +# to allow build with mingw (argument list too long for the msys ar) +# include ../../make.inc -SRC_OBJ = \ +OBJ_A = \ lapacke_cbbcsd.o \ lapacke_cbbcsd_work.o \ lapacke_cbdsqr.o \ @@ -79,6 +82,8 @@ lapacke_cgeevx_work.o \ lapacke_cgehrd.o \ lapacke_cgehrd_work.o \ +lapacke_cgelq.o \ +lapacke_cgelq_work.o \ lapacke_cgelq2.o \ lapacke_cgelq2_work.o \ lapacke_cgejsv.o \ @@ -93,6 +98,8 @@ lapacke_cgelss_work.o \ lapacke_cgelsy.o \ lapacke_cgelsy_work.o \ +lapacke_cgemlq.o \ +lapacke_cgemlq_work.o \ lapacke_cgemqr.o \ lapacke_cgemqr_work.o \ lapacke_cgemqrt.o \ @@ -101,6 +108,8 @@ lapacke_cgeqlf_work.o \ lapacke_cgeqp3.o \ lapacke_cgeqp3_work.o \ +lapacke_cgeqr.o \ +lapacke_cgeqr_work.o \ lapacke_cgeqr2.o \ lapacke_cgeqr2_work.o \ lapacke_cgeqrf.o \ @@ -353,6 +362,8 @@ lapacke_clascl_work.o \ lapacke_claset.o \ lapacke_claset_work.o \ +lapacke_classq.o \ +lapacke_classq_work.o \ lapacke_claswp.o \ lapacke_claswp_work.o \ lapacke_clauum.o \ @@ -665,6 +676,8 @@ lapacke_dgehrd_work.o \ lapacke_dgejsv.o \ lapacke_dgejsv_work.o \ +lapacke_dgelq.o \ +lapacke_dgelq_work.o \ lapacke_dgelq2.o \ lapacke_dgelq2_work.o \ lapacke_dgelqf.o \ @@ -677,6 +690,8 @@ lapacke_dgelss_work.o \ lapacke_dgelsy.o \ lapacke_dgelsy_work.o \ +lapacke_dgemlq.o \ +lapacke_dgemlq_work.o \ lapacke_dgemqr.o \ lapacke_dgemqr_work.o \ lapacke_dgemqrt.o \ @@ -685,6 +700,8 @@ lapacke_dgeqlf_work.o \ lapacke_dgeqp3.o \ lapacke_dgeqp3_work.o \ +lapacke_dgeqr.o \ +lapacke_dgeqr_work.o \ lapacke_dgeqr2.o \ lapacke_dgeqr2_work.o \ lapacke_dgeqrf.o \ @@ -817,6 +834,8 @@ lapacke_dlaset_work.o \ lapacke_dlasrt.o \ lapacke_dlasrt_work.o \ +lapacke_dlassq.o \ +lapacke_dlassq_work.o \ lapacke_dlaswp.o \ lapacke_dlaswp_work.o \ lapacke_dlauum.o \ @@ -1080,7 +1099,9 @@ lapacke_dsytri_3_work.o \ lapacke_dsytri2x.o \ lapacke_dsytri2x_work.o \ -lapacke_dsytri_work.o \ +lapacke_dsytri_work.o + +OBJ_B = \ lapacke_dsytrs.o \ lapacke_dsytrs_rook.o \ lapacke_dsytrs2.o \ @@ -1213,6 +1234,8 @@ lapacke_sgehrd_work.o \ lapacke_sgejsv.o \ lapacke_sgejsv_work.o \ +lapacke_sgelq.o \ +lapacke_sgelq_work.o \ lapacke_sgelq2.o \ lapacke_sgelq2_work.o \ lapacke_sgelqf.o \ @@ -1225,6 +1248,8 @@ lapacke_sgelss_work.o \ lapacke_sgelsy.o \ lapacke_sgelsy_work.o \ +lapacke_sgemlq.o \ +lapacke_sgemlq_work.o \ lapacke_sgemqr.o \ lapacke_sgemqr_work.o \ lapacke_sgemqrt.o \ @@ -1233,6 +1258,8 @@ lapacke_sgeqlf_work.o \ lapacke_sgeqp3.o \ lapacke_sgeqp3_work.o \ +lapacke_sgeqr.o \ +lapacke_sgeqr_work.o \ lapacke_sgeqr2.o \ lapacke_sgeqr2_work.o \ lapacke_sgeqrf.o \ @@ -1365,6 +1392,8 @@ lapacke_slaset_work.o \ lapacke_slasrt.o \ lapacke_slasrt_work.o \ +lapacke_slassq.o \ +lapacke_slassq_work.o \ lapacke_slaswp.o \ lapacke_slaswp_work.o \ lapacke_slauum.o \ @@ -1755,6 +1784,8 @@ lapacke_zgehrd_work.o \ lapacke_zgejsv.o \ lapacke_zgejsv_work.o \ +lapacke_zgelq.o \ +lapacke_zgelq_work.o \ lapacke_zgelq2.o \ lapacke_zgelq2_work.o \ lapacke_zgelqf.o \ @@ -1767,6 +1798,8 @@ lapacke_zgelss_work.o \ lapacke_zgelsy.o \ lapacke_zgelsy_work.o \ +lapacke_zgemlq.o \ +lapacke_zgemlq_work.o \ lapacke_zgemqr.o \ lapacke_zgemqr_work.o \ lapacke_zgemqrt.o \ @@ -1775,6 +1808,8 @@ lapacke_zgeqlf_work.o \ lapacke_zgeqp3.o \ lapacke_zgeqp3_work.o \ +lapacke_zgeqr.o \ +lapacke_zgeqr_work.o \ lapacke_zgeqr2.o \ lapacke_zgeqr2_work.o \ lapacke_zgeqrf.o \ @@ -2027,6 +2062,8 @@ lapacke_zlascl_work.o \ lapacke_zlaset.o \ lapacke_zlaset_work.o \ +lapacke_zlassq.o \ +lapacke_zlassq_work.o \ lapacke_zlaswp.o \ lapacke_zlaswp_work.o \ lapacke_zlauum.o \ @@ -2293,7 +2330,8 @@ lapacke_csyr_work.o \ lapacke_ilaver.o -DEPRECSRC = \ +ifdef BUILD_DEPRECATED +DEPRECATED = \ lapacke_cggsvp.o \ lapacke_cggsvp_work.o \ lapacke_dggsvp.o \ @@ -2318,8 +2356,10 @@ lapacke_sgeqpf_work.o \ lapacke_zgeqpf.o \ lapacke_zgeqpf_work.o +endif -SRCX_OBJ = \ +ifdef USEXBLAS +EXTENDED = \ lapacke_cgbrfsx.o lapacke_cporfsx.o lapacke_dgerfsx.o lapacke_sgbrfsx.o lapacke_ssyrfsx.o lapacke_zherfsx.o \ lapacke_cgbrfsx_work.o lapacke_cporfsx_work.o lapacke_dgerfsx_work.o lapacke_sgbrfsx_work.o lapacke_ssyrfsx_work.o lapacke_zherfsx_work.o \ lapacke_cgerfsx.o lapacke_csyrfsx.o lapacke_dporfsx.o lapacke_sgerfsx.o lapacke_zgbrfsx.o lapacke_zporfsx.o \ @@ -2332,10 +2372,11 @@ lapacke_cgesvxx_work.o lapacke_csysvxx_work.o lapacke_dposvxx_work.o lapacke_sgesvxx_work.o lapacke_zgbsvxx_work.o lapacke_zposvxx_work.o \ lapacke_chesvxx.o lapacke_dgbsvxx.o lapacke_dsysvxx.o lapacke_sposvxx.o lapacke_zgesvxx.o lapacke_zsysvxx.o \ lapacke_chesvxx_work.o lapacke_dgbsvxx_work.o lapacke_dsysvxx_work.o lapacke_sposvxx_work.o lapacke_zgesvxx_work.o lapacke_zsysvxx_work.o +endif - +ifdef LAPACKE_WITH_TMG # FILE PARTS OF TMGLIB -MATGEN_OBJ = \ +MATGEN = \ lapacke_clatms.o \ lapacke_clatms_work.o \ lapacke_dlatms.o \ @@ -2364,25 +2405,21 @@ lapacke_slagsy_work.o \ lapacke_zlagsy.o \ lapacke_zlagsy_work.o - -ALLOBJ = $(SRC_OBJ) $(MATGEN_OBJ) - -ifdef USEXBLAS -ALLXOBJ = $(SXLASRC) $(DXLASRC) $(CXLASRC) $(ZXLASRC) -endif - -ifdef BUILD_DEPRECATED -DEPRECATED = $(DEPRECSRC) endif all: ../../$(LAPACKELIB) -../../$(LAPACKELIB): $(ALLOBJ) $(ALLXOBJ) $(DEPRECATED) - $(ARCH) $(ARCHFLAGS) $@ $(ALLOBJ) $(ALLXOBJ) $(DEPRECATED) +../../$(LAPACKELIB): $(OBJ_A) $(OBJ_B) $(DEPRECATED) $(EXTENDED) $(MATGEN) + $(ARCH) $(ARCHFLAGS) $@ $(OBJ_A) + $(ARCH) $(ARCHFLAGS) $@ $(OBJ_B) + $(ARCH) $(ARCHFLAGS) $@ $(DEPRECATED) + $(ARCH) $(ARCHFLAGS) $@ $(EXTENDED) + $(ARCH) $(ARCHFLAGS) $@ $(MATGEN) $(RANLIB) $@ +clean: cleanobj +cleanobj: + rm -f *.o + .c.o: $(CC) $(CFLAGS) -I../include -c -o $@ $< - -clean: - rm -f *.o diff -Nru lapack-3.7.0/LAPACKE/utils/CMakeLists.txt lapack-3.7.1/LAPACKE/utils/CMakeLists.txt --- lapack-3.7.0/LAPACKE/utils/CMakeLists.txt 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/utils/CMakeLists.txt 2017-06-17 22:46:53.000000000 +0000 @@ -1,4 +1,4 @@ -set(UTILS_OBJ +set(UTILS lapacke_c_nancheck.c lapacke_ctr_trans.c lapacke_make_complex_float.c lapacke_zgb_nancheck.c lapacke_cgb_nancheck.c lapacke_d_nancheck.c lapacke_s_nancheck.c lapacke_zgb_trans.c lapacke_cgb_trans.c lapacke_dgb_nancheck.c lapacke_sgb_nancheck.c lapacke_zge_nancheck.c diff -Nru lapack-3.7.0/LAPACKE/utils/lapacke_ctp_trans.c lapack-3.7.1/LAPACKE/utils/lapacke_ctp_trans.c --- lapack-3.7.0/LAPACKE/utils/lapacke_ctp_trans.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/utils/lapacke_ctp_trans.c 2017-06-17 22:46:53.000000000 +0000 @@ -69,7 +69,7 @@ * and col_major lower and row_major upper are equals too - * using one code for equal cases. XOR( colmaj, upper ) */ - if( ( colmaj || upper ) && !( colmaj && upper ) ) { + if( !( colmaj || upper ) || ( colmaj && upper ) ) { for( j = st; j < n; j++ ) { for( i = 0; i < j+1-st; i++ ) { out[ j-i + (i*(2*n-i+1))/2 ] = in[ ((j+1)*j)/2 + i ]; diff -Nru lapack-3.7.0/LAPACKE/utils/lapacke_dtp_trans.c lapack-3.7.1/LAPACKE/utils/lapacke_dtp_trans.c --- lapack-3.7.0/LAPACKE/utils/lapacke_dtp_trans.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/utils/lapacke_dtp_trans.c 2017-06-17 22:46:53.000000000 +0000 @@ -69,7 +69,7 @@ * and col_major lower and row_major upper are equals too - * using one code for equal cases. XOR( colmaj, upper ) */ - if( ( colmaj || upper ) && !( colmaj && upper ) ) { + if( !( colmaj || upper ) || ( colmaj && upper ) ) { for( j = st; j < n; j++ ) { for( i = 0; i < j+1-st; i++ ) { out[ j-i + (i*(2*n-i+1))/2 ] = in[ ((j+1)*j)/2 + i ]; diff -Nru lapack-3.7.0/LAPACKE/utils/lapacke_stp_trans.c lapack-3.7.1/LAPACKE/utils/lapacke_stp_trans.c --- lapack-3.7.0/LAPACKE/utils/lapacke_stp_trans.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/utils/lapacke_stp_trans.c 2017-06-17 22:46:53.000000000 +0000 @@ -69,7 +69,7 @@ * and col_major lower and row_major upper are equals too - * using one code for equal cases. XOR( colmaj, upper ) */ - if( ( colmaj || upper ) && !( colmaj && upper ) ) { + if( !( colmaj || upper ) || ( colmaj && upper ) ) { for( j = st; j < n; j++ ) { for( i = 0; i < j+1-st; i++ ) { out[ j-i + (i*(2*n-i+1))/2 ] = in[ ((j+1)*j)/2 + i ]; diff -Nru lapack-3.7.0/LAPACKE/utils/lapacke_ztp_trans.c lapack-3.7.1/LAPACKE/utils/lapacke_ztp_trans.c --- lapack-3.7.0/LAPACKE/utils/lapacke_ztp_trans.c 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/utils/lapacke_ztp_trans.c 2017-06-17 22:46:53.000000000 +0000 @@ -69,7 +69,7 @@ * and col_major lower and row_major upper are equals too - * using one code for equal cases. XOR( colmaj, upper ) */ - if( ( colmaj || upper ) && !( colmaj && upper ) ) { + if( !( colmaj || upper ) || ( colmaj && upper ) ) { for( j = st; j < n; j++ ) { for( i = 0; i < j+1-st; i++ ) { out[ j-i + (i*(2*n-i+1))/2 ] = in[ ((j+1)*j)/2 + i ]; diff -Nru lapack-3.7.0/LAPACKE/utils/Makefile lapack-3.7.1/LAPACKE/utils/Makefile --- lapack-3.7.0/LAPACKE/utils/Makefile 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LAPACKE/utils/Makefile 2017-06-17 22:46:53.000000000 +0000 @@ -186,11 +186,12 @@ all: lib lib: $(OBJ) - $(ARCH) $(ARCHFLAGS) ../../$(LAPACKELIB) $(OBJ) + $(ARCH) $(ARCHFLAGS) ../../$(LAPACKELIB) $^ $(RANLIB) ../../$(LAPACKELIB) +clean: cleanobj +cleanobj: + rm -f *.o + .c.o: $(CC) $(CFLAGS) -I../include -c -o $@ $< - -clean: - rm -f *.o diff -Nru lapack-3.7.0/lapack.pc.in lapack-3.7.1/lapack.pc.in --- lapack-3.7.0/lapack.pc.in 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/lapack.pc.in 2017-06-17 22:46:53.000000000 +0000 @@ -1,9 +1,9 @@ -prefix=@prefix@ -libdir=@libdir@ +libdir=@CMAKE_INSTALL_FULL_LIBDIR@ +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ Name: LAPACK Description: FORTRAN reference implementation of LAPACK Linear Algebra PACKage Version: @LAPACK_VERSION@ URL: http://www.netlib.org/lapack/ Libs: -L${libdir} -llapack -Requires: blas +Requires.private: blas diff -Nru lapack-3.7.0/lapack_testing.py lapack-3.7.1/lapack_testing.py --- lapack-3.7.0/lapack_testing.py 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/lapack_testing.py 2017-06-17 22:46:53.000000000 +0000 @@ -197,16 +197,16 @@ range_prec=list(range(4)) if test=='lin': - range_test=[15] -elif test=='mixed': range_test=[16] +elif test=='mixed': + range_test=[17] range_prec=[1,3] elif test=='rfp': - range_test=[17] + range_test=[18] elif test=='eig': - range_test=list(range(15)) + range_test=list(range(16)) else: - range_test=list(range(18)) + range_test=list(range(19)) list_results = [ [0, 0, 0, 0, 0], @@ -232,12 +232,12 @@ letter+"bb","glm","gqr", "gsv","csd","lse", letter+"test", letter+dtypes[0][dtype-1]+"test",letter+"test_rfp"), - ("Nonsymmetric Eigenvalue Problem", "Symmetric Eigenvalue Problem", "Symmetric Eigenvalue Problem 2 stage", "Singular Value Decomposition", - "Eigen Condition","Nonsymmetric Eigenvalue","Nonsymmetric Generalized Eigenvalue 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", - "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"), + ("Nonsymmetric-Eigenvalue-Problem", "Symmetric-Eigenvalue-Problem", "Symmetric-Eigenvalue-Problem-2-stage", "Singular-Value-Decomposition", + "Eigen-Condition","Nonsymmetric-Eigenvalue","Nonsymmetric-Generalized-Eigenvalue-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", + "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"), (letter+"nep", letter+"sep", letter+"se2", letter+"svd", letter+"ec",letter+"ed",letter+"gg", letter+"gd",letter+"sb",letter+"sg", @@ -250,25 +250,25 @@ for dtest in range_test: nb_of_test=0 # 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==17 and (letter=="s" or letter=="c"): continue if (with_file==1): cmdbase=dtests[2][dtest]+".out" else: - if dtest==15: + if dtest==16: # LIN TESTS cmdbase="xlintst"+letter+" < "+dtests[0][dtest]+".in > "+dtests[2][dtest]+".out" - elif dtest==16: + elif dtest==17: # PROTO LIN TESTS cmdbase="xlintst"+letter+dtypes[0][dtype-1]+" < "+dtests[0][dtest]+".in > "+dtests[2][dtest]+".out" - elif dtest==17: + elif dtest==18: # PROTO LIN TESTS cmdbase="xlintstrf"+letter+" < "+dtests[0][dtest]+".in > "+dtests[2][dtest]+".out" else: # EIG TESTS cmdbase="xeigtst"+letter+" < "+dtests[0][dtest]+".in > "+dtests[2][dtest]+".out" if (not just_errors and not short_summary): - print("--> Testing "+name+" "+dtests[1][dtest]+" [ "+cmdbase+" ]") + print("Testing "+name+" "+dtests[1][dtest]+"-"+cmdbase, end=' ') # Run the process: either to read the file or run the LAPACK testing nb_test = run_summary_test(f, cmdbase, short_summary) list_results[0][dtype]+=nb_test[0] @@ -279,13 +279,13 @@ if (not short_summary): if (nb_test[0]>0 and just_errors==0): - print("--> Tests passed: "+str(nb_test[0])) + print("passed: "+str(nb_test[0])) if (nb_test[1]>0): - print("--> Tests failing to pass the threshold: "+str(nb_test[1])) + print("failing to pass the threshold: "+str(nb_test[1])) if (nb_test[2]>0): - print("--> Illegal Error: "+str(nb_test[2])) + print("Illegal Error: "+str(nb_test[2])) if (nb_test[3]>0): - print("--> Info Error: "+str(nb_test[3])) + 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("") diff -Nru lapack-3.7.0/LICENSE lapack-3.7.1/LICENSE --- lapack-3.7.0/LICENSE 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/LICENSE 2017-06-17 22:46:53.000000000 +0000 @@ -1,9 +1,9 @@ -Copyright (c) 1992-2016 The University of Tennessee and The University +Copyright (c) 1992-2017 The University of Tennessee and The University of Tennessee Research Foundation. All rights reserved. -Copyright (c) 2000-2016 The University of California Berkeley. All +Copyright (c) 2000-2017 The University of California Berkeley. All rights reserved. -Copyright (c) 2006-2016 The University of Colorado Denver. All rights +Copyright (c) 2006-2017 The University of Colorado Denver. All rights reserved. $COPYRIGHT$ diff -Nru lapack-3.7.0/Makefile lapack-3.7.1/Makefile --- lapack-3.7.0/Makefile 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/Makefile 2017-06-17 22:46:53.000000000 +0000 @@ -11,118 +11,139 @@ lib: lapacklib tmglib #lib: blaslib variants lapacklib tmglib -clean: cleanlib cleantesting cleanblas_testing cleancblas_testing - -lapack_install: - ( cd INSTALL; $(MAKE); ./testlsame; ./testslamch; ./testdlamch; \ - ./testsecond; ./testdsecnd; ./testieee; ./testversion ) - blaslib: - ( cd BLAS/SRC; $(MAKE) ) + $(MAKE) -C BLAS cblaslib: - ( cd CBLAS; $(MAKE) ) + $(MAKE) -C CBLAS -lapacklib: lapack_install - ( cd SRC; $(MAKE) ) +lapacklib: + $(MAKE) -C SRC -lapackelib: lapacklib - ( cd LAPACKE; $(MAKE) ) +lapackelib: + $(MAKE) -C LAPACKE -cblas_example: cblaslib blaslib - ( cd CBLAS/examples; $(MAKE) ) - -lapacke_example: lapackelib - ( cd LAPACKE/example; $(MAKE) ) +tmglib: + $(MAKE) -C TESTING/MATGEN variants: - ( cd SRC/VARIANTS; $(MAKE) ) + $(MAKE) -C SRC/VARIANTS -tmglib: - ( cd TESTING/MATGEN; $(MAKE) ) +lapack_install: + $(MAKE) -C INSTALL run + +blas_testing: blaslib + $(MAKE) -C BLAS blas_testing -lapack_testing: lib - ( cd TESTING; $(MAKE) ) +cblas_testing: cblaslib blaslib + $(MAKE) -C CBLAS cblas_testing + +lapack_testing: tmglib lapacklib blaslib + $(MAKE) -C TESTING/LIN cleanexe + $(MAKE) -C TESTING ./lapack_testing.py -variants_testing: lib variants - ( cd TESTING; rm -f xlintst*; $(MAKE) VARLIB='SRC/VARIANTS/LIB/cholrl.a'; \ - mv stest.out stest_cholrl.out; mv dtest.out dtest_cholrl.out; mv ctest.out ctest_cholrl.out; mv ztest.out ztest_cholrl.out ) - ( cd TESTING; rm -f xlintst*; $(MAKE) VARLIB='SRC/VARIANTS/LIB/choltop.a'; \ - mv stest.out stest_choltop.out; mv dtest.out dtest_choltop.out; mv ctest.out ctest_choltop.out; mv ztest.out ztest_choltop.out ) - ( cd TESTING; rm -f xlintst*; $(MAKE) VARLIB='SRC/VARIANTS/LIB/lucr.a'; \ - mv stest.out stest_lucr.out; mv dtest.out dtest_lucr.out; mv ctest.out ctest_lucr.out; mv ztest.out ztest_lucr.out ) - ( cd TESTING; rm -f xlintst*; $(MAKE) VARLIB='SRC/VARIANTS/LIB/lull.a'; \ - mv stest.out stest_lull.out; mv dtest.out dtest_lull.out; mv ctest.out ctest_lull.out; mv ztest.out ztest_lull.out ) - ( cd TESTING; rm -f xlintst*; $(MAKE) VARLIB='SRC/VARIANTS/LIB/lurec.a'; \ - mv stest.out stest_lurec.out; mv dtest.out dtest_lurec.out; mv ctest.out ctest_lurec.out; mv ztest.out ztest_lurec.out ) - ( cd TESTING; rm -f xlintst*; $(MAKE) VARLIB='SRC/VARIANTS/LIB/qrll.a'; \ - mv stest.out stest_qrll.out; mv dtest.out dtest_qrll.out; mv ctest.out ctest_qrll.out; mv ztest.out ztest_qrll.out ) - -blas_testing: - ( cd BLAS/TESTING; $(MAKE) -f Makeblat1 ) - ( cd BLAS; ./xblat1s > sblat1.out ; \ - ./xblat1d > dblat1.out ; \ - ./xblat1c > cblat1.out ; \ - ./xblat1z > zblat1.out ) - ( cd BLAS/TESTING; $(MAKE) -f Makeblat2 ) - ( cd BLAS; ./xblat2s < sblat2.in ; \ - ./xblat2d < dblat2.in ; \ - ./xblat2c < cblat2.in ; \ - ./xblat2z < zblat2.in ) - ( cd BLAS/TESTING; $(MAKE) -f Makeblat3 ) - ( cd BLAS; ./xblat3s < sblat3.in ; \ - ./xblat3d < dblat3.in ; \ - ./xblat3c < cblat3.in ; \ - ./xblat3z < zblat3.in ) - -cblas_testing: blaslib - ( cd CBLAS; $(MAKE) cblas_testing ) - ( cd CBLAS; $(MAKE) runtst ) +variants_testing: tmglib variants lapacklib blaslib + $(MAKE) -C TESTING/LIN cleanexe + $(MAKE) -C TESTING/LIN VARLIB='SRC/VARIANTS/cholrl.a' + $(MAKE) -C TESTING stest.out && mv TESTING/stest.out TESTING/stest_cholrl.out + $(MAKE) -C TESTING dtest.out && mv TESTING/dtest.out TESTING/dtest_cholrl.out + $(MAKE) -C TESTING ctest.out && mv TESTING/ctest.out TESTING/ctest_cholrl.out + $(MAKE) -C TESTING ztest.out && mv TESTING/ztest.out TESTING/ztest_cholrl.out + $(MAKE) -C TESTING/LIN cleanexe + $(MAKE) -C TESTING/LIN VARLIB='SRC/VARIANTS/choltop.a' + $(MAKE) -C TESTING stest.out && mv TESTING/stest.out TESTING/stest_choltop.out + $(MAKE) -C TESTING dtest.out && mv TESTING/dtest.out TESTING/dtest_choltop.out + $(MAKE) -C TESTING ctest.out && mv TESTING/ctest.out TESTING/ctest_choltop.out + $(MAKE) -C TESTING ztest.out && mv TESTING/ztest.out TESTING/ztest_choltop.out + $(MAKE) -C TESTING/LIN cleanexe + $(MAKE) -C TESTING/LIN VARLIB='SRC/VARIANTS/lucr.a' + $(MAKE) -C TESTING stest.out && mv TESTING/stest.out TESTING/stest_lucr.out + $(MAKE) -C TESTING dtest.out && mv TESTING/dtest.out TESTING/dtest_lucr.out + $(MAKE) -C TESTING ctest.out && mv TESTING/ctest.out TESTING/ctest_lucr.out + $(MAKE) -C TESTING ztest.out && mv TESTING/ztest.out TESTING/ztest_lucr.out + $(MAKE) -C TESTING/LIN cleanexe + $(MAKE) -C TESTING/LIN VARLIB='SRC/VARIANTS/lull.a' + $(MAKE) -C TESTING stest.out && mv TESTING/stest.out TESTING/stest_lull.out + $(MAKE) -C TESTING dtest.out && mv TESTING/dtest.out TESTING/dtest_lull.out + $(MAKE) -C TESTING ctest.out && mv TESTING/ctest.out TESTING/ctest_lull.out + $(MAKE) -C TESTING ztest.out && mv TESTING/ztest.out TESTING/ztest_lull.out + $(MAKE) -C TESTING/LIN cleanexe + $(MAKE) -C TESTING/LIN VARLIB='SRC/VARIANTS/lurec.a' + $(MAKE) -C TESTING stest.out && mv TESTING/stest.out TESTING/stest_lurec.out + $(MAKE) -C TESTING dtest.out && mv TESTING/dtest.out TESTING/dtest_lurec.out + $(MAKE) -C TESTING ctest.out && mv TESTING/ctest.out TESTING/ctest_lurec.out + $(MAKE) -C TESTING ztest.out && mv TESTING/ztest.out TESTING/ztest_lurec.out + $(MAKE) -C TESTING/LIN cleanexe + $(MAKE) -C TESTING/LIN VARLIB='SRC/VARIANTS/qrll.a' + $(MAKE) -C TESTING stest.out && mv TESTING/stest.out TESTING/stest_qrll.out + $(MAKE) -C TESTING dtest.out && mv TESTING/dtest.out TESTING/dtest_qrll.out + $(MAKE) -C TESTING ctest.out && mv TESTING/ctest.out TESTING/ctest_qrll.out + $(MAKE) -C TESTING ztest.out && mv TESTING/ztest.out TESTING/ztest_qrll.out +cblas_example: cblaslib blaslib + $(MAKE) -C CBLAS cblas_example +lapacke_example: lapackelib lapacklib blaslib + $(MAKE) -C LAPACKE lapacke_example html: - @echo "LAPACK HTML PAGES GENRATION with Doxygen" + @echo "LAPACK HTML PAGES GENERATION with Doxygen" doxygen DOCS/Doxyfile @echo "==================" - @echo "LAPACK HTML PAGES GENRATED in DOCS/explore-html" + @echo "LAPACK HTML PAGES GENERATED in DOCS/explore-html" @echo "Usage: open DOCS/explore-html/index.html" @echo "Online version available at http://www.netlib.org/lapack/explore-html/" @echo "==================" man: - @echo "LAPACK MAN PAGES GENRATION with Doxygen" + @echo "LAPACK MAN PAGES GENERATION with Doxygen" doxygen DOCS/Doxyfile_man @echo "==================" - @echo "LAPACK MAN PAGES GENRATED in DOCS/MAN" + @echo "LAPACK MAN PAGES GENERATED in DOCS/MAN" @echo "Set your MANPATH env variable accordingly" @echo "Usage: man dgetrf.f" @echo "==================" +clean: + $(MAKE) -C INSTALL clean + $(MAKE) -C BLAS clean + $(MAKE) -C CBLAS clean + $(MAKE) -C SRC clean + $(MAKE) -C SRC/VARIANTS clean + $(MAKE) -C TESTING clean + $(MAKE) -C TESTING/MATGEN clean + $(MAKE) -C TESTING/LIN clean + $(MAKE) -C TESTING/EIG clean + $(MAKE) -C LAPACKE clean + rm -f *.a +cleanobj: + $(MAKE) -C INSTALL cleanobj + $(MAKE) -C BLAS cleanobj + $(MAKE) -C CBLAS cleanobj + $(MAKE) -C SRC cleanobj + $(MAKE) -C SRC/VARIANTS cleanobj + $(MAKE) -C TESTING/MATGEN cleanobj + $(MAKE) -C TESTING/LIN cleanobj + $(MAKE) -C TESTING/EIG cleanobj + $(MAKE) -C LAPACKE cleanobj cleanlib: - ( cd INSTALL; $(MAKE) clean ) - ( cd BLAS/SRC; $(MAKE) clean ) - ( cd CBLAS; $(MAKE) clean ) - ( cd SRC; $(MAKE) clean ) - ( cd SRC/VARIANTS; $(MAKE) clean ) - ( cd TESTING/MATGEN; $(MAKE) clean ) - ( cd LAPACKE; $(MAKE) clean ) - - -cleanblas_testing: - ( cd BLAS/TESTING; $(MAKE) -f Makeblat1 clean ) - ( cd BLAS/TESTING; $(MAKE) -f Makeblat2 clean ) - ( cd BLAS/TESTING; $(MAKE) -f Makeblat3 clean ) - ( cd BLAS; rm -f xblat* ) - -cleancblas_testing: - ( cd CBLAS/testing; $(MAKE) clean ) - -cleantesting: - ( cd TESTING/LIN; $(MAKE) clean ) - ( cd TESTING/EIG; $(MAKE) clean ) - ( cd TESTING; rm -f xlin* xeig* ) - -cleanall: cleanlib cleanblas_testing cleancblas_testing cleantesting - rm -f *.a TESTING/*.out INSTALL/test* BLAS/*.out + $(MAKE) -C BLAS cleanlib + $(MAKE) -C CBLAS cleanlib + $(MAKE) -C SRC cleanlib + $(MAKE) -C SRC/VARIANTS cleanlib + $(MAKE) -C TESTING/MATGEN cleanlib + $(MAKE) -C LAPACKE cleanlib + rm -f *.a +cleanexe: + $(MAKE) -C INSTALL cleanexe + $(MAKE) -C BLAS cleanexe + $(MAKE) -C CBLAS cleanexe + $(MAKE) -C TESTING/LIN cleanexe + $(MAKE) -C TESTING/EIG cleanexe + $(MAKE) -C LAPACKE cleanexe +cleantest: + $(MAKE) -C INSTALL cleantest + $(MAKE) -C BLAS cleantest + $(MAKE) -C CBLAS cleantest + $(MAKE) -C TESTING cleantest diff -Nru lapack-3.7.0/make.inc.example lapack-3.7.1/make.inc.example --- lapack-3.7.0/make.inc.example 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/make.inc.example 2017-06-17 22:46:53.000000000 +0000 @@ -1,75 +1,79 @@ #################################################################### # LAPACK make include file. # -# LAPACK, Version 3.7.0 # -# December 2016 # +# LAPACK, Version 3.7.1 # +# June 2017 # #################################################################### -# + SHELL = /bin/sh + +# CC is the C compiler, normally invoked with options CFLAGS. # -# Modify the FORTRAN and OPTS definitions to refer to the -# compiler and desired compiler options for your machine. NOOPT -# refers to the compiler options desired when NO OPTIMIZATION is -# selected. Define LOADER and LOADOPTS to refer to the loader and -# desired load options for your machine. +CC = gcc +CFLAGS = -O3 + +# Modify the FORTRAN and OPTS definitions to refer to the compiler +# and desired compiler options for your machine. NOOPT refers to +# the compiler options desired when NO OPTIMIZATION is selected. # # Note: During a regular execution, LAPACK might create NaN and Inf # and handle these quantities appropriately. As a consequence, one # should not compile LAPACK with flags such as -ffpe-trap=overflow. # -FORTRAN = gfortran -OPTS = -O2 -frecursive -DRVOPTS = $(OPTS) -NOOPT = -O0 -frecursive +FORTRAN = gfortran +OPTS = -O2 -frecursive +DRVOPTS = $(OPTS) +NOOPT = -O0 -frecursive + +# Define LOADER and LOADOPTS to refer to the loader and desired +# load options for your machine. +# LOADER = gfortran LOADOPTS = -# -# Comment out the following line to include deprecated routines to the -# LAPACK library. + +# The archiver and the flag(s) to use when building an archive +# (library). If your system has no ranlib, set RANLIB = echo. +# +ARCH = ar +ARCHFLAGS = cr +RANLIB = ranlib + +# Timer for the SECOND and DSECND routines +# +# Default: SECOND and DSECND will use a call to the +# EXTERNAL FUNCTION ETIME +#TIMER = EXT_ETIME +# For RS6K: SECOND and DSECND will use a call to the +# EXTERNAL FUNCTION ETIME_ +#TIMER = EXT_ETIME_ +# For gfortran compiler: SECOND and DSECND will use a call to the +# INTERNAL FUNCTION ETIME +TIMER = INT_ETIME +# If your Fortran compiler does not provide etime (like Nag Fortran +# Compiler, etc...) SECOND and DSECND will use a call to the +# INTERNAL FUNCTION CPU_TIME +#TIMER = INT_CPU_TIME +# If none of these work, you can use the NONE value. +# In that case, SECOND and DSECND will always return 0. +#TIMER = NONE + +# Uncomment the following line to include deprecated routines in +# the LAPACK library. # #BUILD_DEPRECATED = Yes + +# LAPACKE has the interface to some routines from tmglib. +# If LAPACKE_WITH_TMG is defined, add those routines to LAPACKE. # -# Timer for the SECOND and DSECND routines -# -# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME -# TIMER = EXT_ETIME -# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_ -# TIMER = EXT_ETIME_ -# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME -TIMER = INT_ETIME -# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...) -# SECOND and DSECND will use a call to the INTERNAL FUNCTION CPU_TIME -# TIMER = INT_CPU_TIME -# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0 -# TIMER = NONE -# -# Configuration LAPACKE: Native C interface to LAPACK -# To generate LAPACKE library: type 'make lapackelib' -# Configuration file: turned off (default) -# Complex types: C99 (default) -# Name pattern: mixed case (default) -# (64-bit) Data model: LP64 (default) -# -# CC is the C compiler, normally invoked with options CFLAGS. -# -CC = gcc -CFLAGS = -O3 -# -# The archiver and the flag(s) to use when building archive (library) -# If you system has no ranlib, set RANLIB = echo. -# -ARCH = ar -ARCHFLAGS= cr -RANLIB = ranlib -# +#LAPACKE_WITH_TMG = Yes + # Location of the extended-precision BLAS (XBLAS) Fortran library # used for building and testing extended-precision routines. The -# relevant routines will be compiled and XBLAS will be linked only if -# USEXBLAS is defined. -# -# USEXBLAS = Yes -XBLASLIB = -# XBLASLIB = -lxblas +# relevant routines will be compiled and XBLAS will be linked only +# if USEXBLAS is defined. # +#USEXBLAS = Yes +#XBLASLIB = -lxblas + # The location of the libraries to which you will link. (The # machine-specific, optimized BLAS library should be used whenever # possible.) diff -Nru lapack-3.7.0/README lapack-3.7.1/README --- lapack-3.7.0/README 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/README 1970-01-01 00:00:00.000000000 +0000 @@ -1,174 +0,0 @@ -================== -LAPACK README FILE -================== - -VERSION 1.0 : February 29, 1992 -VERSION 1.0a : June 30, 1992 -VERSION 1.0b : October 31, 1992 -VERSION 1.1 : March 31, 1993 -VERSION 2.0 : September 30, 1994 -VERSION 3.0 : June 30, 1999 -VERSION 3.0 + update : October 31, 1999 -VERSION 3.0 + update : May 31, 2000 -VERSION 3.1 : November 2006 -VERSION 3.1.1 : February 2007 -VERSION 3.2 : November 2008 -VERSION 3.2.1 : April 2009 -VERSION 3.2.2 : June 2010 -VERSION 3.3.0 : November 2010 -VERSION 3.3.1 : April 2011 -VERSION 3.4.0 : November 2011 -VERSION 3.4.1 : April 2012 -VERSION 3.4.2 : September 2012 -VERSION 3.5.0 : November 2013 -VERSION 3.6.0 : November 2015 -VERSION 3.6.1 : June 2016 -VERSION 3.7.0 : December 2016 - - -LAPACK is a library of Fortran 90 with subroutines for solving -the most commonly occurring problems in numerical linear algebra. -It is freely-available software, and is copyrighted. - -LAPACK is available on netlib and can be obtained via the World Wide -Web and anonymous ftp. - - http://www.netlib.org/lapack/ - -The distribution tar file contains the Fortran source for LAPACK and the -testing programs. It also contains the Fortran77 -reference implementation of the Basic Linear Algebra Subprograms -(the Level 1, 2, and 3 BLAS) needed by LAPACK. However this code is -intended for use only if there is no other implementation of the BLAS -already available on your machine; the efficiency of LAPACK depends -very much on the efficiency of the BLAS. - -================= -LAPACK INSTALLATION: - - LAPACK can be installed with make. Configuration have to be set in the - make.inc file. A make.inc.example for a Linux machine running GNU compilers - is given in the main directory. Some specific make.inc are also available in - the INSTALL directory - - LAPACK includes also the CMAKE build. You will need to have CMAKE installed - on your machine (CMAKE is available at http://www.cmake.org/). CMAKE will allow - an easy installation on a Windows Machine - - Specific information to run LAPACK under Windows are available at - http://icl.cs.utk.edu/lapack-for-windows/lapack/ - - For further information on LAPACK please read our FAQ at - http://www.netlib.org/lapack/#_faq - A User forum is also available to help you with the LAPACK library at - http://icl.cs.utk.edu/lapack-forum/ -================ - - -================ -LAPACK User Support - -LAPACK has been thoroughly tested, on many different -types of computers. The LAPACK project supports the package in the -sense that reports of errors or poor performance will gain immediate -attention from the developers. Such reports, descriptions -of interesting applications, and other comments should be sent by -electronic mail to lapack@cs.utk.edu. - -A list of known problems, bugs, and compiler errors for LAPACK is -maintained on netlib. - http://www.netlib.org/lapack/release_notes.html - -A User forum is also available to help you with the LAPACK library at - http://icl.cs.utk.edu/lapack-forum/ -You can also contact directly the LAPACK team at lapack@cs.utk.edu -================ - - -================ -LAPACK TESTING -The complete package, including test code in four -different Fortran data types (real, complex, double precision, double -complex), contains some 805,000 lines of Fortran source and comments. -You will need approximately 33 Mbytes to read the complete tape. -We recommend that you run the testing. The total -space requirements for the testing for all four data -types, including the object files, is approximately 80 Mbytes. - -A README file containing the information in this letter is located -in the LAPACK directory. Postscript and LaTeX versions of the Quick -Installation Guide are in the LAPACK/INSTALL directory, in the files -lawn81.tex, psfig.tex, lawn81.ps, and org2.ps. Consult the Installation -Guide for further details on installing the package and on what is contained -in each subdirectory. For complete information on the LAPACK Testing -please consult LAPACK Working Note 41 "Installation -Guide for LAPACK". -================ - - -================ -LAPACK USER GUIDE -It is highly recommended that you obtain a copy of the Third Edition of -the LAPACK Users' Guide published by SIAM in Winter, 1999. This Users' -Guide gives a detailed description of the philosophy behind LAPACK as well -as an explanation of its usage. The LAPACK Users' Guide can be purchased from: -SIAM; Customer Service; P. O. Box 7260; Philadelphia, PA 19104; -215-382-9800, FAX 215-386-7999. It will also be available from booksellers. - -To order by email, send email to service@siam.org. The book is also -available via SIAM's World Wide Web URL at http://www.siam.org. The -ISBN number is 0-89871-447-8, and SIAM order code is SE09. The list -price for SIAM members is $31.20; the cost for nonmembers is $39.00. - -To view an HTML version of the Users' Guide please refer to the URL - - http://www.netlib.org/lapack/lug/lapack_lug.html. -================ - -================ -LAPACKE -LAPACK now includes the LAPACKE package -LAPACKE is a Standard C language APIs for LAPACK -http://www.netlib.org/lapack/#_standard_c_language_apis_for_lapack -collaboration LAPACK and INTEL Math Kernel Library - -Documentation available in the DOCS folder -================ - -================ -RELATED LAPACK PROJECTS - -The Fortran95 interface to LAPACK is available, as well as an f2c'ed -version of LAPACK, and a C++ version of a subset of LAPACK routines. -Refer to the following URLs on netlib for further information: - - http://www.netlib.org/lapack95/ - http://www.netlib.org/clapack/ - http://www.netlib.org/lapack++/ - http://www.cs.utk.edu/java/f2j/ - -Or, for more information on the distributed-memory version of LAPACK, -consult the ScaLAPACK index on netlib: - - http://www.netlib.org/scalapack/ -================ - - -================ -LAPACK WORKING NOTES - -A number of technical reports were written during the development of -LAPACK and published as LAPACK Working Notes, initially by Argonne -National Laboratory and later by the University of Tennessee. Many of -these reports later appeared as journal articles. Most of these working -notes are available in pdf and postscript form from netlib. - http://www.netlib.org/lapack/lawns/ - http://www.netlib.org/lapack/lawnspdf/ -Otherwise, requests for copies of these working notes can be sent to -the following address. - -LAPACK Project -c/o J.J. Dongarra -Computer Science Department -University of Tennessee -Knoxville, Tennessee 37996-1301 -USA -Email: lapack@cs.utk.edu -================ diff -Nru lapack-3.7.0/README.md lapack-3.7.1/README.md --- lapack-3.7.0/README.md 1970-01-01 00:00:00.000000000 +0000 +++ lapack-3.7.1/README.md 2017-06-17 22:46:53.000000000 +0000 @@ -0,0 +1,117 @@ +# LAPACK + +[![Build Status](https://travis-ci.org/Reference-LAPACK/lapack.svg?branch=master)](https://travis-ci.org/Reference-LAPACK/lapack) +[![Appveyor](https://ci.appveyor.com/api/projects/status/bh38iin398msrbtr?svg=true)](https://ci.appveyor.com/project/langou/lapack/) +[![codecov](https://codecov.io/gh/Reference-LAPACK/lapack/branch/master/graph/badge.svg)](https://codecov.io/gh/Reference-LAPACK/lapack) + + +* VERSION 1.0 : February 29, 1992 +* VERSION 1.0a : June 30, 1992 +* VERSION 1.0b : October 31, 1992 +* VERSION 1.1 : March 31, 1993 +* VERSION 2.0 : September 30, 1994 +* VERSION 3.0 : June 30, 1999 +* VERSION 3.0 + update : October 31, 1999 +* VERSION 3.0 + update : May 31, 2000 +* VERSION 3.1 : November 2006 +* VERSION 3.1.1 : February 2007 +* VERSION 3.2 : November 2008 +* VERSION 3.2.1 : April 2009 +* VERSION 3.2.2 : June 2010 +* VERSION 3.3.0 : November 2010 +* VERSION 3.3.1 : April 2011 +* VERSION 3.4.0 : November 2011 +* VERSION 3.4.1 : April 2012 +* VERSION 3.4.2 : September 2012 +* VERSION 3.5.0 : November 2013 +* VERSION 3.6.0 : November 2015 +* VERSION 3.6.1 : June 2016 +* VERSION 3.7.0 : December 2016 +* VERSION 3.7.1 : June 2017 + +LAPACK is a library of Fortran subroutines for solving the most commonly +occurring problems in numerical linear algebra. + +LAPACK is a freely-available software package. It can be included in commercial +software packages (and has been). We only ask that that proper credit be given +to the authors, for example by citing the LAPACK Users' Guide. The license used +for the software is the modified BSD license, see: +https://github.com/Reference-LAPACK/lapack/blob/master/LICENSE + +Like all software, it is copyrighted. It is not trademarked, but we do ask the +following: if you modify the source for these routines we ask that you change +the name of the routine and comment the changes made to the original. + +We will gladly answer any questions regarding the software. If a modification +is done, however, it is the responsibility of the person who modified the +routine to provide support. + +LAPACK is available from github at: +https://github.com/reference-lapack/lapack + +LAPACK releases are also available on netlib at: +http://www.netlib.org/lapack/ + +The distribution contains (1) the Fortran source for LAPACK, and (2) its +testing programs. It also contains (3) the Fortran reference implementation of +the Basic Linear Algebra Subprograms (the Level 1, 2, and 3 BLAS) needed by +LAPACK. However this code is intended for use only if there is no other +implementation of the BLAS already available on your machine; the efficiency of +LAPACK depends very much on the efficiency of the BLAS. It also contains (4) +CBLAS, a C interface to the BLAS, and (5) LAPACKE, a C interface to LAPACK. + +## Installation + + - LAPACK can be installed with `make`. The configuration have to be set in the + `make.inc` file. A `make.inc.example` for a Linux machine running GNU compilers + is given in the main directory. Some specific `make.inc` are also available in + the `INSTALL` directory. + - LAPACK includes also the CMake build. You will need to have CMake installed + on your machine (CMake is available at http://www.cmake.org/). CMake will + allow an easy installation on a Windows Machine. + - Specific information to run LAPACK under Windows is available at + http://icl.cs.utk.edu/lapack-for-windows/lapack/. + + +## User Support + +LAPACK has been thoroughly tested, on many different types of computers. The +LAPACK project supports the package in the sense that reports of errors or poor +performance will gain immediate attention from the developers. Such reports, +descriptions of interesting applications, and other comments should be sent by +electronic mail to lapack@icl.utk.edu. + +For further information on LAPACK please read our FAQ at +http://www.netlib.org/lapack/#_faq. + +A list of known problems, bugs, and compiler errors for LAPACK is +maintained on netlib +http://www.netlib.org/lapack/release_notes.html. +Please see as well +https://github.com/Reference-LAPACK/lapack/issues. + +A User forum is also available to help you with the LAPACK library at +http://icl.cs.utk.edu/lapack-forum/. +You can also contact directly the LAPACK team at lapack@icl.utk.edu. + + +## Testing + +LAPACK includes a thorough test suite. We recommend that, after compilation, +you run the test suite. + +For complete information on the LAPACK Testing please consult LAPACK Working +Note 41 "Installation Guide for LAPACK". + +## User Guide + +To view an HTML version of the Users' Guide please refer to the URL + http://www.netlib.org/lapack/lug/lapack_lug.html. + +## LAPACKE + +LAPACK now includes the LAPACKE package. LAPACKE is a Standard C language API +for LAPACK This was born from a collaboration of the LAPACK and INTEL Math +Kernel Library teams. See: +http://www.netlib.org/lapack/#_standard_c_language_apis_for_lapack. + diff -Nru lapack-3.7.0/SRC/cbbcsd.f lapack-3.7.1/SRC/cbbcsd.f --- lapack-3.7.0/SRC/cbbcsd.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/cbbcsd.f 2017-06-17 22:46:53.000000000 +0000 @@ -190,7 +190,7 @@ *> *> \param[in,out] V2T *> \verbatim -*> V2T is COMPLEX array, dimenison (LDV2T,M-Q) +*> V2T is COMPLEX array, dimension (LDV2T,M-Q) *> On entry, an (M-Q)-by-(M-Q) matrix. On exit, V2T is *> premultiplied by the conjugate transpose of the right *> singular vector matrix common to [ B12 0 0 ; 0 -I 0 ] and @@ -332,7 +332,7 @@ $ V2T, LDV2T, B11D, B11E, B12D, B12E, B21D, B21E, $ B22D, B22E, RWORK, LRWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 diff -Nru lapack-3.7.0/SRC/cgebd2.f lapack-3.7.1/SRC/cgebd2.f --- lapack-3.7.0/SRC/cgebd2.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/cgebd2.f 2017-06-17 22:46:53.000000000 +0000 @@ -100,7 +100,7 @@ *> *> \param[out] TAUQ *> \verbatim -*> TAUQ is COMPLEX array dimension (min(M,N)) +*> TAUQ is COMPLEX array, dimension (min(M,N)) *> The scalar factors of the elementary reflectors which *> represent the unitary matrix Q. See Further Details. *> \endverbatim @@ -132,7 +132,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complexGEcomputational * @precisions normal c -> s d z @@ -190,10 +190,10 @@ * ===================================================================== SUBROUTINE CGEBD2( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, M, N diff -Nru lapack-3.7.0/SRC/cgebrd.f lapack-3.7.1/SRC/cgebrd.f --- lapack-3.7.0/SRC/cgebrd.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/cgebrd.f 2017-06-17 22:46:53.000000000 +0000 @@ -102,7 +102,7 @@ *> *> \param[out] TAUQ *> \verbatim -*> TAUQ is COMPLEX array dimension (min(M,N)) +*> TAUQ is COMPLEX array, dimension (min(M,N)) *> The scalar factors of the elementary reflectors which *> represent the unitary matrix Q. See Further Details. *> \endverbatim @@ -148,7 +148,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complexGEcomputational * @@ -206,10 +206,10 @@ SUBROUTINE CGEBRD( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK, $ INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LWORK, M, N diff -Nru lapack-3.7.0/SRC/cgeevx.f lapack-3.7.1/SRC/cgeevx.f --- lapack-3.7.0/SRC/cgeevx.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/cgeevx.f 2017-06-17 22:46:53.000000000 +0000 @@ -25,12 +25,12 @@ * .. Scalar Arguments .. * CHARACTER BALANC, JOBVL, JOBVR, SENSE * INTEGER IHI, ILO, INFO, LDA, LDVL, LDVR, LWORK, N -* REAL ABNRM +* REAL ABNRM * .. * .. Array Arguments .. -* REAL RCONDE( * ), RCONDV( * ), RWORK( * ), +* REAL RCONDE( * ), RCONDV( * ), RWORK( * ), * $ SCALE( * ) -* COMPLEX A( LDA, * ), VL( LDVL, * ), VR( LDVR, * ), +* COMPLEX A( LDA, * ), VL( LDVL, * ), VR( LDVR, * ), * $ W( * ), WORK( * ) * .. * @@ -288,7 +288,7 @@ $ RCONDV, WORK, LWORK, RWORK, INFO ) implicit none * -* -- LAPACK driver routine (version 3.7.0) -- +* -- LAPACK driver routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 @@ -296,19 +296,19 @@ * .. Scalar Arguments .. CHARACTER BALANC, JOBVL, JOBVR, SENSE INTEGER IHI, ILO, INFO, LDA, LDVL, LDVR, LWORK, N - REAL ABNRM + REAL ABNRM * .. * .. Array Arguments .. - REAL RCONDE( * ), RCONDV( * ), RWORK( * ), + REAL RCONDE( * ), RCONDV( * ), RWORK( * ), $ SCALE( * ) - COMPLEX A( LDA, * ), VL( LDVL, * ), VR( LDVR, * ), + COMPLEX A( LDA, * ), VL( LDVL, * ), VR( LDVR, * ), $ W( * ), WORK( * ) * .. * * ===================================================================== * * .. Parameters .. - REAL ZERO, ONE + REAL ZERO, ONE PARAMETER ( ZERO = 0.0E0, ONE = 1.0E0 ) * .. * .. Local Scalars .. @@ -317,8 +317,8 @@ CHARACTER JOB, SIDE INTEGER HSWORK, I, ICOND, IERR, ITAU, IWRK, K, $ LWORK_TREVC, MAXWRK, MINWRK, NOUT - REAL ANRM, BIGNUM, CSCALE, EPS, SCL, SMLNUM - COMPLEX TMP + REAL ANRM, BIGNUM, CSCALE, EPS, SCL, SMLNUM + COMPLEX TMP * .. * .. Local Arrays .. LOGICAL SELECT( 1 ) diff -Nru lapack-3.7.0/SRC/cgejsv.f lapack-3.7.1/SRC/cgejsv.f --- lapack-3.7.0/SRC/cgejsv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/cgejsv.f 2017-06-17 22:46:53.000000000 +0000 @@ -1,2235 +1,2235 @@ -*> \brief \b CGEJSV -* -* =========== DOCUMENTATION =========== -* -* Online html documentation available at -* http://www.netlib.org/lapack/explore-html/ -* -*> \htmlonly -*> Download CGEJSV + dependencies -*> -*> [TGZ] -*> -*> [ZIP] -*> -*> [TXT] -*> \endhtmlonly -* -* Definition: -* =========== -* -* SUBROUTINE CGEJSV( JOBA, JOBU, JOBV, JOBR, JOBT, JOBP, -* M, N, A, LDA, SVA, U, LDU, V, LDV, -* CWORK, LWORK, RWORK, LRWORK, IWORK, INFO ) -* -* .. Scalar Arguments .. -* IMPLICIT NONE -* INTEGER INFO, LDA, LDU, LDV, LWORK, M, N -* .. -* .. Array Arguments .. -* COMPLEX A( LDA, * ), U( LDU, * ), V( LDV, * ), CWORK( LWORK ) -* REAL SVA( N ), RWORK( LRWORK ) -* INTEGER IWORK( * ) -* CHARACTER*1 JOBA, JOBP, JOBR, JOBT, JOBU, JOBV -* .. -* -* -*> \par Purpose: -* ============= -*> -*> \verbatim -*> -*> CGEJSV computes the singular value decomposition (SVD) of a complex M-by-N -*> matrix [A], where M >= N. The SVD of [A] is written as -*> -*> [A] = [U] * [SIGMA] * [V]^*, -*> -*> where [SIGMA] is an N-by-N (M-by-N) matrix which is zero except for its N -*> diagonal elements, [U] is an M-by-N (or M-by-M) unitary matrix, and -*> [V] is an N-by-N unitary matrix. The diagonal elements of [SIGMA] are -*> the singular values of [A]. The columns of [U] and [V] are the left and -*> the right singular vectors of [A], respectively. The matrices [U] and [V] -*> are computed and stored in the arrays U and V, respectively. The diagonal -*> of [SIGMA] is computed and stored in the array SVA. -*> \endverbatim -*> -*> Arguments: -*> ========== -*> -*> \param[in] JOBA -*> \verbatim -*> JOBA is CHARACTER*1 -*> Specifies the level of accuracy: -*> = 'C': This option works well (high relative accuracy) if A = B * D, -*> with well-conditioned B and arbitrary diagonal matrix D. -*> The accuracy cannot be spoiled by COLUMN scaling. The -*> accuracy of the computed output depends on the condition of -*> B, and the procedure aims at the best theoretical accuracy. -*> The relative error max_{i=1:N}|d sigma_i| / sigma_i is -*> bounded by f(M,N)*epsilon* cond(B), independent of D. -*> The input matrix is preprocessed with the QRF with column -*> pivoting. This initial preprocessing and preconditioning by -*> a rank revealing QR factorization is common for all values of -*> JOBA. Additional actions are specified as follows: -*> = 'E': Computation as with 'C' with an additional estimate of the -*> condition number of B. It provides a realistic error bound. -*> = 'F': If A = D1 * C * D2 with ill-conditioned diagonal scalings -*> D1, D2, and well-conditioned matrix C, this option gives -*> higher accuracy than the 'C' option. If the structure of the -*> input matrix is not known, and relative accuracy is -*> desirable, then this option is advisable. The input matrix A -*> is preprocessed with QR factorization with FULL (row and -*> column) pivoting. -*> = 'G' Computation as with 'F' with an additional estimate of the -*> condition number of B, where A=B*D. If A has heavily weighted -*> rows, then using this condition number gives too pessimistic -*> error bound. -*> = 'A': Small singular values are not well determined by the data -*> and are considered as noisy; the matrix is treated as -*> numerically rank defficient. The error in the computed -*> singular values is bounded by f(m,n)*epsilon*||A||. -*> The computed SVD A = U * S * V^* restores A up to -*> f(m,n)*epsilon*||A||. -*> This gives the procedure the licence to discard (set to zero) -*> all singular values below N*epsilon*||A||. -*> = 'R': Similar as in 'A'. Rank revealing property of the initial -*> QR factorization is used do reveal (using triangular factor) -*> a gap sigma_{r+1} < epsilon * sigma_r in which case the -*> numerical RANK is declared to be r. The SVD is computed with -*> absolute error bounds, but more accurately than with 'A'. -*> \endverbatim -*> -*> \param[in] JOBU -*> \verbatim -*> JOBU is CHARACTER*1 -*> Specifies whether to compute the columns of U: -*> = 'U': N columns of U are returned in the array U. -*> = 'F': full set of M left sing. vectors is returned in the array U. -*> = 'W': U may be used as workspace of length M*N. See the description -*> of U. -*> = 'N': U is not computed. -*> \endverbatim -*> -*> \param[in] JOBV -*> \verbatim -*> JOBV is CHARACTER*1 -*> Specifies whether to compute the matrix V: -*> = 'V': N columns of V are returned in the array V; Jacobi rotations -*> are not explicitly accumulated. -*> = 'J': N columns of V are returned in the array V, but they are -*> computed as the product of Jacobi rotations, if JOBT .EQ. 'N'. -*> = 'W': V may be used as workspace of length N*N. See the description -*> of V. -*> = 'N': V is not computed. -*> \endverbatim -*> -*> \param[in] JOBR -*> \verbatim -*> JOBR is CHARACTER*1 -*> Specifies the RANGE for the singular values. Issues the licence to -*> set to zero small positive singular values if they are outside -*> specified range. If A .NE. 0 is scaled so that the largest singular -*> value of c*A is around SQRT(BIG), BIG=SLAMCH('O'), then JOBR issues -*> the licence to kill columns of A whose norm in c*A is less than -*> SQRT(SFMIN) (for JOBR.EQ.'R'), or less than SMALL=SFMIN/EPSLN, -*> where SFMIN=SLAMCH('S'), EPSLN=SLAMCH('E'). -*> = 'N': Do not kill small columns of c*A. This option assumes that -*> BLAS and QR factorizations and triangular solvers are -*> implemented to work in that range. If the condition of A -*> is greater than BIG, use CGESVJ. -*> = 'R': RESTRICTED range for sigma(c*A) is [SQRT(SFMIN), SQRT(BIG)] -*> (roughly, as described above). This option is recommended. -*> =========================== -*> For computing the singular values in the FULL range [SFMIN,BIG] -*> use CGESVJ. -*> \endverbatim -*> -*> \param[in] JOBT -*> \verbatim -*> JOBT is CHARACTER*1 -*> If the matrix is square then the procedure may determine to use -*> transposed A if A^* seems to be better with respect to convergence. -*> If the matrix is not square, JOBT is ignored. -*> The decision is based on two values of entropy over the adjoint -*> orbit of A^* * A. See the descriptions of WORK(6) and WORK(7). -*> = 'T': transpose if entropy test indicates possibly faster -*> convergence of Jacobi process if A^* is taken as input. If A is -*> replaced with A^*, then the row pivoting is included automatically. -*> = 'N': do not speculate. -*> The option 'T' can be used to compute only the singular values, or -*> the full SVD (U, SIGMA and V). For only one set of singular vectors -*> (U or V), the caller should provide both U and V, as one of the -*> matrices is used as workspace if the matrix A is transposed. -*> The implementer can easily remove this constraint and make the -*> code more complicated. See the descriptions of U and V. -*> In general, this option is considered experimental, and 'N'; should -*> be preferred. This is subject to changes in the future. -*> \endverbatim -*> -*> \param[in] JOBP -*> \verbatim -*> JOBP is CHARACTER*1 -*> Issues the licence to introduce structured perturbations to drown -*> denormalized numbers. This licence should be active if the -*> denormals are poorly implemented, causing slow computation, -*> especially in cases of fast convergence (!). For details see [1,2]. -*> For the sake of simplicity, this perturbations are included only -*> when the full SVD or only the singular values are requested. The -*> implementer/user can easily add the perturbation for the cases of -*> computing one set of singular vectors. -*> = 'P': introduce perturbation -*> = 'N': do not perturb -*> \endverbatim -*> -*> \param[in] M -*> \verbatim -*> M is INTEGER -*> The number of rows of the input matrix A. M >= 0. -*> \endverbatim -*> -*> \param[in] N -*> \verbatim -*> N is INTEGER -*> The number of columns of the input matrix A. M >= N >= 0. -*> \endverbatim -*> -*> \param[in,out] A -*> \verbatim -*> A is COMPLEX array, dimension (LDA,N) -*> On entry, the M-by-N matrix A. -*> \endverbatim -*> -*> \param[in] LDA -*> \verbatim -*> LDA is INTEGER -*> The leading dimension of the array A. LDA >= max(1,M). -*> \endverbatim -*> -*> \param[out] SVA -*> \verbatim -*> SVA is REAL array, dimension (N) -*> On exit, -*> - For WORK(1)/WORK(2) = ONE: The singular values of A. During the -*> computation SVA contains Euclidean column norms of the -*> iterated matrices in the array A. -*> - For WORK(1) .NE. WORK(2): The singular values of A are -*> (WORK(1)/WORK(2)) * SVA(1:N). This factored form is used if -*> sigma_max(A) overflows or if small singular values have been -*> saved from underflow by scaling the input matrix A. -*> - If JOBR='R' then some of the singular values may be returned -*> as exact zeros obtained by "set to zero" because they are -*> below the numerical rank threshold or are denormalized numbers. -*> \endverbatim -*> -*> \param[out] U -*> \verbatim -*> U is COMPLEX array, dimension ( LDU, N ) or ( LDU, M ) -*> If JOBU = 'U', then U contains on exit the M-by-N matrix of -*> the left singular vectors. -*> If JOBU = 'F', then U contains on exit the M-by-M matrix of -*> the left singular vectors, including an ONB -*> of the orthogonal complement of the Range(A). -*> If JOBU = 'W' .AND. (JOBV.EQ.'V' .AND. JOBT.EQ.'T' .AND. M.EQ.N), -*> then U is used as workspace if the procedure -*> replaces A with A^*. In that case, [V] is computed -*> in U as left singular vectors of A^* and then -*> copied back to the V array. This 'W' option is just -*> a reminder to the caller that in this case U is -*> reserved as workspace of length N*N. -*> If JOBU = 'N' U is not referenced, unless JOBT='T'. -*> \endverbatim -*> -*> \param[in] LDU -*> \verbatim -*> LDU is INTEGER -*> The leading dimension of the array U, LDU >= 1. -*> IF JOBU = 'U' or 'F' or 'W', then LDU >= M. -*> \endverbatim -*> -*> \param[out] V -*> \verbatim -*> V is COMPLEX array, dimension ( LDV, N ) -*> If JOBV = 'V', 'J' then V contains on exit the N-by-N matrix of -*> the right singular vectors; -*> If JOBV = 'W', AND (JOBU.EQ.'U' AND JOBT.EQ.'T' AND M.EQ.N), -*> then V is used as workspace if the pprocedure -*> replaces A with A^*. In that case, [U] is computed -*> in V as right singular vectors of A^* and then -*> copied back to the U array. This 'W' option is just -*> a reminder to the caller that in this case V is -*> reserved as workspace of length N*N. -*> If JOBV = 'N' V is not referenced, unless JOBT='T'. -*> \endverbatim -*> -*> \param[in] LDV -*> \verbatim -*> LDV is INTEGER -*> The leading dimension of the array V, LDV >= 1. -*> If JOBV = 'V' or 'J' or 'W', then LDV >= N. -*> \endverbatim -*> -*> \param[out] CWORK -*> \verbatim -*> CWORK is COMPLEX array, dimension (MAX(2,LWORK)) -*> If the call to CGEJSV is a workspace query (indicated by LWORK=-1 or -*> LRWORK=-1), then on exit CWORK(1) contains the required length of -*> CWORK for the job parameters used in the call. -*> \endverbatim -*> -*> \param[in] LWORK -*> \verbatim -*> LWORK is INTEGER -*> Length of CWORK to confirm proper allocation of workspace. -*> LWORK depends on the job: -*> -*> 1. If only SIGMA is needed ( JOBU.EQ.'N', JOBV.EQ.'N' ) and -*> 1.1 .. no scaled condition estimate required (JOBA.NE.'E'.AND.JOBA.NE.'G'): -*> LWORK >= 2*N+1. This is the minimal requirement. -*> ->> For optimal performance (blocked code) the optimal value -*> is LWORK >= N + (N+1)*NB. Here NB is the optimal -*> block size for CGEQP3 and CGEQRF. -*> In general, optimal LWORK is computed as -*> LWORK >= max(N+LWORK(CGEQP3),N+LWORK(CGEQRF), LWORK(CGESVJ)). -*> 1.2. .. an estimate of the scaled condition number of A is -*> required (JOBA='E', or 'G'). In this case, LWORK the minimal -*> requirement is LWORK >= N*N + 2*N. -*> ->> For optimal performance (blocked code) the optimal value -*> is LWORK >= max(N+(N+1)*NB, N*N+2*N)=N**2+2*N. -*> In general, the optimal length LWORK is computed as -*> LWORK >= max(N+LWORK(CGEQP3),N+LWORK(CGEQRF), LWORK(CGESVJ), -*> N*N+LWORK(CPOCON)). -*> 2. If SIGMA and the right singular vectors are needed (JOBV.EQ.'V'), -*> (JOBU.EQ.'N') -*> 2.1 .. no scaled condition estimate requested (JOBE.EQ.'N'): -*> -> the minimal requirement is LWORK >= 3*N. -*> -> For optimal performance, -*> LWORK >= max(N+(N+1)*NB, 2*N+N*NB)=2*N+N*NB, -*> where NB is the optimal block size for CGEQP3, CGEQRF, CGELQ, -*> CUNMLQ. In general, the optimal length LWORK is computed as -*> LWORK >= max(N+LWORK(CGEQP3), N+LWORK(CGESVJ), -*> N+LWORK(CGELQF), 2*N+LWORK(CGEQRF), N+LWORK(CUNMLQ)). -*> 2.2 .. an estimate of the scaled condition number of A is -*> required (JOBA='E', or 'G'). -*> -> the minimal requirement is LWORK >= 3*N. -*> -> For optimal performance, -*> LWORK >= max(N+(N+1)*NB, 2*N,2*N+N*NB)=2*N+N*NB, -*> where NB is the optimal block size for CGEQP3, CGEQRF, CGELQ, -*> CUNMLQ. In general, the optimal length LWORK is computed as -*> LWORK >= max(N+LWORK(CGEQP3), LWORK(CPOCON), N+LWORK(CGESVJ), -*> N+LWORK(CGELQF), 2*N+LWORK(CGEQRF), N+LWORK(CUNMLQ)). -*> 3. If SIGMA and the left singular vectors are needed -*> 3.1 .. no scaled condition estimate requested (JOBE.EQ.'N'): -*> -> the minimal requirement is LWORK >= 3*N. -*> -> For optimal performance: -*> if JOBU.EQ.'U' :: LWORK >= max(3*N, N+(N+1)*NB, 2*N+N*NB)=2*N+N*NB, -*> where NB is the optimal block size for CGEQP3, CGEQRF, CUNMQR. -*> In general, the optimal length LWORK is computed as -*> LWORK >= max(N+LWORK(CGEQP3), 2*N+LWORK(CGEQRF), N+LWORK(CUNMQR)). -*> 3.2 .. an estimate of the scaled condition number of A is -*> required (JOBA='E', or 'G'). -*> -> the minimal requirement is LWORK >= 3*N. -*> -> For optimal performance: -*> if JOBU.EQ.'U' :: LWORK >= max(3*N, N+(N+1)*NB, 2*N+N*NB)=2*N+N*NB, -*> where NB is the optimal block size for CGEQP3, CGEQRF, CUNMQR. -*> In general, the optimal length LWORK is computed as -*> LWORK >= max(N+LWORK(CGEQP3),N+LWORK(CPOCON), -*> 2*N+LWORK(CGEQRF), N+LWORK(CUNMQR)). -*> -*> 4. If the full SVD is needed: (JOBU.EQ.'U' or JOBU.EQ.'F') and -*> 4.1. if JOBV.EQ.'V' -*> the minimal requirement is LWORK >= 5*N+2*N*N. -*> 4.2. if JOBV.EQ.'J' the minimal requirement is -*> LWORK >= 4*N+N*N. -*> In both cases, the allocated CWORK can accommodate blocked runs -*> of CGEQP3, CGEQRF, CGELQF, CUNMQR, CUNMLQ. -*> -*> If the call to CGEJSV is a workspace query (indicated by LWORK=-1 or -*> LRWORK=-1), then on exit CWORK(1) contains the optimal and CWORK(2) contains the -*> minimal length of CWORK for the job parameters used in the call. -*> \endverbatim -*> -*> \param[out] RWORK -*> \verbatim -*> RWORK is REAL array, dimension (MAX(7,LWORK)) -*> On exit, -*> RWORK(1) = Determines the scaling factor SCALE = RWORK(2) / RWORK(1) -*> such that SCALE*SVA(1:N) are the computed singular values -*> of A. (See the description of SVA().) -*> RWORK(2) = See the description of RWORK(1). -*> RWORK(3) = SCONDA is an estimate for the condition number of -*> column equilibrated A. (If JOBA .EQ. 'E' or 'G') -*> SCONDA is an estimate of SQRT(||(R^* * R)^(-1)||_1). -*> It is computed using SPOCON. It holds -*> N^(-1/4) * SCONDA <= ||R^(-1)||_2 <= N^(1/4) * SCONDA -*> where R is the triangular factor from the QRF of A. -*> However, if R is truncated and the numerical rank is -*> determined to be strictly smaller than N, SCONDA is -*> returned as -1, thus indicating that the smallest -*> singular values might be lost. -*> -*> If full SVD is needed, the following two condition numbers are -*> useful for the analysis of the algorithm. They are provied for -*> a developer/implementer who is familiar with the details of -*> the method. -*> -*> RWORK(4) = an estimate of the scaled condition number of the -*> triangular factor in the first QR factorization. -*> RWORK(5) = an estimate of the scaled condition number of the -*> triangular factor in the second QR factorization. -*> The following two parameters are computed if JOBT .EQ. 'T'. -*> They are provided for a developer/implementer who is familiar -*> with the details of the method. -*> RWORK(6) = the entropy of A^* * A :: this is the Shannon entropy -*> of diag(A^* * A) / Trace(A^* * A) taken as point in the -*> probability simplex. -*> RWORK(7) = the entropy of A * A^*. (See the description of RWORK(6).) -*> If the call to CGEJSV is a workspace query (indicated by LWORK=-1 or -*> LRWORK=-1), then on exit RWORK(1) contains the required length of -*> RWORK for the job parameters used in the call. -*> \endverbatim -*> -*> \param[in] LRWORK -*> \verbatim -*> LRWORK is INTEGER -*> Length of RWORK to confirm proper allocation of workspace. -*> LRWORK depends on the job: -*> -*> 1. If only the singular values are requested i.e. if -*> LSAME(JOBU,'N') .AND. LSAME(JOBV,'N') -*> then: -*> 1.1. If LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G'), -*> then: LRWORK = max( 7, 2 * M ). -*> 1.2. Otherwise, LRWORK = max( 7, N ). -*> 2. If singular values with the right singular vectors are requested -*> i.e. if -*> (LSAME(JOBV,'V').OR.LSAME(JOBV,'J')) .AND. -*> .NOT.(LSAME(JOBU,'U').OR.LSAME(JOBU,'F')) -*> then: -*> 2.1. If LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G'), -*> then LRWORK = max( 7, 2 * M ). -*> 2.2. Otherwise, LRWORK = max( 7, N ). -*> 3. If singular values with the left singular vectors are requested, i.e. if -*> (LSAME(JOBU,'U').OR.LSAME(JOBU,'F')) .AND. -*> .NOT.(LSAME(JOBV,'V').OR.LSAME(JOBV,'J')) -*> then: -*> 3.1. If LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G'), -*> then LRWORK = max( 7, 2 * M ). -*> 3.2. Otherwise, LRWORK = max( 7, N ). -*> 4. If singular values with both the left and the right singular vectors -*> are requested, i.e. if -*> (LSAME(JOBU,'U').OR.LSAME(JOBU,'F')) .AND. -*> (LSAME(JOBV,'V').OR.LSAME(JOBV,'J')) -*> then: -*> 4.1. If LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G'), -*> then LRWORK = max( 7, 2 * M ). -*> 4.2. Otherwise, LRWORK = max( 7, N ). -*> -*> If, on entry, LRWORK = -1 ot LWORK=-1, a workspace query is assumed and -*> the length of RWORK is returned in RWORK(1). -*> \endverbatim -*> -*> \param[out] IWORK -*> \verbatim -*> IWORK is INTEGER array, of dimension at least 4, that further depends -*> on the job: -*> -*> 1. If only the singular values are requested then: -*> If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') ) -*> then the length of IWORK is N+M; otherwise the length of IWORK is N. -*> 2. If the singular values and the right singular vectors are requested then: -*> If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') ) -*> then the length of IWORK is N+M; otherwise the length of IWORK is N. -*> 3. If the singular values and the left singular vectors are requested then: -*> If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') ) -*> then the length of IWORK is N+M; otherwise the length of IWORK is N. -*> 4. If the singular values with both the left and the right singular vectors -*> are requested, then: -*> 4.1. If LSAME(JOBV,'J') the length of IWORK is determined as follows: -*> If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') ) -*> then the length of IWORK is N+M; otherwise the length of IWORK is N. -*> 4.2. If LSAME(JOBV,'V') the length of IWORK is determined as follows: -*> If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') ) -*> then the length of IWORK is 2*N+M; otherwise the length of IWORK is 2*N. -*> -*> On exit, -*> IWORK(1) = the numerical rank determined after the initial -*> QR factorization with pivoting. See the descriptions -*> of JOBA and JOBR. -*> IWORK(2) = the number of the computed nonzero singular values -*> IWORK(3) = if nonzero, a warning message: -*> If IWORK(3).EQ.1 then some of the column norms of A -*> were denormalized floats. The requested high accuracy -*> is not warranted by the data. -*> IWORK(4) = 1 or -1. If IWORK(4) .EQ. 1, then the procedure used A^* to -*> do the job as specified by the JOB parameters. -*> If the call to CGEJSV is a workspace query (indicated by LWORK .EQ. -1 and -*> LRWORK .EQ. -1), then on exit IWORK(1) contains the required length of -*> IWORK for the job parameters used in the call. -*> \endverbatim -*> -*> \param[out] INFO -*> \verbatim -*> INFO is INTEGER -*> < 0 : if INFO = -i, then the i-th argument had an illegal value. -*> = 0 : successful exit; -*> > 0 : CGEJSV did not converge in the maximal allowed number -*> of sweeps. The computed values may be inaccurate. -*> \endverbatim -* -* Authors: -* ======== -* -*> \author Univ. of Tennessee -*> \author Univ. of California Berkeley -*> \author Univ. of Colorado Denver -*> \author NAG Ltd. -* -*> \date June 2016 -* -*> \ingroup complexGEsing -* -*> \par Further Details: -* ===================== -*> -*> \verbatim -*> CGEJSV implements a preconditioned Jacobi SVD algorithm. It uses CGEQP3, -*> CGEQRF, and CGELQF as preprocessors and preconditioners. Optionally, an -*> additional row pivoting can be used as a preprocessor, which in some -*> cases results in much higher accuracy. An example is matrix A with the -*> structure A = D1 * C * D2, where D1, D2 are arbitrarily ill-conditioned -*> diagonal matrices and C is well-conditioned matrix. In that case, complete -*> pivoting in the first QR factorizations provides accuracy dependent on the -*> condition number of C, and independent of D1, D2. Such higher accuracy is -*> not completely understood theoretically, but it works well in practice. -*> Further, if A can be written as A = B*D, with well-conditioned B and some -*> diagonal D, then the high accuracy is guaranteed, both theoretically and -*> in software, independent of D. For more details see [1], [2]. -*> The computational range for the singular values can be the full range -*> ( UNDERFLOW,OVERFLOW ), provided that the machine arithmetic and the BLAS -*> & LAPACK routines called by CGEJSV are implemented to work in that range. -*> If that is not the case, then the restriction for safe computation with -*> the singular values in the range of normalized IEEE numbers is that the -*> spectral condition number kappa(A)=sigma_max(A)/sigma_min(A) does not -*> overflow. This code (CGEJSV) is best used in this restricted range, -*> meaning that singular values of magnitude below ||A||_2 / SLAMCH('O') are -*> returned as zeros. See JOBR for details on this. -*> Further, this implementation is somewhat slower than the one described -*> in [1,2] due to replacement of some non-LAPACK components, and because -*> the choice of some tuning parameters in the iterative part (CGESVJ) is -*> left to the implementer on a particular machine. -*> The rank revealing QR factorization (in this code: CGEQP3) should be -*> implemented as in [3]. We have a new version of CGEQP3 under development -*> that is more robust than the current one in LAPACK, with a cleaner cut in -*> rank deficient cases. It will be available in the SIGMA library [4]. -*> If M is much larger than N, it is obvious that the initial QRF with -*> column pivoting can be preprocessed by the QRF without pivoting. That -*> well known trick is not used in CGEJSV because in some cases heavy row -*> weighting can be treated with complete pivoting. The overhead in cases -*> M much larger than N is then only due to pivoting, but the benefits in -*> terms of accuracy have prevailed. The implementer/user can incorporate -*> this extra QRF step easily. The implementer can also improve data movement -*> (matrix transpose, matrix copy, matrix transposed copy) - this -*> implementation of CGEJSV uses only the simplest, naive data movement. -*> \endverbatim -* -*> \par Contributor: -* ================== -*> -*> Zlatko Drmac (Zagreb, Croatia) -* -*> \par References: -* ================ -*> -*> \verbatim -*> -*> [1] Z. Drmac and K. Veselic: New fast and accurate Jacobi SVD algorithm I. -*> SIAM J. Matrix Anal. Appl. Vol. 35, No. 2 (2008), pp. 1322-1342. -*> LAPACK Working note 169. -*> [2] Z. Drmac and K. Veselic: New fast and accurate Jacobi SVD algorithm II. -*> SIAM J. Matrix Anal. Appl. Vol. 35, No. 2 (2008), pp. 1343-1362. -*> LAPACK Working note 170. -*> [3] Z. Drmac and Z. Bujanovic: On the failure of rank-revealing QR -*> factorization software - a case study. -*> ACM Trans. Math. Softw. Vol. 35, No 2 (2008), pp. 1-28. -*> LAPACK Working note 176. -*> [4] Z. Drmac: SIGMA - mathematical software library for accurate SVD, PSV, -*> QSVD, (H,K)-SVD computations. -*> Department of Mathematics, University of Zagreb, 2008, 2016. -*> \endverbatim -* -*> \par Bugs, examples and comments: -* ================================= -*> -*> Please report all bugs and send interesting examples and/or comments to -*> drmac@math.hr. Thank you. -*> -* ===================================================================== - SUBROUTINE CGEJSV( JOBA, JOBU, JOBV, JOBR, JOBT, JOBP, - $ M, N, A, LDA, SVA, U, LDU, V, LDV, - $ CWORK, LWORK, RWORK, LRWORK, IWORK, INFO ) -* -* -- LAPACK computational routine (version 3.7.0) -- -* -- LAPACK is a software package provided by Univ. of Tennessee, -- -* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 -* -* .. Scalar Arguments .. - IMPLICIT NONE - INTEGER INFO, LDA, LDU, LDV, LWORK, LRWORK, M, N -* .. -* .. Array Arguments .. - COMPLEX A( LDA, * ), U( LDU, * ), V( LDV, * ), CWORK( LWORK ) - REAL SVA( N ), RWORK( LRWORK ) - INTEGER IWORK( * ) - CHARACTER*1 JOBA, JOBP, JOBR, JOBT, JOBU, JOBV -* .. -* -* =========================================================================== -* -* .. Local Parameters .. - REAL ZERO, ONE - PARAMETER ( ZERO = 0.0E0, ONE = 1.0E0 ) - COMPLEX CZERO, CONE - PARAMETER ( CZERO = ( 0.0E0, 0.0E0 ), CONE = ( 1.0E0, 0.0E0 ) ) -* .. -* .. Local Scalars .. - COMPLEX CTEMP - REAL AAPP, AAQQ, AATMAX, AATMIN, BIG, BIG1, COND_OK, - $ CONDR1, CONDR2, ENTRA, ENTRAT, EPSLN, MAXPRJ, SCALEM, - $ SCONDA, SFMIN, SMALL, TEMP1, USCAL1, USCAL2, XSC - INTEGER IERR, N1, NR, NUMRANK, p, q, WARNING - LOGICAL ALMORT, DEFR, ERREST, GOSCAL, JRACC, KILL, LQUERY, - $ LSVEC, L2ABER, L2KILL, L2PERT, L2RANK, L2TRAN, NOSCAL, - $ ROWPIV, RSVEC, TRANSP -* - INTEGER OPTWRK, MINWRK, MINRWRK, MINIWRK - INTEGER LWCON, LWLQF, LWQP3, LWQRF, LWUNMLQ, LWUNMQR, LWUNMQRM, - $ LWSVDJ, LWSVDJV, LRWQP3, LRWCON, LRWSVDJ, IWOFF - INTEGER LWRK_CGELQF, LWRK_CGEQP3, LWRK_CGEQP3N, LWRK_CGEQRF, - $ LWRK_CGESVJ, LWRK_CGESVJV, LWRK_CGESVJU, LWRK_CUNMLQ, - $ LWRK_CUNMQR, LWRK_CUNMQRM -* .. -* .. Local Arrays - COMPLEX CDUMMY(1) - REAL RDUMMY(1) -* -* .. Intrinsic Functions .. - INTRINSIC ABS, CMPLX, CONJG, ALOG, MAX, MIN, REAL, NINT, SQRT -* .. -* .. External Functions .. - REAL SLAMCH, SCNRM2 - INTEGER ISAMAX, ICAMAX - LOGICAL LSAME - EXTERNAL ISAMAX, ICAMAX, LSAME, SLAMCH, SCNRM2 -* .. -* .. External Subroutines .. - EXTERNAL SLASSQ, CCOPY, CGELQF, CGEQP3, CGEQRF, CLACPY, CLAPMR, - $ CLASCL, SLASCL, CLASET, CLASSQ, CLASWP, CUNGQR, CUNMLQ, - $ CUNMQR, CPOCON, SSCAL, CSSCAL, CSWAP, CTRSM, CLACGV, - $ XERBLA -* - EXTERNAL CGESVJ -* .. -* -* Test the input arguments -* - LSVEC = LSAME( JOBU, 'U' ) .OR. LSAME( JOBU, 'F' ) - JRACC = LSAME( JOBV, 'J' ) - RSVEC = LSAME( JOBV, 'V' ) .OR. JRACC - ROWPIV = LSAME( JOBA, 'F' ) .OR. LSAME( JOBA, 'G' ) - L2RANK = LSAME( JOBA, 'R' ) - L2ABER = LSAME( JOBA, 'A' ) - ERREST = LSAME( JOBA, 'E' ) .OR. LSAME( JOBA, 'G' ) - L2TRAN = LSAME( JOBT, 'T' ) .AND. ( M .EQ. N ) - L2KILL = LSAME( JOBR, 'R' ) - DEFR = LSAME( JOBR, 'N' ) - L2PERT = LSAME( JOBP, 'P' ) -* - LQUERY = ( LWORK .EQ. -1 ) .OR. ( LRWORK .EQ. -1 ) -* - IF ( .NOT.(ROWPIV .OR. L2RANK .OR. L2ABER .OR. - $ ERREST .OR. LSAME( JOBA, 'C' ) )) THEN - INFO = - 1 - ELSE IF ( .NOT.( LSVEC .OR. LSAME( JOBU, 'N' ) .OR. - $ ( LSAME( JOBU, 'W' ) .AND. RSVEC .AND. L2TRAN ) ) ) THEN - INFO = - 2 - ELSE IF ( .NOT.( RSVEC .OR. LSAME( JOBV, 'N' ) .OR. - $ ( LSAME( JOBV, 'W' ) .AND. LSVEC .AND. L2TRAN ) ) ) THEN - INFO = - 3 - ELSE IF ( .NOT. ( L2KILL .OR. DEFR ) ) THEN - INFO = - 4 - ELSE IF ( .NOT. ( LSAME(JOBT,'T') .OR. LSAME(JOBT,'N') ) ) THEN - INFO = - 5 - ELSE IF ( .NOT. ( L2PERT .OR. LSAME( JOBP, 'N' ) ) ) THEN - INFO = - 6 - ELSE IF ( M .LT. 0 ) THEN - INFO = - 7 - ELSE IF ( ( N .LT. 0 ) .OR. ( N .GT. M ) ) THEN - INFO = - 8 - ELSE IF ( LDA .LT. M ) THEN - INFO = - 10 - ELSE IF ( LSVEC .AND. ( LDU .LT. M ) ) THEN - INFO = - 13 - ELSE IF ( RSVEC .AND. ( LDV .LT. N ) ) THEN - INFO = - 15 - ELSE -* #:) - INFO = 0 - END IF -* - IF ( INFO .EQ. 0 ) THEN -* .. compute the minimal and the optimal workspace lengths -* [[The expressions for computing the minimal and the optimal -* values of LCWORK, LRWORK are written with a lot of redundancy and -* can be simplified. However, this verbose form is useful for -* maintenance and modifications of the code.]] -* -* .. minimal workspace length for CGEQP3 of an M x N matrix, -* CGEQRF of an N x N matrix, CGELQF of an N x N matrix, -* CUNMLQ for computing N x N matrix, CUNMQR for computing N x N -* matrix, CUNMQR for computing M x N matrix, respectively. - LWQP3 = N+1 - LWQRF = MAX( 1, N ) - LWLQF = MAX( 1, N ) - LWUNMLQ = MAX( 1, N ) - LWUNMQR = MAX( 1, N ) - LWUNMQRM = MAX( 1, M ) -* .. minimal workspace length for CPOCON of an N x N matrix - LWCON = 2 * N -* .. minimal workspace length for CGESVJ of an N x N matrix, -* without and with explicit accumulation of Jacobi rotations - LWSVDJ = MAX( 2 * N, 1 ) - LWSVDJV = MAX( 2 * N, 1 ) -* .. minimal REAL workspace length for CGEQP3, CPOCON, CGESVJ - LRWQP3 = N - LRWCON = N - LRWSVDJ = N - IF ( LQUERY ) THEN - CALL CGEQP3( M, N, A, LDA, IWORK, CDUMMY, CDUMMY, -1, - $ RDUMMY, IERR ) - LWRK_CGEQP3 = CDUMMY(1) - CALL CGEQRF( N, N, A, LDA, CDUMMY, CDUMMY,-1, IERR ) - LWRK_CGEQRF = CDUMMY(1) - CALL CGELQF( N, N, A, LDA, CDUMMY, CDUMMY,-1, IERR ) - LWRK_CGELQF = CDUMMY(1) - END IF - MINWRK = 2 - OPTWRK = 2 - MINIWRK = N - IF ( .NOT. (LSVEC .OR. RSVEC ) ) THEN -* .. minimal and optimal sizes of the complex workspace if -* only the singular values are requested - IF ( ERREST ) THEN - MINWRK = MAX( N+LWQP3, N**2+LWCON, N+LWQRF, LWSVDJ ) - ELSE - MINWRK = MAX( N+LWQP3, N+LWQRF, LWSVDJ ) - END IF - IF ( LQUERY ) THEN - CALL CGESVJ( 'L', 'N', 'N', N, N, A, LDA, SVA, N, V, - $ LDV, CDUMMY, -1, RDUMMY, -1, IERR ) - LWRK_CGESVJ = CDUMMY(1) - IF ( ERREST ) THEN - OPTWRK = MAX( N+LWRK_CGEQP3, N**2+LWCON, - $ N+LWRK_CGEQRF, LWRK_CGESVJ ) - ELSE - OPTWRK = MAX( N+LWRK_CGEQP3, N+LWRK_CGEQRF, - $ LWRK_CGESVJ ) - END IF - END IF - IF ( L2TRAN .OR. ROWPIV ) THEN - IF ( ERREST ) THEN - MINRWRK = MAX( 7, 2*M, LRWQP3, LRWCON, LRWSVDJ ) - ELSE - MINRWRK = MAX( 7, 2*M, LRWQP3, LRWSVDJ ) - END IF - ELSE - IF ( ERREST ) THEN - MINRWRK = MAX( 7, LRWQP3, LRWCON, LRWSVDJ ) - ELSE - MINRWRK = MAX( 7, LRWQP3, LRWSVDJ ) - END IF - END IF - IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M - ELSE IF ( RSVEC .AND. (.NOT.LSVEC) ) THEN -* .. minimal and optimal sizes of the complex workspace if the -* singular values and the right singular vectors are requested - IF ( ERREST ) THEN - MINWRK = MAX( N+LWQP3, LWCON, LWSVDJ, N+LWLQF, - $ 2*N+LWQRF, N+LWSVDJ, N+LWUNMLQ ) - ELSE - MINWRK = MAX( N+LWQP3, LWSVDJ, N+LWLQF, 2*N+LWQRF, - $ N+LWSVDJ, N+LWUNMLQ ) - END IF - IF ( LQUERY ) THEN - CALL CGESVJ( 'L', 'U', 'N', N,N, U, LDU, SVA, N, A, - $ LDA, CDUMMY, -1, RDUMMY, -1, IERR ) - LWRK_CGESVJ = CDUMMY(1) - CALL CUNMLQ( 'L', 'C', N, N, N, A, LDA, CDUMMY, - $ V, LDV, CDUMMY, -1, IERR ) - LWRK_CUNMLQ = CDUMMY(1) - IF ( ERREST ) THEN - OPTWRK = MAX( N+LWRK_CGEQP3, LWCON, LWRK_CGESVJ, - $ N+LWRK_CGELQF, 2*N+LWRK_CGEQRF, - $ N+LWRK_CGESVJ, N+LWRK_CUNMLQ ) - ELSE - OPTWRK = MAX( N+LWRK_CGEQP3, LWRK_CGESVJ,N+LWRK_CGELQF, - $ 2*N+LWRK_CGEQRF, N+LWRK_CGESVJ, - $ N+LWRK_CUNMLQ ) - END IF - END IF - IF ( L2TRAN .OR. ROWPIV ) THEN - IF ( ERREST ) THEN - MINRWRK = MAX( 7, 2*M, LRWQP3, LRWSVDJ, LRWCON ) - ELSE - MINRWRK = MAX( 7, 2*M, LRWQP3, LRWSVDJ ) - END IF - ELSE - IF ( ERREST ) THEN - MINRWRK = MAX( 7, LRWQP3, LRWSVDJ, LRWCON ) - ELSE - MINRWRK = MAX( 7, LRWQP3, LRWSVDJ ) - END IF - END IF - IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M - ELSE IF ( LSVEC .AND. (.NOT.RSVEC) ) THEN -* .. minimal and optimal sizes of the complex workspace if the -* singular values and the left singular vectors are requested - IF ( ERREST ) THEN - MINWRK = N + MAX( LWQP3,LWCON,N+LWQRF,LWSVDJ,LWUNMQRM ) - ELSE - MINWRK = N + MAX( LWQP3, N+LWQRF, LWSVDJ, LWUNMQRM ) - END IF - IF ( LQUERY ) THEN - CALL CGESVJ( 'L', 'U', 'N', N,N, U, LDU, SVA, N, A, - $ LDA, CDUMMY, -1, RDUMMY, -1, IERR ) - LWRK_CGESVJ = CDUMMY(1) - CALL CUNMQR( 'L', 'N', M, N, N, A, LDA, CDUMMY, U, - $ LDU, CDUMMY, -1, IERR ) - LWRK_CUNMQRM = CDUMMY(1) - IF ( ERREST ) THEN - OPTWRK = N + MAX( LWRK_CGEQP3, LWCON, N+LWRK_CGEQRF, - $ LWRK_CGESVJ, LWRK_CUNMQRM ) - ELSE - OPTWRK = N + MAX( LWRK_CGEQP3, N+LWRK_CGEQRF, - $ LWRK_CGESVJ, LWRK_CUNMQRM ) - END IF - END IF - IF ( L2TRAN .OR. ROWPIV ) THEN - IF ( ERREST ) THEN - MINRWRK = MAX( 7, 2*M, LRWQP3, LRWSVDJ, LRWCON ) - ELSE - MINRWRK = MAX( 7, 2*M, LRWQP3, LRWSVDJ ) - END IF - ELSE - IF ( ERREST ) THEN - MINRWRK = MAX( 7, LRWQP3, LRWSVDJ, LRWCON ) - ELSE - MINRWRK = MAX( 7, LRWQP3, LRWSVDJ ) - END IF - END IF - IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M - ELSE -* .. minimal and optimal sizes of the complex workspace if the -* full SVD is requested - IF ( .NOT. JRACC ) THEN - IF ( ERREST ) THEN - MINWRK = MAX( N+LWQP3, N+LWCON, 2*N+N**2+LWCON, - $ 2*N+LWQRF, 2*N+LWQP3, - $ 2*N+N**2+N+LWLQF, 2*N+N**2+N+N**2+LWCON, - $ 2*N+N**2+N+LWSVDJ, 2*N+N**2+N+LWSVDJV, - $ 2*N+N**2+N+LWUNMQR,2*N+N**2+N+LWUNMLQ, - $ N+N**2+LWSVDJ, N+LWUNMQRM ) - ELSE - MINWRK = MAX( N+LWQP3, 2*N+N**2+LWCON, - $ 2*N+LWQRF, 2*N+LWQP3, - $ 2*N+N**2+N+LWLQF, 2*N+N**2+N+N**2+LWCON, - $ 2*N+N**2+N+LWSVDJ, 2*N+N**2+N+LWSVDJV, - $ 2*N+N**2+N+LWUNMQR,2*N+N**2+N+LWUNMLQ, - $ N+N**2+LWSVDJ, N+LWUNMQRM ) - END IF - MINIWRK = MINIWRK + N - IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M - ELSE - IF ( ERREST ) THEN - MINWRK = MAX( N+LWQP3, N+LWCON, 2*N+LWQRF, - $ 2*N+N**2+LWSVDJV, 2*N+N**2+N+LWUNMQR, - $ N+LWUNMQRM ) - ELSE - MINWRK = MAX( N+LWQP3, 2*N+LWQRF, - $ 2*N+N**2+LWSVDJV, 2*N+N**2+N+LWUNMQR, - $ N+LWUNMQRM ) - END IF - IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M - END IF - IF ( LQUERY ) THEN - CALL CUNMQR( 'L', 'N', M, N, N, A, LDA, CDUMMY, U, - $ LDU, CDUMMY, -1, IERR ) - LWRK_CUNMQRM = CDUMMY(1) - CALL CUNMQR( 'L', 'N', N, N, N, A, LDA, CDUMMY, U, - $ LDU, CDUMMY, -1, IERR ) - LWRK_CUNMQR = CDUMMY(1) - IF ( .NOT. JRACC ) THEN - CALL CGEQP3( N,N, A, LDA, IWORK, CDUMMY,CDUMMY, -1, - $ RDUMMY, IERR ) - LWRK_CGEQP3N = CDUMMY(1) - CALL CGESVJ( 'L', 'U', 'N', N, N, U, LDU, SVA, - $ N, V, LDV, CDUMMY, -1, RDUMMY, -1, IERR ) - LWRK_CGESVJ = CDUMMY(1) - CALL CGESVJ( 'U', 'U', 'N', N, N, U, LDU, SVA, - $ N, V, LDV, CDUMMY, -1, RDUMMY, -1, IERR ) - LWRK_CGESVJU = CDUMMY(1) - CALL CGESVJ( 'L', 'U', 'V', N, N, U, LDU, SVA, - $ N, V, LDV, CDUMMY, -1, RDUMMY, -1, IERR ) - LWRK_CGESVJV = CDUMMY(1) - CALL CUNMLQ( 'L', 'C', N, N, N, A, LDA, CDUMMY, - $ V, LDV, CDUMMY, -1, IERR ) - LWRK_CUNMLQ = CDUMMY(1) - IF ( ERREST ) THEN - OPTWRK = MAX( N+LWRK_CGEQP3, N+LWCON, - $ 2*N+N**2+LWCON, 2*N+LWRK_CGEQRF, - $ 2*N+LWRK_CGEQP3N, - $ 2*N+N**2+N+LWRK_CGELQF, - $ 2*N+N**2+N+N**2+LWCON, - $ 2*N+N**2+N+LWRK_CGESVJ, - $ 2*N+N**2+N+LWRK_CGESVJV, - $ 2*N+N**2+N+LWRK_CUNMQR, - $ 2*N+N**2+N+LWRK_CUNMLQ, - $ N+N**2+LWRK_CGESVJU, - $ N+LWRK_CUNMQRM ) - ELSE - OPTWRK = MAX( N+LWRK_CGEQP3, - $ 2*N+N**2+LWCON, 2*N+LWRK_CGEQRF, - $ 2*N+LWRK_CGEQP3N, - $ 2*N+N**2+N+LWRK_CGELQF, - $ 2*N+N**2+N+N**2+LWCON, - $ 2*N+N**2+N+LWRK_CGESVJ, - $ 2*N+N**2+N+LWRK_CGESVJV, - $ 2*N+N**2+N+LWRK_CUNMQR, - $ 2*N+N**2+N+LWRK_CUNMLQ, - $ N+N**2+LWRK_CGESVJU, - $ N+LWRK_CUNMQRM ) - END IF - ELSE - CALL CGESVJ( 'L', 'U', 'V', N, N, U, LDU, SVA, - $ N, V, LDV, CDUMMY, -1, RDUMMY, -1, IERR ) - LWRK_CGESVJV = CDUMMY(1) - CALL CUNMQR( 'L', 'N', N, N, N, CDUMMY, N, CDUMMY, - $ V, LDV, CDUMMY, -1, IERR ) - LWRK_CUNMQR = CDUMMY(1) - CALL CUNMQR( 'L', 'N', M, N, N, A, LDA, CDUMMY, U, - $ LDU, CDUMMY, -1, IERR ) - LWRK_CUNMQRM = CDUMMY(1) - IF ( ERREST ) THEN - OPTWRK = MAX( N+LWRK_CGEQP3, N+LWCON, - $ 2*N+LWRK_CGEQRF, 2*N+N**2, - $ 2*N+N**2+LWRK_CGESVJV, - $ 2*N+N**2+N+LWRK_CUNMQR,N+LWRK_CUNMQRM ) - ELSE - OPTWRK = MAX( N+LWRK_CGEQP3, 2*N+LWRK_CGEQRF, - $ 2*N+N**2, 2*N+N**2+LWRK_CGESVJV, - $ 2*N+N**2+N+LWRK_CUNMQR, - $ N+LWRK_CUNMQRM ) - END IF - END IF - END IF - IF ( L2TRAN .OR. ROWPIV ) THEN - MINRWRK = MAX( 7, 2*M, LRWQP3, LRWSVDJ, LRWCON ) - ELSE - MINRWRK = MAX( 7, LRWQP3, LRWSVDJ, LRWCON ) - END IF - END IF - MINWRK = MAX( 2, MINWRK ) - OPTWRK = MAX( 2, OPTWRK ) - IF ( LWORK .LT. MINWRK .AND. (.NOT.LQUERY) ) INFO = - 17 - IF ( LRWORK .LT. MINRWRK .AND. (.NOT.LQUERY) ) INFO = - 19 - END IF -* - IF ( INFO .NE. 0 ) THEN -* #:( - CALL XERBLA( 'CGEJSV', - INFO ) - RETURN - ELSE IF ( LQUERY ) THEN - CWORK(1) = OPTWRK - CWORK(2) = MINWRK - RWORK(1) = MINRWRK - IWORK(1) = MAX( 4, MINIWRK ) - RETURN - END IF -* -* Quick return for void matrix (Y3K safe) -* #:) - IF ( ( M .EQ. 0 ) .OR. ( N .EQ. 0 ) ) THEN - IWORK(1:4) = 0 - RWORK(1:7) = 0 - RETURN - ENDIF -* -* Determine whether the matrix U should be M x N or M x M -* - IF ( LSVEC ) THEN - N1 = N - IF ( LSAME( JOBU, 'F' ) ) N1 = M - END IF -* -* Set numerical parameters -* -*! NOTE: Make sure SLAMCH() does not fail on the target architecture. -* - EPSLN = SLAMCH('Epsilon') - SFMIN = SLAMCH('SafeMinimum') - SMALL = SFMIN / EPSLN - BIG = SLAMCH('O') -* BIG = ONE / SFMIN -* -* Initialize SVA(1:N) = diag( ||A e_i||_2 )_1^N -* -*(!) If necessary, scale SVA() to protect the largest norm from -* overflow. It is possible that this scaling pushes the smallest -* column norm left from the underflow threshold (extreme case). -* - SCALEM = ONE / SQRT(REAL(M)*REAL(N)) - NOSCAL = .TRUE. - GOSCAL = .TRUE. - DO 1874 p = 1, N - AAPP = ZERO - AAQQ = ONE - CALL CLASSQ( M, A(1,p), 1, AAPP, AAQQ ) - IF ( AAPP .GT. BIG ) THEN - INFO = - 9 - CALL XERBLA( 'CGEJSV', -INFO ) - RETURN - END IF - AAQQ = SQRT(AAQQ) - IF ( ( AAPP .LT. (BIG / AAQQ) ) .AND. NOSCAL ) THEN - SVA(p) = AAPP * AAQQ - ELSE - NOSCAL = .FALSE. - SVA(p) = AAPP * ( AAQQ * SCALEM ) - IF ( GOSCAL ) THEN - GOSCAL = .FALSE. - CALL SSCAL( p-1, SCALEM, SVA, 1 ) - END IF - END IF - 1874 CONTINUE -* - IF ( NOSCAL ) SCALEM = ONE -* - AAPP = ZERO - AAQQ = BIG - DO 4781 p = 1, N - AAPP = MAX( AAPP, SVA(p) ) - IF ( SVA(p) .NE. ZERO ) AAQQ = MIN( AAQQ, SVA(p) ) - 4781 CONTINUE -* -* Quick return for zero M x N matrix -* #:) - IF ( AAPP .EQ. ZERO ) THEN - IF ( LSVEC ) CALL CLASET( 'G', M, N1, CZERO, CONE, U, LDU ) - IF ( RSVEC ) CALL CLASET( 'G', N, N, CZERO, CONE, V, LDV ) - RWORK(1) = ONE - RWORK(2) = ONE - IF ( ERREST ) RWORK(3) = ONE - IF ( LSVEC .AND. RSVEC ) THEN - RWORK(4) = ONE - RWORK(5) = ONE - END IF - IF ( L2TRAN ) THEN - RWORK(6) = ZERO - RWORK(7) = ZERO - END IF - IWORK(1) = 0 - IWORK(2) = 0 - IWORK(3) = 0 - IWORK(4) = -1 - RETURN - END IF -* -* Issue warning if denormalized column norms detected. Override the -* high relative accuracy request. Issue licence to kill nonzero columns -* (set them to zero) whose norm is less than sigma_max / BIG (roughly). -* #:( - WARNING = 0 - IF ( AAQQ .LE. SFMIN ) THEN - L2RANK = .TRUE. - L2KILL = .TRUE. - WARNING = 1 - END IF -* -* Quick return for one-column matrix -* #:) - IF ( N .EQ. 1 ) THEN -* - IF ( LSVEC ) THEN - CALL CLASCL( 'G',0,0,SVA(1),SCALEM, M,1,A(1,1),LDA,IERR ) - CALL CLACPY( 'A', M, 1, A, LDA, U, LDU ) -* computing all M left singular vectors of the M x 1 matrix - IF ( N1 .NE. N ) THEN - CALL CGEQRF( M, N, U,LDU, CWORK, CWORK(N+1),LWORK-N,IERR ) - CALL CUNGQR( M,N1,1, U,LDU,CWORK,CWORK(N+1),LWORK-N,IERR ) - CALL CCOPY( M, A(1,1), 1, U(1,1), 1 ) - END IF - END IF - IF ( RSVEC ) THEN - V(1,1) = CONE - END IF - IF ( SVA(1) .LT. (BIG*SCALEM) ) THEN - SVA(1) = SVA(1) / SCALEM - SCALEM = ONE - END IF - RWORK(1) = ONE / SCALEM - RWORK(2) = ONE - IF ( SVA(1) .NE. ZERO ) THEN - IWORK(1) = 1 - IF ( ( SVA(1) / SCALEM) .GE. SFMIN ) THEN - IWORK(2) = 1 - ELSE - IWORK(2) = 0 - END IF - ELSE - IWORK(1) = 0 - IWORK(2) = 0 - END IF - IWORK(3) = 0 - IWORK(4) = -1 - IF ( ERREST ) RWORK(3) = ONE - IF ( LSVEC .AND. RSVEC ) THEN - RWORK(4) = ONE - RWORK(5) = ONE - END IF - IF ( L2TRAN ) THEN - RWORK(6) = ZERO - RWORK(7) = ZERO - END IF - RETURN -* - END IF -* - TRANSP = .FALSE. -* - AATMAX = -ONE - AATMIN = BIG - IF ( ROWPIV .OR. L2TRAN ) THEN -* -* Compute the row norms, needed to determine row pivoting sequence -* (in the case of heavily row weighted A, row pivoting is strongly -* advised) and to collect information needed to compare the -* structures of A * A^* and A^* * A (in the case L2TRAN.EQ..TRUE.). -* - IF ( L2TRAN ) THEN - DO 1950 p = 1, M - XSC = ZERO - TEMP1 = ONE - CALL CLASSQ( N, A(p,1), LDA, XSC, TEMP1 ) -* CLASSQ gets both the ell_2 and the ell_infinity norm -* in one pass through the vector - RWORK(M+p) = XSC * SCALEM - RWORK(p) = XSC * (SCALEM*SQRT(TEMP1)) - AATMAX = MAX( AATMAX, RWORK(p) ) - IF (RWORK(p) .NE. ZERO) - $ AATMIN = MIN(AATMIN,RWORK(p)) - 1950 CONTINUE - ELSE - DO 1904 p = 1, M - RWORK(M+p) = SCALEM*ABS( A(p,ICAMAX(N,A(p,1),LDA)) ) - AATMAX = MAX( AATMAX, RWORK(M+p) ) - AATMIN = MIN( AATMIN, RWORK(M+p) ) - 1904 CONTINUE - END IF -* - END IF -* -* For square matrix A try to determine whether A^* would be better -* input for the preconditioned Jacobi SVD, with faster convergence. -* The decision is based on an O(N) function of the vector of column -* and row norms of A, based on the Shannon entropy. This should give -* the right choice in most cases when the difference actually matters. -* It may fail and pick the slower converging side. -* - ENTRA = ZERO - ENTRAT = ZERO - IF ( L2TRAN ) THEN -* - XSC = ZERO - TEMP1 = ONE - CALL SLASSQ( N, SVA, 1, XSC, TEMP1 ) - TEMP1 = ONE / TEMP1 -* - ENTRA = ZERO - DO 1113 p = 1, N - BIG1 = ( ( SVA(p) / XSC )**2 ) * TEMP1 - IF ( BIG1 .NE. ZERO ) ENTRA = ENTRA + BIG1 * ALOG(BIG1) - 1113 CONTINUE - ENTRA = - ENTRA / ALOG(REAL(N)) -* -* Now, SVA().^2/Trace(A^* * A) is a point in the probability simplex. -* It is derived from the diagonal of A^* * A. Do the same with the -* diagonal of A * A^*, compute the entropy of the corresponding -* probability distribution. Note that A * A^* and A^* * A have the -* same trace. -* - ENTRAT = ZERO - DO 1114 p = 1, M - BIG1 = ( ( RWORK(p) / XSC )**2 ) * TEMP1 - IF ( BIG1 .NE. ZERO ) ENTRAT = ENTRAT + BIG1 * ALOG(BIG1) - 1114 CONTINUE - ENTRAT = - ENTRAT / ALOG(REAL(M)) -* -* Analyze the entropies and decide A or A^*. Smaller entropy -* usually means better input for the algorithm. -* - TRANSP = ( ENTRAT .LT. ENTRA ) -* -* If A^* is better than A, take the adjoint of A. This is allowed -* only for square matrices, M=N. - IF ( TRANSP ) THEN -* In an optimal implementation, this trivial transpose -* should be replaced with faster transpose. - DO 1115 p = 1, N - 1 - A(p,p) = CONJG(A(p,p)) - DO 1116 q = p + 1, N - CTEMP = CONJG(A(q,p)) - A(q,p) = CONJG(A(p,q)) - A(p,q) = CTEMP - 1116 CONTINUE - 1115 CONTINUE - A(N,N) = CONJG(A(N,N)) - DO 1117 p = 1, N - RWORK(M+p) = SVA(p) - SVA(p) = RWORK(p) -* previously computed row 2-norms are now column 2-norms -* of the transposed matrix - 1117 CONTINUE - TEMP1 = AAPP - AAPP = AATMAX - AATMAX = TEMP1 - TEMP1 = AAQQ - AAQQ = AATMIN - AATMIN = TEMP1 - KILL = LSVEC - LSVEC = RSVEC - RSVEC = KILL - IF ( LSVEC ) N1 = N -* - ROWPIV = .TRUE. - END IF -* - END IF -* END IF L2TRAN -* -* Scale the matrix so that its maximal singular value remains less -* than SQRT(BIG) -- the matrix is scaled so that its maximal column -* has Euclidean norm equal to SQRT(BIG/N). The only reason to keep -* SQRT(BIG) instead of BIG is the fact that CGEJSV uses LAPACK and -* BLAS routines that, in some implementations, are not capable of -* working in the full interval [SFMIN,BIG] and that they may provoke -* overflows in the intermediate results. If the singular values spread -* from SFMIN to BIG, then CGESVJ will compute them. So, in that case, -* one should use CGESVJ instead of CGEJSV. - BIG1 = SQRT( BIG ) - TEMP1 = SQRT( BIG / REAL(N) ) -* >> for future updates: allow bigger range, i.e. the largest column -* will be allowed up to BIG/N and CGESVJ will do the rest. However, for -* this all other (LAPACK) components must allow such a range. -* TEMP1 = BIG/REAL(N) -* TEMP1 = BIG * EPSLN this should 'almost' work with current LAPACK components - CALL SLASCL( 'G', 0, 0, AAPP, TEMP1, N, 1, SVA, N, IERR ) - IF ( AAQQ .GT. (AAPP * SFMIN) ) THEN - AAQQ = ( AAQQ / AAPP ) * TEMP1 - ELSE - AAQQ = ( AAQQ * TEMP1 ) / AAPP - END IF - TEMP1 = TEMP1 * SCALEM - CALL CLASCL( 'G', 0, 0, AAPP, TEMP1, M, N, A, LDA, IERR ) -* -* To undo scaling at the end of this procedure, multiply the -* computed singular values with USCAL2 / USCAL1. -* - USCAL1 = TEMP1 - USCAL2 = AAPP -* - IF ( L2KILL ) THEN -* L2KILL enforces computation of nonzero singular values in -* the restricted range of condition number of the initial A, -* sigma_max(A) / sigma_min(A) approx. SQRT(BIG)/SQRT(SFMIN). - XSC = SQRT( SFMIN ) - ELSE - XSC = SMALL -* -* Now, if the condition number of A is too big, -* sigma_max(A) / sigma_min(A) .GT. SQRT(BIG/N) * EPSLN / SFMIN, -* as a precaution measure, the full SVD is computed using CGESVJ -* with accumulated Jacobi rotations. This provides numerically -* more robust computation, at the cost of slightly increased run -* time. Depending on the concrete implementation of BLAS and LAPACK -* (i.e. how they behave in presence of extreme ill-conditioning) the -* implementor may decide to remove this switch. - IF ( ( AAQQ.LT.SQRT(SFMIN) ) .AND. LSVEC .AND. RSVEC ) THEN - JRACC = .TRUE. - END IF -* - END IF - IF ( AAQQ .LT. XSC ) THEN - DO 700 p = 1, N - IF ( SVA(p) .LT. XSC ) THEN - CALL CLASET( 'A', M, 1, CZERO, CZERO, A(1,p), LDA ) - SVA(p) = ZERO - END IF - 700 CONTINUE - END IF -* -* Preconditioning using QR factorization with pivoting -* - IF ( ROWPIV ) THEN -* Optional row permutation (Bjoerck row pivoting): -* A result by Cox and Higham shows that the Bjoerck's -* row pivoting combined with standard column pivoting -* has similar effect as Powell-Reid complete pivoting. -* The ell-infinity norms of A are made nonincreasing. - IF ( ( LSVEC .AND. RSVEC ) .AND. .NOT.( JRACC ) ) THEN - IWOFF = 2*N - ELSE - IWOFF = N - END IF - DO 1952 p = 1, M - 1 - q = ISAMAX( M-p+1, RWORK(M+p), 1 ) + p - 1 - IWORK(IWOFF+p) = q - IF ( p .NE. q ) THEN - TEMP1 = RWORK(M+p) - RWORK(M+p) = RWORK(M+q) - RWORK(M+q) = TEMP1 - END IF - 1952 CONTINUE - CALL CLASWP( N, A, LDA, 1, M-1, IWORK(IWOFF+1), 1 ) - END IF -* -* End of the preparation phase (scaling, optional sorting and -* transposing, optional flushing of small columns). -* -* Preconditioning -* -* If the full SVD is needed, the right singular vectors are computed -* from a matrix equation, and for that we need theoretical analysis -* of the Businger-Golub pivoting. So we use CGEQP3 as the first RR QRF. -* In all other cases the first RR QRF can be chosen by other criteria -* (eg speed by replacing global with restricted window pivoting, such -* as in xGEQPX from TOMS # 782). Good results will be obtained using -* xGEQPX with properly (!) chosen numerical parameters. -* Any improvement of CGEQP3 improves overal performance of CGEJSV. -* -* A * P1 = Q1 * [ R1^* 0]^*: - DO 1963 p = 1, N -* .. all columns are free columns - IWORK(p) = 0 - 1963 CONTINUE - CALL CGEQP3( M, N, A, LDA, IWORK, CWORK, CWORK(N+1), LWORK-N, - $ RWORK, IERR ) -* -* The upper triangular matrix R1 from the first QRF is inspected for -* rank deficiency and possibilities for deflation, or possible -* ill-conditioning. Depending on the user specified flag L2RANK, -* the procedure explores possibilities to reduce the numerical -* rank by inspecting the computed upper triangular factor. If -* L2RANK or L2ABER are up, then CGEJSV will compute the SVD of -* A + dA, where ||dA|| <= f(M,N)*EPSLN. -* - NR = 1 - IF ( L2ABER ) THEN -* Standard absolute error bound suffices. All sigma_i with -* sigma_i < N*EPSLN*||A|| are flushed to zero. This is an -* agressive enforcement of lower numerical rank by introducing a -* backward error of the order of N*EPSLN*||A||. - TEMP1 = SQRT(REAL(N))*EPSLN - DO 3001 p = 2, N - IF ( ABS(A(p,p)) .GE. (TEMP1*ABS(A(1,1))) ) THEN - NR = NR + 1 - ELSE - GO TO 3002 - END IF - 3001 CONTINUE - 3002 CONTINUE - ELSE IF ( L2RANK ) THEN -* .. similarly as above, only slightly more gentle (less agressive). -* Sudden drop on the diagonal of R1 is used as the criterion for -* close-to-rank-defficient. - TEMP1 = SQRT(SFMIN) - DO 3401 p = 2, N - IF ( ( ABS(A(p,p)) .LT. (EPSLN*ABS(A(p-1,p-1))) ) .OR. - $ ( ABS(A(p,p)) .LT. SMALL ) .OR. - $ ( L2KILL .AND. (ABS(A(p,p)) .LT. TEMP1) ) ) GO TO 3402 - NR = NR + 1 - 3401 CONTINUE - 3402 CONTINUE -* - ELSE -* The goal is high relative accuracy. However, if the matrix -* has high scaled condition number the relative accuracy is in -* general not feasible. Later on, a condition number estimator -* will be deployed to estimate the scaled condition number. -* Here we just remove the underflowed part of the triangular -* factor. This prevents the situation in which the code is -* working hard to get the accuracy not warranted by the data. - TEMP1 = SQRT(SFMIN) - DO 3301 p = 2, N - IF ( ( ABS(A(p,p)) .LT. SMALL ) .OR. - $ ( L2KILL .AND. (ABS(A(p,p)) .LT. TEMP1) ) ) GO TO 3302 - NR = NR + 1 - 3301 CONTINUE - 3302 CONTINUE -* - END IF -* - ALMORT = .FALSE. - IF ( NR .EQ. N ) THEN - MAXPRJ = ONE - DO 3051 p = 2, N - TEMP1 = ABS(A(p,p)) / SVA(IWORK(p)) - MAXPRJ = MIN( MAXPRJ, TEMP1 ) - 3051 CONTINUE - IF ( MAXPRJ**2 .GE. ONE - REAL(N)*EPSLN ) ALMORT = .TRUE. - END IF -* -* - SCONDA = - ONE - CONDR1 = - ONE - CONDR2 = - ONE -* - IF ( ERREST ) THEN - IF ( N .EQ. NR ) THEN - IF ( RSVEC ) THEN -* .. V is available as workspace - CALL CLACPY( 'U', N, N, A, LDA, V, LDV ) - DO 3053 p = 1, N - TEMP1 = SVA(IWORK(p)) - CALL CSSCAL( p, ONE/TEMP1, V(1,p), 1 ) - 3053 CONTINUE - IF ( LSVEC )THEN - CALL CPOCON( 'U', N, V, LDV, ONE, TEMP1, - $ CWORK(N+1), RWORK, IERR ) - ELSE - CALL CPOCON( 'U', N, V, LDV, ONE, TEMP1, - $ CWORK, RWORK, IERR ) - END IF -* - ELSE IF ( LSVEC ) THEN -* .. U is available as workspace - CALL CLACPY( 'U', N, N, A, LDA, U, LDU ) - DO 3054 p = 1, N - TEMP1 = SVA(IWORK(p)) - CALL CSSCAL( p, ONE/TEMP1, U(1,p), 1 ) - 3054 CONTINUE - CALL CPOCON( 'U', N, U, LDU, ONE, TEMP1, - $ CWORK(N+1), RWORK, IERR ) - ELSE - CALL CLACPY( 'U', N, N, A, LDA, CWORK, N ) -*[] CALL CLACPY( 'U', N, N, A, LDA, CWORK(N+1), N ) -* Change: here index shifted by N to the left, CWORK(1:N) -* not needed for SIGMA only computation - DO 3052 p = 1, N - TEMP1 = SVA(IWORK(p)) -*[] CALL CSSCAL( p, ONE/TEMP1, CWORK(N+(p-1)*N+1), 1 ) - CALL CSSCAL( p, ONE/TEMP1, CWORK((p-1)*N+1), 1 ) - 3052 CONTINUE -* .. the columns of R are scaled to have unit Euclidean lengths. -*[] CALL CPOCON( 'U', N, CWORK(N+1), N, ONE, TEMP1, -*[] $ CWORK(N+N*N+1), RWORK, IERR ) - CALL CPOCON( 'U', N, CWORK, N, ONE, TEMP1, - $ CWORK(N*N+1), RWORK, IERR ) -* - END IF - IF ( TEMP1 .NE. ZERO ) THEN - SCONDA = ONE / SQRT(TEMP1) - ELSE - SCONDA = - ONE - END IF -* SCONDA is an estimate of SQRT(||(R^* * R)^(-1)||_1). -* N^(-1/4) * SCONDA <= ||R^(-1)||_2 <= N^(1/4) * SCONDA - ELSE - SCONDA = - ONE - END IF - END IF -* - L2PERT = L2PERT .AND. ( ABS( A(1,1)/A(NR,NR) ) .GT. SQRT(BIG1) ) -* If there is no violent scaling, artificial perturbation is not needed. -* -* Phase 3: -* - IF ( .NOT. ( RSVEC .OR. LSVEC ) ) THEN -* -* Singular Values only -* -* .. transpose A(1:NR,1:N) - DO 1946 p = 1, MIN( N-1, NR ) - CALL CCOPY( N-p, A(p,p+1), LDA, A(p+1,p), 1 ) - CALL CLACGV( N-p+1, A(p,p), 1 ) - 1946 CONTINUE - IF ( NR .EQ. N ) A(N,N) = CONJG(A(N,N)) -* -* The following two DO-loops introduce small relative perturbation -* into the strict upper triangle of the lower triangular matrix. -* Small entries below the main diagonal are also changed. -* This modification is useful if the computing environment does not -* provide/allow FLUSH TO ZERO underflow, for it prevents many -* annoying denormalized numbers in case of strongly scaled matrices. -* The perturbation is structured so that it does not introduce any -* new perturbation of the singular values, and it does not destroy -* the job done by the preconditioner. -* The licence for this perturbation is in the variable L2PERT, which -* should be .FALSE. if FLUSH TO ZERO underflow is active. -* - IF ( .NOT. ALMORT ) THEN -* - IF ( L2PERT ) THEN -* XSC = SQRT(SMALL) - XSC = EPSLN / REAL(N) - DO 4947 q = 1, NR - CTEMP = CMPLX(XSC*ABS(A(q,q)),ZERO) - DO 4949 p = 1, N - IF ( ( (p.GT.q) .AND. (ABS(A(p,q)).LE.TEMP1) ) - $ .OR. ( p .LT. q ) ) -* $ A(p,q) = TEMP1 * ( A(p,q) / ABS(A(p,q)) ) - $ A(p,q) = CTEMP - 4949 CONTINUE - 4947 CONTINUE - ELSE - CALL CLASET( 'U', NR-1,NR-1, CZERO,CZERO, A(1,2),LDA ) - END IF -* -* .. second preconditioning using the QR factorization -* - CALL CGEQRF( N,NR, A,LDA, CWORK, CWORK(N+1),LWORK-N, IERR ) -* -* .. and transpose upper to lower triangular - DO 1948 p = 1, NR - 1 - CALL CCOPY( NR-p, A(p,p+1), LDA, A(p+1,p), 1 ) - CALL CLACGV( NR-p+1, A(p,p), 1 ) - 1948 CONTINUE -* - END IF -* -* Row-cyclic Jacobi SVD algorithm with column pivoting -* -* .. again some perturbation (a "background noise") is added -* to drown denormals - IF ( L2PERT ) THEN -* XSC = SQRT(SMALL) - XSC = EPSLN / REAL(N) - DO 1947 q = 1, NR - CTEMP = CMPLX(XSC*ABS(A(q,q)),ZERO) - DO 1949 p = 1, NR - IF ( ( (p.GT.q) .AND. (ABS(A(p,q)).LE.TEMP1) ) - $ .OR. ( p .LT. q ) ) -* $ A(p,q) = TEMP1 * ( A(p,q) / ABS(A(p,q)) ) - $ A(p,q) = CTEMP - 1949 CONTINUE - 1947 CONTINUE - ELSE - CALL CLASET( 'U', NR-1, NR-1, CZERO, CZERO, A(1,2), LDA ) - END IF -* -* .. and one-sided Jacobi rotations are started on a lower -* triangular matrix (plus perturbation which is ignored in -* the part which destroys triangular form (confusing?!)) -* - CALL CGESVJ( 'L', 'N', 'N', NR, NR, A, LDA, SVA, - $ N, V, LDV, CWORK, LWORK, RWORK, LRWORK, INFO ) -* - SCALEM = RWORK(1) - NUMRANK = NINT(RWORK(2)) -* -* - ELSE IF ( ( RSVEC .AND. ( .NOT. LSVEC ) .AND. ( .NOT. JRACC ) ) - $ .OR. - $ ( JRACC .AND. ( .NOT. LSVEC ) .AND. ( NR .NE. N ) ) ) THEN -* -* -> Singular Values and Right Singular Vectors <- -* - IF ( ALMORT ) THEN -* -* .. in this case NR equals N - DO 1998 p = 1, NR - CALL CCOPY( N-p+1, A(p,p), LDA, V(p,p), 1 ) - CALL CLACGV( N-p+1, V(p,p), 1 ) - 1998 CONTINUE - CALL CLASET( 'U', NR-1,NR-1, CZERO, CZERO, V(1,2), LDV ) -* - CALL CGESVJ( 'L','U','N', N, NR, V, LDV, SVA, NR, A, LDA, - $ CWORK, LWORK, RWORK, LRWORK, INFO ) - SCALEM = RWORK(1) - NUMRANK = NINT(RWORK(2)) - - ELSE -* -* .. two more QR factorizations ( one QRF is not enough, two require -* accumulated product of Jacobi rotations, three are perfect ) -* - CALL CLASET( 'L', NR-1,NR-1, CZERO, CZERO, A(2,1), LDA ) - CALL CGELQF( NR,N, A, LDA, CWORK, CWORK(N+1), LWORK-N, IERR) - CALL CLACPY( 'L', NR, NR, A, LDA, V, LDV ) - CALL CLASET( 'U', NR-1,NR-1, CZERO, CZERO, V(1,2), LDV ) - CALL CGEQRF( NR, NR, V, LDV, CWORK(N+1), CWORK(2*N+1), - $ LWORK-2*N, IERR ) - DO 8998 p = 1, NR - CALL CCOPY( NR-p+1, V(p,p), LDV, V(p,p), 1 ) - CALL CLACGV( NR-p+1, V(p,p), 1 ) - 8998 CONTINUE - CALL CLASET('U', NR-1, NR-1, CZERO, CZERO, V(1,2), LDV) -* - CALL CGESVJ( 'L', 'U','N', NR, NR, V,LDV, SVA, NR, U, - $ LDU, CWORK(N+1), LWORK-N, RWORK, LRWORK, INFO ) - SCALEM = RWORK(1) - NUMRANK = NINT(RWORK(2)) - IF ( NR .LT. N ) THEN - CALL CLASET( 'A',N-NR, NR, CZERO,CZERO, V(NR+1,1), LDV ) - CALL CLASET( 'A',NR, N-NR, CZERO,CZERO, V(1,NR+1), LDV ) - CALL CLASET( 'A',N-NR,N-NR,CZERO,CONE, V(NR+1,NR+1),LDV ) - END IF -* - CALL CUNMLQ( 'L', 'C', N, N, NR, A, LDA, CWORK, - $ V, LDV, CWORK(N+1), LWORK-N, IERR ) -* - END IF -* .. permute the rows of V -* DO 8991 p = 1, N -* CALL CCOPY( N, V(p,1), LDV, A(IWORK(p),1), LDA ) -* 8991 CONTINUE -* CALL CLACPY( 'All', N, N, A, LDA, V, LDV ) - CALL CLAPMR( .FALSE., N, N, V, LDV, IWORK ) -* - IF ( TRANSP ) THEN - CALL CLACPY( 'A', N, N, V, LDV, U, LDU ) - END IF -* - ELSE IF ( JRACC .AND. (.NOT. LSVEC) .AND. ( NR.EQ. N ) ) THEN -* - CALL CLASET( 'L', N-1,N-1, CZERO, CZERO, A(2,1), LDA ) -* - CALL CGESVJ( 'U','N','V', N, N, A, LDA, SVA, N, V, LDV, - $ CWORK, LWORK, RWORK, LRWORK, INFO ) - SCALEM = RWORK(1) - NUMRANK = NINT(RWORK(2)) - CALL CLAPMR( .FALSE., N, N, V, LDV, IWORK ) -* - ELSE IF ( LSVEC .AND. ( .NOT. RSVEC ) ) THEN -* -* .. Singular Values and Left Singular Vectors .. -* -* .. second preconditioning step to avoid need to accumulate -* Jacobi rotations in the Jacobi iterations. - DO 1965 p = 1, NR - CALL CCOPY( N-p+1, A(p,p), LDA, U(p,p), 1 ) - CALL CLACGV( N-p+1, U(p,p), 1 ) - 1965 CONTINUE - CALL CLASET( 'U', NR-1, NR-1, CZERO, CZERO, U(1,2), LDU ) -* - CALL CGEQRF( N, NR, U, LDU, CWORK(N+1), CWORK(2*N+1), - $ LWORK-2*N, IERR ) -* - DO 1967 p = 1, NR - 1 - CALL CCOPY( NR-p, U(p,p+1), LDU, U(p+1,p), 1 ) - CALL CLACGV( N-p+1, U(p,p), 1 ) - 1967 CONTINUE - CALL CLASET( 'U', NR-1, NR-1, CZERO, CZERO, U(1,2), LDU ) -* - CALL CGESVJ( 'L', 'U', 'N', NR,NR, U, LDU, SVA, NR, A, - $ LDA, CWORK(N+1), LWORK-N, RWORK, LRWORK, INFO ) - SCALEM = RWORK(1) - NUMRANK = NINT(RWORK(2)) -* - IF ( NR .LT. M ) THEN - CALL CLASET( 'A', M-NR, NR,CZERO, CZERO, U(NR+1,1), LDU ) - IF ( NR .LT. N1 ) THEN - CALL CLASET( 'A',NR, N1-NR, CZERO, CZERO, U(1,NR+1),LDU ) - CALL CLASET( 'A',M-NR,N1-NR,CZERO,CONE,U(NR+1,NR+1),LDU ) - END IF - END IF -* - CALL CUNMQR( 'L', 'N', M, N1, N, A, LDA, CWORK, U, - $ LDU, CWORK(N+1), LWORK-N, IERR ) -* - IF ( ROWPIV ) - $ CALL CLASWP( N1, U, LDU, 1, M-1, IWORK(IWOFF+1), -1 ) -* - DO 1974 p = 1, N1 - XSC = ONE / SCNRM2( M, U(1,p), 1 ) - CALL CSSCAL( M, XSC, U(1,p), 1 ) - 1974 CONTINUE -* - IF ( TRANSP ) THEN - CALL CLACPY( 'A', N, N, U, LDU, V, LDV ) - END IF -* - ELSE -* -* .. Full SVD .. -* - IF ( .NOT. JRACC ) THEN -* - IF ( .NOT. ALMORT ) THEN -* -* Second Preconditioning Step (QRF [with pivoting]) -* Note that the composition of TRANSPOSE, QRF and TRANSPOSE is -* equivalent to an LQF CALL. Since in many libraries the QRF -* seems to be better optimized than the LQF, we do explicit -* transpose and use the QRF. This is subject to changes in an -* optimized implementation of CGEJSV. -* - DO 1968 p = 1, NR - CALL CCOPY( N-p+1, A(p,p), LDA, V(p,p), 1 ) - CALL CLACGV( N-p+1, V(p,p), 1 ) - 1968 CONTINUE -* -* .. the following two loops perturb small entries to avoid -* denormals in the second QR factorization, where they are -* as good as zeros. This is done to avoid painfully slow -* computation with denormals. The relative size of the perturbation -* is a parameter that can be changed by the implementer. -* This perturbation device will be obsolete on machines with -* properly implemented arithmetic. -* To switch it off, set L2PERT=.FALSE. To remove it from the -* code, remove the action under L2PERT=.TRUE., leave the ELSE part. -* The following two loops should be blocked and fused with the -* transposed copy above. -* - IF ( L2PERT ) THEN - XSC = SQRT(SMALL) - DO 2969 q = 1, NR - CTEMP = CMPLX(XSC*ABS( V(q,q) ),ZERO) - DO 2968 p = 1, N - IF ( ( p .GT. q ) .AND. ( ABS(V(p,q)) .LE. TEMP1 ) - $ .OR. ( p .LT. q ) ) -* $ V(p,q) = TEMP1 * ( V(p,q) / ABS(V(p,q)) ) - $ V(p,q) = CTEMP - IF ( p .LT. q ) V(p,q) = - V(p,q) - 2968 CONTINUE - 2969 CONTINUE - ELSE - CALL CLASET( 'U', NR-1, NR-1, CZERO, CZERO, V(1,2), LDV ) - END IF -* -* Estimate the row scaled condition number of R1 -* (If R1 is rectangular, N > NR, then the condition number -* of the leading NR x NR submatrix is estimated.) -* - CALL CLACPY( 'L', NR, NR, V, LDV, CWORK(2*N+1), NR ) - DO 3950 p = 1, NR - TEMP1 = SCNRM2(NR-p+1,CWORK(2*N+(p-1)*NR+p),1) - CALL CSSCAL(NR-p+1,ONE/TEMP1,CWORK(2*N+(p-1)*NR+p),1) - 3950 CONTINUE - CALL CPOCON('L',NR,CWORK(2*N+1),NR,ONE,TEMP1, - $ CWORK(2*N+NR*NR+1),RWORK,IERR) - CONDR1 = ONE / SQRT(TEMP1) -* .. here need a second oppinion on the condition number -* .. then assume worst case scenario -* R1 is OK for inverse <=> CONDR1 .LT. REAL(N) -* more conservative <=> CONDR1 .LT. SQRT(REAL(N)) -* - COND_OK = SQRT(SQRT(REAL(NR))) -*[TP] COND_OK is a tuning parameter. -* - IF ( CONDR1 .LT. COND_OK ) THEN -* .. the second QRF without pivoting. Note: in an optimized -* implementation, this QRF should be implemented as the QRF -* of a lower triangular matrix. -* R1^* = Q2 * R2 - CALL CGEQRF( N, NR, V, LDV, CWORK(N+1), CWORK(2*N+1), - $ LWORK-2*N, IERR ) -* - IF ( L2PERT ) THEN - XSC = SQRT(SMALL)/EPSLN - DO 3959 p = 2, NR - DO 3958 q = 1, p - 1 - CTEMP=CMPLX(XSC*MIN(ABS(V(p,p)),ABS(V(q,q))), - $ ZERO) - IF ( ABS(V(q,p)) .LE. TEMP1 ) -* $ V(q,p) = TEMP1 * ( V(q,p) / ABS(V(q,p)) ) - $ V(q,p) = CTEMP - 3958 CONTINUE - 3959 CONTINUE - END IF -* - IF ( NR .NE. N ) - $ CALL CLACPY( 'A', N, NR, V, LDV, CWORK(2*N+1), N ) -* .. save ... -* -* .. this transposed copy should be better than naive - DO 1969 p = 1, NR - 1 - CALL CCOPY( NR-p, V(p,p+1), LDV, V(p+1,p), 1 ) - CALL CLACGV(NR-p+1, V(p,p), 1 ) - 1969 CONTINUE - V(NR,NR)=CONJG(V(NR,NR)) -* - CONDR2 = CONDR1 -* - ELSE -* -* .. ill-conditioned case: second QRF with pivoting -* Note that windowed pivoting would be equaly good -* numerically, and more run-time efficient. So, in -* an optimal implementation, the next call to CGEQP3 -* should be replaced with eg. CALL CGEQPX (ACM TOMS #782) -* with properly (carefully) chosen parameters. -* -* R1^* * P2 = Q2 * R2 - DO 3003 p = 1, NR - IWORK(N+p) = 0 - 3003 CONTINUE - CALL CGEQP3( N, NR, V, LDV, IWORK(N+1), CWORK(N+1), - $ CWORK(2*N+1), LWORK-2*N, RWORK, IERR ) -** CALL CGEQRF( N, NR, V, LDV, CWORK(N+1), CWORK(2*N+1), -** $ LWORK-2*N, IERR ) - IF ( L2PERT ) THEN - XSC = SQRT(SMALL) - DO 3969 p = 2, NR - DO 3968 q = 1, p - 1 - CTEMP=CMPLX(XSC*MIN(ABS(V(p,p)),ABS(V(q,q))), - $ ZERO) - IF ( ABS(V(q,p)) .LE. TEMP1 ) -* $ V(q,p) = TEMP1 * ( V(q,p) / ABS(V(q,p)) ) - $ V(q,p) = CTEMP - 3968 CONTINUE - 3969 CONTINUE - END IF -* - CALL CLACPY( 'A', N, NR, V, LDV, CWORK(2*N+1), N ) -* - IF ( L2PERT ) THEN - XSC = SQRT(SMALL) - DO 8970 p = 2, NR - DO 8971 q = 1, p - 1 - CTEMP=CMPLX(XSC*MIN(ABS(V(p,p)),ABS(V(q,q))), - $ ZERO) -* V(p,q) = - TEMP1*( V(q,p) / ABS(V(q,p)) ) - V(p,q) = - CTEMP - 8971 CONTINUE - 8970 CONTINUE - ELSE - CALL CLASET( 'L',NR-1,NR-1,CZERO,CZERO,V(2,1),LDV ) - END IF -* Now, compute R2 = L3 * Q3, the LQ factorization. - CALL CGELQF( NR, NR, V, LDV, CWORK(2*N+N*NR+1), - $ CWORK(2*N+N*NR+NR+1), LWORK-2*N-N*NR-NR, IERR ) -* .. and estimate the condition number - CALL CLACPY( 'L',NR,NR,V,LDV,CWORK(2*N+N*NR+NR+1),NR ) - DO 4950 p = 1, NR - TEMP1 = SCNRM2( p, CWORK(2*N+N*NR+NR+p), NR ) - CALL CSSCAL( p, ONE/TEMP1, CWORK(2*N+N*NR+NR+p), NR ) - 4950 CONTINUE - CALL CPOCON( 'L',NR,CWORK(2*N+N*NR+NR+1),NR,ONE,TEMP1, - $ CWORK(2*N+N*NR+NR+NR*NR+1),RWORK,IERR ) - CONDR2 = ONE / SQRT(TEMP1) -* -* - IF ( CONDR2 .GE. COND_OK ) THEN -* .. save the Householder vectors used for Q3 -* (this overwrittes the copy of R2, as it will not be -* needed in this branch, but it does not overwritte the -* Huseholder vectors of Q2.). - CALL CLACPY( 'U', NR, NR, V, LDV, CWORK(2*N+1), N ) -* .. and the rest of the information on Q3 is in -* WORK(2*N+N*NR+1:2*N+N*NR+N) - END IF -* - END IF -* - IF ( L2PERT ) THEN - XSC = SQRT(SMALL) - DO 4968 q = 2, NR - CTEMP = XSC * V(q,q) - DO 4969 p = 1, q - 1 -* V(p,q) = - TEMP1*( V(p,q) / ABS(V(p,q)) ) - V(p,q) = - CTEMP - 4969 CONTINUE - 4968 CONTINUE - ELSE - CALL CLASET( 'U', NR-1,NR-1, CZERO,CZERO, V(1,2), LDV ) - END IF -* -* Second preconditioning finished; continue with Jacobi SVD -* The input matrix is lower trinagular. -* -* Recover the right singular vectors as solution of a well -* conditioned triangular matrix equation. -* - IF ( CONDR1 .LT. COND_OK ) THEN -* - CALL CGESVJ( 'L','U','N',NR,NR,V,LDV,SVA,NR,U, LDU, - $ CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,RWORK, - $ LRWORK, INFO ) - SCALEM = RWORK(1) - NUMRANK = NINT(RWORK(2)) - DO 3970 p = 1, NR - CALL CCOPY( NR, V(1,p), 1, U(1,p), 1 ) - CALL CSSCAL( NR, SVA(p), V(1,p), 1 ) - 3970 CONTINUE - -* .. pick the right matrix equation and solve it -* - IF ( NR .EQ. N ) THEN -* :)) .. best case, R1 is inverted. The solution of this matrix -* equation is Q2*V2 = the product of the Jacobi rotations -* used in CGESVJ, premultiplied with the orthogonal matrix -* from the second QR factorization. - CALL CTRSM('L','U','N','N', NR,NR,CONE, A,LDA, V,LDV) - ELSE -* .. R1 is well conditioned, but non-square. Adjoint of R2 -* is inverted to get the product of the Jacobi rotations -* used in CGESVJ. The Q-factor from the second QR -* factorization is then built in explicitly. - CALL CTRSM('L','U','C','N',NR,NR,CONE,CWORK(2*N+1), - $ N,V,LDV) - IF ( NR .LT. N ) THEN - CALL CLASET('A',N-NR,NR,CZERO,CZERO,V(NR+1,1),LDV) - CALL CLASET('A',NR,N-NR,CZERO,CZERO,V(1,NR+1),LDV) - CALL CLASET('A',N-NR,N-NR,CZERO,CONE,V(NR+1,NR+1),LDV) - END IF - CALL CUNMQR('L','N',N,N,NR,CWORK(2*N+1),N,CWORK(N+1), - $ V,LDV,CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR) - END IF -* - ELSE IF ( CONDR2 .LT. COND_OK ) THEN -* -* The matrix R2 is inverted. The solution of the matrix equation -* is Q3^* * V3 = the product of the Jacobi rotations (appplied to -* the lower triangular L3 from the LQ factorization of -* R2=L3*Q3), pre-multiplied with the transposed Q3. - CALL CGESVJ( 'L', 'U', 'N', NR, NR, V, LDV, SVA, NR, U, - $ LDU, CWORK(2*N+N*NR+NR+1), LWORK-2*N-N*NR-NR, - $ RWORK, LRWORK, INFO ) - SCALEM = RWORK(1) - NUMRANK = NINT(RWORK(2)) - DO 3870 p = 1, NR - CALL CCOPY( NR, V(1,p), 1, U(1,p), 1 ) - CALL CSSCAL( NR, SVA(p), U(1,p), 1 ) - 3870 CONTINUE - CALL CTRSM('L','U','N','N',NR,NR,CONE,CWORK(2*N+1),N, - $ U,LDU) -* .. apply the permutation from the second QR factorization - DO 873 q = 1, NR - DO 872 p = 1, NR - CWORK(2*N+N*NR+NR+IWORK(N+p)) = U(p,q) - 872 CONTINUE - DO 874 p = 1, NR - U(p,q) = CWORK(2*N+N*NR+NR+p) - 874 CONTINUE - 873 CONTINUE - IF ( NR .LT. N ) THEN - CALL CLASET( 'A',N-NR,NR,CZERO,CZERO,V(NR+1,1),LDV ) - CALL CLASET( 'A',NR,N-NR,CZERO,CZERO,V(1,NR+1),LDV ) - CALL CLASET('A',N-NR,N-NR,CZERO,CONE,V(NR+1,NR+1),LDV) - END IF - CALL CUNMQR( 'L','N',N,N,NR,CWORK(2*N+1),N,CWORK(N+1), - $ V,LDV,CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR ) - ELSE -* Last line of defense. -* #:( This is a rather pathological case: no scaled condition -* improvement after two pivoted QR factorizations. Other -* possibility is that the rank revealing QR factorization -* or the condition estimator has failed, or the COND_OK -* is set very close to ONE (which is unnecessary). Normally, -* this branch should never be executed, but in rare cases of -* failure of the RRQR or condition estimator, the last line of -* defense ensures that CGEJSV completes the task. -* Compute the full SVD of L3 using CGESVJ with explicit -* accumulation of Jacobi rotations. - CALL CGESVJ( 'L', 'U', 'V', NR, NR, V, LDV, SVA, NR, U, - $ LDU, CWORK(2*N+N*NR+NR+1), LWORK-2*N-N*NR-NR, - $ RWORK, LRWORK, INFO ) - SCALEM = RWORK(1) - NUMRANK = NINT(RWORK(2)) - IF ( NR .LT. N ) THEN - CALL CLASET( 'A',N-NR,NR,CZERO,CZERO,V(NR+1,1),LDV ) - CALL CLASET( 'A',NR,N-NR,CZERO,CZERO,V(1,NR+1),LDV ) - CALL CLASET('A',N-NR,N-NR,CZERO,CONE,V(NR+1,NR+1),LDV) - END IF - CALL CUNMQR( 'L','N',N,N,NR,CWORK(2*N+1),N,CWORK(N+1), - $ V,LDV,CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR ) -* - CALL CUNMLQ( 'L', 'C', NR, NR, NR, CWORK(2*N+1), N, - $ CWORK(2*N+N*NR+1), U, LDU, CWORK(2*N+N*NR+NR+1), - $ LWORK-2*N-N*NR-NR, IERR ) - DO 773 q = 1, NR - DO 772 p = 1, NR - CWORK(2*N+N*NR+NR+IWORK(N+p)) = U(p,q) - 772 CONTINUE - DO 774 p = 1, NR - U(p,q) = CWORK(2*N+N*NR+NR+p) - 774 CONTINUE - 773 CONTINUE -* - END IF -* -* Permute the rows of V using the (column) permutation from the -* first QRF. Also, scale the columns to make them unit in -* Euclidean norm. This applies to all cases. -* - TEMP1 = SQRT(REAL(N)) * EPSLN - DO 1972 q = 1, N - DO 972 p = 1, N - CWORK(2*N+N*NR+NR+IWORK(p)) = V(p,q) - 972 CONTINUE - DO 973 p = 1, N - V(p,q) = CWORK(2*N+N*NR+NR+p) - 973 CONTINUE - XSC = ONE / SCNRM2( N, V(1,q), 1 ) - IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) ) - $ CALL CSSCAL( N, XSC, V(1,q), 1 ) - 1972 CONTINUE -* At this moment, V contains the right singular vectors of A. -* Next, assemble the left singular vector matrix U (M x N). - IF ( NR .LT. M ) THEN - CALL CLASET('A', M-NR, NR, CZERO, CZERO, U(NR+1,1), LDU) - IF ( NR .LT. N1 ) THEN - CALL CLASET('A',NR,N1-NR,CZERO,CZERO,U(1,NR+1),LDU) - CALL CLASET('A',M-NR,N1-NR,CZERO,CONE, - $ U(NR+1,NR+1),LDU) - END IF - END IF -* -* The Q matrix from the first QRF is built into the left singular -* matrix U. This applies to all cases. -* - CALL CUNMQR( 'L', 'N', M, N1, N, A, LDA, CWORK, U, - $ LDU, CWORK(N+1), LWORK-N, IERR ) - -* The columns of U are normalized. The cost is O(M*N) flops. - TEMP1 = SQRT(REAL(M)) * EPSLN - DO 1973 p = 1, NR - XSC = ONE / SCNRM2( M, U(1,p), 1 ) - IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) ) - $ CALL CSSCAL( M, XSC, U(1,p), 1 ) - 1973 CONTINUE -* -* If the initial QRF is computed with row pivoting, the left -* singular vectors must be adjusted. -* - IF ( ROWPIV ) - $ CALL CLASWP( N1, U, LDU, 1, M-1, IWORK(IWOFF+1), -1 ) -* - ELSE -* -* .. the initial matrix A has almost orthogonal columns and -* the second QRF is not needed -* - CALL CLACPY( 'U', N, N, A, LDA, CWORK(N+1), N ) - IF ( L2PERT ) THEN - XSC = SQRT(SMALL) - DO 5970 p = 2, N - CTEMP = XSC * CWORK( N + (p-1)*N + p ) - DO 5971 q = 1, p - 1 -* CWORK(N+(q-1)*N+p)=-TEMP1 * ( CWORK(N+(p-1)*N+q) / -* $ ABS(CWORK(N+(p-1)*N+q)) ) - CWORK(N+(q-1)*N+p)=-CTEMP - 5971 CONTINUE - 5970 CONTINUE - ELSE - CALL CLASET( 'L',N-1,N-1,CZERO,CZERO,CWORK(N+2),N ) - END IF -* - CALL CGESVJ( 'U', 'U', 'N', N, N, CWORK(N+1), N, SVA, - $ N, U, LDU, CWORK(N+N*N+1), LWORK-N-N*N, RWORK, LRWORK, - $ INFO ) -* - SCALEM = RWORK(1) - NUMRANK = NINT(RWORK(2)) - DO 6970 p = 1, N - CALL CCOPY( N, CWORK(N+(p-1)*N+1), 1, U(1,p), 1 ) - CALL CSSCAL( N, SVA(p), CWORK(N+(p-1)*N+1), 1 ) - 6970 CONTINUE -* - CALL CTRSM( 'L', 'U', 'N', 'N', N, N, - $ CONE, A, LDA, CWORK(N+1), N ) - DO 6972 p = 1, N - CALL CCOPY( N, CWORK(N+p), N, V(IWORK(p),1), LDV ) - 6972 CONTINUE - TEMP1 = SQRT(REAL(N))*EPSLN - DO 6971 p = 1, N - XSC = ONE / SCNRM2( N, V(1,p), 1 ) - IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) ) - $ CALL CSSCAL( N, XSC, V(1,p), 1 ) - 6971 CONTINUE -* -* Assemble the left singular vector matrix U (M x N). -* - IF ( N .LT. M ) THEN - CALL CLASET( 'A', M-N, N, CZERO, CZERO, U(N+1,1), LDU ) - IF ( N .LT. N1 ) THEN - CALL CLASET('A',N, N1-N, CZERO, CZERO, U(1,N+1),LDU) - CALL CLASET( 'A',M-N,N1-N, CZERO, CONE,U(N+1,N+1),LDU) - END IF - END IF - CALL CUNMQR( 'L', 'N', M, N1, N, A, LDA, CWORK, U, - $ LDU, CWORK(N+1), LWORK-N, IERR ) - TEMP1 = SQRT(REAL(M))*EPSLN - DO 6973 p = 1, N1 - XSC = ONE / SCNRM2( M, U(1,p), 1 ) - IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) ) - $ CALL CSSCAL( M, XSC, U(1,p), 1 ) - 6973 CONTINUE -* - IF ( ROWPIV ) - $ CALL CLASWP( N1, U, LDU, 1, M-1, IWORK(IWOFF+1), -1 ) -* - END IF -* -* end of the >> almost orthogonal case << in the full SVD -* - ELSE -* -* This branch deploys a preconditioned Jacobi SVD with explicitly -* accumulated rotations. It is included as optional, mainly for -* experimental purposes. It does perfom well, and can also be used. -* In this implementation, this branch will be automatically activated -* if the condition number sigma_max(A) / sigma_min(A) is predicted -* to be greater than the overflow threshold. This is because the -* a posteriori computation of the singular vectors assumes robust -* implementation of BLAS and some LAPACK procedures, capable of working -* in presence of extreme values, e.g. when the singular values spread from -* the underflow to the overflow threshold. -* - DO 7968 p = 1, NR - CALL CCOPY( N-p+1, A(p,p), LDA, V(p,p), 1 ) - CALL CLACGV( N-p+1, V(p,p), 1 ) - 7968 CONTINUE -* - IF ( L2PERT ) THEN - XSC = SQRT(SMALL/EPSLN) - DO 5969 q = 1, NR - CTEMP = CMPLX(XSC*ABS( V(q,q) ),ZERO) - DO 5968 p = 1, N - IF ( ( p .GT. q ) .AND. ( ABS(V(p,q)) .LE. TEMP1 ) - $ .OR. ( p .LT. q ) ) -* $ V(p,q) = TEMP1 * ( V(p,q) / ABS(V(p,q)) ) - $ V(p,q) = CTEMP - IF ( p .LT. q ) V(p,q) = - V(p,q) - 5968 CONTINUE - 5969 CONTINUE - ELSE - CALL CLASET( 'U', NR-1, NR-1, CZERO, CZERO, V(1,2), LDV ) - END IF - - CALL CGEQRF( N, NR, V, LDV, CWORK(N+1), CWORK(2*N+1), - $ LWORK-2*N, IERR ) - CALL CLACPY( 'L', N, NR, V, LDV, CWORK(2*N+1), N ) -* - DO 7969 p = 1, NR - CALL CCOPY( NR-p+1, V(p,p), LDV, U(p,p), 1 ) - CALL CLACGV( NR-p+1, U(p,p), 1 ) - 7969 CONTINUE - - IF ( L2PERT ) THEN - XSC = SQRT(SMALL/EPSLN) - DO 9970 q = 2, NR - DO 9971 p = 1, q - 1 - CTEMP = CMPLX(XSC * MIN(ABS(U(p,p)),ABS(U(q,q))), - $ ZERO) -* U(p,q) = - TEMP1 * ( U(q,p) / ABS(U(q,p)) ) - U(p,q) = - CTEMP - 9971 CONTINUE - 9970 CONTINUE - ELSE - CALL CLASET('U', NR-1, NR-1, CZERO, CZERO, U(1,2), LDU ) - END IF - - CALL CGESVJ( 'L', 'U', 'V', NR, NR, U, LDU, SVA, - $ N, V, LDV, CWORK(2*N+N*NR+1), LWORK-2*N-N*NR, - $ RWORK, LRWORK, INFO ) - SCALEM = RWORK(1) - NUMRANK = NINT(RWORK(2)) - - IF ( NR .LT. N ) THEN - CALL CLASET( 'A',N-NR,NR,CZERO,CZERO,V(NR+1,1),LDV ) - CALL CLASET( 'A',NR,N-NR,CZERO,CZERO,V(1,NR+1),LDV ) - CALL CLASET( 'A',N-NR,N-NR,CZERO,CONE,V(NR+1,NR+1),LDV ) - END IF - - CALL CUNMQR( 'L','N',N,N,NR,CWORK(2*N+1),N,CWORK(N+1), - $ V,LDV,CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR ) -* -* Permute the rows of V using the (column) permutation from the -* first QRF. Also, scale the columns to make them unit in -* Euclidean norm. This applies to all cases. -* - TEMP1 = SQRT(REAL(N)) * EPSLN - DO 7972 q = 1, N - DO 8972 p = 1, N - CWORK(2*N+N*NR+NR+IWORK(p)) = V(p,q) - 8972 CONTINUE - DO 8973 p = 1, N - V(p,q) = CWORK(2*N+N*NR+NR+p) - 8973 CONTINUE - XSC = ONE / SCNRM2( N, V(1,q), 1 ) - IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) ) - $ CALL CSSCAL( N, XSC, V(1,q), 1 ) - 7972 CONTINUE -* -* At this moment, V contains the right singular vectors of A. -* Next, assemble the left singular vector matrix U (M x N). -* - IF ( NR .LT. M ) THEN - CALL CLASET( 'A', M-NR, NR, CZERO, CZERO, U(NR+1,1), LDU ) - IF ( NR .LT. N1 ) THEN - CALL CLASET('A',NR, N1-NR, CZERO, CZERO, U(1,NR+1),LDU) - CALL CLASET('A',M-NR,N1-NR, CZERO, CONE,U(NR+1,NR+1),LDU) - END IF - END IF -* - CALL CUNMQR( 'L', 'N', M, N1, N, A, LDA, CWORK, U, - $ LDU, CWORK(N+1), LWORK-N, IERR ) -* - IF ( ROWPIV ) - $ CALL CLASWP( N1, U, LDU, 1, M-1, IWORK(IWOFF+1), -1 ) -* -* - END IF - IF ( TRANSP ) THEN -* .. swap U and V because the procedure worked on A^* - DO 6974 p = 1, N - CALL CSWAP( N, U(1,p), 1, V(1,p), 1 ) - 6974 CONTINUE - END IF -* - END IF -* end of the full SVD -* -* Undo scaling, if necessary (and possible) -* - IF ( USCAL2 .LE. (BIG/SVA(1))*USCAL1 ) THEN - CALL SLASCL( 'G', 0, 0, USCAL1, USCAL2, NR, 1, SVA, N, IERR ) - USCAL1 = ONE - USCAL2 = ONE - END IF -* - IF ( NR .LT. N ) THEN - DO 3004 p = NR+1, N - SVA(p) = ZERO - 3004 CONTINUE - END IF -* - RWORK(1) = USCAL2 * SCALEM - RWORK(2) = USCAL1 - IF ( ERREST ) RWORK(3) = SCONDA - IF ( LSVEC .AND. RSVEC ) THEN - RWORK(4) = CONDR1 - RWORK(5) = CONDR2 - END IF - IF ( L2TRAN ) THEN - RWORK(6) = ENTRA - RWORK(7) = ENTRAT - END IF -* - IWORK(1) = NR - IWORK(2) = NUMRANK - IWORK(3) = WARNING - IF ( TRANSP ) THEN - IWORK(4) = 1 - ELSE - IWORK(4) = -1 - END IF - -* - RETURN -* .. -* .. END OF CGEJSV -* .. - END -* +*> \brief \b CGEJSV +* +* =========== DOCUMENTATION =========== +* +* Online html documentation available at +* http://www.netlib.org/lapack/explore-html/ +* +*> \htmlonly +*> Download CGEJSV + dependencies +*> +*> [TGZ] +*> +*> [ZIP] +*> +*> [TXT] +*> \endhtmlonly +* +* Definition: +* =========== +* +* SUBROUTINE CGEJSV( JOBA, JOBU, JOBV, JOBR, JOBT, JOBP, +* M, N, A, LDA, SVA, U, LDU, V, LDV, +* CWORK, LWORK, RWORK, LRWORK, IWORK, INFO ) +* +* .. Scalar Arguments .. +* IMPLICIT NONE +* INTEGER INFO, LDA, LDU, LDV, LWORK, M, N +* .. +* .. Array Arguments .. +* COMPLEX A( LDA, * ), U( LDU, * ), V( LDV, * ), CWORK( LWORK ) +* REAL SVA( N ), RWORK( LRWORK ) +* INTEGER IWORK( * ) +* CHARACTER*1 JOBA, JOBP, JOBR, JOBT, JOBU, JOBV +* .. +* +* +*> \par Purpose: +* ============= +*> +*> \verbatim +*> +*> CGEJSV computes the singular value decomposition (SVD) of a complex M-by-N +*> matrix [A], where M >= N. The SVD of [A] is written as +*> +*> [A] = [U] * [SIGMA] * [V]^*, +*> +*> where [SIGMA] is an N-by-N (M-by-N) matrix which is zero except for its N +*> diagonal elements, [U] is an M-by-N (or M-by-M) unitary matrix, and +*> [V] is an N-by-N unitary matrix. The diagonal elements of [SIGMA] are +*> the singular values of [A]. The columns of [U] and [V] are the left and +*> the right singular vectors of [A], respectively. The matrices [U] and [V] +*> are computed and stored in the arrays U and V, respectively. The diagonal +*> of [SIGMA] is computed and stored in the array SVA. +*> \endverbatim +*> +*> Arguments: +*> ========== +*> +*> \param[in] JOBA +*> \verbatim +*> JOBA is CHARACTER*1 +*> Specifies the level of accuracy: +*> = 'C': This option works well (high relative accuracy) if A = B * D, +*> with well-conditioned B and arbitrary diagonal matrix D. +*> The accuracy cannot be spoiled by COLUMN scaling. The +*> accuracy of the computed output depends on the condition of +*> B, and the procedure aims at the best theoretical accuracy. +*> The relative error max_{i=1:N}|d sigma_i| / sigma_i is +*> bounded by f(M,N)*epsilon* cond(B), independent of D. +*> The input matrix is preprocessed with the QRF with column +*> pivoting. This initial preprocessing and preconditioning by +*> a rank revealing QR factorization is common for all values of +*> JOBA. Additional actions are specified as follows: +*> = 'E': Computation as with 'C' with an additional estimate of the +*> condition number of B. It provides a realistic error bound. +*> = 'F': If A = D1 * C * D2 with ill-conditioned diagonal scalings +*> D1, D2, and well-conditioned matrix C, this option gives +*> higher accuracy than the 'C' option. If the structure of the +*> input matrix is not known, and relative accuracy is +*> desirable, then this option is advisable. The input matrix A +*> is preprocessed with QR factorization with FULL (row and +*> column) pivoting. +*> = 'G' Computation as with 'F' with an additional estimate of the +*> condition number of B, where A=B*D. If A has heavily weighted +*> rows, then using this condition number gives too pessimistic +*> error bound. +*> = 'A': Small singular values are not well determined by the data +*> and are considered as noisy; the matrix is treated as +*> numerically rank defficient. The error in the computed +*> singular values is bounded by f(m,n)*epsilon*||A||. +*> The computed SVD A = U * S * V^* restores A up to +*> f(m,n)*epsilon*||A||. +*> This gives the procedure the licence to discard (set to zero) +*> all singular values below N*epsilon*||A||. +*> = 'R': Similar as in 'A'. Rank revealing property of the initial +*> QR factorization is used do reveal (using triangular factor) +*> a gap sigma_{r+1} < epsilon * sigma_r in which case the +*> numerical RANK is declared to be r. The SVD is computed with +*> absolute error bounds, but more accurately than with 'A'. +*> \endverbatim +*> +*> \param[in] JOBU +*> \verbatim +*> JOBU is CHARACTER*1 +*> Specifies whether to compute the columns of U: +*> = 'U': N columns of U are returned in the array U. +*> = 'F': full set of M left sing. vectors is returned in the array U. +*> = 'W': U may be used as workspace of length M*N. See the description +*> of U. +*> = 'N': U is not computed. +*> \endverbatim +*> +*> \param[in] JOBV +*> \verbatim +*> JOBV is CHARACTER*1 +*> Specifies whether to compute the matrix V: +*> = 'V': N columns of V are returned in the array V; Jacobi rotations +*> are not explicitly accumulated. +*> = 'J': N columns of V are returned in the array V, but they are +*> computed as the product of Jacobi rotations, if JOBT .EQ. 'N'. +*> = 'W': V may be used as workspace of length N*N. See the description +*> of V. +*> = 'N': V is not computed. +*> \endverbatim +*> +*> \param[in] JOBR +*> \verbatim +*> JOBR is CHARACTER*1 +*> Specifies the RANGE for the singular values. Issues the licence to +*> set to zero small positive singular values if they are outside +*> specified range. If A .NE. 0 is scaled so that the largest singular +*> value of c*A is around SQRT(BIG), BIG=SLAMCH('O'), then JOBR issues +*> the licence to kill columns of A whose norm in c*A is less than +*> SQRT(SFMIN) (for JOBR.EQ.'R'), or less than SMALL=SFMIN/EPSLN, +*> where SFMIN=SLAMCH('S'), EPSLN=SLAMCH('E'). +*> = 'N': Do not kill small columns of c*A. This option assumes that +*> BLAS and QR factorizations and triangular solvers are +*> implemented to work in that range. If the condition of A +*> is greater than BIG, use CGESVJ. +*> = 'R': RESTRICTED range for sigma(c*A) is [SQRT(SFMIN), SQRT(BIG)] +*> (roughly, as described above). This option is recommended. +*> =========================== +*> For computing the singular values in the FULL range [SFMIN,BIG] +*> use CGESVJ. +*> \endverbatim +*> +*> \param[in] JOBT +*> \verbatim +*> JOBT is CHARACTER*1 +*> If the matrix is square then the procedure may determine to use +*> transposed A if A^* seems to be better with respect to convergence. +*> If the matrix is not square, JOBT is ignored. +*> The decision is based on two values of entropy over the adjoint +*> orbit of A^* * A. See the descriptions of WORK(6) and WORK(7). +*> = 'T': transpose if entropy test indicates possibly faster +*> convergence of Jacobi process if A^* is taken as input. If A is +*> replaced with A^*, then the row pivoting is included automatically. +*> = 'N': do not speculate. +*> The option 'T' can be used to compute only the singular values, or +*> the full SVD (U, SIGMA and V). For only one set of singular vectors +*> (U or V), the caller should provide both U and V, as one of the +*> matrices is used as workspace if the matrix A is transposed. +*> The implementer can easily remove this constraint and make the +*> code more complicated. See the descriptions of U and V. +*> In general, this option is considered experimental, and 'N'; should +*> be preferred. This is subject to changes in the future. +*> \endverbatim +*> +*> \param[in] JOBP +*> \verbatim +*> JOBP is CHARACTER*1 +*> Issues the licence to introduce structured perturbations to drown +*> denormalized numbers. This licence should be active if the +*> denormals are poorly implemented, causing slow computation, +*> especially in cases of fast convergence (!). For details see [1,2]. +*> For the sake of simplicity, this perturbations are included only +*> when the full SVD or only the singular values are requested. The +*> implementer/user can easily add the perturbation for the cases of +*> computing one set of singular vectors. +*> = 'P': introduce perturbation +*> = 'N': do not perturb +*> \endverbatim +*> +*> \param[in] M +*> \verbatim +*> M is INTEGER +*> The number of rows of the input matrix A. M >= 0. +*> \endverbatim +*> +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> The number of columns of the input matrix A. M >= N >= 0. +*> \endverbatim +*> +*> \param[in,out] A +*> \verbatim +*> A is COMPLEX array, dimension (LDA,N) +*> On entry, the M-by-N matrix A. +*> \endverbatim +*> +*> \param[in] LDA +*> \verbatim +*> LDA is INTEGER +*> The leading dimension of the array A. LDA >= max(1,M). +*> \endverbatim +*> +*> \param[out] SVA +*> \verbatim +*> SVA is REAL array, dimension (N) +*> On exit, +*> - For WORK(1)/WORK(2) = ONE: The singular values of A. During the +*> computation SVA contains Euclidean column norms of the +*> iterated matrices in the array A. +*> - For WORK(1) .NE. WORK(2): The singular values of A are +*> (WORK(1)/WORK(2)) * SVA(1:N). This factored form is used if +*> sigma_max(A) overflows or if small singular values have been +*> saved from underflow by scaling the input matrix A. +*> - If JOBR='R' then some of the singular values may be returned +*> as exact zeros obtained by "set to zero" because they are +*> below the numerical rank threshold or are denormalized numbers. +*> \endverbatim +*> +*> \param[out] U +*> \verbatim +*> U is COMPLEX array, dimension ( LDU, N ) or ( LDU, M ) +*> If JOBU = 'U', then U contains on exit the M-by-N matrix of +*> the left singular vectors. +*> If JOBU = 'F', then U contains on exit the M-by-M matrix of +*> the left singular vectors, including an ONB +*> of the orthogonal complement of the Range(A). +*> If JOBU = 'W' .AND. (JOBV.EQ.'V' .AND. JOBT.EQ.'T' .AND. M.EQ.N), +*> then U is used as workspace if the procedure +*> replaces A with A^*. In that case, [V] is computed +*> in U as left singular vectors of A^* and then +*> copied back to the V array. This 'W' option is just +*> a reminder to the caller that in this case U is +*> reserved as workspace of length N*N. +*> If JOBU = 'N' U is not referenced, unless JOBT='T'. +*> \endverbatim +*> +*> \param[in] LDU +*> \verbatim +*> LDU is INTEGER +*> The leading dimension of the array U, LDU >= 1. +*> IF JOBU = 'U' or 'F' or 'W', then LDU >= M. +*> \endverbatim +*> +*> \param[out] V +*> \verbatim +*> V is COMPLEX array, dimension ( LDV, N ) +*> If JOBV = 'V', 'J' then V contains on exit the N-by-N matrix of +*> the right singular vectors; +*> If JOBV = 'W', AND (JOBU.EQ.'U' AND JOBT.EQ.'T' AND M.EQ.N), +*> then V is used as workspace if the pprocedure +*> replaces A with A^*. In that case, [U] is computed +*> in V as right singular vectors of A^* and then +*> copied back to the U array. This 'W' option is just +*> a reminder to the caller that in this case V is +*> reserved as workspace of length N*N. +*> If JOBV = 'N' V is not referenced, unless JOBT='T'. +*> \endverbatim +*> +*> \param[in] LDV +*> \verbatim +*> LDV is INTEGER +*> The leading dimension of the array V, LDV >= 1. +*> If JOBV = 'V' or 'J' or 'W', then LDV >= N. +*> \endverbatim +*> +*> \param[out] CWORK +*> \verbatim +*> CWORK is COMPLEX array, dimension (MAX(2,LWORK)) +*> If the call to CGEJSV is a workspace query (indicated by LWORK=-1 or +*> LRWORK=-1), then on exit CWORK(1) contains the required length of +*> CWORK for the job parameters used in the call. +*> \endverbatim +*> +*> \param[in] LWORK +*> \verbatim +*> LWORK is INTEGER +*> Length of CWORK to confirm proper allocation of workspace. +*> LWORK depends on the job: +*> +*> 1. If only SIGMA is needed ( JOBU.EQ.'N', JOBV.EQ.'N' ) and +*> 1.1 .. no scaled condition estimate required (JOBA.NE.'E'.AND.JOBA.NE.'G'): +*> LWORK >= 2*N+1. This is the minimal requirement. +*> ->> For optimal performance (blocked code) the optimal value +*> is LWORK >= N + (N+1)*NB. Here NB is the optimal +*> block size for CGEQP3 and CGEQRF. +*> In general, optimal LWORK is computed as +*> LWORK >= max(N+LWORK(CGEQP3),N+LWORK(CGEQRF), LWORK(CGESVJ)). +*> 1.2. .. an estimate of the scaled condition number of A is +*> required (JOBA='E', or 'G'). In this case, LWORK the minimal +*> requirement is LWORK >= N*N + 2*N. +*> ->> For optimal performance (blocked code) the optimal value +*> is LWORK >= max(N+(N+1)*NB, N*N+2*N)=N**2+2*N. +*> In general, the optimal length LWORK is computed as +*> LWORK >= max(N+LWORK(CGEQP3),N+LWORK(CGEQRF), LWORK(CGESVJ), +*> N*N+LWORK(CPOCON)). +*> 2. If SIGMA and the right singular vectors are needed (JOBV.EQ.'V'), +*> (JOBU.EQ.'N') +*> 2.1 .. no scaled condition estimate requested (JOBE.EQ.'N'): +*> -> the minimal requirement is LWORK >= 3*N. +*> -> For optimal performance, +*> LWORK >= max(N+(N+1)*NB, 2*N+N*NB)=2*N+N*NB, +*> where NB is the optimal block size for CGEQP3, CGEQRF, CGELQ, +*> CUNMLQ. In general, the optimal length LWORK is computed as +*> LWORK >= max(N+LWORK(CGEQP3), N+LWORK(CGESVJ), +*> N+LWORK(CGELQF), 2*N+LWORK(CGEQRF), N+LWORK(CUNMLQ)). +*> 2.2 .. an estimate of the scaled condition number of A is +*> required (JOBA='E', or 'G'). +*> -> the minimal requirement is LWORK >= 3*N. +*> -> For optimal performance, +*> LWORK >= max(N+(N+1)*NB, 2*N,2*N+N*NB)=2*N+N*NB, +*> where NB is the optimal block size for CGEQP3, CGEQRF, CGELQ, +*> CUNMLQ. In general, the optimal length LWORK is computed as +*> LWORK >= max(N+LWORK(CGEQP3), LWORK(CPOCON), N+LWORK(CGESVJ), +*> N+LWORK(CGELQF), 2*N+LWORK(CGEQRF), N+LWORK(CUNMLQ)). +*> 3. If SIGMA and the left singular vectors are needed +*> 3.1 .. no scaled condition estimate requested (JOBE.EQ.'N'): +*> -> the minimal requirement is LWORK >= 3*N. +*> -> For optimal performance: +*> if JOBU.EQ.'U' :: LWORK >= max(3*N, N+(N+1)*NB, 2*N+N*NB)=2*N+N*NB, +*> where NB is the optimal block size for CGEQP3, CGEQRF, CUNMQR. +*> In general, the optimal length LWORK is computed as +*> LWORK >= max(N+LWORK(CGEQP3), 2*N+LWORK(CGEQRF), N+LWORK(CUNMQR)). +*> 3.2 .. an estimate of the scaled condition number of A is +*> required (JOBA='E', or 'G'). +*> -> the minimal requirement is LWORK >= 3*N. +*> -> For optimal performance: +*> if JOBU.EQ.'U' :: LWORK >= max(3*N, N+(N+1)*NB, 2*N+N*NB)=2*N+N*NB, +*> where NB is the optimal block size for CGEQP3, CGEQRF, CUNMQR. +*> In general, the optimal length LWORK is computed as +*> LWORK >= max(N+LWORK(CGEQP3),N+LWORK(CPOCON), +*> 2*N+LWORK(CGEQRF), N+LWORK(CUNMQR)). +*> +*> 4. If the full SVD is needed: (JOBU.EQ.'U' or JOBU.EQ.'F') and +*> 4.1. if JOBV.EQ.'V' +*> the minimal requirement is LWORK >= 5*N+2*N*N. +*> 4.2. if JOBV.EQ.'J' the minimal requirement is +*> LWORK >= 4*N+N*N. +*> In both cases, the allocated CWORK can accommodate blocked runs +*> of CGEQP3, CGEQRF, CGELQF, CUNMQR, CUNMLQ. +*> +*> If the call to CGEJSV is a workspace query (indicated by LWORK=-1 or +*> LRWORK=-1), then on exit CWORK(1) contains the optimal and CWORK(2) contains the +*> minimal length of CWORK for the job parameters used in the call. +*> \endverbatim +*> +*> \param[out] RWORK +*> \verbatim +*> RWORK is REAL array, dimension (MAX(7,LWORK)) +*> On exit, +*> RWORK(1) = Determines the scaling factor SCALE = RWORK(2) / RWORK(1) +*> such that SCALE*SVA(1:N) are the computed singular values +*> of A. (See the description of SVA().) +*> RWORK(2) = See the description of RWORK(1). +*> RWORK(3) = SCONDA is an estimate for the condition number of +*> column equilibrated A. (If JOBA .EQ. 'E' or 'G') +*> SCONDA is an estimate of SQRT(||(R^* * R)^(-1)||_1). +*> It is computed using SPOCON. It holds +*> N^(-1/4) * SCONDA <= ||R^(-1)||_2 <= N^(1/4) * SCONDA +*> where R is the triangular factor from the QRF of A. +*> However, if R is truncated and the numerical rank is +*> determined to be strictly smaller than N, SCONDA is +*> returned as -1, thus indicating that the smallest +*> singular values might be lost. +*> +*> If full SVD is needed, the following two condition numbers are +*> useful for the analysis of the algorithm. They are provied for +*> a developer/implementer who is familiar with the details of +*> the method. +*> +*> RWORK(4) = an estimate of the scaled condition number of the +*> triangular factor in the first QR factorization. +*> RWORK(5) = an estimate of the scaled condition number of the +*> triangular factor in the second QR factorization. +*> The following two parameters are computed if JOBT .EQ. 'T'. +*> They are provided for a developer/implementer who is familiar +*> with the details of the method. +*> RWORK(6) = the entropy of A^* * A :: this is the Shannon entropy +*> of diag(A^* * A) / Trace(A^* * A) taken as point in the +*> probability simplex. +*> RWORK(7) = the entropy of A * A^*. (See the description of RWORK(6).) +*> If the call to CGEJSV is a workspace query (indicated by LWORK=-1 or +*> LRWORK=-1), then on exit RWORK(1) contains the required length of +*> RWORK for the job parameters used in the call. +*> \endverbatim +*> +*> \param[in] LRWORK +*> \verbatim +*> LRWORK is INTEGER +*> Length of RWORK to confirm proper allocation of workspace. +*> LRWORK depends on the job: +*> +*> 1. If only the singular values are requested i.e. if +*> LSAME(JOBU,'N') .AND. LSAME(JOBV,'N') +*> then: +*> 1.1. If LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G'), +*> then: LRWORK = max( 7, 2 * M ). +*> 1.2. Otherwise, LRWORK = max( 7, N ). +*> 2. If singular values with the right singular vectors are requested +*> i.e. if +*> (LSAME(JOBV,'V').OR.LSAME(JOBV,'J')) .AND. +*> .NOT.(LSAME(JOBU,'U').OR.LSAME(JOBU,'F')) +*> then: +*> 2.1. If LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G'), +*> then LRWORK = max( 7, 2 * M ). +*> 2.2. Otherwise, LRWORK = max( 7, N ). +*> 3. If singular values with the left singular vectors are requested, i.e. if +*> (LSAME(JOBU,'U').OR.LSAME(JOBU,'F')) .AND. +*> .NOT.(LSAME(JOBV,'V').OR.LSAME(JOBV,'J')) +*> then: +*> 3.1. If LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G'), +*> then LRWORK = max( 7, 2 * M ). +*> 3.2. Otherwise, LRWORK = max( 7, N ). +*> 4. If singular values with both the left and the right singular vectors +*> are requested, i.e. if +*> (LSAME(JOBU,'U').OR.LSAME(JOBU,'F')) .AND. +*> (LSAME(JOBV,'V').OR.LSAME(JOBV,'J')) +*> then: +*> 4.1. If LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G'), +*> then LRWORK = max( 7, 2 * M ). +*> 4.2. Otherwise, LRWORK = max( 7, N ). +*> +*> If, on entry, LRWORK = -1 or LWORK=-1, a workspace query is assumed and +*> the length of RWORK is returned in RWORK(1). +*> \endverbatim +*> +*> \param[out] IWORK +*> \verbatim +*> IWORK is INTEGER array, of dimension at least 4, that further depends +*> on the job: +*> +*> 1. If only the singular values are requested then: +*> If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') ) +*> then the length of IWORK is N+M; otherwise the length of IWORK is N. +*> 2. If the singular values and the right singular vectors are requested then: +*> If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') ) +*> then the length of IWORK is N+M; otherwise the length of IWORK is N. +*> 3. If the singular values and the left singular vectors are requested then: +*> If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') ) +*> then the length of IWORK is N+M; otherwise the length of IWORK is N. +*> 4. If the singular values with both the left and the right singular vectors +*> are requested, then: +*> 4.1. If LSAME(JOBV,'J') the length of IWORK is determined as follows: +*> If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') ) +*> then the length of IWORK is N+M; otherwise the length of IWORK is N. +*> 4.2. If LSAME(JOBV,'V') the length of IWORK is determined as follows: +*> If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') ) +*> then the length of IWORK is 2*N+M; otherwise the length of IWORK is 2*N. +*> +*> On exit, +*> IWORK(1) = the numerical rank determined after the initial +*> QR factorization with pivoting. See the descriptions +*> of JOBA and JOBR. +*> IWORK(2) = the number of the computed nonzero singular values +*> IWORK(3) = if nonzero, a warning message: +*> If IWORK(3).EQ.1 then some of the column norms of A +*> were denormalized floats. The requested high accuracy +*> is not warranted by the data. +*> IWORK(4) = 1 or -1. If IWORK(4) .EQ. 1, then the procedure used A^* to +*> do the job as specified by the JOB parameters. +*> If the call to CGEJSV is a workspace query (indicated by LWORK .EQ. -1 and +*> LRWORK .EQ. -1), then on exit IWORK(1) contains the required length of +*> IWORK for the job parameters used in the call. +*> \endverbatim +*> +*> \param[out] INFO +*> \verbatim +*> INFO is INTEGER +*> < 0 : if INFO = -i, then the i-th argument had an illegal value. +*> = 0 : successful exit; +*> > 0 : CGEJSV did not converge in the maximal allowed number +*> of sweeps. The computed values may be inaccurate. +*> \endverbatim +* +* Authors: +* ======== +* +*> \author Univ. of Tennessee +*> \author Univ. of California Berkeley +*> \author Univ. of Colorado Denver +*> \author NAG Ltd. +* +*> \date June 2016 +* +*> \ingroup complexGEsing +* +*> \par Further Details: +* ===================== +*> +*> \verbatim +*> CGEJSV implements a preconditioned Jacobi SVD algorithm. It uses CGEQP3, +*> CGEQRF, and CGELQF as preprocessors and preconditioners. Optionally, an +*> additional row pivoting can be used as a preprocessor, which in some +*> cases results in much higher accuracy. An example is matrix A with the +*> structure A = D1 * C * D2, where D1, D2 are arbitrarily ill-conditioned +*> diagonal matrices and C is well-conditioned matrix. In that case, complete +*> pivoting in the first QR factorizations provides accuracy dependent on the +*> condition number of C, and independent of D1, D2. Such higher accuracy is +*> not completely understood theoretically, but it works well in practice. +*> Further, if A can be written as A = B*D, with well-conditioned B and some +*> diagonal D, then the high accuracy is guaranteed, both theoretically and +*> in software, independent of D. For more details see [1], [2]. +*> The computational range for the singular values can be the full range +*> ( UNDERFLOW,OVERFLOW ), provided that the machine arithmetic and the BLAS +*> & LAPACK routines called by CGEJSV are implemented to work in that range. +*> If that is not the case, then the restriction for safe computation with +*> the singular values in the range of normalized IEEE numbers is that the +*> spectral condition number kappa(A)=sigma_max(A)/sigma_min(A) does not +*> overflow. This code (CGEJSV) is best used in this restricted range, +*> meaning that singular values of magnitude below ||A||_2 / SLAMCH('O') are +*> returned as zeros. See JOBR for details on this. +*> Further, this implementation is somewhat slower than the one described +*> in [1,2] due to replacement of some non-LAPACK components, and because +*> the choice of some tuning parameters in the iterative part (CGESVJ) is +*> left to the implementer on a particular machine. +*> The rank revealing QR factorization (in this code: CGEQP3) should be +*> implemented as in [3]. We have a new version of CGEQP3 under development +*> that is more robust than the current one in LAPACK, with a cleaner cut in +*> rank deficient cases. It will be available in the SIGMA library [4]. +*> If M is much larger than N, it is obvious that the initial QRF with +*> column pivoting can be preprocessed by the QRF without pivoting. That +*> well known trick is not used in CGEJSV because in some cases heavy row +*> weighting can be treated with complete pivoting. The overhead in cases +*> M much larger than N is then only due to pivoting, but the benefits in +*> terms of accuracy have prevailed. The implementer/user can incorporate +*> this extra QRF step easily. The implementer can also improve data movement +*> (matrix transpose, matrix copy, matrix transposed copy) - this +*> implementation of CGEJSV uses only the simplest, naive data movement. +*> \endverbatim +* +*> \par Contributor: +* ================== +*> +*> Zlatko Drmac (Zagreb, Croatia) +* +*> \par References: +* ================ +*> +*> \verbatim +*> +*> [1] Z. Drmac and K. Veselic: New fast and accurate Jacobi SVD algorithm I. +*> SIAM J. Matrix Anal. Appl. Vol. 35, No. 2 (2008), pp. 1322-1342. +*> LAPACK Working note 169. +*> [2] Z. Drmac and K. Veselic: New fast and accurate Jacobi SVD algorithm II. +*> SIAM J. Matrix Anal. Appl. Vol. 35, No. 2 (2008), pp. 1343-1362. +*> LAPACK Working note 170. +*> [3] Z. Drmac and Z. Bujanovic: On the failure of rank-revealing QR +*> factorization software - a case study. +*> ACM Trans. Math. Softw. Vol. 35, No 2 (2008), pp. 1-28. +*> LAPACK Working note 176. +*> [4] Z. Drmac: SIGMA - mathematical software library for accurate SVD, PSV, +*> QSVD, (H,K)-SVD computations. +*> Department of Mathematics, University of Zagreb, 2008, 2016. +*> \endverbatim +* +*> \par Bugs, examples and comments: +* ================================= +*> +*> Please report all bugs and send interesting examples and/or comments to +*> drmac@math.hr. Thank you. +*> +* ===================================================================== + SUBROUTINE CGEJSV( JOBA, JOBU, JOBV, JOBR, JOBT, JOBP, + $ M, N, A, LDA, SVA, U, LDU, V, LDV, + $ CWORK, LWORK, RWORK, LRWORK, IWORK, INFO ) +* +* -- LAPACK computational routine (version 3.7.1) -- +* -- LAPACK is a software package provided by Univ. of Tennessee, -- +* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- +* June 2017 +* +* .. Scalar Arguments .. + IMPLICIT NONE + INTEGER INFO, LDA, LDU, LDV, LWORK, LRWORK, M, N +* .. +* .. Array Arguments .. + COMPLEX A( LDA, * ), U( LDU, * ), V( LDV, * ), CWORK( LWORK ) + REAL SVA( N ), RWORK( LRWORK ) + INTEGER IWORK( * ) + CHARACTER*1 JOBA, JOBP, JOBR, JOBT, JOBU, JOBV +* .. +* +* =========================================================================== +* +* .. Local Parameters .. + REAL ZERO, ONE + PARAMETER ( ZERO = 0.0E0, ONE = 1.0E0 ) + COMPLEX CZERO, CONE + PARAMETER ( CZERO = ( 0.0E0, 0.0E0 ), CONE = ( 1.0E0, 0.0E0 ) ) +* .. +* .. Local Scalars .. + COMPLEX CTEMP + REAL AAPP, AAQQ, AATMAX, AATMIN, BIG, BIG1, COND_OK, + $ CONDR1, CONDR2, ENTRA, ENTRAT, EPSLN, MAXPRJ, SCALEM, + $ SCONDA, SFMIN, SMALL, TEMP1, USCAL1, USCAL2, XSC + INTEGER IERR, N1, NR, NUMRANK, p, q, WARNING + LOGICAL ALMORT, DEFR, ERREST, GOSCAL, JRACC, KILL, LQUERY, + $ LSVEC, L2ABER, L2KILL, L2PERT, L2RANK, L2TRAN, NOSCAL, + $ ROWPIV, RSVEC, TRANSP +* + INTEGER OPTWRK, MINWRK, MINRWRK, MINIWRK + INTEGER LWCON, LWLQF, LWQP3, LWQRF, LWUNMLQ, LWUNMQR, LWUNMQRM, + $ LWSVDJ, LWSVDJV, LRWQP3, LRWCON, LRWSVDJ, IWOFF + INTEGER LWRK_CGELQF, LWRK_CGEQP3, LWRK_CGEQP3N, LWRK_CGEQRF, + $ LWRK_CGESVJ, LWRK_CGESVJV, LWRK_CGESVJU, LWRK_CUNMLQ, + $ LWRK_CUNMQR, LWRK_CUNMQRM +* .. +* .. Local Arrays + COMPLEX CDUMMY(1) + REAL RDUMMY(1) +* +* .. Intrinsic Functions .. + INTRINSIC ABS, CMPLX, CONJG, ALOG, MAX, MIN, REAL, NINT, SQRT +* .. +* .. External Functions .. + REAL SLAMCH, SCNRM2 + INTEGER ISAMAX, ICAMAX + LOGICAL LSAME + EXTERNAL ISAMAX, ICAMAX, LSAME, SLAMCH, SCNRM2 +* .. +* .. External Subroutines .. + EXTERNAL SLASSQ, CCOPY, CGELQF, CGEQP3, CGEQRF, CLACPY, CLAPMR, + $ CLASCL, SLASCL, CLASET, CLASSQ, CLASWP, CUNGQR, CUNMLQ, + $ CUNMQR, CPOCON, SSCAL, CSSCAL, CSWAP, CTRSM, CLACGV, + $ XERBLA +* + EXTERNAL CGESVJ +* .. +* +* Test the input arguments +* + LSVEC = LSAME( JOBU, 'U' ) .OR. LSAME( JOBU, 'F' ) + JRACC = LSAME( JOBV, 'J' ) + RSVEC = LSAME( JOBV, 'V' ) .OR. JRACC + ROWPIV = LSAME( JOBA, 'F' ) .OR. LSAME( JOBA, 'G' ) + L2RANK = LSAME( JOBA, 'R' ) + L2ABER = LSAME( JOBA, 'A' ) + ERREST = LSAME( JOBA, 'E' ) .OR. LSAME( JOBA, 'G' ) + L2TRAN = LSAME( JOBT, 'T' ) .AND. ( M .EQ. N ) + L2KILL = LSAME( JOBR, 'R' ) + DEFR = LSAME( JOBR, 'N' ) + L2PERT = LSAME( JOBP, 'P' ) +* + LQUERY = ( LWORK .EQ. -1 ) .OR. ( LRWORK .EQ. -1 ) +* + IF ( .NOT.(ROWPIV .OR. L2RANK .OR. L2ABER .OR. + $ ERREST .OR. LSAME( JOBA, 'C' ) )) THEN + INFO = - 1 + ELSE IF ( .NOT.( LSVEC .OR. LSAME( JOBU, 'N' ) .OR. + $ ( LSAME( JOBU, 'W' ) .AND. RSVEC .AND. L2TRAN ) ) ) THEN + INFO = - 2 + ELSE IF ( .NOT.( RSVEC .OR. LSAME( JOBV, 'N' ) .OR. + $ ( LSAME( JOBV, 'W' ) .AND. LSVEC .AND. L2TRAN ) ) ) THEN + INFO = - 3 + ELSE IF ( .NOT. ( L2KILL .OR. DEFR ) ) THEN + INFO = - 4 + ELSE IF ( .NOT. ( LSAME(JOBT,'T') .OR. LSAME(JOBT,'N') ) ) THEN + INFO = - 5 + ELSE IF ( .NOT. ( L2PERT .OR. LSAME( JOBP, 'N' ) ) ) THEN + INFO = - 6 + ELSE IF ( M .LT. 0 ) THEN + INFO = - 7 + ELSE IF ( ( N .LT. 0 ) .OR. ( N .GT. M ) ) THEN + INFO = - 8 + ELSE IF ( LDA .LT. M ) THEN + INFO = - 10 + ELSE IF ( LSVEC .AND. ( LDU .LT. M ) ) THEN + INFO = - 13 + ELSE IF ( RSVEC .AND. ( LDV .LT. N ) ) THEN + INFO = - 15 + ELSE +* #:) + INFO = 0 + END IF +* + IF ( INFO .EQ. 0 ) THEN +* .. compute the minimal and the optimal workspace lengths +* [[The expressions for computing the minimal and the optimal +* values of LCWORK, LRWORK are written with a lot of redundancy and +* can be simplified. However, this verbose form is useful for +* maintenance and modifications of the code.]] +* +* .. minimal workspace length for CGEQP3 of an M x N matrix, +* CGEQRF of an N x N matrix, CGELQF of an N x N matrix, +* CUNMLQ for computing N x N matrix, CUNMQR for computing N x N +* matrix, CUNMQR for computing M x N matrix, respectively. + LWQP3 = N+1 + LWQRF = MAX( 1, N ) + LWLQF = MAX( 1, N ) + LWUNMLQ = MAX( 1, N ) + LWUNMQR = MAX( 1, N ) + LWUNMQRM = MAX( 1, M ) +* .. minimal workspace length for CPOCON of an N x N matrix + LWCON = 2 * N +* .. minimal workspace length for CGESVJ of an N x N matrix, +* without and with explicit accumulation of Jacobi rotations + LWSVDJ = MAX( 2 * N, 1 ) + LWSVDJV = MAX( 2 * N, 1 ) +* .. minimal REAL workspace length for CGEQP3, CPOCON, CGESVJ + LRWQP3 = N + LRWCON = N + LRWSVDJ = N + IF ( LQUERY ) THEN + CALL CGEQP3( M, N, A, LDA, IWORK, CDUMMY, CDUMMY, -1, + $ RDUMMY, IERR ) + LWRK_CGEQP3 = CDUMMY(1) + CALL CGEQRF( N, N, A, LDA, CDUMMY, CDUMMY,-1, IERR ) + LWRK_CGEQRF = CDUMMY(1) + CALL CGELQF( N, N, A, LDA, CDUMMY, CDUMMY,-1, IERR ) + LWRK_CGELQF = CDUMMY(1) + END IF + MINWRK = 2 + OPTWRK = 2 + MINIWRK = N + IF ( .NOT. (LSVEC .OR. RSVEC ) ) THEN +* .. minimal and optimal sizes of the complex workspace if +* only the singular values are requested + IF ( ERREST ) THEN + MINWRK = MAX( N+LWQP3, N**2+LWCON, N+LWQRF, LWSVDJ ) + ELSE + MINWRK = MAX( N+LWQP3, N+LWQRF, LWSVDJ ) + END IF + IF ( LQUERY ) THEN + CALL CGESVJ( 'L', 'N', 'N', N, N, A, LDA, SVA, N, V, + $ LDV, CDUMMY, -1, RDUMMY, -1, IERR ) + LWRK_CGESVJ = CDUMMY(1) + IF ( ERREST ) THEN + OPTWRK = MAX( N+LWRK_CGEQP3, N**2+LWCON, + $ N+LWRK_CGEQRF, LWRK_CGESVJ ) + ELSE + OPTWRK = MAX( N+LWRK_CGEQP3, N+LWRK_CGEQRF, + $ LWRK_CGESVJ ) + END IF + END IF + IF ( L2TRAN .OR. ROWPIV ) THEN + IF ( ERREST ) THEN + MINRWRK = MAX( 7, 2*M, LRWQP3, LRWCON, LRWSVDJ ) + ELSE + MINRWRK = MAX( 7, 2*M, LRWQP3, LRWSVDJ ) + END IF + ELSE + IF ( ERREST ) THEN + MINRWRK = MAX( 7, LRWQP3, LRWCON, LRWSVDJ ) + ELSE + MINRWRK = MAX( 7, LRWQP3, LRWSVDJ ) + END IF + END IF + IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M + ELSE IF ( RSVEC .AND. (.NOT.LSVEC) ) THEN +* .. minimal and optimal sizes of the complex workspace if the +* singular values and the right singular vectors are requested + IF ( ERREST ) THEN + MINWRK = MAX( N+LWQP3, LWCON, LWSVDJ, N+LWLQF, + $ 2*N+LWQRF, N+LWSVDJ, N+LWUNMLQ ) + ELSE + MINWRK = MAX( N+LWQP3, LWSVDJ, N+LWLQF, 2*N+LWQRF, + $ N+LWSVDJ, N+LWUNMLQ ) + END IF + IF ( LQUERY ) THEN + CALL CGESVJ( 'L', 'U', 'N', N,N, U, LDU, SVA, N, A, + $ LDA, CDUMMY, -1, RDUMMY, -1, IERR ) + LWRK_CGESVJ = CDUMMY(1) + CALL CUNMLQ( 'L', 'C', N, N, N, A, LDA, CDUMMY, + $ V, LDV, CDUMMY, -1, IERR ) + LWRK_CUNMLQ = CDUMMY(1) + IF ( ERREST ) THEN + OPTWRK = MAX( N+LWRK_CGEQP3, LWCON, LWRK_CGESVJ, + $ N+LWRK_CGELQF, 2*N+LWRK_CGEQRF, + $ N+LWRK_CGESVJ, N+LWRK_CUNMLQ ) + ELSE + OPTWRK = MAX( N+LWRK_CGEQP3, LWRK_CGESVJ,N+LWRK_CGELQF, + $ 2*N+LWRK_CGEQRF, N+LWRK_CGESVJ, + $ N+LWRK_CUNMLQ ) + END IF + END IF + IF ( L2TRAN .OR. ROWPIV ) THEN + IF ( ERREST ) THEN + MINRWRK = MAX( 7, 2*M, LRWQP3, LRWSVDJ, LRWCON ) + ELSE + MINRWRK = MAX( 7, 2*M, LRWQP3, LRWSVDJ ) + END IF + ELSE + IF ( ERREST ) THEN + MINRWRK = MAX( 7, LRWQP3, LRWSVDJ, LRWCON ) + ELSE + MINRWRK = MAX( 7, LRWQP3, LRWSVDJ ) + END IF + END IF + IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M + ELSE IF ( LSVEC .AND. (.NOT.RSVEC) ) THEN +* .. minimal and optimal sizes of the complex workspace if the +* singular values and the left singular vectors are requested + IF ( ERREST ) THEN + MINWRK = N + MAX( LWQP3,LWCON,N+LWQRF,LWSVDJ,LWUNMQRM ) + ELSE + MINWRK = N + MAX( LWQP3, N+LWQRF, LWSVDJ, LWUNMQRM ) + END IF + IF ( LQUERY ) THEN + CALL CGESVJ( 'L', 'U', 'N', N,N, U, LDU, SVA, N, A, + $ LDA, CDUMMY, -1, RDUMMY, -1, IERR ) + LWRK_CGESVJ = CDUMMY(1) + CALL CUNMQR( 'L', 'N', M, N, N, A, LDA, CDUMMY, U, + $ LDU, CDUMMY, -1, IERR ) + LWRK_CUNMQRM = CDUMMY(1) + IF ( ERREST ) THEN + OPTWRK = N + MAX( LWRK_CGEQP3, LWCON, N+LWRK_CGEQRF, + $ LWRK_CGESVJ, LWRK_CUNMQRM ) + ELSE + OPTWRK = N + MAX( LWRK_CGEQP3, N+LWRK_CGEQRF, + $ LWRK_CGESVJ, LWRK_CUNMQRM ) + END IF + END IF + IF ( L2TRAN .OR. ROWPIV ) THEN + IF ( ERREST ) THEN + MINRWRK = MAX( 7, 2*M, LRWQP3, LRWSVDJ, LRWCON ) + ELSE + MINRWRK = MAX( 7, 2*M, LRWQP3, LRWSVDJ ) + END IF + ELSE + IF ( ERREST ) THEN + MINRWRK = MAX( 7, LRWQP3, LRWSVDJ, LRWCON ) + ELSE + MINRWRK = MAX( 7, LRWQP3, LRWSVDJ ) + END IF + END IF + IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M + ELSE +* .. minimal and optimal sizes of the complex workspace if the +* full SVD is requested + IF ( .NOT. JRACC ) THEN + IF ( ERREST ) THEN + MINWRK = MAX( N+LWQP3, N+LWCON, 2*N+N**2+LWCON, + $ 2*N+LWQRF, 2*N+LWQP3, + $ 2*N+N**2+N+LWLQF, 2*N+N**2+N+N**2+LWCON, + $ 2*N+N**2+N+LWSVDJ, 2*N+N**2+N+LWSVDJV, + $ 2*N+N**2+N+LWUNMQR,2*N+N**2+N+LWUNMLQ, + $ N+N**2+LWSVDJ, N+LWUNMQRM ) + ELSE + MINWRK = MAX( N+LWQP3, 2*N+N**2+LWCON, + $ 2*N+LWQRF, 2*N+LWQP3, + $ 2*N+N**2+N+LWLQF, 2*N+N**2+N+N**2+LWCON, + $ 2*N+N**2+N+LWSVDJ, 2*N+N**2+N+LWSVDJV, + $ 2*N+N**2+N+LWUNMQR,2*N+N**2+N+LWUNMLQ, + $ N+N**2+LWSVDJ, N+LWUNMQRM ) + END IF + MINIWRK = MINIWRK + N + IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M + ELSE + IF ( ERREST ) THEN + MINWRK = MAX( N+LWQP3, N+LWCON, 2*N+LWQRF, + $ 2*N+N**2+LWSVDJV, 2*N+N**2+N+LWUNMQR, + $ N+LWUNMQRM ) + ELSE + MINWRK = MAX( N+LWQP3, 2*N+LWQRF, + $ 2*N+N**2+LWSVDJV, 2*N+N**2+N+LWUNMQR, + $ N+LWUNMQRM ) + END IF + IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M + END IF + IF ( LQUERY ) THEN + CALL CUNMQR( 'L', 'N', M, N, N, A, LDA, CDUMMY, U, + $ LDU, CDUMMY, -1, IERR ) + LWRK_CUNMQRM = CDUMMY(1) + CALL CUNMQR( 'L', 'N', N, N, N, A, LDA, CDUMMY, U, + $ LDU, CDUMMY, -1, IERR ) + LWRK_CUNMQR = CDUMMY(1) + IF ( .NOT. JRACC ) THEN + CALL CGEQP3( N,N, A, LDA, IWORK, CDUMMY,CDUMMY, -1, + $ RDUMMY, IERR ) + LWRK_CGEQP3N = CDUMMY(1) + CALL CGESVJ( 'L', 'U', 'N', N, N, U, LDU, SVA, + $ N, V, LDV, CDUMMY, -1, RDUMMY, -1, IERR ) + LWRK_CGESVJ = CDUMMY(1) + CALL CGESVJ( 'U', 'U', 'N', N, N, U, LDU, SVA, + $ N, V, LDV, CDUMMY, -1, RDUMMY, -1, IERR ) + LWRK_CGESVJU = CDUMMY(1) + CALL CGESVJ( 'L', 'U', 'V', N, N, U, LDU, SVA, + $ N, V, LDV, CDUMMY, -1, RDUMMY, -1, IERR ) + LWRK_CGESVJV = CDUMMY(1) + CALL CUNMLQ( 'L', 'C', N, N, N, A, LDA, CDUMMY, + $ V, LDV, CDUMMY, -1, IERR ) + LWRK_CUNMLQ = CDUMMY(1) + IF ( ERREST ) THEN + OPTWRK = MAX( N+LWRK_CGEQP3, N+LWCON, + $ 2*N+N**2+LWCON, 2*N+LWRK_CGEQRF, + $ 2*N+LWRK_CGEQP3N, + $ 2*N+N**2+N+LWRK_CGELQF, + $ 2*N+N**2+N+N**2+LWCON, + $ 2*N+N**2+N+LWRK_CGESVJ, + $ 2*N+N**2+N+LWRK_CGESVJV, + $ 2*N+N**2+N+LWRK_CUNMQR, + $ 2*N+N**2+N+LWRK_CUNMLQ, + $ N+N**2+LWRK_CGESVJU, + $ N+LWRK_CUNMQRM ) + ELSE + OPTWRK = MAX( N+LWRK_CGEQP3, + $ 2*N+N**2+LWCON, 2*N+LWRK_CGEQRF, + $ 2*N+LWRK_CGEQP3N, + $ 2*N+N**2+N+LWRK_CGELQF, + $ 2*N+N**2+N+N**2+LWCON, + $ 2*N+N**2+N+LWRK_CGESVJ, + $ 2*N+N**2+N+LWRK_CGESVJV, + $ 2*N+N**2+N+LWRK_CUNMQR, + $ 2*N+N**2+N+LWRK_CUNMLQ, + $ N+N**2+LWRK_CGESVJU, + $ N+LWRK_CUNMQRM ) + END IF + ELSE + CALL CGESVJ( 'L', 'U', 'V', N, N, U, LDU, SVA, + $ N, V, LDV, CDUMMY, -1, RDUMMY, -1, IERR ) + LWRK_CGESVJV = CDUMMY(1) + CALL CUNMQR( 'L', 'N', N, N, N, CDUMMY, N, CDUMMY, + $ V, LDV, CDUMMY, -1, IERR ) + LWRK_CUNMQR = CDUMMY(1) + CALL CUNMQR( 'L', 'N', M, N, N, A, LDA, CDUMMY, U, + $ LDU, CDUMMY, -1, IERR ) + LWRK_CUNMQRM = CDUMMY(1) + IF ( ERREST ) THEN + OPTWRK = MAX( N+LWRK_CGEQP3, N+LWCON, + $ 2*N+LWRK_CGEQRF, 2*N+N**2, + $ 2*N+N**2+LWRK_CGESVJV, + $ 2*N+N**2+N+LWRK_CUNMQR,N+LWRK_CUNMQRM ) + ELSE + OPTWRK = MAX( N+LWRK_CGEQP3, 2*N+LWRK_CGEQRF, + $ 2*N+N**2, 2*N+N**2+LWRK_CGESVJV, + $ 2*N+N**2+N+LWRK_CUNMQR, + $ N+LWRK_CUNMQRM ) + END IF + END IF + END IF + IF ( L2TRAN .OR. ROWPIV ) THEN + MINRWRK = MAX( 7, 2*M, LRWQP3, LRWSVDJ, LRWCON ) + ELSE + MINRWRK = MAX( 7, LRWQP3, LRWSVDJ, LRWCON ) + END IF + END IF + MINWRK = MAX( 2, MINWRK ) + OPTWRK = MAX( 2, OPTWRK ) + IF ( LWORK .LT. MINWRK .AND. (.NOT.LQUERY) ) INFO = - 17 + IF ( LRWORK .LT. MINRWRK .AND. (.NOT.LQUERY) ) INFO = - 19 + END IF +* + IF ( INFO .NE. 0 ) THEN +* #:( + CALL XERBLA( 'CGEJSV', - INFO ) + RETURN + ELSE IF ( LQUERY ) THEN + CWORK(1) = OPTWRK + CWORK(2) = MINWRK + RWORK(1) = MINRWRK + IWORK(1) = MAX( 4, MINIWRK ) + RETURN + END IF +* +* Quick return for void matrix (Y3K safe) +* #:) + IF ( ( M .EQ. 0 ) .OR. ( N .EQ. 0 ) ) THEN + IWORK(1:4) = 0 + RWORK(1:7) = 0 + RETURN + ENDIF +* +* Determine whether the matrix U should be M x N or M x M +* + IF ( LSVEC ) THEN + N1 = N + IF ( LSAME( JOBU, 'F' ) ) N1 = M + END IF +* +* Set numerical parameters +* +*! NOTE: Make sure SLAMCH() does not fail on the target architecture. +* + EPSLN = SLAMCH('Epsilon') + SFMIN = SLAMCH('SafeMinimum') + SMALL = SFMIN / EPSLN + BIG = SLAMCH('O') +* BIG = ONE / SFMIN +* +* Initialize SVA(1:N) = diag( ||A e_i||_2 )_1^N +* +*(!) If necessary, scale SVA() to protect the largest norm from +* overflow. It is possible that this scaling pushes the smallest +* column norm left from the underflow threshold (extreme case). +* + SCALEM = ONE / SQRT(REAL(M)*REAL(N)) + NOSCAL = .TRUE. + GOSCAL = .TRUE. + DO 1874 p = 1, N + AAPP = ZERO + AAQQ = ONE + CALL CLASSQ( M, A(1,p), 1, AAPP, AAQQ ) + IF ( AAPP .GT. BIG ) THEN + INFO = - 9 + CALL XERBLA( 'CGEJSV', -INFO ) + RETURN + END IF + AAQQ = SQRT(AAQQ) + IF ( ( AAPP .LT. (BIG / AAQQ) ) .AND. NOSCAL ) THEN + SVA(p) = AAPP * AAQQ + ELSE + NOSCAL = .FALSE. + SVA(p) = AAPP * ( AAQQ * SCALEM ) + IF ( GOSCAL ) THEN + GOSCAL = .FALSE. + CALL SSCAL( p-1, SCALEM, SVA, 1 ) + END IF + END IF + 1874 CONTINUE +* + IF ( NOSCAL ) SCALEM = ONE +* + AAPP = ZERO + AAQQ = BIG + DO 4781 p = 1, N + AAPP = MAX( AAPP, SVA(p) ) + IF ( SVA(p) .NE. ZERO ) AAQQ = MIN( AAQQ, SVA(p) ) + 4781 CONTINUE +* +* Quick return for zero M x N matrix +* #:) + IF ( AAPP .EQ. ZERO ) THEN + IF ( LSVEC ) CALL CLASET( 'G', M, N1, CZERO, CONE, U, LDU ) + IF ( RSVEC ) CALL CLASET( 'G', N, N, CZERO, CONE, V, LDV ) + RWORK(1) = ONE + RWORK(2) = ONE + IF ( ERREST ) RWORK(3) = ONE + IF ( LSVEC .AND. RSVEC ) THEN + RWORK(4) = ONE + RWORK(5) = ONE + END IF + IF ( L2TRAN ) THEN + RWORK(6) = ZERO + RWORK(7) = ZERO + END IF + IWORK(1) = 0 + IWORK(2) = 0 + IWORK(3) = 0 + IWORK(4) = -1 + RETURN + END IF +* +* Issue warning if denormalized column norms detected. Override the +* high relative accuracy request. Issue licence to kill nonzero columns +* (set them to zero) whose norm is less than sigma_max / BIG (roughly). +* #:( + WARNING = 0 + IF ( AAQQ .LE. SFMIN ) THEN + L2RANK = .TRUE. + L2KILL = .TRUE. + WARNING = 1 + END IF +* +* Quick return for one-column matrix +* #:) + IF ( N .EQ. 1 ) THEN +* + IF ( LSVEC ) THEN + CALL CLASCL( 'G',0,0,SVA(1),SCALEM, M,1,A(1,1),LDA,IERR ) + CALL CLACPY( 'A', M, 1, A, LDA, U, LDU ) +* computing all M left singular vectors of the M x 1 matrix + IF ( N1 .NE. N ) THEN + CALL CGEQRF( M, N, U,LDU, CWORK, CWORK(N+1),LWORK-N,IERR ) + CALL CUNGQR( M,N1,1, U,LDU,CWORK,CWORK(N+1),LWORK-N,IERR ) + CALL CCOPY( M, A(1,1), 1, U(1,1), 1 ) + END IF + END IF + IF ( RSVEC ) THEN + V(1,1) = CONE + END IF + IF ( SVA(1) .LT. (BIG*SCALEM) ) THEN + SVA(1) = SVA(1) / SCALEM + SCALEM = ONE + END IF + RWORK(1) = ONE / SCALEM + RWORK(2) = ONE + IF ( SVA(1) .NE. ZERO ) THEN + IWORK(1) = 1 + IF ( ( SVA(1) / SCALEM) .GE. SFMIN ) THEN + IWORK(2) = 1 + ELSE + IWORK(2) = 0 + END IF + ELSE + IWORK(1) = 0 + IWORK(2) = 0 + END IF + IWORK(3) = 0 + IWORK(4) = -1 + IF ( ERREST ) RWORK(3) = ONE + IF ( LSVEC .AND. RSVEC ) THEN + RWORK(4) = ONE + RWORK(5) = ONE + END IF + IF ( L2TRAN ) THEN + RWORK(6) = ZERO + RWORK(7) = ZERO + END IF + RETURN +* + END IF +* + TRANSP = .FALSE. +* + AATMAX = -ONE + AATMIN = BIG + IF ( ROWPIV .OR. L2TRAN ) THEN +* +* Compute the row norms, needed to determine row pivoting sequence +* (in the case of heavily row weighted A, row pivoting is strongly +* advised) and to collect information needed to compare the +* structures of A * A^* and A^* * A (in the case L2TRAN.EQ..TRUE.). +* + IF ( L2TRAN ) THEN + DO 1950 p = 1, M + XSC = ZERO + TEMP1 = ONE + CALL CLASSQ( N, A(p,1), LDA, XSC, TEMP1 ) +* CLASSQ gets both the ell_2 and the ell_infinity norm +* in one pass through the vector + RWORK(M+p) = XSC * SCALEM + RWORK(p) = XSC * (SCALEM*SQRT(TEMP1)) + AATMAX = MAX( AATMAX, RWORK(p) ) + IF (RWORK(p) .NE. ZERO) + $ AATMIN = MIN(AATMIN,RWORK(p)) + 1950 CONTINUE + ELSE + DO 1904 p = 1, M + RWORK(M+p) = SCALEM*ABS( A(p,ICAMAX(N,A(p,1),LDA)) ) + AATMAX = MAX( AATMAX, RWORK(M+p) ) + AATMIN = MIN( AATMIN, RWORK(M+p) ) + 1904 CONTINUE + END IF +* + END IF +* +* For square matrix A try to determine whether A^* would be better +* input for the preconditioned Jacobi SVD, with faster convergence. +* The decision is based on an O(N) function of the vector of column +* and row norms of A, based on the Shannon entropy. This should give +* the right choice in most cases when the difference actually matters. +* It may fail and pick the slower converging side. +* + ENTRA = ZERO + ENTRAT = ZERO + IF ( L2TRAN ) THEN +* + XSC = ZERO + TEMP1 = ONE + CALL SLASSQ( N, SVA, 1, XSC, TEMP1 ) + TEMP1 = ONE / TEMP1 +* + ENTRA = ZERO + DO 1113 p = 1, N + BIG1 = ( ( SVA(p) / XSC )**2 ) * TEMP1 + IF ( BIG1 .NE. ZERO ) ENTRA = ENTRA + BIG1 * ALOG(BIG1) + 1113 CONTINUE + ENTRA = - ENTRA / ALOG(REAL(N)) +* +* Now, SVA().^2/Trace(A^* * A) is a point in the probability simplex. +* It is derived from the diagonal of A^* * A. Do the same with the +* diagonal of A * A^*, compute the entropy of the corresponding +* probability distribution. Note that A * A^* and A^* * A have the +* same trace. +* + ENTRAT = ZERO + DO 1114 p = 1, M + BIG1 = ( ( RWORK(p) / XSC )**2 ) * TEMP1 + IF ( BIG1 .NE. ZERO ) ENTRAT = ENTRAT + BIG1 * ALOG(BIG1) + 1114 CONTINUE + ENTRAT = - ENTRAT / ALOG(REAL(M)) +* +* Analyze the entropies and decide A or A^*. Smaller entropy +* usually means better input for the algorithm. +* + TRANSP = ( ENTRAT .LT. ENTRA ) +* +* If A^* is better than A, take the adjoint of A. This is allowed +* only for square matrices, M=N. + IF ( TRANSP ) THEN +* In an optimal implementation, this trivial transpose +* should be replaced with faster transpose. + DO 1115 p = 1, N - 1 + A(p,p) = CONJG(A(p,p)) + DO 1116 q = p + 1, N + CTEMP = CONJG(A(q,p)) + A(q,p) = CONJG(A(p,q)) + A(p,q) = CTEMP + 1116 CONTINUE + 1115 CONTINUE + A(N,N) = CONJG(A(N,N)) + DO 1117 p = 1, N + RWORK(M+p) = SVA(p) + SVA(p) = RWORK(p) +* previously computed row 2-norms are now column 2-norms +* of the transposed matrix + 1117 CONTINUE + TEMP1 = AAPP + AAPP = AATMAX + AATMAX = TEMP1 + TEMP1 = AAQQ + AAQQ = AATMIN + AATMIN = TEMP1 + KILL = LSVEC + LSVEC = RSVEC + RSVEC = KILL + IF ( LSVEC ) N1 = N +* + ROWPIV = .TRUE. + END IF +* + END IF +* END IF L2TRAN +* +* Scale the matrix so that its maximal singular value remains less +* than SQRT(BIG) -- the matrix is scaled so that its maximal column +* has Euclidean norm equal to SQRT(BIG/N). The only reason to keep +* SQRT(BIG) instead of BIG is the fact that CGEJSV uses LAPACK and +* BLAS routines that, in some implementations, are not capable of +* working in the full interval [SFMIN,BIG] and that they may provoke +* overflows in the intermediate results. If the singular values spread +* from SFMIN to BIG, then CGESVJ will compute them. So, in that case, +* one should use CGESVJ instead of CGEJSV. + BIG1 = SQRT( BIG ) + TEMP1 = SQRT( BIG / REAL(N) ) +* >> for future updates: allow bigger range, i.e. the largest column +* will be allowed up to BIG/N and CGESVJ will do the rest. However, for +* this all other (LAPACK) components must allow such a range. +* TEMP1 = BIG/REAL(N) +* TEMP1 = BIG * EPSLN this should 'almost' work with current LAPACK components + CALL SLASCL( 'G', 0, 0, AAPP, TEMP1, N, 1, SVA, N, IERR ) + IF ( AAQQ .GT. (AAPP * SFMIN) ) THEN + AAQQ = ( AAQQ / AAPP ) * TEMP1 + ELSE + AAQQ = ( AAQQ * TEMP1 ) / AAPP + END IF + TEMP1 = TEMP1 * SCALEM + CALL CLASCL( 'G', 0, 0, AAPP, TEMP1, M, N, A, LDA, IERR ) +* +* To undo scaling at the end of this procedure, multiply the +* computed singular values with USCAL2 / USCAL1. +* + USCAL1 = TEMP1 + USCAL2 = AAPP +* + IF ( L2KILL ) THEN +* L2KILL enforces computation of nonzero singular values in +* the restricted range of condition number of the initial A, +* sigma_max(A) / sigma_min(A) approx. SQRT(BIG)/SQRT(SFMIN). + XSC = SQRT( SFMIN ) + ELSE + XSC = SMALL +* +* Now, if the condition number of A is too big, +* sigma_max(A) / sigma_min(A) .GT. SQRT(BIG/N) * EPSLN / SFMIN, +* as a precaution measure, the full SVD is computed using CGESVJ +* with accumulated Jacobi rotations. This provides numerically +* more robust computation, at the cost of slightly increased run +* time. Depending on the concrete implementation of BLAS and LAPACK +* (i.e. how they behave in presence of extreme ill-conditioning) the +* implementor may decide to remove this switch. + IF ( ( AAQQ.LT.SQRT(SFMIN) ) .AND. LSVEC .AND. RSVEC ) THEN + JRACC = .TRUE. + END IF +* + END IF + IF ( AAQQ .LT. XSC ) THEN + DO 700 p = 1, N + IF ( SVA(p) .LT. XSC ) THEN + CALL CLASET( 'A', M, 1, CZERO, CZERO, A(1,p), LDA ) + SVA(p) = ZERO + END IF + 700 CONTINUE + END IF +* +* Preconditioning using QR factorization with pivoting +* + IF ( ROWPIV ) THEN +* Optional row permutation (Bjoerck row pivoting): +* A result by Cox and Higham shows that the Bjoerck's +* row pivoting combined with standard column pivoting +* has similar effect as Powell-Reid complete pivoting. +* The ell-infinity norms of A are made nonincreasing. + IF ( ( LSVEC .AND. RSVEC ) .AND. .NOT.( JRACC ) ) THEN + IWOFF = 2*N + ELSE + IWOFF = N + END IF + DO 1952 p = 1, M - 1 + q = ISAMAX( M-p+1, RWORK(M+p), 1 ) + p - 1 + IWORK(IWOFF+p) = q + IF ( p .NE. q ) THEN + TEMP1 = RWORK(M+p) + RWORK(M+p) = RWORK(M+q) + RWORK(M+q) = TEMP1 + END IF + 1952 CONTINUE + CALL CLASWP( N, A, LDA, 1, M-1, IWORK(IWOFF+1), 1 ) + END IF +* +* End of the preparation phase (scaling, optional sorting and +* transposing, optional flushing of small columns). +* +* Preconditioning +* +* If the full SVD is needed, the right singular vectors are computed +* from a matrix equation, and for that we need theoretical analysis +* of the Businger-Golub pivoting. So we use CGEQP3 as the first RR QRF. +* In all other cases the first RR QRF can be chosen by other criteria +* (eg speed by replacing global with restricted window pivoting, such +* as in xGEQPX from TOMS # 782). Good results will be obtained using +* xGEQPX with properly (!) chosen numerical parameters. +* Any improvement of CGEQP3 improves overal performance of CGEJSV. +* +* A * P1 = Q1 * [ R1^* 0]^*: + DO 1963 p = 1, N +* .. all columns are free columns + IWORK(p) = 0 + 1963 CONTINUE + CALL CGEQP3( M, N, A, LDA, IWORK, CWORK, CWORK(N+1), LWORK-N, + $ RWORK, IERR ) +* +* The upper triangular matrix R1 from the first QRF is inspected for +* rank deficiency and possibilities for deflation, or possible +* ill-conditioning. Depending on the user specified flag L2RANK, +* the procedure explores possibilities to reduce the numerical +* rank by inspecting the computed upper triangular factor. If +* L2RANK or L2ABER are up, then CGEJSV will compute the SVD of +* A + dA, where ||dA|| <= f(M,N)*EPSLN. +* + NR = 1 + IF ( L2ABER ) THEN +* Standard absolute error bound suffices. All sigma_i with +* sigma_i < N*EPSLN*||A|| are flushed to zero. This is an +* agressive enforcement of lower numerical rank by introducing a +* backward error of the order of N*EPSLN*||A||. + TEMP1 = SQRT(REAL(N))*EPSLN + DO 3001 p = 2, N + IF ( ABS(A(p,p)) .GE. (TEMP1*ABS(A(1,1))) ) THEN + NR = NR + 1 + ELSE + GO TO 3002 + END IF + 3001 CONTINUE + 3002 CONTINUE + ELSE IF ( L2RANK ) THEN +* .. similarly as above, only slightly more gentle (less agressive). +* Sudden drop on the diagonal of R1 is used as the criterion for +* close-to-rank-defficient. + TEMP1 = SQRT(SFMIN) + DO 3401 p = 2, N + IF ( ( ABS(A(p,p)) .LT. (EPSLN*ABS(A(p-1,p-1))) ) .OR. + $ ( ABS(A(p,p)) .LT. SMALL ) .OR. + $ ( L2KILL .AND. (ABS(A(p,p)) .LT. TEMP1) ) ) GO TO 3402 + NR = NR + 1 + 3401 CONTINUE + 3402 CONTINUE +* + ELSE +* The goal is high relative accuracy. However, if the matrix +* has high scaled condition number the relative accuracy is in +* general not feasible. Later on, a condition number estimator +* will be deployed to estimate the scaled condition number. +* Here we just remove the underflowed part of the triangular +* factor. This prevents the situation in which the code is +* working hard to get the accuracy not warranted by the data. + TEMP1 = SQRT(SFMIN) + DO 3301 p = 2, N + IF ( ( ABS(A(p,p)) .LT. SMALL ) .OR. + $ ( L2KILL .AND. (ABS(A(p,p)) .LT. TEMP1) ) ) GO TO 3302 + NR = NR + 1 + 3301 CONTINUE + 3302 CONTINUE +* + END IF +* + ALMORT = .FALSE. + IF ( NR .EQ. N ) THEN + MAXPRJ = ONE + DO 3051 p = 2, N + TEMP1 = ABS(A(p,p)) / SVA(IWORK(p)) + MAXPRJ = MIN( MAXPRJ, TEMP1 ) + 3051 CONTINUE + IF ( MAXPRJ**2 .GE. ONE - REAL(N)*EPSLN ) ALMORT = .TRUE. + END IF +* +* + SCONDA = - ONE + CONDR1 = - ONE + CONDR2 = - ONE +* + IF ( ERREST ) THEN + IF ( N .EQ. NR ) THEN + IF ( RSVEC ) THEN +* .. V is available as workspace + CALL CLACPY( 'U', N, N, A, LDA, V, LDV ) + DO 3053 p = 1, N + TEMP1 = SVA(IWORK(p)) + CALL CSSCAL( p, ONE/TEMP1, V(1,p), 1 ) + 3053 CONTINUE + IF ( LSVEC )THEN + CALL CPOCON( 'U', N, V, LDV, ONE, TEMP1, + $ CWORK(N+1), RWORK, IERR ) + ELSE + CALL CPOCON( 'U', N, V, LDV, ONE, TEMP1, + $ CWORK, RWORK, IERR ) + END IF +* + ELSE IF ( LSVEC ) THEN +* .. U is available as workspace + CALL CLACPY( 'U', N, N, A, LDA, U, LDU ) + DO 3054 p = 1, N + TEMP1 = SVA(IWORK(p)) + CALL CSSCAL( p, ONE/TEMP1, U(1,p), 1 ) + 3054 CONTINUE + CALL CPOCON( 'U', N, U, LDU, ONE, TEMP1, + $ CWORK(N+1), RWORK, IERR ) + ELSE + CALL CLACPY( 'U', N, N, A, LDA, CWORK, N ) +*[] CALL CLACPY( 'U', N, N, A, LDA, CWORK(N+1), N ) +* Change: here index shifted by N to the left, CWORK(1:N) +* not needed for SIGMA only computation + DO 3052 p = 1, N + TEMP1 = SVA(IWORK(p)) +*[] CALL CSSCAL( p, ONE/TEMP1, CWORK(N+(p-1)*N+1), 1 ) + CALL CSSCAL( p, ONE/TEMP1, CWORK((p-1)*N+1), 1 ) + 3052 CONTINUE +* .. the columns of R are scaled to have unit Euclidean lengths. +*[] CALL CPOCON( 'U', N, CWORK(N+1), N, ONE, TEMP1, +*[] $ CWORK(N+N*N+1), RWORK, IERR ) + CALL CPOCON( 'U', N, CWORK, N, ONE, TEMP1, + $ CWORK(N*N+1), RWORK, IERR ) +* + END IF + IF ( TEMP1 .NE. ZERO ) THEN + SCONDA = ONE / SQRT(TEMP1) + ELSE + SCONDA = - ONE + END IF +* SCONDA is an estimate of SQRT(||(R^* * R)^(-1)||_1). +* N^(-1/4) * SCONDA <= ||R^(-1)||_2 <= N^(1/4) * SCONDA + ELSE + SCONDA = - ONE + END IF + END IF +* + L2PERT = L2PERT .AND. ( ABS( A(1,1)/A(NR,NR) ) .GT. SQRT(BIG1) ) +* If there is no violent scaling, artificial perturbation is not needed. +* +* Phase 3: +* + IF ( .NOT. ( RSVEC .OR. LSVEC ) ) THEN +* +* Singular Values only +* +* .. transpose A(1:NR,1:N) + DO 1946 p = 1, MIN( N-1, NR ) + CALL CCOPY( N-p, A(p,p+1), LDA, A(p+1,p), 1 ) + CALL CLACGV( N-p+1, A(p,p), 1 ) + 1946 CONTINUE + IF ( NR .EQ. N ) A(N,N) = CONJG(A(N,N)) +* +* The following two DO-loops introduce small relative perturbation +* into the strict upper triangle of the lower triangular matrix. +* Small entries below the main diagonal are also changed. +* This modification is useful if the computing environment does not +* provide/allow FLUSH TO ZERO underflow, for it prevents many +* annoying denormalized numbers in case of strongly scaled matrices. +* The perturbation is structured so that it does not introduce any +* new perturbation of the singular values, and it does not destroy +* the job done by the preconditioner. +* The licence for this perturbation is in the variable L2PERT, which +* should be .FALSE. if FLUSH TO ZERO underflow is active. +* + IF ( .NOT. ALMORT ) THEN +* + IF ( L2PERT ) THEN +* XSC = SQRT(SMALL) + XSC = EPSLN / REAL(N) + DO 4947 q = 1, NR + CTEMP = CMPLX(XSC*ABS(A(q,q)),ZERO) + DO 4949 p = 1, N + IF ( ( (p.GT.q) .AND. (ABS(A(p,q)).LE.TEMP1) ) + $ .OR. ( p .LT. q ) ) +* $ A(p,q) = TEMP1 * ( A(p,q) / ABS(A(p,q)) ) + $ A(p,q) = CTEMP + 4949 CONTINUE + 4947 CONTINUE + ELSE + CALL CLASET( 'U', NR-1,NR-1, CZERO,CZERO, A(1,2),LDA ) + END IF +* +* .. second preconditioning using the QR factorization +* + CALL CGEQRF( N,NR, A,LDA, CWORK, CWORK(N+1),LWORK-N, IERR ) +* +* .. and transpose upper to lower triangular + DO 1948 p = 1, NR - 1 + CALL CCOPY( NR-p, A(p,p+1), LDA, A(p+1,p), 1 ) + CALL CLACGV( NR-p+1, A(p,p), 1 ) + 1948 CONTINUE +* + END IF +* +* Row-cyclic Jacobi SVD algorithm with column pivoting +* +* .. again some perturbation (a "background noise") is added +* to drown denormals + IF ( L2PERT ) THEN +* XSC = SQRT(SMALL) + XSC = EPSLN / REAL(N) + DO 1947 q = 1, NR + CTEMP = CMPLX(XSC*ABS(A(q,q)),ZERO) + DO 1949 p = 1, NR + IF ( ( (p.GT.q) .AND. (ABS(A(p,q)).LE.TEMP1) ) + $ .OR. ( p .LT. q ) ) +* $ A(p,q) = TEMP1 * ( A(p,q) / ABS(A(p,q)) ) + $ A(p,q) = CTEMP + 1949 CONTINUE + 1947 CONTINUE + ELSE + CALL CLASET( 'U', NR-1, NR-1, CZERO, CZERO, A(1,2), LDA ) + END IF +* +* .. and one-sided Jacobi rotations are started on a lower +* triangular matrix (plus perturbation which is ignored in +* the part which destroys triangular form (confusing?!)) +* + CALL CGESVJ( 'L', 'N', 'N', NR, NR, A, LDA, SVA, + $ N, V, LDV, CWORK, LWORK, RWORK, LRWORK, INFO ) +* + SCALEM = RWORK(1) + NUMRANK = NINT(RWORK(2)) +* +* + ELSE IF ( ( RSVEC .AND. ( .NOT. LSVEC ) .AND. ( .NOT. JRACC ) ) + $ .OR. + $ ( JRACC .AND. ( .NOT. LSVEC ) .AND. ( NR .NE. N ) ) ) THEN +* +* -> Singular Values and Right Singular Vectors <- +* + IF ( ALMORT ) THEN +* +* .. in this case NR equals N + DO 1998 p = 1, NR + CALL CCOPY( N-p+1, A(p,p), LDA, V(p,p), 1 ) + CALL CLACGV( N-p+1, V(p,p), 1 ) + 1998 CONTINUE + CALL CLASET( 'U', NR-1,NR-1, CZERO, CZERO, V(1,2), LDV ) +* + CALL CGESVJ( 'L','U','N', N, NR, V, LDV, SVA, NR, A, LDA, + $ CWORK, LWORK, RWORK, LRWORK, INFO ) + SCALEM = RWORK(1) + NUMRANK = NINT(RWORK(2)) + + ELSE +* +* .. two more QR factorizations ( one QRF is not enough, two require +* accumulated product of Jacobi rotations, three are perfect ) +* + CALL CLASET( 'L', NR-1,NR-1, CZERO, CZERO, A(2,1), LDA ) + CALL CGELQF( NR,N, A, LDA, CWORK, CWORK(N+1), LWORK-N, IERR) + CALL CLACPY( 'L', NR, NR, A, LDA, V, LDV ) + CALL CLASET( 'U', NR-1,NR-1, CZERO, CZERO, V(1,2), LDV ) + CALL CGEQRF( NR, NR, V, LDV, CWORK(N+1), CWORK(2*N+1), + $ LWORK-2*N, IERR ) + DO 8998 p = 1, NR + CALL CCOPY( NR-p+1, V(p,p), LDV, V(p,p), 1 ) + CALL CLACGV( NR-p+1, V(p,p), 1 ) + 8998 CONTINUE + CALL CLASET('U', NR-1, NR-1, CZERO, CZERO, V(1,2), LDV) +* + CALL CGESVJ( 'L', 'U','N', NR, NR, V,LDV, SVA, NR, U, + $ LDU, CWORK(N+1), LWORK-N, RWORK, LRWORK, INFO ) + SCALEM = RWORK(1) + NUMRANK = NINT(RWORK(2)) + IF ( NR .LT. N ) THEN + CALL CLASET( 'A',N-NR, NR, CZERO,CZERO, V(NR+1,1), LDV ) + CALL CLASET( 'A',NR, N-NR, CZERO,CZERO, V(1,NR+1), LDV ) + CALL CLASET( 'A',N-NR,N-NR,CZERO,CONE, V(NR+1,NR+1),LDV ) + END IF +* + CALL CUNMLQ( 'L', 'C', N, N, NR, A, LDA, CWORK, + $ V, LDV, CWORK(N+1), LWORK-N, IERR ) +* + END IF +* .. permute the rows of V +* DO 8991 p = 1, N +* CALL CCOPY( N, V(p,1), LDV, A(IWORK(p),1), LDA ) +* 8991 CONTINUE +* CALL CLACPY( 'All', N, N, A, LDA, V, LDV ) + CALL CLAPMR( .FALSE., N, N, V, LDV, IWORK ) +* + IF ( TRANSP ) THEN + CALL CLACPY( 'A', N, N, V, LDV, U, LDU ) + END IF +* + ELSE IF ( JRACC .AND. (.NOT. LSVEC) .AND. ( NR.EQ. N ) ) THEN +* + CALL CLASET( 'L', N-1,N-1, CZERO, CZERO, A(2,1), LDA ) +* + CALL CGESVJ( 'U','N','V', N, N, A, LDA, SVA, N, V, LDV, + $ CWORK, LWORK, RWORK, LRWORK, INFO ) + SCALEM = RWORK(1) + NUMRANK = NINT(RWORK(2)) + CALL CLAPMR( .FALSE., N, N, V, LDV, IWORK ) +* + ELSE IF ( LSVEC .AND. ( .NOT. RSVEC ) ) THEN +* +* .. Singular Values and Left Singular Vectors .. +* +* .. second preconditioning step to avoid need to accumulate +* Jacobi rotations in the Jacobi iterations. + DO 1965 p = 1, NR + CALL CCOPY( N-p+1, A(p,p), LDA, U(p,p), 1 ) + CALL CLACGV( N-p+1, U(p,p), 1 ) + 1965 CONTINUE + CALL CLASET( 'U', NR-1, NR-1, CZERO, CZERO, U(1,2), LDU ) +* + CALL CGEQRF( N, NR, U, LDU, CWORK(N+1), CWORK(2*N+1), + $ LWORK-2*N, IERR ) +* + DO 1967 p = 1, NR - 1 + CALL CCOPY( NR-p, U(p,p+1), LDU, U(p+1,p), 1 ) + CALL CLACGV( N-p+1, U(p,p), 1 ) + 1967 CONTINUE + CALL CLASET( 'U', NR-1, NR-1, CZERO, CZERO, U(1,2), LDU ) +* + CALL CGESVJ( 'L', 'U', 'N', NR,NR, U, LDU, SVA, NR, A, + $ LDA, CWORK(N+1), LWORK-N, RWORK, LRWORK, INFO ) + SCALEM = RWORK(1) + NUMRANK = NINT(RWORK(2)) +* + IF ( NR .LT. M ) THEN + CALL CLASET( 'A', M-NR, NR,CZERO, CZERO, U(NR+1,1), LDU ) + IF ( NR .LT. N1 ) THEN + CALL CLASET( 'A',NR, N1-NR, CZERO, CZERO, U(1,NR+1),LDU ) + CALL CLASET( 'A',M-NR,N1-NR,CZERO,CONE,U(NR+1,NR+1),LDU ) + END IF + END IF +* + CALL CUNMQR( 'L', 'N', M, N1, N, A, LDA, CWORK, U, + $ LDU, CWORK(N+1), LWORK-N, IERR ) +* + IF ( ROWPIV ) + $ CALL CLASWP( N1, U, LDU, 1, M-1, IWORK(IWOFF+1), -1 ) +* + DO 1974 p = 1, N1 + XSC = ONE / SCNRM2( M, U(1,p), 1 ) + CALL CSSCAL( M, XSC, U(1,p), 1 ) + 1974 CONTINUE +* + IF ( TRANSP ) THEN + CALL CLACPY( 'A', N, N, U, LDU, V, LDV ) + END IF +* + ELSE +* +* .. Full SVD .. +* + IF ( .NOT. JRACC ) THEN +* + IF ( .NOT. ALMORT ) THEN +* +* Second Preconditioning Step (QRF [with pivoting]) +* Note that the composition of TRANSPOSE, QRF and TRANSPOSE is +* equivalent to an LQF CALL. Since in many libraries the QRF +* seems to be better optimized than the LQF, we do explicit +* transpose and use the QRF. This is subject to changes in an +* optimized implementation of CGEJSV. +* + DO 1968 p = 1, NR + CALL CCOPY( N-p+1, A(p,p), LDA, V(p,p), 1 ) + CALL CLACGV( N-p+1, V(p,p), 1 ) + 1968 CONTINUE +* +* .. the following two loops perturb small entries to avoid +* denormals in the second QR factorization, where they are +* as good as zeros. This is done to avoid painfully slow +* computation with denormals. The relative size of the perturbation +* is a parameter that can be changed by the implementer. +* This perturbation device will be obsolete on machines with +* properly implemented arithmetic. +* To switch it off, set L2PERT=.FALSE. To remove it from the +* code, remove the action under L2PERT=.TRUE., leave the ELSE part. +* The following two loops should be blocked and fused with the +* transposed copy above. +* + IF ( L2PERT ) THEN + XSC = SQRT(SMALL) + DO 2969 q = 1, NR + CTEMP = CMPLX(XSC*ABS( V(q,q) ),ZERO) + DO 2968 p = 1, N + IF ( ( p .GT. q ) .AND. ( ABS(V(p,q)) .LE. TEMP1 ) + $ .OR. ( p .LT. q ) ) +* $ V(p,q) = TEMP1 * ( V(p,q) / ABS(V(p,q)) ) + $ V(p,q) = CTEMP + IF ( p .LT. q ) V(p,q) = - V(p,q) + 2968 CONTINUE + 2969 CONTINUE + ELSE + CALL CLASET( 'U', NR-1, NR-1, CZERO, CZERO, V(1,2), LDV ) + END IF +* +* Estimate the row scaled condition number of R1 +* (If R1 is rectangular, N > NR, then the condition number +* of the leading NR x NR submatrix is estimated.) +* + CALL CLACPY( 'L', NR, NR, V, LDV, CWORK(2*N+1), NR ) + DO 3950 p = 1, NR + TEMP1 = SCNRM2(NR-p+1,CWORK(2*N+(p-1)*NR+p),1) + CALL CSSCAL(NR-p+1,ONE/TEMP1,CWORK(2*N+(p-1)*NR+p),1) + 3950 CONTINUE + CALL CPOCON('L',NR,CWORK(2*N+1),NR,ONE,TEMP1, + $ CWORK(2*N+NR*NR+1),RWORK,IERR) + CONDR1 = ONE / SQRT(TEMP1) +* .. here need a second oppinion on the condition number +* .. then assume worst case scenario +* R1 is OK for inverse <=> CONDR1 .LT. REAL(N) +* more conservative <=> CONDR1 .LT. SQRT(REAL(N)) +* + COND_OK = SQRT(SQRT(REAL(NR))) +*[TP] COND_OK is a tuning parameter. +* + IF ( CONDR1 .LT. COND_OK ) THEN +* .. the second QRF without pivoting. Note: in an optimized +* implementation, this QRF should be implemented as the QRF +* of a lower triangular matrix. +* R1^* = Q2 * R2 + CALL CGEQRF( N, NR, V, LDV, CWORK(N+1), CWORK(2*N+1), + $ LWORK-2*N, IERR ) +* + IF ( L2PERT ) THEN + XSC = SQRT(SMALL)/EPSLN + DO 3959 p = 2, NR + DO 3958 q = 1, p - 1 + CTEMP=CMPLX(XSC*MIN(ABS(V(p,p)),ABS(V(q,q))), + $ ZERO) + IF ( ABS(V(q,p)) .LE. TEMP1 ) +* $ V(q,p) = TEMP1 * ( V(q,p) / ABS(V(q,p)) ) + $ V(q,p) = CTEMP + 3958 CONTINUE + 3959 CONTINUE + END IF +* + IF ( NR .NE. N ) + $ CALL CLACPY( 'A', N, NR, V, LDV, CWORK(2*N+1), N ) +* .. save ... +* +* .. this transposed copy should be better than naive + DO 1969 p = 1, NR - 1 + CALL CCOPY( NR-p, V(p,p+1), LDV, V(p+1,p), 1 ) + CALL CLACGV(NR-p+1, V(p,p), 1 ) + 1969 CONTINUE + V(NR,NR)=CONJG(V(NR,NR)) +* + CONDR2 = CONDR1 +* + ELSE +* +* .. ill-conditioned case: second QRF with pivoting +* Note that windowed pivoting would be equaly good +* numerically, and more run-time efficient. So, in +* an optimal implementation, the next call to CGEQP3 +* should be replaced with eg. CALL CGEQPX (ACM TOMS #782) +* with properly (carefully) chosen parameters. +* +* R1^* * P2 = Q2 * R2 + DO 3003 p = 1, NR + IWORK(N+p) = 0 + 3003 CONTINUE + CALL CGEQP3( N, NR, V, LDV, IWORK(N+1), CWORK(N+1), + $ CWORK(2*N+1), LWORK-2*N, RWORK, IERR ) +** CALL CGEQRF( N, NR, V, LDV, CWORK(N+1), CWORK(2*N+1), +** $ LWORK-2*N, IERR ) + IF ( L2PERT ) THEN + XSC = SQRT(SMALL) + DO 3969 p = 2, NR + DO 3968 q = 1, p - 1 + CTEMP=CMPLX(XSC*MIN(ABS(V(p,p)),ABS(V(q,q))), + $ ZERO) + IF ( ABS(V(q,p)) .LE. TEMP1 ) +* $ V(q,p) = TEMP1 * ( V(q,p) / ABS(V(q,p)) ) + $ V(q,p) = CTEMP + 3968 CONTINUE + 3969 CONTINUE + END IF +* + CALL CLACPY( 'A', N, NR, V, LDV, CWORK(2*N+1), N ) +* + IF ( L2PERT ) THEN + XSC = SQRT(SMALL) + DO 8970 p = 2, NR + DO 8971 q = 1, p - 1 + CTEMP=CMPLX(XSC*MIN(ABS(V(p,p)),ABS(V(q,q))), + $ ZERO) +* V(p,q) = - TEMP1*( V(q,p) / ABS(V(q,p)) ) + V(p,q) = - CTEMP + 8971 CONTINUE + 8970 CONTINUE + ELSE + CALL CLASET( 'L',NR-1,NR-1,CZERO,CZERO,V(2,1),LDV ) + END IF +* Now, compute R2 = L3 * Q3, the LQ factorization. + CALL CGELQF( NR, NR, V, LDV, CWORK(2*N+N*NR+1), + $ CWORK(2*N+N*NR+NR+1), LWORK-2*N-N*NR-NR, IERR ) +* .. and estimate the condition number + CALL CLACPY( 'L',NR,NR,V,LDV,CWORK(2*N+N*NR+NR+1),NR ) + DO 4950 p = 1, NR + TEMP1 = SCNRM2( p, CWORK(2*N+N*NR+NR+p), NR ) + CALL CSSCAL( p, ONE/TEMP1, CWORK(2*N+N*NR+NR+p), NR ) + 4950 CONTINUE + CALL CPOCON( 'L',NR,CWORK(2*N+N*NR+NR+1),NR,ONE,TEMP1, + $ CWORK(2*N+N*NR+NR+NR*NR+1),RWORK,IERR ) + CONDR2 = ONE / SQRT(TEMP1) +* +* + IF ( CONDR2 .GE. COND_OK ) THEN +* .. save the Householder vectors used for Q3 +* (this overwrittes the copy of R2, as it will not be +* needed in this branch, but it does not overwritte the +* Huseholder vectors of Q2.). + CALL CLACPY( 'U', NR, NR, V, LDV, CWORK(2*N+1), N ) +* .. and the rest of the information on Q3 is in +* WORK(2*N+N*NR+1:2*N+N*NR+N) + END IF +* + END IF +* + IF ( L2PERT ) THEN + XSC = SQRT(SMALL) + DO 4968 q = 2, NR + CTEMP = XSC * V(q,q) + DO 4969 p = 1, q - 1 +* V(p,q) = - TEMP1*( V(p,q) / ABS(V(p,q)) ) + V(p,q) = - CTEMP + 4969 CONTINUE + 4968 CONTINUE + ELSE + CALL CLASET( 'U', NR-1,NR-1, CZERO,CZERO, V(1,2), LDV ) + END IF +* +* Second preconditioning finished; continue with Jacobi SVD +* The input matrix is lower trinagular. +* +* Recover the right singular vectors as solution of a well +* conditioned triangular matrix equation. +* + IF ( CONDR1 .LT. COND_OK ) THEN +* + CALL CGESVJ( 'L','U','N',NR,NR,V,LDV,SVA,NR,U, LDU, + $ CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,RWORK, + $ LRWORK, INFO ) + SCALEM = RWORK(1) + NUMRANK = NINT(RWORK(2)) + DO 3970 p = 1, NR + CALL CCOPY( NR, V(1,p), 1, U(1,p), 1 ) + CALL CSSCAL( NR, SVA(p), V(1,p), 1 ) + 3970 CONTINUE + +* .. pick the right matrix equation and solve it +* + IF ( NR .EQ. N ) THEN +* :)) .. best case, R1 is inverted. The solution of this matrix +* equation is Q2*V2 = the product of the Jacobi rotations +* used in CGESVJ, premultiplied with the orthogonal matrix +* from the second QR factorization. + CALL CTRSM('L','U','N','N', NR,NR,CONE, A,LDA, V,LDV) + ELSE +* .. R1 is well conditioned, but non-square. Adjoint of R2 +* is inverted to get the product of the Jacobi rotations +* used in CGESVJ. The Q-factor from the second QR +* factorization is then built in explicitly. + CALL CTRSM('L','U','C','N',NR,NR,CONE,CWORK(2*N+1), + $ N,V,LDV) + IF ( NR .LT. N ) THEN + CALL CLASET('A',N-NR,NR,CZERO,CZERO,V(NR+1,1),LDV) + CALL CLASET('A',NR,N-NR,CZERO,CZERO,V(1,NR+1),LDV) + CALL CLASET('A',N-NR,N-NR,CZERO,CONE,V(NR+1,NR+1),LDV) + END IF + CALL CUNMQR('L','N',N,N,NR,CWORK(2*N+1),N,CWORK(N+1), + $ V,LDV,CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR) + END IF +* + ELSE IF ( CONDR2 .LT. COND_OK ) THEN +* +* The matrix R2 is inverted. The solution of the matrix equation +* is Q3^* * V3 = the product of the Jacobi rotations (appplied to +* the lower triangular L3 from the LQ factorization of +* R2=L3*Q3), pre-multiplied with the transposed Q3. + CALL CGESVJ( 'L', 'U', 'N', NR, NR, V, LDV, SVA, NR, U, + $ LDU, CWORK(2*N+N*NR+NR+1), LWORK-2*N-N*NR-NR, + $ RWORK, LRWORK, INFO ) + SCALEM = RWORK(1) + NUMRANK = NINT(RWORK(2)) + DO 3870 p = 1, NR + CALL CCOPY( NR, V(1,p), 1, U(1,p), 1 ) + CALL CSSCAL( NR, SVA(p), U(1,p), 1 ) + 3870 CONTINUE + CALL CTRSM('L','U','N','N',NR,NR,CONE,CWORK(2*N+1),N, + $ U,LDU) +* .. apply the permutation from the second QR factorization + DO 873 q = 1, NR + DO 872 p = 1, NR + CWORK(2*N+N*NR+NR+IWORK(N+p)) = U(p,q) + 872 CONTINUE + DO 874 p = 1, NR + U(p,q) = CWORK(2*N+N*NR+NR+p) + 874 CONTINUE + 873 CONTINUE + IF ( NR .LT. N ) THEN + CALL CLASET( 'A',N-NR,NR,CZERO,CZERO,V(NR+1,1),LDV ) + CALL CLASET( 'A',NR,N-NR,CZERO,CZERO,V(1,NR+1),LDV ) + CALL CLASET('A',N-NR,N-NR,CZERO,CONE,V(NR+1,NR+1),LDV) + END IF + CALL CUNMQR( 'L','N',N,N,NR,CWORK(2*N+1),N,CWORK(N+1), + $ V,LDV,CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR ) + ELSE +* Last line of defense. +* #:( This is a rather pathological case: no scaled condition +* improvement after two pivoted QR factorizations. Other +* possibility is that the rank revealing QR factorization +* or the condition estimator has failed, or the COND_OK +* is set very close to ONE (which is unnecessary). Normally, +* this branch should never be executed, but in rare cases of +* failure of the RRQR or condition estimator, the last line of +* defense ensures that CGEJSV completes the task. +* Compute the full SVD of L3 using CGESVJ with explicit +* accumulation of Jacobi rotations. + CALL CGESVJ( 'L', 'U', 'V', NR, NR, V, LDV, SVA, NR, U, + $ LDU, CWORK(2*N+N*NR+NR+1), LWORK-2*N-N*NR-NR, + $ RWORK, LRWORK, INFO ) + SCALEM = RWORK(1) + NUMRANK = NINT(RWORK(2)) + IF ( NR .LT. N ) THEN + CALL CLASET( 'A',N-NR,NR,CZERO,CZERO,V(NR+1,1),LDV ) + CALL CLASET( 'A',NR,N-NR,CZERO,CZERO,V(1,NR+1),LDV ) + CALL CLASET('A',N-NR,N-NR,CZERO,CONE,V(NR+1,NR+1),LDV) + END IF + CALL CUNMQR( 'L','N',N,N,NR,CWORK(2*N+1),N,CWORK(N+1), + $ V,LDV,CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR ) +* + CALL CUNMLQ( 'L', 'C', NR, NR, NR, CWORK(2*N+1), N, + $ CWORK(2*N+N*NR+1), U, LDU, CWORK(2*N+N*NR+NR+1), + $ LWORK-2*N-N*NR-NR, IERR ) + DO 773 q = 1, NR + DO 772 p = 1, NR + CWORK(2*N+N*NR+NR+IWORK(N+p)) = U(p,q) + 772 CONTINUE + DO 774 p = 1, NR + U(p,q) = CWORK(2*N+N*NR+NR+p) + 774 CONTINUE + 773 CONTINUE +* + END IF +* +* Permute the rows of V using the (column) permutation from the +* first QRF. Also, scale the columns to make them unit in +* Euclidean norm. This applies to all cases. +* + TEMP1 = SQRT(REAL(N)) * EPSLN + DO 1972 q = 1, N + DO 972 p = 1, N + CWORK(2*N+N*NR+NR+IWORK(p)) = V(p,q) + 972 CONTINUE + DO 973 p = 1, N + V(p,q) = CWORK(2*N+N*NR+NR+p) + 973 CONTINUE + XSC = ONE / SCNRM2( N, V(1,q), 1 ) + IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) ) + $ CALL CSSCAL( N, XSC, V(1,q), 1 ) + 1972 CONTINUE +* At this moment, V contains the right singular vectors of A. +* Next, assemble the left singular vector matrix U (M x N). + IF ( NR .LT. M ) THEN + CALL CLASET('A', M-NR, NR, CZERO, CZERO, U(NR+1,1), LDU) + IF ( NR .LT. N1 ) THEN + CALL CLASET('A',NR,N1-NR,CZERO,CZERO,U(1,NR+1),LDU) + CALL CLASET('A',M-NR,N1-NR,CZERO,CONE, + $ U(NR+1,NR+1),LDU) + END IF + END IF +* +* The Q matrix from the first QRF is built into the left singular +* matrix U. This applies to all cases. +* + CALL CUNMQR( 'L', 'N', M, N1, N, A, LDA, CWORK, U, + $ LDU, CWORK(N+1), LWORK-N, IERR ) + +* The columns of U are normalized. The cost is O(M*N) flops. + TEMP1 = SQRT(REAL(M)) * EPSLN + DO 1973 p = 1, NR + XSC = ONE / SCNRM2( M, U(1,p), 1 ) + IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) ) + $ CALL CSSCAL( M, XSC, U(1,p), 1 ) + 1973 CONTINUE +* +* If the initial QRF is computed with row pivoting, the left +* singular vectors must be adjusted. +* + IF ( ROWPIV ) + $ CALL CLASWP( N1, U, LDU, 1, M-1, IWORK(IWOFF+1), -1 ) +* + ELSE +* +* .. the initial matrix A has almost orthogonal columns and +* the second QRF is not needed +* + CALL CLACPY( 'U', N, N, A, LDA, CWORK(N+1), N ) + IF ( L2PERT ) THEN + XSC = SQRT(SMALL) + DO 5970 p = 2, N + CTEMP = XSC * CWORK( N + (p-1)*N + p ) + DO 5971 q = 1, p - 1 +* CWORK(N+(q-1)*N+p)=-TEMP1 * ( CWORK(N+(p-1)*N+q) / +* $ ABS(CWORK(N+(p-1)*N+q)) ) + CWORK(N+(q-1)*N+p)=-CTEMP + 5971 CONTINUE + 5970 CONTINUE + ELSE + CALL CLASET( 'L',N-1,N-1,CZERO,CZERO,CWORK(N+2),N ) + END IF +* + CALL CGESVJ( 'U', 'U', 'N', N, N, CWORK(N+1), N, SVA, + $ N, U, LDU, CWORK(N+N*N+1), LWORK-N-N*N, RWORK, LRWORK, + $ INFO ) +* + SCALEM = RWORK(1) + NUMRANK = NINT(RWORK(2)) + DO 6970 p = 1, N + CALL CCOPY( N, CWORK(N+(p-1)*N+1), 1, U(1,p), 1 ) + CALL CSSCAL( N, SVA(p), CWORK(N+(p-1)*N+1), 1 ) + 6970 CONTINUE +* + CALL CTRSM( 'L', 'U', 'N', 'N', N, N, + $ CONE, A, LDA, CWORK(N+1), N ) + DO 6972 p = 1, N + CALL CCOPY( N, CWORK(N+p), N, V(IWORK(p),1), LDV ) + 6972 CONTINUE + TEMP1 = SQRT(REAL(N))*EPSLN + DO 6971 p = 1, N + XSC = ONE / SCNRM2( N, V(1,p), 1 ) + IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) ) + $ CALL CSSCAL( N, XSC, V(1,p), 1 ) + 6971 CONTINUE +* +* Assemble the left singular vector matrix U (M x N). +* + IF ( N .LT. M ) THEN + CALL CLASET( 'A', M-N, N, CZERO, CZERO, U(N+1,1), LDU ) + IF ( N .LT. N1 ) THEN + CALL CLASET('A',N, N1-N, CZERO, CZERO, U(1,N+1),LDU) + CALL CLASET( 'A',M-N,N1-N, CZERO, CONE,U(N+1,N+1),LDU) + END IF + END IF + CALL CUNMQR( 'L', 'N', M, N1, N, A, LDA, CWORK, U, + $ LDU, CWORK(N+1), LWORK-N, IERR ) + TEMP1 = SQRT(REAL(M))*EPSLN + DO 6973 p = 1, N1 + XSC = ONE / SCNRM2( M, U(1,p), 1 ) + IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) ) + $ CALL CSSCAL( M, XSC, U(1,p), 1 ) + 6973 CONTINUE +* + IF ( ROWPIV ) + $ CALL CLASWP( N1, U, LDU, 1, M-1, IWORK(IWOFF+1), -1 ) +* + END IF +* +* end of the >> almost orthogonal case << in the full SVD +* + ELSE +* +* This branch deploys a preconditioned Jacobi SVD with explicitly +* accumulated rotations. It is included as optional, mainly for +* experimental purposes. It does perfom well, and can also be used. +* In this implementation, this branch will be automatically activated +* if the condition number sigma_max(A) / sigma_min(A) is predicted +* to be greater than the overflow threshold. This is because the +* a posteriori computation of the singular vectors assumes robust +* implementation of BLAS and some LAPACK procedures, capable of working +* in presence of extreme values, e.g. when the singular values spread from +* the underflow to the overflow threshold. +* + DO 7968 p = 1, NR + CALL CCOPY( N-p+1, A(p,p), LDA, V(p,p), 1 ) + CALL CLACGV( N-p+1, V(p,p), 1 ) + 7968 CONTINUE +* + IF ( L2PERT ) THEN + XSC = SQRT(SMALL/EPSLN) + DO 5969 q = 1, NR + CTEMP = CMPLX(XSC*ABS( V(q,q) ),ZERO) + DO 5968 p = 1, N + IF ( ( p .GT. q ) .AND. ( ABS(V(p,q)) .LE. TEMP1 ) + $ .OR. ( p .LT. q ) ) +* $ V(p,q) = TEMP1 * ( V(p,q) / ABS(V(p,q)) ) + $ V(p,q) = CTEMP + IF ( p .LT. q ) V(p,q) = - V(p,q) + 5968 CONTINUE + 5969 CONTINUE + ELSE + CALL CLASET( 'U', NR-1, NR-1, CZERO, CZERO, V(1,2), LDV ) + END IF + + CALL CGEQRF( N, NR, V, LDV, CWORK(N+1), CWORK(2*N+1), + $ LWORK-2*N, IERR ) + CALL CLACPY( 'L', N, NR, V, LDV, CWORK(2*N+1), N ) +* + DO 7969 p = 1, NR + CALL CCOPY( NR-p+1, V(p,p), LDV, U(p,p), 1 ) + CALL CLACGV( NR-p+1, U(p,p), 1 ) + 7969 CONTINUE + + IF ( L2PERT ) THEN + XSC = SQRT(SMALL/EPSLN) + DO 9970 q = 2, NR + DO 9971 p = 1, q - 1 + CTEMP = CMPLX(XSC * MIN(ABS(U(p,p)),ABS(U(q,q))), + $ ZERO) +* U(p,q) = - TEMP1 * ( U(q,p) / ABS(U(q,p)) ) + U(p,q) = - CTEMP + 9971 CONTINUE + 9970 CONTINUE + ELSE + CALL CLASET('U', NR-1, NR-1, CZERO, CZERO, U(1,2), LDU ) + END IF + + CALL CGESVJ( 'L', 'U', 'V', NR, NR, U, LDU, SVA, + $ N, V, LDV, CWORK(2*N+N*NR+1), LWORK-2*N-N*NR, + $ RWORK, LRWORK, INFO ) + SCALEM = RWORK(1) + NUMRANK = NINT(RWORK(2)) + + IF ( NR .LT. N ) THEN + CALL CLASET( 'A',N-NR,NR,CZERO,CZERO,V(NR+1,1),LDV ) + CALL CLASET( 'A',NR,N-NR,CZERO,CZERO,V(1,NR+1),LDV ) + CALL CLASET( 'A',N-NR,N-NR,CZERO,CONE,V(NR+1,NR+1),LDV ) + END IF + + CALL CUNMQR( 'L','N',N,N,NR,CWORK(2*N+1),N,CWORK(N+1), + $ V,LDV,CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR ) +* +* Permute the rows of V using the (column) permutation from the +* first QRF. Also, scale the columns to make them unit in +* Euclidean norm. This applies to all cases. +* + TEMP1 = SQRT(REAL(N)) * EPSLN + DO 7972 q = 1, N + DO 8972 p = 1, N + CWORK(2*N+N*NR+NR+IWORK(p)) = V(p,q) + 8972 CONTINUE + DO 8973 p = 1, N + V(p,q) = CWORK(2*N+N*NR+NR+p) + 8973 CONTINUE + XSC = ONE / SCNRM2( N, V(1,q), 1 ) + IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) ) + $ CALL CSSCAL( N, XSC, V(1,q), 1 ) + 7972 CONTINUE +* +* At this moment, V contains the right singular vectors of A. +* Next, assemble the left singular vector matrix U (M x N). +* + IF ( NR .LT. M ) THEN + CALL CLASET( 'A', M-NR, NR, CZERO, CZERO, U(NR+1,1), LDU ) + IF ( NR .LT. N1 ) THEN + CALL CLASET('A',NR, N1-NR, CZERO, CZERO, U(1,NR+1),LDU) + CALL CLASET('A',M-NR,N1-NR, CZERO, CONE,U(NR+1,NR+1),LDU) + END IF + END IF +* + CALL CUNMQR( 'L', 'N', M, N1, N, A, LDA, CWORK, U, + $ LDU, CWORK(N+1), LWORK-N, IERR ) +* + IF ( ROWPIV ) + $ CALL CLASWP( N1, U, LDU, 1, M-1, IWORK(IWOFF+1), -1 ) +* +* + END IF + IF ( TRANSP ) THEN +* .. swap U and V because the procedure worked on A^* + DO 6974 p = 1, N + CALL CSWAP( N, U(1,p), 1, V(1,p), 1 ) + 6974 CONTINUE + END IF +* + END IF +* end of the full SVD +* +* Undo scaling, if necessary (and possible) +* + IF ( USCAL2 .LE. (BIG/SVA(1))*USCAL1 ) THEN + CALL SLASCL( 'G', 0, 0, USCAL1, USCAL2, NR, 1, SVA, N, IERR ) + USCAL1 = ONE + USCAL2 = ONE + END IF +* + IF ( NR .LT. N ) THEN + DO 3004 p = NR+1, N + SVA(p) = ZERO + 3004 CONTINUE + END IF +* + RWORK(1) = USCAL2 * SCALEM + RWORK(2) = USCAL1 + IF ( ERREST ) RWORK(3) = SCONDA + IF ( LSVEC .AND. RSVEC ) THEN + RWORK(4) = CONDR1 + RWORK(5) = CONDR2 + END IF + IF ( L2TRAN ) THEN + RWORK(6) = ENTRA + RWORK(7) = ENTRAT + END IF +* + IWORK(1) = NR + IWORK(2) = NUMRANK + IWORK(3) = WARNING + IF ( TRANSP ) THEN + IWORK(4) = 1 + ELSE + IWORK(4) = -1 + END IF + +* + RETURN +* .. +* .. END OF CGEJSV +* .. + END +* diff -Nru lapack-3.7.0/SRC/cgelqt3.f lapack-3.7.1/SRC/cgelqt3.f --- lapack-3.7.0/SRC/cgelqt3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/cgelqt3.f 2017-06-17 22:46:53.000000000 +0000 @@ -83,7 +83,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleGEcomputational * @@ -92,8 +92,8 @@ *> *> \verbatim *> -*> The matrix V stores the elementary reflectors H(i) in the i-th column -*> below the diagonal. For example, if M=5 and N=3, the matrix V is +*> The matrix V stores the elementary reflectors H(i) in the i-th row +*> above the diagonal. For example, if M=5 and N=3, the matrix V is *> *> V = ( 1 v1 v1 v1 v1 ) *> ( 1 v2 v2 v2 ) @@ -114,10 +114,10 @@ * ===================================================================== RECURSIVE SUBROUTINE CGELQT3( M, N, A, LDA, T, LDT, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, M, N, LDT diff -Nru lapack-3.7.0/SRC/cgelqt.f lapack-3.7.1/SRC/cgelqt.f --- lapack-3.7.0/SRC/cgelqt.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/cgelqt.f 2017-06-17 22:46:53.000000000 +0000 @@ -92,7 +92,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleGEcomputational * @@ -101,8 +101,8 @@ *> *> \verbatim *> -*> The matrix V stores the elementary reflectors H(i) in the i-th column -*> below the diagonal. For example, if M=5 and N=3, the matrix V is +*> The matrix V stores the elementary reflectors H(i) in the i-th row +*> above the diagonal. For example, if M=5 and N=3, the matrix V is *> *> V = ( 1 v1 v1 v1 v1 ) *> ( 1 v2 v2 v2 ) @@ -111,11 +111,11 @@ *> *> where the vi's represent the vectors which define H(i), which are returned *> in the matrix A. The 1's along the diagonal of V are not stored in A. -*> Let K=MIN(M,N). The number of blocks is B = ceiling(K/NB), where each -*> block is of order NB except for the last block, which is of order -*> IB = K - (B-1)*NB. For each of the B blocks, a upper triangular block -*> reflector factor is computed: T1, T2, ..., TB. The NB-by-NB (and IB-by-IB -*> for the last block) T's are stored in the NB-by-N matrix T as +*> Let K=MIN(M,N). The number of blocks is B = ceiling(K/MB), where each +*> block is of order MB except for the last block, which is of order +*> IB = K - (B-1)*MB. For each of the B blocks, a upper triangular block +*> reflector factor is computed: T1, T2, ..., TB. The MB-by-MB (and IB-by-IB +*> for the last block) T's are stored in the MB-by-K matrix T as *> *> T = (T1 T2 ... TB). *> \endverbatim @@ -123,10 +123,10 @@ * ===================================================================== SUBROUTINE CGELQT( M, N, MB, A, LDA, T, LDT, WORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDT, M, N, MB diff -Nru lapack-3.7.0/SRC/cgemlqt.f lapack-3.7.1/SRC/cgemlqt.f --- lapack-3.7.0/SRC/cgemlqt.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/cgemlqt.f 2017-06-17 22:46:53.000000000 +0000 @@ -18,16 +18,16 @@ *> *> \verbatim *> -*> CGEMQRT overwrites the general real M-by-N matrix C with +*> CGEMLQT overwrites the general real M-by-N matrix C with *> *> SIDE = 'L' SIDE = 'R' *> TRANS = 'N': Q C C Q -*> TRANS = 'C': Q**C C C Q**C +*> TRANS = 'C': Q**H C C Q**H *> *> where Q is a complex orthogonal matrix defined as the product of K *> elementary reflectors: *> -*> Q = H(1) H(2) . . . H(K) = I - V C V**C +*> Q = H(1) H(2) . . . H(K) = I - V T V**H *> *> generated using the compact WY representation as returned by CGELQT. *> @@ -40,15 +40,15 @@ *> \param[in] SIDE *> \verbatim *> SIDE is CHARACTER*1 -*> = 'L': apply Q or Q**C from the Left; -*> = 'R': apply Q or Q**C from the Right. +*> = 'L': apply Q or Q**H from the Left; +*> = 'R': apply Q or Q**H from the Right. *> \endverbatim *> *> \param[in] TRANS *> \verbatim *> TRANS is CHARACTER*1 *> = 'N': No transpose, apply Q; -*> = 'C': Transpose, apply Q**C. +*> = 'C': Transpose, apply Q**H. *> \endverbatim *> *> \param[in] M @@ -82,7 +82,9 @@ *> *> \param[in] V *> \verbatim -*> V is COMPLEX array, dimension (LDV,K) +*> V is COMPLEX array, dimension +*> (LDV,M) if SIDE = 'L', +*> (LDV,N) if SIDE = 'R' *> The i-th row must contain the vector which defines the *> elementary reflector H(i), for i = 1,2,...,k, as returned by *> DGELQT in the first K rows of its array argument A. @@ -91,16 +93,14 @@ *> \param[in] LDV *> \verbatim *> LDV is INTEGER -*> The leading dimension of the array V. -*> If SIDE = 'L', LDA >= max(1,M); -*> if SIDE = 'R', LDA >= max(1,N). +*> The leading dimension of the array V. LDV >= max(1,K). *> \endverbatim *> *> \param[in] T *> \verbatim *> T is COMPLEX array, dimension (LDT,K) *> The upper triangular factors of the block reflectors -*> as returned by DGELQT, stored as a MB-by-M matrix. +*> as returned by DGELQT, stored as a MB-by-K matrix. *> \endverbatim *> *> \param[in] LDT @@ -113,7 +113,7 @@ *> \verbatim *> C is COMPLEX array, dimension (LDC,N) *> On entry, the M-by-N matrix C. -*> On exit, C is overwritten by Q C, Q**C C, C Q**C or C Q. +*> On exit, C is overwritten by Q C, Q**H C, C Q**H or C Q. *> \endverbatim *> *> \param[in] LDC @@ -143,7 +143,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleGEcomputational * @@ -151,10 +151,10 @@ SUBROUTINE CGEMLQT( SIDE, TRANS, M, N, K, MB, V, LDV, T, LDT, $ C, LDC, WORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER SIDE, TRANS diff -Nru lapack-3.7.0/SRC/cgeqrt.f lapack-3.7.1/SRC/cgeqrt.f --- lapack-3.7.0/SRC/cgeqrt.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/cgeqrt.f 2017-06-17 22:46:53.000000000 +0000 @@ -108,7 +108,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complexGEcomputational * @@ -133,7 +133,7 @@ *> block is of order NB except for the last block, which is of order *> IB = K - (B-1)*NB. For each of the B blocks, a upper triangular block *> reflector factor is computed: T1, T2, ..., TB. The NB-by-NB (and IB-by-IB -*> for the last block) T's are stored in the NB-by-N matrix T as +*> for the last block) T's are stored in the NB-by-K matrix T as *> *> T = (T1 T2 ... TB). *> \endverbatim @@ -141,10 +141,10 @@ * ===================================================================== SUBROUTINE CGEQRT( M, N, NB, A, LDA, T, LDT, WORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDT, M, N, NB diff -Nru lapack-3.7.0/SRC/cgesv.f lapack-3.7.1/SRC/cgesv.f --- lapack-3.7.0/SRC/cgesv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/cgesv.f 2017-06-17 22:46:53.000000000 +0000 @@ -1,4 +1,4 @@ -*> \brief CGESV computes the solution to system of linear equations A * X = B for GE matrices (simple driver) +*> \brief CGESV computes the solution to system of linear equations A * X = B for GE matrices (simple driver) * * =========== DOCUMENTATION =========== * @@ -115,17 +115,17 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complexGEsolve * * ===================================================================== SUBROUTINE CGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO ) * -* -- LAPACK driver routine (version 3.7.0) -- +* -- LAPACK driver routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDB, N, NRHS diff -Nru lapack-3.7.0/SRC/cgesvj.f lapack-3.7.1/SRC/cgesvj.f --- lapack-3.7.0/SRC/cgesvj.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/cgesvj.f 2017-06-17 22:46:53.000000000 +0000 @@ -52,7 +52,7 @@ * *> \param[in] JOBA *> \verbatim -*> JOBA is CHARACTER* 1 +*> JOBA is CHARACTER*1 *> Specifies the structure of A. *> = 'L': The input matrix A is lower triangular; *> = 'U': The input matrix A is upper triangular; @@ -206,7 +206,7 @@ *> *> \param[in,out] CWORK *> \verbatim -*> CWORK is COMPLEX array, dimension max(1,LWORK). +*> CWORK is COMPLEX array, dimension (max(1,LWORK)) *> Used as workspace. *> If on entry LWORK .EQ. -1, then a workspace query is assumed and *> no computation is done; CWORK(1) is set to the minial (and optimal) @@ -221,7 +221,7 @@ *> *> \param[in,out] RWORK *> \verbatim -*> RWORK is REAL array, dimension max(6,LRWORK). +*> RWORK is REAL array, dimension (max(6,LRWORK)) *> On entry, *> If JOBU .EQ. 'C' : *> RWORK(1) = CTOL, where CTOL defines the threshold for convergence. @@ -318,6 +318,8 @@ *> \par References: * ================ *> +*> \verbatim +*> *> [1] P. P. M. De Rijk: A one-sided Jacobi algorithm for computing the *> singular value decomposition on a vector computer. *> SIAM J. Sci. Stat. Comp., Vol. 10 (1998), pp. 359-371. @@ -349,7 +351,7 @@ SUBROUTINE CGESVJ( JOBA, JOBU, JOBV, M, N, A, LDA, SVA, MV, V, $ LDV, CWORK, LWORK, RWORK, LRWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 diff -Nru lapack-3.7.0/SRC/cgetsls.f lapack-3.7.1/SRC/cgetsls.f --- lapack-3.7.0/SRC/cgetsls.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/cgetsls.f 2017-06-17 22:46:53.000000000 +0000 @@ -53,7 +53,7 @@ *> \verbatim *> TRANS is CHARACTER*1 *> = 'N': the linear system involves A; -*> = 'C': the linear system involves A**C. +*> = 'C': the linear system involves A**H. *> \endverbatim *> *> \param[in] M @@ -152,7 +152,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complexGEsolve * @@ -160,10 +160,10 @@ SUBROUTINE CGETSLS( TRANS, M, N, NRHS, A, LDA, B, LDB, $ WORK, LWORK, INFO ) * -* -- LAPACK driver routine (version 3.7.0) -- +* -- LAPACK driver routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER TRANS @@ -187,8 +187,8 @@ INTEGER I, IASCL, IBSCL, J, MINMN, MAXMN, BROW, $ SCLLEN, MNK, TSZO, TSZM, LWO, LWM, LW1, LW2, $ WSIZEO, WSIZEM, INFO2 - REAL ANRM, BIGNUM, BNRM, SMLNUM - COMPLEX TQ( 5 ), WORKQ + REAL ANRM, BIGNUM, BNRM, SMLNUM, DUM( 1 ) + COMPLEX TQ( 5 ), WORKQ( 1 ) * .. * .. External Functions .. LOGICAL LSAME @@ -236,31 +236,31 @@ IF( M.GE.N ) THEN CALL CGEQR( M, N, A, LDA, TQ, -1, WORKQ, -1, INFO2 ) TSZO = INT( TQ( 1 ) ) - LWO = INT( WORKQ ) + LWO = INT( WORKQ( 1 ) ) CALL CGEMQR( 'L', TRANS, M, NRHS, N, A, LDA, TQ, $ TSZO, B, LDB, WORKQ, -1, INFO2 ) - LWO = MAX( LWO, INT( WORKQ ) ) + LWO = MAX( LWO, INT( WORKQ( 1 ) ) ) CALL CGEQR( M, N, A, LDA, TQ, -2, WORKQ, -2, INFO2 ) TSZM = INT( TQ( 1 ) ) - LWM = INT( WORKQ ) + LWM = INT( WORKQ( 1 ) ) CALL CGEMQR( 'L', TRANS, M, NRHS, N, A, LDA, TQ, $ TSZM, B, LDB, WORKQ, -1, INFO2 ) - LWM = MAX( LWM, INT( WORKQ ) ) + LWM = MAX( LWM, INT( WORKQ( 1 ) ) ) WSIZEO = TSZO + LWO WSIZEM = TSZM + LWM ELSE CALL CGELQ( M, N, A, LDA, TQ, -1, WORKQ, -1, INFO2 ) TSZO = INT( TQ( 1 ) ) - LWO = INT( WORKQ ) + LWO = INT( WORKQ( 1 ) ) CALL CGEMLQ( 'L', TRANS, N, NRHS, M, A, LDA, TQ, $ TSZO, B, LDB, WORKQ, -1, INFO2 ) - LWO = MAX( LWO, INT( WORKQ ) ) + LWO = MAX( LWO, INT( WORKQ( 1 ) ) ) CALL CGELQ( M, N, A, LDA, TQ, -2, WORKQ, -2, INFO2 ) TSZM = INT( TQ( 1 ) ) - LWM = INT( WORKQ ) + LWM = INT( WORKQ( 1 ) ) CALL CGEMLQ( 'L', TRANS, N, NRHS, M, A, LDA, TQ, $ TSZO, B, LDB, WORKQ, -1, INFO2 ) - LWM = MAX( LWM, INT( WORKQ ) ) + LWM = MAX( LWM, INT( WORKQ( 1 ) ) ) WSIZEO = TSZO + LWO WSIZEM = TSZM + LWM END IF @@ -305,7 +305,7 @@ * * Scale A, B if max element outside range [SMLNUM,BIGNUM] * - ANRM = CLANGE( 'M', M, N, A, LDA, WORK ) + ANRM = CLANGE( 'M', M, N, A, LDA, DUM ) IASCL = 0 IF( ANRM.GT.ZERO .AND. ANRM.LT.SMLNUM ) THEN * @@ -331,7 +331,7 @@ IF ( TRAN ) THEN BROW = N END IF - BNRM = CLANGE( 'M', BROW, NRHS, B, LDB, WORK ) + BNRM = CLANGE( 'M', BROW, NRHS, B, LDB, DUM ) IBSCL = 0 IF( BNRM.GT.ZERO .AND. BNRM.LT.SMLNUM ) THEN * diff -Nru lapack-3.7.0/SRC/cggesx.f lapack-3.7.1/SRC/cggesx.f --- lapack-3.7.0/SRC/cggesx.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/cggesx.f 2017-06-17 22:46:53.000000000 +0000 @@ -104,7 +104,7 @@ *> *> \param[in] SELCTG *> \verbatim -*> SELCTG is procedure) LOGICAL FUNCTION of two COMPLEX arguments +*> SELCTG is a LOGICAL FUNCTION of two COMPLEX arguments *> SELCTG must be declared EXTERNAL in the calling subroutine. *> If SORT = 'N', SELCTG is not referenced. *> If SORT = 'S', SELCTG is used to select eigenvalues to sort @@ -320,7 +320,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complexGEeigen * @@ -330,10 +330,10 @@ $ LDVSR, RCONDE, RCONDV, WORK, LWORK, RWORK, $ IWORK, LIWORK, BWORK, INFO ) * -* -- LAPACK driver routine (version 3.7.0) -- +* -- LAPACK driver routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER JOBVSL, JOBVSR, SENSE, SORT diff -Nru lapack-3.7.0/SRC/cgsvj0.f lapack-3.7.1/SRC/cgsvj0.f --- lapack-3.7.0/SRC/cgsvj0.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/cgsvj0.f 2017-06-17 22:46:53.000000000 +0000 @@ -169,7 +169,7 @@ *> *> \param[out] WORK *> \verbatim -*> WORK is COMPLEX array, dimension LWORK. +*> WORK is COMPLEX array, dimension (LWORK) *> \endverbatim *> *> \param[in] LWORK @@ -218,7 +218,7 @@ SUBROUTINE CGSVJ0( JOBV, M, N, A, LDA, D, SVA, MV, V, LDV, EPS, $ SFMIN, TOL, NSWEEP, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 diff -Nru lapack-3.7.0/SRC/cgsvj1.f lapack-3.7.1/SRC/cgsvj1.f --- lapack-3.7.0/SRC/cgsvj1.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/cgsvj1.f 2017-06-17 22:46:53.000000000 +0000 @@ -199,7 +199,7 @@ *> *> \param[out] WORK *> \verbatim -*> WORK is COMPLEX array, dimension LWORK. +*> WORK is COMPLEX array, dimension (LWORK) *> \endverbatim *> *> \param[in] LWORK @@ -236,7 +236,7 @@ SUBROUTINE CGSVJ1( JOBV, M, N, N1, A, LDA, D, SVA, MV, V, LDV, $ EPS, SFMIN, TOL, NSWEEP, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 diff -Nru lapack-3.7.0/SRC/chb2st_kernels.f lapack-3.7.1/SRC/chb2st_kernels.f --- lapack-3.7.0/SRC/chb2st_kernels.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/chb2st_kernels.f 2017-06-17 22:46:53.000000000 +0000 @@ -47,45 +47,87 @@ * Arguments: * ========== * -*> @param[in] n -*> The order of the matrix A. -*> -*> @param[in] nb -*> The size of the band. -*> -*> @param[in, out] A -*> A pointer to the matrix A. -*> -*> @param[in] lda -*> The leading dimension of the matrix A. +*> \param[in] UPLO +*> \verbatim +*> UPLO is CHARACTER*1 +*> \endverbatim *> -*> @param[out] V -*> COMPLEX array, dimension 2*n if eigenvalues only are -*> requested or to be queried for vectors. +*> \param[in] WANTZ +*> \verbatim +*> WANTZ is LOGICAL which indicate if Eigenvalue are requested or both +*> Eigenvalue/Eigenvectors. +*> \endverbatim *> -*> @param[out] TAU -*> COMPLEX array, dimension (2*n). -*> The scalar factors of the Householder reflectors are stored -*> in this array. +*> \param[in] TTYPE +*> \verbatim +*> TTYPE is INTEGER +*> \endverbatim *> -*> @param[in] st +*> \param[in] ST +*> \verbatim +*> ST is INTEGER *> internal parameter for indices. +*> \endverbatim *> -*> @param[in] ed +*> \param[in] ED +*> \verbatim +*> ED is INTEGER *> internal parameter for indices. +*> \endverbatim *> -*> @param[in] sweep +*> \param[in] SWEEP +*> \verbatim +*> SWEEP is INTEGER *> internal parameter for indices. +*> \endverbatim *> -*> @param[in] Vblksiz -*> internal parameter for indices. +*> \param[in] N +*> \verbatim +*> N is INTEGER. The order of the matrix A. +*> \endverbatim *> -*> @param[in] wantz -*> logical which indicate if Eigenvalue are requested or both -*> Eigenvalue/Eigenvectors. +*> \param[in] NB +*> \verbatim +*> NB is INTEGER. The size of the band. +*> \endverbatim +*> +*> \param[in] IB +*> \verbatim +*> IB is INTEGER. +*> \endverbatim +*> +*> \param[in, out] A +*> \verbatim +*> A is COMPLEX array. A pointer to the matrix A. +*> \endverbatim +*> +*> \param[in] LDA +*> \verbatim +*> LDA is INTEGER. The leading dimension of the matrix A. +*> \endverbatim +*> +*> \param[out] V +*> \verbatim +*> V is COMPLEX array, dimension 2*n if eigenvalues only are +*> requested or to be queried for vectors. +*> \endverbatim +*> +*> \param[out] TAU +*> \verbatim +*> TAU is COMPLEX array, dimension (2*n). +*> The scalar factors of the Householder reflectors are stored +*> in this array. +*> \endverbatim +*> +*> \param[in] LDVT +*> \verbatim +*> LDVT is INTEGER. +*> \endverbatim *> -*> @param[in] work -*> Workspace of size nb. +*> \param[in] WORK +*> \verbatim +*> WORK is COMPLEX array. Workspace of size nb. +*> \endverbatim *> *> \par Further Details: * ===================== @@ -128,10 +170,10 @@ * IMPLICIT NONE * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/SRC/chbev_2stage.f lapack-3.7.1/SRC/chbev_2stage.f --- lapack-3.7.0/SRC/chbev_2stage.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/chbev_2stage.f 2017-06-17 22:46:53.000000000 +0000 @@ -171,7 +171,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complexOTHEReigen * @@ -213,10 +213,10 @@ * IMPLICIT NONE * -* -- LAPACK driver routine (version 3.7.0) -- +* -- LAPACK driver routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER JOBZ, UPLO @@ -247,7 +247,7 @@ EXTERNAL LSAME, SLAMCH, CLANHB, ILAENV * .. * .. External Subroutines .. - EXTERNAL SSCAL, SSTERF, XERBLA, CLASCL, CSTEQR + EXTERNAL SSCAL, SSTERF, XERBLA, CLASCL, CSTEQR, $ CHETRD_2STAGE * .. * .. Intrinsic Functions .. diff -Nru lapack-3.7.0/SRC/checon_3.f lapack-3.7.1/SRC/checon_3.f --- lapack-3.7.0/SRC/checon_3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/checon_3.f 2017-06-17 22:46:53.000000000 +0000 @@ -95,7 +95,7 @@ *> On entry, contains the superdiagonal (or subdiagonal) *> elements of the Hermitian block diagonal matrix D *> with 1-by-1 or 2-by-2 diagonal blocks, where -*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; +*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. *> *> NOTE: For 1-by-1 diagonal block D(k), where @@ -149,7 +149,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complexHEcomputational * @@ -157,7 +157,7 @@ * ================== *> \verbatim *> -*> December 2016, Igor Kozachenko, +*> June 2017, Igor Kozachenko, *> Computer Science Division, *> University of California, Berkeley *> @@ -171,10 +171,10 @@ SUBROUTINE CHECON_3( UPLO, N, A, LDA, E, IPIV, ANORM, RCOND, $ WORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/SRC/chegv_2stage.f lapack-3.7.1/SRC/chegv_2stage.f --- lapack-3.7.0/SRC/chegv_2stage.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/chegv_2stage.f 2017-06-17 22:46:53.000000000 +0000 @@ -47,7 +47,7 @@ *> positive definite. *> This routine use the 2stage technique for the reduction to tridiagonal *> which showed higher performance on recent architecture and for large -* sizes N>2000. +*> sizes N>2000. *> \endverbatim * * Arguments: @@ -192,7 +192,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complexHEeigen * @@ -234,10 +234,10 @@ * IMPLICIT NONE * -* -- LAPACK driver routine (version 3.7.0) -- +* -- LAPACK driver routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER JOBZ, UPLO diff -Nru lapack-3.7.0/SRC/chetrd_2stage.f lapack-3.7.1/SRC/chetrd_2stage.f --- lapack-3.7.0/SRC/chetrd_2stage.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/chetrd_2stage.f 2017-06-17 22:46:53.000000000 +0000 @@ -144,7 +144,7 @@ *> *> \param[out] WORK *> \verbatim -*> WORK is COMPLEX array, dimension LWORK. +*> WORK is COMPLEX array, dimension (LWORK) *> \endverbatim *> *> \param[in] LWORK @@ -183,7 +183,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complexHEcomputational * @@ -227,10 +227,10 @@ * IMPLICIT NONE * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER VECT, UPLO diff -Nru lapack-3.7.0/SRC/chetrd_he2hb.f lapack-3.7.1/SRC/chetrd_he2hb.f --- lapack-3.7.0/SRC/chetrd_he2hb.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/chetrd_he2hb.f 2017-06-17 22:46:53.000000000 +0000 @@ -123,7 +123,7 @@ *> *> \param[out] WORK *> \verbatim -*> WORK is COMPLEX array, dimension LWORK. +*> WORK is COMPLEX array, dimension (LWORK) *> On exit, if INFO = 0, or if LWORK=-1, *> WORK(1) returns the size of LWORK. *> \endverbatim @@ -132,7 +132,7 @@ *> \verbatim *> LWORK is INTEGER *> The dimension of the array WORK which should be calculated -* by a workspace query. LWORK = MAX(1, LWORK_QUERY) +*> by a workspace query. LWORK = MAX(1, LWORK_QUERY) *> If LWORK = -1, then a workspace query is assumed; the routine *> only calculates the optimal size of the WORK array, returns *> this value as the first entry of the WORK array, and no error @@ -158,7 +158,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complexHEcomputational * @@ -222,7 +222,7 @@ *> *> where tau is a complex scalar, and v is a complex vector with *> v(kd+1:i) = 0 and v(i+kd+1) = 1; v(i+kd+2:n) is stored on exit in -* A(i+kd+2:n,i), and tau in TAU(i). +*> A(i+kd+2:n,i), and tau in TAU(i). *> *> The contents of A on exit are illustrated by the following examples *> with n = 5: @@ -245,10 +245,10 @@ * IMPLICIT NONE * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/SRC/chetrf_aa.f lapack-3.7.1/SRC/chetrf_aa.f --- lapack-3.7.0/SRC/chetrf_aa.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/chetrf_aa.f 2017-06-17 22:46:53.000000000 +0000 @@ -114,11 +114,7 @@ *> \verbatim *> INFO is INTEGER *> = 0: successful exit -*> < 0: if INFO = -i, the i-th argument had an illegal value -*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization -*> has been completed, but the block diagonal matrix D is -*> exactly singular, and division by zero will occur if it -*> is used to solve a system of equations. +*> < 0: if INFO = -i, the i-th argument had an illegal value. *> \endverbatim * * Authors: @@ -159,7 +155,7 @@ * * .. Local Scalars .. LOGICAL LQUERY, UPPER - INTEGER J, LWKOPT, IINFO + INTEGER J, LWKOPT INTEGER NB, MJ, NJ, K1, K2, J1, J2, J3, JB COMPLEX ALPHA * .. @@ -215,13 +211,10 @@ IPIV( 1 ) = 1 IF ( N.EQ.1 ) THEN A( 1, 1 ) = REAL( A( 1, 1 ) ) - IF ( A( 1, 1 ).EQ.ZERO ) THEN - INFO = 1 - END IF RETURN END IF * -* Adjubst block size based on the workspace size +* Adjust block size based on the workspace size * IF( LWORK.LT.((1+NB)*N) ) THEN NB = ( LWORK-N ) / N @@ -261,11 +254,7 @@ * CALL CLAHEF_AA( UPLO, 2-K1, N-J, JB, $ A( MAX(1, J), J+1 ), LDA, - $ IPIV( J+1 ), WORK, N, WORK( N*NB+1 ), - $ IINFO ) - IF( (IINFO.GT.0) .AND. (INFO.EQ.0) ) THEN - INFO = IINFO+J - ENDIF + $ IPIV( J+1 ), WORK, N, WORK( N*NB+1 ) ) * * Ajust IPIV and apply it back (J-th step picks (J+1)-th pivot) * @@ -385,10 +374,7 @@ * CALL CLAHEF_AA( UPLO, 2-K1, N-J, JB, $ A( J+1, MAX(1, J) ), LDA, - $ IPIV( J+1 ), WORK, N, WORK( N*NB+1 ), IINFO) - IF( (IINFO.GT.0) .AND. (INFO.EQ.0) ) THEN - INFO = IINFO+J - ENDIF + $ IPIV( J+1 ), WORK, N, WORK( N*NB+1 ) ) * * Ajust IPIV and apply it back (J-th step picks (J+1)-th pivot) * diff -Nru lapack-3.7.0/SRC/chetri_3.f lapack-3.7.1/SRC/chetri_3.f --- lapack-3.7.0/SRC/chetri_3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/chetri_3.f 2017-06-17 22:46:53.000000000 +0000 @@ -102,7 +102,7 @@ *> On entry, contains the superdiagonal (or subdiagonal) *> elements of the Hermitian block diagonal matrix D *> with 1-by-1 or 2-by-2 diagonal blocks, where -*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; +*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. *> *> NOTE: For 1-by-1 diagonal block D(k), where @@ -152,7 +152,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complexHEcomputational * @@ -160,7 +160,7 @@ * ================== *> \verbatim *> -*> December 2016, Igor Kozachenko, +*> June 2017, Igor Kozachenko, *> Computer Science Division, *> University of California, Berkeley *> @@ -170,10 +170,10 @@ SUBROUTINE CHETRI_3( UPLO, N, A, LDA, E, IPIV, WORK, LWORK, $ INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/SRC/chetri_3x.f lapack-3.7.1/SRC/chetri_3x.f --- lapack-3.7.0/SRC/chetri_3x.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/chetri_3x.f 2017-06-17 22:46:53.000000000 +0000 @@ -99,7 +99,7 @@ *> On entry, contains the superdiagonal (or subdiagonal) *> elements of the Hermitian block diagonal matrix D *> with 1-by-1 or 2-by-2 diagonal blocks, where -*> If UPLO = 'U': E(i) = D(i-1,i), i=2:N, E(1) not refernced; +*> If UPLO = 'U': E(i) = D(i-1,i), i=2:N, E(1) not referenced; *> If UPLO = 'L': E(i) = D(i+1,i), i=1:N-1, E(N) not referenced. *> *> NOTE: For 1-by-1 diagonal block D(k), where @@ -142,7 +142,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complexHEcomputational * @@ -150,7 +150,7 @@ * ================== *> \verbatim *> -*> December 2016, Igor Kozachenko, +*> June 2017, Igor Kozachenko, *> Computer Science Division, *> University of California, Berkeley *> @@ -159,10 +159,10 @@ * ===================================================================== SUBROUTINE CHETRI_3X( UPLO, N, A, LDA, E, IPIV, WORK, NB, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/SRC/chetrs_3.f lapack-3.7.1/SRC/chetrs_3.f --- lapack-3.7.0/SRC/chetrs_3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/chetrs_3.f 2017-06-17 22:46:53.000000000 +0000 @@ -99,7 +99,7 @@ *> On entry, contains the superdiagonal (or subdiagonal) *> elements of the Hermitian block diagonal matrix D *> with 1-by-1 or 2-by-2 diagonal blocks, where -*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; +*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. *> *> NOTE: For 1-by-1 diagonal block D(k), where @@ -142,7 +142,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complexHEcomputational * @@ -151,7 +151,7 @@ *> *> \verbatim *> -*> December 2016, Igor Kozachenko, +*> June 2017, Igor Kozachenko, *> Computer Science Division, *> University of California, Berkeley *> @@ -165,10 +165,10 @@ SUBROUTINE CHETRS_3( UPLO, N, NRHS, A, LDA, E, IPIV, B, LDB, $ INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/SRC/chetrs_aa.f lapack-3.7.1/SRC/chetrs_aa.f --- lapack-3.7.0/SRC/chetrs_aa.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/chetrs_aa.f 2017-06-17 22:46:53.000000000 +0000 @@ -66,7 +66,7 @@ *> of the matrix B. NRHS >= 0. *> \endverbatim *> -*> \param[in,out] A +*> \param[in] A *> \verbatim *> A is COMPLEX array, dimension (LDA,N) *> Details of factors computed by CHETRF_AA. @@ -121,7 +121,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complexHEcomputational * @@ -129,10 +129,10 @@ SUBROUTINE CHETRS_AA( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, $ WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * IMPLICIT NONE * diff -Nru lapack-3.7.0/SRC/clabrd.f lapack-3.7.1/SRC/clabrd.f --- lapack-3.7.0/SRC/clabrd.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/clabrd.f 2017-06-17 22:46:53.000000000 +0000 @@ -111,7 +111,7 @@ *> *> \param[out] TAUQ *> \verbatim -*> TAUQ is COMPLEX array dimension (NB) +*> TAUQ is COMPLEX array, dimension (NB) *> The scalar factors of the elementary reflectors which *> represent the unitary matrix Q. See Further Details. *> \endverbatim @@ -157,7 +157,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complexOTHERauxiliary * @@ -212,10 +212,10 @@ SUBROUTINE CLABRD( M, N, NB, A, LDA, D, E, TAUQ, TAUP, X, LDX, Y, $ LDY ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER LDA, LDX, LDY, M, N, NB diff -Nru lapack-3.7.0/SRC/cla_gbrfsx_extended.f lapack-3.7.1/SRC/cla_gbrfsx_extended.f --- lapack-3.7.0/SRC/cla_gbrfsx_extended.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/cla_gbrfsx_extended.f 2017-06-17 22:46:53.000000000 +0000 @@ -208,8 +208,7 @@ *> *> \param[in,out] ERR_BNDS_NORM *> \verbatim -*> ERR_BNDS_NORM is REAL array, dimension -*> (NRHS, N_ERR_BNDS) +*> ERR_BNDS_NORM is REAL array, dimension (NRHS, N_ERR_BNDS) *> For each right-hand side, this array contains information about *> various error bounds and condition numbers corresponding to the *> normwise relative error, which is defined as follows: @@ -255,8 +254,7 @@ *> *> \param[in,out] ERR_BNDS_COMP *> \verbatim -*> ERR_BNDS_COMP is REAL array, dimension -*> (NRHS, N_ERR_BNDS) +*> ERR_BNDS_COMP is REAL array, dimension (NRHS, N_ERR_BNDS) *> For each right-hand side, this array contains information about *> various error bounds and condition numbers corresponding to the *> componentwise relative error, which is defined as follows: @@ -399,7 +397,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complexGBcomputational * @@ -412,10 +410,10 @@ $ Y_TAIL, RCOND, ITHRESH, RTHRESH, $ DZ_UB, IGNORE_CWISE, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDAB, LDAFB, LDB, LDY, N, KL, KU, NRHS, diff -Nru lapack-3.7.0/SRC/cla_heamv.f lapack-3.7.1/SRC/cla_heamv.f --- lapack-3.7.0/SRC/cla_heamv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/cla_heamv.f 2017-06-17 22:46:53.000000000 +0000 @@ -89,7 +89,7 @@ *> *> \param[in] A *> \verbatim -*> A is COMPLEX array of DIMENSION ( LDA, n ). +*> A is COMPLEX array, dimension ( LDA, n ). *> Before entry, the leading m by n part of the array A must *> contain the matrix of coefficients. *> Unchanged on exit. @@ -154,7 +154,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complexHEcomputational * @@ -178,10 +178,10 @@ SUBROUTINE CLA_HEAMV( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y, $ INCY ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. REAL ALPHA, BETA diff -Nru lapack-3.7.0/SRC/clahef_aa.f lapack-3.7.1/SRC/clahef_aa.f --- lapack-3.7.0/SRC/clahef_aa.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/clahef_aa.f 2017-06-17 22:46:53.000000000 +0000 @@ -19,11 +19,11 @@ * =========== * * SUBROUTINE CLAHEF_AA( UPLO, J1, M, NB, A, LDA, IPIV, -* H, LDH, WORK, INFO ) +* H, LDH, WORK ) * * .. Scalar Arguments .. * CHARACTER UPLO -* INTEGER J1, M, NB, LDA, LDH, INFO +* INTEGER J1, M, NB, LDA, LDH * .. * .. Array Arguments .. * INTEGER IPIV( * ) @@ -127,16 +127,6 @@ *> WORK is COMPLEX workspace, dimension (M). *> \endverbatim *> -*> \param[out] INFO -*> \verbatim -*> INFO is INTEGER -*> = 0: successful exit -*> < 0: if INFO = -i, the i-th argument had an illegal value -*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization -*> has been completed, but the block diagonal matrix D is -*> exactly singular, and division by zero will occur if it -*> is used to solve a system of equations. -*> \endverbatim * * Authors: * ======== @@ -146,24 +136,24 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complexSYcomputational * * ===================================================================== SUBROUTINE CLAHEF_AA( UPLO, J1, M, NB, A, LDA, IPIV, - $ H, LDH, WORK, INFO ) + $ H, LDH, WORK ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * IMPLICIT NONE * * .. Scalar Arguments .. CHARACTER UPLO - INTEGER M, NB, J1, LDA, LDH, INFO + INTEGER M, NB, J1, LDA, LDH * .. * .. Array Arguments .. INTEGER IPIV( * ) @@ -192,7 +182,6 @@ * .. * .. Executable Statements .. * - INFO = 0 J = 1 * * K1 is the first column of the panel to be factorized @@ -319,12 +308,6 @@ * Set A(J, J+1) = T(J, J+1) * A( K, J+1 ) = WORK( 2 ) - IF( (A( K, J ).EQ.ZERO ) .AND. - $ ( (J.EQ.M) .OR. (A( K, J+1 ).EQ.ZERO))) THEN - IF(INFO .EQ. 0) THEN - INFO = J - END IF - END IF * IF( J.LT.NB ) THEN * @@ -345,10 +328,6 @@ CALL CLASET( 'Full', 1, M-J-1, ZERO, ZERO, $ A( K, J+2 ), LDA) END IF - ELSE - IF( (A( K, J ).EQ.ZERO) .AND. (INFO.EQ.0) ) THEN - INFO = J - END IF END IF J = J + 1 GO TO 10 @@ -473,11 +452,6 @@ * Set A(J+1, J) = T(J+1, J) * A( J+1, K ) = WORK( 2 ) - IF( (A( J, K ).EQ.ZERO) .AND. - $ ( (J.EQ.M) .OR. (A( J+1, K ).EQ.ZERO)) ) THEN - IF (INFO .EQ. 0) - $ INFO = J - END IF * IF( J.LT.NB ) THEN * @@ -498,9 +472,6 @@ CALL CLASET( 'Full', M-J-1, 1, ZERO, ZERO, $ A( J+2, K ), LDA ) END IF - ELSE - IF( (A( J, K ).EQ.ZERO) .AND. (J.EQ.M) - $ .AND. (INFO.EQ.0) ) INFO = J END IF J = J + 1 GO TO 30 diff -Nru lapack-3.7.0/SRC/cla_herfsx_extended.f lapack-3.7.1/SRC/cla_herfsx_extended.f --- lapack-3.7.0/SRC/cla_herfsx_extended.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/cla_herfsx_extended.f 2017-06-17 22:46:53.000000000 +0000 @@ -161,8 +161,7 @@ *> *> \param[in,out] Y *> \verbatim -*> Y is COMPLEX array, dimension -*> (LDY,NRHS) +*> Y is COMPLEX array, dimension (LDY,NRHS) *> On entry, the solution matrix X, as computed by CHETRS. *> On exit, the improved solution matrix Y. *> \endverbatim @@ -194,8 +193,7 @@ *> *> \param[in,out] ERR_BNDS_NORM *> \verbatim -*> ERR_BNDS_NORM is REAL array, dimension -*> (NRHS, N_ERR_BNDS) +*> ERR_BNDS_NORM is REAL array, dimension (NRHS, N_ERR_BNDS) *> For each right-hand side, this array contains information about *> various error bounds and condition numbers corresponding to the *> normwise relative error, which is defined as follows: @@ -241,8 +239,7 @@ *> *> \param[in,out] ERR_BNDS_COMP *> \verbatim -*> ERR_BNDS_COMP is REAL array, dimension -*> (NRHS, N_ERR_BNDS) +*> ERR_BNDS_COMP is REAL array, dimension (NRHS, N_ERR_BNDS) *> For each right-hand side, this array contains information about *> various error bounds and condition numbers corresponding to the *> componentwise relative error, which is defined as follows: @@ -385,7 +382,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complexHEcomputational * @@ -398,10 +395,10 @@ $ RTHRESH, DZ_UB, IGNORE_CWISE, $ INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE, diff -Nru lapack-3.7.0/SRC/clalsa.f lapack-3.7.1/SRC/clalsa.f --- lapack-3.7.0/SRC/clalsa.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/clalsa.f 2017-06-17 22:46:53.000000000 +0000 @@ -232,8 +232,7 @@ *> *> \param[out] IWORK *> \verbatim -*> IWORK is INTEGER array. -*> The dimension must be at least 3 * N +*> IWORK is INTEGER array, dimension (3*N) *> \endverbatim *> *> \param[out] INFO @@ -251,7 +250,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complexOTHERcomputational * @@ -268,10 +267,10 @@ $ GIVCOL, LDGCOL, PERM, GIVNUM, C, S, RWORK, $ IWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER ICOMPQ, INFO, LDB, LDBX, LDGCOL, LDU, N, NRHS, diff -Nru lapack-3.7.0/SRC/clamswlq.f lapack-3.7.1/SRC/clamswlq.f --- lapack-3.7.0/SRC/clamswlq.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/clamswlq.f 2017-06-17 22:46:53.000000000 +0000 @@ -23,7 +23,7 @@ *> *> SIDE = 'L' SIDE = 'R' *> TRANS = 'N': Q * C C * Q -*> TRANS = 'T': Q**T * C C * Q**T +*> TRANS = 'T': Q**H * C C * Q**H *> where Q is a real orthogonal matrix defined as the product of blocked *> elementary reflectors computed by short wide LQ *> factorization (CLASWLQ) @@ -35,21 +35,21 @@ *> \param[in] SIDE *> \verbatim *> SIDE is CHARACTER*1 -*> = 'L': apply Q or Q**T from the Left; -*> = 'R': apply Q or Q**T from the Right. +*> = 'L': apply Q or Q**H from the Left; +*> = 'R': apply Q or Q**H from the Right. *> \endverbatim *> *> \param[in] TRANS *> \verbatim *> TRANS is CHARACTER*1 *> = 'N': No transpose, apply Q; -*> = 'T': Transpose, apply Q**T. +*> = 'C': Transpose, apply Q**H. *> \endverbatim *> *> \param[in] M *> \verbatim *> M is INTEGER -*> The number of rows of the matrix A. M >=0. +*> The number of rows of the matrix C. M >=0. *> \endverbatim *> *> \param[in] N @@ -88,12 +88,14 @@ *> *> \endverbatim *> -*> \param[in,out] A +*> \param[in] A *> \verbatim -*> A is COMPLEX array, dimension (LDA,K) +*> A is COMPLEX array, dimension +*> (LDA,M) if SIDE = 'L', +*> (LDA,N) if SIDE = 'R' *> The i-th row must contain the vector which defines the blocked *> elementary reflector H(i), for i = 1,2,...,k, as returned by -*> DLASWLQ in the first k rows of its array argument A. +*> CLASWLQ in the first k rows of its array argument A. *> \endverbatim *> *> \param[in] LDA @@ -123,7 +125,7 @@ *> \verbatim *> C is COMPLEX array, dimension (LDC,N) *> On entry, the M-by-N matrix C. -*> On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q. +*> On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q. *> \endverbatim *> *> \param[in] LDC @@ -200,10 +202,10 @@ SUBROUTINE CLAMSWLQ( SIDE, TRANS, M, N, K, MB, NB, A, LDA, T, $ LDT, C, LDC, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER SIDE, TRANS @@ -219,7 +221,7 @@ * .. * .. Local Scalars .. LOGICAL LEFT, RIGHT, TRAN, NOTRAN, LQUERY - INTEGER I, II, KK, LW , CTR + INTEGER I, II, KK, LW, CTR * .. * .. External Functions .. LOGICAL LSAME diff -Nru lapack-3.7.0/SRC/clamtsqr.f lapack-3.7.1/SRC/clamtsqr.f --- lapack-3.7.0/SRC/clamtsqr.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/clamtsqr.f 2017-06-17 22:46:53.000000000 +0000 @@ -23,7 +23,7 @@ *> *> SIDE = 'L' SIDE = 'R' *> TRANS = 'N': Q * C C * Q -*> TRANS = 'C': Q**C * C C * Q**C +*> TRANS = 'C': Q**H * C C * Q**H *> where Q is a real orthogonal matrix defined as the product *> of blocked elementary reflectors computed by tall skinny *> QR factorization (CLATSQR) @@ -35,15 +35,15 @@ *> \param[in] SIDE *> \verbatim *> SIDE is CHARACTER*1 -*> = 'L': apply Q or Q**T from the Left; -*> = 'R': apply Q or Q**T from the Right. +*> = 'L': apply Q or Q**H from the Left; +*> = 'R': apply Q or Q**H from the Right. *> \endverbatim *> *> \param[in] TRANS *> \verbatim *> TRANS is CHARACTER*1 *> = 'N': No transpose, apply Q; -*> = 'C': Conjugate Transpose, apply Q**C. +*> = 'C': Conjugate Transpose, apply Q**H. *> \endverbatim *> *> \param[in] M @@ -81,7 +81,7 @@ *> N >= NB >= 1. *> \endverbatim *> -*> \param[in,out] A +*> \param[in] A *> \verbatim *> A is COMPLEX array, dimension (LDA,K) *> The i-th column must contain the vector which defines the @@ -117,7 +117,7 @@ *> \verbatim *> C is COMPLEX array, dimension (LDC,N) *> On entry, the M-by-N matrix C. -*> On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q. +*> On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q. *> \endverbatim *> *> \param[in] LDC @@ -195,10 +195,10 @@ SUBROUTINE CLAMTSQR( SIDE, TRANS, M, N, K, MB, NB, A, LDA, T, $ LDT, C, LDC, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER SIDE, TRANS diff -Nru lapack-3.7.0/SRC/cla_porfsx_extended.f lapack-3.7.1/SRC/cla_porfsx_extended.f --- lapack-3.7.0/SRC/cla_porfsx_extended.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/cla_porfsx_extended.f 2017-06-17 22:46:53.000000000 +0000 @@ -153,8 +153,7 @@ *> *> \param[in,out] Y *> \verbatim -*> Y is COMPLEX array, dimension -*> (LDY,NRHS) +*> Y is COMPLEX array, dimension (LDY,NRHS) *> On entry, the solution matrix X, as computed by CPOTRS. *> On exit, the improved solution matrix Y. *> \endverbatim @@ -186,8 +185,7 @@ *> *> \param[in,out] ERR_BNDS_NORM *> \verbatim -*> ERR_BNDS_NORM is REAL array, dimension -*> (NRHS, N_ERR_BNDS) +*> ERR_BNDS_NORM is REAL array, dimension (NRHS, N_ERR_BNDS) *> For each right-hand side, this array contains information about *> various error bounds and condition numbers corresponding to the *> normwise relative error, which is defined as follows: @@ -233,8 +231,7 @@ *> *> \param[in,out] ERR_BNDS_COMP *> \verbatim -*> ERR_BNDS_COMP is REAL array, dimension -*> (NRHS, N_ERR_BNDS) +*> ERR_BNDS_COMP is REAL array, dimension (NRHS, N_ERR_BNDS) *> For each right-hand side, this array contains information about *> various error bounds and condition numbers corresponding to the *> componentwise relative error, which is defined as follows: @@ -377,7 +374,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complexPOcomputational * @@ -390,10 +387,10 @@ $ RTHRESH, DZ_UB, IGNORE_CWISE, $ INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE, diff -Nru lapack-3.7.0/SRC/claqr1.f lapack-3.7.1/SRC/claqr1.f --- lapack-3.7.0/SRC/claqr1.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/claqr1.f 2017-06-17 22:46:53.000000000 +0000 @@ -50,19 +50,19 @@ * *> \param[in] N *> \verbatim -*> N is integer +*> N is INTEGER *> Order of the matrix H. N must be either 2 or 3. *> \endverbatim *> *> \param[in] H *> \verbatim -*> H is COMPLEX array of dimension (LDH,N) +*> H is COMPLEX array, dimension (LDH,N) *> The 2-by-2 or 3-by-3 matrix H in (*). *> \endverbatim *> *> \param[in] LDH *> \verbatim -*> LDH is integer +*> LDH is INTEGER *> The leading dimension of H as declared in *> the calling procedure. LDH.GE.N *> \endverbatim @@ -81,7 +81,7 @@ *> *> \param[out] V *> \verbatim -*> V is COMPLEX array of dimension N +*> V is COMPLEX array, dimension (N) *> A scalar multiple of the first column of the *> matrix K in (*). *> \endverbatim @@ -94,7 +94,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complexOTHERauxiliary * @@ -107,10 +107,10 @@ * ===================================================================== SUBROUTINE CLAQR1( N, H, LDH, S1, S2, V ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. COMPLEX S1, S2 diff -Nru lapack-3.7.0/SRC/claqr2.f lapack-3.7.1/SRC/claqr2.f --- lapack-3.7.0/SRC/claqr2.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/claqr2.f 2017-06-17 22:46:53.000000000 +0000 @@ -118,7 +118,7 @@ *> *> \param[in] LDH *> \verbatim -*> LDH is integer +*> LDH is INTEGER *> Leading dimension of H just as declared in the calling *> subroutine. N .LE. LDH *> \endverbatim @@ -146,14 +146,14 @@ *> *> \param[in] LDZ *> \verbatim -*> LDZ is integer +*> LDZ is INTEGER *> The leading dimension of Z just as declared in the *> calling subroutine. 1 .LE. LDZ. *> \endverbatim *> *> \param[out] NS *> \verbatim -*> NS is integer +*> NS is INTEGER *> The number of unconverged (ie approximate) eigenvalues *> returned in SR and SI that may be used as shifts by the *> calling subroutine. @@ -161,14 +161,14 @@ *> *> \param[out] ND *> \verbatim -*> ND is integer +*> ND is INTEGER *> The number of converged eigenvalues uncovered by this *> subroutine. *> \endverbatim *> *> \param[out] SH *> \verbatim -*> SH is COMPLEX array, dimension KBOT +*> SH is COMPLEX array, dimension (KBOT) *> On output, approximate eigenvalues that may *> be used for shifts are stored in SH(KBOT-ND-NS+1) *> through SR(KBOT-ND). Converged eigenvalues are @@ -183,14 +183,14 @@ *> *> \param[in] LDV *> \verbatim -*> LDV is integer scalar +*> LDV is INTEGER *> The leading dimension of V just as declared in the *> calling subroutine. NW .LE. LDV *> \endverbatim *> *> \param[in] NH *> \verbatim -*> NH is integer scalar +*> NH is INTEGER *> The number of columns of T. NH.GE.NW. *> \endverbatim *> @@ -201,14 +201,14 @@ *> *> \param[in] LDT *> \verbatim -*> LDT is integer +*> LDT is INTEGER *> The leading dimension of T just as declared in the *> calling subroutine. NW .LE. LDT *> \endverbatim *> *> \param[in] NV *> \verbatim -*> NV is integer +*> NV is INTEGER *> The number of rows of work array WV available for *> workspace. NV.GE.NW. *> \endverbatim @@ -220,21 +220,21 @@ *> *> \param[in] LDWV *> \verbatim -*> LDWV is integer +*> LDWV is INTEGER *> The leading dimension of W just as declared in the *> calling subroutine. NW .LE. LDV *> \endverbatim *> *> \param[out] WORK *> \verbatim -*> WORK is COMPLEX array, dimension LWORK. +*> WORK is COMPLEX array, dimension (LWORK) *> On exit, WORK(1) is set to an estimate of the optimal value *> of LWORK for the given values of N, NW, KTOP and KBOT. *> \endverbatim *> *> \param[in] LWORK *> \verbatim -*> LWORK is integer +*> LWORK is INTEGER *> The dimension of the work array WORK. LWORK = 2*NW *> suffices, but greater efficiency may result from larger *> values of LWORK. @@ -254,7 +254,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complexOTHERauxiliary * @@ -269,10 +269,10 @@ $ IHIZ, Z, LDZ, NS, ND, SH, V, LDV, NH, T, LDT, $ NV, WV, LDWV, WORK, LWORK ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV, diff -Nru lapack-3.7.0/SRC/claqr3.f lapack-3.7.1/SRC/claqr3.f --- lapack-3.7.0/SRC/claqr3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/claqr3.f 2017-06-17 22:46:53.000000000 +0000 @@ -115,7 +115,7 @@ *> *> \param[in] LDH *> \verbatim -*> LDH is integer +*> LDH is INTEGER *> Leading dimension of H just as declared in the calling *> subroutine. N .LE. LDH *> \endverbatim @@ -143,14 +143,14 @@ *> *> \param[in] LDZ *> \verbatim -*> LDZ is integer +*> LDZ is INTEGER *> The leading dimension of Z just as declared in the *> calling subroutine. 1 .LE. LDZ. *> \endverbatim *> *> \param[out] NS *> \verbatim -*> NS is integer +*> NS is INTEGER *> The number of unconverged (ie approximate) eigenvalues *> returned in SR and SI that may be used as shifts by the *> calling subroutine. @@ -158,14 +158,14 @@ *> *> \param[out] ND *> \verbatim -*> ND is integer +*> ND is INTEGER *> The number of converged eigenvalues uncovered by this *> subroutine. *> \endverbatim *> *> \param[out] SH *> \verbatim -*> SH is COMPLEX array, dimension KBOT +*> SH is COMPLEX array, dimension (KBOT) *> On output, approximate eigenvalues that may *> be used for shifts are stored in SH(KBOT-ND-NS+1) *> through SR(KBOT-ND). Converged eigenvalues are @@ -180,14 +180,14 @@ *> *> \param[in] LDV *> \verbatim -*> LDV is integer scalar +*> LDV is INTEGER *> The leading dimension of V just as declared in the *> calling subroutine. NW .LE. LDV *> \endverbatim *> *> \param[in] NH *> \verbatim -*> NH is integer scalar +*> NH is INTEGER *> The number of columns of T. NH.GE.NW. *> \endverbatim *> @@ -198,14 +198,14 @@ *> *> \param[in] LDT *> \verbatim -*> LDT is integer +*> LDT is INTEGER *> The leading dimension of T just as declared in the *> calling subroutine. NW .LE. LDT *> \endverbatim *> *> \param[in] NV *> \verbatim -*> NV is integer +*> NV is INTEGER *> The number of rows of work array WV available for *> workspace. NV.GE.NW. *> \endverbatim @@ -217,21 +217,21 @@ *> *> \param[in] LDWV *> \verbatim -*> LDWV is integer +*> LDWV is INTEGER *> The leading dimension of W just as declared in the *> calling subroutine. NW .LE. LDV *> \endverbatim *> *> \param[out] WORK *> \verbatim -*> WORK is COMPLEX array, dimension LWORK. +*> WORK is COMPLEX array, dimension (LWORK) *> On exit, WORK(1) is set to an estimate of the optimal value *> of LWORK for the given values of N, NW, KTOP and KBOT. *> \endverbatim *> *> \param[in] LWORK *> \verbatim -*> LWORK is integer +*> LWORK is INTEGER *> The dimension of the work array WORK. LWORK = 2*NW *> suffices, but greater efficiency may result from larger *> values of LWORK. @@ -266,7 +266,7 @@ $ IHIZ, Z, LDZ, NS, ND, SH, V, LDV, NH, T, LDT, $ NV, WV, LDWV, WORK, LWORK ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 diff -Nru lapack-3.7.0/SRC/claqr4.f lapack-3.7.1/SRC/claqr4.f --- lapack-3.7.0/SRC/claqr4.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/claqr4.f 2017-06-17 22:46:53.000000000 +0000 @@ -181,7 +181,6 @@ *> *> \param[out] INFO *> \verbatim -*> \verbatim *> INFO is INTEGER *> = 0: successful exit *> .GT. 0: if INFO = i, CLAQR4 failed to compute all of @@ -223,7 +222,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complexOTHERauxiliary * @@ -249,10 +248,10 @@ SUBROUTINE CLAQR4( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ, $ IHIZ, Z, LDZ, WORK, LWORK, INFO ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N diff -Nru lapack-3.7.0/SRC/claqr5.f lapack-3.7.1/SRC/claqr5.f --- lapack-3.7.0/SRC/claqr5.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/claqr5.f 2017-06-17 22:46:53.000000000 +0000 @@ -47,21 +47,21 @@ * *> \param[in] WANTT *> \verbatim -*> WANTT is logical scalar +*> WANTT is LOGICAL *> WANTT = .true. if the triangular Schur factor *> is being computed. WANTT is set to .false. otherwise. *> \endverbatim *> *> \param[in] WANTZ *> \verbatim -*> WANTZ is logical scalar +*> WANTZ is LOGICAL *> WANTZ = .true. if the unitary Schur factor is being *> computed. WANTZ is set to .false. otherwise. *> \endverbatim *> *> \param[in] KACC22 *> \verbatim -*> KACC22 is integer with value 0, 1, or 2. +*> KACC22 is INTEGER with value 0, 1, or 2. *> Specifies the computation mode of far-from-diagonal *> orthogonal updates. *> = 0: CLAQR5 does not accumulate reflections and does not @@ -77,19 +77,19 @@ *> *> \param[in] N *> \verbatim -*> N is integer scalar +*> N is INTEGER *> N is the order of the Hessenberg matrix H upon which this *> subroutine operates. *> \endverbatim *> *> \param[in] KTOP *> \verbatim -*> KTOP is integer scalar +*> KTOP is INTEGER *> \endverbatim *> *> \param[in] KBOT *> \verbatim -*> KBOT is integer scalar +*> KBOT is INTEGER *> These are the first and last rows and columns of an *> isolated diagonal block upon which the QR sweep is to be *> applied. It is assumed without a check that @@ -100,21 +100,21 @@ *> *> \param[in] NSHFTS *> \verbatim -*> NSHFTS is integer scalar +*> NSHFTS is INTEGER *> NSHFTS gives the number of simultaneous shifts. NSHFTS *> must be positive and even. *> \endverbatim *> *> \param[in,out] S *> \verbatim -*> S is COMPLEX array of size (NSHFTS) +*> S is COMPLEX array, dimension (NSHFTS) *> S contains the shifts of origin that define the multi- *> shift QR sweep. On output S may be reordered. *> \endverbatim *> *> \param[in,out] H *> \verbatim -*> H is COMPLEX array of size (LDH,N) +*> H is COMPLEX array, dimension (LDH,N) *> On input H contains a Hessenberg matrix. On output a *> multi-shift QR sweep with shifts SR(J)+i*SI(J) is applied *> to the isolated diagonal block in rows and columns KTOP @@ -123,7 +123,7 @@ *> *> \param[in] LDH *> \verbatim -*> LDH is integer scalar +*> LDH is INTEGER *> LDH is the leading dimension of H just as declared in the *> calling procedure. LDH.GE.MAX(1,N). *> \endverbatim @@ -142,7 +142,7 @@ *> *> \param[in,out] Z *> \verbatim -*> Z is COMPLEX array of size (LDZ,IHIZ) +*> Z is COMPLEX array, dimension (LDZ,IHIZ) *> If WANTZ = .TRUE., then the QR Sweep unitary *> similarity transformation is accumulated into *> Z(ILOZ:IHIZ,ILOZ:IHIZ) from the right. @@ -151,71 +151,69 @@ *> *> \param[in] LDZ *> \verbatim -*> LDZ is integer scalar +*> LDZ is INTEGER *> LDA is the leading dimension of Z just as declared in *> the calling procedure. LDZ.GE.N. *> \endverbatim *> *> \param[out] V *> \verbatim -*> V is COMPLEX array of size (LDV,NSHFTS/2) +*> V is COMPLEX array, dimension (LDV,NSHFTS/2) *> \endverbatim *> *> \param[in] LDV *> \verbatim -*> LDV is integer scalar +*> LDV is INTEGER *> LDV is the leading dimension of V as declared in the *> calling procedure. LDV.GE.3. *> \endverbatim *> *> \param[out] U *> \verbatim -*> U is COMPLEX array of size -*> (LDU,3*NSHFTS-3) +*> U is COMPLEX array, dimension (LDU,3*NSHFTS-3) *> \endverbatim *> *> \param[in] LDU *> \verbatim -*> LDU is integer scalar +*> LDU is INTEGER *> LDU is the leading dimension of U just as declared in the *> in the calling subroutine. LDU.GE.3*NSHFTS-3. *> \endverbatim *> *> \param[in] NH *> \verbatim -*> NH is integer scalar +*> NH is INTEGER *> NH is the number of columns in array WH available for *> workspace. NH.GE.1. *> \endverbatim *> *> \param[out] WH *> \verbatim -*> WH is COMPLEX array of size (LDWH,NH) +*> WH is COMPLEX array, dimension (LDWH,NH) *> \endverbatim *> *> \param[in] LDWH *> \verbatim -*> LDWH is integer scalar +*> LDWH is INTEGER *> Leading dimension of WH just as declared in the *> calling procedure. LDWH.GE.3*NSHFTS-3. *> \endverbatim *> *> \param[in] NV *> \verbatim -*> NV is integer scalar +*> NV is INTEGER *> NV is the number of rows in WV agailable for workspace. *> NV.GE.1. *> \endverbatim *> *> \param[out] WV *> \verbatim -*> WV is COMPLEX array of size -*> (LDWV,3*NSHFTS-3) +*> WV is COMPLEX array, dimension (LDWV,3*NSHFTS-3) *> \endverbatim *> *> \param[in] LDWV *> \verbatim -*> LDWV is integer scalar +*> LDWV is INTEGER *> LDWV is the leading dimension of WV as declared in the *> in the calling subroutine. LDWV.GE.NV. *> \endverbatim @@ -251,7 +249,7 @@ $ H, LDH, ILOZ, IHIZ, Z, LDZ, V, LDV, U, LDU, NV, $ WV, LDWV, NH, WH, LDWH ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 diff -Nru lapack-3.7.0/SRC/clarrv.f lapack-3.7.1/SRC/clarrv.f --- lapack-3.7.0/SRC/clarrv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/clarrv.f 2017-06-17 22:46:53.000000000 +0000 @@ -199,7 +199,7 @@ *> *> \param[out] Z *> \verbatim -*> Z is array, dimension (LDZ, max(1,M) ) +*> Z is COMPLEX array, dimension (LDZ, max(1,M) ) *> If INFO = 0, the first M columns of Z contain the *> orthonormal eigenvectors of the matrix T *> corresponding to the input eigenvalues, with the i-th @@ -286,7 +286,7 @@ $ IBLOCK, INDEXW, GERS, Z, LDZ, ISUPPZ, $ WORK, IWORK, INFO ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 @@ -348,6 +348,13 @@ * .. INFO = 0 +* +* Quick return if possible +* + IF( N.LE.0 ) THEN + RETURN + END IF +* * The first N entries of WORK are reserved for the eigenvalues INDLD = N+1 INDLLD= 2*N+1 diff -Nru lapack-3.7.0/SRC/claswlq.f lapack-3.7.1/SRC/claswlq.f --- lapack-3.7.0/SRC/claswlq.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/claswlq.f 2017-06-17 22:46:53.000000000 +0000 @@ -55,7 +55,7 @@ *> \verbatim *> A is COMPLEX array, dimension (LDA,N) *> On entry, the M-by-N matrix A. -*> On exit, the elements on and bleow the diagonal +*> On exit, the elements on and below the diagonal *> of the array contain the N-by-N lower triangular matrix L; *> the elements above the diagonal represent Q by the rows *> of blocked V (see Further Details). @@ -150,10 +150,10 @@ SUBROUTINE CLASWLQ( M, N, MB, NB, A, LDA, T, LDT, WORK, LWORK, $ INFO) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd. -- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, M, N, MB, NB, LWORK, LDT diff -Nru lapack-3.7.0/SRC/claswp.f lapack-3.7.1/SRC/claswp.f --- lapack-3.7.0/SRC/claswp.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/claswp.f 2017-06-17 22:46:53.000000000 +0000 @@ -79,14 +79,15 @@ *> \verbatim *> IPIV is INTEGER array, dimension (K1+(K2-K1)*abs(INCX)) *> The vector of pivot indices. Only the elements in positions -*> K1 through K1+(K2-K1)*INCX of IPIV are accessed. -*> IPIV(K) = L implies rows K and L are to be interchanged. +*> K1 through K1+(K2-K1)*abs(INCX) of IPIV are accessed. +*> IPIV(K1+(K-K1)*abs(INCX)) = L implies rows K and L are to be +*> interchanged. *> \endverbatim *> *> \param[in] INCX *> \verbatim *> INCX is INTEGER -*> The increment between successive values of IPIV. If IPIV +*> The increment between successive values of IPIV. If INCX *> is negative, the pivots are applied in reverse order. *> \endverbatim * @@ -98,7 +99,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complexOTHERauxiliary * @@ -114,10 +115,10 @@ * ===================================================================== SUBROUTINE CLASWP( N, A, LDA, K1, K2, IPIV, INCX ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INCX, K1, K2, LDA, N @@ -135,7 +136,8 @@ * .. * .. Executable Statements .. * -* Interchange row I with row IPIV(I) for each of rows K1 through K2. +* Interchange row I with row IPIV(K1+(I-K1)*abs(INCX)) for each of rows +* K1 through K2. * IF( INCX.GT.0 ) THEN IX0 = K1 diff -Nru lapack-3.7.0/SRC/cla_syamv.f lapack-3.7.1/SRC/cla_syamv.f --- lapack-3.7.0/SRC/cla_syamv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/cla_syamv.f 2017-06-17 22:46:53.000000000 +0000 @@ -90,7 +90,7 @@ *> *> \param[in] A *> \verbatim -*> A is COMPLEX array of DIMENSION ( LDA, n ). +*> A is COMPLEX array, dimension ( LDA, n ). *> Before entry, the leading m by n part of the array A must *> contain the matrix of coefficients. *> Unchanged on exit. @@ -155,7 +155,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complexSYcomputational * @@ -179,10 +179,10 @@ SUBROUTINE CLA_SYAMV( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y, $ INCY ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. REAL ALPHA, BETA diff -Nru lapack-3.7.0/SRC/clasyf_aa.f lapack-3.7.1/SRC/clasyf_aa.f --- lapack-3.7.0/SRC/clasyf_aa.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/clasyf_aa.f 2017-06-17 22:46:53.000000000 +0000 @@ -19,11 +19,11 @@ * =========== * * SUBROUTINE CLASYF_AA( UPLO, J1, M, NB, A, LDA, IPIV, -* H, LDH, WORK, INFO ) +* H, LDH, WORK ) * * .. Scalar Arguments .. * CHARACTER UPLO -* INTEGER J1, M, NB, LDA, LDH, INFO +* INTEGER J1, M, NB, LDA, LDH * .. * .. Array Arguments .. * INTEGER IPIV( * ) @@ -99,12 +99,12 @@ *> \param[in] LDA *> \verbatim *> LDA is INTEGER -*> The leading dimension of the array A. LDA >= max(1,N). +*> The leading dimension of the array A. LDA >= max(1,M). *> \endverbatim *> *> \param[out] IPIV *> \verbatim -*> IPIV is INTEGER array, dimension (N) +*> IPIV is INTEGER array, dimension (M) *> Details of the row and column interchanges, *> the row and column k were interchanged with the row and *> column IPIV(k). @@ -127,16 +127,6 @@ *> WORK is REAL workspace, dimension (M). *> \endverbatim *> -*> \param[out] INFO -*> \verbatim -*> INFO is INTEGER -*> = 0: successful exit -*> < 0: if INFO = -i, the i-th argument had an illegal value -*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization -*> has been completed, but the block diagonal matrix D is -*> exactly singular, and division by zero will occur if it -*> is used to solve a system of equations. -*> \endverbatim * * Authors: * ======== @@ -146,24 +136,24 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complexSYcomputational * * ===================================================================== SUBROUTINE CLASYF_AA( UPLO, J1, M, NB, A, LDA, IPIV, - $ H, LDH, WORK, INFO ) + $ H, LDH, WORK ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * IMPLICIT NONE * * .. Scalar Arguments .. CHARACTER UPLO - INTEGER M, NB, J1, LDA, LDH, INFO + INTEGER M, NB, J1, LDA, LDH * .. * .. Array Arguments .. INTEGER IPIV( * ) @@ -192,7 +182,6 @@ * .. * .. Executable Statements .. * - INFO = 0 J = 1 * * K1 is the first column of the panel to be factorized @@ -217,8 +206,8 @@ * K = J1+J-1 * -* H(J:N, J) := A(J, J:N) - H(J:N, 1:(J-1)) * L(J1:(J-1), J), -* where H(J:N, J) has been initialized to be A(J, J:N) +* H(J:M, J) := A(J, J:M) - H(J:M, 1:(J-1)) * L(J1:(J-1), J), +* where H(J:M, J) has been initialized to be A(J, J:M) * IF( K.GT.2 ) THEN * @@ -234,14 +223,14 @@ $ ONE, H( J, J ), 1 ) END IF * -* Copy H(i:n, i) into WORK +* Copy H(i:M, i) into WORK * CALL CCOPY( M-J+1, H( J, J ), 1, WORK( 1 ), 1 ) * IF( J.GT.K1 ) THEN * -* Compute WORK := WORK - L(J-1, J:N) * T(J-1,J), -* where A(J-1, J) stores T(J-1, J) and A(J-2, J:N) stores U(J-1, J:N) +* Compute WORK := WORK - L(J-1, J:M) * T(J-1,J), +* where A(J-1, J) stores T(J-1, J) and A(J-2, J:M) stores U(J-1, J:M) * ALPHA = -A( K-1, J ) CALL CAXPY( M-J+1, ALPHA, A( K-2, J ), LDA, WORK( 1 ), 1 ) @@ -253,8 +242,8 @@ * IF( J.LT.M ) THEN * -* Compute WORK(2:N) = T(J, J) L(J, (J+1):N) -* where A(J, J) stores T(J, J) and A(J-1, (J+1):N) stores U(J, (J+1):N) +* Compute WORK(2:M) = T(J, J) L(J, (J+1):M) +* where A(J, J) stores T(J, J) and A(J-1, (J+1):M) stores U(J, (J+1):M) * IF( K.GT.1 ) THEN ALPHA = -A( K, J ) @@ -262,7 +251,7 @@ $ WORK( 2 ), 1 ) ENDIF * -* Find max(|WORK(2:n)|) +* Find max(|WORK(2:M)|) * I2 = ICAMAX( M-J, WORK( 2 ), 1 ) + 1 PIV = WORK( I2 ) @@ -277,14 +266,14 @@ WORK( I2 ) = WORK( I1 ) WORK( I1 ) = PIV * -* Swap A(I1, I1+1:N) with A(I1+1:N, I2) +* Swap A(I1, I1+1:M) with A(I1+1:M, I2) * I1 = I1+J-1 I2 = I2+J-1 CALL CSWAP( I2-I1-1, A( J1+I1-1, I1+1 ), LDA, $ A( J1+I1, I2 ), 1 ) * -* Swap A(I1, I2+1:N) with A(I2, I2+1:N) +* Swap A(I1, I2+1:M) with A(I2, I2+1:M) * CALL CSWAP( M-I2, A( J1+I1-1, I2+1 ), LDA, $ A( J1+I2-1, I2+1 ), LDA ) @@ -315,23 +304,17 @@ * Set A(J, J+1) = T(J, J+1) * A( K, J+1 ) = WORK( 2 ) - IF( (A( K, J ).EQ.ZERO ) .AND. - $ ( (J.EQ.M) .OR. (A( K, J+1 ).EQ.ZERO))) THEN - IF(INFO .EQ. 0) THEN - INFO = J - ENDIF - END IF * IF( J.LT.NB ) THEN * -* Copy A(J+1:N, J+1) into H(J:N, J), +* Copy A(J+1:M, J+1) into H(J:M, J), * CALL CCOPY( M-J, A( K+1, J+1 ), LDA, $ H( J+1, J+1 ), 1 ) END IF * -* Compute L(J+2, J+1) = WORK( 3:N ) / T(J, J+1), -* where A(J, J+1) = T(J, J+1) and A(J+2:N, J) = L(J+2:N, J+1) +* Compute L(J+2, J+1) = WORK( 3:M ) / T(J, J+1), +* where A(J, J+1) = T(J, J+1) and A(J+2:M, J) = L(J+2:M, J+1) * IF( A( K, J+1 ).NE.ZERO ) THEN ALPHA = ONE / A( K, J+1 ) @@ -341,10 +324,6 @@ CALL CLASET( 'Full', 1, M-J-1, ZERO, ZERO, $ A( K, J+2 ), LDA) END IF - ELSE - IF( (A( K, J ).EQ.ZERO) .AND. (INFO.EQ.0) ) THEN - INFO = J - END IF END IF J = J + 1 GO TO 10 @@ -367,8 +346,8 @@ * K = J1+J-1 * -* H(J:N, J) := A(J:N, J) - H(J:N, 1:(J-1)) * L(J, J1:(J-1))^T, -* where H(J:N, J) has been initialized to be A(J:N, J) +* H(J:M, J) := A(J:M, J) - H(J:M, 1:(J-1)) * L(J, J1:(J-1))^T, +* where H(J:M, J) has been initialized to be A(J:M, J) * IF( K.GT.2 ) THEN * @@ -384,13 +363,13 @@ $ ONE, H( J, J ), 1 ) END IF * -* Copy H(J:N, J) into WORK +* Copy H(J:M, J) into WORK * CALL CCOPY( M-J+1, H( J, J ), 1, WORK( 1 ), 1 ) * IF( J.GT.K1 ) THEN * -* Compute WORK := WORK - L(J:N, J-1) * T(J-1,J), +* Compute WORK := WORK - L(J:M, J-1) * T(J-1,J), * where A(J-1, J) = T(J-1, J) and A(J, J-2) = L(J, J-1) * ALPHA = -A( J, K-1 ) @@ -403,8 +382,8 @@ * IF( J.LT.M ) THEN * -* Compute WORK(2:N) = T(J, J) L((J+1):N, J) -* where A(J, J) = T(J, J) and A((J+1):N, J-1) = L((J+1):N, J) +* Compute WORK(2:M) = T(J, J) L((J+1):M, J) +* where A(J, J) = T(J, J) and A((J+1):M, J-1) = L((J+1):M, J) * IF( K.GT.1 ) THEN ALPHA = -A( J, K ) @@ -412,7 +391,7 @@ $ WORK( 2 ), 1 ) ENDIF * -* Find max(|WORK(2:n)|) +* Find max(|WORK(2:M)|) * I2 = ICAMAX( M-J, WORK( 2 ), 1 ) + 1 PIV = WORK( I2 ) @@ -427,14 +406,14 @@ WORK( I2 ) = WORK( I1 ) WORK( I1 ) = PIV * -* Swap A(I1+1:N, I1) with A(I2, I1+1:N) +* Swap A(I1+1:M, I1) with A(I2, I1+1:M) * I1 = I1+J-1 I2 = I2+J-1 CALL CSWAP( I2-I1-1, A( I1+1, J1+I1-1 ), 1, $ A( I2, J1+I1 ), LDA ) * -* Swap A(I2+1:N, I1) with A(I2+1:N, I2) +* Swap A(I2+1:M, I1) with A(I2+1:M, I2) * CALL CSWAP( M-I2, A( I2+1, J1+I1-1 ), 1, $ A( I2+1, J1+I2-1 ), 1 ) @@ -465,22 +444,17 @@ * Set A(J+1, J) = T(J+1, J) * A( J+1, K ) = WORK( 2 ) - IF( (A( J, K ).EQ.ZERO) .AND. - $ ( (J.EQ.M) .OR. (A( J+1, K ).EQ.ZERO)) ) THEN - IF (INFO .EQ. 0) - $ INFO = J - END IF * IF( J.LT.NB ) THEN * -* Copy A(J+1:N, J+1) into H(J+1:N, J), +* Copy A(J+1:M, J+1) into H(J+1:M, J), * CALL CCOPY( M-J, A( J+1, K+1 ), 1, $ H( J+1, J+1 ), 1 ) END IF * -* Compute L(J+2, J+1) = WORK( 3:N ) / T(J, J+1), -* where A(J, J+1) = T(J, J+1) and A(J+2:N, J) = L(J+2:N, J+1) +* Compute L(J+2, J+1) = WORK( 3:M ) / T(J, J+1), +* where A(J, J+1) = T(J, J+1) and A(J+2:M, J) = L(J+2:M, J+1) * IF( A( J+1, K ).NE.ZERO ) THEN ALPHA = ONE / A( J+1, K ) @@ -490,10 +464,6 @@ CALL CLASET( 'Full', M-J-1, 1, ZERO, ZERO, $ A( J+2, K ), LDA ) END IF - ELSE - IF( (A( J, K ).EQ.ZERO) .AND. (INFO.EQ.0) ) THEN - INFO = J - END IF END IF J = J + 1 GO TO 30 diff -Nru lapack-3.7.0/SRC/cla_syrfsx_extended.f lapack-3.7.1/SRC/cla_syrfsx_extended.f --- lapack-3.7.0/SRC/cla_syrfsx_extended.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/cla_syrfsx_extended.f 2017-06-17 22:46:53.000000000 +0000 @@ -161,8 +161,7 @@ *> *> \param[in,out] Y *> \verbatim -*> Y is COMPLEX array, dimension -*> (LDY,NRHS) +*> Y is COMPLEX array, dimension (LDY,NRHS) *> On entry, the solution matrix X, as computed by CSYTRS. *> On exit, the improved solution matrix Y. *> \endverbatim @@ -194,8 +193,7 @@ *> *> \param[in,out] ERR_BNDS_NORM *> \verbatim -*> ERR_BNDS_NORM is REAL array, dimension -*> (NRHS, N_ERR_BNDS) +*> ERR_BNDS_NORM is REAL array, dimension (NRHS, N_ERR_BNDS) *> For each right-hand side, this array contains information about *> various error bounds and condition numbers corresponding to the *> normwise relative error, which is defined as follows: @@ -241,8 +239,7 @@ *> *> \param[in,out] ERR_BNDS_COMP *> \verbatim -*> ERR_BNDS_COMP is REAL array, dimension -*> (NRHS, N_ERR_BNDS) +*> ERR_BNDS_COMP is REAL array, dimension (NRHS, N_ERR_BNDS) *> For each right-hand side, this array contains information about *> various error bounds and condition numbers corresponding to the *> componentwise relative error, which is defined as follows: @@ -385,7 +382,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complexSYcomputational * @@ -398,10 +395,10 @@ $ RTHRESH, DZ_UB, IGNORE_CWISE, $ INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE, diff -Nru lapack-3.7.0/SRC/CMakeLists.txt lapack-3.7.1/SRC/CMakeLists.txt --- lapack-3.7.0/SRC/CMakeLists.txt 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/CMakeLists.txt 2017-06-17 22:46:53.000000000 +0000 @@ -1,10 +1,10 @@ ####################################################################### # This is the makefile to create a library for LAPACK. # The files are organized as follows: + # ALLAUX -- Auxiliary routines called from all precisions -# -# SCLAUX -- Auxiliary routines called from both REAL and COMPLEX. -# DZLAUX -- Auxiliary routines called from both DOUBLE and COMPLEX*16. +# SCLAUX -- Auxiliary routines called from single precision +# DZLAUX -- Auxiliary routines called from double precision # # DSLASRC -- Double-single mixed precision real routines called from # single, single-extra and double precision real LAPACK @@ -28,25 +28,6 @@ # # DEPRECATED -- Deprecated routines in all precisions # -# The library can be set up to include routines for any combination -# of the four precisions. To create or add to the library, enter make -# followed by one or more of the precisions desired. Some examples: -# make single -# make single complex -# make single double complex complex16 -# Alternatively, the command -# make -# without any arguments creates a library of all four precisions. -# The library is called -# lapack.a -# and is created at the next higher directory level. -# -# To remove the object files after the library is created, enter -# make clean -# On some systems, you can force the source files to be recompiled by -# entering (for example) -# make single FRC=FRC -# # ***Note*** # The functions lsame, second, dsecnd, slamch, and dlamch may have # to be installed before compiling the library. Refer to the @@ -103,8 +84,8 @@ sgels.f sgelsd.f sgelss.f sgelsy.f sgeql2.f sgeqlf.f sgeqp3.f sgeqr2.f sgeqr2p.f sgeqrf.f sgeqrfp.f sgerfs.f sgerq2.f sgerqf.f sgesc2.f sgesdd.f sgesv.f sgesvd.f sgesvdx.f sgesvx.f sgetc2.f sgetf2.f - sgetrf.f sgetrf2.f sgetri.f - sgetrs.f sggbak.f sggbal.f + sgetrf2.f sgetri.f + sggbak.f sggbal.f sgges.f sgges3.f sggesx.f sggev.f sggev3.f sggevx.f sggglm.f sgghrd.f sgghd3.f sgglse.f sggqrf.f sggrqf.f sggsvd3.f sggsvp3.f sgtcon.f sgtrfs.f sgtsv.f @@ -130,7 +111,7 @@ sormr3.f sormrq.f sormrz.f sormtr.f spbcon.f spbequ.f spbrfs.f spbstf.f spbsv.f spbsvx.f spbtf2.f spbtrf.f spbtrs.f spocon.f spoequ.f sporfs.f sposv.f - sposvx.f spotf2.f spotrf.f spotrf2.f spotri.f spotrs.f spstrf.f spstf2.f + sposvx.f spotf2.f spotrf2.f spotri.f spstrf.f spstf2.f sppcon.f sppequ.f spprfs.f sppsv.f sppsvx.f spptrf.f spptri.f spptrs.f sptcon.f spteqr.f sptrfs.f sptsv.f sptsvx.f spttrs.f sptts2.f srscl.f @@ -143,7 +124,6 @@ ssytd2.f ssytf2.f ssytrd.f ssytrf.f ssytri.f ssytri2.f ssytri2x.f ssyswapr.f ssytrs.f ssytrs2.f ssyconv.f ssyconvf.f ssyconvf_rook.f - ssysv_aa.f ssytrf_aa.f ssytrs_aa.f ssytf2_rook.f ssytrf_rook.f ssytrs_rook.f ssytri_rook.f ssycon_rook.f ssysv_rook.f ssytf2_rk.f ssytrf_rk.f ssytrs_3.f @@ -190,8 +170,8 @@ cgeqr2.f cgeqr2p.f cgeqrf.f cgeqrfp.f cgerfs.f cgerq2.f cgerqf.f cgesc2.f cgesdd.f cgesv.f cgesvd.f cgesvdx.f cgesvj.f cgejsv.f cgsvj0.f cgsvj1.f - cgesvx.f cgetc2.f cgetf2.f cgetrf.f cgetrf2.f - cgetri.f cgetrs.f + cgesvx.f cgetc2.f cgetf2.f cgetrf2.f + cgetri.f cggbak.f cggbal.f cgges.f cgges3.f cggesx.f cggev.f cggev3.f cggevx.f cggglm.f cgghrd.f cgghd3.f cgglse.f cggqrf.f cggrqf.f @@ -230,7 +210,7 @@ clatbs.f clatdf.f clatps.f clatrd.f clatrs.f clatrz.f clauu2.f clauum.f cpbcon.f cpbequ.f cpbrfs.f cpbstf.f cpbsv.f cpbsvx.f cpbtf2.f cpbtrf.f cpbtrs.f cpocon.f cpoequ.f cporfs.f - cposv.f cposvx.f cpotf2.f cpotrf.f cpotrf2.f cpotri.f cpotrs.f cpstrf.f cpstf2.f + cposv.f cposvx.f cpotf2.f cpotrf2.f cpotri.f cpstrf.f cpstf2.f cppcon.f cppequ.f cpprfs.f cppsv.f cppsvx.f cpptrf.f cpptri.f cpptrs.f cptcon.f cpteqr.f cptrfs.f cptsv.f cptsvx.f cpttrf.f cpttrs.f cptts2.f crot.f cspcon.f cspmv.f cspr.f csprfs.f cspsv.f @@ -454,7 +434,6 @@ zgelqt.f zgelqt3.f zgemlqt.f zgetsls.f zgeqr.f zlatsqr.f zlamtsqr.f zgemqr.f zgelq.f zlaswlq.f zlamswlq.f zgemlq.f - ztplqt.f ztplqt2.f ztpmlqt.f zhetrd_2stage.f zhetrd_he2hb.f zhetrd_hb2st.F zhb2st_kernels.f zheevd_2stage.f zheev_2stage.f zheevx_2stage.f zheevr_2stage.f zhbev_2stage.f zhbevx_2stage.f zhbevd_2stage.f zhegv_2stage.f) @@ -469,11 +448,6 @@ zla_heamv.f zla_hercond_c.f zla_hercond_x.f zla_herpvgrw.f zla_lin_berr.f zlarscl2.f zlascl2.f zla_wwaddw.f) - -if(USE_XBLAS) - set(ALLXOBJ ${SXLASRC} ${DXLASRC} ${CXLASRC} ${ZXLASRC}) -endif() - if(BUILD_DEPRECATED) list(APPEND SLASRC DEPRECATED/sgegs.f DEPRECATED/sgegv.f DEPRECATED/sgeqpf.f DEPRECATED/sgelsx.f DEPRECATED/sggsvd.f @@ -487,40 +461,46 @@ list(APPEND ZLASRC DEPRECATED/zgegs.f DEPRECATED/zgegv.f DEPRECATED/zgeqpf.f DEPRECATED/zgelsx.f DEPRECATED/zggsvd.f DEPRECATED/zggsvp.f DEPRECATED/zlahrd.f DEPRECATED/zlatzm.f DEPRECATED/ztzrqf.f) - message(STATUS "Building deprecated routines") endif() +if(USE_XBLAS) + list(APPEND SLASRC ${SXLASRC}) + list(APPEND DLASRC ${DXLASRC}) + list(APPEND CLASRC ${CXLASRC}) + list(APPEND ZLASRC ${ZXLASRC}) +endif() + + +set(SOURCES) if(BUILD_SINGLE) - set(ALLOBJ ${SLASRC} ${ALLAUX} ${SCLAUX}) - message(STATUS "Building Single Precision") + list(APPEND SOURCES ${SLASRC} ${DSLASRC} ${SCLAUX} ${ALLAUX}) endif() if(BUILD_DOUBLE) - set(ALLOBJ ${ALLOBJ} ${DLASRC} ${ALLAUX} ${DZLAUX} ${DSLASRC}) - message(STATUS "Building Double Precision") + list(APPEND SOURCES ${DLASRC} ${DSLASRC} ${DZLAUX} ${ALLAUX}) endif() if(BUILD_COMPLEX) - set(ALLOBJ ${ALLOBJ} ${CLASRC} ${ALLAUX} ${SCLAUX}) - message(STATUS "Building Complex Precision") + list(APPEND SOURCES ${CLASRC} ${ZCLASRC} ${SCLAUX} ${ALLAUX}) endif() if(BUILD_COMPLEX16) - 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.") + list(APPEND SOURCES ${ZLASRC} ${ZCLASRC} ${DZLAUX} ${ALLAUX}) endif() +list(REMOVE_DUPLICATES SOURCES) -list(REMOVE_DUPLICATES ALLOBJ) - -add_library(lapack ${ALLOBJ} ${ALLXOBJ}) -target_link_libraries(lapack ${BLAS_LIBRARIES} ${XBLAS_LIBRARY}) - +add_library(lapack ${SOURCES}) set_target_properties( lapack PROPERTIES VERSION ${LAPACK_VERSION} SOVERSION ${LAPACK_MAJOR_VERSION} ) +if(USE_XBLAS) + target_link_libraries(lapack PRIVATE ${XBLAS_LIBRARY}) +endif() +target_link_libraries(lapack PRIVATE ${BLAS_LIBRARIES}) + +if (${CMAKE_BUILD_TYPE_UPPER} STREQUAL "COVERAGE") + target_link_libraries(lapack PRIVATE gcov) + add_coverage(lapack) +endif() + lapack_install_library(lapack) diff -Nru lapack-3.7.0/SRC/cstegr.f lapack-3.7.1/SRC/cstegr.f --- lapack-3.7.0/SRC/cstegr.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/cstegr.f 2017-06-17 22:46:53.000000000 +0000 @@ -184,7 +184,7 @@ *> *> \param[out] ISUPPZ *> \verbatim -*> ISUPPZ is INTEGER ARRAY, dimension ( 2*max(1,M) ) +*> ISUPPZ is INTEGER array, dimension ( 2*max(1,M) ) *> The support of the eigenvectors in Z, i.e., the indices *> indicating the nonzero elements in Z. The i-th computed eigenvector *> is nonzero only in elements ISUPPZ( 2*i-1 ) through @@ -265,7 +265,7 @@ $ ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK, $ LIWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 diff -Nru lapack-3.7.0/SRC/cstemr.f lapack-3.7.1/SRC/cstemr.f --- lapack-3.7.0/SRC/cstemr.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/cstemr.f 2017-06-17 22:46:53.000000000 +0000 @@ -239,7 +239,7 @@ *> *> \param[out] ISUPPZ *> \verbatim -*> ISUPPZ is INTEGER ARRAY, dimension ( 2*max(1,M) ) +*> ISUPPZ is INTEGER array, dimension ( 2*max(1,M) ) *> The support of the eigenvectors in Z, i.e., the indices *> indicating the nonzero elements in Z. The i-th computed eigenvector *> is nonzero only in elements ISUPPZ( 2*i-1 ) through @@ -338,7 +338,7 @@ $ M, W, Z, LDZ, NZC, ISUPPZ, TRYRAC, WORK, LWORK, $ IWORK, LIWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 diff -Nru lapack-3.7.0/SRC/csycon_3.f lapack-3.7.1/SRC/csycon_3.f --- lapack-3.7.0/SRC/csycon_3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/csycon_3.f 2017-06-17 22:46:53.000000000 +0000 @@ -95,7 +95,7 @@ *> On entry, contains the superdiagonal (or subdiagonal) *> elements of the symmetric block diagonal matrix D *> with 1-by-1 or 2-by-2 diagonal blocks, where -*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; +*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. *> *> NOTE: For 1-by-1 diagonal block D(k), where @@ -149,7 +149,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complexSYcomputational * @@ -157,7 +157,7 @@ * ================== *> \verbatim *> -*> December 2016, Igor Kozachenko, +*> June 2017, Igor Kozachenko, *> Computer Science Division, *> University of California, Berkeley *> @@ -171,10 +171,10 @@ SUBROUTINE CSYCON_3( UPLO, N, A, LDA, E, IPIV, ANORM, RCOND, $ WORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/SRC/csyconvf.f lapack-3.7.1/SRC/csyconvf.f --- lapack-3.7.0/SRC/csyconvf.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/csyconvf.f 2017-06-17 22:46:53.000000000 +0000 @@ -45,7 +45,7 @@ *> If parameter WAY = 'R': *> CSYCONVF performs the conversion in reverse direction, i.e. *> converts the factorization output format used in CSYTRF_RK -*> (or CSYTRF_BK) provided on entry in parametes A and E into +*> (or CSYTRF_BK) provided on entry in parameters A and E into *> the factorization output format used in CSYTRF that is stored *> on exit in parameter A. It also coverts in place details of *> the intechanges stored in IPIV from the format used in CSYTRF_RK @@ -192,7 +192,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complexSYcomputational * @@ -201,7 +201,7 @@ *> *> \verbatim *> -*> December 2016, Igor Kozachenko, +*> June 2017, Igor Kozachenko, *> Computer Science Division, *> University of California, Berkeley *> @@ -209,10 +209,10 @@ * ===================================================================== SUBROUTINE CSYCONVF( UPLO, WAY, N, A, LDA, E, IPIV, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO, WAY diff -Nru lapack-3.7.0/SRC/csyconvf_rook.f lapack-3.7.1/SRC/csyconvf_rook.f --- lapack-3.7.0/SRC/csyconvf_rook.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/csyconvf_rook.f 2017-06-17 22:46:53.000000000 +0000 @@ -44,7 +44,7 @@ *> If parameter WAY = 'R': *> CSYCONVF_ROOK performs the conversion in reverse direction, i.e. *> converts the factorization output format used in CSYTRF_RK -*> (or CSYTRF_BK) provided on entry in parametes A and E into +*> (or CSYTRF_BK) provided on entry in parameters A and E into *> the factorization output format used in CSYTRF_ROOK that is stored *> on exit in parameter A. IPIV format for CSYTRF_ROOK and *> CSYTRF_RK (or CSYTRF_BK) is the same and is not converted. @@ -183,7 +183,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complexSYcomputational * @@ -192,7 +192,7 @@ *> *> \verbatim *> -*> December 2016, Igor Kozachenko, +*> June 2017, Igor Kozachenko, *> Computer Science Division, *> University of California, Berkeley *> @@ -200,10 +200,10 @@ * ===================================================================== SUBROUTINE CSYCONVF_ROOK( UPLO, WAY, N, A, LDA, E, IPIV, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO, WAY diff -Nru lapack-3.7.0/SRC/csytrf_aa.f lapack-3.7.1/SRC/csytrf_aa.f --- lapack-3.7.0/SRC/csytrf_aa.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/csytrf_aa.f 2017-06-17 22:46:53.000000000 +0000 @@ -114,11 +114,7 @@ *> \verbatim *> INFO is INTEGER *> = 0: successful exit -*> < 0: if INFO = -i, the i-th argument had an illegal value -*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization -*> has been completed, but the block diagonal matrix D is -*> exactly singular, and division by zero will occur if it -*> is used to solve a system of equations. +*> < 0: if INFO = -i, the i-th argument had an illegal value. *> \endverbatim * * Authors: @@ -159,7 +155,7 @@ * * .. Local Scalars .. LOGICAL LQUERY, UPPER - INTEGER J, LWKOPT, IINFO + INTEGER J, LWKOPT INTEGER NB, MJ, NJ, K1, K2, J1, J2, J3, JB COMPLEX ALPHA * .. @@ -214,13 +210,10 @@ ENDIF IPIV( 1 ) = 1 IF ( N.EQ.1 ) THEN - IF ( A( 1, 1 ).EQ.ZERO ) THEN - INFO = 1 - END IF RETURN END IF * -* Adjubst block size based on the workspace size +* Adjust block size based on the workspace size * IF( LWORK.LT.((1+NB)*N) ) THEN NB = ( LWORK-N ) / N @@ -260,11 +253,7 @@ * CALL CLASYF_AA( UPLO, 2-K1, N-J, JB, $ A( MAX(1, J), J+1 ), LDA, - $ IPIV( J+1 ), WORK, N, WORK( N*NB+1 ), - $ IINFO ) - IF( (IINFO.GT.0) .AND. (INFO.EQ.0) ) THEN - INFO = IINFO+J - ENDIF + $ IPIV( J+1 ), WORK, N, WORK( N*NB+1 ) ) * * Ajust IPIV and apply it back (J-th step picks (J+1)-th pivot) * @@ -383,10 +372,7 @@ * CALL CLASYF_AA( UPLO, 2-K1, N-J, JB, $ A( J+1, MAX(1, J) ), LDA, - $ IPIV( J+1 ), WORK, N, WORK( N*NB+1 ), IINFO) - IF( (IINFO.GT.0) .AND. (INFO.EQ.0) ) THEN - INFO = IINFO+J - ENDIF + $ IPIV( J+1 ), WORK, N, WORK( N*NB+1 ) ) * * Ajust IPIV and apply it back (J-th step picks (J+1)-th pivot) * diff -Nru lapack-3.7.0/SRC/csytri2x.f lapack-3.7.1/SRC/csytri2x.f --- lapack-3.7.0/SRC/csytri2x.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/csytri2x.f 2017-06-17 22:46:53.000000000 +0000 @@ -87,7 +87,7 @@ *> *> \param[out] WORK *> \verbatim -*> WORK is COMPLEX array, dimension (N+NNB+1,NNB+3) +*> WORK is COMPLEX array, dimension (N+NB+1,NB+3) *> \endverbatim *> *> \param[in] NB @@ -113,17 +113,17 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complexSYcomputational * * ===================================================================== SUBROUTINE CSYTRI2X( UPLO, N, A, LDA, IPIV, WORK, NB, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/SRC/csytri_3.f lapack-3.7.1/SRC/csytri_3.f --- lapack-3.7.0/SRC/csytri_3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/csytri_3.f 2017-06-17 22:46:53.000000000 +0000 @@ -102,7 +102,7 @@ *> On entry, contains the superdiagonal (or subdiagonal) *> elements of the symmetric block diagonal matrix D *> with 1-by-1 or 2-by-2 diagonal blocks, where -*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; +*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. *> *> NOTE: For 1-by-1 diagonal block D(k), where @@ -152,7 +152,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complexSYcomputational * @@ -160,7 +160,7 @@ * ================== *> \verbatim *> -*> December 2016, Igor Kozachenko, +*> June 2017, Igor Kozachenko, *> Computer Science Division, *> University of California, Berkeley *> @@ -170,10 +170,10 @@ SUBROUTINE CSYTRI_3( UPLO, N, A, LDA, E, IPIV, WORK, LWORK, $ INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/SRC/csytri_3x.f lapack-3.7.1/SRC/csytri_3x.f --- lapack-3.7.0/SRC/csytri_3x.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/csytri_3x.f 2017-06-17 22:46:53.000000000 +0000 @@ -99,7 +99,7 @@ *> On entry, contains the superdiagonal (or subdiagonal) *> elements of the symmetric block diagonal matrix D *> with 1-by-1 or 2-by-2 diagonal blocks, where -*> If UPLO = 'U': E(i) = D(i-1,i), i=2:N, E(1) not refernced; +*> If UPLO = 'U': E(i) = D(i-1,i), i=2:N, E(1) not referenced; *> If UPLO = 'L': E(i) = D(i+1,i), i=1:N-1, E(N) not referenced. *> *> NOTE: For 1-by-1 diagonal block D(k), where @@ -142,7 +142,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complexSYcomputational * @@ -150,7 +150,7 @@ * ================== *> \verbatim *> -*> December 2016, Igor Kozachenko, +*> June 2017, Igor Kozachenko, *> Computer Science Division, *> University of California, Berkeley *> @@ -159,10 +159,10 @@ * ===================================================================== SUBROUTINE CSYTRI_3X( UPLO, N, A, LDA, E, IPIV, WORK, NB, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/SRC/csytrs_3.f lapack-3.7.1/SRC/csytrs_3.f --- lapack-3.7.0/SRC/csytrs_3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/csytrs_3.f 2017-06-17 22:46:53.000000000 +0000 @@ -99,7 +99,7 @@ *> On entry, contains the superdiagonal (or subdiagonal) *> elements of the symmetric block diagonal matrix D *> with 1-by-1 or 2-by-2 diagonal blocks, where -*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; +*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. *> *> NOTE: For 1-by-1 diagonal block D(k), where @@ -142,7 +142,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complexSYcomputational * @@ -151,7 +151,7 @@ *> *> \verbatim *> -*> December 2016, Igor Kozachenko, +*> June 2017, Igor Kozachenko, *> Computer Science Division, *> University of California, Berkeley *> @@ -165,10 +165,10 @@ SUBROUTINE CSYTRS_3( UPLO, N, NRHS, A, LDA, E, IPIV, B, LDB, $ INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/SRC/csytrs_aa.f lapack-3.7.1/SRC/csytrs_aa.f --- lapack-3.7.0/SRC/csytrs_aa.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/csytrs_aa.f 2017-06-17 22:46:53.000000000 +0000 @@ -66,7 +66,7 @@ *> of the matrix B. NRHS >= 0. *> \endverbatim *> -*> \param[in,out] A +*> \param[in] A *> \verbatim *> A is REAL array, dimension (LDA,N) *> Details of factors computed by CSYTRF_AA. @@ -121,7 +121,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complexSYcomputational * @@ -129,10 +129,10 @@ SUBROUTINE CSYTRS_AA( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, $ WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * IMPLICIT NONE * diff -Nru lapack-3.7.0/SRC/ctgex2.f lapack-3.7.1/SRC/ctgex2.f --- lapack-3.7.0/SRC/ctgex2.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/ctgex2.f 2017-06-17 22:46:53.000000000 +0000 @@ -76,7 +76,7 @@ *> *> \param[in,out] A *> \verbatim -*> A is COMPLEX arrays, dimensions (LDA,N) +*> A is COMPLEX array, dimension (LDA,N) *> On entry, the matrix A in the pair (A, B). *> On exit, the updated matrix A. *> \endverbatim @@ -89,7 +89,7 @@ *> *> \param[in,out] B *> \verbatim -*> B is COMPLEX arrays, dimensions (LDB,N) +*> B is COMPLEX array, dimension (LDB,N) *> On entry, the matrix B in the pair (A, B). *> On exit, the updated matrix B. *> \endverbatim @@ -102,7 +102,7 @@ *> *> \param[in,out] Q *> \verbatim -*> Q is COMPLEX array, dimension (LDZ,N) +*> Q is COMPLEX array, dimension (LDQ,N) *> If WANTQ = .TRUE, on entry, the unitary matrix Q. On exit, *> the updated matrix Q. *> Not referenced if WANTQ = .FALSE.. @@ -153,7 +153,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complexGEauxiliary * @@ -190,10 +190,10 @@ SUBROUTINE CTGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z, $ LDZ, J1, INFO ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. LOGICAL WANTQ, WANTZ diff -Nru lapack-3.7.0/SRC/ctgexc.f lapack-3.7.1/SRC/ctgexc.f --- lapack-3.7.0/SRC/ctgexc.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/ctgexc.f 2017-06-17 22:46:53.000000000 +0000 @@ -102,7 +102,7 @@ *> *> \param[in,out] Q *> \verbatim -*> Q is COMPLEX array, dimension (LDZ,N) +*> Q is COMPLEX array, dimension (LDQ,N) *> On entry, if WANTQ = .TRUE., the unitary matrix Q. *> On exit, the updated matrix Q. *> If WANTQ = .FALSE., Q is not referenced. @@ -163,7 +163,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complexGEcomputational * @@ -200,10 +200,10 @@ SUBROUTINE CTGEXC( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z, $ LDZ, IFST, ILST, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. LOGICAL WANTQ, WANTZ diff -Nru lapack-3.7.0/SRC/ctgsen.f lapack-3.7.1/SRC/ctgsen.f --- lapack-3.7.0/SRC/ctgsen.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/ctgsen.f 2017-06-17 22:46:53.000000000 +0000 @@ -72,7 +72,7 @@ * *> \param[in] IJOB *> \verbatim -*> IJOB is integer +*> IJOB is INTEGER *> Specifies whether condition numbers are required for the *> cluster of eigenvalues (PL and PR) or the deflating subspaces *> (Difu and Difl): @@ -433,7 +433,7 @@ $ ALPHA, BETA, Q, LDQ, Z, LDZ, M, PL, PR, DIF, $ WORK, LWORK, IWORK, LIWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 diff -Nru lapack-3.7.0/SRC/ctplqt2.f lapack-3.7.1/SRC/ctplqt2.f --- lapack-3.7.0/SRC/ctplqt2.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/ctplqt2.f 2017-06-17 22:46:53.000000000 +0000 @@ -48,7 +48,7 @@ *> *> \param[in,out] A *> \verbatim -*> A is COMPLEX array, dimension (LDA,N) +*> A is COMPLEX array, dimension (LDA,M) *> On entry, the lower triangular M-by-M matrix A. *> On exit, the elements on and below the diagonal of the array *> contain the lower triangular matrix L. @@ -57,7 +57,7 @@ *> \param[in] LDA *> \verbatim *> LDA is INTEGER -*> The leading dimension of the array A. LDA >= max(1,N). +*> The leading dimension of the array A. LDA >= max(1,M). *> \endverbatim *> *> \param[in,out] B @@ -102,7 +102,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleOTHERcomputational * @@ -116,7 +116,7 @@ *> C = [ A ][ B ] *> *> -*> where A is an lower triangular N-by-N matrix, and B is M-by-N pentagonal +*> where A is an lower triangular M-by-M matrix, and B is M-by-N pentagonal *> matrix consisting of a M-by-(N-L) rectangular matrix B1 left of a M-by-L *> upper trapezoidal matrix B2: *> @@ -132,13 +132,13 @@ *> above the diagonal (of A) in the M-by-(M+N) input matrix C *> *> C = [ A ][ B ] -*> [ A ] <- lower triangular N-by-N +*> [ A ] <- lower triangular M-by-M *> [ B ] <- M-by-N pentagonal *> *> so that W can be represented as *> *> W = [ I ][ V ] -*> [ I ] <- identity, N-by-N +*> [ I ] <- identity, M-by-M *> [ V ] <- M-by-N, same form as B. *> *> Thus, all of information needed for W is contained on exit in B, which @@ -160,10 +160,10 @@ * ===================================================================== SUBROUTINE CTPLQT2( M, N, L, A, LDA, B, LDB, T, LDT, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDB, LDT, N, M, L diff -Nru lapack-3.7.0/SRC/ctplqt.f lapack-3.7.1/SRC/ctplqt.f --- lapack-3.7.0/SRC/ctplqt.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/ctplqt.f 2017-06-17 22:46:53.000000000 +0000 @@ -56,8 +56,8 @@ *> *> \param[in,out] A *> \verbatim -*> A is COMPLEX array, dimension (LDA,N) -*> On entry, the lower triangular N-by-N matrix A. +*> A is COMPLEX array, dimension (LDA,M) +*> On entry, the lower triangular M-by-M matrix A. *> On exit, the elements on and below the diagonal of the array *> contain the lower triangular matrix L. *> \endverbatim @@ -65,7 +65,7 @@ *> \param[in] LDA *> \verbatim *> LDA is INTEGER -*> The leading dimension of the array A. LDA >= max(1,N). +*> The leading dimension of the array A. LDA >= max(1,M). *> \endverbatim *> *> \param[in,out] B @@ -115,7 +115,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleOTHERcomputational * @@ -129,26 +129,26 @@ *> C = [ A ] [ B ] *> *> -*> where A is an lower triangular N-by-N matrix, and B is M-by-N pentagonal +*> where A is an lower triangular M-by-M matrix, and B is M-by-N pentagonal *> matrix consisting of a M-by-(N-L) rectangular matrix B1 on left of a M-by-L *> upper trapezoidal matrix B2: *> [ B ] = [ B1 ] [ B2 ] *> [ B1 ] <- M-by-(N-L) rectangular -*> [ B2 ] <- M-by-L upper trapezoidal. +*> [ B2 ] <- M-by-L lower trapezoidal. *> *> The lower trapezoidal matrix B2 consists of the first L columns of a -*> N-by-N lower triangular matrix, where 0 <= L <= MIN(M,N). If L=0, +*> M-by-M lower triangular matrix, where 0 <= L <= MIN(M,N). If L=0, *> B is rectangular M-by-N; if M=L=N, B is lower triangular. *> *> The matrix W stores the elementary reflectors H(i) in the i-th row *> above the diagonal (of A) in the M-by-(M+N) input matrix C *> [ C ] = [ A ] [ B ] -*> [ A ] <- lower triangular N-by-N +*> [ A ] <- lower triangular M-by-M *> [ B ] <- M-by-N pentagonal *> *> so that W can be represented as *> [ W ] = [ I ] [ V ] -*> [ I ] <- identity, N-by-N +*> [ I ] <- identity, M-by-M *> [ V ] <- M-by-N, same form as B. *> *> Thus, all of information needed for W is contained on exit in B, which @@ -172,10 +172,10 @@ SUBROUTINE CTPLQT( M, N, L, MB, A, LDA, B, LDB, T, LDT, WORK, $ INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDB, LDT, N, M, L, MB diff -Nru lapack-3.7.0/SRC/ctpmlqt.f lapack-3.7.1/SRC/ctpmlqt.f --- lapack-3.7.0/SRC/ctpmlqt.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/ctpmlqt.f 2017-06-17 22:46:53.000000000 +0000 @@ -19,9 +19,9 @@ *> *> \verbatim *> -*> CTPMQRT applies a complex orthogonal matrix Q obtained from a -*> "triangular-pentagonal" real block reflector H to a general -*> real matrix C, which consists of two blocks A and B. +*> CTPMLQT applies a complex orthogonal matrix Q obtained from a +*> "triangular-pentagonal" complex block reflector H to a general +*> complex matrix C, which consists of two blocks A and B. *> \endverbatim * * Arguments: @@ -30,15 +30,15 @@ *> \param[in] SIDE *> \verbatim *> SIDE is CHARACTER*1 -*> = 'L': apply Q or Q**C from the Left; -*> = 'R': apply Q or Q**C from the Right. +*> = 'L': apply Q or Q**H from the Left; +*> = 'R': apply Q or Q**H from the Right. *> \endverbatim *> *> \param[in] TRANS *> \verbatim *> TRANS is CHARACTER*1 *> = 'N': No transpose, apply Q; -*> = 'C': Transpose, apply Q**C. +*> = 'C': Transpose, apply Q**H. *> \endverbatim *> *> \param[in] M @@ -111,7 +111,7 @@ *> (LDA,K) if SIDE = 'R' *> On entry, the K-by-N or M-by-K matrix A. *> On exit, A is overwritten by the corresponding block of -*> Q*C or Q**C*C or C*Q or C*Q**C. See Further Details. +*> Q*C or Q**H*C or C*Q or C*Q**H. See Further Details. *> \endverbatim *> *> \param[in] LDA @@ -127,7 +127,7 @@ *> B is COMPLEX array, dimension (LDB,N) *> On entry, the M-by-N matrix B. *> On exit, B is overwritten by the corresponding block of -*> Q*C or Q**C*C or C*Q or C*Q**C. See Further Details. +*> Q*C or Q**H*C or C*Q or C*Q**H. See Further Details. *> \endverbatim *> *> \param[in] LDB @@ -158,7 +158,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleOTHERcomputational * @@ -188,21 +188,21 @@ *> *> If TRANS='N' and SIDE='L', C is on exit replaced with Q * C. *> -*> If TRANS='C' and SIDE='L', C is on exit replaced with Q**C * C. +*> If TRANS='C' and SIDE='L', C is on exit replaced with Q**H * C. *> *> If TRANS='N' and SIDE='R', C is on exit replaced with C * Q. *> -*> If TRANS='C' and SIDE='R', C is on exit replaced with C * Q**C. +*> If TRANS='C' and SIDE='R', C is on exit replaced with C * Q**H. *> \endverbatim *> * ===================================================================== SUBROUTINE CTPMLQT( SIDE, TRANS, M, N, K, L, MB, V, LDV, T, LDT, $ A, LDA, B, LDB, WORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER SIDE, TRANS diff -Nru lapack-3.7.0/SRC/cunbdb1.f lapack-3.7.1/SRC/cunbdb1.f --- lapack-3.7.0/SRC/cunbdb1.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/cunbdb1.f 2017-06-17 22:46:53.000000000 +0000 @@ -32,7 +32,7 @@ * * *> \par Purpose: -*> ============= +* ============= *> *>\verbatim *> @@ -202,7 +202,7 @@ SUBROUTINE CUNBDB1( M, P, Q, X11, LDX11, X21, LDX21, THETA, PHI, $ TAUP1, TAUP2, TAUQ1, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * July 2012 diff -Nru lapack-3.7.0/SRC/cunbdb2.f lapack-3.7.1/SRC/cunbdb2.f --- lapack-3.7.0/SRC/cunbdb2.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/cunbdb2.f 2017-06-17 22:46:53.000000000 +0000 @@ -32,7 +32,7 @@ * * *> \par Purpose: -*> ============= +* ============= *> *>\verbatim *> @@ -202,7 +202,7 @@ SUBROUTINE CUNBDB2( M, P, Q, X11, LDX11, X21, LDX21, THETA, PHI, $ TAUP1, TAUP2, TAUQ1, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * July 2012 diff -Nru lapack-3.7.0/SRC/cunbdb3.f lapack-3.7.1/SRC/cunbdb3.f --- lapack-3.7.0/SRC/cunbdb3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/cunbdb3.f 2017-06-17 22:46:53.000000000 +0000 @@ -32,7 +32,7 @@ * * *> \par Purpose: -*> ============= +* ============= *> *>\verbatim *> @@ -202,7 +202,7 @@ SUBROUTINE CUNBDB3( M, P, Q, X11, LDX11, X21, LDX21, THETA, PHI, $ TAUP1, TAUP2, TAUQ1, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * July 2012 diff -Nru lapack-3.7.0/SRC/cunbdb4.f lapack-3.7.1/SRC/cunbdb4.f --- lapack-3.7.0/SRC/cunbdb4.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/cunbdb4.f 2017-06-17 22:46:53.000000000 +0000 @@ -33,7 +33,7 @@ * * *> \par Purpose: -*> ============= +* ============= *> *>\verbatim *> @@ -213,7 +213,7 @@ $ TAUP1, TAUP2, TAUQ1, PHANTOM, WORK, LWORK, $ INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * July 2012 diff -Nru lapack-3.7.0/SRC/cunbdb5.f lapack-3.7.1/SRC/cunbdb5.f --- lapack-3.7.0/SRC/cunbdb5.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/cunbdb5.f 2017-06-17 22:46:53.000000000 +0000 @@ -31,7 +31,7 @@ * * *> \par Purpose: -*> ============= +* ============= *> *>\verbatim *> @@ -156,7 +156,7 @@ SUBROUTINE CUNBDB5( M1, M2, N, X1, INCX1, X2, INCX2, Q1, LDQ1, Q2, $ LDQ2, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * July 2012 diff -Nru lapack-3.7.0/SRC/cunbdb6.f lapack-3.7.1/SRC/cunbdb6.f --- lapack-3.7.0/SRC/cunbdb6.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/cunbdb6.f 2017-06-17 22:46:53.000000000 +0000 @@ -31,7 +31,7 @@ * * *> \par Purpose: -*> ============= +* ============= *> *>\verbatim *> @@ -154,7 +154,7 @@ SUBROUTINE CUNBDB6( M1, M2, N, X1, INCX1, X2, INCX2, Q1, LDQ1, Q2, $ LDQ2, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * July 2012 diff -Nru lapack-3.7.0/SRC/cuncsd2by1.f lapack-3.7.1/SRC/cuncsd2by1.f --- lapack-3.7.0/SRC/cuncsd2by1.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/cuncsd2by1.f 2017-06-17 22:46:53.000000000 +0000 @@ -39,7 +39,7 @@ * * *> \par Purpose: -*> ============= +* ============= *> *>\verbatim *> @@ -255,7 +255,7 @@ $ LDV1T, WORK, LWORK, RWORK, LRWORK, IWORK, $ INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 diff -Nru lapack-3.7.0/SRC/cuncsd.f lapack-3.7.1/SRC/cuncsd.f --- lapack-3.7.0/SRC/cuncsd.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/cuncsd.f 2017-06-17 22:46:53.000000000 +0000 @@ -188,7 +188,7 @@ *> *> \param[out] U1 *> \verbatim -*> U1 is COMPLEX array, dimension (P) +*> U1 is COMPLEX array, dimension (LDU1,P) *> If JOBU1 = 'Y', U1 contains the P-by-P unitary matrix U1. *> \endverbatim *> @@ -201,7 +201,7 @@ *> *> \param[out] U2 *> \verbatim -*> U2 is COMPLEX array, dimension (M-P) +*> U2 is COMPLEX array, dimension (LDU2,M-P) *> If JOBU2 = 'Y', U2 contains the (M-P)-by-(M-P) unitary *> matrix U2. *> \endverbatim @@ -215,7 +215,7 @@ *> *> \param[out] V1T *> \verbatim -*> V1T is COMPLEX array, dimension (Q) +*> V1T is COMPLEX array, dimension (LDV1T,Q) *> If JOBV1T = 'Y', V1T contains the Q-by-Q matrix unitary *> matrix V1**H. *> \endverbatim @@ -229,7 +229,7 @@ *> *> \param[out] V2T *> \verbatim -*> V2T is COMPLEX array, dimension (M-Q) +*> V2T is COMPLEX array, dimension (LDV2T,M-Q) *> If JOBV2T = 'Y', V2T contains the (M-Q)-by-(M-Q) unitary *> matrix V2**H. *> \endverbatim @@ -320,7 +320,7 @@ $ LDV2T, WORK, LWORK, RWORK, LRWORK, $ IWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 diff -Nru lapack-3.7.0/SRC/cunm22.f lapack-3.7.1/SRC/cunm22.f --- lapack-3.7.0/SRC/cunm22.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/cunm22.f 2017-06-17 22:46:53.000000000 +0000 @@ -52,8 +52,8 @@ *> N2-by-N2 upper triangular matrix. *> \endverbatim * -* Arguments -* ========= +* Arguments: +* ========== * *> \param[in] SIDE *> \verbatim @@ -162,7 +162,7 @@ SUBROUTINE CUNM22( SIDE, TRANS, M, N, N1, N2, Q, LDQ, C, LDC, $ WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.6.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * January 2015 diff -Nru lapack-3.7.0/SRC/dbbcsd.f lapack-3.7.1/SRC/dbbcsd.f --- lapack-3.7.0/SRC/dbbcsd.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dbbcsd.f 2017-06-17 22:46:53.000000000 +0000 @@ -190,7 +190,7 @@ *> *> \param[in,out] V2T *> \verbatim -*> V2T is DOUBLE PRECISION array, dimenison (LDV2T,M-Q) +*> V2T is DOUBLE PRECISION array, dimension (LDV2T,M-Q) *> On entry, an (M-Q)-by-(M-Q) matrix. On exit, V2T is *> premultiplied by the transpose of the right *> singular vector matrix common to [ B12 0 0 ; 0 -I 0 ] and @@ -332,7 +332,7 @@ $ V2T, LDV2T, B11D, B11E, B12D, B12E, B21D, B21E, $ B22D, B22E, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 diff -Nru lapack-3.7.0/SRC/dbdsdc.f lapack-3.7.1/SRC/dbdsdc.f --- lapack-3.7.0/SRC/dbdsdc.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dbdsdc.f 2017-06-17 22:46:53.000000000 +0000 @@ -205,7 +205,7 @@ SUBROUTINE DBDSDC( UPLO, COMPQ, N, D, E, U, LDU, VT, LDVT, Q, IQ, $ WORK, IWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 @@ -311,12 +311,12 @@ WSTART = 1 QSTART = 3 IF( ICOMPQ.EQ.1 ) THEN - CALL DCOPY( N, D, 1, Q( 1 ), 1 ) + CALL DCOPY( N, D, 1, Q( 1 ), 1 ) CALL DCOPY( N-1, E, 1, Q( N+1 ), 1 ) END IF IF( IUPLO.EQ.2 ) THEN QSTART = 5 - WSTART = 2*N - 1 + IF( ICOMPQ .EQ. 2 ) WSTART = 2*N - 1 DO 10 I = 1, N - 1 CALL DLARTG( D( I ), E( I ), CS, SN, R ) D( I ) = R diff -Nru lapack-3.7.0/SRC/dbdsqr.f lapack-3.7.1/SRC/dbdsqr.f --- lapack-3.7.0/SRC/dbdsqr.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dbdsqr.f 2017-06-17 22:46:53.000000000 +0000 @@ -212,6 +212,17 @@ *> algorithm through its inner loop. The algorithms stops *> (and so fails to converge) if the number of passes *> through the inner loop exceeds MAXITR*N**2. +*> +*> \endverbatim +* +*> \par Note: +* =========== +*> +*> \verbatim +*> Bug report from Cezary Dendek. +*> On March 23rd 2017, the INTEGER variable MAXIT = MAXITR*N**2 is +*> removed since it can overflow pretty easily (for N larger or equal +*> than 18,919). We instead use MAXITDIVN = MAXITR*N. *> \endverbatim * * Authors: @@ -222,7 +233,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup auxOTHERcomputational * @@ -230,10 +241,10 @@ SUBROUTINE DBDSQR( UPLO, N, NCVT, NRU, NCC, D, E, VT, LDVT, U, $ LDU, C, LDC, WORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO @@ -266,8 +277,8 @@ * .. * .. Local Scalars .. LOGICAL LOWER, ROTATE - INTEGER I, IDIR, ISUB, ITER, J, LL, LLL, M, MAXIT, NM1, - $ NM12, NM13, OLDLL, OLDM + INTEGER I, IDIR, ISUB, ITER, ITERDIVN, J, LL, LLL, M, + $ MAXITDIVN, NM1, NM12, NM13, OLDLL, OLDM DOUBLE PRECISION ABSE, ABSS, COSL, COSR, CS, EPS, F, G, H, MU, $ OLDCS, OLDSN, R, SHIFT, SIGMN, SIGMX, SINL, $ SINR, SLL, SMAX, SMIN, SMINL, SMINOA, @@ -400,20 +411,21 @@ 40 CONTINUE 50 CONTINUE SMINOA = SMINOA / SQRT( DBLE( N ) ) - THRESH = MAX( TOL*SMINOA, MAXITR*N*N*UNFL ) + THRESH = MAX( TOL*SMINOA, MAXITR*(N*(N*UNFL)) ) ELSE * * Absolute accuracy desired * - THRESH = MAX( ABS( TOL )*SMAX, MAXITR*N*N*UNFL ) + THRESH = MAX( ABS( TOL )*SMAX, MAXITR*(N*(N*UNFL)) ) END IF * * Prepare for main iteration loop for the singular values * (MAXIT is the maximum number of passes through the inner * loop permitted before nonconvergence signalled.) * - MAXIT = MAXITR*N*N - ITER = 0 + MAXITDIVN = MAXITR*N + ITERDIVN = 0 + ITER = -1 OLDLL = -1 OLDM = -1 * @@ -429,8 +441,13 @@ * IF( M.LE.1 ) $ GO TO 160 - IF( ITER.GT.MAXIT ) - $ GO TO 200 +* + IF( ITER.GE.N ) THEN + ITER = ITER - N + ITERDIVN = ITERDIVN + 1 + IF( ITERDIVN.GE.MAXITDIVN ) + $ GO TO 200 + END IF * * Find diagonal block of matrix to work on * diff -Nru lapack-3.7.0/SRC/dgebal.f lapack-3.7.1/SRC/dgebal.f --- lapack-3.7.0/SRC/dgebal.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dgebal.f 2017-06-17 22:46:53.000000000 +0000 @@ -67,7 +67,7 @@ *> *> \param[in,out] A *> \verbatim -*> A is DOUBLE array, dimension (LDA,N) +*> A is DOUBLE PRECISION array, dimension (LDA,N) *> On entry, the input matrix A. *> On exit, A is overwritten by the balanced matrix. *> If JOB = 'N', A is not referenced. @@ -94,7 +94,7 @@ *> *> \param[out] SCALE *> \verbatim -*> SCALE is DOUBLE array, dimension (N) +*> SCALE is DOUBLE PRECISION array, dimension (N) *> Details of the permutations and scaling factors applied to *> A. If P(j) is the index of the row and column interchanged *> with row and column j and D(j) is the scaling factor @@ -121,7 +121,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleGEcomputational * @@ -160,10 +160,10 @@ * ===================================================================== SUBROUTINE DGEBAL( JOB, N, A, LDA, ILO, IHI, SCALE, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER JOB diff -Nru lapack-3.7.0/SRC/dgebd2.f lapack-3.7.1/SRC/dgebd2.f --- lapack-3.7.0/SRC/dgebd2.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dgebd2.f 2017-06-17 22:46:53.000000000 +0000 @@ -100,7 +100,7 @@ *> *> \param[out] TAUQ *> \verbatim -*> TAUQ is DOUBLE PRECISION array dimension (min(M,N)) +*> TAUQ is DOUBLE PRECISION array, dimension (min(M,N)) *> The scalar factors of the elementary reflectors which *> represent the orthogonal matrix Q. See Further Details. *> \endverbatim @@ -132,7 +132,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleGEcomputational * @@ -189,10 +189,10 @@ * ===================================================================== SUBROUTINE DGEBD2( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, M, N diff -Nru lapack-3.7.0/SRC/dgebrd.f lapack-3.7.1/SRC/dgebrd.f --- lapack-3.7.0/SRC/dgebrd.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dgebrd.f 2017-06-17 22:46:53.000000000 +0000 @@ -101,7 +101,7 @@ *> *> \param[out] TAUQ *> \verbatim -*> TAUQ is DOUBLE PRECISION array dimension (min(M,N)) +*> TAUQ is DOUBLE PRECISION array, dimension (min(M,N)) *> The scalar factors of the elementary reflectors which *> represent the orthogonal matrix Q. See Further Details. *> \endverbatim @@ -147,7 +147,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleGEcomputational * @@ -205,10 +205,10 @@ SUBROUTINE DGEBRD( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK, $ INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LWORK, M, N diff -Nru lapack-3.7.0/SRC/dgejsv.f lapack-3.7.1/SRC/dgejsv.f --- lapack-3.7.0/SRC/dgejsv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dgejsv.f 2017-06-17 22:46:53.000000000 +0000 @@ -271,7 +271,7 @@ *> *> \param[out] WORK *> \verbatim -*> WORK is DOUBLE PRECISION array, dimension at least LWORK. +*> WORK is DOUBLE PRECISION array, dimension (LWORK) *> On exit, if N.GT.0 .AND. M.GT.0 (else not referenced), *> WORK(1) = SCALE = WORK(2) / WORK(1) is the scaling factor such *> that SCALE*SVA(1:N) are the computed singular values @@ -362,7 +362,7 @@ *> *> \param[out] IWORK *> \verbatim -*> IWORK is INTEGER array, dimension M+3*N. +*> IWORK is INTEGER array, dimension (M+3*N). *> On exit, *> IWORK(1) = the numerical rank determined after the initial *> QR factorization with pivoting. See the descriptions @@ -476,7 +476,7 @@ $ M, N, A, LDA, SVA, U, LDU, V, LDV, $ WORK, LWORK, IWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 diff -Nru lapack-3.7.0/SRC/dgelqt3.f lapack-3.7.1/SRC/dgelqt3.f --- lapack-3.7.0/SRC/dgelqt3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dgelqt3.f 2017-06-17 22:46:53.000000000 +0000 @@ -100,7 +100,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleGEcomputational * @@ -109,8 +109,8 @@ *> *> \verbatim *> -*> The matrix V stores the elementary reflectors H(i) in the i-th column -*> below the diagonal. For example, if M=5 and N=3, the matrix V is +*> The matrix V stores the elementary reflectors H(i) in the i-th row +*> above the diagonal. For example, if M=5 and N=3, the matrix V is *> *> V = ( 1 v1 v1 v1 v1 ) *> ( 1 v2 v2 v2 ) @@ -131,10 +131,10 @@ * ===================================================================== RECURSIVE SUBROUTINE DGELQT3( M, N, A, LDA, T, LDT, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, M, N, LDT diff -Nru lapack-3.7.0/SRC/dgelqt.f lapack-3.7.1/SRC/dgelqt.f --- lapack-3.7.0/SRC/dgelqt.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dgelqt.f 2017-06-17 22:46:53.000000000 +0000 @@ -108,7 +108,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleGEcomputational * @@ -117,8 +117,8 @@ *> *> \verbatim *> -*> The matrix V stores the elementary reflectors H(i) in the i-th column -*> below the diagonal. For example, if M=5 and N=3, the matrix V is +*> The matrix V stores the elementary reflectors H(i) in the i-th row +*> above the diagonal. For example, if M=5 and N=3, the matrix V is *> *> V = ( 1 v1 v1 v1 v1 ) *> ( 1 v2 v2 v2 ) @@ -127,11 +127,11 @@ *> *> where the vi's represent the vectors which define H(i), which are returned *> in the matrix A. The 1's along the diagonal of V are not stored in A. -*> Let K=MIN(M,N). The number of blocks is B = ceiling(K/NB), where each -*> block is of order NB except for the last block, which is of order -*> IB = K - (B-1)*NB. For each of the B blocks, a upper triangular block -*> reflector factor is computed: T1, T2, ..., TB. The NB-by-NB (and IB-by-IB -*> for the last block) T's are stored in the NB-by-N matrix T as +*> Let K=MIN(M,N). The number of blocks is B = ceiling(K/MB), where each +*> block is of order MB except for the last block, which is of order +*> IB = K - (B-1)*MB. For each of the B blocks, a upper triangular block +*> reflector factor is computed: T1, T2, ..., TB. The MB-by-MB (and IB-by-IB +*> for the last block) T's are stored in the MB-by-K matrix T as *> *> T = (T1 T2 ... TB). *> \endverbatim @@ -139,10 +139,10 @@ * ===================================================================== SUBROUTINE DGELQT( M, N, MB, A, LDA, T, LDT, WORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDT, M, N, MB diff -Nru lapack-3.7.0/SRC/dgelsd.f lapack-3.7.1/SRC/dgelsd.f --- lapack-3.7.0/SRC/dgelsd.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dgelsd.f 2017-06-17 22:46:53.000000000 +0000 @@ -89,7 +89,7 @@ *> of the matrices B and X. NRHS >= 0. *> \endverbatim *> -*> \param[in] A +*> \param[in,out] A *> \verbatim *> A is DOUBLE PRECISION array, dimension (LDA,N) *> On entry, the M-by-N matrix A. @@ -194,7 +194,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleGEsolve * @@ -209,10 +209,10 @@ SUBROUTINE DGELSD( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK, $ WORK, LWORK, IWORK, INFO ) * -* -- LAPACK driver routine (version 3.7.0) -- +* -- LAPACK driver routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS, RANK diff -Nru lapack-3.7.0/SRC/dgemlqt.f lapack-3.7.1/SRC/dgemlqt.f --- lapack-3.7.0/SRC/dgemlqt.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dgemlqt.f 2017-06-17 22:46:53.000000000 +0000 @@ -6,7 +6,7 @@ * http://www.netlib.org/lapack/explore-html/ * *> \htmlonly -*> Download DGEMQRT + dependencies +*> Download DGEMLQT + dependencies *> *> [TGZ] *> @@ -35,7 +35,7 @@ *> *> \verbatim *> -*> DGEMQRT overwrites the general real M-by-N matrix C with +*> DGEMLQT overwrites the general real M-by-N matrix C with *> *> SIDE = 'L' SIDE = 'R' *> TRANS = 'N': Q C C Q @@ -99,7 +99,9 @@ *> *> \param[in] V *> \verbatim -*> V is DOUBLE PRECISION array, dimension (LDV,K) +*> V is DOUBLE PRECISION array, dimension +*> (LDV,M) if SIDE = 'L', +*> (LDV,N) if SIDE = 'R' *> The i-th row must contain the vector which defines the *> elementary reflector H(i), for i = 1,2,...,k, as returned by *> DGELQT in the first K rows of its array argument A. @@ -108,16 +110,14 @@ *> \param[in] LDV *> \verbatim *> LDV is INTEGER -*> The leading dimension of the array V. -*> If SIDE = 'L', LDA >= max(1,M); -*> if SIDE = 'R', LDA >= max(1,N). +*> The leading dimension of the array V. LDV >= max(1,K). *> \endverbatim *> *> \param[in] T *> \verbatim *> T is DOUBLE PRECISION array, dimension (LDT,K) *> The upper triangular factors of the block reflectors -*> as returned by DGELQT, stored as a MB-by-M matrix. +*> as returned by DGELQT, stored as a MB-by-K matrix. *> \endverbatim *> *> \param[in] LDT @@ -160,7 +160,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleGEcomputational * @@ -168,10 +168,10 @@ SUBROUTINE DGEMLQT( SIDE, TRANS, M, N, K, MB, V, LDV, T, LDT, $ C, LDC, WORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER SIDE, TRANS diff -Nru lapack-3.7.0/SRC/dgeqrt.f lapack-3.7.1/SRC/dgeqrt.f --- lapack-3.7.0/SRC/dgeqrt.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dgeqrt.f 2017-06-17 22:46:53.000000000 +0000 @@ -108,7 +108,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleGEcomputational * @@ -133,7 +133,7 @@ *> block is of order NB except for the last block, which is of order *> IB = K - (B-1)*NB. For each of the B blocks, a upper triangular block *> reflector factor is computed: T1, T2, ..., TB. The NB-by-NB (and IB-by-IB -*> for the last block) T's are stored in the NB-by-N matrix T as +*> for the last block) T's are stored in the NB-by-K matrix T as *> *> T = (T1 T2 ... TB). *> \endverbatim @@ -141,10 +141,10 @@ * ===================================================================== SUBROUTINE DGEQRT( M, N, NB, A, LDA, T, LDT, WORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDT, M, N, NB diff -Nru lapack-3.7.0/SRC/dgesvj.f lapack-3.7.1/SRC/dgesvj.f --- lapack-3.7.0/SRC/dgesvj.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dgesvj.f 2017-06-17 22:46:53.000000000 +0000 @@ -54,7 +54,7 @@ * *> \param[in] JOBA *> \verbatim -*> JOBA is CHARACTER* 1 +*> JOBA is CHARACTER*1 *> Specifies the structure of A. *> = 'L': The input matrix A is lower triangular; *> = 'U': The input matrix A is upper triangular; @@ -208,7 +208,7 @@ *> *> \param[in,out] WORK *> \verbatim -*> WORK is DOUBLE PRECISION array, dimension MAX(6,M+N). +*> WORK is DOUBLE PRECISION array, dimension (LWORK) *> On entry : *> If JOBU .EQ. 'C' : *> WORK(1) = CTOL, where CTOL defines the threshold for convergence. @@ -260,7 +260,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleGEcomputational * @@ -337,10 +337,10 @@ SUBROUTINE DGESVJ( JOBA, JOBU, JOBV, M, N, A, LDA, SVA, MV, V, $ LDV, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDV, LWORK, M, MV, N diff -Nru lapack-3.7.0/SRC/dgetsls.f lapack-3.7.1/SRC/dgetsls.f --- lapack-3.7.0/SRC/dgetsls.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dgetsls.f 2017-06-17 22:46:53.000000000 +0000 @@ -152,7 +152,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleGEsolve * @@ -160,10 +160,10 @@ SUBROUTINE DGETSLS( TRANS, M, N, NRHS, A, LDA, B, LDB, $ WORK, LWORK, INFO ) * -* -- LAPACK driver routine (version 3.7.0) -- +* -- LAPACK driver routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER TRANS @@ -185,7 +185,7 @@ INTEGER I, IASCL, IBSCL, J, MINMN, MAXMN, BROW, $ SCLLEN, MNK, TSZO, TSZM, LWO, LWM, LW1, LW2, $ WSIZEO, WSIZEM, INFO2 - DOUBLE PRECISION ANRM, BIGNUM, BNRM, SMLNUM, TQ( 5 ), WORKQ + DOUBLE PRECISION ANRM, BIGNUM, BNRM, SMLNUM, TQ( 5 ), WORKQ( 1 ) * .. * .. External Functions .. LOGICAL LSAME @@ -233,31 +233,31 @@ IF( M.GE.N ) THEN CALL DGEQR( M, N, A, LDA, TQ, -1, WORKQ, -1, INFO2 ) TSZO = INT( TQ( 1 ) ) - LWO = INT( WORKQ ) + LWO = INT( WORKQ( 1 ) ) CALL DGEMQR( 'L', TRANS, M, NRHS, N, A, LDA, TQ, $ TSZO, B, LDB, WORKQ, -1, INFO2 ) - LWO = MAX( LWO, INT( WORKQ ) ) + LWO = MAX( LWO, INT( WORKQ( 1 ) ) ) CALL DGEQR( M, N, A, LDA, TQ, -2, WORKQ, -2, INFO2 ) TSZM = INT( TQ( 1 ) ) - LWM = INT( WORKQ ) + LWM = INT( WORKQ( 1 ) ) CALL DGEMQR( 'L', TRANS, M, NRHS, N, A, LDA, TQ, $ TSZM, B, LDB, WORKQ, -1, INFO2 ) - LWM = MAX( LWM, INT( WORKQ ) ) + LWM = MAX( LWM, INT( WORKQ( 1 ) ) ) WSIZEO = TSZO + LWO WSIZEM = TSZM + LWM ELSE CALL DGELQ( M, N, A, LDA, TQ, -1, WORKQ, -1, INFO2 ) TSZO = INT( TQ( 1 ) ) - LWO = INT( WORKQ ) + LWO = INT( WORKQ( 1 ) ) CALL DGEMLQ( 'L', TRANS, N, NRHS, M, A, LDA, TQ, $ TSZO, B, LDB, WORKQ, -1, INFO2 ) - LWO = MAX( LWO, INT( WORKQ ) ) + LWO = MAX( LWO, INT( WORKQ( 1 ) ) ) CALL DGELQ( M, N, A, LDA, TQ, -2, WORKQ, -2, INFO2 ) TSZM = INT( TQ( 1 ) ) - LWM = INT( WORKQ ) + LWM = INT( WORKQ( 1 ) ) CALL DGEMLQ( 'L', TRANS, N, NRHS, M, A, LDA, TQ, $ TSZO, B, LDB, WORKQ, -1, INFO2 ) - LWM = MAX( LWM, INT( WORKQ ) ) + LWM = MAX( LWM, INT( WORKQ( 1 ) ) ) WSIZEO = TSZO + LWO WSIZEM = TSZM + LWM END IF diff -Nru lapack-3.7.0/SRC/dggesx.f lapack-3.7.1/SRC/dggesx.f --- lapack-3.7.0/SRC/dggesx.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dggesx.f 2017-06-17 22:46:53.000000000 +0000 @@ -111,7 +111,7 @@ *> *> \param[in] SELCTG *> \verbatim -*> SELCTG is procedure) LOGICAL FUNCTION of three DOUBLE PRECISION arguments +*> SELCTG is a LOGICAL FUNCTION of three DOUBLE PRECISION arguments *> SELCTG must be declared EXTERNAL in the calling subroutine. *> If SORT = 'N', SELCTG is not referenced. *> If SORT = 'S', SELCTG is used to select eigenvalues to sort @@ -337,7 +337,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleGEeigen * @@ -365,10 +365,10 @@ $ VSR, LDVSR, RCONDE, RCONDV, WORK, LWORK, IWORK, $ LIWORK, BWORK, INFO ) * -* -- LAPACK driver routine (version 3.7.0) -- +* -- LAPACK driver routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER JOBVSL, JOBVSR, SENSE, SORT diff -Nru lapack-3.7.0/SRC/disnan.f lapack-3.7.1/SRC/disnan.f --- lapack-3.7.0/SRC/disnan.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/disnan.f 2017-06-17 22:46:53.000000000 +0000 @@ -21,7 +21,7 @@ * LOGICAL FUNCTION DISNAN( DIN ) * * .. Scalar Arguments .. -* DOUBLE PRECISION DIN +* DOUBLE PRECISION, INTENT(IN) :: DIN * .. * * @@ -52,20 +52,20 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup OTHERauxiliary * * ===================================================================== LOGICAL FUNCTION DISNAN( DIN ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. - DOUBLE PRECISION DIN + DOUBLE PRECISION, INTENT(IN) :: DIN * .. * * ===================================================================== diff -Nru lapack-3.7.0/SRC/dlabrd.f lapack-3.7.1/SRC/dlabrd.f --- lapack-3.7.0/SRC/dlabrd.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dlabrd.f 2017-06-17 22:46:53.000000000 +0000 @@ -110,7 +110,7 @@ *> *> \param[out] TAUQ *> \verbatim -*> TAUQ is DOUBLE PRECISION array dimension (NB) +*> TAUQ is DOUBLE PRECISION array, dimension (NB) *> The scalar factors of the elementary reflectors which *> represent the orthogonal matrix Q. See Further Details. *> \endverbatim @@ -156,7 +156,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleOTHERauxiliary * @@ -210,10 +210,10 @@ SUBROUTINE DLABRD( M, N, NB, A, LDA, D, E, TAUQ, TAUP, X, LDX, Y, $ LDY ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER LDA, LDX, LDY, M, N, NB diff -Nru lapack-3.7.0/SRC/dlaed3.f lapack-3.7.1/SRC/dlaed3.f --- lapack-3.7.0/SRC/dlaed3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dlaed3.f 2017-06-17 22:46:53.000000000 +0000 @@ -116,7 +116,7 @@ *> *> \param[in] Q2 *> \verbatim -*> Q2 is DOUBLE PRECISION array, dimension (LDQ2, N) +*> Q2 is DOUBLE PRECISION array, dimension (LDQ2*N) *> The first K columns of this matrix contain the non-deflated *> eigenvectors for the split problem. *> \endverbatim @@ -170,7 +170,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup auxOTHERcomputational * @@ -185,10 +185,10 @@ SUBROUTINE DLAED3( K, N, N1, D, Q, LDQ, RHO, DLAMDA, Q2, INDX, $ CTOT, W, S, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, K, LDQ, N, N1 diff -Nru lapack-3.7.0/SRC/dla_gbamv.f lapack-3.7.1/SRC/dla_gbamv.f --- lapack-3.7.0/SRC/dla_gbamv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dla_gbamv.f 2017-06-17 22:46:53.000000000 +0000 @@ -106,7 +106,7 @@ *> *> \param[in] AB *> \verbatim -*> AB is DOUBLE PRECISION array of DIMENSION ( LDAB, n ) +*> AB is DOUBLE PRECISION array, dimension ( LDAB, n ) *> Before entry, the leading m by n part of the array AB must *> contain the matrix of coefficients. *> Unchanged on exit. @@ -177,7 +177,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleGBcomputational * @@ -185,10 +185,10 @@ SUBROUTINE DLA_GBAMV( TRANS, M, N, KL, KU, ALPHA, AB, LDAB, X, $ INCX, BETA, Y, INCY ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. DOUBLE PRECISION ALPHA, BETA diff -Nru lapack-3.7.0/SRC/dla_gbrfsx_extended.f lapack-3.7.1/SRC/dla_gbrfsx_extended.f --- lapack-3.7.0/SRC/dla_gbrfsx_extended.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dla_gbrfsx_extended.f 2017-06-17 22:46:53.000000000 +0000 @@ -177,8 +177,7 @@ *> *> \param[in,out] Y *> \verbatim -*> Y is DOUBLE PRECISION array, dimension -*> (LDY,NRHS) +*> Y is DOUBLE PRECISION array, dimension (LDY,NRHS) *> On entry, the solution matrix X, as computed by DGBTRS. *> On exit, the improved solution matrix Y. *> \endverbatim @@ -210,8 +209,7 @@ *> *> \param[in,out] ERR_BNDS_NORM *> \verbatim -*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension -*> (NRHS, N_ERR_BNDS) +*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS) *> For each right-hand side, this array contains information about *> various error bounds and condition numbers corresponding to the *> normwise relative error, which is defined as follows: @@ -257,8 +255,7 @@ *> *> \param[in,out] ERR_BNDS_COMP *> \verbatim -*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension -*> (NRHS, N_ERR_BNDS) +*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS) *> For each right-hand side, this array contains information about *> various error bounds and condition numbers corresponding to the *> componentwise relative error, which is defined as follows: @@ -401,7 +398,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleGBcomputational * @@ -414,10 +411,10 @@ $ Y_TAIL, RCOND, ITHRESH, RTHRESH, $ DZ_UB, IGNORE_CWISE, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDAB, LDAFB, LDB, LDY, N, KL, KU, NRHS, diff -Nru lapack-3.7.0/SRC/dla_geamv.f lapack-3.7.1/SRC/dla_geamv.f --- lapack-3.7.0/SRC/dla_geamv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dla_geamv.f 2017-06-17 22:46:53.000000000 +0000 @@ -94,7 +94,7 @@ *> *> \param[in] A *> \verbatim -*> A is DOUBLE PRECISION array of DIMENSION ( LDA, n ) +*> A is DOUBLE PRECISION array, dimension ( LDA, n ) *> Before entry, the leading m by n part of the array A must *> contain the matrix of coefficients. *> Unchanged on exit. @@ -138,8 +138,8 @@ *> *> \param[in,out] Y *> \verbatim -*> Y is DOUBLE PRECISION -*> Array of DIMENSION at least +*> Y is DOUBLE PRECISION array, +*> dimension at least *> ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n' *> and at least *> ( 1 + ( n - 1 )*abs( INCY ) ) otherwise. @@ -166,7 +166,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleGEcomputational * @@ -174,10 +174,10 @@ SUBROUTINE DLA_GEAMV ( TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA, $ Y, INCY ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. DOUBLE PRECISION ALPHA, BETA diff -Nru lapack-3.7.0/SRC/dla_gerfsx_extended.f lapack-3.7.1/SRC/dla_gerfsx_extended.f --- lapack-3.7.0/SRC/dla_gerfsx_extended.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dla_gerfsx_extended.f 2017-06-17 22:46:53.000000000 +0000 @@ -163,8 +163,7 @@ *> *> \param[in,out] Y *> \verbatim -*> Y is DOUBLE PRECISION array, dimension -*> (LDY,NRHS) +*> Y is DOUBLE PRECISION array, dimension (LDY,NRHS) *> On entry, the solution matrix X, as computed by DGETRS. *> On exit, the improved solution matrix Y. *> \endverbatim @@ -196,8 +195,7 @@ *> *> \param[in,out] ERRS_N *> \verbatim -*> ERRS_N is DOUBLE PRECISION array, dimension -*> (NRHS, N_ERR_BNDS) +*> ERRS_N is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS) *> For each right-hand side, this array contains information about *> various error bounds and condition numbers corresponding to the *> normwise relative error, which is defined as follows: @@ -243,8 +241,7 @@ *> *> \param[in,out] ERRS_C *> \verbatim -*> ERRS_C is DOUBLE PRECISION array, dimension -*> (NRHS, N_ERR_BNDS) +*> ERRS_C is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS) *> For each right-hand side, this array contains information about *> various error bounds and condition numbers corresponding to the *> componentwise relative error, which is defined as follows: @@ -387,7 +384,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleGEcomputational * @@ -399,10 +396,10 @@ $ Y_TAIL, RCOND, ITHRESH, RTHRESH, $ DZ_UB, IGNORE_CWISE, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE, diff -Nru lapack-3.7.0/SRC/dlaisnan.f lapack-3.7.1/SRC/dlaisnan.f --- lapack-3.7.0/SRC/dlaisnan.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dlaisnan.f 2017-06-17 22:46:53.000000000 +0000 @@ -21,7 +21,7 @@ * LOGICAL FUNCTION DLAISNAN( DIN1, DIN2 ) * * .. Scalar Arguments .. -* DOUBLE PRECISION DIN1, DIN2 +* DOUBLE PRECISION, INTENT(IN) :: DIN1, DIN2 * .. * * @@ -67,20 +67,20 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup OTHERauxiliary * * ===================================================================== LOGICAL FUNCTION DLAISNAN( DIN1, DIN2 ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. - DOUBLE PRECISION DIN1, DIN2 + DOUBLE PRECISION, INTENT(IN) :: DIN1, DIN2 * .. * * ===================================================================== diff -Nru lapack-3.7.0/SRC/dlalsa.f lapack-3.7.1/SRC/dlalsa.f --- lapack-3.7.0/SRC/dlalsa.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dlalsa.f 2017-06-17 22:46:53.000000000 +0000 @@ -227,14 +227,12 @@ *> *> \param[out] WORK *> \verbatim -*> WORK is DOUBLE PRECISION array. -*> The dimension must be at least N. +*> WORK is DOUBLE PRECISION array, dimension (N) *> \endverbatim *> *> \param[out] IWORK *> \verbatim -*> IWORK is INTEGER array. -*> The dimension must be at least 3 * N +*> IWORK is INTEGER array, dimension (3*N) *> \endverbatim *> *> \param[out] INFO @@ -252,7 +250,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleOTHERcomputational * @@ -269,10 +267,10 @@ $ GIVCOL, LDGCOL, PERM, GIVNUM, C, S, WORK, $ IWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER ICOMPQ, INFO, LDB, LDBX, LDGCOL, LDU, N, NRHS, diff -Nru lapack-3.7.0/SRC/dlamswlq.f lapack-3.7.1/SRC/dlamswlq.f --- lapack-3.7.0/SRC/dlamswlq.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dlamswlq.f 2017-06-17 22:46:53.000000000 +0000 @@ -49,7 +49,7 @@ *> \param[in] M *> \verbatim *> M is INTEGER -*> The number of rows of the matrix A. M >=0. +*> The number of rows of the matrix C. M >=0. *> \endverbatim *> *> \param[in] N @@ -88,9 +88,11 @@ *> *> \endverbatim *> -*> \param[in,out] A +*> \param[in] A *> \verbatim -*> A is DOUBLE PRECISION array, dimension (LDA,K) +*> A is DOUBLE PRECISION array, dimension +*> (LDA,M) if SIDE = 'L', +*> (LDA,N) if SIDE = 'R' *> The i-th row must contain the vector which defines the blocked *> elementary reflector H(i), for i = 1,2,...,k, as returned by *> DLASWLQ in the first k rows of its array argument A. @@ -200,10 +202,10 @@ SUBROUTINE DLAMSWLQ( SIDE, TRANS, M, N, K, MB, NB, A, LDA, T, $ LDT, C, LDC, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER SIDE, TRANS diff -Nru lapack-3.7.0/SRC/dlamtsqr.f lapack-3.7.1/SRC/dlamtsqr.f --- lapack-3.7.0/SRC/dlamtsqr.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dlamtsqr.f 2017-06-17 22:46:53.000000000 +0000 @@ -81,7 +81,7 @@ *> N >= NB >= 1. *> \endverbatim *> -*> \param[in,out] A +*> \param[in] A *> \verbatim *> A is DOUBLE PRECISION array, dimension (LDA,K) *> The i-th column must contain the vector which defines the @@ -195,10 +195,10 @@ SUBROUTINE DLAMTSQR( SIDE, TRANS, M, N, K, MB, NB, A, LDA, T, $ LDT, C, LDC, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER SIDE, TRANS diff -Nru lapack-3.7.0/SRC/dla_porfsx_extended.f lapack-3.7.1/SRC/dla_porfsx_extended.f --- lapack-3.7.0/SRC/dla_porfsx_extended.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dla_porfsx_extended.f 2017-06-17 22:46:53.000000000 +0000 @@ -153,8 +153,7 @@ *> *> \param[in,out] Y *> \verbatim -*> Y is DOUBLE PRECISION array, dimension -*> (LDY,NRHS) +*> Y is DOUBLE PRECISION array, dimension (LDY,NRHS) *> On entry, the solution matrix X, as computed by DPOTRS. *> On exit, the improved solution matrix Y. *> \endverbatim @@ -186,8 +185,7 @@ *> *> \param[in,out] ERR_BNDS_NORM *> \verbatim -*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension -*> (NRHS, N_ERR_BNDS) +*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS) *> For each right-hand side, this array contains information about *> various error bounds and condition numbers corresponding to the *> normwise relative error, which is defined as follows: @@ -233,8 +231,7 @@ *> *> \param[in,out] ERR_BNDS_COMP *> \verbatim -*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension -*> (NRHS, N_ERR_BNDS) +*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS) *> For each right-hand side, this array contains information about *> various error bounds and condition numbers corresponding to the *> componentwise relative error, which is defined as follows: @@ -377,7 +374,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doublePOcomputational * @@ -390,10 +387,10 @@ $ RTHRESH, DZ_UB, IGNORE_CWISE, $ INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE, diff -Nru lapack-3.7.0/SRC/dlapy2.f lapack-3.7.1/SRC/dlapy2.f --- lapack-3.7.0/SRC/dlapy2.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dlapy2.f 2017-06-17 22:46:53.000000000 +0000 @@ -56,17 +56,17 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup OTHERauxiliary * * ===================================================================== DOUBLE PRECISION FUNCTION DLAPY2( X, Y ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. DOUBLE PRECISION X, Y @@ -82,20 +82,32 @@ * .. * .. Local Scalars .. DOUBLE PRECISION W, XABS, YABS, Z + LOGICAL X_IS_NAN, Y_IS_NAN +* .. +* .. External Functions .. + LOGICAL DISNAN + EXTERNAL DISNAN * .. * .. Intrinsic Functions .. INTRINSIC ABS, MAX, MIN, SQRT * .. * .. Executable Statements .. * - XABS = ABS( X ) - YABS = ABS( Y ) - W = MAX( XABS, YABS ) - Z = MIN( XABS, YABS ) - IF( Z.EQ.ZERO ) THEN - DLAPY2 = W - ELSE - DLAPY2 = W*SQRT( ONE+( Z / W )**2 ) + X_IS_NAN = DISNAN( X ) + Y_IS_NAN = DISNAN( Y ) + IF ( X_IS_NAN ) DLAPY2 = X + IF ( Y_IS_NAN ) DLAPY2 = Y +* + IF ( .NOT.( X_IS_NAN.OR.Y_IS_NAN ) ) THEN + XABS = ABS( X ) + YABS = ABS( Y ) + W = MAX( XABS, YABS ) + Z = MIN( XABS, YABS ) + IF( Z.EQ.ZERO ) THEN + DLAPY2 = W + ELSE + DLAPY2 = W*SQRT( ONE+( Z / W )**2 ) + END IF END IF RETURN * diff -Nru lapack-3.7.0/SRC/dlaqr1.f lapack-3.7.1/SRC/dlaqr1.f --- lapack-3.7.0/SRC/dlaqr1.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dlaqr1.f 2017-06-17 22:46:53.000000000 +0000 @@ -55,19 +55,19 @@ * *> \param[in] N *> \verbatim -*> N is integer +*> N is INTEGER *> Order of the matrix H. N must be either 2 or 3. *> \endverbatim *> *> \param[in] H *> \verbatim -*> H is DOUBLE PRECISION array of dimension (LDH,N) +*> H is DOUBLE PRECISION array, dimension (LDH,N) *> The 2-by-2 or 3-by-3 matrix H in (*). *> \endverbatim *> *> \param[in] LDH *> \verbatim -*> LDH is integer +*> LDH is INTEGER *> The leading dimension of H as declared in *> the calling procedure. LDH.GE.N *> \endverbatim @@ -95,7 +95,7 @@ *> *> \param[out] V *> \verbatim -*> V is DOUBLE PRECISION array of dimension N +*> V is DOUBLE PRECISION array, dimension (N) *> A scalar multiple of the first column of the *> matrix K in (*). *> \endverbatim @@ -108,7 +108,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleOTHERauxiliary * @@ -121,10 +121,10 @@ * ===================================================================== SUBROUTINE DLAQR1( N, H, LDH, SR1, SI1, SR2, SI2, V ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. DOUBLE PRECISION SI1, SI2, SR1, SR2 diff -Nru lapack-3.7.0/SRC/dlaqr2.f lapack-3.7.1/SRC/dlaqr2.f --- lapack-3.7.0/SRC/dlaqr2.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dlaqr2.f 2017-06-17 22:46:53.000000000 +0000 @@ -119,7 +119,7 @@ *> *> \param[in] LDH *> \verbatim -*> LDH is integer +*> LDH is INTEGER *> Leading dimension of H just as declared in the calling *> subroutine. N .LE. LDH *> \endverbatim @@ -147,14 +147,14 @@ *> *> \param[in] LDZ *> \verbatim -*> LDZ is integer +*> LDZ is INTEGER *> The leading dimension of Z just as declared in the *> calling subroutine. 1 .LE. LDZ. *> \endverbatim *> *> \param[out] NS *> \verbatim -*> NS is integer +*> NS is INTEGER *> The number of unconverged (ie approximate) eigenvalues *> returned in SR and SI that may be used as shifts by the *> calling subroutine. @@ -162,7 +162,7 @@ *> *> \param[out] ND *> \verbatim -*> ND is integer +*> ND is INTEGER *> The number of converged eigenvalues uncovered by this *> subroutine. *> \endverbatim @@ -192,14 +192,14 @@ *> *> \param[in] LDV *> \verbatim -*> LDV is integer scalar +*> LDV is INTEGER *> The leading dimension of V just as declared in the *> calling subroutine. NW .LE. LDV *> \endverbatim *> *> \param[in] NH *> \verbatim -*> NH is integer scalar +*> NH is INTEGER *> The number of columns of T. NH.GE.NW. *> \endverbatim *> @@ -210,14 +210,14 @@ *> *> \param[in] LDT *> \verbatim -*> LDT is integer +*> LDT is INTEGER *> The leading dimension of T just as declared in the *> calling subroutine. NW .LE. LDT *> \endverbatim *> *> \param[in] NV *> \verbatim -*> NV is integer +*> NV is INTEGER *> The number of rows of work array WV available for *> workspace. NV.GE.NW. *> \endverbatim @@ -229,7 +229,7 @@ *> *> \param[in] LDWV *> \verbatim -*> LDWV is integer +*> LDWV is INTEGER *> The leading dimension of W just as declared in the *> calling subroutine. NW .LE. LDV *> \endverbatim @@ -243,7 +243,7 @@ *> *> \param[in] LWORK *> \verbatim -*> LWORK is integer +*> LWORK is INTEGER *> The dimension of the work array WORK. LWORK = 2*NW *> suffices, but greater efficiency may result from larger *> values of LWORK. @@ -263,7 +263,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleOTHERauxiliary * @@ -278,10 +278,10 @@ $ IHIZ, Z, LDZ, NS, ND, SR, SI, V, LDV, NH, T, $ LDT, NV, WV, LDWV, WORK, LWORK ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV, diff -Nru lapack-3.7.0/SRC/dlaqr3.f lapack-3.7.1/SRC/dlaqr3.f --- lapack-3.7.0/SRC/dlaqr3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dlaqr3.f 2017-06-17 22:46:53.000000000 +0000 @@ -116,7 +116,7 @@ *> *> \param[in] LDH *> \verbatim -*> LDH is integer +*> LDH is INTEGER *> Leading dimension of H just as declared in the calling *> subroutine. N .LE. LDH *> \endverbatim @@ -144,14 +144,14 @@ *> *> \param[in] LDZ *> \verbatim -*> LDZ is integer +*> LDZ is INTEGER *> The leading dimension of Z just as declared in the *> calling subroutine. 1 .LE. LDZ. *> \endverbatim *> *> \param[out] NS *> \verbatim -*> NS is integer +*> NS is INTEGER *> The number of unconverged (ie approximate) eigenvalues *> returned in SR and SI that may be used as shifts by the *> calling subroutine. @@ -159,7 +159,7 @@ *> *> \param[out] ND *> \verbatim -*> ND is integer +*> ND is INTEGER *> The number of converged eigenvalues uncovered by this *> subroutine. *> \endverbatim @@ -189,14 +189,14 @@ *> *> \param[in] LDV *> \verbatim -*> LDV is integer scalar +*> LDV is INTEGER *> The leading dimension of V just as declared in the *> calling subroutine. NW .LE. LDV *> \endverbatim *> *> \param[in] NH *> \verbatim -*> NH is integer scalar +*> NH is INTEGER *> The number of columns of T. NH.GE.NW. *> \endverbatim *> @@ -207,14 +207,14 @@ *> *> \param[in] LDT *> \verbatim -*> LDT is integer +*> LDT is INTEGER *> The leading dimension of T just as declared in the *> calling subroutine. NW .LE. LDT *> \endverbatim *> *> \param[in] NV *> \verbatim -*> NV is integer +*> NV is INTEGER *> The number of rows of work array WV available for *> workspace. NV.GE.NW. *> \endverbatim @@ -226,7 +226,7 @@ *> *> \param[in] LDWV *> \verbatim -*> LDWV is integer +*> LDWV is INTEGER *> The leading dimension of W just as declared in the *> calling subroutine. NW .LE. LDV *> \endverbatim @@ -240,7 +240,7 @@ *> *> \param[in] LWORK *> \verbatim -*> LWORK is integer +*> LWORK is INTEGER *> The dimension of the work array WORK. LWORK = 2*NW *> suffices, but greater efficiency may result from larger *> values of LWORK. @@ -275,7 +275,7 @@ $ IHIZ, Z, LDZ, NS, ND, SR, SI, V, LDV, NH, T, $ LDT, NV, WV, LDWV, WORK, LWORK ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 diff -Nru lapack-3.7.0/SRC/dlaqr5.f lapack-3.7.1/SRC/dlaqr5.f --- lapack-3.7.0/SRC/dlaqr5.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dlaqr5.f 2017-06-17 22:46:53.000000000 +0000 @@ -48,21 +48,21 @@ * *> \param[in] WANTT *> \verbatim -*> WANTT is logical scalar +*> WANTT is LOGICAL *> WANTT = .true. if the quasi-triangular Schur factor *> is being computed. WANTT is set to .false. otherwise. *> \endverbatim *> *> \param[in] WANTZ *> \verbatim -*> WANTZ is logical scalar +*> WANTZ is LOGICAL *> WANTZ = .true. if the orthogonal Schur factor is being *> computed. WANTZ is set to .false. otherwise. *> \endverbatim *> *> \param[in] KACC22 *> \verbatim -*> KACC22 is integer with value 0, 1, or 2. +*> KACC22 is INTEGER with value 0, 1, or 2. *> Specifies the computation mode of far-from-diagonal *> orthogonal updates. *> = 0: DLAQR5 does not accumulate reflections and does not @@ -78,19 +78,19 @@ *> *> \param[in] N *> \verbatim -*> N is integer scalar +*> N is INTEGER *> N is the order of the Hessenberg matrix H upon which this *> subroutine operates. *> \endverbatim *> *> \param[in] KTOP *> \verbatim -*> KTOP is integer scalar +*> KTOP is INTEGER *> \endverbatim *> *> \param[in] KBOT *> \verbatim -*> KBOT is integer scalar +*> KBOT is INTEGER *> These are the first and last rows and columns of an *> isolated diagonal block upon which the QR sweep is to be *> applied. It is assumed without a check that @@ -101,19 +101,19 @@ *> *> \param[in] NSHFTS *> \verbatim -*> NSHFTS is integer scalar +*> NSHFTS is INTEGER *> NSHFTS gives the number of simultaneous shifts. NSHFTS *> must be positive and even. *> \endverbatim *> *> \param[in,out] SR *> \verbatim -*> SR is DOUBLE PRECISION array of size (NSHFTS) +*> SR is DOUBLE PRECISION array, dimension (NSHFTS) *> \endverbatim *> *> \param[in,out] SI *> \verbatim -*> SI is DOUBLE PRECISION array of size (NSHFTS) +*> SI is DOUBLE PRECISION array, dimension (NSHFTS) *> SR contains the real parts and SI contains the imaginary *> parts of the NSHFTS shifts of origin that define the *> multi-shift QR sweep. On output SR and SI may be @@ -122,7 +122,7 @@ *> *> \param[in,out] H *> \verbatim -*> H is DOUBLE PRECISION array of size (LDH,N) +*> H is DOUBLE PRECISION array, dimension (LDH,N) *> On input H contains a Hessenberg matrix. On output a *> multi-shift QR sweep with shifts SR(J)+i*SI(J) is applied *> to the isolated diagonal block in rows and columns KTOP @@ -131,7 +131,7 @@ *> *> \param[in] LDH *> \verbatim -*> LDH is integer scalar +*> LDH is INTEGER *> LDH is the leading dimension of H just as declared in the *> calling procedure. LDH.GE.MAX(1,N). *> \endverbatim @@ -150,7 +150,7 @@ *> *> \param[in,out] Z *> \verbatim -*> Z is DOUBLE PRECISION array of size (LDZ,IHIZ) +*> Z is DOUBLE PRECISION array, dimension (LDZ,IHIZ) *> If WANTZ = .TRUE., then the QR Sweep orthogonal *> similarity transformation is accumulated into *> Z(ILOZ:IHIZ,ILOZ:IHIZ) from the right. @@ -159,71 +159,69 @@ *> *> \param[in] LDZ *> \verbatim -*> LDZ is integer scalar +*> LDZ is INTEGER *> LDA is the leading dimension of Z just as declared in *> the calling procedure. LDZ.GE.N. *> \endverbatim *> *> \param[out] V *> \verbatim -*> V is DOUBLE PRECISION array of size (LDV,NSHFTS/2) +*> V is DOUBLE PRECISION array, dimension (LDV,NSHFTS/2) *> \endverbatim *> *> \param[in] LDV *> \verbatim -*> LDV is integer scalar +*> LDV is INTEGER *> LDV is the leading dimension of V as declared in the *> calling procedure. LDV.GE.3. *> \endverbatim *> *> \param[out] U *> \verbatim -*> U is DOUBLE PRECISION array of size -*> (LDU,3*NSHFTS-3) +*> U is DOUBLE PRECISION array, dimension (LDU,3*NSHFTS-3) *> \endverbatim *> *> \param[in] LDU *> \verbatim -*> LDU is integer scalar +*> LDU is INTEGER *> LDU is the leading dimension of U just as declared in the *> in the calling subroutine. LDU.GE.3*NSHFTS-3. *> \endverbatim *> *> \param[in] NH *> \verbatim -*> NH is integer scalar +*> NH is INTEGER *> NH is the number of columns in array WH available for *> workspace. NH.GE.1. *> \endverbatim *> *> \param[out] WH *> \verbatim -*> WH is DOUBLE PRECISION array of size (LDWH,NH) +*> WH is DOUBLE PRECISION array, dimension (LDWH,NH) *> \endverbatim *> *> \param[in] LDWH *> \verbatim -*> LDWH is integer scalar +*> LDWH is INTEGER *> Leading dimension of WH just as declared in the *> calling procedure. LDWH.GE.3*NSHFTS-3. *> \endverbatim *> *> \param[in] NV *> \verbatim -*> NV is integer scalar +*> NV is INTEGER *> NV is the number of rows in WV agailable for workspace. *> NV.GE.1. *> \endverbatim *> *> \param[out] WV *> \verbatim -*> WV is DOUBLE PRECISION array of size -*> (LDWV,3*NSHFTS-3) +*> WV is DOUBLE PRECISION array, dimension (LDWV,3*NSHFTS-3) *> \endverbatim *> *> \param[in] LDWV *> \verbatim -*> LDWV is integer scalar +*> LDWV is INTEGER *> LDWV is the leading dimension of WV as declared in the *> in the calling subroutine. LDWV.GE.NV. *> \endverbatim @@ -259,7 +257,7 @@ $ SR, SI, H, LDH, ILOZ, IHIZ, Z, LDZ, V, LDV, U, $ LDU, NV, WV, LDWV, NH, WH, LDWH ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 diff -Nru lapack-3.7.0/SRC/dlarra.f lapack-3.7.1/SRC/dlarra.f --- lapack-3.7.0/SRC/dlarra.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dlarra.f 2017-06-17 22:46:53.000000000 +0000 @@ -119,7 +119,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup OTHERauxiliary * @@ -136,10 +136,10 @@ SUBROUTINE DLARRA( N, D, E, E2, SPLTOL, TNRM, $ NSPLIT, ISPLIT, INFO ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, N, NSPLIT @@ -167,7 +167,13 @@ * .. Executable Statements .. * INFO = 0 - +* +* Quick return if possible +* + IF( N.LE.0 ) THEN + RETURN + END IF +* * Compute splitting points NSPLIT = 1 IF(SPLTOL.LT.ZERO) THEN diff -Nru lapack-3.7.0/SRC/dlarrb.f lapack-3.7.1/SRC/dlarrb.f --- lapack-3.7.0/SRC/dlarrb.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dlarrb.f 2017-06-17 22:46:53.000000000 +0000 @@ -107,7 +107,7 @@ *> \verbatim *> W is DOUBLE PRECISION array, dimension (N) *> On input, W( IFIRST-OFFSET ) through W( ILAST-OFFSET ) are -*> estimates of the eigenvalues of L D L^T indexed IFIRST throug +*> estimates of the eigenvalues of L D L^T indexed IFIRST through *> ILAST. *> On output, these estimates are refined. *> \endverbatim @@ -178,7 +178,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup OTHERauxiliary * @@ -196,10 +196,10 @@ $ RTOL2, OFFSET, W, WGAP, WERR, WORK, IWORK, $ PIVMIN, SPDIAM, TWIST, INFO ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER IFIRST, ILAST, INFO, N, OFFSET, TWIST @@ -237,6 +237,12 @@ * INFO = 0 * +* Quick return if possible +* + IF( N.LE.0 ) THEN + RETURN + END IF +* MAXITR = INT( ( LOG( SPDIAM+PIVMIN )-LOG( PIVMIN ) ) / $ LOG( TWO ) ) + 2 MNWDTH = TWO * PIVMIN diff -Nru lapack-3.7.0/SRC/dlarrc.f lapack-3.7.1/SRC/dlarrc.f --- lapack-3.7.0/SRC/dlarrc.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dlarrc.f 2017-06-17 22:46:53.000000000 +0000 @@ -137,7 +137,7 @@ SUBROUTINE DLARRC( JOBT, N, VL, VU, D, E, PIVMIN, $ EIGCNT, LCNT, RCNT, INFO ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 @@ -170,6 +170,13 @@ * .. Executable Statements .. * INFO = 0 +* +* Quick return if possible +* + IF( N.LE.0 ) THEN + RETURN + END IF +* LCNT = 0 RCNT = 0 EIGCNT = 0 diff -Nru lapack-3.7.0/SRC/dlarrd.f lapack-3.7.1/SRC/dlarrd.f --- lapack-3.7.0/SRC/dlarrd.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dlarrd.f 2017-06-17 22:46:53.000000000 +0000 @@ -329,7 +329,7 @@ $ M, W, WERR, WL, WU, IBLOCK, INDEXW, $ WORK, IWORK, INFO ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 @@ -385,6 +385,12 @@ * INFO = 0 * +* Quick return if possible +* + IF( N.LE.0 ) THEN + RETURN + END IF +* * Decode RANGE * IF( LSAME( RANGE, 'A' ) ) THEN diff -Nru lapack-3.7.0/SRC/dlarre.f lapack-3.7.1/SRC/dlarre.f --- lapack-3.7.0/SRC/dlarre.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dlarre.f 2017-06-17 22:46:53.000000000 +0000 @@ -305,7 +305,7 @@ $ W, WERR, WGAP, IBLOCK, INDEXW, GERS, PIVMIN, $ WORK, IWORK, INFO ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 @@ -370,7 +370,12 @@ * INFO = 0 - +* +* Quick return if possible +* + IF( N.LE.0 ) THEN + RETURN + END IF * * Decode RANGE * diff -Nru lapack-3.7.0/SRC/dlarrf.f lapack-3.7.1/SRC/dlarrf.f --- lapack-3.7.0/SRC/dlarrf.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dlarrf.f 2017-06-17 22:46:53.000000000 +0000 @@ -193,7 +193,7 @@ $ SPDIAM, CLGAPL, CLGAPR, PIVMIN, SIGMA, $ DPLUS, LPLUS, WORK, INFO ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 @@ -239,6 +239,13 @@ * .. Executable Statements .. * INFO = 0 +* +* Quick return if possible +* + IF( N.LE.0 ) THEN + RETURN + END IF +* FACT = DBLE(2**KTRYMAX) EPS = DLAMCH( 'Precision' ) SHIFT = 0 diff -Nru lapack-3.7.0/SRC/dlarrj.f lapack-3.7.1/SRC/dlarrj.f --- lapack-3.7.0/SRC/dlarrj.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dlarrj.f 2017-06-17 22:46:53.000000000 +0000 @@ -150,7 +150,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup OTHERauxiliary * @@ -168,10 +168,10 @@ $ RTOL, OFFSET, W, WERR, WORK, IWORK, $ PIVMIN, SPDIAM, INFO ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER IFIRST, ILAST, INFO, N, OFFSET @@ -204,6 +204,12 @@ * INFO = 0 * +* Quick return if possible +* + IF( N.LE.0 ) THEN + RETURN + END IF +* MAXITR = INT( ( LOG( SPDIAM+PIVMIN )-LOG( PIVMIN ) ) / $ LOG( TWO ) ) + 2 * diff -Nru lapack-3.7.0/SRC/dlarrk.f lapack-3.7.1/SRC/dlarrk.f --- lapack-3.7.0/SRC/dlarrk.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dlarrk.f 2017-06-17 22:46:53.000000000 +0000 @@ -137,7 +137,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup OTHERauxiliary * @@ -145,10 +145,10 @@ SUBROUTINE DLARRK( N, IW, GL, GU, $ D, E2, PIVMIN, RELTOL, W, WERR, INFO) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, IW, N @@ -179,6 +179,13 @@ * .. * .. Executable Statements .. * +* Quick return if possible +* + IF( N.LE.0 ) THEN + INFO = 0 + RETURN + END IF +* * Get machine constants EPS = DLAMCH( 'P' ) diff -Nru lapack-3.7.0/SRC/dlarrr.f lapack-3.7.1/SRC/dlarrr.f --- lapack-3.7.0/SRC/dlarrr.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dlarrr.f 2017-06-17 22:46:53.000000000 +0000 @@ -78,7 +78,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup OTHERauxiliary * @@ -94,10 +94,10 @@ * ===================================================================== SUBROUTINE DLARRR( N, D, E, INFO ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER N, INFO @@ -130,6 +130,13 @@ * .. * .. Executable Statements .. * +* Quick return if possible +* + IF( N.LE.0 ) THEN + INFO = 0 + RETURN + END IF +* * As a default, do NOT go for relative-accuracy preserving computations. INFO = 1 diff -Nru lapack-3.7.0/SRC/dlarrv.f lapack-3.7.1/SRC/dlarrv.f --- lapack-3.7.0/SRC/dlarrv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dlarrv.f 2017-06-17 22:46:53.000000000 +0000 @@ -68,8 +68,14 @@ *> \verbatim *> VU is DOUBLE PRECISION *> Upper bound of the interval that contains the desired -*> eigenvalues. VL < VU. Needed to compute gaps on the left or right -*> end of the extremal eigenvalues in the desired RANGE. +*> eigenvalues. VL < VU. +*> Note: VU is currently not used by this implmentation of DLARRV, VU is +*> passed to DLARRV because it could be used compute gaps on the right end +*> of the extremal eigenvalues. However, with not much initial accuracy in +*> LAMBDA and VU, the formula can lead to an overestimation of the right gap +*> and thus to inadequately early RQI 'convergence'. This is currently +*> prevented this by forcing a small right gap. And so it turns out that VU +*> is currently not used by this implementation of DLARRV. *> \endverbatim *> *> \param[in,out] D @@ -286,7 +292,7 @@ $ IBLOCK, INDEXW, GERS, Z, LDZ, ISUPPZ, $ WORK, IWORK, INFO ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 @@ -344,6 +350,13 @@ * .. INFO = 0 +* +* Quick return if possible +* + IF( N.LE.0 ) THEN + RETURN + END IF +* * The first N entries of WORK are reserved for the eigenvalues INDLD = N+1 INDLLD= 2*N+1 diff -Nru lapack-3.7.0/SRC/dlasd0.f lapack-3.7.1/SRC/dlasd0.f --- lapack-3.7.0/SRC/dlasd0.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dlasd0.f 2017-06-17 22:46:53.000000000 +0000 @@ -81,7 +81,7 @@ *> *> \param[out] U *> \verbatim -*> U is DOUBLE PRECISION array, dimension at least (LDQ, N) +*> U is DOUBLE PRECISION array, dimension (LDU, N) *> On exit, U contains the left singular vectors. *> \endverbatim *> @@ -93,7 +93,7 @@ *> *> \param[out] VT *> \verbatim -*> VT is DOUBLE PRECISION array, dimension at least (LDVT, M) +*> VT is DOUBLE PRECISION array, dimension (LDVT, M) *> On exit, VT**T contains the right singular vectors. *> \endverbatim *> @@ -112,14 +112,12 @@ *> *> \param[out] IWORK *> \verbatim -*> IWORK is INTEGER work array. -*> Dimension must be at least (8 * N) +*> IWORK is INTEGER array, dimension (8*N) *> \endverbatim *> *> \param[out] WORK *> \verbatim -*> WORK is DOUBLE PRECISION work array. -*> Dimension must be at least (3 * M**2 + 2 * M) +*> WORK is DOUBLE PRECISION array, dimension (3*M**2+2*M) *> \endverbatim *> *> \param[out] INFO @@ -138,7 +136,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup OTHERauxiliary * @@ -152,10 +150,10 @@ SUBROUTINE DLASD0( N, SQRE, D, E, U, LDU, VT, LDVT, SMLSIZ, IWORK, $ WORK, INFO ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDU, LDVT, N, SMLSIZ, SQRE diff -Nru lapack-3.7.0/SRC/dlasd2.f lapack-3.7.1/SRC/dlasd2.f --- lapack-3.7.0/SRC/dlasd2.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dlasd2.f 2017-06-17 22:46:53.000000000 +0000 @@ -190,7 +190,7 @@ *> *> \param[out] IDXP *> \verbatim -*> IDXP is INTEGER array dimension(N) +*> IDXP is INTEGER array, dimension(N) *> This will contain the permutation used to place deflated *> values of D at the end of the array. On output IDXP(2:K) *> points to the nondeflated D-values and IDXP(K+1:N) @@ -199,14 +199,14 @@ *> *> \param[out] IDX *> \verbatim -*> IDX is INTEGER array dimension(N) +*> IDX is INTEGER array, dimension(N) *> This will contain the permutation used to sort the contents of *> D into ascending order. *> \endverbatim *> *> \param[out] IDXC *> \verbatim -*> IDXC is INTEGER array dimension(N) +*> IDXC is INTEGER array, dimension(N) *> This will contain the permutation used to arrange the columns *> of the deflated U matrix into three groups: the first group *> contains non-zero entries only at and above NL, the second @@ -216,7 +216,7 @@ *> *> \param[in,out] IDXQ *> \verbatim -*> IDXQ is INTEGER array dimension(N) +*> IDXQ is INTEGER array, dimension(N) *> This contains the permutation which separately sorts the two *> sub-problems in D into ascending order. Note that entries in *> the first hlaf of this permutation must first be moved one @@ -226,7 +226,7 @@ *> *> \param[out] COLTYP *> \verbatim -*> COLTYP is INTEGER array dimension(N) +*> COLTYP is INTEGER array, dimension(N) *> As workspace, this will contain a label which will indicate *> which of the following types a column in the U2 matrix or a *> row in the VT2 matrix is: @@ -254,7 +254,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup OTHERauxiliary * @@ -269,10 +269,10 @@ $ LDVT, DSIGMA, U2, LDU2, VT2, LDVT2, IDXP, IDX, $ IDXC, IDXQ, COLTYP, INFO ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, K, LDU, LDU2, LDVT, LDVT2, NL, NR, SQRE diff -Nru lapack-3.7.0/SRC/dlasd3.f lapack-3.7.1/SRC/dlasd3.f --- lapack-3.7.0/SRC/dlasd3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dlasd3.f 2017-06-17 22:46:53.000000000 +0000 @@ -94,8 +94,7 @@ *> *> \param[out] Q *> \verbatim -*> Q is DOUBLE PRECISION array, -*> dimension at least (LDQ,K). +*> Q is DOUBLE PRECISION array, dimension (LDQ,K) *> \endverbatim *> *> \param[in] LDQ @@ -104,7 +103,7 @@ *> The leading dimension of the array Q. LDQ >= K. *> \endverbatim *> -*> \param[in] DSIGMA +*> \param[in,out] DSIGMA *> \verbatim *> DSIGMA is DOUBLE PRECISION array, dimension(K) *> The first K elements of this array contain the old roots @@ -125,7 +124,7 @@ *> The leading dimension of the array U. LDU >= N. *> \endverbatim *> -*> \param[in,out] U2 +*> \param[in] U2 *> \verbatim *> U2 is DOUBLE PRECISION array, dimension (LDU2, N) *> The first K columns of this matrix contain the non-deflated @@ -187,7 +186,7 @@ *> type is any column which has been deflated. *> \endverbatim *> -*> \param[in] Z +*> \param[in,out] Z *> \verbatim *> Z is DOUBLE PRECISION array, dimension (K) *> The first K elements of this array contain the components @@ -210,7 +209,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup OTHERauxiliary * @@ -225,10 +224,10 @@ $ LDU2, VT, LDVT, VT2, LDVT2, IDXC, CTOT, Z, $ INFO ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, K, LDQ, LDU, LDU2, LDVT, LDVT2, NL, NR, diff -Nru lapack-3.7.0/SRC/dlasd8.f lapack-3.7.1/SRC/dlasd8.f --- lapack-3.7.0/SRC/dlasd8.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dlasd8.f 2017-06-17 22:46:53.000000000 +0000 @@ -133,7 +133,7 @@ *> *> \param[out] WORK *> \verbatim -*> WORK is DOUBLE PRECISION array, dimension at least 3 * K +*> WORK is DOUBLE PRECISION array, dimension (3*K) *> \endverbatim *> *> \param[out] INFO @@ -152,7 +152,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup OTHERauxiliary * @@ -166,10 +166,10 @@ SUBROUTINE DLASD8( ICOMPQ, K, D, Z, VF, VL, DIFL, DIFR, LDDIFR, $ DSIGMA, WORK, INFO ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER ICOMPQ, INFO, K, LDDIFR diff -Nru lapack-3.7.0/SRC/dlasda.f lapack-3.7.1/SRC/dlasda.f --- lapack-3.7.0/SRC/dlasda.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dlasda.f 2017-06-17 22:46:53.000000000 +0000 @@ -239,8 +239,7 @@ *> *> \param[out] IWORK *> \verbatim -*> IWORK is INTEGER array. -*> Dimension must be at least (7 * N). +*> IWORK is INTEGER array, dimension (7*N) *> \endverbatim *> *> \param[out] INFO @@ -259,7 +258,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup OTHERauxiliary * @@ -274,10 +273,10 @@ $ DIFL, DIFR, Z, POLES, GIVPTR, GIVCOL, LDGCOL, $ PERM, GIVNUM, C, S, WORK, IWORK, INFO ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER ICOMPQ, INFO, LDGCOL, LDU, N, SMLSIZ, SQRE diff -Nru lapack-3.7.0/SRC/dlasq4.f lapack-3.7.1/SRC/dlasq4.f --- lapack-3.7.0/SRC/dlasq4.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dlasq4.f 2017-06-17 22:46:53.000000000 +0000 @@ -151,7 +151,7 @@ SUBROUTINE DLASQ4( I0, N0, Z, PP, N0IN, DMIN, DMIN1, DMIN2, DN, $ DN1, DN2, TAU, TTYPE, G ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 @@ -240,7 +240,6 @@ NP = NN - 9 ELSE NP = NN - 2*PP - B2 = Z( NP-2 ) GAM = DN1 IF( Z( NP-4 ) .GT. Z( NP-2 ) ) $ RETURN diff -Nru lapack-3.7.0/SRC/dlasq5.f lapack-3.7.1/SRC/dlasq5.f --- lapack-3.7.0/SRC/dlasq5.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dlasq5.f 2017-06-17 22:46:53.000000000 +0000 @@ -121,7 +121,7 @@ *> IEEE is LOGICAL *> Flag for IEEE or non IEEE arithmetic. *> \endverbatim -* +*> *> \param[in] EPS *> \verbatim *> EPS is DOUBLE PRECISION @@ -136,7 +136,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup auxOTHERcomputational * @@ -144,10 +144,10 @@ SUBROUTINE DLASQ5( I0, N0, Z, PP, TAU, SIGMA, DMIN, DMIN1, DMIN2, $ DN, DNM1, DNM2, IEEE, EPS ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. LOGICAL IEEE diff -Nru lapack-3.7.0/SRC/dlaswlq.f lapack-3.7.1/SRC/dlaswlq.f --- lapack-3.7.0/SRC/dlaswlq.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dlaswlq.f 2017-06-17 22:46:53.000000000 +0000 @@ -55,7 +55,7 @@ *> \verbatim *> A is DOUBLE PRECISION array, dimension (LDA,N) *> On entry, the M-by-N matrix A. -*> On exit, the elements on and bleow the diagonal +*> On exit, the elements on and below the diagonal *> of the array contain the N-by-N lower triangular matrix L; *> the elements above the diagonal represent Q by the rows *> of blocked V (see Further Details). @@ -150,10 +150,10 @@ SUBROUTINE DLASWLQ( M, N, MB, NB, A, LDA, T, LDT, WORK, LWORK, $ INFO) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd. -- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, M, N, MB, NB, LWORK, LDT diff -Nru lapack-3.7.0/SRC/dlaswp.f lapack-3.7.1/SRC/dlaswp.f --- lapack-3.7.0/SRC/dlaswp.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dlaswp.f 2017-06-17 22:46:53.000000000 +0000 @@ -79,14 +79,15 @@ *> \verbatim *> IPIV is INTEGER array, dimension (K1+(K2-K1)*abs(INCX)) *> The vector of pivot indices. Only the elements in positions -*> K1 through K1+(K2-K1)*INCX of IPIV are accessed. -*> IPIV(K) = L implies rows K and L are to be interchanged. +*> K1 through K1+(K2-K1)*abs(INCX) of IPIV are accessed. +*> IPIV(K1+(K-K1)*abs(INCX)) = L implies rows K and L are to be +*> interchanged. *> \endverbatim *> *> \param[in] INCX *> \verbatim *> INCX is INTEGER -*> The increment between successive values of IPIV. If IPIV +*> The increment between successive values of IPIV. If INCX *> is negative, the pivots are applied in reverse order. *> \endverbatim * @@ -98,7 +99,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleOTHERauxiliary * @@ -114,10 +115,10 @@ * ===================================================================== SUBROUTINE DLASWP( N, A, LDA, K1, K2, IPIV, INCX ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INCX, K1, K2, LDA, N @@ -135,7 +136,8 @@ * .. * .. Executable Statements .. * -* Interchange row I with row IPIV(I) for each of rows K1 through K2. +* Interchange row I with row IPIV(K1+(I-K1)*abs(INCX)) for each of rows +* K1 through K2. * IF( INCX.GT.0 ) THEN IX0 = K1 diff -Nru lapack-3.7.0/SRC/dla_syamv.f lapack-3.7.1/SRC/dla_syamv.f --- lapack-3.7.0/SRC/dla_syamv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dla_syamv.f 2017-06-17 22:46:53.000000000 +0000 @@ -88,7 +88,7 @@ *> *> \param[in] A *> \verbatim -*> A is DOUBLE PRECISION array of DIMENSION ( LDA, n ). +*> A is DOUBLE PRECISION array, dimension ( LDA, n ). *> Before entry, the leading m by n part of the array A must *> contain the matrix of coefficients. *> Unchanged on exit. @@ -153,7 +153,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleSYcomputational * @@ -177,10 +177,10 @@ SUBROUTINE DLA_SYAMV( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y, $ INCY ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. DOUBLE PRECISION ALPHA, BETA diff -Nru lapack-3.7.0/SRC/dlasyf_aa.f lapack-3.7.1/SRC/dlasyf_aa.f --- lapack-3.7.0/SRC/dlasyf_aa.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dlasyf_aa.f 2017-06-17 22:46:53.000000000 +0000 @@ -19,11 +19,11 @@ * =========== * * SUBROUTINE DLASYF_AA( UPLO, J1, M, NB, A, LDA, IPIV, -* H, LDH, WORK, INFO ) +* H, LDH, WORK ) * * .. Scalar Arguments .. * CHARACTER UPLO -* INTEGER J1, M, NB, LDA, LDH, INFO +* INTEGER J1, M, NB, LDA, LDH * .. * .. Array Arguments .. * INTEGER IPIV( * ) @@ -99,12 +99,12 @@ *> \param[in] LDA *> \verbatim *> LDA is INTEGER -*> The leading dimension of the array A. LDA >= max(1,N). +*> The leading dimension of the array A. LDA >= max(1,M). *> \endverbatim *> *> \param[out] IPIV *> \verbatim -*> IPIV is INTEGER array, dimension (N) +*> IPIV is INTEGER array, dimension (M) *> Details of the row and column interchanges, *> the row and column k were interchanged with the row and *> column IPIV(k). @@ -127,16 +127,6 @@ *> WORK is DOUBLE PRECISION workspace, dimension (M). *> \endverbatim *> -*> \param[out] INFO -*> \verbatim -*> INFO is INTEGER -*> = 0: successful exit -*> < 0: if INFO = -i, the i-th argument had an illegal value -*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization -*> has been completed, but the block diagonal matrix D is -*> exactly singular, and division by zero will occur if it -*> is used to solve a system of equations. -*> \endverbatim * * Authors: * ======== @@ -146,24 +136,24 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleSYcomputational * * ===================================================================== SUBROUTINE DLASYF_AA( UPLO, J1, M, NB, A, LDA, IPIV, - $ H, LDH, WORK, INFO ) + $ H, LDH, WORK ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * IMPLICIT NONE * * .. Scalar Arguments .. CHARACTER UPLO - INTEGER M, NB, J1, LDA, LDH, INFO + INTEGER M, NB, J1, LDA, LDH * .. * .. Array Arguments .. INTEGER IPIV( * ) @@ -192,7 +182,6 @@ * .. * .. Executable Statements .. * - INFO = 0 J = 1 * * K1 is the first column of the panel to be factorized @@ -217,8 +206,8 @@ * K = J1+J-1 * -* H(J:N, J) := A(J, J:N) - H(J:N, 1:(J-1)) * L(J1:(J-1), J), -* where H(J:N, J) has been initialized to be A(J, J:N) +* H(J:M, J) := A(J, J:M) - H(J:M, 1:(J-1)) * L(J1:(J-1), J), +* where H(J:M, J) has been initialized to be A(J, J:M) * IF( K.GT.2 ) THEN * @@ -234,14 +223,14 @@ $ ONE, H( J, J ), 1 ) END IF * -* Copy H(i:n, i) into WORK +* Copy H(i:M, i) into WORK * CALL DCOPY( M-J+1, H( J, J ), 1, WORK( 1 ), 1 ) * IF( J.GT.K1 ) THEN * -* Compute WORK := WORK - L(J-1, J:N) * T(J-1,J), -* where A(J-1, J) stores T(J-1, J) and A(J-2, J:N) stores U(J-1, J:N) +* Compute WORK := WORK - L(J-1, J:M) * T(J-1,J), +* where A(J-1, J) stores T(J-1, J) and A(J-2, J:M) stores U(J-1, J:M) * ALPHA = -A( K-1, J ) CALL DAXPY( M-J+1, ALPHA, A( K-2, J ), LDA, WORK( 1 ), 1 ) @@ -253,8 +242,8 @@ * IF( J.LT.M ) THEN * -* Compute WORK(2:N) = T(J, J) L(J, (J+1):N) -* where A(J, J) stores T(J, J) and A(J-1, (J+1):N) stores U(J, (J+1):N) +* Compute WORK(2:M) = T(J, J) L(J, (J+1):M) +* where A(J, J) stores T(J, J) and A(J-1, (J+1):M) stores U(J, (J+1):M) * IF( K.GT.1 ) THEN ALPHA = -A( K, J ) @@ -262,7 +251,7 @@ $ WORK( 2 ), 1 ) ENDIF * -* Find max(|WORK(2:n)|) +* Find max(|WORK(2:M)|) * I2 = IDAMAX( M-J, WORK( 2 ), 1 ) + 1 PIV = WORK( I2 ) @@ -277,14 +266,14 @@ WORK( I2 ) = WORK( I1 ) WORK( I1 ) = PIV * -* Swap A(I1, I1+1:N) with A(I1+1:N, I2) +* Swap A(I1, I1+1:M) with A(I1+1:M, I2) * I1 = I1+J-1 I2 = I2+J-1 CALL DSWAP( I2-I1-1, A( J1+I1-1, I1+1 ), LDA, $ A( J1+I1, I2 ), 1 ) * -* Swap A(I1, I2+1:N) with A(I2, I2+1:N) +* Swap A(I1, I2+1:M) with A(I2, I2+1:M) * CALL DSWAP( M-I2, A( J1+I1-1, I2+1 ), LDA, $ A( J1+I2-1, I2+1 ), LDA ) @@ -315,23 +304,17 @@ * Set A(J, J+1) = T(J, J+1) * A( K, J+1 ) = WORK( 2 ) - IF( (A( K, J ).EQ.ZERO ) .AND. - $ ( (J.EQ.M) .OR. (A( K, J+1 ).EQ.ZERO))) THEN - IF(INFO .EQ. 0) THEN - INFO = J - ENDIF - END IF * IF( J.LT.NB ) THEN * -* Copy A(J+1:N, J+1) into H(J:N, J), +* Copy A(J+1:M, J+1) into H(J:M, J), * CALL DCOPY( M-J, A( K+1, J+1 ), LDA, $ H( J+1, J+1 ), 1 ) END IF * -* Compute L(J+2, J+1) = WORK( 3:N ) / T(J, J+1), -* where A(J, J+1) = T(J, J+1) and A(J+2:N, J) = L(J+2:N, J+1) +* Compute L(J+2, J+1) = WORK( 3:M ) / T(J, J+1), +* where A(J, J+1) = T(J, J+1) and A(J+2:M, J) = L(J+2:M, J+1) * IF( A( K, J+1 ).NE.ZERO ) THEN ALPHA = ONE / A( K, J+1 ) @@ -341,10 +324,6 @@ CALL DLASET( 'Full', 1, M-J-1, ZERO, ZERO, $ A( K, J+2 ), LDA) END IF - ELSE - IF( (A( K, J ).EQ.ZERO) .AND. (INFO.EQ.0) ) THEN - INFO = J - END IF END IF J = J + 1 GO TO 10 @@ -367,8 +346,8 @@ * K = J1+J-1 * -* H(J:N, J) := A(J:N, J) - H(J:N, 1:(J-1)) * L(J, J1:(J-1))^T, -* where H(J:N, J) has been initialized to be A(J:N, J) +* H(J:M, J) := A(J:M, J) - H(J:M, 1:(J-1)) * L(J, J1:(J-1))^T, +* where H(J:M, J) has been initialized to be A(J:M, J) * IF( K.GT.2 ) THEN * @@ -384,13 +363,13 @@ $ ONE, H( J, J ), 1 ) END IF * -* Copy H(J:N, J) into WORK +* Copy H(J:M, J) into WORK * CALL DCOPY( M-J+1, H( J, J ), 1, WORK( 1 ), 1 ) * IF( J.GT.K1 ) THEN * -* Compute WORK := WORK - L(J:N, J-1) * T(J-1,J), +* Compute WORK := WORK - L(J:M, J-1) * T(J-1,J), * where A(J-1, J) = T(J-1, J) and A(J, J-2) = L(J, J-1) * ALPHA = -A( J, K-1 ) @@ -403,8 +382,8 @@ * IF( J.LT.M ) THEN * -* Compute WORK(2:N) = T(J, J) L((J+1):N, J) -* where A(J, J) = T(J, J) and A((J+1):N, J-1) = L((J+1):N, J) +* Compute WORK(2:M) = T(J, J) L((J+1):M, J) +* where A(J, J) = T(J, J) and A((J+1):M, J-1) = L((J+1):M, J) * IF( K.GT.1 ) THEN ALPHA = -A( J, K ) @@ -412,7 +391,7 @@ $ WORK( 2 ), 1 ) ENDIF * -* Find max(|WORK(2:n)|) +* Find max(|WORK(2:M)|) * I2 = IDAMAX( M-J, WORK( 2 ), 1 ) + 1 PIV = WORK( I2 ) @@ -427,14 +406,14 @@ WORK( I2 ) = WORK( I1 ) WORK( I1 ) = PIV * -* Swap A(I1+1:N, I1) with A(I2, I1+1:N) +* Swap A(I1+1:M, I1) with A(I2, I1+1:M) * I1 = I1+J-1 I2 = I2+J-1 CALL DSWAP( I2-I1-1, A( I1+1, J1+I1-1 ), 1, $ A( I2, J1+I1 ), LDA ) * -* Swap A(I2+1:N, I1) with A(I2+1:N, I2) +* Swap A(I2+1:M, I1) with A(I2+1:M, I2) * CALL DSWAP( M-I2, A( I2+1, J1+I1-1 ), 1, $ A( I2+1, J1+I2-1 ), 1 ) @@ -465,22 +444,17 @@ * Set A(J+1, J) = T(J+1, J) * A( J+1, K ) = WORK( 2 ) - IF( (A( J, K ).EQ.ZERO) .AND. - $ ( (J.EQ.M) .OR. (A( J+1, K ).EQ.ZERO)) ) THEN - IF (INFO .EQ. 0) - $ INFO = J - END IF * IF( J.LT.NB ) THEN * -* Copy A(J+1:N, J+1) into H(J+1:N, J), +* Copy A(J+1:M, J+1) into H(J+1:M, J), * CALL DCOPY( M-J, A( J+1, K+1 ), 1, $ H( J+1, J+1 ), 1 ) END IF * -* Compute L(J+2, J+1) = WORK( 3:N ) / T(J, J+1), -* where A(J, J+1) = T(J, J+1) and A(J+2:N, J) = L(J+2:N, J+1) +* Compute L(J+2, J+1) = WORK( 3:M ) / T(J, J+1), +* where A(J, J+1) = T(J, J+1) and A(J+2:M, J) = L(J+2:M, J+1) * IF( A( J+1, K ).NE.ZERO ) THEN ALPHA = ONE / A( J+1, K ) @@ -490,10 +464,6 @@ CALL DLASET( 'Full', M-J-1, 1, ZERO, ZERO, $ A( J+2, K ), LDA ) END IF - ELSE - IF( (A( J, K ).EQ.ZERO) .AND. (INFO.EQ.0) ) THEN - INFO = J - END IF END IF J = J + 1 GO TO 30 diff -Nru lapack-3.7.0/SRC/dla_syrfsx_extended.f lapack-3.7.1/SRC/dla_syrfsx_extended.f --- lapack-3.7.0/SRC/dla_syrfsx_extended.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dla_syrfsx_extended.f 2017-06-17 22:46:53.000000000 +0000 @@ -162,8 +162,7 @@ *> *> \param[in,out] Y *> \verbatim -*> Y is DOUBLE PRECISION array, dimension -*> (LDY,NRHS) +*> Y is DOUBLE PRECISION array, dimension (LDY,NRHS) *> On entry, the solution matrix X, as computed by DSYTRS. *> On exit, the improved solution matrix Y. *> \endverbatim @@ -195,8 +194,7 @@ *> *> \param[in,out] ERR_BNDS_NORM *> \verbatim -*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension -*> (NRHS, N_ERR_BNDS) +*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS) *> For each right-hand side, this array contains information about *> various error bounds and condition numbers corresponding to the *> normwise relative error, which is defined as follows: @@ -242,8 +240,7 @@ *> *> \param[in,out] ERR_BNDS_COMP *> \verbatim -*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension -*> (NRHS, N_ERR_BNDS) +*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS) *> For each right-hand side, this array contains information about *> various error bounds and condition numbers corresponding to the *> componentwise relative error, which is defined as follows: @@ -386,7 +383,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleSYcomputational * @@ -399,10 +396,10 @@ $ RTHRESH, DZ_UB, IGNORE_CWISE, $ INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE, diff -Nru lapack-3.7.0/SRC/dorbdb1.f lapack-3.7.1/SRC/dorbdb1.f --- lapack-3.7.0/SRC/dorbdb1.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dorbdb1.f 2017-06-17 22:46:53.000000000 +0000 @@ -32,7 +32,7 @@ * * *> \par Purpose: -*> ============= +* ============= *> *>\verbatim *> @@ -203,7 +203,7 @@ SUBROUTINE DORBDB1( M, P, Q, X11, LDX11, X21, LDX21, THETA, PHI, $ TAUP1, TAUP2, TAUQ1, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * July 2012 diff -Nru lapack-3.7.0/SRC/dorbdb2.f lapack-3.7.1/SRC/dorbdb2.f --- lapack-3.7.0/SRC/dorbdb2.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dorbdb2.f 2017-06-17 22:46:53.000000000 +0000 @@ -32,7 +32,7 @@ * * *> \par Purpose: -*> ============= +* ============= *> *>\verbatim *> @@ -202,7 +202,7 @@ SUBROUTINE DORBDB2( M, P, Q, X11, LDX11, X21, LDX21, THETA, PHI, $ TAUP1, TAUP2, TAUQ1, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * July 2012 diff -Nru lapack-3.7.0/SRC/dorbdb3.f lapack-3.7.1/SRC/dorbdb3.f --- lapack-3.7.0/SRC/dorbdb3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dorbdb3.f 2017-06-17 22:46:53.000000000 +0000 @@ -32,7 +32,7 @@ * * *> \par Purpose: -*> ============= +* ============= *> *>\verbatim *> @@ -201,7 +201,7 @@ SUBROUTINE DORBDB3( M, P, Q, X11, LDX11, X21, LDX21, THETA, PHI, $ TAUP1, TAUP2, TAUQ1, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * July 2012 diff -Nru lapack-3.7.0/SRC/dorbdb4.f lapack-3.7.1/SRC/dorbdb4.f --- lapack-3.7.0/SRC/dorbdb4.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dorbdb4.f 2017-06-17 22:46:53.000000000 +0000 @@ -33,7 +33,7 @@ * * *> \par Purpose: -*> ============= +* ============= *> *>\verbatim *> @@ -213,7 +213,7 @@ $ TAUP1, TAUP2, TAUQ1, PHANTOM, WORK, LWORK, $ INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * July 2012 diff -Nru lapack-3.7.0/SRC/dorbdb5.f lapack-3.7.1/SRC/dorbdb5.f --- lapack-3.7.0/SRC/dorbdb5.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dorbdb5.f 2017-06-17 22:46:53.000000000 +0000 @@ -31,7 +31,7 @@ * * *> \par Purpose: -*> ============= +* ============= *> *>\verbatim *> @@ -156,7 +156,7 @@ SUBROUTINE DORBDB5( M1, M2, N, X1, INCX1, X2, INCX2, Q1, LDQ1, Q2, $ LDQ2, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * July 2012 diff -Nru lapack-3.7.0/SRC/dorbdb6.f lapack-3.7.1/SRC/dorbdb6.f --- lapack-3.7.0/SRC/dorbdb6.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dorbdb6.f 2017-06-17 22:46:53.000000000 +0000 @@ -31,7 +31,7 @@ * * *> \par Purpose: -*> ============= +* ============= *> *>\verbatim *> @@ -154,7 +154,7 @@ SUBROUTINE DORBDB6( M1, M2, N, X1, INCX1, X2, INCX2, Q1, LDQ1, Q2, $ LDQ2, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * July 2012 diff -Nru lapack-3.7.0/SRC/dorcsd2by1.f lapack-3.7.1/SRC/dorcsd2by1.f --- lapack-3.7.0/SRC/dorcsd2by1.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dorcsd2by1.f 2017-06-17 22:46:53.000000000 +0000 @@ -36,7 +36,7 @@ * * *> \par Purpose: -*> ============= +* ============= *> *>\verbatim *> diff -Nru lapack-3.7.0/SRC/dorcsd.f lapack-3.7.1/SRC/dorcsd.f --- lapack-3.7.0/SRC/dorcsd.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dorcsd.f 2017-06-17 22:46:53.000000000 +0000 @@ -186,7 +186,7 @@ *> *> \param[out] U1 *> \verbatim -*> U1 is DOUBLE PRECISION array, dimension (P) +*> U1 is DOUBLE PRECISION array, dimension (LDU1,P) *> If JOBU1 = 'Y', U1 contains the P-by-P orthogonal matrix U1. *> \endverbatim *> @@ -199,7 +199,7 @@ *> *> \param[out] U2 *> \verbatim -*> U2 is DOUBLE PRECISION array, dimension (M-P) +*> U2 is DOUBLE PRECISION array, dimension (LDU2,M-P) *> If JOBU2 = 'Y', U2 contains the (M-P)-by-(M-P) orthogonal *> matrix U2. *> \endverbatim @@ -213,7 +213,7 @@ *> *> \param[out] V1T *> \verbatim -*> V1T is DOUBLE PRECISION array, dimension (Q) +*> V1T is DOUBLE PRECISION array, dimension (LDV1T,Q) *> If JOBV1T = 'Y', V1T contains the Q-by-Q matrix orthogonal *> matrix V1**T. *> \endverbatim @@ -227,7 +227,7 @@ *> *> \param[out] V2T *> \verbatim -*> V2T is DOUBLE PRECISION array, dimension (M-Q) +*> V2T is DOUBLE PRECISION array, dimension (LDV2T,M-Q) *> If JOBV2T = 'Y', V2T contains the (M-Q)-by-(M-Q) orthogonal *> matrix V2**T. *> \endverbatim @@ -289,7 +289,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleOTHERcomputational * @@ -300,10 +300,10 @@ $ U1, LDU1, U2, LDU2, V1T, LDV1T, V2T, $ LDV2T, WORK, LWORK, IWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER JOBU1, JOBU2, JOBV1T, JOBV2T, SIGNS, TRANS diff -Nru lapack-3.7.0/SRC/dorm22.f lapack-3.7.1/SRC/dorm22.f --- lapack-3.7.0/SRC/dorm22.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dorm22.f 2017-06-17 22:46:53.000000000 +0000 @@ -53,8 +53,8 @@ *> N2-by-N2 upper triangular matrix. *> \endverbatim * -* Arguments -* ========= +* Arguments: +* ========== * *> \param[in] SIDE *> \verbatim @@ -163,7 +163,7 @@ SUBROUTINE DORM22( SIDE, TRANS, M, N, N1, N2, Q, LDQ, C, LDC, $ WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.6.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * January 2015 diff -Nru lapack-3.7.0/SRC/dppsvx.f lapack-3.7.1/SRC/dppsvx.f --- lapack-3.7.0/SRC/dppsvx.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dppsvx.f 2017-06-17 22:46:53.000000000 +0000 @@ -147,8 +147,7 @@ *> *> \param[in,out] AFP *> \verbatim -*> AFP is DOUBLE PRECISION array, dimension -*> (N*(N+1)/2) +*> AFP is DOUBLE PRECISION array, dimension (N*(N+1)/2) *> If FACT = 'F', then AFP is an input argument and on entry *> contains the triangular factor U or L from the Cholesky *> factorization A = U**T*U or A = L*L**T, in the same storage @@ -312,7 +311,7 @@ SUBROUTINE DPPSVX( FACT, UPLO, N, NRHS, AP, AFP, EQUED, S, B, LDB, $ X, LDX, RCOND, FERR, BERR, WORK, IWORK, INFO ) * -* -- LAPACK driver routine (version 3.7.0) -- +* -- LAPACK driver routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * April 2012 diff -Nru lapack-3.7.0/SRC/dsb2st_kernels.f lapack-3.7.1/SRC/dsb2st_kernels.f --- lapack-3.7.0/SRC/dsb2st_kernels.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dsb2st_kernels.f 2017-06-17 22:46:53.000000000 +0000 @@ -47,45 +47,87 @@ * Arguments: * ========== * -*> @param[in] n -*> The order of the matrix A. -*> -*> @param[in] nb -*> The size of the band. -*> -*> @param[in, out] A -*> A pointer to the matrix A. -*> -*> @param[in] lda -*> The leading dimension of the matrix A. +*> \param[in] UPLO +*> \verbatim +*> UPLO is CHARACTER*1 +*> \endverbatim *> -*> @param[out] V -*> DOUBLE PRECISION array, dimension 2*n if eigenvalues only are -*> requested or to be queried for vectors. +*> \param[in] WANTZ +*> \verbatim +*> WANTZ is LOGICAL which indicate if Eigenvalue are requested or both +*> Eigenvalue/Eigenvectors. +*> \endverbatim *> -*> @param[out] TAU -*> DOUBLE PRECISION array, dimension (2*n). -*> The scalar factors of the Householder reflectors are stored -*> in this array. +*> \param[in] TTYPE +*> \verbatim +*> TTYPE is INTEGER +*> \endverbatim *> -*> @param[in] st +*> \param[in] ST +*> \verbatim +*> ST is INTEGER *> internal parameter for indices. +*> \endverbatim *> -*> @param[in] ed +*> \param[in] ED +*> \verbatim +*> ED is INTEGER *> internal parameter for indices. +*> \endverbatim *> -*> @param[in] sweep +*> \param[in] SWEEP +*> \verbatim +*> SWEEP is INTEGER *> internal parameter for indices. +*> \endverbatim *> -*> @param[in] Vblksiz -*> internal parameter for indices. +*> \param[in] N +*> \verbatim +*> N is INTEGER. The order of the matrix A. +*> \endverbatim *> -*> @param[in] wantz -*> logical which indicate if Eigenvalue are requested or both -*> Eigenvalue/Eigenvectors. +*> \param[in] NB +*> \verbatim +*> NB is INTEGER. The size of the band. +*> \endverbatim +*> +*> \param[in] IB +*> \verbatim +*> IB is INTEGER. +*> \endverbatim +*> +*> \param[in, out] A +*> \verbatim +*> A is DOUBLE PRECISION array. A pointer to the matrix A. +*> \endverbatim +*> +*> \param[in] LDA +*> \verbatim +*> LDA is INTEGER. The leading dimension of the matrix A. +*> \endverbatim +*> +*> \param[out] V +*> \verbatim +*> V is DOUBLE PRECISION array, dimension 2*n if eigenvalues only are +*> requested or to be queried for vectors. +*> \endverbatim +*> +*> \param[out] TAU +*> \verbatim +*> TAU is DOUBLE PRECISION array, dimension (2*n). +*> The scalar factors of the Householder reflectors are stored +*> in this array. +*> \endverbatim +*> +*> \param[in] LDVT +*> \verbatim +*> LDVT is INTEGER. +*> \endverbatim *> -*> @param[in] work -*> Workspace of size nb. +*> \param[in] WORK +*> \verbatim +*> WORK is DOUBLE PRECISION array. Workspace of size nb. +*> \endverbatim *> *> \par Further Details: * ===================== @@ -128,10 +170,10 @@ * IMPLICIT NONE * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/SRC/dsbev_2stage.f lapack-3.7.1/SRC/dsbev_2stage.f --- lapack-3.7.0/SRC/dsbev_2stage.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dsbev_2stage.f 2017-06-17 22:46:53.000000000 +0000 @@ -164,7 +164,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleOTHEReigen * @@ -206,10 +206,10 @@ * IMPLICIT NONE * -* -- LAPACK driver routine (version 3.7.0) -- +* -- LAPACK driver routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER JOBZ, UPLO @@ -239,7 +239,7 @@ EXTERNAL LSAME, DLAMCH, DLANSB, ILAENV * .. * .. External Subroutines .. - EXTERNAL DLASCL, DSCAL, DSTEQR, DSTERF, XERBLA + EXTERNAL DLASCL, DSCAL, DSTEQR, DSTERF, XERBLA, $ DSYTRD_SB2ST * .. * .. Intrinsic Functions .. diff -Nru lapack-3.7.0/SRC/dspevd.f lapack-3.7.1/SRC/dspevd.f --- lapack-3.7.0/SRC/dspevd.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dspevd.f 2017-06-17 22:46:53.000000000 +0000 @@ -112,8 +112,7 @@ *> *> \param[out] WORK *> \verbatim -*> WORK is DOUBLE PRECISION array, -*> dimension (LWORK) +*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)) *> On exit, if INFO = 0, WORK(1) returns the required LWORK. *> \endverbatim *> @@ -171,7 +170,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleOTHEReigen * @@ -179,10 +178,10 @@ SUBROUTINE DSPEVD( JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, LWORK, $ IWORK, LIWORK, INFO ) * -* -- LAPACK driver routine (version 3.7.0) -- +* -- LAPACK driver routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER JOBZ, UPLO diff -Nru lapack-3.7.0/SRC/dspgv.f lapack-3.7.1/SRC/dspgv.f --- lapack-3.7.0/SRC/dspgv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dspgv.f 2017-06-17 22:46:53.000000000 +0000 @@ -77,8 +77,7 @@ *> *> \param[in,out] AP *> \verbatim -*> AP is DOUBLE PRECISION array, dimension -*> (N*(N+1)/2) +*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2) *> On entry, the upper or lower triangle of the symmetric matrix *> A, packed columnwise in a linear array. The j-th column of A *> is stored in the array AP as follows: @@ -153,7 +152,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleOTHEReigen * @@ -161,10 +160,10 @@ SUBROUTINE DSPGV( ITYPE, JOBZ, UPLO, N, AP, BP, W, Z, LDZ, WORK, $ INFO ) * -* -- LAPACK driver routine (version 3.7.0) -- +* -- LAPACK driver routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER JOBZ, UPLO diff -Nru lapack-3.7.0/SRC/dspsvx.f lapack-3.7.1/SRC/dspsvx.f --- lapack-3.7.0/SRC/dspsvx.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dspsvx.f 2017-06-17 22:46:53.000000000 +0000 @@ -123,8 +123,7 @@ *> *> \param[in,out] AFP *> \verbatim -*> AFP is DOUBLE PRECISION array, dimension -*> (N*(N+1)/2) +*> AFP is DOUBLE PRECISION array, dimension (N*(N+1)/2) *> If FACT = 'F', then AFP is an input argument and on entry *> contains the block diagonal matrix D and the multipliers used *> to obtain the factor U or L from the factorization @@ -277,7 +276,7 @@ SUBROUTINE DSPSVX( FACT, UPLO, N, NRHS, AP, AFP, IPIV, B, LDB, X, $ LDX, RCOND, FERR, BERR, WORK, IWORK, INFO ) * -* -- LAPACK driver routine (version 3.7.0) -- +* -- LAPACK driver routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * April 2012 diff -Nru lapack-3.7.0/SRC/dstedc.f lapack-3.7.1/SRC/dstedc.f --- lapack-3.7.0/SRC/dstedc.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dstedc.f 2017-06-17 22:46:53.000000000 +0000 @@ -105,8 +105,7 @@ *> *> \param[out] WORK *> \verbatim -*> WORK is DOUBLE PRECISION array, -*> dimension (LWORK) +*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)) *> On exit, if INFO = 0, WORK(1) returns the optimal LWORK. *> \endverbatim *> @@ -174,7 +173,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup auxOTHERcomputational * @@ -189,10 +188,10 @@ SUBROUTINE DSTEDC( COMPZ, N, D, E, Z, LDZ, WORK, LWORK, IWORK, $ LIWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER COMPZ diff -Nru lapack-3.7.0/SRC/dstegr.f lapack-3.7.1/SRC/dstegr.f --- lapack-3.7.0/SRC/dstegr.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dstegr.f 2017-06-17 22:46:53.000000000 +0000 @@ -184,7 +184,7 @@ *> *> \param[out] ISUPPZ *> \verbatim -*> ISUPPZ is INTEGER ARRAY, dimension ( 2*max(1,M) ) +*> ISUPPZ is INTEGER array, dimension ( 2*max(1,M) ) *> The support of the eigenvectors in Z, i.e., the indices *> indicating the nonzero elements in Z. The i-th computed eigenvector *> is nonzero only in elements ISUPPZ( 2*i-1 ) through @@ -265,7 +265,7 @@ $ ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK, $ LIWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 diff -Nru lapack-3.7.0/SRC/dstemr.f lapack-3.7.1/SRC/dstemr.f --- lapack-3.7.0/SRC/dstemr.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dstemr.f 2017-06-17 22:46:53.000000000 +0000 @@ -222,7 +222,7 @@ *> *> \param[out] ISUPPZ *> \verbatim -*> ISUPPZ is INTEGER ARRAY, dimension ( 2*max(1,M) ) +*> ISUPPZ is INTEGER array, dimension ( 2*max(1,M) ) *> The support of the eigenvectors in Z, i.e., the indices *> indicating the nonzero elements in Z. The i-th computed eigenvector *> is nonzero only in elements ISUPPZ( 2*i-1 ) through @@ -321,7 +321,7 @@ $ M, W, Z, LDZ, NZC, ISUPPZ, TRYRAC, WORK, LWORK, $ IWORK, LIWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 diff -Nru lapack-3.7.0/SRC/dsycon_3.f lapack-3.7.1/SRC/dsycon_3.f --- lapack-3.7.0/SRC/dsycon_3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dsycon_3.f 2017-06-17 22:46:53.000000000 +0000 @@ -95,7 +95,7 @@ *> On entry, contains the superdiagonal (or subdiagonal) *> elements of the symmetric block diagonal matrix D *> with 1-by-1 or 2-by-2 diagonal blocks, where -*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; +*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. *> *> NOTE: For 1-by-1 diagonal block D(k), where @@ -149,7 +149,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleSYcomputational * @@ -157,7 +157,7 @@ * ================== *> \verbatim *> -*> December 2016, Igor Kozachenko, +*> June 2017, Igor Kozachenko, *> Computer Science Division, *> University of California, Berkeley *> @@ -171,10 +171,10 @@ SUBROUTINE DSYCON_3( UPLO, N, A, LDA, E, IPIV, ANORM, RCOND, $ WORK, IWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/SRC/dsyconvf.f lapack-3.7.1/SRC/dsyconvf.f --- lapack-3.7.0/SRC/dsyconvf.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dsyconvf.f 2017-06-17 22:46:53.000000000 +0000 @@ -45,7 +45,7 @@ *> If parameter WAY = 'R': *> DSYCONVF performs the conversion in reverse direction, i.e. *> converts the factorization output format used in DSYTRF_RK -*> (or DSYTRF_BK) provided on entry in parametes A and E into +*> (or DSYTRF_BK) provided on entry in parameters A and E into *> the factorization output format used in DSYTRF that is stored *> on exit in parameter A. It also coverts in place details of *> the intechanges stored in IPIV from the format used in DSYTRF_RK @@ -189,7 +189,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleSYcomputational * @@ -198,7 +198,7 @@ *> *> \verbatim *> -*> December 2016, Igor Kozachenko, +*> June 2017, Igor Kozachenko, *> Computer Science Division, *> University of California, Berkeley *> @@ -206,10 +206,10 @@ * ===================================================================== SUBROUTINE DSYCONVF( UPLO, WAY, N, A, LDA, E, IPIV, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO, WAY diff -Nru lapack-3.7.0/SRC/dsyconvf_rook.f lapack-3.7.1/SRC/dsyconvf_rook.f --- lapack-3.7.0/SRC/dsyconvf_rook.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dsyconvf_rook.f 2017-06-17 22:46:53.000000000 +0000 @@ -44,7 +44,7 @@ *> If parameter WAY = 'R': *> DSYCONVF_ROOK performs the conversion in reverse direction, i.e. *> converts the factorization output format used in DSYTRF_RK -*> (or DSYTRF_BK) provided on entry in parametes A and E into +*> (or DSYTRF_BK) provided on entry in parameters A and E into *> the factorization output format used in DSYTRF_ROOK that is stored *> on exit in parameter A. IPIV format for DSYTRF_ROOK and *> DSYTRF_RK (or DSYTRF_BK) is the same and is not converted. @@ -180,7 +180,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleSYcomputational * @@ -189,7 +189,7 @@ *> *> \verbatim *> -*> December 2016, Igor Kozachenko, +*> June 2017, Igor Kozachenko, *> Computer Science Division, *> University of California, Berkeley *> @@ -197,10 +197,10 @@ * ===================================================================== SUBROUTINE DSYCONVF_ROOK( UPLO, WAY, N, A, LDA, E, IPIV, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO, WAY diff -Nru lapack-3.7.0/SRC/dsyevr.f lapack-3.7.1/SRC/dsyevr.f --- lapack-3.7.0/SRC/dsyevr.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dsyevr.f 2017-06-17 22:46:53.000000000 +0000 @@ -88,7 +88,7 @@ *> *> Note 1 : DSYEVR calls DSTEMR when the full spectrum is requested *> on machines which conform to the ieee-754 floating point standard. -*> DSYEVR calls DSTEBZ and SSTEIN on non-ieee machines and +*> DSYEVR calls DSTEBZ and DSTEIN on non-ieee machines and *> when partial spectrum requests are made. *> *> Normal execution of DSTEMR may create NaNs and infinities and @@ -334,7 +334,7 @@ $ ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK, $ IWORK, LIWORK, INFO ) * -* -- LAPACK driver routine (version 3.7.0) -- +* -- LAPACK driver routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 diff -Nru lapack-3.7.0/SRC/dsygv_2stage.f lapack-3.7.1/SRC/dsygv_2stage.f --- lapack-3.7.0/SRC/dsygv_2stage.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dsygv_2stage.f 2017-06-17 22:46:53.000000000 +0000 @@ -46,7 +46,7 @@ *> positive definite. *> This routine use the 2stage technique for the reduction to tridiagonal *> which showed higher performance on recent architecture and for large -* sizes N>2000. +*> sizes N>2000. *> \endverbatim * * Arguments: @@ -186,7 +186,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleSYeigen * @@ -228,10 +228,10 @@ * IMPLICIT NONE * -* -- LAPACK driver routine (version 3.7.0) -- +* -- LAPACK driver routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER JOBZ, UPLO diff -Nru lapack-3.7.0/SRC/dsytrd_2stage.f lapack-3.7.1/SRC/dsytrd_2stage.f --- lapack-3.7.0/SRC/dsytrd_2stage.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dsytrd_2stage.f 2017-06-17 22:46:53.000000000 +0000 @@ -144,7 +144,7 @@ *> *> \param[out] WORK *> \verbatim -*> WORK is DOUBLE PRECISION array, dimension LWORK. +*> WORK is DOUBLE PRECISION array, dimension (LWORK) *> \endverbatim *> *> \param[in] LWORK @@ -183,7 +183,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleSYcomputational * @@ -227,10 +227,10 @@ * IMPLICIT NONE * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER VECT, UPLO diff -Nru lapack-3.7.0/SRC/dsytrd_sy2sb.f lapack-3.7.1/SRC/dsytrd_sy2sb.f --- lapack-3.7.0/SRC/dsytrd_sy2sb.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dsytrd_sy2sb.f 2017-06-17 22:46:53.000000000 +0000 @@ -123,7 +123,7 @@ *> *> \param[out] WORK *> \verbatim -*> WORK is DOUBLE PRECISION array, dimension LWORK. +*> WORK is DOUBLE PRECISION array, dimension (LWORK) *> On exit, if INFO = 0, or if LWORK=-1, *> WORK(1) returns the size of LWORK. *> \endverbatim @@ -132,7 +132,7 @@ *> \verbatim *> LWORK is INTEGER *> The dimension of the array WORK which should be calculated -* by a workspace query. LWORK = MAX(1, LWORK_QUERY) +*> by a workspace query. LWORK = MAX(1, LWORK_QUERY) *> If LWORK = -1, then a workspace query is assumed; the routine *> only calculates the optimal size of the WORK array, returns *> this value as the first entry of the WORK array, and no error @@ -158,7 +158,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleSYcomputational * @@ -222,7 +222,7 @@ *> *> where tau is a real scalar, and v is a real vector with *> v(kd+1:i) = 0 and v(i+kd+1) = 1; v(i+kd+2:n) is stored on exit in -* A(i+kd+2:n,i), and tau in TAU(i). +*> A(i+kd+2:n,i), and tau in TAU(i). *> *> The contents of A on exit are illustrated by the following examples *> with n = 5: @@ -245,10 +245,10 @@ * IMPLICIT NONE * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/SRC/dsytrf_aa.f lapack-3.7.1/SRC/dsytrf_aa.f --- lapack-3.7.0/SRC/dsytrf_aa.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dsytrf_aa.f 2017-06-17 22:46:53.000000000 +0000 @@ -114,11 +114,7 @@ *> \verbatim *> INFO is INTEGER *> = 0: successful exit -*> < 0: if INFO = -i, the i-th argument had an illegal value -*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization -*> has been completed, but the block diagonal matrix D is -*> exactly singular, and division by zero will occur if it -*> is used to solve a system of equations. +*> < 0: if INFO = -i, the i-th argument had an illegal value. *> \endverbatim * * Authors: @@ -159,7 +155,7 @@ * * .. Local Scalars .. LOGICAL LQUERY, UPPER - INTEGER J, LWKOPT, IINFO + INTEGER J, LWKOPT INTEGER NB, MJ, NJ, K1, K2, J1, J2, J3, JB DOUBLE PRECISION ALPHA * .. @@ -214,13 +210,10 @@ ENDIF IPIV( 1 ) = 1 IF ( N.EQ.1 ) THEN - IF ( A( 1, 1 ).EQ.ZERO ) THEN - INFO = 1 - END IF RETURN END IF * -* Adjubst block size based on the workspace size +* Adjust block size based on the workspace size * IF( LWORK.LT.((1+NB)*N) ) THEN NB = ( LWORK-N ) / N @@ -260,11 +253,7 @@ * CALL DLASYF_AA( UPLO, 2-K1, N-J, JB, $ A( MAX(1, J), J+1 ), LDA, - $ IPIV( J+1 ), WORK, N, WORK( N*NB+1 ), - $ IINFO ) - IF( (IINFO.GT.0) .AND. (INFO.EQ.0) ) THEN - INFO = IINFO+J - ENDIF + $ IPIV( J+1 ), WORK, N, WORK( N*NB+1 ) ) * * Ajust IPIV and apply it back (J-th step picks (J+1)-th pivot) * @@ -383,10 +372,7 @@ * CALL DLASYF_AA( UPLO, 2-K1, N-J, JB, $ A( J+1, MAX(1, J) ), LDA, - $ IPIV( J+1 ), WORK, N, WORK( N*NB+1 ), IINFO) - IF( (IINFO.GT.0) .AND. (INFO.EQ.0) ) THEN - INFO = IINFO+J - ENDIF + $ IPIV( J+1 ), WORK, N, WORK( N*NB+1 ) ) * * Ajust IPIV and apply it back (J-th step picks (J+1)-th pivot) * diff -Nru lapack-3.7.0/SRC/dsytri2x.f lapack-3.7.1/SRC/dsytri2x.f --- lapack-3.7.0/SRC/dsytri2x.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dsytri2x.f 2017-06-17 22:46:53.000000000 +0000 @@ -87,7 +87,7 @@ *> *> \param[out] WORK *> \verbatim -*> WORK is DOUBLE PRECISION array, dimension (N+NNB+1,NNB+3) +*> WORK is DOUBLE PRECISION array, dimension (N+NB+1,NB+3) *> \endverbatim *> *> \param[in] NB @@ -113,17 +113,17 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleSYcomputational * * ===================================================================== SUBROUTINE DSYTRI2X( UPLO, N, A, LDA, IPIV, WORK, NB, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/SRC/dsytri_3.f lapack-3.7.1/SRC/dsytri_3.f --- lapack-3.7.0/SRC/dsytri_3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dsytri_3.f 2017-06-17 22:46:53.000000000 +0000 @@ -102,7 +102,7 @@ *> On entry, contains the superdiagonal (or subdiagonal) *> elements of the symmetric block diagonal matrix D *> with 1-by-1 or 2-by-2 diagonal blocks, where -*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; +*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. *> *> NOTE: For 1-by-1 diagonal block D(k), where @@ -152,7 +152,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleSYcomputational * @@ -160,7 +160,7 @@ * ================== *> \verbatim *> -*> December 2016, Igor Kozachenko, +*> June 2017, Igor Kozachenko, *> Computer Science Division, *> University of California, Berkeley *> @@ -170,10 +170,10 @@ SUBROUTINE DSYTRI_3( UPLO, N, A, LDA, E, IPIV, WORK, LWORK, $ INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/SRC/dsytri_3x.f lapack-3.7.1/SRC/dsytri_3x.f --- lapack-3.7.0/SRC/dsytri_3x.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dsytri_3x.f 2017-06-17 22:46:53.000000000 +0000 @@ -99,7 +99,7 @@ *> On entry, contains the superdiagonal (or subdiagonal) *> elements of the symmetric block diagonal matrix D *> with 1-by-1 or 2-by-2 diagonal blocks, where -*> If UPLO = 'U': E(i) = D(i-1,i), i=2:N, E(1) not refernced; +*> If UPLO = 'U': E(i) = D(i-1,i), i=2:N, E(1) not referenced; *> If UPLO = 'L': E(i) = D(i+1,i), i=1:N-1, E(N) not referenced. *> *> NOTE: For 1-by-1 diagonal block D(k), where @@ -142,7 +142,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleSYcomputational * @@ -150,7 +150,7 @@ * ================== *> \verbatim *> -*> December 2016, Igor Kozachenko, +*> June 2017, Igor Kozachenko, *> Computer Science Division, *> University of California, Berkeley *> @@ -159,10 +159,10 @@ * ===================================================================== SUBROUTINE DSYTRI_3X( UPLO, N, A, LDA, E, IPIV, WORK, NB, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/SRC/dsytrs_3.f lapack-3.7.1/SRC/dsytrs_3.f --- lapack-3.7.0/SRC/dsytrs_3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dsytrs_3.f 2017-06-17 22:46:53.000000000 +0000 @@ -99,7 +99,7 @@ *> On entry, contains the superdiagonal (or subdiagonal) *> elements of the symmetric block diagonal matrix D *> with 1-by-1 or 2-by-2 diagonal blocks, where -*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; +*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. *> *> NOTE: For 1-by-1 diagonal block D(k), where @@ -142,7 +142,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleSYcomputational * @@ -151,7 +151,7 @@ *> *> \verbatim *> -*> December 2016, Igor Kozachenko, +*> June 2017, Igor Kozachenko, *> Computer Science Division, *> University of California, Berkeley *> @@ -165,10 +165,10 @@ SUBROUTINE DSYTRS_3( UPLO, N, NRHS, A, LDA, E, IPIV, B, LDB, $ INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/SRC/dsytrs_aa.f lapack-3.7.1/SRC/dsytrs_aa.f --- lapack-3.7.0/SRC/dsytrs_aa.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dsytrs_aa.f 2017-06-17 22:46:53.000000000 +0000 @@ -66,7 +66,7 @@ *> of the matrix B. NRHS >= 0. *> \endverbatim *> -*> \param[in,out] A +*> \param[in] A *> \verbatim *> A is DOUBLE PRECISION array, dimension (LDA,N) *> Details of factors computed by DSYTRF_AA. @@ -121,7 +121,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleSYcomputational * @@ -129,10 +129,10 @@ SUBROUTINE DSYTRS_AA( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, $ WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * IMPLICIT NONE * diff -Nru lapack-3.7.0/SRC/dtgsen.f lapack-3.7.1/SRC/dtgsen.f --- lapack-3.7.0/SRC/dtgsen.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dtgsen.f 2017-06-17 22:46:53.000000000 +0000 @@ -222,7 +222,7 @@ *> \verbatim *> PL is DOUBLE PRECISION *> \endverbatim - +*> *> \param[out] PR *> \verbatim *> PR is DOUBLE PRECISION @@ -248,8 +248,7 @@ *> *> \param[out] WORK *> \verbatim -*> WORK is DOUBLE PRECISION array, -*> dimension (MAX(1,LWORK)) +*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)) *> On exit, if INFO = 0, WORK(1) returns the optimal LWORK. *> \endverbatim *> @@ -452,7 +451,7 @@ $ ALPHAR, ALPHAI, BETA, Q, LDQ, Z, LDZ, M, PL, $ PR, DIF, WORK, LWORK, IWORK, LIWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 diff -Nru lapack-3.7.0/SRC/dtplqt2.f lapack-3.7.1/SRC/dtplqt2.f --- lapack-3.7.0/SRC/dtplqt2.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dtplqt2.f 2017-06-17 22:46:53.000000000 +0000 @@ -65,7 +65,7 @@ *> *> \param[in,out] A *> \verbatim -*> A is DOUBLE PRECISION array, dimension (LDA,N) +*> A is DOUBLE PRECISION array, dimension (LDA,M) *> On entry, the lower triangular M-by-M matrix A. *> On exit, the elements on and below the diagonal of the array *> contain the lower triangular matrix L. @@ -74,7 +74,7 @@ *> \param[in] LDA *> \verbatim *> LDA is INTEGER -*> The leading dimension of the array A. LDA >= max(1,N). +*> The leading dimension of the array A. LDA >= max(1,M). *> \endverbatim *> *> \param[in,out] B @@ -119,7 +119,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleOTHERcomputational * @@ -133,7 +133,7 @@ *> C = [ A ][ B ] *> *> -*> where A is an lower triangular N-by-N matrix, and B is M-by-N pentagonal +*> where A is an lower triangular M-by-M matrix, and B is M-by-N pentagonal *> matrix consisting of a M-by-(N-L) rectangular matrix B1 left of a M-by-L *> upper trapezoidal matrix B2: *> @@ -149,13 +149,13 @@ *> above the diagonal (of A) in the M-by-(M+N) input matrix C *> *> C = [ A ][ B ] -*> [ A ] <- lower triangular N-by-N +*> [ A ] <- lower triangular M-by-M *> [ B ] <- M-by-N pentagonal *> *> so that W can be represented as *> *> W = [ I ][ V ] -*> [ I ] <- identity, N-by-N +*> [ I ] <- identity, M-by-M *> [ V ] <- M-by-N, same form as B. *> *> Thus, all of information needed for W is contained on exit in B, which @@ -177,10 +177,10 @@ * ===================================================================== SUBROUTINE DTPLQT2( M, N, L, A, LDA, B, LDB, T, LDT, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDB, LDT, N, M, L diff -Nru lapack-3.7.0/SRC/dtplqt.f lapack-3.7.1/SRC/dtplqt.f --- lapack-3.7.0/SRC/dtplqt.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dtplqt.f 2017-06-17 22:46:53.000000000 +0000 @@ -73,8 +73,8 @@ *> *> \param[in,out] A *> \verbatim -*> A is DOUBLE PRECISION array, dimension (LDA,N) -*> On entry, the lower triangular N-by-N matrix A. +*> A is DOUBLE PRECISION array, dimension (LDA,M) +*> On entry, the lower triangular M-by-M matrix A. *> On exit, the elements on and below the diagonal of the array *> contain the lower triangular matrix L. *> \endverbatim @@ -82,7 +82,7 @@ *> \param[in] LDA *> \verbatim *> LDA is INTEGER -*> The leading dimension of the array A. LDA >= max(1,N). +*> The leading dimension of the array A. LDA >= max(1,M). *> \endverbatim *> *> \param[in,out] B @@ -132,7 +132,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleOTHERcomputational * @@ -146,26 +146,26 @@ *> C = [ A ] [ B ] *> *> -*> where A is an lower triangular N-by-N matrix, and B is M-by-N pentagonal +*> where A is an lower triangular M-by-M matrix, and B is M-by-N pentagonal *> matrix consisting of a M-by-(N-L) rectangular matrix B1 on left of a M-by-L *> upper trapezoidal matrix B2: *> [ B ] = [ B1 ] [ B2 ] *> [ B1 ] <- M-by-(N-L) rectangular -*> [ B2 ] <- M-by-L upper trapezoidal. +*> [ B2 ] <- M-by-L lower trapezoidal. *> *> The lower trapezoidal matrix B2 consists of the first L columns of a -*> N-by-N lower triangular matrix, where 0 <= L <= MIN(M,N). If L=0, +*> M-by-M lower triangular matrix, where 0 <= L <= MIN(M,N). If L=0, *> B is rectangular M-by-N; if M=L=N, B is lower triangular. *> *> The matrix W stores the elementary reflectors H(i) in the i-th row *> above the diagonal (of A) in the M-by-(M+N) input matrix C *> [ C ] = [ A ] [ B ] -*> [ A ] <- lower triangular N-by-N +*> [ A ] <- lower triangular M-by-M *> [ B ] <- M-by-N pentagonal *> *> so that W can be represented as *> [ W ] = [ I ] [ V ] -*> [ I ] <- identity, N-by-N +*> [ I ] <- identity, M-by-M *> [ V ] <- M-by-N, same form as B. *> *> Thus, all of information needed for W is contained on exit in B, which @@ -189,10 +189,10 @@ SUBROUTINE DTPLQT( M, N, L, MB, A, LDA, B, LDB, T, LDT, WORK, $ INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDB, LDT, N, M, L, MB diff -Nru lapack-3.7.0/SRC/dtrttp.f lapack-3.7.1/SRC/dtrttp.f --- lapack-3.7.0/SRC/dtrttp.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/dtrttp.f 2017-06-17 22:46:53.000000000 +0000 @@ -74,7 +74,7 @@ *> *> \param[out] AP *> \verbatim -*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2 +*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2) *> On exit, the upper or lower triangular matrix A, packed *> columnwise in a linear array. The j-th column of A is stored *> in the array AP as follows: @@ -97,17 +97,17 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleOTHERcomputational * * ===================================================================== SUBROUTINE DTRTTP( UPLO, N, A, LDA, AP, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/SRC/ilaclr.f lapack-3.7.1/SRC/ilaclr.f --- lapack-3.7.0/SRC/ilaclr.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/ilaclr.f 2017-06-17 22:46:53.000000000 +0000 @@ -53,7 +53,7 @@ *> *> \param[in] A *> \verbatim -*> A is array, dimension (LDA,N) +*> A is COMPLEX array, dimension (LDA,N) *> The m by n matrix A. *> \endverbatim *> @@ -71,17 +71,17 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complexOTHERauxiliary * * ===================================================================== INTEGER FUNCTION ILACLR( M, N, A, LDA ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER M, N, LDA diff -Nru lapack-3.7.0/SRC/ilaslc.f lapack-3.7.1/SRC/ilaslc.f --- lapack-3.7.0/SRC/ilaslc.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/ilaslc.f 2017-06-17 22:46:53.000000000 +0000 @@ -71,17 +71,17 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup realOTHERauxiliary * * ===================================================================== INTEGER FUNCTION ILASLC( M, N, A, LDA ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER M, N, LDA @@ -94,7 +94,7 @@ * * .. Parameters .. REAL ZERO - PARAMETER ( ZERO = 0.0D+0 ) + PARAMETER ( ZERO = 0.0E+0 ) * .. * .. Local Scalars .. INTEGER I diff -Nru lapack-3.7.0/SRC/ilaver.f lapack-3.7.1/SRC/ilaver.f --- lapack-3.7.0/SRC/ilaver.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/ilaver.f 1970-01-01 00:00:00.000000000 +0000 @@ -1,72 +0,0 @@ -*> \brief \b ILAVER returns the LAPACK version. -** -* =========== DOCUMENTATION =========== -* -* Online html documentation available at -* http://www.netlib.org/lapack/explore-html/ -* -* Definition: -* =========== -* -* SUBROUTINE ILAVER( VERS_MAJOR, VERS_MINOR, VERS_PATCH ) -* -* INTEGER VERS_MAJOR, VERS_MINOR, VERS_PATCH -* -* -*> \par Purpose: -* ============= -*> -*> \verbatim -*> -*> This subroutine returns the LAPACK version. -*> \endverbatim -* -* Arguments: -* ========== -* -*> \param[out] VERS_MAJOR -*> \verbatim -*> return the lapack major version -*> \endverbatim -*> -*> \param[out] VERS_MINOR -*> \verbatim -*> return the lapack minor version from the major version -*> \endverbatim -*> -*> \param[out] VERS_PATCH -*> \verbatim -*> return the lapack patch version from the minor version -*> \endverbatim -* -* Authors: -* ======== -* -*> \author Univ. of Tennessee -*> \author Univ. of California Berkeley -*> \author Univ. of Colorado Denver -*> \author NAG Ltd. -* -*> \date December 2016 -* -*> \ingroup OTHERauxiliary -* -* ===================================================================== - SUBROUTINE ILAVER( VERS_MAJOR, VERS_MINOR, VERS_PATCH ) -* -* -- LAPACK computational routine (version 3.7.0) -- -* -- LAPACK is a software package provided by Univ. of Tennessee, -- -* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* June 2016 -* -* ===================================================================== -* - INTEGER VERS_MAJOR, VERS_MINOR, VERS_PATCH -* ===================================================================== - VERS_MAJOR = 3 - VERS_MINOR = 7 - VERS_PATCH = 0 -* ===================================================================== -* - RETURN - END diff -Nru lapack-3.7.0/SRC/iparam2stage.F lapack-3.7.1/SRC/iparam2stage.F --- lapack-3.7.0/SRC/iparam2stage.F 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/iparam2stage.F 2017-06-17 22:46:53.000000000 +0000 @@ -172,7 +172,7 @@ INTEGER I, IC, IZ, KD, IB, LHOUS, LWORK, NTHREADS, $ FACTOPTNB, QROPTNB, LQOPTNB LOGICAL RPREC, CPREC - CHARACTER PREC*1, ALGO*3, STAG*5, SUBNAM*12, VECT*3 + CHARACTER PREC*1, ALGO*3, STAG*5, SUBNAM*12, VECT*1 * .. * .. Intrinsic Functions .. INTRINSIC CHAR, ICHAR, MAX diff -Nru lapack-3.7.0/SRC/iparmq.f lapack-3.7.1/SRC/iparmq.f --- lapack-3.7.0/SRC/iparmq.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/iparmq.f 2017-06-17 22:46:53.000000000 +0000 @@ -41,7 +41,7 @@ * *> \param[in] ISPEC *> \verbatim -*> ISPEC is integer scalar +*> ISPEC is INTEGER *> ISPEC specifies which tunable parameter IPARMQ should *> return. *> @@ -117,7 +117,7 @@ *> *> \param[in] N *> \verbatim -*> N is integer scalar +*> N is INTEGER *> N is the order of the Hessenberg matrix H. *> \endverbatim *> @@ -135,7 +135,7 @@ *> *> \param[in] LWORK *> \verbatim -*> LWORK is integer scalar +*> LWORK is INTEGER *> The amount of workspace available. *> \endverbatim * @@ -147,7 +147,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup OTHERauxiliary * @@ -222,10 +222,10 @@ * ===================================================================== INTEGER FUNCTION IPARMQ( ISPEC, NAME, OPTS, N, ILO, IHI, LWORK ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER IHI, ILO, ISPEC, LWORK, N diff -Nru lapack-3.7.0/SRC/Makefile lapack-3.7.1/SRC/Makefile --- lapack-3.7.0/SRC/Makefile 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/Makefile 2017-06-17 22:46:53.000000000 +0000 @@ -3,10 +3,10 @@ ####################################################################### # This is the makefile to create a library for LAPACK. # The files are organized as follows: -# ALLAUX -- Auxiliary routines called from all precisions # -# SCLAUX -- Auxiliary routines called from both REAL and COMPLEX. -# DZLAUX -- Auxiliary routines called from both DOUBLE and COMPLEX*16. +# ALLAUX -- Auxiliary routines called from all precisions +# SCLAUX -- Auxiliary routines called from single precision +# DZLAUX -- Auxiliary routines called from double precision # # DSLASRC -- Double-single mixed precision real routines called from # single, single-extra and double precision real LAPACK @@ -44,7 +44,7 @@ # and is created at the next higher directory level. # # To remove the object files after the library is created, enter -# make clean +# make cleanobj # On some systems, you can force the source files to be recompiled by # entering (for example) # make single FRC=FRC @@ -56,7 +56,7 @@ # ####################################################################### -ALLAUX = ilaenv.o ieeeck.o lsamen.o xerbla.o xerbla_array.o iparmq.o iparam2stage.o\ +ALLAUX = ilaenv.o ieeeck.o lsamen.o xerbla.o xerbla_array.o iparmq.o iparam2stage.o \ ilaprec.o ilatrans.o ilauplo.o iladiag.o chla_transtype.o \ ../INSTALL/ilaver.o ../INSTALL/lsame.o ../INSTALL/slamch.o @@ -144,7 +144,8 @@ ssycon.o ssyev.o ssyevd.o ssyevr.o ssyevx.o ssygs2.o \ ssygst.o ssygv.o ssygvd.o ssygvx.o ssyrfs.o ssysv.o ssysvx.o \ ssytd2.o ssytf2.o ssytrd.o ssytrf.o ssytri.o ssytri2.o ssytri2x.o \ - ssyswapr.o ssytrs.o ssytrs2.o ssyconv.o ssyconvf_rook.o \ + ssyswapr.o ssytrs.o ssytrs2.o \ + ssyconv.o ssyconvf.o ssyconvf_rook.o \ ssytf2_rook.o ssytrf_rook.o ssytrs_rook.o \ ssytri_rook.o ssycon_rook.o ssysv_rook.o \ ssytf2_rk.o ssytrf_rk.o ssytrs_3.o \ @@ -210,7 +211,7 @@ chetrs_rook.o checon_rook.o chesv_rook.o \ chetf2_rk.o chetrf_rk.o chetri_3.o chetri_3x.o \ chetrs_3.o checon_3.o chesv_rk.o \ - chesv_aa.o chetrf_aa.o chetrs_aa.o clahef_aa.o\ + chesv_aa.o chetrf_aa.o chetrs_aa.o clahef_aa.o \ chgeqz.o chpcon.o chpev.o chpevd.o \ chpevx.o chpgst.o chpgv.o chpgvd.o chpgvx.o chprfs.o chpsv.o \ chpsvx.o \ @@ -464,7 +465,6 @@ zgelqt.o zgelqt3.o zgemlqt.o \ zgetsls.o zgeqr.o zlatsqr.o zlamtsqr.o zgemqr.o \ zgelq.o zlaswlq.o zlamswlq.o zgemlq.o \ - ztplqt.o ztplqt2.o ztpmlqt.o \ zhetrd_2stage.o zhetrd_he2hb.o zhetrd_hb2st.o zhb2st_kernels.o \ zheevd_2stage.o zheev_2stage.o zheevx_2stage.o zheevr_2stage.o \ zhbev_2stage.o zhbevx_2stage.o zhbevd_2stage.o zhegv_2stage.o @@ -508,27 +508,23 @@ all: ../$(LAPACKLIB) ../$(LAPACKLIB): $(ALLOBJ) $(ALLXOBJ) $(DEPRECATED) - $(ARCH) $(ARCHFLAGS) $@ $(ALLOBJ) $(ALLXOBJ) $(DEPRECATED) + $(ARCH) $(ARCHFLAGS) $@ $^ $(RANLIB) $@ single: $(SLASRC) $(DSLASRC) $(SXLASRC) $(SCLAUX) $(ALLAUX) - $(ARCH) $(ARCHFLAGS) ../$(LAPACKLIB) $(SLASRC) $(DSLASRC) \ - $(SXLASRC) $(SCLAUX) $(ALLAUX) + $(ARCH) $(ARCHFLAGS) ../$(LAPACKLIB) $^ $(RANLIB) ../$(LAPACKLIB) complex: $(CLASRC) $(ZCLASRC) $(CXLASRC) $(SCLAUX) $(ALLAUX) - $(ARCH) $(ARCHFLAGS) ../$(LAPACKLIB) $(CLASRC) $(ZCLASRC) \ - $(CXLASRC) $(SCLAUX) $(ALLAUX) + $(ARCH) $(ARCHFLAGS) ../$(LAPACKLIB) $^ $(RANLIB) ../$(LAPACKLIB) double: $(DLASRC) $(DSLASRC) $(DXLASRC) $(DZLAUX) $(ALLAUX) - $(ARCH) $(ARCHFLAGS) ../$(LAPACKLIB) $(DLASRC) $(DSLASRC) \ - $(DXLASRC) $(DZLAUX) $(ALLAUX) + $(ARCH) $(ARCHFLAGS) ../$(LAPACKLIB) $^ $(RANLIB) ../$(LAPACKLIB) complex16: $(ZLASRC) $(ZCLASRC) $(ZXLASRC) $(DZLAUX) $(ALLAUX) - $(ARCH) $(ARCHFLAGS) ../$(LAPACKLIB) $(ZLASRC) $(ZCLASRC) \ - $(ZXLASRC) $(DZLAUX) $(ALLAUX) + $(ARCH) $(ARCHFLAGS) ../$(LAPACKLIB) $^ $(RANLIB) ../$(LAPACKLIB) $(ALLAUX): $(FRC) @@ -550,15 +546,17 @@ FRC: @FRC=$(FRC) -clean: +clean: cleanobj cleanlib +cleanobj: rm -f *.o DEPRECATED/*.o +cleanlib: + rm -f ../$(LAPACKLIB) .f.o: $(FORTRAN) $(OPTS) -c -o $@ $< - .F.o: - $(FORTRAN) $(OPTS) -c $< -o $@ - + $(FORTRAN) $(OPTS) -c -o $@ $< + slaruv.o: slaruv.f ; $(FORTRAN) $(NOOPT) -c -o $@ $< dlaruv.o: dlaruv.f ; $(FORTRAN) $(NOOPT) -c -o $@ $< sla_wwaddw.o: sla_wwaddw.f ; $(FORTRAN) $(NOOPT) -c -o $@ $< diff -Nru lapack-3.7.0/SRC/sbbcsd.f lapack-3.7.1/SRC/sbbcsd.f --- lapack-3.7.0/SRC/sbbcsd.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/sbbcsd.f 2017-06-17 22:46:53.000000000 +0000 @@ -190,7 +190,7 @@ *> *> \param[in,out] V2T *> \verbatim -*> V2T is REAL array, dimenison (LDV2T,M-Q) +*> V2T is REAL array, dimension (LDV2T,M-Q) *> On entry, an (M-Q)-by-(M-Q) matrix. On exit, V2T is *> premultiplied by the transpose of the right *> singular vector matrix common to [ B12 0 0 ; 0 -I 0 ] and @@ -332,7 +332,7 @@ $ V2T, LDV2T, B11D, B11E, B12D, B12E, B21D, B21E, $ B22D, B22E, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 diff -Nru lapack-3.7.0/SRC/sbdsdc.f lapack-3.7.1/SRC/sbdsdc.f --- lapack-3.7.0/SRC/sbdsdc.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/sbdsdc.f 2017-06-17 22:46:53.000000000 +0000 @@ -205,7 +205,7 @@ SUBROUTINE SBDSDC( UPLO, COMPQ, N, D, E, U, LDU, VT, LDVT, Q, IQ, $ WORK, IWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 @@ -311,12 +311,12 @@ WSTART = 1 QSTART = 3 IF( ICOMPQ.EQ.1 ) THEN - CALL SCOPY( N, D, 1, Q( 1 ), 1 ) + CALL SCOPY( N, D, 1, Q( 1 ), 1 ) CALL SCOPY( N-1, E, 1, Q( N+1 ), 1 ) END IF IF( IUPLO.EQ.2 ) THEN QSTART = 5 - WSTART = 2*N - 1 + IF( ICOMPQ .EQ. 2 ) WSTART = 2*N - 1 DO 10 I = 1, N - 1 CALL SLARTG( D( I ), E( I ), CS, SN, R ) D( I ) = R diff -Nru lapack-3.7.0/SRC/sbdsqr.f lapack-3.7.1/SRC/sbdsqr.f --- lapack-3.7.0/SRC/sbdsqr.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/sbdsqr.f 2017-06-17 22:46:53.000000000 +0000 @@ -214,6 +214,16 @@ *> through the inner loop exceeds MAXITR*N**2. *> \endverbatim * +*> \par Note: +* =========== +*> +*> \verbatim +*> Bug report from Cezary Dendek. +*> On March 23rd 2017, the INTEGER variable MAXIT = MAXITR*N**2 is +*> removed since it can overflow pretty easily (for N larger or equal +*> than 18,919). We instead use MAXITDIVN = MAXITR*N. +*> \endverbatim +* * Authors: * ======== * @@ -222,7 +232,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup auxOTHERcomputational * @@ -230,10 +240,10 @@ SUBROUTINE SBDSQR( UPLO, N, NCVT, NRU, NCC, D, E, VT, LDVT, U, $ LDU, C, LDC, WORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO @@ -266,8 +276,8 @@ * .. * .. Local Scalars .. LOGICAL LOWER, ROTATE - INTEGER I, IDIR, ISUB, ITER, J, LL, LLL, M, MAXIT, NM1, - $ NM12, NM13, OLDLL, OLDM + INTEGER I, IDIR, ISUB, ITER, ITERDIVN, J, LL, LLL, M, + $ MAXITDIVN, NM1, NM12, NM13, OLDLL, OLDM REAL ABSE, ABSS, COSL, COSR, CS, EPS, F, G, H, MU, $ OLDCS, OLDSN, R, SHIFT, SIGMN, SIGMX, SINL, $ SINR, SLL, SMAX, SMIN, SMINL, SMINOA, @@ -400,20 +410,21 @@ 40 CONTINUE 50 CONTINUE SMINOA = SMINOA / SQRT( REAL( N ) ) - THRESH = MAX( TOL*SMINOA, MAXITR*N*N*UNFL ) + THRESH = MAX( TOL*SMINOA, MAXITR*(N*(N*UNFL)) ) ELSE * * Absolute accuracy desired * - THRESH = MAX( ABS( TOL )*SMAX, MAXITR*N*N*UNFL ) + THRESH = MAX( ABS( TOL )*SMAX, MAXITR*(N*(N*UNFL)) ) END IF * * Prepare for main iteration loop for the singular values * (MAXIT is the maximum number of passes through the inner * loop permitted before nonconvergence signalled.) * - MAXIT = MAXITR*N*N - ITER = 0 + MAXITDIVN = MAXITR*N + ITERDIVN = 0 + ITER = -1 OLDLL = -1 OLDM = -1 * @@ -429,8 +440,13 @@ * IF( M.LE.1 ) $ GO TO 160 - IF( ITER.GT.MAXIT ) - $ GO TO 200 +* + IF( ITER.GE.N ) THEN + ITER = ITER - N + ITERDIVN = ITERDIVN + 1 + IF( ITERDIVN.GE.MAXITDIVN ) + $ GO TO 200 + END IF * * Find diagonal block of matrix to work on * diff -Nru lapack-3.7.0/SRC/sgebd2.f lapack-3.7.1/SRC/sgebd2.f --- lapack-3.7.0/SRC/sgebd2.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/sgebd2.f 2017-06-17 22:46:53.000000000 +0000 @@ -100,7 +100,7 @@ *> *> \param[out] TAUQ *> \verbatim -*> TAUQ is REAL array dimension (min(M,N)) +*> TAUQ is REAL array, dimension (min(M,N)) *> The scalar factors of the elementary reflectors which *> represent the orthogonal matrix Q. See Further Details. *> \endverbatim @@ -132,7 +132,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup realGEcomputational * @@ -189,10 +189,10 @@ * ===================================================================== SUBROUTINE SGEBD2( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, M, N diff -Nru lapack-3.7.0/SRC/sgebrd.f lapack-3.7.1/SRC/sgebrd.f --- lapack-3.7.0/SRC/sgebrd.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/sgebrd.f 2017-06-17 22:46:53.000000000 +0000 @@ -101,7 +101,7 @@ *> *> \param[out] TAUQ *> \verbatim -*> TAUQ is REAL array dimension (min(M,N)) +*> TAUQ is REAL array, dimension (min(M,N)) *> The scalar factors of the elementary reflectors which *> represent the orthogonal matrix Q. See Further Details. *> \endverbatim @@ -147,7 +147,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup realGEcomputational * @@ -205,10 +205,10 @@ SUBROUTINE SGEBRD( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK, $ INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LWORK, M, N diff -Nru lapack-3.7.0/SRC/sgees.f lapack-3.7.1/SRC/sgees.f --- lapack-3.7.0/SRC/sgees.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/sgees.f 2017-06-17 22:46:53.000000000 +0000 @@ -80,7 +80,7 @@ *> *> \param[in] SELECT *> \verbatim -*> SELECT is LOGICAL FUNCTION of two REAL arguments +*> SELECT is a LOGICAL FUNCTION of two REAL arguments *> SELECT must be declared EXTERNAL in the calling subroutine. *> If SORT = 'S', SELECT is used to select eigenvalues to sort *> to the top left of the Schur form. @@ -208,7 +208,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup realGEeigen * @@ -216,10 +216,10 @@ SUBROUTINE SGEES( JOBVS, SORT, SELECT, N, A, LDA, SDIM, WR, WI, $ VS, LDVS, WORK, LWORK, BWORK, INFO ) * -* -- LAPACK driver routine (version 3.7.0) -- +* -- LAPACK driver routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER JOBVS, SORT diff -Nru lapack-3.7.0/SRC/sgeevx.f lapack-3.7.1/SRC/sgeevx.f --- lapack-3.7.0/SRC/sgeevx.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/sgeevx.f 2017-06-17 22:46:53.000000000 +0000 @@ -25,11 +25,11 @@ * .. Scalar Arguments .. * CHARACTER BALANC, JOBVL, JOBVR, SENSE * INTEGER IHI, ILO, INFO, LDA, LDVL, LDVR, LWORK, N -* REAL ABNRM +* REAL ABNRM * .. * .. Array Arguments .. * INTEGER IWORK( * ) -* REAL A( LDA, * ), RCONDE( * ), RCONDV( * ), +* REAL A( LDA, * ), RCONDE( * ), RCONDV( * ), * $ SCALE( * ), VL( LDVL, * ), VR( LDVR, * ), * $ WI( * ), WORK( * ), WR( * ) * .. @@ -306,7 +306,7 @@ $ RCONDE, RCONDV, WORK, LWORK, IWORK, INFO ) implicit none * -* -- LAPACK driver routine (version 3.7.0) -- +* -- LAPACK driver routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 @@ -314,11 +314,11 @@ * .. Scalar Arguments .. CHARACTER BALANC, JOBVL, JOBVR, SENSE INTEGER IHI, ILO, INFO, LDA, LDVL, LDVR, LWORK, N - REAL ABNRM + REAL ABNRM * .. * .. Array Arguments .. INTEGER IWORK( * ) - REAL A( LDA, * ), RCONDE( * ), RCONDV( * ), + REAL A( LDA, * ), RCONDE( * ), RCONDV( * ), $ SCALE( * ), VL( LDVL, * ), VR( LDVR, * ), $ WI( * ), WORK( * ), WR( * ) * .. @@ -335,12 +335,12 @@ CHARACTER JOB, SIDE INTEGER HSWORK, I, ICOND, IERR, ITAU, IWRK, K, $ LWORK_TREVC, MAXWRK, MINWRK, NOUT - REAL ANRM, BIGNUM, CS, CSCALE, EPS, R, SCL, SMLNUM, + REAL ANRM, BIGNUM, CS, CSCALE, EPS, R, SCL, SMLNUM, $ SN * .. * .. Local Arrays .. LOGICAL SELECT( 1 ) - REAL DUM( 1 ) + REAL DUM( 1 ) * .. * .. External Subroutines .. EXTERNAL SGEBAK, SGEBAL, SGEHRD, SHSEQR, SLABAD, SLACPY, @@ -350,7 +350,7 @@ * .. External Functions .. LOGICAL LSAME INTEGER ISAMAX, ILAENV - REAL SLAMCH, SLANGE, SLAPY2, SNRM2 + REAL SLAMCH, SLANGE, SLAPY2, SNRM2 EXTERNAL LSAME, ISAMAX, ILAENV, SLAMCH, SLANGE, SLAPY2, $ SNRM2 * .. diff -Nru lapack-3.7.0/SRC/sgejsv.f lapack-3.7.1/SRC/sgejsv.f --- lapack-3.7.0/SRC/sgejsv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/sgejsv.f 2017-06-17 22:46:53.000000000 +0000 @@ -271,7 +271,7 @@ *> *> \param[out] WORK *> \verbatim -*> WORK is REAL array, dimension at least LWORK. +*> WORK is REAL array, dimension (LWORK) *> On exit, *> WORK(1) = SCALE = WORK(2) / WORK(1) is the scaling factor such *> that SCALE*SVA(1:N) are the computed singular values @@ -362,7 +362,7 @@ *> *> \param[out] IWORK *> \verbatim -*> IWORK is INTEGER array, dimension M+3*N. +*> IWORK is INTEGER array, dimension (M+3*N). *> On exit, *> IWORK(1) = the numerical rank determined after the initial *> QR factorization with pivoting. See the descriptions @@ -476,7 +476,7 @@ $ M, N, A, LDA, SVA, U, LDU, V, LDV, $ WORK, LWORK, IWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 diff -Nru lapack-3.7.0/SRC/sgelqt3.f lapack-3.7.1/SRC/sgelqt3.f --- lapack-3.7.0/SRC/sgelqt3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/sgelqt3.f 2017-06-17 22:46:53.000000000 +0000 @@ -83,7 +83,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleGEcomputational * @@ -92,8 +92,8 @@ *> *> \verbatim *> -*> The matrix V stores the elementary reflectors H(i) in the i-th column -*> below the diagonal. For example, if M=5 and N=3, the matrix V is +*> The matrix V stores the elementary reflectors H(i) in the i-th row +*> above the diagonal. For example, if M=5 and N=3, the matrix V is *> *> V = ( 1 v1 v1 v1 v1 ) *> ( 1 v2 v2 v2 ) @@ -114,10 +114,10 @@ * ===================================================================== RECURSIVE SUBROUTINE SGELQT3( M, N, A, LDA, T, LDT, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, M, N, LDT @@ -130,7 +130,7 @@ * * .. Parameters .. REAL ONE - PARAMETER ( ONE = 1.0D+00 ) + PARAMETER ( ONE = 1.0E+00 ) * .. * .. Local Scalars .. INTEGER I, I1, J, J1, M1, M2, N1, N2, IINFO diff -Nru lapack-3.7.0/SRC/sgelqt.f lapack-3.7.1/SRC/sgelqt.f --- lapack-3.7.0/SRC/sgelqt.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/sgelqt.f 2017-06-17 22:46:53.000000000 +0000 @@ -91,7 +91,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleGEcomputational * @@ -100,8 +100,8 @@ *> *> \verbatim *> -*> The matrix V stores the elementary reflectors H(i) in the i-th column -*> below the diagonal. For example, if M=5 and N=3, the matrix V is +*> The matrix V stores the elementary reflectors H(i) in the i-th row +*> above the diagonal. For example, if M=5 and N=3, the matrix V is *> *> V = ( 1 v1 v1 v1 v1 ) *> ( 1 v2 v2 v2 ) @@ -110,11 +110,11 @@ *> *> where the vi's represent the vectors which define H(i), which are returned *> in the matrix A. The 1's along the diagonal of V are not stored in A. -*> Let K=MIN(M,N). The number of blocks is B = ceiling(K/NB), where each -*> block is of order NB except for the last block, which is of order -*> IB = K - (B-1)*NB. For each of the B blocks, a upper triangular block -*> reflector factor is computed: T1, T2, ..., TB. The NB-by-NB (and IB-by-IB -*> for the last block) T's are stored in the NB-by-N matrix T as +*> Let K=MIN(M,N). The number of blocks is B = ceiling(K/MB), where each +*> block is of order MB except for the last block, which is of order +*> IB = K - (B-1)*MB. For each of the B blocks, a upper triangular block +*> reflector factor is computed: T1, T2, ..., TB. The MB-by-MB (and IB-by-IB +*> for the last block) T's are stored in the MB-by-K matrix T as *> *> T = (T1 T2 ... TB). *> \endverbatim @@ -122,10 +122,10 @@ * ===================================================================== SUBROUTINE SGELQT( M, N, MB, A, LDA, T, LDT, WORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDT, M, N, MB diff -Nru lapack-3.7.0/SRC/sgelsd.f lapack-3.7.1/SRC/sgelsd.f --- lapack-3.7.0/SRC/sgelsd.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/sgelsd.f 2017-06-17 22:46:53.000000000 +0000 @@ -89,7 +89,7 @@ *> of the matrices B and X. NRHS >= 0. *> \endverbatim *> -*> \param[in] A +*> \param[in,out] A *> \verbatim *> A is REAL array, dimension (LDA,N) *> On entry, the M-by-N matrix A. @@ -195,7 +195,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup realGEsolve * @@ -210,10 +210,10 @@ SUBROUTINE SGELSD( M, N, NRHS, A, LDA, B, LDB, S, RCOND, $ RANK, WORK, LWORK, IWORK, INFO ) * -* -- LAPACK driver routine (version 3.7.0) -- +* -- LAPACK driver routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS, RANK diff -Nru lapack-3.7.0/SRC/sgemlqt.f lapack-3.7.1/SRC/sgemlqt.f --- lapack-3.7.0/SRC/sgemlqt.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/sgemlqt.f 2017-06-17 22:46:53.000000000 +0000 @@ -18,7 +18,7 @@ *> *> \verbatim *> -*> DGEMQRT overwrites the general real M-by-N matrix C with +*> DGEMLQT overwrites the general real M-by-N matrix C with *> *> SIDE = 'L' SIDE = 'R' *> TRANS = 'N': Q C C Q @@ -82,7 +82,9 @@ *> *> \param[in] V *> \verbatim -*> V is REAL array, dimension (LDV,K) +*> V is REAL array, dimension +*> (LDV,M) if SIDE = 'L', +*> (LDV,N) if SIDE = 'R' *> The i-th row must contain the vector which defines the *> elementary reflector H(i), for i = 1,2,...,k, as returned by *> DGELQT in the first K rows of its array argument A. @@ -91,16 +93,14 @@ *> \param[in] LDV *> \verbatim *> LDV is INTEGER -*> The leading dimension of the array V. -*> If SIDE = 'L', LDA >= max(1,M); -*> if SIDE = 'R', LDA >= max(1,N). +*> The leading dimension of the array V. LDV >= max(1,K). *> \endverbatim *> *> \param[in] T *> \verbatim *> T is REAL array, dimension (LDT,K) *> The upper triangular factors of the block reflectors -*> as returned by DGELQT, stored as a MB-by-M matrix. +*> as returned by DGELQT, stored as a MB-by-K matrix. *> \endverbatim *> *> \param[in] LDT @@ -143,7 +143,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleGEcomputational * @@ -151,10 +151,10 @@ SUBROUTINE SGEMLQT( SIDE, TRANS, M, N, K, MB, V, LDV, T, LDT, $ C, LDC, WORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER SIDE, TRANS diff -Nru lapack-3.7.0/SRC/sgeqrt.f lapack-3.7.1/SRC/sgeqrt.f --- lapack-3.7.0/SRC/sgeqrt.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/sgeqrt.f 2017-06-17 22:46:53.000000000 +0000 @@ -108,7 +108,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup realGEcomputational * @@ -133,7 +133,7 @@ *> block is of order NB except for the last block, which is of order *> IB = K - (B-1)*NB. For each of the B blocks, a upper triangular block *> reflector factor is computed: T1, T2, ..., TB. The NB-by-NB (and IB-by-IB -*> for the last block) T's are stored in the NB-by-N matrix T as +*> for the last block) T's are stored in the NB-by-K matrix T as *> *> T = (T1 T2 ... TB). *> \endverbatim @@ -141,10 +141,10 @@ * ===================================================================== SUBROUTINE SGEQRT( M, N, NB, A, LDA, T, LDT, WORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDT, M, N, NB diff -Nru lapack-3.7.0/SRC/sgesvj.f lapack-3.7.1/SRC/sgesvj.f --- lapack-3.7.0/SRC/sgesvj.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/sgesvj.f 2017-06-17 22:46:53.000000000 +0000 @@ -54,7 +54,7 @@ * *> \param[in] JOBA *> \verbatim -*> JOBA is CHARACTER* 1 +*> JOBA is CHARACTER*1 *> Specifies the structure of A. *> = 'L': The input matrix A is lower triangular; *> = 'U': The input matrix A is upper triangular; @@ -208,7 +208,7 @@ *> *> \param[in,out] WORK *> \verbatim -*> WORK is REAL array, dimension MAX(6,M+N). +*> WORK is REAL array, dimension (LWORK) *> On entry, *> If JOBU .EQ. 'C' : *> WORK(1) = CTOL, where CTOL defines the threshold for convergence. @@ -260,7 +260,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup realGEcomputational * @@ -323,10 +323,10 @@ SUBROUTINE SGESVJ( JOBA, JOBU, JOBV, M, N, A, LDA, SVA, MV, V, $ LDV, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDV, LWORK, M, MV, N diff -Nru lapack-3.7.0/SRC/sgetrf2.f lapack-3.7.1/SRC/sgetrf2.f --- lapack-3.7.0/SRC/sgetrf2.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/sgetrf2.f 2017-06-17 22:46:53.000000000 +0000 @@ -38,7 +38,7 @@ *> *> [ A11 | A12 ] where A11 is n1 by n1 and A22 is n2 by n2 *> A = [ -----|----- ] with n1 = min(m,n)/2 -* [ A21 | A22 ] n2 = n-n1 +*> [ A21 | A22 ] n2 = n-n1 *> *> [ A11 ] *> The subroutine calls itself to factor [ --- ], @@ -113,7 +113,7 @@ * ===================================================================== RECURSIVE SUBROUTINE SGETRF2( M, N, A, LDA, IPIV, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 diff -Nru lapack-3.7.0/SRC/sgetsls.f lapack-3.7.1/SRC/sgetsls.f --- lapack-3.7.0/SRC/sgetsls.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/sgetsls.f 2017-06-17 22:46:53.000000000 +0000 @@ -152,7 +152,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleGEsolve * @@ -160,10 +160,10 @@ SUBROUTINE SGETSLS( TRANS, M, N, NRHS, A, LDA, B, LDB, $ WORK, LWORK, INFO ) * -* -- LAPACK driver routine (version 3.7.0) -- +* -- LAPACK driver routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER TRANS @@ -185,7 +185,7 @@ INTEGER I, IASCL, IBSCL, J, MINMN, MAXMN, BROW, $ SCLLEN, MNK, TSZO, TSZM, LWO, LWM, LW1, LW2, $ WSIZEO, WSIZEM, INFO2 - REAL ANRM, BIGNUM, BNRM, SMLNUM, TQ( 5 ), WORKQ + REAL ANRM, BIGNUM, BNRM, SMLNUM, TQ( 5 ), WORKQ( 1 ) * .. * .. External Functions .. LOGICAL LSAME @@ -233,31 +233,31 @@ IF( M.GE.N ) THEN CALL SGEQR( M, N, A, LDA, TQ, -1, WORKQ, -1, INFO2 ) TSZO = INT( TQ( 1 ) ) - LWO = INT( WORKQ ) + LWO = INT( WORKQ( 1 ) ) CALL SGEMQR( 'L', TRANS, M, NRHS, N, A, LDA, TQ, $ TSZO, B, LDB, WORKQ, -1, INFO2 ) - LWO = MAX( LWO, INT( WORKQ ) ) + LWO = MAX( LWO, INT( WORKQ( 1 ) ) ) CALL SGEQR( M, N, A, LDA, TQ, -2, WORKQ, -2, INFO2 ) TSZM = INT( TQ( 1 ) ) - LWM = INT( WORKQ ) + LWM = INT( WORKQ( 1 ) ) CALL SGEMQR( 'L', TRANS, M, NRHS, N, A, LDA, TQ, $ TSZM, B, LDB, WORKQ, -1, INFO2 ) - LWM = MAX( LWM, INT( WORKQ ) ) + LWM = MAX( LWM, INT( WORKQ( 1 ) ) ) WSIZEO = TSZO + LWO WSIZEM = TSZM + LWM ELSE CALL SGELQ( M, N, A, LDA, TQ, -1, WORKQ, -1, INFO2 ) TSZO = INT( TQ( 1 ) ) - LWO = INT( WORKQ ) + LWO = INT( WORKQ( 1 ) ) CALL SGEMLQ( 'L', TRANS, N, NRHS, M, A, LDA, TQ, $ TSZO, B, LDB, WORKQ, -1, INFO2 ) - LWO = MAX( LWO, INT( WORKQ ) ) + LWO = MAX( LWO, INT( WORKQ( 1 ) ) ) CALL SGELQ( M, N, A, LDA, TQ, -2, WORKQ, -2, INFO2 ) TSZM = INT( TQ( 1 ) ) - LWM = INT( WORKQ ) + LWM = INT( WORKQ( 1 ) ) CALL SGEMLQ( 'L', TRANS, N, NRHS, M, A, LDA, TQ, $ TSZO, B, LDB, WORKQ, -1, INFO2 ) - LWM = MAX( LWM, INT( WORKQ ) ) + LWM = MAX( LWM, INT( WORKQ( 1 ) ) ) WSIZEO = TSZO + LWO WSIZEM = TSZM + LWM END IF diff -Nru lapack-3.7.0/SRC/sggesx.f lapack-3.7.1/SRC/sggesx.f --- lapack-3.7.0/SRC/sggesx.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/sggesx.f 2017-06-17 22:46:53.000000000 +0000 @@ -111,7 +111,7 @@ *> *> \param[in] SELCTG *> \verbatim -*> SELCTG is procedure) LOGICAL FUNCTION of three REAL arguments +*> SELCTG is a LOGICAL FUNCTION of three REAL arguments *> SELCTG must be declared EXTERNAL in the calling subroutine. *> If SORT = 'N', SELCTG is not referenced. *> If SORT = 'S', SELCTG is used to select eigenvalues to sort @@ -337,7 +337,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup realGEeigen * @@ -365,10 +365,10 @@ $ VSR, LDVSR, RCONDE, RCONDV, WORK, LWORK, IWORK, $ LIWORK, BWORK, INFO ) * -* -- LAPACK driver routine (version 3.7.0) -- +* -- LAPACK driver routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER JOBVSL, JOBVSR, SENSE, SORT diff -Nru lapack-3.7.0/SRC/sgsvj0.f lapack-3.7.1/SRC/sgsvj0.f --- lapack-3.7.0/SRC/sgsvj0.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/sgsvj0.f 2017-06-17 22:46:53.000000000 +0000 @@ -169,7 +169,7 @@ *> *> \param[out] WORK *> \verbatim -*> WORK is REAL array, dimension LWORK. +*> WORK is REAL array, dimension (LWORK) *> \endverbatim *> *> \param[in] LWORK @@ -193,7 +193,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup realOTHERcomputational * @@ -218,10 +218,10 @@ SUBROUTINE SGSVJ0( JOBV, M, N, A, LDA, D, SVA, MV, V, LDV, EPS, $ SFMIN, TOL, NSWEEP, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDV, LWORK, M, MV, N, NSWEEP diff -Nru lapack-3.7.0/SRC/sgsvj1.f lapack-3.7.1/SRC/sgsvj1.f --- lapack-3.7.0/SRC/sgsvj1.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/sgsvj1.f 2017-06-17 22:46:53.000000000 +0000 @@ -199,7 +199,7 @@ *> *> \param[out] WORK *> \verbatim -*> WORK is REAL array, dimension LWORK. +*> WORK is REAL array, dimension (LWORK) *> \endverbatim *> *> \param[in] LWORK @@ -223,7 +223,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup realOTHERcomputational * @@ -236,10 +236,10 @@ SUBROUTINE SGSVJ1( JOBV, M, N, N1, A, LDA, D, SVA, MV, V, LDV, $ EPS, SFMIN, TOL, NSWEEP, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. REAL EPS, SFMIN, TOL diff -Nru lapack-3.7.0/SRC/sisnan.f lapack-3.7.1/SRC/sisnan.f --- lapack-3.7.0/SRC/sisnan.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/sisnan.f 2017-06-17 22:46:53.000000000 +0000 @@ -21,7 +21,7 @@ * LOGICAL FUNCTION SISNAN( SIN ) * * .. Scalar Arguments .. -* REAL SIN +* REAL, INTENT(IN) :: SIN * .. * * @@ -52,20 +52,20 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup OTHERauxiliary * * ===================================================================== LOGICAL FUNCTION SISNAN( SIN ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. - REAL SIN + REAL, INTENT(IN) :: SIN * .. * * ===================================================================== diff -Nru lapack-3.7.0/SRC/slabrd.f lapack-3.7.1/SRC/slabrd.f --- lapack-3.7.0/SRC/slabrd.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/slabrd.f 2017-06-17 22:46:53.000000000 +0000 @@ -110,7 +110,7 @@ *> *> \param[out] TAUQ *> \verbatim -*> TAUQ is REAL array dimension (NB) +*> TAUQ is REAL array, dimension (NB) *> The scalar factors of the elementary reflectors which *> represent the orthogonal matrix Q. See Further Details. *> \endverbatim @@ -156,7 +156,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup realOTHERauxiliary * @@ -210,10 +210,10 @@ SUBROUTINE SLABRD( M, N, NB, A, LDA, D, E, TAUQ, TAUP, X, LDX, Y, $ LDY ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER LDA, LDX, LDY, M, N, NB diff -Nru lapack-3.7.0/SRC/slaed3.f lapack-3.7.1/SRC/slaed3.f --- lapack-3.7.0/SRC/slaed3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/slaed3.f 2017-06-17 22:46:53.000000000 +0000 @@ -116,7 +116,7 @@ *> *> \param[in] Q2 *> \verbatim -*> Q2 is REAL array, dimension (LDQ2, N) +*> Q2 is REAL array, dimension (LDQ2*N) *> The first K columns of this matrix contain the non-deflated *> eigenvectors for the split problem. *> \endverbatim @@ -170,7 +170,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup auxOTHERcomputational * @@ -185,10 +185,10 @@ SUBROUTINE SLAED3( K, N, N1, D, Q, LDQ, RHO, DLAMDA, Q2, INDX, $ CTOT, W, S, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, K, LDQ, N, N1 diff -Nru lapack-3.7.0/SRC/sla_gbamv.f lapack-3.7.1/SRC/sla_gbamv.f --- lapack-3.7.0/SRC/sla_gbamv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/sla_gbamv.f 2017-06-17 22:46:53.000000000 +0000 @@ -106,7 +106,7 @@ *> *> \param[in] AB *> \verbatim -*> AB is REAL array of DIMENSION ( LDAB, n ) +*> AB is REAL array, dimension ( LDAB, n ) *> Before entry, the leading m by n part of the array AB must *> contain the matrix of coefficients. *> Unchanged on exit. @@ -177,7 +177,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup realGBcomputational * @@ -185,10 +185,10 @@ SUBROUTINE SLA_GBAMV( TRANS, M, N, KL, KU, ALPHA, AB, LDAB, X, $ INCX, BETA, Y, INCY ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. REAL ALPHA, BETA diff -Nru lapack-3.7.0/SRC/sla_gbrfsx_extended.f lapack-3.7.1/SRC/sla_gbrfsx_extended.f --- lapack-3.7.0/SRC/sla_gbrfsx_extended.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/sla_gbrfsx_extended.f 2017-06-17 22:46:53.000000000 +0000 @@ -208,8 +208,7 @@ *> *> \param[in,out] ERR_BNDS_NORM *> \verbatim -*> ERR_BNDS_NORM is REAL array, dimension -*> (NRHS, N_ERR_BNDS) +*> ERR_BNDS_NORM is REAL array, dimension (NRHS, N_ERR_BNDS) *> For each right-hand side, this array contains information about *> various error bounds and condition numbers corresponding to the *> normwise relative error, which is defined as follows: @@ -255,8 +254,7 @@ *> *> \param[in,out] ERR_BNDS_COMP *> \verbatim -*> ERR_BNDS_COMP is REAL array, dimension -*> (NRHS, N_ERR_BNDS) +*> ERR_BNDS_COMP is REAL array, dimension (NRHS, N_ERR_BNDS) *> For each right-hand side, this array contains information about *> various error bounds and condition numbers corresponding to the *> componentwise relative error, which is defined as follows: @@ -399,7 +397,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup realGBcomputational * @@ -412,10 +410,10 @@ $ Y_TAIL, RCOND, ITHRESH, RTHRESH, $ DZ_UB, IGNORE_CWISE, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDAB, LDAFB, LDB, LDY, N, KL, KU, NRHS, diff -Nru lapack-3.7.0/SRC/sla_geamv.f lapack-3.7.1/SRC/sla_geamv.f --- lapack-3.7.0/SRC/sla_geamv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/sla_geamv.f 2017-06-17 22:46:53.000000000 +0000 @@ -94,7 +94,7 @@ *> *> \param[in] A *> \verbatim -*> A is REAL array of DIMENSION ( LDA, n ) +*> A is REAL array, dimension ( LDA, n ) *> Before entry, the leading m by n part of the array A must *> contain the matrix of coefficients. *> Unchanged on exit. @@ -138,8 +138,8 @@ *> *> \param[in,out] Y *> \verbatim -*> Y is REAL -*> Array of DIMENSION at least +*> Y is REAL array, +*> dimension at least *> ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n' *> and at least *> ( 1 + ( n - 1 )*abs( INCY ) ) otherwise. @@ -166,7 +166,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup realGEcomputational * @@ -174,10 +174,10 @@ SUBROUTINE SLA_GEAMV ( TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA, $ Y, INCY ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. REAL ALPHA, BETA diff -Nru lapack-3.7.0/SRC/slaisnan.f lapack-3.7.1/SRC/slaisnan.f --- lapack-3.7.0/SRC/slaisnan.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/slaisnan.f 2017-06-17 22:46:53.000000000 +0000 @@ -21,7 +21,7 @@ * LOGICAL FUNCTION SLAISNAN( SIN1, SIN2 ) * * .. Scalar Arguments .. -* REAL SIN1, SIN2 +* REAL, INTENT(IN) :: SIN1, SIN2 * .. * * @@ -67,20 +67,20 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup OTHERauxiliary * * ===================================================================== LOGICAL FUNCTION SLAISNAN( SIN1, SIN2 ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. - REAL SIN1, SIN2 + REAL, INTENT(IN) :: SIN1, SIN2 * .. * * ===================================================================== diff -Nru lapack-3.7.0/SRC/slalsa.f lapack-3.7.1/SRC/slalsa.f --- lapack-3.7.0/SRC/slalsa.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/slalsa.f 2017-06-17 22:46:53.000000000 +0000 @@ -227,14 +227,12 @@ *> *> \param[out] WORK *> \verbatim -*> WORK is REAL array. -*> The dimension must be at least N. +*> WORK is REAL array, dimension (N) *> \endverbatim *> *> \param[out] IWORK *> \verbatim -*> IWORK is INTEGER array. -*> The dimension must be at least 3 * N +*> IWORK is INTEGER array, dimension (3*N) *> \endverbatim *> *> \param[out] INFO @@ -252,7 +250,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup realOTHERcomputational * @@ -269,10 +267,10 @@ $ GIVCOL, LDGCOL, PERM, GIVNUM, C, S, WORK, $ IWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER ICOMPQ, INFO, LDB, LDBX, LDGCOL, LDU, N, NRHS, diff -Nru lapack-3.7.0/SRC/slamswlq.f lapack-3.7.1/SRC/slamswlq.f --- lapack-3.7.0/SRC/slamswlq.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/slamswlq.f 2017-06-17 22:46:53.000000000 +0000 @@ -18,7 +18,7 @@ *> *> \verbatim *> -*> DLAMQRTS overwrites the general real M-by-N matrix C with +*> SLAMSWLQ overwrites the general real M-by-N matrix C with *> *> *> SIDE = 'L' SIDE = 'R' @@ -26,7 +26,7 @@ *> TRANS = 'T': Q**T * C C * Q**T *> where Q is a real orthogonal matrix defined as the product of blocked *> elementary reflectors computed by short wide LQ -*> factorization (DLASWLQ) +*> factorization (SLASWLQ) *> \endverbatim * * Arguments: @@ -49,7 +49,7 @@ *> \param[in] M *> \verbatim *> M is INTEGER -*> The number of rows of the matrix A. M >=0. +*> The number of rows of the matrix C. M >=0. *> \endverbatim *> *> \param[in] N @@ -88,12 +88,14 @@ *> *> \endverbatim *> -*> \param[in,out] A +*> \param[in] A *> \verbatim -*> A is REAL array, dimension (LDA,K) +*> A is REAL array, dimension +*> (LDA,M) if SIDE = 'L', +*> (LDA,N) if SIDE = 'R' *> The i-th row must contain the vector which defines the blocked *> elementary reflector H(i), for i = 1,2,...,k, as returned by -*> DLASWLQ in the first k rows of its array argument A. +*> SLASWLQ in the first k rows of its array argument A. *> \endverbatim *> *> \param[in] LDA @@ -200,10 +202,10 @@ SUBROUTINE SLAMSWLQ( SIDE, TRANS, M, N, K, MB, NB, A, LDA, T, $ LDT, C, LDC, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER SIDE, TRANS @@ -279,7 +281,7 @@ END IF * IF((NB.LE.K).OR.(NB.GE.MAX(M,N,K))) THEN - CALL DGEMLQT( SIDE, TRANS, M, N, K, MB, A, LDA, + CALL SGEMLQT( SIDE, TRANS, M, N, K, MB, A, LDA, $ T, LDT, C, LDC, WORK, INFO) RETURN END IF diff -Nru lapack-3.7.0/SRC/slamtsqr.f lapack-3.7.1/SRC/slamtsqr.f --- lapack-3.7.0/SRC/slamtsqr.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/slamtsqr.f 2017-06-17 22:46:53.000000000 +0000 @@ -81,7 +81,7 @@ *> N >= NB >= 1. *> \endverbatim *> -*> \param[in,out] A +*> \param[in] A *> \verbatim *> A is REAL array, dimension (LDA,K) *> The i-th column must contain the vector which defines the @@ -195,10 +195,10 @@ SUBROUTINE SLAMTSQR( SIDE, TRANS, M, N, K, MB, NB, A, LDA, T, $ LDT, C, LDC, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER SIDE, TRANS diff -Nru lapack-3.7.0/SRC/slapy2.f lapack-3.7.1/SRC/slapy2.f --- lapack-3.7.0/SRC/slapy2.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/slapy2.f 2017-06-17 22:46:53.000000000 +0000 @@ -56,17 +56,17 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup OTHERauxiliary * * ===================================================================== REAL FUNCTION SLAPY2( X, Y ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. REAL X, Y @@ -82,20 +82,35 @@ * .. * .. Local Scalars .. REAL W, XABS, YABS, Z + LOGICAL X_IS_NAN, Y_IS_NAN +* .. +* .. External Functions .. + LOGICAL SISNAN + EXTERNAL SISNAN * .. * .. Intrinsic Functions .. INTRINSIC ABS, MAX, MIN, SQRT * .. * .. Executable Statements .. * - XABS = ABS( X ) - YABS = ABS( Y ) - W = MAX( XABS, YABS ) - Z = MIN( XABS, YABS ) - IF( Z.EQ.ZERO ) THEN - SLAPY2 = W - ELSE - SLAPY2 = W*SQRT( ONE+( Z / W )**2 ) +* .. +* .. Executable Statements .. +* + X_IS_NAN = SISNAN( X ) + Y_IS_NAN = SISNAN( Y ) + IF ( X_IS_NAN ) SLAPY2 = X + IF ( Y_IS_NAN ) SLAPY2 = Y +* + IF ( .NOT.( X_IS_NAN.OR.Y_IS_NAN ) ) THEN + XABS = ABS( X ) + YABS = ABS( Y ) + W = MAX( XABS, YABS ) + Z = MIN( XABS, YABS ) + IF( Z.EQ.ZERO ) THEN + SLAPY2 = W + ELSE + SLAPY2 = W*SQRT( ONE+( Z / W )**2 ) + END IF END IF RETURN * diff -Nru lapack-3.7.0/SRC/slaqr1.f lapack-3.7.1/SRC/slaqr1.f --- lapack-3.7.0/SRC/slaqr1.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/slaqr1.f 2017-06-17 22:46:53.000000000 +0000 @@ -55,19 +55,19 @@ * *> \param[in] N *> \verbatim -*> N is integer +*> N is INTEGER *> Order of the matrix H. N must be either 2 or 3. *> \endverbatim *> *> \param[in] H *> \verbatim -*> H is REAL array of dimension (LDH,N) +*> H is REAL array, dimension (LDH,N) *> The 2-by-2 or 3-by-3 matrix H in (*). *> \endverbatim *> *> \param[in] LDH *> \verbatim -*> LDH is integer +*> LDH is INTEGER *> The leading dimension of H as declared in *> the calling procedure. LDH.GE.N *> \endverbatim @@ -95,7 +95,7 @@ *> *> \param[out] V *> \verbatim -*> V is REAL array of dimension N +*> V is REAL array, dimension (N) *> A scalar multiple of the first column of the *> matrix K in (*). *> \endverbatim @@ -108,7 +108,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup realOTHERauxiliary * @@ -121,10 +121,10 @@ * ===================================================================== SUBROUTINE SLAQR1( N, H, LDH, SR1, SI1, SR2, SI2, V ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. REAL SI1, SI2, SR1, SR2 diff -Nru lapack-3.7.0/SRC/slaqr2.f lapack-3.7.1/SRC/slaqr2.f --- lapack-3.7.0/SRC/slaqr2.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/slaqr2.f 2017-06-17 22:46:53.000000000 +0000 @@ -119,7 +119,7 @@ *> *> \param[in] LDH *> \verbatim -*> LDH is integer +*> LDH is INTEGER *> Leading dimension of H just as declared in the calling *> subroutine. N .LE. LDH *> \endverbatim @@ -147,14 +147,14 @@ *> *> \param[in] LDZ *> \verbatim -*> LDZ is integer +*> LDZ is INTEGER *> The leading dimension of Z just as declared in the *> calling subroutine. 1 .LE. LDZ. *> \endverbatim *> *> \param[out] NS *> \verbatim -*> NS is integer +*> NS is INTEGER *> The number of unconverged (ie approximate) eigenvalues *> returned in SR and SI that may be used as shifts by the *> calling subroutine. @@ -162,19 +162,19 @@ *> *> \param[out] ND *> \verbatim -*> ND is integer +*> ND is INTEGER *> The number of converged eigenvalues uncovered by this *> subroutine. *> \endverbatim *> *> \param[out] SR *> \verbatim -*> SR is REAL array, dimension KBOT +*> SR is REAL array, dimension (KBOT) *> \endverbatim *> *> \param[out] SI *> \verbatim -*> SI is REAL array, dimension KBOT +*> SI is REAL array, dimension (KBOT) *> On output, the real and imaginary parts of approximate *> eigenvalues that may be used for shifts are stored in *> SR(KBOT-ND-NS+1) through SR(KBOT-ND) and @@ -192,14 +192,14 @@ *> *> \param[in] LDV *> \verbatim -*> LDV is integer scalar +*> LDV is INTEGER *> The leading dimension of V just as declared in the *> calling subroutine. NW .LE. LDV *> \endverbatim *> *> \param[in] NH *> \verbatim -*> NH is integer scalar +*> NH is INTEGER *> The number of columns of T. NH.GE.NW. *> \endverbatim *> @@ -210,14 +210,14 @@ *> *> \param[in] LDT *> \verbatim -*> LDT is integer +*> LDT is INTEGER *> The leading dimension of T just as declared in the *> calling subroutine. NW .LE. LDT *> \endverbatim *> *> \param[in] NV *> \verbatim -*> NV is integer +*> NV is INTEGER *> The number of rows of work array WV available for *> workspace. NV.GE.NW. *> \endverbatim @@ -229,21 +229,21 @@ *> *> \param[in] LDWV *> \verbatim -*> LDWV is integer +*> LDWV is INTEGER *> The leading dimension of W just as declared in the *> calling subroutine. NW .LE. LDV *> \endverbatim *> *> \param[out] WORK *> \verbatim -*> WORK is REAL array, dimension LWORK. +*> WORK is REAL array, dimension (LWORK) *> On exit, WORK(1) is set to an estimate of the optimal value *> of LWORK for the given values of N, NW, KTOP and KBOT. *> \endverbatim *> *> \param[in] LWORK *> \verbatim -*> LWORK is integer +*> LWORK is INTEGER *> The dimension of the work array WORK. LWORK = 2*NW *> suffices, but greater efficiency may result from larger *> values of LWORK. @@ -263,7 +263,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup realOTHERauxiliary * @@ -278,10 +278,10 @@ $ IHIZ, Z, LDZ, NS, ND, SR, SI, V, LDV, NH, T, $ LDT, NV, WV, LDWV, WORK, LWORK ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV, diff -Nru lapack-3.7.0/SRC/slaqr3.f lapack-3.7.1/SRC/slaqr3.f --- lapack-3.7.0/SRC/slaqr3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/slaqr3.f 2017-06-17 22:46:53.000000000 +0000 @@ -116,7 +116,7 @@ *> *> \param[in] LDH *> \verbatim -*> LDH is integer +*> LDH is INTEGER *> Leading dimension of H just as declared in the calling *> subroutine. N .LE. LDH *> \endverbatim @@ -144,14 +144,14 @@ *> *> \param[in] LDZ *> \verbatim -*> LDZ is integer +*> LDZ is INTEGER *> The leading dimension of Z just as declared in the *> calling subroutine. 1 .LE. LDZ. *> \endverbatim *> *> \param[out] NS *> \verbatim -*> NS is integer +*> NS is INTEGER *> The number of unconverged (ie approximate) eigenvalues *> returned in SR and SI that may be used as shifts by the *> calling subroutine. @@ -159,19 +159,19 @@ *> *> \param[out] ND *> \verbatim -*> ND is integer +*> ND is INTEGER *> The number of converged eigenvalues uncovered by this *> subroutine. *> \endverbatim *> *> \param[out] SR *> \verbatim -*> SR is REAL array, dimension KBOT +*> SR is REAL array, dimension (KBOT) *> \endverbatim *> *> \param[out] SI *> \verbatim -*> SI is REAL array, dimension KBOT +*> SI is REAL array, dimension (KBOT) *> On output, the real and imaginary parts of approximate *> eigenvalues that may be used for shifts are stored in *> SR(KBOT-ND-NS+1) through SR(KBOT-ND) and @@ -189,14 +189,14 @@ *> *> \param[in] LDV *> \verbatim -*> LDV is integer scalar +*> LDV is INTEGER *> The leading dimension of V just as declared in the *> calling subroutine. NW .LE. LDV *> \endverbatim *> *> \param[in] NH *> \verbatim -*> NH is integer scalar +*> NH is INTEGER *> The number of columns of T. NH.GE.NW. *> \endverbatim *> @@ -207,14 +207,14 @@ *> *> \param[in] LDT *> \verbatim -*> LDT is integer +*> LDT is INTEGER *> The leading dimension of T just as declared in the *> calling subroutine. NW .LE. LDT *> \endverbatim *> *> \param[in] NV *> \verbatim -*> NV is integer +*> NV is INTEGER *> The number of rows of work array WV available for *> workspace. NV.GE.NW. *> \endverbatim @@ -226,21 +226,21 @@ *> *> \param[in] LDWV *> \verbatim -*> LDWV is integer +*> LDWV is INTEGER *> The leading dimension of W just as declared in the *> calling subroutine. NW .LE. LDV *> \endverbatim *> *> \param[out] WORK *> \verbatim -*> WORK is REAL array, dimension LWORK. +*> WORK is REAL array, dimension (LWORK) *> On exit, WORK(1) is set to an estimate of the optimal value *> of LWORK for the given values of N, NW, KTOP and KBOT. *> \endverbatim *> *> \param[in] LWORK *> \verbatim -*> LWORK is integer +*> LWORK is INTEGER *> The dimension of the work array WORK. LWORK = 2*NW *> suffices, but greater efficiency may result from larger *> values of LWORK. @@ -275,7 +275,7 @@ $ IHIZ, Z, LDZ, NS, ND, SR, SI, V, LDV, NH, T, $ LDT, NV, WV, LDWV, WORK, LWORK ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 diff -Nru lapack-3.7.0/SRC/slaqr5.f lapack-3.7.1/SRC/slaqr5.f --- lapack-3.7.0/SRC/slaqr5.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/slaqr5.f 2017-06-17 22:46:53.000000000 +0000 @@ -48,21 +48,21 @@ * *> \param[in] WANTT *> \verbatim -*> WANTT is logical scalar +*> WANTT is LOGICAL *> WANTT = .true. if the quasi-triangular Schur factor *> is being computed. WANTT is set to .false. otherwise. *> \endverbatim *> *> \param[in] WANTZ *> \verbatim -*> WANTZ is logical scalar +*> WANTZ is LOGICAL *> WANTZ = .true. if the orthogonal Schur factor is being *> computed. WANTZ is set to .false. otherwise. *> \endverbatim *> *> \param[in] KACC22 *> \verbatim -*> KACC22 is integer with value 0, 1, or 2. +*> KACC22 is INTEGER with value 0, 1, or 2. *> Specifies the computation mode of far-from-diagonal *> orthogonal updates. *> = 0: SLAQR5 does not accumulate reflections and does not @@ -78,19 +78,19 @@ *> *> \param[in] N *> \verbatim -*> N is integer scalar +*> N is INTEGER *> N is the order of the Hessenberg matrix H upon which this *> subroutine operates. *> \endverbatim *> *> \param[in] KTOP *> \verbatim -*> KTOP is integer scalar +*> KTOP is INTEGER *> \endverbatim *> *> \param[in] KBOT *> \verbatim -*> KBOT is integer scalar +*> KBOT is INTEGER *> These are the first and last rows and columns of an *> isolated diagonal block upon which the QR sweep is to be *> applied. It is assumed without a check that @@ -101,19 +101,19 @@ *> *> \param[in] NSHFTS *> \verbatim -*> NSHFTS is integer scalar +*> NSHFTS is INTEGER *> NSHFTS gives the number of simultaneous shifts. NSHFTS *> must be positive and even. *> \endverbatim *> *> \param[in,out] SR *> \verbatim -*> SR is REAL array of size (NSHFTS) +*> SR is REAL array, dimension (NSHFTS) *> \endverbatim *> *> \param[in,out] SI *> \verbatim -*> SI is REAL array of size (NSHFTS) +*> SI is REAL array, dimension (NSHFTS) *> SR contains the real parts and SI contains the imaginary *> parts of the NSHFTS shifts of origin that define the *> multi-shift QR sweep. On output SR and SI may be @@ -122,7 +122,7 @@ *> *> \param[in,out] H *> \verbatim -*> H is REAL array of size (LDH,N) +*> H is REAL array, dimension (LDH,N) *> On input H contains a Hessenberg matrix. On output a *> multi-shift QR sweep with shifts SR(J)+i*SI(J) is applied *> to the isolated diagonal block in rows and columns KTOP @@ -131,7 +131,7 @@ *> *> \param[in] LDH *> \verbatim -*> LDH is integer scalar +*> LDH is INTEGER *> LDH is the leading dimension of H just as declared in the *> calling procedure. LDH.GE.MAX(1,N). *> \endverbatim @@ -150,7 +150,7 @@ *> *> \param[in,out] Z *> \verbatim -*> Z is REAL array of size (LDZ,IHIZ) +*> Z is REAL array, dimension (LDZ,IHIZ) *> If WANTZ = .TRUE., then the QR Sweep orthogonal *> similarity transformation is accumulated into *> Z(ILOZ:IHIZ,ILOZ:IHIZ) from the right. @@ -159,71 +159,69 @@ *> *> \param[in] LDZ *> \verbatim -*> LDZ is integer scalar +*> LDZ is INTEGER *> LDA is the leading dimension of Z just as declared in *> the calling procedure. LDZ.GE.N. *> \endverbatim *> *> \param[out] V *> \verbatim -*> V is REAL array of size (LDV,NSHFTS/2) +*> V is REAL array, dimension (LDV,NSHFTS/2) *> \endverbatim *> *> \param[in] LDV *> \verbatim -*> LDV is integer scalar +*> LDV is INTEGER *> LDV is the leading dimension of V as declared in the *> calling procedure. LDV.GE.3. *> \endverbatim *> *> \param[out] U *> \verbatim -*> U is REAL array of size -*> (LDU,3*NSHFTS-3) +*> U is REAL array, dimension (LDU,3*NSHFTS-3) *> \endverbatim *> *> \param[in] LDU *> \verbatim -*> LDU is integer scalar +*> LDU is INTEGER *> LDU is the leading dimension of U just as declared in the *> in the calling subroutine. LDU.GE.3*NSHFTS-3. *> \endverbatim *> *> \param[in] NH *> \verbatim -*> NH is integer scalar +*> NH is INTEGER *> NH is the number of columns in array WH available for *> workspace. NH.GE.1. *> \endverbatim *> *> \param[out] WH *> \verbatim -*> WH is REAL array of size (LDWH,NH) +*> WH is REAL array, dimension (LDWH,NH) *> \endverbatim *> *> \param[in] LDWH *> \verbatim -*> LDWH is integer scalar +*> LDWH is INTEGER *> Leading dimension of WH just as declared in the *> calling procedure. LDWH.GE.3*NSHFTS-3. *> \endverbatim *> *> \param[in] NV *> \verbatim -*> NV is integer scalar +*> NV is INTEGER *> NV is the number of rows in WV agailable for workspace. *> NV.GE.1. *> \endverbatim *> *> \param[out] WV *> \verbatim -*> WV is REAL array of size -*> (LDWV,3*NSHFTS-3) +*> WV is REAL array, dimension (LDWV,3*NSHFTS-3) *> \endverbatim *> *> \param[in] LDWV *> \verbatim -*> LDWV is integer scalar +*> LDWV is INTEGER *> LDWV is the leading dimension of WV as declared in the *> in the calling subroutine. LDWV.GE.NV. *> \endverbatim @@ -259,7 +257,7 @@ $ SR, SI, H, LDH, ILOZ, IHIZ, Z, LDZ, V, LDV, U, $ LDU, NV, WV, LDWV, NH, WH, LDWH ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 diff -Nru lapack-3.7.0/SRC/slarra.f lapack-3.7.1/SRC/slarra.f --- lapack-3.7.0/SRC/slarra.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/slarra.f 2017-06-17 22:46:53.000000000 +0000 @@ -119,7 +119,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup OTHERauxiliary * @@ -136,10 +136,10 @@ SUBROUTINE SLARRA( N, D, E, E2, SPLTOL, TNRM, $ NSPLIT, ISPLIT, INFO ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, N, NSPLIT @@ -167,7 +167,13 @@ * .. Executable Statements .. * INFO = 0 - +* +* Quick return if possible +* + IF( N.LE.0 ) THEN + RETURN + END IF +* * Compute splitting points NSPLIT = 1 IF(SPLTOL.LT.ZERO) THEN diff -Nru lapack-3.7.0/SRC/slarrb.f lapack-3.7.1/SRC/slarrb.f --- lapack-3.7.0/SRC/slarrb.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/slarrb.f 2017-06-17 22:46:53.000000000 +0000 @@ -107,7 +107,7 @@ *> \verbatim *> W is REAL array, dimension (N) *> On input, W( IFIRST-OFFSET ) through W( ILAST-OFFSET ) are -*> estimates of the eigenvalues of L D L^T indexed IFIRST throug +*> estimates of the eigenvalues of L D L^T indexed IFIRST through *> ILAST. *> On output, these estimates are refined. *> \endverbatim @@ -178,7 +178,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup OTHERauxiliary * @@ -196,10 +196,10 @@ $ RTOL2, OFFSET, W, WGAP, WERR, WORK, IWORK, $ PIVMIN, SPDIAM, TWIST, INFO ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER IFIRST, ILAST, INFO, N, OFFSET, TWIST @@ -237,6 +237,12 @@ * INFO = 0 * +* Quick return if possible +* + IF( N.LE.0 ) THEN + RETURN + END IF +* MAXITR = INT( ( LOG( SPDIAM+PIVMIN )-LOG( PIVMIN ) ) / $ LOG( TWO ) ) + 2 MNWDTH = TWO * PIVMIN diff -Nru lapack-3.7.0/SRC/slarrc.f lapack-3.7.1/SRC/slarrc.f --- lapack-3.7.0/SRC/slarrc.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/slarrc.f 2017-06-17 22:46:53.000000000 +0000 @@ -137,7 +137,7 @@ SUBROUTINE SLARRC( JOBT, N, VL, VU, D, E, PIVMIN, $ EIGCNT, LCNT, RCNT, INFO ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 @@ -170,6 +170,13 @@ * .. Executable Statements .. * INFO = 0 +* +* Quick return if possible +* + IF( N.LE.0 ) THEN + RETURN + END IF +* LCNT = 0 RCNT = 0 EIGCNT = 0 diff -Nru lapack-3.7.0/SRC/slarrd.f lapack-3.7.1/SRC/slarrd.f --- lapack-3.7.0/SRC/slarrd.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/slarrd.f 2017-06-17 22:46:53.000000000 +0000 @@ -329,7 +329,7 @@ $ M, W, WERR, WL, WU, IBLOCK, INDEXW, $ WORK, IWORK, INFO ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 @@ -385,6 +385,12 @@ * INFO = 0 * +* Quick return if possible +* + IF( N.LE.0 ) THEN + RETURN + END IF +* * Decode RANGE * IF( LSAME( RANGE, 'A' ) ) THEN diff -Nru lapack-3.7.0/SRC/slarre.f lapack-3.7.1/SRC/slarre.f --- lapack-3.7.0/SRC/slarre.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/slarre.f 2017-06-17 22:46:53.000000000 +0000 @@ -305,7 +305,7 @@ $ W, WERR, WGAP, IBLOCK, INDEXW, GERS, PIVMIN, $ WORK, IWORK, INFO ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 @@ -370,7 +370,12 @@ * INFO = 0 - +* +* Quick return if possible +* + IF( N.LE.0 ) THEN + RETURN + END IF * * Decode RANGE * diff -Nru lapack-3.7.0/SRC/slarrf.f lapack-3.7.1/SRC/slarrf.f --- lapack-3.7.0/SRC/slarrf.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/slarrf.f 2017-06-17 22:46:53.000000000 +0000 @@ -193,7 +193,7 @@ $ SPDIAM, CLGAPL, CLGAPR, PIVMIN, SIGMA, $ DPLUS, LPLUS, WORK, INFO ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 @@ -239,6 +239,13 @@ * .. Executable Statements .. * INFO = 0 +* +* Quick return if possible +* + IF( N.LE.0 ) THEN + RETURN + END IF +* FACT = REAL(2**KTRYMAX) EPS = SLAMCH( 'Precision' ) SHIFT = 0 diff -Nru lapack-3.7.0/SRC/slarrj.f lapack-3.7.1/SRC/slarrj.f --- lapack-3.7.0/SRC/slarrj.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/slarrj.f 2017-06-17 22:46:53.000000000 +0000 @@ -150,7 +150,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup OTHERauxiliary * @@ -168,10 +168,10 @@ $ RTOL, OFFSET, W, WERR, WORK, IWORK, $ PIVMIN, SPDIAM, INFO ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER IFIRST, ILAST, INFO, N, OFFSET @@ -204,6 +204,12 @@ * INFO = 0 * +* Quick return if possible +* + IF( N.LE.0 ) THEN + RETURN + END IF +* MAXITR = INT( ( LOG( SPDIAM+PIVMIN )-LOG( PIVMIN ) ) / $ LOG( TWO ) ) + 2 * diff -Nru lapack-3.7.0/SRC/slarrk.f lapack-3.7.1/SRC/slarrk.f --- lapack-3.7.0/SRC/slarrk.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/slarrk.f 2017-06-17 22:46:53.000000000 +0000 @@ -137,7 +137,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup OTHERauxiliary * @@ -145,10 +145,10 @@ SUBROUTINE SLARRK( N, IW, GL, GU, $ D, E2, PIVMIN, RELTOL, W, WERR, INFO) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, IW, N @@ -179,6 +179,13 @@ * .. * .. Executable Statements .. * +* Quick return if possible +* + IF( N.LE.0 ) THEN + INFO = 0 + RETURN + END IF +* * Get machine constants EPS = SLAMCH( 'P' ) diff -Nru lapack-3.7.0/SRC/slarrr.f lapack-3.7.1/SRC/slarrr.f --- lapack-3.7.0/SRC/slarrr.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/slarrr.f 2017-06-17 22:46:53.000000000 +0000 @@ -78,7 +78,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup OTHERauxiliary * @@ -94,10 +94,10 @@ * ===================================================================== SUBROUTINE SLARRR( N, D, E, INFO ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER N, INFO @@ -130,6 +130,13 @@ * .. * .. Executable Statements .. * +* Quick return if possible +* + IF( N.LE.0 ) THEN + INFO = 0 + RETURN + END IF +* * As a default, do NOT go for relative-accuracy preserving computations. INFO = 1 diff -Nru lapack-3.7.0/SRC/slarrv.f lapack-3.7.1/SRC/slarrv.f --- lapack-3.7.0/SRC/slarrv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/slarrv.f 2017-06-17 22:46:53.000000000 +0000 @@ -68,8 +68,14 @@ *> \verbatim *> VU is REAL *> Upper bound of the interval that contains the desired -*> eigenvalues. VL < VU. Needed to compute gaps on the left or right -*> end of the extremal eigenvalues in the desired RANGE. +*> eigenvalues. VL < VU. +*> Note: VU is currently not used by this implmentation of SLARRV, VU is +*> passed to SLARRV because it could be used compute gaps on the right end +*> of the extremal eigenvalues. However, with not much initial accuracy in +*> LAMBDA and VU, the formula can lead to an overestimation of the right gap +*> and thus to inadequately early RQI 'convergence'. This is currently +*> prevented this by forcing a small right gap. And so it turns out that VU +*> is currently not used by this implementation of SLARRV. *> \endverbatim *> *> \param[in,out] D @@ -286,7 +292,7 @@ $ IBLOCK, INDEXW, GERS, Z, LDZ, ISUPPZ, $ WORK, IWORK, INFO ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 @@ -344,6 +350,13 @@ * .. INFO = 0 +* +* Quick return if possible +* + IF( N.LE.0 ) THEN + RETURN + END IF +* * The first N entries of WORK are reserved for the eigenvalues INDLD = N+1 INDLLD= 2*N+1 diff -Nru lapack-3.7.0/SRC/slasd0.f lapack-3.7.1/SRC/slasd0.f --- lapack-3.7.0/SRC/slasd0.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/slasd0.f 2017-06-17 22:46:53.000000000 +0000 @@ -81,7 +81,7 @@ *> *> \param[out] U *> \verbatim -*> U is REAL array, dimension at least (LDQ, N) +*> U is REAL array, dimension (LDU, N) *> On exit, U contains the left singular vectors. *> \endverbatim *> @@ -93,7 +93,7 @@ *> *> \param[out] VT *> \verbatim -*> VT is REAL array, dimension at least (LDVT, M) +*> VT is REAL array, dimension (LDVT, M) *> On exit, VT**T contains the right singular vectors. *> \endverbatim *> @@ -136,7 +136,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup OTHERauxiliary * @@ -150,10 +150,10 @@ SUBROUTINE SLASD0( N, SQRE, D, E, U, LDU, VT, LDVT, SMLSIZ, IWORK, $ WORK, INFO ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDU, LDVT, N, SMLSIZ, SQRE diff -Nru lapack-3.7.0/SRC/slasd3.f lapack-3.7.1/SRC/slasd3.f --- lapack-3.7.0/SRC/slasd3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/slasd3.f 2017-06-17 22:46:53.000000000 +0000 @@ -94,8 +94,7 @@ *> *> \param[out] Q *> \verbatim -*> Q is REAL array, -*> dimension at least (LDQ,K). +*> Q is REAL array, dimension (LDQ,K) *> \endverbatim *> *> \param[in] LDQ @@ -210,7 +209,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup OTHERauxiliary * @@ -225,10 +224,10 @@ $ LDU2, VT, LDVT, VT2, LDVT2, IDXC, CTOT, Z, $ INFO ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, K, LDQ, LDU, LDU2, LDVT, LDVT2, NL, NR, diff -Nru lapack-3.7.0/SRC/slasd8.f lapack-3.7.1/SRC/slasd8.f --- lapack-3.7.0/SRC/slasd8.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/slasd8.f 2017-06-17 22:46:53.000000000 +0000 @@ -133,7 +133,7 @@ *> *> \param[out] WORK *> \verbatim -*> WORK is REAL array, dimension at least 3 * K +*> WORK is REAL array, dimension (3*K) *> \endverbatim *> *> \param[out] INFO @@ -152,7 +152,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup OTHERauxiliary * @@ -166,10 +166,10 @@ SUBROUTINE SLASD8( ICOMPQ, K, D, Z, VF, VL, DIFL, DIFR, LDDIFR, $ DSIGMA, WORK, INFO ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER ICOMPQ, INFO, K, LDDIFR diff -Nru lapack-3.7.0/SRC/slasq4.f lapack-3.7.1/SRC/slasq4.f --- lapack-3.7.0/SRC/slasq4.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/slasq4.f 2017-06-17 22:46:53.000000000 +0000 @@ -151,7 +151,7 @@ SUBROUTINE SLASQ4( I0, N0, Z, PP, N0IN, DMIN, DMIN1, DMIN2, DN, $ DN1, DN2, TAU, TTYPE, G ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 @@ -240,7 +240,6 @@ NP = NN - 9 ELSE NP = NN - 2*PP - B2 = Z( NP-2 ) GAM = DN1 IF( Z( NP-4 ) .GT. Z( NP-2 ) ) $ RETURN diff -Nru lapack-3.7.0/SRC/slaswlq.f lapack-3.7.1/SRC/slaswlq.f --- lapack-3.7.0/SRC/slaswlq.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/slaswlq.f 2017-06-17 22:46:53.000000000 +0000 @@ -55,7 +55,7 @@ *> \verbatim *> A is REAL array, dimension (LDA,N) *> On entry, the M-by-N matrix A. -*> On exit, the elements on and bleow the diagonal +*> On exit, the elements on and below the diagonal *> of the array contain the N-by-N lower triangular matrix L; *> the elements above the diagonal represent Q by the rows *> of blocked V (see Further Details). @@ -150,10 +150,10 @@ SUBROUTINE SLASWLQ( M, N, MB, NB, A, LDA, T, LDT, WORK, LWORK, $ INFO) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd. -- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, M, N, MB, NB, LWORK, LDT diff -Nru lapack-3.7.0/SRC/slaswp.f lapack-3.7.1/SRC/slaswp.f --- lapack-3.7.0/SRC/slaswp.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/slaswp.f 2017-06-17 22:46:53.000000000 +0000 @@ -79,14 +79,15 @@ *> \verbatim *> IPIV is INTEGER array, dimension (K1+(K2-K1)*abs(INCX)) *> The vector of pivot indices. Only the elements in positions -*> K1 through K1+(K2-K1)*INCX of IPIV are accessed. -*> IPIV(K) = L implies rows K and L are to be interchanged. +*> K1 through K1+(K2-K1)*abs(INCX) of IPIV are accessed. +*> IPIV(K1+(K-K1)*abs(INCX)) = L implies rows K and L are to be +*> interchanged. *> \endverbatim *> *> \param[in] INCX *> \verbatim *> INCX is INTEGER -*> The increment between successive values of IPIV. If IPIV +*> The increment between successive values of IPIV. If INCX *> is negative, the pivots are applied in reverse order. *> \endverbatim * @@ -98,7 +99,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup realOTHERauxiliary * @@ -114,10 +115,10 @@ * ===================================================================== SUBROUTINE SLASWP( N, A, LDA, K1, K2, IPIV, INCX ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INCX, K1, K2, LDA, N @@ -135,7 +136,8 @@ * .. * .. Executable Statements .. * -* Interchange row I with row IPIV(I) for each of rows K1 through K2. +* Interchange row I with row IPIV(K1+(I-K1)*abs(INCX)) for each of rows +* K1 through K2. * IF( INCX.GT.0 ) THEN IX0 = K1 diff -Nru lapack-3.7.0/SRC/sla_syamv.f lapack-3.7.1/SRC/sla_syamv.f --- lapack-3.7.0/SRC/sla_syamv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/sla_syamv.f 2017-06-17 22:46:53.000000000 +0000 @@ -88,7 +88,7 @@ *> *> \param[in] A *> \verbatim -*> A is REAL array of DIMENSION ( LDA, n ). +*> A is REAL array, dimension ( LDA, n ). *> Before entry, the leading m by n part of the array A must *> contain the matrix of coefficients. *> Unchanged on exit. @@ -153,7 +153,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup realSYcomputational * @@ -177,10 +177,10 @@ SUBROUTINE SLA_SYAMV( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y, $ INCY ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. REAL ALPHA, BETA diff -Nru lapack-3.7.0/SRC/slasyf_aa.f lapack-3.7.1/SRC/slasyf_aa.f --- lapack-3.7.0/SRC/slasyf_aa.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/slasyf_aa.f 2017-06-17 22:46:53.000000000 +0000 @@ -19,11 +19,11 @@ * =========== * * SUBROUTINE SLASYF_AA( UPLO, J1, M, NB, A, LDA, IPIV, -* H, LDH, WORK, INFO ) +* H, LDH, WORK ) * * .. Scalar Arguments .. * CHARACTER UPLO -* INTEGER J1, M, NB, LDA, LDH, INFO +* INTEGER J1, M, NB, LDA, LDH * .. * .. Array Arguments .. * INTEGER IPIV( * ) @@ -99,12 +99,12 @@ *> \param[in] LDA *> \verbatim *> LDA is INTEGER -*> The leading dimension of the array A. LDA >= max(1,N). +*> The leading dimension of the array A. LDA >= max(1,M). *> \endverbatim *> *> \param[out] IPIV *> \verbatim -*> IPIV is INTEGER array, dimension (N) +*> IPIV is INTEGER array, dimension (M) *> Details of the row and column interchanges, *> the row and column k were interchanged with the row and *> column IPIV(k). @@ -127,16 +127,6 @@ *> WORK is REAL workspace, dimension (M). *> \endverbatim *> -*> \param[out] INFO -*> \verbatim -*> INFO is INTEGER -*> = 0: successful exit -*> < 0: if INFO = -i, the i-th argument had an illegal value -*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization -*> has been completed, but the block diagonal matrix D is -*> exactly singular, and division by zero will occur if it -*> is used to solve a system of equations. -*> \endverbatim * * Authors: * ======== @@ -146,24 +136,24 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup realSYcomputational * * ===================================================================== SUBROUTINE SLASYF_AA( UPLO, J1, M, NB, A, LDA, IPIV, - $ H, LDH, WORK, INFO ) + $ H, LDH, WORK ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * IMPLICIT NONE * * .. Scalar Arguments .. CHARACTER UPLO - INTEGER M, NB, J1, LDA, LDH, INFO + INTEGER M, NB, J1, LDA, LDH * .. * .. Array Arguments .. INTEGER IPIV( * ) @@ -192,7 +182,6 @@ * .. * .. Executable Statements .. * - INFO = 0 J = 1 * * K1 is the first column of the panel to be factorized @@ -217,8 +206,8 @@ * K = J1+J-1 * -* H(J:N, J) := A(J, J:N) - H(J:N, 1:(J-1)) * L(J1:(J-1), J), -* where H(J:N, J) has been initialized to be A(J, J:N) +* H(J:M, J) := A(J, J:M) - H(J:M, 1:(J-1)) * L(J1:(J-1), J), +* where H(J:M, J) has been initialized to be A(J, J:M) * IF( K.GT.2 ) THEN * @@ -234,14 +223,14 @@ $ ONE, H( J, J ), 1 ) END IF * -* Copy H(i:n, i) into WORK +* Copy H(i:M, i) into WORK * CALL SCOPY( M-J+1, H( J, J ), 1, WORK( 1 ), 1 ) * IF( J.GT.K1 ) THEN * -* Compute WORK := WORK - L(J-1, J:N) * T(J-1,J), -* where A(J-1, J) stores T(J-1, J) and A(J-2, J:N) stores U(J-1, J:N) +* Compute WORK := WORK - L(J-1, J:M) * T(J-1,J), +* where A(J-1, J) stores T(J-1, J) and A(J-2, J:M) stores U(J-1, J:M) * ALPHA = -A( K-1, J ) CALL SAXPY( M-J+1, ALPHA, A( K-2, J ), LDA, WORK( 1 ), 1 ) @@ -253,8 +242,8 @@ * IF( J.LT.M ) THEN * -* Compute WORK(2:N) = T(J, J) L(J, (J+1):N) -* where A(J, J) stores T(J, J) and A(J-1, (J+1):N) stores U(J, (J+1):N) +* Compute WORK(2:M) = T(J, J) L(J, (J+1):M) +* where A(J, J) stores T(J, J) and A(J-1, (J+1):M) stores U(J, (J+1):M) * IF( K.GT.1 ) THEN ALPHA = -A( K, J ) @@ -262,7 +251,7 @@ $ WORK( 2 ), 1 ) ENDIF * -* Find max(|WORK(2:n)|) +* Find max(|WORK(2:M)|) * I2 = ISAMAX( M-J, WORK( 2 ), 1 ) + 1 PIV = WORK( I2 ) @@ -277,14 +266,14 @@ WORK( I2 ) = WORK( I1 ) WORK( I1 ) = PIV * -* Swap A(I1, I1+1:N) with A(I1+1:N, I2) +* Swap A(I1, I1+1:M) with A(I1+1:M, I2) * I1 = I1+J-1 I2 = I2+J-1 CALL SSWAP( I2-I1-1, A( J1+I1-1, I1+1 ), LDA, $ A( J1+I1, I2 ), 1 ) * -* Swap A(I1, I2+1:N) with A(I2, I2+1:N) +* Swap A(I1, I2+1:M) with A(I2, I2+1:M) * CALL SSWAP( M-I2, A( J1+I1-1, I2+1 ), LDA, $ A( J1+I2-1, I2+1 ), LDA ) @@ -315,23 +304,17 @@ * Set A(J, J+1) = T(J, J+1) * A( K, J+1 ) = WORK( 2 ) - IF( (A( K, J ).EQ.ZERO ) .AND. - $ ( (J.EQ.M) .OR. (A( K, J+1 ).EQ.ZERO))) THEN - IF(INFO .EQ. 0) THEN - INFO = J - ENDIF - END IF * IF( J.LT.NB ) THEN * -* Copy A(J+1:N, J+1) into H(J:N, J), +* Copy A(J+1:M, J+1) into H(J:M, J), * CALL SCOPY( M-J, A( K+1, J+1 ), LDA, $ H( J+1, J+1 ), 1 ) END IF * -* Compute L(J+2, J+1) = WORK( 3:N ) / T(J, J+1), -* where A(J, J+1) = T(J, J+1) and A(J+2:N, J) = L(J+2:N, J+1) +* Compute L(J+2, J+1) = WORK( 3:M ) / T(J, J+1), +* where A(J, J+1) = T(J, J+1) and A(J+2:M, J) = L(J+2:M, J+1) * IF( A( K, J+1 ).NE.ZERO ) THEN ALPHA = ONE / A( K, J+1 ) @@ -341,10 +324,6 @@ CALL SLASET( 'Full', 1, M-J-1, ZERO, ZERO, $ A( K, J+2 ), LDA) END IF - ELSE - IF( (A( K, J ).EQ.ZERO) .AND. (INFO.EQ.0) ) THEN - INFO = J - END IF END IF J = J + 1 GO TO 10 @@ -367,8 +346,8 @@ * K = J1+J-1 * -* H(J:N, J) := A(J:N, J) - H(J:N, 1:(J-1)) * L(J, J1:(J-1))^T, -* where H(J:N, J) has been initialized to be A(J:N, J) +* H(J:M, J) := A(J:M, J) - H(J:M, 1:(J-1)) * L(J, J1:(J-1))^T, +* where H(J:M, J) has been initialized to be A(J:M, J) * IF( K.GT.2 ) THEN * @@ -384,13 +363,13 @@ $ ONE, H( J, J ), 1 ) END IF * -* Copy H(J:N, J) into WORK +* Copy H(J:M, J) into WORK * CALL SCOPY( M-J+1, H( J, J ), 1, WORK( 1 ), 1 ) * IF( J.GT.K1 ) THEN * -* Compute WORK := WORK - L(J:N, J-1) * T(J-1,J), +* Compute WORK := WORK - L(J:M, J-1) * T(J-1,J), * where A(J-1, J) = T(J-1, J) and A(J, J-2) = L(J, J-1) * ALPHA = -A( J, K-1 ) @@ -403,8 +382,8 @@ * IF( J.LT.M ) THEN * -* Compute WORK(2:N) = T(J, J) L((J+1):N, J) -* where A(J, J) = T(J, J) and A((J+1):N, J-1) = L((J+1):N, J) +* Compute WORK(2:M) = T(J, J) L((J+1):M, J) +* where A(J, J) = T(J, J) and A((J+1):M, J-1) = L((J+1):M, J) * IF( K.GT.1 ) THEN ALPHA = -A( J, K ) @@ -412,7 +391,7 @@ $ WORK( 2 ), 1 ) ENDIF * -* Find max(|WORK(2:n)|) +* Find max(|WORK(2:M)|) * I2 = ISAMAX( M-J, WORK( 2 ), 1 ) + 1 PIV = WORK( I2 ) @@ -427,14 +406,14 @@ WORK( I2 ) = WORK( I1 ) WORK( I1 ) = PIV * -* Swap A(I1+1:N, I1) with A(I2, I1+1:N) +* Swap A(I1+1:M, I1) with A(I2, I1+1:M) * I1 = I1+J-1 I2 = I2+J-1 CALL SSWAP( I2-I1-1, A( I1+1, J1+I1-1 ), 1, $ A( I2, J1+I1 ), LDA ) * -* Swap A(I2+1:N, I1) with A(I2+1:N, I2) +* Swap A(I2+1:M, I1) with A(I2+1:M, I2) * CALL SSWAP( M-I2, A( I2+1, J1+I1-1 ), 1, $ A( I2+1, J1+I2-1 ), 1 ) @@ -465,22 +444,17 @@ * Set A(J+1, J) = T(J+1, J) * A( J+1, K ) = WORK( 2 ) - IF( (A( J, K ).EQ.ZERO) .AND. - $ ( (J.EQ.M) .OR. (A( J+1, K ).EQ.ZERO)) ) THEN - IF (INFO .EQ. 0) - $ INFO = J - END IF * IF( J.LT.NB ) THEN * -* Copy A(J+1:N, J+1) into H(J+1:N, J), +* Copy A(J+1:M, J+1) into H(J+1:M, J), * CALL SCOPY( M-J, A( J+1, K+1 ), 1, $ H( J+1, J+1 ), 1 ) END IF * -* Compute L(J+2, J+1) = WORK( 3:N ) / T(J, J+1), -* where A(J, J+1) = T(J, J+1) and A(J+2:N, J) = L(J+2:N, J+1) +* Compute L(J+2, J+1) = WORK( 3:M ) / T(J, J+1), +* where A(J, J+1) = T(J, J+1) and A(J+2:M, J) = L(J+2:M, J+1) * IF( A( J+1, K ).NE.ZERO ) THEN ALPHA = ONE / A( J+1, K ) @@ -490,10 +464,6 @@ CALL SLASET( 'Full', M-J-1, 1, ZERO, ZERO, $ A( J+2, K ), LDA ) END IF - ELSE - IF( (A( J, K ).EQ.ZERO) .AND. (INFO.EQ.0) ) THEN - INFO = J - END IF END IF J = J + 1 GO TO 30 diff -Nru lapack-3.7.0/SRC/sorbdb1.f lapack-3.7.1/SRC/sorbdb1.f --- lapack-3.7.0/SRC/sorbdb1.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/sorbdb1.f 2017-06-17 22:46:53.000000000 +0000 @@ -32,7 +32,7 @@ * * *> \par Purpose: -*> ============= +* ============= *> *>\verbatim *> @@ -203,7 +203,7 @@ SUBROUTINE SORBDB1( M, P, Q, X11, LDX11, X21, LDX21, THETA, PHI, $ TAUP1, TAUP2, TAUQ1, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * July 2012 diff -Nru lapack-3.7.0/SRC/sorbdb2.f lapack-3.7.1/SRC/sorbdb2.f --- lapack-3.7.0/SRC/sorbdb2.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/sorbdb2.f 2017-06-17 22:46:53.000000000 +0000 @@ -32,7 +32,7 @@ * * *> \par Purpose: -*> ============= +* ============= *> *>\verbatim *> @@ -201,7 +201,7 @@ SUBROUTINE SORBDB2( M, P, Q, X11, LDX11, X21, LDX21, THETA, PHI, $ TAUP1, TAUP2, TAUQ1, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * July 2012 diff -Nru lapack-3.7.0/SRC/sorbdb3.f lapack-3.7.1/SRC/sorbdb3.f --- lapack-3.7.0/SRC/sorbdb3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/sorbdb3.f 2017-06-17 22:46:53.000000000 +0000 @@ -32,7 +32,7 @@ * * *> \par Purpose: -*> ============= +* ============= *> *>\verbatim *> @@ -202,7 +202,7 @@ SUBROUTINE SORBDB3( M, P, Q, X11, LDX11, X21, LDX21, THETA, PHI, $ TAUP1, TAUP2, TAUQ1, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * July 2012 diff -Nru lapack-3.7.0/SRC/sorbdb4.f lapack-3.7.1/SRC/sorbdb4.f --- lapack-3.7.0/SRC/sorbdb4.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/sorbdb4.f 2017-06-17 22:46:53.000000000 +0000 @@ -33,7 +33,7 @@ * * *> \par Purpose: -*> ============= +* ============= *> *>\verbatim *> @@ -214,7 +214,7 @@ $ TAUP1, TAUP2, TAUQ1, PHANTOM, WORK, LWORK, $ INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * July 2012 diff -Nru lapack-3.7.0/SRC/sorbdb5.f lapack-3.7.1/SRC/sorbdb5.f --- lapack-3.7.0/SRC/sorbdb5.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/sorbdb5.f 2017-06-17 22:46:53.000000000 +0000 @@ -31,7 +31,7 @@ * * *> \par Purpose: -*> ============= +* ============= *> *>\verbatim *> @@ -156,7 +156,7 @@ SUBROUTINE SORBDB5( M1, M2, N, X1, INCX1, X2, INCX2, Q1, LDQ1, Q2, $ LDQ2, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * July 2012 diff -Nru lapack-3.7.0/SRC/sorbdb6.f lapack-3.7.1/SRC/sorbdb6.f --- lapack-3.7.0/SRC/sorbdb6.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/sorbdb6.f 2017-06-17 22:46:53.000000000 +0000 @@ -31,7 +31,7 @@ * * *> \par Purpose: -*> ============= +* ============= *> *>\verbatim *> @@ -154,7 +154,7 @@ SUBROUTINE SORBDB6( M1, M2, N, X1, INCX1, X2, INCX2, Q1, LDQ1, Q2, $ LDQ2, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * July 2012 diff -Nru lapack-3.7.0/SRC/sorcsd2by1.f lapack-3.7.1/SRC/sorcsd2by1.f --- lapack-3.7.0/SRC/sorcsd2by1.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/sorcsd2by1.f 2017-06-17 22:46:53.000000000 +0000 @@ -36,7 +36,7 @@ * * *> \par Purpose: -*> ============= +* ============= *> *>\verbatim *> @@ -233,7 +233,7 @@ $ X21, LDX21, THETA, U1, LDU1, U2, LDU2, V1T, $ LDV1T, WORK, LWORK, IWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * July 2012 diff -Nru lapack-3.7.0/SRC/sorcsd.f lapack-3.7.1/SRC/sorcsd.f --- lapack-3.7.0/SRC/sorcsd.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/sorcsd.f 2017-06-17 22:46:53.000000000 +0000 @@ -186,7 +186,7 @@ *> *> \param[out] U1 *> \verbatim -*> U1 is REAL array, dimension (P) +*> U1 is REAL array, dimension (LDU1,P) *> If JOBU1 = 'Y', U1 contains the P-by-P orthogonal matrix U1. *> \endverbatim *> @@ -199,7 +199,7 @@ *> *> \param[out] U2 *> \verbatim -*> U2 is REAL array, dimension (M-P) +*> U2 is REAL array, dimension (LDU2,M-P) *> If JOBU2 = 'Y', U2 contains the (M-P)-by-(M-P) orthogonal *> matrix U2. *> \endverbatim @@ -213,7 +213,7 @@ *> *> \param[out] V1T *> \verbatim -*> V1T is REAL array, dimension (Q) +*> V1T is REAL array, dimension (LDV1T,Q) *> If JOBV1T = 'Y', V1T contains the Q-by-Q matrix orthogonal *> matrix V1**T. *> \endverbatim @@ -227,7 +227,7 @@ *> *> \param[out] V2T *> \verbatim -*> V2T is REAL array, dimension (M-Q) +*> V2T is REAL array, dimension (LDV2T,M-Q) *> If JOBV2T = 'Y', V2T contains the (M-Q)-by-(M-Q) orthogonal *> matrix V2**T. *> \endverbatim @@ -289,7 +289,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup realOTHERcomputational * @@ -300,10 +300,10 @@ $ U1, LDU1, U2, LDU2, V1T, LDV1T, V2T, $ LDV2T, WORK, LWORK, IWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER JOBU1, JOBU2, JOBV1T, JOBV2T, SIGNS, TRANS diff -Nru lapack-3.7.0/SRC/sorm22.f lapack-3.7.1/SRC/sorm22.f --- lapack-3.7.0/SRC/sorm22.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/sorm22.f 2017-06-17 22:46:53.000000000 +0000 @@ -53,8 +53,8 @@ *> N2-by-N2 upper triangular matrix. *> \endverbatim * -* Arguments -* ========= +* Arguments: +* ========== * *> \param[in] SIDE *> \verbatim @@ -163,7 +163,7 @@ SUBROUTINE SORM22( SIDE, TRANS, M, N, N1, N2, Q, LDQ, C, LDC, $ WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.6.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * January 2015 diff -Nru lapack-3.7.0/SRC/sppsvx.f lapack-3.7.1/SRC/sppsvx.f --- lapack-3.7.0/SRC/sppsvx.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/sppsvx.f 2017-06-17 22:46:53.000000000 +0000 @@ -147,8 +147,7 @@ *> *> \param[in,out] AFP *> \verbatim -*> AFP is REAL array, dimension -*> (N*(N+1)/2) +*> AFP is REAL array, dimension (N*(N+1)/2) *> If FACT = 'F', then AFP is an input argument and on entry *> contains the triangular factor U or L from the Cholesky *> factorization A = U**T*U or A = L*L**T, in the same storage @@ -312,7 +311,7 @@ SUBROUTINE SPPSVX( FACT, UPLO, N, NRHS, AP, AFP, EQUED, S, B, LDB, $ X, LDX, RCOND, FERR, BERR, WORK, IWORK, INFO ) * -* -- LAPACK driver routine (version 3.7.0) -- +* -- LAPACK driver routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * April 2012 diff -Nru lapack-3.7.0/SRC/ssb2st_kernels.f lapack-3.7.1/SRC/ssb2st_kernels.f --- lapack-3.7.0/SRC/ssb2st_kernels.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/ssb2st_kernels.f 2017-06-17 22:46:53.000000000 +0000 @@ -47,45 +47,90 @@ * Arguments: * ========== * -*> @param[in] n -*> The order of the matrix A. -*> -*> @param[in] nb -*> The size of the band. -*> -*> @param[in, out] A -*> A pointer to the matrix A. -*> -*> @param[in] lda -*> The leading dimension of the matrix A. +*> \param[in] UPLO +*> \verbatim +*> UPLO is CHARACTER*1 +*> \endverbatim *> -*> @param[out] V -*> REAL array, dimension 2*n if eigenvalues only are -*> requested or to be queried for vectors. +*> \param[in] WANTZ +*> \verbatim +*> WANTZ is LOGICAL which indicate if Eigenvalue are requested or both +*> Eigenvalue/Eigenvectors. +*> \endverbatim *> -*> @param[out] TAU -*> REAL array, dimension (2*n). -*> The scalar factors of the Householder reflectors are stored -*> in this array. +*> \param[in] TTYPE +*> \verbatim +*> TTYPE is INTEGER +*> \endverbatim *> -*> @param[in] st +*> \param[in] ST +*> \verbatim +*> ST is INTEGER *> internal parameter for indices. +*> \endverbatim *> -*> @param[in] ed +*> \param[in] ED +*> \verbatim +*> ED is INTEGER *> internal parameter for indices. +*> \endverbatim *> -*> @param[in] sweep +*> \param[in] SWEEP +*> \verbatim +*> SWEEP is INTEGER *> internal parameter for indices. +*> \endverbatim *> -*> @param[in] Vblksiz -*> internal parameter for indices. +*> \param[in] N +*> \verbatim +*> N is INTEGER. The order of the matrix A. +*> \endverbatim *> -*> @param[in] wantz -*> logical which indicate if Eigenvalue are requested or both -*> Eigenvalue/Eigenvectors. +*> \param[in] NB +*> \verbatim +*> NB is INTEGER. The size of the band. +*> \endverbatim +*> +*> \param[in] IB +*> \verbatim +*> IB is INTEGER. +*> \endverbatim +*> +*> \param[in, out] A +*> \verbatim +*> A is REAL array. A pointer to the matrix A. +*> \endverbatim +*> +*> \param[in] LDA +*> \verbatim +*> LDA is INTEGER. The leading dimension of the matrix A. +*> \endverbatim +*> +*> \param[out] V +*> \verbatim +*> V is REAL array, dimension 2*n if eigenvalues only are +*> requested or to be queried for vectors. +*> \endverbatim +*> +*> \param[out] TAU +*> \verbatim +*> TAU is REAL array, dimension (2*n). +*> The scalar factors of the Householder reflectors are stored +*> in this array. +*> \endverbatim +*> +*> \param[in] LDVT +*> \verbatim +*> LDVT is INTEGER. +*> \endverbatim +*> +*> \param[in] WORK +*> \verbatim +*> WORK is REAL array. Workspace of size nb. +*> \endverbatim +*> @param[in] n +*> The order of the matrix A. *> -*> @param[in] work -*> Workspace of size nb. *> *> \par Further Details: * ===================== @@ -128,10 +173,10 @@ * IMPLICIT NONE * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/SRC/ssbev_2stage.f lapack-3.7.1/SRC/ssbev_2stage.f --- lapack-3.7.0/SRC/ssbev_2stage.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/ssbev_2stage.f 2017-06-17 22:46:53.000000000 +0000 @@ -164,7 +164,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup realOTHEReigen * @@ -206,10 +206,10 @@ * IMPLICIT NONE * -* -- LAPACK driver routine (version 3.7.0) -- +* -- LAPACK driver routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER JOBZ, UPLO @@ -239,7 +239,7 @@ EXTERNAL LSAME, SLAMCH, SLANSB, ILAENV * .. * .. External Subroutines .. - EXTERNAL SLASCL, SSCAL, SSTEQR, SSTERF, XERBLA + EXTERNAL SLASCL, SSCAL, SSTEQR, SSTERF, XERBLA, $ SSYTRD_SB2ST * .. * .. Intrinsic Functions .. diff -Nru lapack-3.7.0/SRC/ssbgvx.f lapack-3.7.1/SRC/ssbgvx.f --- lapack-3.7.0/SRC/ssbgvx.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/ssbgvx.f 2017-06-17 22:46:53.000000000 +0000 @@ -241,12 +241,12 @@ *> *> \param[out] WORK *> \verbatim -*> WORK is REAL array, dimension (7N) +*> WORK is REAL array, dimension (7*N) *> \endverbatim *> *> \param[out] IWORK *> \verbatim -*> IWORK is INTEGER array, dimension (5N) +*> IWORK is INTEGER array, dimension (5*N) *> \endverbatim *> *> \param[out] IFAIL @@ -294,7 +294,7 @@ $ LDBB, Q, LDQ, VL, VU, IL, IU, ABSTOL, M, W, Z, $ LDZ, WORK, IWORK, IFAIL, INFO ) * -* -- LAPACK driver routine (version 3.7.0) -- +* -- LAPACK driver routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 diff -Nru lapack-3.7.0/SRC/ssfrk.f lapack-3.7.1/SRC/ssfrk.f --- lapack-3.7.0/SRC/ssfrk.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/ssfrk.f 2017-06-17 22:46:53.000000000 +0000 @@ -117,7 +117,7 @@ *> *> \param[in] A *> \verbatim -*> A is REAL array of DIMENSION (LDA,ka) +*> A is REAL array, dimension (LDA,ka) *> where KA *> is K when TRANS = 'N' or 'n', and is N otherwise. Before *> entry with TRANS = 'N' or 'n', the leading N--by--K part of @@ -158,7 +158,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup realOTHERcomputational * @@ -166,10 +166,10 @@ SUBROUTINE SSFRK( TRANSR, UPLO, TRANS, N, K, ALPHA, A, LDA, BETA, $ C ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. REAL ALPHA, BETA diff -Nru lapack-3.7.0/SRC/sspgv.f lapack-3.7.1/SRC/sspgv.f --- lapack-3.7.0/SRC/sspgv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/sspgv.f 2017-06-17 22:46:53.000000000 +0000 @@ -77,8 +77,7 @@ *> *> \param[in,out] AP *> \verbatim -*> AP is REAL array, dimension -*> (N*(N+1)/2) +*> AP is REAL array, dimension (N*(N+1)/2) *> On entry, the upper or lower triangle of the symmetric matrix *> A, packed columnwise in a linear array. The j-th column of A *> is stored in the array AP as follows: @@ -153,7 +152,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup realOTHEReigen * @@ -161,10 +160,10 @@ SUBROUTINE SSPGV( ITYPE, JOBZ, UPLO, N, AP, BP, W, Z, LDZ, WORK, $ INFO ) * -* -- LAPACK driver routine (version 3.7.0) -- +* -- LAPACK driver routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER JOBZ, UPLO diff -Nru lapack-3.7.0/SRC/sspsvx.f lapack-3.7.1/SRC/sspsvx.f --- lapack-3.7.0/SRC/sspsvx.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/sspsvx.f 2017-06-17 22:46:53.000000000 +0000 @@ -123,8 +123,7 @@ *> *> \param[in,out] AFP *> \verbatim -*> AFP is REAL array, dimension -*> (N*(N+1)/2) +*> AFP is REAL array, dimension (N*(N+1)/2) *> If FACT = 'F', then AFP is an input argument and on entry *> contains the block diagonal matrix D and the multipliers used *> to obtain the factor U or L from the factorization @@ -277,7 +276,7 @@ SUBROUTINE SSPSVX( FACT, UPLO, N, NRHS, AP, AFP, IPIV, B, LDB, X, $ LDX, RCOND, FERR, BERR, WORK, IWORK, INFO ) * -* -- LAPACK driver routine (version 3.7.0) -- +* -- LAPACK driver routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * April 2012 diff -Nru lapack-3.7.0/SRC/sstegr.f lapack-3.7.1/SRC/sstegr.f --- lapack-3.7.0/SRC/sstegr.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/sstegr.f 2017-06-17 22:46:53.000000000 +0000 @@ -184,7 +184,7 @@ *> *> \param[out] ISUPPZ *> \verbatim -*> ISUPPZ is INTEGER ARRAY, dimension ( 2*max(1,M) ) +*> ISUPPZ is INTEGER array, dimension ( 2*max(1,M) ) *> The support of the eigenvectors in Z, i.e., the indices *> indicating the nonzero elements in Z. The i-th computed eigenvector *> is nonzero only in elements ISUPPZ( 2*i-1 ) through @@ -265,7 +265,7 @@ $ ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK, $ LIWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 diff -Nru lapack-3.7.0/SRC/sstemr.f lapack-3.7.1/SRC/sstemr.f --- lapack-3.7.0/SRC/sstemr.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/sstemr.f 2017-06-17 22:46:53.000000000 +0000 @@ -222,7 +222,7 @@ *> *> \param[out] ISUPPZ *> \verbatim -*> ISUPPZ is INTEGER ARRAY, dimension ( 2*max(1,M) ) +*> ISUPPZ is INTEGER array, dimension ( 2*max(1,M) ) *> The support of the eigenvectors in Z, i.e., the indices *> indicating the nonzero elements in Z. The i-th computed eigenvector *> is nonzero only in elements ISUPPZ( 2*i-1 ) through @@ -321,7 +321,7 @@ $ M, W, Z, LDZ, NZC, ISUPPZ, TRYRAC, WORK, LWORK, $ IWORK, LIWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 diff -Nru lapack-3.7.0/SRC/ssycon_3.f lapack-3.7.1/SRC/ssycon_3.f --- lapack-3.7.0/SRC/ssycon_3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/ssycon_3.f 2017-06-17 22:46:53.000000000 +0000 @@ -95,7 +95,7 @@ *> On entry, contains the superdiagonal (or subdiagonal) *> elements of the symmetric block diagonal matrix D *> with 1-by-1 or 2-by-2 diagonal blocks, where -*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; +*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. *> *> NOTE: For 1-by-1 diagonal block D(k), where @@ -149,7 +149,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup singleSYcomputational * @@ -157,7 +157,7 @@ * ================== *> \verbatim *> -*> December 2016, Igor Kozachenko, +*> June 2017, Igor Kozachenko, *> Computer Science Division, *> University of California, Berkeley *> @@ -171,10 +171,10 @@ SUBROUTINE SSYCON_3( UPLO, N, A, LDA, E, IPIV, ANORM, RCOND, $ WORK, IWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/SRC/ssyconvf.f lapack-3.7.1/SRC/ssyconvf.f --- lapack-3.7.0/SRC/ssyconvf.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/ssyconvf.f 2017-06-17 22:46:53.000000000 +0000 @@ -45,7 +45,7 @@ *> If parameter WAY = 'R': *> SSYCONVF performs the conversion in reverse direction, i.e. *> converts the factorization output format used in SSYTRF_RK -*> (or SSYTRF_BK) provided on entry in parametes A and E into +*> (or SSYTRF_BK) provided on entry in parameters A and E into *> the factorization output format used in SSYTRF that is stored *> on exit in parameter A. It also coverts in place details of *> the intechanges stored in IPIV from the format used in SSYTRF_RK @@ -189,7 +189,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup singleSYcomputational * @@ -198,7 +198,7 @@ *> *> \verbatim *> -*> December 2016, Igor Kozachenko, +*> June 2017, Igor Kozachenko, *> Computer Science Division, *> University of California, Berkeley *> @@ -206,10 +206,10 @@ * ===================================================================== SUBROUTINE SSYCONVF( UPLO, WAY, N, A, LDA, E, IPIV, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO, WAY diff -Nru lapack-3.7.0/SRC/ssyconvf_rook.f lapack-3.7.1/SRC/ssyconvf_rook.f --- lapack-3.7.0/SRC/ssyconvf_rook.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/ssyconvf_rook.f 2017-06-17 22:46:53.000000000 +0000 @@ -44,7 +44,7 @@ *> If parameter WAY = 'R': *> SSYCONVF_ROOK performs the conversion in reverse direction, i.e. *> converts the factorization output format used in SSYTRF_RK -*> (or SSYTRF_BK) provided on entry in parametes A and E into +*> (or SSYTRF_BK) provided on entry in parameters A and E into *> the factorization output format used in SSYTRF_ROOK that is stored *> on exit in parameter A. IPIV format for SSYTRF_ROOK and *> SSYTRF_RK (or SSYTRF_BK) is the same and is not converted. @@ -180,7 +180,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup singleSYcomputational * @@ -189,7 +189,7 @@ *> *> \verbatim *> -*> December 2016, Igor Kozachenko, +*> June 2017, Igor Kozachenko, *> Computer Science Division, *> University of California, Berkeley *> @@ -197,10 +197,10 @@ * ===================================================================== SUBROUTINE SSYCONVF_ROOK( UPLO, WAY, N, A, LDA, E, IPIV, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO, WAY diff -Nru lapack-3.7.0/SRC/ssygv_2stage.f lapack-3.7.1/SRC/ssygv_2stage.f --- lapack-3.7.0/SRC/ssygv_2stage.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/ssygv_2stage.f 2017-06-17 22:46:53.000000000 +0000 @@ -46,7 +46,7 @@ *> positive definite. *> This routine use the 2stage technique for the reduction to tridiagonal *> which showed higher performance on recent architecture and for large -* sizes N>2000. +*> sizes N>2000. *> \endverbatim * * Arguments: @@ -186,7 +186,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup realSYeigen * @@ -228,10 +228,10 @@ * IMPLICIT NONE * -* -- LAPACK driver routine (version 3.7.0) -- +* -- LAPACK driver routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER JOBZ, UPLO diff -Nru lapack-3.7.0/SRC/ssygvx.f lapack-3.7.1/SRC/ssygvx.f --- lapack-3.7.0/SRC/ssygvx.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/ssygvx.f 2017-06-17 22:46:53.000000000 +0000 @@ -110,7 +110,7 @@ *> *> \param[in,out] B *> \verbatim -*> B is REAL array, dimension (LDA, N) +*> B is REAL array, dimension (LDB, N) *> On entry, the symmetric matrix B. If UPLO = 'U', the *> leading N-by-N upper triangular part of B contains the *> upper triangular part of the matrix B. If UPLO = 'L', @@ -297,7 +297,7 @@ $ VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, $ LWORK, IWORK, IFAIL, INFO ) * -* -- LAPACK driver routine (version 3.7.0) -- +* -- LAPACK driver routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 diff -Nru lapack-3.7.0/SRC/ssytrd_2stage.f lapack-3.7.1/SRC/ssytrd_2stage.f --- lapack-3.7.0/SRC/ssytrd_2stage.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/ssytrd_2stage.f 2017-06-17 22:46:53.000000000 +0000 @@ -144,7 +144,7 @@ *> *> \param[out] WORK *> \verbatim -*> WORK is REAL array, dimension LWORK. +*> WORK is REAL array, dimension (LWORK) *> \endverbatim *> *> \param[in] LWORK @@ -183,7 +183,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup realSYcomputational * @@ -227,10 +227,10 @@ * IMPLICIT NONE * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER VECT, UPLO diff -Nru lapack-3.7.0/SRC/ssytrd_sy2sb.f lapack-3.7.1/SRC/ssytrd_sy2sb.f --- lapack-3.7.0/SRC/ssytrd_sy2sb.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/ssytrd_sy2sb.f 2017-06-17 22:46:53.000000000 +0000 @@ -123,7 +123,7 @@ *> *> \param[out] WORK *> \verbatim -*> WORK is REAL array, dimension LWORK. +*> WORK is REAL array, dimension (LWORK) *> On exit, if INFO = 0, or if LWORK=-1, *> WORK(1) returns the size of LWORK. *> \endverbatim @@ -132,7 +132,7 @@ *> \verbatim *> LWORK is INTEGER *> The dimension of the array WORK which should be calculated -* by a workspace query. LWORK = MAX(1, LWORK_QUERY) +*> by a workspace query. LWORK = MAX(1, LWORK_QUERY) *> If LWORK = -1, then a workspace query is assumed; the routine *> only calculates the optimal size of the WORK array, returns *> this value as the first entry of the WORK array, and no error @@ -158,7 +158,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup realSYcomputational * @@ -222,7 +222,7 @@ *> *> where tau is a real scalar, and v is a real vector with *> v(kd+1:i) = 0 and v(i+kd+1) = 1; v(i+kd+2:n) is stored on exit in -* A(i+kd+2:n,i), and tau in TAU(i). +*> A(i+kd+2:n,i), and tau in TAU(i). *> *> The contents of A on exit are illustrated by the following examples *> with n = 5: @@ -245,10 +245,10 @@ * IMPLICIT NONE * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/SRC/ssytrf_aa.f lapack-3.7.1/SRC/ssytrf_aa.f --- lapack-3.7.0/SRC/ssytrf_aa.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/ssytrf_aa.f 2017-06-17 22:46:53.000000000 +0000 @@ -114,11 +114,7 @@ *> \verbatim *> INFO is INTEGER *> = 0: successful exit -*> < 0: if INFO = -i, the i-th argument had an illegal value -*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization -*> has been completed, but the block diagonal matrix D is -*> exactly singular, and division by zero will occur if it -*> is used to solve a system of equations. +*> < 0: if INFO = -i, the i-th argument had an illegal value. *> \endverbatim * * Authors: @@ -159,7 +155,7 @@ * * .. Local Scalars .. LOGICAL LQUERY, UPPER - INTEGER J, LWKOPT, IINFO + INTEGER J, LWKOPT INTEGER NB, MJ, NJ, K1, K2, J1, J2, J3, JB REAL ALPHA * .. @@ -214,13 +210,10 @@ ENDIF IPIV( 1 ) = 1 IF ( N.EQ.1 ) THEN - IF ( A( 1, 1 ).EQ.ZERO ) THEN - INFO = 1 - END IF RETURN END IF * -* Adjubst block size based on the workspace size +* Adjust block size based on the workspace size * IF( LWORK.LT.((1+NB)*N) ) THEN NB = ( LWORK-N ) / N @@ -260,11 +253,7 @@ * CALL SLASYF_AA( UPLO, 2-K1, N-J, JB, $ A( MAX(1, J), J+1 ), LDA, - $ IPIV( J+1 ), WORK, N, WORK( N*NB+1 ), - $ IINFO ) - IF( (IINFO.GT.0) .AND. (INFO.EQ.0) ) THEN - INFO = IINFO+J - ENDIF + $ IPIV( J+1 ), WORK, N, WORK( N*NB+1 ) ) * * Ajust IPIV and apply it back (J-th step picks (J+1)-th pivot) * @@ -383,10 +372,7 @@ * CALL SLASYF_AA( UPLO, 2-K1, N-J, JB, $ A( J+1, MAX(1, J) ), LDA, - $ IPIV( J+1 ), WORK, N, WORK( N*NB+1 ), IINFO) - IF( (IINFO.GT.0) .AND. (INFO.EQ.0) ) THEN - INFO = IINFO+J - ENDIF + $ IPIV( J+1 ), WORK, N, WORK( N*NB+1 ) ) * * Ajust IPIV and apply it back (J-th step picks (J+1)-th pivot) * diff -Nru lapack-3.7.0/SRC/ssytri2x.f lapack-3.7.1/SRC/ssytri2x.f --- lapack-3.7.0/SRC/ssytri2x.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/ssytri2x.f 2017-06-17 22:46:53.000000000 +0000 @@ -87,7 +87,7 @@ *> *> \param[out] WORK *> \verbatim -*> WORK is REAL array, dimension (N+NNB+1,NNB+3) +*> WORK is REAL array, dimension (N+NB+1,NB+3) *> \endverbatim *> *> \param[in] NB @@ -113,17 +113,17 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup realSYcomputational * * ===================================================================== SUBROUTINE SSYTRI2X( UPLO, N, A, LDA, IPIV, WORK, NB, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/SRC/ssytri_3.f lapack-3.7.1/SRC/ssytri_3.f --- lapack-3.7.0/SRC/ssytri_3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/ssytri_3.f 2017-06-17 22:46:53.000000000 +0000 @@ -102,7 +102,7 @@ *> On entry, contains the superdiagonal (or subdiagonal) *> elements of the symmetric block diagonal matrix D *> with 1-by-1 or 2-by-2 diagonal blocks, where -*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; +*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. *> *> NOTE: For 1-by-1 diagonal block D(k), where @@ -152,7 +152,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup singleSYcomputational * @@ -160,7 +160,7 @@ * ================== *> \verbatim *> -*> December 2016, Igor Kozachenko, +*> June 2017, Igor Kozachenko, *> Computer Science Division, *> University of California, Berkeley *> @@ -170,10 +170,10 @@ SUBROUTINE SSYTRI_3( UPLO, N, A, LDA, E, IPIV, WORK, LWORK, $ INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/SRC/ssytri_3x.f lapack-3.7.1/SRC/ssytri_3x.f --- lapack-3.7.0/SRC/ssytri_3x.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/ssytri_3x.f 2017-06-17 22:46:53.000000000 +0000 @@ -99,7 +99,7 @@ *> On entry, contains the superdiagonal (or subdiagonal) *> elements of the symmetric block diagonal matrix D *> with 1-by-1 or 2-by-2 diagonal blocks, where -*> If UPLO = 'U': E(i) = D(i-1,i), i=2:N, E(1) not refernced; +*> If UPLO = 'U': E(i) = D(i-1,i), i=2:N, E(1) not referenced; *> If UPLO = 'L': E(i) = D(i+1,i), i=1:N-1, E(N) not referenced. *> *> NOTE: For 1-by-1 diagonal block D(k), where @@ -142,7 +142,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup singleSYcomputational * @@ -150,7 +150,7 @@ * ================== *> \verbatim *> -*> December 2016, Igor Kozachenko, +*> June 2017, Igor Kozachenko, *> Computer Science Division, *> University of California, Berkeley *> @@ -159,10 +159,10 @@ * ===================================================================== SUBROUTINE SSYTRI_3X( UPLO, N, A, LDA, E, IPIV, WORK, NB, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/SRC/ssytrs_3.f lapack-3.7.1/SRC/ssytrs_3.f --- lapack-3.7.0/SRC/ssytrs_3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/ssytrs_3.f 2017-06-17 22:46:53.000000000 +0000 @@ -99,7 +99,7 @@ *> On entry, contains the superdiagonal (or subdiagonal) *> elements of the symmetric block diagonal matrix D *> with 1-by-1 or 2-by-2 diagonal blocks, where -*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; +*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. *> *> NOTE: For 1-by-1 diagonal block D(k), where @@ -142,7 +142,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup singleSYcomputational * @@ -151,7 +151,7 @@ *> *> \verbatim *> -*> December 2016, Igor Kozachenko, +*> June 2017, Igor Kozachenko, *> Computer Science Division, *> University of California, Berkeley *> @@ -165,10 +165,10 @@ SUBROUTINE SSYTRS_3( UPLO, N, NRHS, A, LDA, E, IPIV, B, LDB, $ INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/SRC/ssytrs_aa.f lapack-3.7.1/SRC/ssytrs_aa.f --- lapack-3.7.0/SRC/ssytrs_aa.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/ssytrs_aa.f 2017-06-17 22:46:53.000000000 +0000 @@ -66,7 +66,7 @@ *> of the matrix B. NRHS >= 0. *> \endverbatim *> -*> \param[in,out] A +*> \param[in] A *> \verbatim *> A is REAL array, dimension (LDA,N) *> Details of factors computed by SSYTRF_AA. @@ -121,7 +121,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup realSYcomputational * @@ -129,10 +129,10 @@ SUBROUTINE SSYTRS_AA( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, $ WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * IMPLICIT NONE * diff -Nru lapack-3.7.0/SRC/stfsm.f lapack-3.7.1/SRC/stfsm.f --- lapack-3.7.0/SRC/stfsm.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/stfsm.f 2017-06-17 22:46:53.000000000 +0000 @@ -159,7 +159,7 @@ *> *> \param[in,out] B *> \verbatim -*> B is REAL array, DIMENSION (LDB,N) +*> B is REAL array, dimension (LDB,N) *> Before entry, the leading m by n part of the array B must *> contain the right-hand side matrix B, and on exit is *> overwritten by the solution matrix X. @@ -182,7 +182,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup realOTHERcomputational * @@ -277,10 +277,10 @@ SUBROUTINE STFSM( TRANSR, SIDE, UPLO, TRANS, DIAG, M, N, ALPHA, A, $ B, LDB ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER TRANSR, DIAG, SIDE, TRANS, UPLO diff -Nru lapack-3.7.0/SRC/stgex2.f lapack-3.7.1/SRC/stgex2.f --- lapack-3.7.0/SRC/stgex2.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/stgex2.f 2017-06-17 22:46:53.000000000 +0000 @@ -77,7 +77,7 @@ *> *> \param[in,out] A *> \verbatim -*> A is REAL arrays, dimensions (LDA,N) +*> A is REAL array, dimension (LDA,N) *> On entry, the matrix A in the pair (A, B). *> On exit, the updated matrix A. *> \endverbatim @@ -90,7 +90,7 @@ *> *> \param[in,out] B *> \verbatim -*> B is REAL arrays, dimensions (LDB,N) +*> B is REAL array, dimension (LDB,N) *> On entry, the matrix B in the pair (A, B). *> On exit, the updated matrix B. *> \endverbatim @@ -103,7 +103,7 @@ *> *> \param[in,out] Q *> \verbatim -*> Q is REAL array, dimension (LDZ,N) +*> Q is REAL array, dimension (LDQ,N) *> On entry, if WANTQ = .TRUE., the orthogonal matrix Q. *> On exit, the updated matrix Q. *> Not referenced if WANTQ = .FALSE.. @@ -181,7 +181,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup realGEauxiliary * @@ -221,10 +221,10 @@ SUBROUTINE STGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z, $ LDZ, J1, N1, N2, WORK, LWORK, INFO ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. LOGICAL WANTQ, WANTZ diff -Nru lapack-3.7.0/SRC/stgexc.f lapack-3.7.1/SRC/stgexc.f --- lapack-3.7.0/SRC/stgexc.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/stgexc.f 2017-06-17 22:46:53.000000000 +0000 @@ -111,7 +111,7 @@ *> *> \param[in,out] Q *> \verbatim -*> Q is REAL array, dimension (LDZ,N) +*> Q is REAL array, dimension (LDQ,N) *> On entry, if WANTQ = .TRUE., the orthogonal matrix Q. *> On exit, the updated matrix Q. *> If WANTQ = .FALSE., Q is not referenced. @@ -195,7 +195,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup realGEcomputational * @@ -220,10 +220,10 @@ SUBROUTINE STGEXC( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z, $ LDZ, IFST, ILST, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. LOGICAL WANTQ, WANTZ diff -Nru lapack-3.7.0/SRC/stplqt2.f lapack-3.7.1/SRC/stplqt2.f --- lapack-3.7.0/SRC/stplqt2.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/stplqt2.f 2017-06-17 22:46:53.000000000 +0000 @@ -65,7 +65,7 @@ *> *> \param[in,out] A *> \verbatim -*> A is REAL array, dimension (LDA,N) +*> A is REAL array, dimension (LDA,M) *> On entry, the lower triangular M-by-M matrix A. *> On exit, the elements on and below the diagonal of the array *> contain the lower triangular matrix L. @@ -74,7 +74,7 @@ *> \param[in] LDA *> \verbatim *> LDA is INTEGER -*> The leading dimension of the array A. LDA >= max(1,N). +*> The leading dimension of the array A. LDA >= max(1,M). *> \endverbatim *> *> \param[in,out] B @@ -119,7 +119,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleOTHERcomputational * @@ -133,7 +133,7 @@ *> C = [ A ][ B ] *> *> -*> where A is an lower triangular N-by-N matrix, and B is M-by-N pentagonal +*> where A is an lower triangular M-by-M matrix, and B is M-by-N pentagonal *> matrix consisting of a M-by-(N-L) rectangular matrix B1 left of a M-by-L *> upper trapezoidal matrix B2: *> @@ -149,13 +149,13 @@ *> above the diagonal (of A) in the M-by-(M+N) input matrix C *> *> C = [ A ][ B ] -*> [ A ] <- lower triangular N-by-N +*> [ A ] <- lower triangular M-by-M *> [ B ] <- M-by-N pentagonal *> *> so that W can be represented as *> *> W = [ I ][ V ] -*> [ I ] <- identity, N-by-N +*> [ I ] <- identity, M-by-M *> [ V ] <- M-by-N, same form as B. *> *> Thus, all of information needed for W is contained on exit in B, which @@ -177,10 +177,10 @@ * ===================================================================== SUBROUTINE STPLQT2( M, N, L, A, LDA, B, LDB, T, LDT, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDB, LDT, N, M, L diff -Nru lapack-3.7.0/SRC/stplqt.f lapack-3.7.1/SRC/stplqt.f --- lapack-3.7.0/SRC/stplqt.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/stplqt.f 2017-06-17 22:46:53.000000000 +0000 @@ -73,8 +73,8 @@ *> *> \param[in,out] A *> \verbatim -*> A is REAL array, dimension (LDA,N) -*> On entry, the lower triangular N-by-N matrix A. +*> A is REAL array, dimension (LDA,M) +*> On entry, the lower triangular M-by-M matrix A. *> On exit, the elements on and below the diagonal of the array *> contain the lower triangular matrix L. *> \endverbatim @@ -82,7 +82,7 @@ *> \param[in] LDA *> \verbatim *> LDA is INTEGER -*> The leading dimension of the array A. LDA >= max(1,N). +*> The leading dimension of the array A. LDA >= max(1,M). *> \endverbatim *> *> \param[in,out] B @@ -132,7 +132,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleOTHERcomputational * @@ -146,26 +146,26 @@ *> C = [ A ] [ B ] *> *> -*> where A is an lower triangular N-by-N matrix, and B is M-by-N pentagonal +*> where A is an lower triangular M-by-M matrix, and B is M-by-N pentagonal *> matrix consisting of a M-by-(N-L) rectangular matrix B1 on left of a M-by-L *> upper trapezoidal matrix B2: *> [ B ] = [ B1 ] [ B2 ] *> [ B1 ] <- M-by-(N-L) rectangular -*> [ B2 ] <- M-by-L upper trapezoidal. +*> [ B2 ] <- M-by-L lower trapezoidal. *> *> The lower trapezoidal matrix B2 consists of the first L columns of a -*> N-by-N lower triangular matrix, where 0 <= L <= MIN(M,N). If L=0, +*> M-by-M lower triangular matrix, where 0 <= L <= MIN(M,N). If L=0, *> B is rectangular M-by-N; if M=L=N, B is lower triangular. *> *> The matrix W stores the elementary reflectors H(i) in the i-th row *> above the diagonal (of A) in the M-by-(M+N) input matrix C *> [ C ] = [ A ] [ B ] -*> [ A ] <- lower triangular N-by-N +*> [ A ] <- lower triangular M-by-M *> [ B ] <- M-by-N pentagonal *> *> so that W can be represented as *> [ W ] = [ I ] [ V ] -*> [ I ] <- identity, N-by-N +*> [ I ] <- identity, M-by-M *> [ V ] <- M-by-N, same form as B. *> *> Thus, all of information needed for W is contained on exit in B, which @@ -189,10 +189,10 @@ SUBROUTINE STPLQT( M, N, L, MB, A, LDA, B, LDB, T, LDT, WORK, $ INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDB, LDT, N, M, L, MB diff -Nru lapack-3.7.0/SRC/strttp.f lapack-3.7.1/SRC/strttp.f --- lapack-3.7.0/SRC/strttp.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/strttp.f 2017-06-17 22:46:53.000000000 +0000 @@ -74,7 +74,7 @@ *> *> \param[out] AP *> \verbatim -*> AP is REAL array, dimension (N*(N+1)/2 +*> AP is REAL array, dimension (N*(N+1)/2) *> On exit, the upper or lower triangular matrix A, packed *> columnwise in a linear array. The j-th column of A is stored *> in the array AP as follows: @@ -97,17 +97,17 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup realOTHERcomputational * * ===================================================================== SUBROUTINE STRTTP( UPLO, N, A, LDA, AP, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/SRC/VARIANTS/Makefile lapack-3.7.1/SRC/VARIANTS/Makefile --- lapack-3.7.0/SRC/VARIANTS/Makefile 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/VARIANTS/Makefile 2017-06-17 22:46:53.000000000 +0000 @@ -17,8 +17,6 @@ # 1065-1081. http://dx.doi.org/10.1137/S0895479896297744 ####################################################################### -VARIANTSDIR = LIB - CHOLRL = cholesky/RL/cpotrf.o cholesky/RL/dpotrf.o cholesky/RL/spotrf.o cholesky/RL/zpotrf.o CHOLTOP = cholesky/TOP/cpotrf.o cholesky/TOP/dpotrf.o cholesky/TOP/spotrf.o cholesky/TOP/zpotrf.o @@ -32,36 +30,37 @@ QRLL = qr/LL/cgeqrf.o qr/LL/dgeqrf.o qr/LL/sgeqrf.o qr/LL/zgeqrf.o qr/LL/sceil.o -all: cholrl choltop lucr lull lurec qrll - -cholrl: $(CHOLRL) - $(ARCH) $(ARCHFLAGS) $(VARIANTSDIR)/cholrl.a $(CHOLRL) - $(RANLIB) $(VARIANTSDIR)/cholrl.a - -choltop: $(CHOLTOP) - $(ARCH) $(ARCHFLAGS) $(VARIANTSDIR)/choltop.a $(CHOLTOP) - $(RANLIB) $(VARIANTSDIR)/choltop.a - -lucr: $(LUCR) - $(ARCH) $(ARCHFLAGS) $(VARIANTSDIR)/lucr.a $(LUCR) - $(RANLIB) $(VARIANTSDIR)/lucr.a - -lull: $(LULL) - $(ARCH) $(ARCHFLAGS) $(VARIANTSDIR)/lull.a $(LULL) - $(RANLIB) $(VARIANTSDIR)/lull.a - -lurec: $(LUREC) - $(ARCH) $(ARCHFLAGS) $(VARIANTSDIR)/lurec.a $(LUREC) - $(RANLIB) $(VARIANTSDIR)/lurec.a - -qrll: $(QRLL) - $(ARCH) $(ARCHFLAGS) $(VARIANTSDIR)/qrll.a $(QRLL) - $(RANLIB) $(VARIANTSDIR)/qrll.a +all: cholrl.a choltop.a lucr.a lull.a lurec.a qrll.a +cholrl.a: $(CHOLRL) + $(ARCH) $(ARCHFLAGS) $@ $^ + $(RANLIB) $@ + +choltop.a: $(CHOLTOP) + $(ARCH) $(ARCHFLAGS) $@ $^ + $(RANLIB) $@ + +lucr.a: $(LUCR) + $(ARCH) $(ARCHFLAGS) $@ $^ + $(RANLIB) $@ + +lull.a: $(LULL) + $(ARCH) $(ARCHFLAGS) $@ $^ + $(RANLIB) $@ + +lurec.a: $(LUREC) + $(ARCH) $(ARCHFLAGS) $@ $^ + $(RANLIB) $@ + +qrll.a: $(QRLL) + $(ARCH) $(ARCHFLAGS) $@ $^ + $(RANLIB) $@ + +clean: cleanobj cleanlib +cleanobj: + rm -f $(CHOLRL) $(CHOLTOP) $(LUCR) $(LULL) $(LUREC) $(QRLL) +cleanlib: + rm -f *.a .f.o: $(FORTRAN) $(OPTS) -c -o $@ $< - -clean: - rm -f $(CHOLRL) $(CHOLTOP) $(LUCR) $(LULL) $(LUREC) $(QRLL) \ - $(VARIANTSDIR)/*.a diff -Nru lapack-3.7.0/SRC/VARIANTS/README lapack-3.7.1/SRC/VARIANTS/README --- lapack-3.7.0/SRC/VARIANTS/README 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/VARIANTS/README 2017-06-17 22:46:53.000000000 +0000 @@ -1,5 +1,5 @@ - =============== - = README File = + =============== + = README File = =============== This README File is for the LAPACK driver variants. @@ -34,10 +34,10 @@ ========= These variants are compiled by default in the build process but they are not tested by default. -The build process creates one new library per variants in the four arithmetics (singel/double/comple/double complex). -The libraries are in the SRC/VARIANTS/LIB directory. +The build process creates one new library per variants in the four arithmetics (single real/double real/single complex/double complex). +The libraries are in the SRC/VARIANTS directory. -Corresponding libraries created in SRC/VARIANTS/LIB: +Corresponding libraries created in SRC/VARIANTS: - LU Crout : lucr.a - LU Left Looking : lull.a - LU Sivan Toledo's recursive : lurec.a @@ -73,7 +73,7 @@ Using LU Left Looking version: $(FORTRAN) -c myprog.f - $(FORTRAN) -o myexe myprog.o $(PATH TO LAPACK/SRC/VARIANTS/LIB)/lull.a $(LAPACKLIB) $(BLASLIB) + $(FORTRAN) -o myexe myprog.o $(PATH TO LAPACK/SRC/VARIANTS)/lull.a $(LAPACKLIB) $(BLASLIB) =========== = SUPPORT = diff -Nru lapack-3.7.0/SRC/zbbcsd.f lapack-3.7.1/SRC/zbbcsd.f --- lapack-3.7.0/SRC/zbbcsd.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zbbcsd.f 2017-06-17 22:46:53.000000000 +0000 @@ -190,7 +190,7 @@ *> *> \param[in,out] V2T *> \verbatim -*> V2T is COMPLEX*16 array, dimenison (LDV2T,M-Q) +*> V2T is COMPLEX*16 array, dimension (LDV2T,M-Q) *> On entry, an (M-Q)-by-(M-Q) matrix. On exit, V2T is *> premultiplied by the conjugate transpose of the right *> singular vector matrix common to [ B12 0 0 ; 0 -I 0 ] and @@ -332,7 +332,7 @@ $ V2T, LDV2T, B11D, B11E, B12D, B12E, B21D, B21E, $ B22D, B22E, RWORK, LRWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 diff -Nru lapack-3.7.0/SRC/zcgesv.f lapack-3.7.1/SRC/zcgesv.f --- lapack-3.7.0/SRC/zcgesv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zcgesv.f 2017-06-17 22:46:53.000000000 +0000 @@ -142,7 +142,7 @@ *> *> \param[out] WORK *> \verbatim -*> WORK is COMPLEX*16 array, dimension (N*NRHS) +*> WORK is COMPLEX*16 array, dimension (N,NRHS) *> This array is used to hold the residual vectors. *> \endverbatim *> @@ -201,7 +201,7 @@ SUBROUTINE ZCGESV( N, NRHS, A, LDA, IPIV, B, LDB, X, LDX, WORK, $ SWORK, RWORK, ITER, INFO ) * -* -- LAPACK driver routine (version 3.7.0) -- +* -- LAPACK driver routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 diff -Nru lapack-3.7.0/SRC/zcposv.f lapack-3.7.1/SRC/zcposv.f --- lapack-3.7.0/SRC/zcposv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zcposv.f 2017-06-17 22:46:53.000000000 +0000 @@ -150,7 +150,7 @@ *> *> \param[out] WORK *> \verbatim -*> WORK is COMPLEX*16 array, dimension (N*NRHS) +*> WORK is COMPLEX*16 array, dimension (N,NRHS) *> This array is used to hold the residual vectors. *> \endverbatim *> @@ -209,7 +209,7 @@ SUBROUTINE ZCPOSV( UPLO, N, NRHS, A, LDA, B, LDB, X, LDX, WORK, $ SWORK, RWORK, ITER, INFO ) * -* -- LAPACK driver routine (version 3.7.0) -- +* -- LAPACK driver routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 diff -Nru lapack-3.7.0/SRC/zgebal.f lapack-3.7.1/SRC/zgebal.f --- lapack-3.7.0/SRC/zgebal.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zgebal.f 2017-06-17 22:46:53.000000000 +0000 @@ -83,10 +83,12 @@ *> *> \param[out] ILO *> \verbatim +*> ILO is INTEGER *> \endverbatim *> *> \param[out] IHI *> \verbatim +*> IHI is INTEGER *> ILO and IHI are set to INTEGER such that on exit *> A(i,j) = 0 if i > j and j = 1,...,ILO-1 or I = IHI+1,...,N. *> If JOB = 'N' or 'S', ILO = 1 and IHI = N. @@ -121,7 +123,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16GEcomputational * @@ -160,10 +162,10 @@ * ===================================================================== SUBROUTINE ZGEBAL( JOB, N, A, LDA, ILO, IHI, SCALE, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER JOB diff -Nru lapack-3.7.0/SRC/zgebd2.f lapack-3.7.1/SRC/zgebd2.f --- lapack-3.7.0/SRC/zgebd2.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zgebd2.f 2017-06-17 22:46:53.000000000 +0000 @@ -100,7 +100,7 @@ *> *> \param[out] TAUQ *> \verbatim -*> TAUQ is COMPLEX*16 array dimension (min(M,N)) +*> TAUQ is COMPLEX*16 array, dimension (min(M,N)) *> The scalar factors of the elementary reflectors which *> represent the unitary matrix Q. See Further Details. *> \endverbatim @@ -132,7 +132,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16GEcomputational * @@ -189,10 +189,10 @@ * ===================================================================== SUBROUTINE ZGEBD2( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, M, N diff -Nru lapack-3.7.0/SRC/zgebrd.f lapack-3.7.1/SRC/zgebrd.f --- lapack-3.7.0/SRC/zgebrd.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zgebrd.f 2017-06-17 22:46:53.000000000 +0000 @@ -101,7 +101,7 @@ *> *> \param[out] TAUQ *> \verbatim -*> TAUQ is COMPLEX*16 array dimension (min(M,N)) +*> TAUQ is COMPLEX*16 array, dimension (min(M,N)) *> The scalar factors of the elementary reflectors which *> represent the unitary matrix Q. See Further Details. *> \endverbatim @@ -147,7 +147,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16GEcomputational * @@ -205,10 +205,10 @@ SUBROUTINE ZGEBRD( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK, $ INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LWORK, M, N diff -Nru lapack-3.7.0/SRC/zgejsv.f lapack-3.7.1/SRC/zgejsv.f --- lapack-3.7.0/SRC/zgejsv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zgejsv.f 2017-06-17 22:46:53.000000000 +0000 @@ -1,2237 +1,2237 @@ -*> \brief \b ZGEJSV -* -* =========== DOCUMENTATION =========== -* -* Online html documentation available at -* http://www.netlib.org/lapack/explore-html/ -* -*> \htmlonly -*> Download ZGEJSV + dependencies -*> -*> [TGZ] -*> -*> [ZIP] -*> -*> [TXT] -*> \endhtmlonly -* -* Definition: -* =========== -* -* SUBROUTINE ZGEJSV( JOBA, JOBU, JOBV, JOBR, JOBT, JOBP, -* M, N, A, LDA, SVA, U, LDU, V, LDV, -* CWORK, LWORK, RWORK, LRWORK, IWORK, INFO ) -* -* .. Scalar Arguments .. -* IMPLICIT NONE -* INTEGER INFO, LDA, LDU, LDV, LWORK, M, N -* .. -* .. Array Arguments .. -* COMPLEX*16 A( LDA, * ), U( LDU, * ), V( LDV, * ), CWORK( LWORK ) -* DOUBLE PRECISION SVA( N ), RWORK( LRWORK ) -* INTEGER IWORK( * ) -* CHARACTER*1 JOBA, JOBP, JOBR, JOBT, JOBU, JOBV -* .. -* -* -*> \par Purpose: -* ============= -*> -*> \verbatim -*> -*> ZGEJSV computes the singular value decomposition (SVD) of a complex M-by-N -*> matrix [A], where M >= N. The SVD of [A] is written as -*> -*> [A] = [U] * [SIGMA] * [V]^*, -*> -*> where [SIGMA] is an N-by-N (M-by-N) matrix which is zero except for its N -*> diagonal elements, [U] is an M-by-N (or M-by-M) unitary matrix, and -*> [V] is an N-by-N unitary matrix. The diagonal elements of [SIGMA] are -*> the singular values of [A]. The columns of [U] and [V] are the left and -*> the right singular vectors of [A], respectively. The matrices [U] and [V] -*> are computed and stored in the arrays U and V, respectively. The diagonal -*> of [SIGMA] is computed and stored in the array SVA. -*> \endverbatim -*> -*> Arguments: -*> ========== -*> -*> \param[in] JOBA -*> \verbatim -*> JOBA is CHARACTER*1 -*> Specifies the level of accuracy: -*> = 'C': This option works well (high relative accuracy) if A = B * D, -*> with well-conditioned B and arbitrary diagonal matrix D. -*> The accuracy cannot be spoiled by COLUMN scaling. The -*> accuracy of the computed output depends on the condition of -*> B, and the procedure aims at the best theoretical accuracy. -*> The relative error max_{i=1:N}|d sigma_i| / sigma_i is -*> bounded by f(M,N)*epsilon* cond(B), independent of D. -*> The input matrix is preprocessed with the QRF with column -*> pivoting. This initial preprocessing and preconditioning by -*> a rank revealing QR factorization is common for all values of -*> JOBA. Additional actions are specified as follows: -*> = 'E': Computation as with 'C' with an additional estimate of the -*> condition number of B. It provides a realistic error bound. -*> = 'F': If A = D1 * C * D2 with ill-conditioned diagonal scalings -*> D1, D2, and well-conditioned matrix C, this option gives -*> higher accuracy than the 'C' option. If the structure of the -*> input matrix is not known, and relative accuracy is -*> desirable, then this option is advisable. The input matrix A -*> is preprocessed with QR factorization with FULL (row and -*> column) pivoting. -*> = 'G' Computation as with 'F' with an additional estimate of the -*> condition number of B, where A=B*D. If A has heavily weighted -*> rows, then using this condition number gives too pessimistic -*> error bound. -*> = 'A': Small singular values are not well determined by the data -*> and are considered as noisy; the matrix is treated as -*> numerically rank defficient. The error in the computed -*> singular values is bounded by f(m,n)*epsilon*||A||. -*> The computed SVD A = U * S * V^* restores A up to -*> f(m,n)*epsilon*||A||. -*> This gives the procedure the licence to discard (set to zero) -*> all singular values below N*epsilon*||A||. -*> = 'R': Similar as in 'A'. Rank revealing property of the initial -*> QR factorization is used do reveal (using triangular factor) -*> a gap sigma_{r+1} < epsilon * sigma_r in which case the -*> numerical RANK is declared to be r. The SVD is computed with -*> absolute error bounds, but more accurately than with 'A'. -*> \endverbatim -*> -*> \param[in] JOBU -*> \verbatim -*> JOBU is CHARACTER*1 -*> Specifies whether to compute the columns of U: -*> = 'U': N columns of U are returned in the array U. -*> = 'F': full set of M left sing. vectors is returned in the array U. -*> = 'W': U may be used as workspace of length M*N. See the description -*> of U. -*> = 'N': U is not computed. -*> \endverbatim -*> -*> \param[in] JOBV -*> \verbatim -*> JOBV is CHARACTER*1 -*> Specifies whether to compute the matrix V: -*> = 'V': N columns of V are returned in the array V; Jacobi rotations -*> are not explicitly accumulated. -*> = 'J': N columns of V are returned in the array V, but they are -*> computed as the product of Jacobi rotations, if JOBT .EQ. 'N'. -*> = 'W': V may be used as workspace of length N*N. See the description -*> of V. -*> = 'N': V is not computed. -*> \endverbatim -*> -*> \param[in] JOBR -*> \verbatim -*> JOBR is CHARACTER*1 -*> Specifies the RANGE for the singular values. Issues the licence to -*> set to zero small positive singular values if they are outside -*> specified range. If A .NE. 0 is scaled so that the largest singular -*> value of c*A is around SQRT(BIG), BIG=DLAMCH('O'), then JOBR issues -*> the licence to kill columns of A whose norm in c*A is less than -*> SQRT(SFMIN) (for JOBR.EQ.'R'), or less than SMALL=SFMIN/EPSLN, -*> where SFMIN=DLAMCH('S'), EPSLN=DLAMCH('E'). -*> = 'N': Do not kill small columns of c*A. This option assumes that -*> BLAS and QR factorizations and triangular solvers are -*> implemented to work in that range. If the condition of A -*> is greater than BIG, use ZGESVJ. -*> = 'R': RESTRICTED range for sigma(c*A) is [SQRT(SFMIN), SQRT(BIG)] -*> (roughly, as described above). This option is recommended. -*> =========================== -*> For computing the singular values in the FULL range [SFMIN,BIG] -*> use ZGESVJ. -*> \endverbatim -*> -*> \param[in] JOBT -*> \verbatim -*> JOBT is CHARACTER*1 -*> If the matrix is square then the procedure may determine to use -*> transposed A if A^* seems to be better with respect to convergence. -*> If the matrix is not square, JOBT is ignored. -*> The decision is based on two values of entropy over the adjoint -*> orbit of A^* * A. See the descriptions of WORK(6) and WORK(7). -*> = 'T': transpose if entropy test indicates possibly faster -*> convergence of Jacobi process if A^* is taken as input. If A is -*> replaced with A^*, then the row pivoting is included automatically. -*> = 'N': do not speculate. -*> The option 'T' can be used to compute only the singular values, or -*> the full SVD (U, SIGMA and V). For only one set of singular vectors -*> (U or V), the caller should provide both U and V, as one of the -*> matrices is used as workspace if the matrix A is transposed. -*> The implementer can easily remove this constraint and make the -*> code more complicated. See the descriptions of U and V. -*> In general, this option is considered experimental, and 'N'; should -*> be preferred. This is subject to changes in the future. -*> \endverbatim -*> -*> \param[in] JOBP -*> \verbatim -*> JOBP is CHARACTER*1 -*> Issues the licence to introduce structured perturbations to drown -*> denormalized numbers. This licence should be active if the -*> denormals are poorly implemented, causing slow computation, -*> especially in cases of fast convergence (!). For details see [1,2]. -*> For the sake of simplicity, this perturbations are included only -*> when the full SVD or only the singular values are requested. The -*> implementer/user can easily add the perturbation for the cases of -*> computing one set of singular vectors. -*> = 'P': introduce perturbation -*> = 'N': do not perturb -*> \endverbatim -*> -*> \param[in] M -*> \verbatim -*> M is INTEGER -*> The number of rows of the input matrix A. M >= 0. -*> \endverbatim -*> -*> \param[in] N -*> \verbatim -*> N is INTEGER -*> The number of columns of the input matrix A. M >= N >= 0. -*> \endverbatim -*> -*> \param[in,out] A -*> \verbatim -*> A is COMPLEX*16 array, dimension (LDA,N) -*> On entry, the M-by-N matrix A. -*> \endverbatim -*> -*> \param[in] LDA -*> \verbatim -*> LDA is INTEGER -*> The leading dimension of the array A. LDA >= max(1,M). -*> \endverbatim -*> -*> \param[out] SVA -*> \verbatim -*> SVA is DOUBLE PRECISION array, dimension (N) -*> On exit, -*> - For WORK(1)/WORK(2) = ONE: The singular values of A. During the -*> computation SVA contains Euclidean column norms of the -*> iterated matrices in the array A. -*> - For WORK(1) .NE. WORK(2): The singular values of A are -*> (WORK(1)/WORK(2)) * SVA(1:N). This factored form is used if -*> sigma_max(A) overflows or if small singular values have been -*> saved from underflow by scaling the input matrix A. -*> - If JOBR='R' then some of the singular values may be returned -*> as exact zeros obtained by "set to zero" because they are -*> below the numerical rank threshold or are denormalized numbers. -*> \endverbatim -*> -*> \param[out] U -*> \verbatim -*> U is COMPLEX*16 array, dimension ( LDU, N ) -*> If JOBU = 'U', then U contains on exit the M-by-N matrix of -*> the left singular vectors. -*> If JOBU = 'F', then U contains on exit the M-by-M matrix of -*> the left singular vectors, including an ONB -*> of the orthogonal complement of the Range(A). -*> If JOBU = 'W' .AND. (JOBV.EQ.'V' .AND. JOBT.EQ.'T' .AND. M.EQ.N), -*> then U is used as workspace if the procedure -*> replaces A with A^*. In that case, [V] is computed -*> in U as left singular vectors of A^* and then -*> copied back to the V array. This 'W' option is just -*> a reminder to the caller that in this case U is -*> reserved as workspace of length N*N. -*> If JOBU = 'N' U is not referenced, unless JOBT='T'. -*> \endverbatim -*> -*> \param[in] LDU -*> \verbatim -*> LDU is INTEGER -*> The leading dimension of the array U, LDU >= 1. -*> IF JOBU = 'U' or 'F' or 'W', then LDU >= M. -*> \endverbatim -*> -*> \param[out] V -*> \verbatim -*> V is COMPLEX*16 array, dimension ( LDV, N ) -*> If JOBV = 'V', 'J' then V contains on exit the N-by-N matrix of -*> the right singular vectors; -*> If JOBV = 'W', AND (JOBU.EQ.'U' AND JOBT.EQ.'T' AND M.EQ.N), -*> then V is used as workspace if the pprocedure -*> replaces A with A^*. In that case, [U] is computed -*> in V as right singular vectors of A^* and then -*> copied back to the U array. This 'W' option is just -*> a reminder to the caller that in this case V is -*> reserved as workspace of length N*N. -*> If JOBV = 'N' V is not referenced, unless JOBT='T'. -*> \endverbatim -*> -*> \param[in] LDV -*> \verbatim -*> LDV is INTEGER -*> The leading dimension of the array V, LDV >= 1. -*> If JOBV = 'V' or 'J' or 'W', then LDV >= N. -*> \endverbatim -*> -*> \param[out] CWORK -*> \verbatim -*> CWORK is COMPLEX*16 array, dimension (MAX(2,LWORK)) -*> If the call to ZGEJSV is a workspace query (indicated by LWORK=-1 or -*> LRWORK=-1), then on exit CWORK(1) contains the required length of -*> CWORK for the job parameters used in the call. -*> \endverbatim -*> -*> \param[in] LWORK -*> \verbatim -*> LWORK is INTEGER -*> Length of CWORK to confirm proper allocation of workspace. -*> LWORK depends on the job: -*> -*> 1. If only SIGMA is needed ( JOBU.EQ.'N', JOBV.EQ.'N' ) and -*> 1.1 .. no scaled condition estimate required (JOBA.NE.'E'.AND.JOBA.NE.'G'): -*> LWORK >= 2*N+1. This is the minimal requirement. -*> ->> For optimal performance (blocked code) the optimal value -*> is LWORK >= N + (N+1)*NB. Here NB is the optimal -*> block size for ZGEQP3 and ZGEQRF. -*> In general, optimal LWORK is computed as -*> LWORK >= max(N+LWORK(ZGEQP3),N+LWORK(ZGEQRF), LWORK(ZGESVJ)). -*> 1.2. .. an estimate of the scaled condition number of A is -*> required (JOBA='E', or 'G'). In this case, LWORK the minimal -*> requirement is LWORK >= N*N + 2*N. -*> ->> For optimal performance (blocked code) the optimal value -*> is LWORK >= max(N+(N+1)*NB, N*N+2*N)=N**2+2*N. -*> In general, the optimal length LWORK is computed as -*> LWORK >= max(N+LWORK(ZGEQP3),N+LWORK(ZGEQRF), LWORK(ZGESVJ), -*> N*N+LWORK(ZPOCON)). -*> 2. If SIGMA and the right singular vectors are needed (JOBV.EQ.'V'), -*> (JOBU.EQ.'N') -*> 2.1 .. no scaled condition estimate requested (JOBE.EQ.'N'): -*> -> the minimal requirement is LWORK >= 3*N. -*> -> For optimal performance, -*> LWORK >= max(N+(N+1)*NB, 2*N+N*NB)=2*N+N*NB, -*> where NB is the optimal block size for ZGEQP3, ZGEQRF, ZGELQ, -*> ZUNMLQ. In general, the optimal length LWORK is computed as -*> LWORK >= max(N+LWORK(ZGEQP3), N+LWORK(ZGESVJ), -*> N+LWORK(ZGELQF), 2*N+LWORK(ZGEQRF), N+LWORK(ZUNMLQ)). -*> 2.2 .. an estimate of the scaled condition number of A is -*> required (JOBA='E', or 'G'). -*> -> the minimal requirement is LWORK >= 3*N. -*> -> For optimal performance, -*> LWORK >= max(N+(N+1)*NB, 2*N,2*N+N*NB)=2*N+N*NB, -*> where NB is the optimal block size for ZGEQP3, ZGEQRF, ZGELQ, -*> ZUNMLQ. In general, the optimal length LWORK is computed as -*> LWORK >= max(N+LWORK(ZGEQP3), LWORK(ZPOCON), N+LWORK(ZGESVJ), -*> N+LWORK(ZGELQF), 2*N+LWORK(ZGEQRF), N+LWORK(ZUNMLQ)). -*> 3. If SIGMA and the left singular vectors are needed -*> 3.1 .. no scaled condition estimate requested (JOBE.EQ.'N'): -*> -> the minimal requirement is LWORK >= 3*N. -*> -> For optimal performance: -*> if JOBU.EQ.'U' :: LWORK >= max(3*N, N+(N+1)*NB, 2*N+N*NB)=2*N+N*NB, -*> where NB is the optimal block size for ZGEQP3, ZGEQRF, ZUNMQR. -*> In general, the optimal length LWORK is computed as -*> LWORK >= max(N+LWORK(ZGEQP3), 2*N+LWORK(ZGEQRF), N+LWORK(ZUNMQR)). -*> 3.2 .. an estimate of the scaled condition number of A is -*> required (JOBA='E', or 'G'). -*> -> the minimal requirement is LWORK >= 3*N. -*> -> For optimal performance: -*> if JOBU.EQ.'U' :: LWORK >= max(3*N, N+(N+1)*NB, 2*N+N*NB)=2*N+N*NB, -*> where NB is the optimal block size for ZGEQP3, ZGEQRF, ZUNMQR. -*> In general, the optimal length LWORK is computed as -*> LWORK >= max(N+LWORK(ZGEQP3),N+LWORK(ZPOCON), -*> 2*N+LWORK(ZGEQRF), N+LWORK(ZUNMQR)). -*> 4. If the full SVD is needed: (JOBU.EQ.'U' or JOBU.EQ.'F') and -*> 4.1. if JOBV.EQ.'V' -*> the minimal requirement is LWORK >= 5*N+2*N*N. -*> 4.2. if JOBV.EQ.'J' the minimal requirement is -*> LWORK >= 4*N+N*N. -*> In both cases, the allocated CWORK can accomodate blocked runs -*> of ZGEQP3, ZGEQRF, ZGELQF, SUNMQR, ZUNMLQ. -*> -*> If the call to ZGEJSV is a workspace query (indicated by LWORK=-1 or -*> LRWORK=-1), then on exit CWORK(1) contains the optimal and CWORK(2) contains the -*> minimal length of CWORK for the job parameters used in the call. -*> \endverbatim -*> -*> \param[out] RWORK -*> \verbatim -*> RWORK is DOUBLE PRECISION array, dimension (MAX(7,LWORK)) -*> On exit, -*> RWORK(1) = Determines the scaling factor SCALE = RWORK(2) / RWORK(1) -*> such that SCALE*SVA(1:N) are the computed singular values -*> of A. (See the description of SVA().) -*> RWORK(2) = See the description of RWORK(1). -*> RWORK(3) = SCONDA is an estimate for the condition number of -*> column equilibrated A. (If JOBA .EQ. 'E' or 'G') -*> SCONDA is an estimate of SQRT(||(R^* * R)^(-1)||_1). -*> It is computed using SPOCON. It holds -*> N^(-1/4) * SCONDA <= ||R^(-1)||_2 <= N^(1/4) * SCONDA -*> where R is the triangular factor from the QRF of A. -*> However, if R is truncated and the numerical rank is -*> determined to be strictly smaller than N, SCONDA is -*> returned as -1, thus indicating that the smallest -*> singular values might be lost. -*> -*> If full SVD is needed, the following two condition numbers are -*> useful for the analysis of the algorithm. They are provied for -*> a developer/implementer who is familiar with the details of -*> the method. -*> -*> RWORK(4) = an estimate of the scaled condition number of the -*> triangular factor in the first QR factorization. -*> RWORK(5) = an estimate of the scaled condition number of the -*> triangular factor in the second QR factorization. -*> The following two parameters are computed if JOBT .EQ. 'T'. -*> They are provided for a developer/implementer who is familiar -*> with the details of the method. -*> RWORK(6) = the entropy of A^* * A :: this is the Shannon entropy -*> of diag(A^* * A) / Trace(A^* * A) taken as point in the -*> probability simplex. -*> RWORK(7) = the entropy of A * A^*. (See the description of RWORK(6).) -*> If the call to ZGEJSV is a workspace query (indicated by LWORK=-1 or -*> LRWORK=-1), then on exit RWORK(1) contains the required length of -*> RWORK for the job parameters used in the call. -*> \endverbatim -*> -*> \param[in] LRWORK -*> \verbatim -*> LRWORK is INTEGER -*> Length of RWORK to confirm proper allocation of workspace. -*> LRWORK depends on the job: -*> -*> 1. If only the singular values are requested i.e. if -*> LSAME(JOBU,'N') .AND. LSAME(JOBV,'N') -*> then: -*> 1.1. If LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G'), -*> then: LRWORK = max( 7, 2 * M ). -*> 1.2. Otherwise, LRWORK = max( 7, N ). -*> 2. If singular values with the right singular vectors are requested -*> i.e. if -*> (LSAME(JOBV,'V').OR.LSAME(JOBV,'J')) .AND. -*> .NOT.(LSAME(JOBU,'U').OR.LSAME(JOBU,'F')) -*> then: -*> 2.1. If LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G'), -*> then LRWORK = max( 7, 2 * M ). -*> 2.2. Otherwise, LRWORK = max( 7, N ). -*> 3. If singular values with the left singular vectors are requested, i.e. if -*> (LSAME(JOBU,'U').OR.LSAME(JOBU,'F')) .AND. -*> .NOT.(LSAME(JOBV,'V').OR.LSAME(JOBV,'J')) -*> then: -*> 3.1. If LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G'), -*> then LRWORK = max( 7, 2 * M ). -*> 3.2. Otherwise, LRWORK = max( 7, N ). -*> 4. If singular values with both the left and the right singular vectors -*> are requested, i.e. if -*> (LSAME(JOBU,'U').OR.LSAME(JOBU,'F')) .AND. -*> (LSAME(JOBV,'V').OR.LSAME(JOBV,'J')) -*> then: -*> 4.1. If LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G'), -*> then LRWORK = max( 7, 2 * M ). -*> 4.2. Otherwise, LRWORK = max( 7, N ). -*> -*> If, on entry, LRWORK = -1 ot LWORK=-1, a workspace query is assumed and -*> the length of RWORK is returned in RWORK(1). -*> \endverbatim -*> -*> \param[out] IWORK -*> \verbatim -*> IWORK is INTEGER array, of dimension at least 4, that further depends -*> on the job: -*> -*> 1. If only the singular values are requested then: -*> If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') ) -*> then the length of IWORK is N+M; otherwise the length of IWORK is N. -*> 2. If the singular values and the right singular vectors are requested then: -*> If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') ) -*> then the length of IWORK is N+M; otherwise the length of IWORK is N. -*> 3. If the singular values and the left singular vectors are requested then: -*> If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') ) -*> then the length of IWORK is N+M; otherwise the length of IWORK is N. -*> 4. If the singular values with both the left and the right singular vectors -*> are requested, then: -*> 4.1. If LSAME(JOBV,'J') the length of IWORK is determined as follows: -*> If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') ) -*> then the length of IWORK is N+M; otherwise the length of IWORK is N. -*> 4.2. If LSAME(JOBV,'V') the length of IWORK is determined as follows: -*> If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') ) -*> then the length of IWORK is 2*N+M; otherwise the length of IWORK is 2*N. -*> -*> On exit, -*> IWORK(1) = the numerical rank determined after the initial -*> QR factorization with pivoting. See the descriptions -*> of JOBA and JOBR. -*> IWORK(2) = the number of the computed nonzero singular values -*> IWORK(3) = if nonzero, a warning message: -*> If IWORK(3).EQ.1 then some of the column norms of A -*> were denormalized floats. The requested high accuracy -*> is not warranted by the data. -*> IWORK(4) = 1 or -1. If IWORK(4) .EQ. 1, then the procedure used A^* to -*> do the job as specified by the JOB parameters. -*> If the call to ZGEJSV is a workspace query (indicated by LWORK .EQ. -1 or -*> LRWORK .EQ. -1), then on exit IWORK(1) contains the required length of -*> IWORK for the job parameters used in the call. -*> \endverbatim -*> -*> \param[out] INFO -*> \verbatim -*> INFO is INTEGER -*> < 0 : if INFO = -i, then the i-th argument had an illegal value. -*> = 0 : successful exit; -*> > 0 : ZGEJSV did not converge in the maximal allowed number -*> of sweeps. The computed values may be inaccurate. -*> \endverbatim -* -* Authors: -* ======== -* -*> \author Univ. of Tennessee -*> \author Univ. of California Berkeley -*> \author Univ. of Colorado Denver -*> \author NAG Ltd. -* -*> \date June 2016 -* -*> \ingroup complex16GEsing -* -*> \par Further Details: -* ===================== -*> -*> \verbatim -*> -*> ZGEJSV implements a preconditioned Jacobi SVD algorithm. It uses ZGEQP3, -*> ZGEQRF, and ZGELQF as preprocessors and preconditioners. Optionally, an -*> additional row pivoting can be used as a preprocessor, which in some -*> cases results in much higher accuracy. An example is matrix A with the -*> structure A = D1 * C * D2, where D1, D2 are arbitrarily ill-conditioned -*> diagonal matrices and C is well-conditioned matrix. In that case, complete -*> pivoting in the first QR factorizations provides accuracy dependent on the -*> condition number of C, and independent of D1, D2. Such higher accuracy is -*> not completely understood theoretically, but it works well in practice. -*> Further, if A can be written as A = B*D, with well-conditioned B and some -*> diagonal D, then the high accuracy is guaranteed, both theoretically and -*> in software, independent of D. For more details see [1], [2]. -*> The computational range for the singular values can be the full range -*> ( UNDERFLOW,OVERFLOW ), provided that the machine arithmetic and the BLAS -*> & LAPACK routines called by ZGEJSV are implemented to work in that range. -*> If that is not the case, then the restriction for safe computation with -*> the singular values in the range of normalized IEEE numbers is that the -*> spectral condition number kappa(A)=sigma_max(A)/sigma_min(A) does not -*> overflow. This code (ZGEJSV) is best used in this restricted range, -*> meaning that singular values of magnitude below ||A||_2 / DLAMCH('O') are -*> returned as zeros. See JOBR for details on this. -*> Further, this implementation is somewhat slower than the one described -*> in [1,2] due to replacement of some non-LAPACK components, and because -*> the choice of some tuning parameters in the iterative part (ZGESVJ) is -*> left to the implementer on a particular machine. -*> The rank revealing QR factorization (in this code: ZGEQP3) should be -*> implemented as in [3]. We have a new version of ZGEQP3 under development -*> that is more robust than the current one in LAPACK, with a cleaner cut in -*> rank deficient cases. It will be available in the SIGMA library [4]. -*> If M is much larger than N, it is obvious that the initial QRF with -*> column pivoting can be preprocessed by the QRF without pivoting. That -*> well known trick is not used in ZGEJSV because in some cases heavy row -*> weighting can be treated with complete pivoting. The overhead in cases -*> M much larger than N is then only due to pivoting, but the benefits in -*> terms of accuracy have prevailed. The implementer/user can incorporate -*> this extra QRF step easily. The implementer can also improve data movement -*> (matrix transpose, matrix copy, matrix transposed copy) - this -*> implementation of ZGEJSV uses only the simplest, naive data movement. -*> \endverbatim -* -*> \par Contributor: -* ================== -*> -*> Zlatko Drmac, Department of Mathematics, Faculty of Science, -*> University of Zagreb (Zagreb, Croatia); drmac@math.hr -* -*> \par References: -* ================ -*> -*> \verbatim -*> -*> [1] Z. Drmac and K. Veselic: New fast and accurate Jacobi SVD algorithm I. -*> SIAM J. Matrix Anal. Appl. Vol. 35, No. 2 (2008), pp. 1322-1342. -*> LAPACK Working note 169. -*> [2] Z. Drmac and K. Veselic: New fast and accurate Jacobi SVD algorithm II. -*> SIAM J. Matrix Anal. Appl. Vol. 35, No. 2 (2008), pp. 1343-1362. -*> LAPACK Working note 170. -*> [3] Z. Drmac and Z. Bujanovic: On the failure of rank-revealing QR -*> factorization software - a case study. -*> ACM Trans. Math. Softw. Vol. 35, No 2 (2008), pp. 1-28. -*> LAPACK Working note 176. -*> [4] Z. Drmac: SIGMA - mathematical software library for accurate SVD, PSV, -*> QSVD, (H,K)-SVD computations. -*> Department of Mathematics, University of Zagreb, 2008, 2016. -*> \endverbatim -* -*> \par Bugs, examples and comments: -* ================================= -*> -*> Please report all bugs and send interesting examples and/or comments to -*> drmac@math.hr. Thank you. -*> -* ===================================================================== - SUBROUTINE ZGEJSV( JOBA, JOBU, JOBV, JOBR, JOBT, JOBP, - $ M, N, A, LDA, SVA, U, LDU, V, LDV, - $ CWORK, LWORK, RWORK, LRWORK, IWORK, INFO ) -* -* -- LAPACK computational routine (version 3.7.0) -- -* -- LAPACK is a software package provided by Univ. of Tennessee, -- -* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 -* -* .. Scalar Arguments .. - IMPLICIT NONE - INTEGER INFO, LDA, LDU, LDV, LWORK, LRWORK, M, N -* .. -* .. Array Arguments .. - COMPLEX*16 A( LDA, * ), U( LDU, * ), V( LDV, * ), - $ CWORK( LWORK ) - DOUBLE PRECISION SVA( N ), RWORK( LRWORK ) - INTEGER IWORK( * ) - CHARACTER*1 JOBA, JOBP, JOBR, JOBT, JOBU, JOBV -* .. -* -* =========================================================================== -* -* .. Local Parameters .. - DOUBLE PRECISION ZERO, ONE - PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0 ) - COMPLEX*16 CZERO, CONE - PARAMETER ( CZERO = ( 0.0D0, 0.0D0 ), CONE = ( 1.0D0, 0.0D0 ) ) -* .. -* .. Local Scalars .. - COMPLEX*16 CTEMP - DOUBLE PRECISION AAPP, AAQQ, AATMAX, AATMIN, BIG, BIG1, - $ COND_OK, CONDR1, CONDR2, ENTRA, ENTRAT, EPSLN, - $ MAXPRJ, SCALEM, SCONDA, SFMIN, SMALL, TEMP1, - $ USCAL1, USCAL2, XSC - INTEGER IERR, N1, NR, NUMRANK, p, q, WARNING - LOGICAL ALMORT, DEFR, ERREST, GOSCAL, JRACC, KILL, LQUERY, - $ LSVEC, L2ABER, L2KILL, L2PERT, L2RANK, L2TRAN, NOSCAL, - $ ROWPIV, RSVEC, TRANSP -* - INTEGER OPTWRK, MINWRK, MINRWRK, MINIWRK - INTEGER LWCON, LWLQF, LWQP3, LWQRF, LWUNMLQ, LWUNMQR, LWUNMQRM, - $ LWSVDJ, LWSVDJV, LRWQP3, LRWCON, LRWSVDJ, IWOFF - INTEGER LWRK_ZGELQF, LWRK_ZGEQP3, LWRK_ZGEQP3N, LWRK_ZGEQRF, - $ LWRK_ZGESVJ, LWRK_ZGESVJV, LWRK_ZGESVJU, LWRK_ZUNMLQ, - $ LWRK_ZUNMQR, LWRK_ZUNMQRM -* .. -* .. Local Arrays - COMPLEX*16 CDUMMY(1) - DOUBLE PRECISION RDUMMY(1) -* -* .. Intrinsic Functions .. - INTRINSIC ABS, DCMPLX, CONJG, DLOG, MAX, MIN, DBLE, NINT, SQRT -* .. -* .. External Functions .. - DOUBLE PRECISION DLAMCH, DZNRM2 - INTEGER IDAMAX, IZAMAX - LOGICAL LSAME - EXTERNAL IDAMAX, IZAMAX, LSAME, DLAMCH, DZNRM2 -* .. -* .. External Subroutines .. - EXTERNAL DLASSQ, ZCOPY, ZGELQF, ZGEQP3, ZGEQRF, ZLACPY, ZLAPMR, - $ ZLASCL, DLASCL, ZLASET, ZLASSQ, ZLASWP, ZUNGQR, ZUNMLQ, - $ ZUNMQR, ZPOCON, DSCAL, ZDSCAL, ZSWAP, ZTRSM, ZLACGV, - $ XERBLA -* - EXTERNAL ZGESVJ -* .. -* -* Test the input arguments -* - LSVEC = LSAME( JOBU, 'U' ) .OR. LSAME( JOBU, 'F' ) - JRACC = LSAME( JOBV, 'J' ) - RSVEC = LSAME( JOBV, 'V' ) .OR. JRACC - ROWPIV = LSAME( JOBA, 'F' ) .OR. LSAME( JOBA, 'G' ) - L2RANK = LSAME( JOBA, 'R' ) - L2ABER = LSAME( JOBA, 'A' ) - ERREST = LSAME( JOBA, 'E' ) .OR. LSAME( JOBA, 'G' ) - L2TRAN = LSAME( JOBT, 'T' ) .AND. ( M .EQ. N ) - L2KILL = LSAME( JOBR, 'R' ) - DEFR = LSAME( JOBR, 'N' ) - L2PERT = LSAME( JOBP, 'P' ) -* - LQUERY = ( LWORK .EQ. -1 ) .OR. ( LRWORK .EQ. -1 ) -* - IF ( .NOT.(ROWPIV .OR. L2RANK .OR. L2ABER .OR. - $ ERREST .OR. LSAME( JOBA, 'C' ) )) THEN - INFO = - 1 - ELSE IF ( .NOT.( LSVEC .OR. LSAME( JOBU, 'N' ) .OR. - $ ( LSAME( JOBU, 'W' ) .AND. RSVEC .AND. L2TRAN ) ) ) THEN - INFO = - 2 - ELSE IF ( .NOT.( RSVEC .OR. LSAME( JOBV, 'N' ) .OR. - $ ( LSAME( JOBV, 'W' ) .AND. LSVEC .AND. L2TRAN ) ) ) THEN - INFO = - 3 - ELSE IF ( .NOT. ( L2KILL .OR. DEFR ) ) THEN - INFO = - 4 - ELSE IF ( .NOT. ( LSAME(JOBT,'T') .OR. LSAME(JOBT,'N') ) ) THEN - INFO = - 5 - ELSE IF ( .NOT. ( L2PERT .OR. LSAME( JOBP, 'N' ) ) ) THEN - INFO = - 6 - ELSE IF ( M .LT. 0 ) THEN - INFO = - 7 - ELSE IF ( ( N .LT. 0 ) .OR. ( N .GT. M ) ) THEN - INFO = - 8 - ELSE IF ( LDA .LT. M ) THEN - INFO = - 10 - ELSE IF ( LSVEC .AND. ( LDU .LT. M ) ) THEN - INFO = - 13 - ELSE IF ( RSVEC .AND. ( LDV .LT. N ) ) THEN - INFO = - 15 - ELSE -* #:) - INFO = 0 - END IF -* - IF ( INFO .EQ. 0 ) THEN -* .. compute the minimal and the optimal workspace lengths -* [[The expressions for computing the minimal and the optimal -* values of LCWORK, LRWORK are written with a lot of redundancy and -* can be simplified. However, this verbose form is useful for -* maintenance and modifications of the code.]] -* -* .. minimal workspace length for ZGEQP3 of an M x N matrix, -* ZGEQRF of an N x N matrix, ZGELQF of an N x N matrix, -* ZUNMLQ for computing N x N matrix, ZUNMQR for computing N x N -* matrix, ZUNMQR for computing M x N matrix, respectively. - LWQP3 = N+1 - LWQRF = MAX( 1, N ) - LWLQF = MAX( 1, N ) - LWUNMLQ = MAX( 1, N ) - LWUNMQR = MAX( 1, N ) - LWUNMQRM = MAX( 1, M ) -* .. minimal workspace length for ZPOCON of an N x N matrix - LWCON = 2 * N -* .. minimal workspace length for ZGESVJ of an N x N matrix, -* without and with explicit accumulation of Jacobi rotations - LWSVDJ = MAX( 2 * N, 1 ) - LWSVDJV = MAX( 2 * N, 1 ) -* .. minimal REAL workspace length for ZGEQP3, ZPOCON, ZGESVJ - LRWQP3 = N - LRWCON = N - LRWSVDJ = N - IF ( LQUERY ) THEN - CALL ZGEQP3( M, N, A, LDA, IWORK, CDUMMY, CDUMMY, -1, - $ RDUMMY, IERR ) - LWRK_ZGEQP3 = CDUMMY(1) - CALL ZGEQRF( N, N, A, LDA, CDUMMY, CDUMMY,-1, IERR ) - LWRK_ZGEQRF = CDUMMY(1) - CALL ZGELQF( N, N, A, LDA, CDUMMY, CDUMMY,-1, IERR ) - LWRK_ZGELQF = CDUMMY(1) - END IF - MINWRK = 2 - OPTWRK = 2 - MINIWRK = N - IF ( .NOT. (LSVEC .OR. RSVEC ) ) THEN -* .. minimal and optimal sizes of the complex workspace if -* only the singular values are requested - IF ( ERREST ) THEN - MINWRK = MAX( N+LWQP3, N**2+LWCON, N+LWQRF, LWSVDJ ) - ELSE - MINWRK = MAX( N+LWQP3, N+LWQRF, LWSVDJ ) - END IF - IF ( LQUERY ) THEN - CALL ZGESVJ( 'L', 'N', 'N', N, N, A, LDA, SVA, N, V, - $ LDV, CDUMMY, -1, RDUMMY, -1, IERR ) - LWRK_ZGESVJ = CDUMMY(1) - IF ( ERREST ) THEN - OPTWRK = MAX( N+LWRK_ZGEQP3, N**2+LWCON, - $ N+LWRK_ZGEQRF, LWRK_ZGESVJ ) - ELSE - OPTWRK = MAX( N+LWRK_ZGEQP3, N+LWRK_ZGEQRF, - $ LWRK_ZGESVJ ) - END IF - END IF - IF ( L2TRAN .OR. ROWPIV ) THEN - IF ( ERREST ) THEN - MINRWRK = MAX( 7, 2*M, LRWQP3, LRWCON, LRWSVDJ ) - ELSE - MINRWRK = MAX( 7, 2*M, LRWQP3, LRWSVDJ ) - END IF - ELSE - IF ( ERREST ) THEN - MINRWRK = MAX( 7, LRWQP3, LRWCON, LRWSVDJ ) - ELSE - MINRWRK = MAX( 7, LRWQP3, LRWSVDJ ) - END IF - END IF - IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M - ELSE IF ( RSVEC .AND. (.NOT.LSVEC) ) THEN -* .. minimal and optimal sizes of the complex workspace if the -* singular values and the right singular vectors are requested - IF ( ERREST ) THEN - MINWRK = MAX( N+LWQP3, LWCON, LWSVDJ, N+LWLQF, - $ 2*N+LWQRF, N+LWSVDJ, N+LWUNMLQ ) - ELSE - MINWRK = MAX( N+LWQP3, LWSVDJ, N+LWLQF, 2*N+LWQRF, - $ N+LWSVDJ, N+LWUNMLQ ) - END IF - IF ( LQUERY ) THEN - CALL ZGESVJ( 'L', 'U', 'N', N,N, U, LDU, SVA, N, A, - $ LDA, CDUMMY, -1, RDUMMY, -1, IERR ) - LWRK_ZGESVJ = CDUMMY(1) - CALL ZUNMLQ( 'L', 'C', N, N, N, A, LDA, CDUMMY, - $ V, LDV, CDUMMY, -1, IERR ) - LWRK_ZUNMLQ = CDUMMY(1) - IF ( ERREST ) THEN - OPTWRK = MAX( N+LWRK_ZGEQP3, LWCON, LWRK_ZGESVJ, - $ N+LWRK_ZGELQF, 2*N+LWRK_ZGEQRF, - $ N+LWRK_ZGESVJ, N+LWRK_ZUNMLQ ) - ELSE - OPTWRK = MAX( N+LWRK_ZGEQP3, LWRK_ZGESVJ,N+LWRK_ZGELQF, - $ 2*N+LWRK_ZGEQRF, N+LWRK_ZGESVJ, - $ N+LWRK_ZUNMLQ ) - END IF - END IF - IF ( L2TRAN .OR. ROWPIV ) THEN - IF ( ERREST ) THEN - MINRWRK = MAX( 7, 2*M, LRWQP3, LRWSVDJ, LRWCON ) - ELSE - MINRWRK = MAX( 7, 2*M, LRWQP3, LRWSVDJ ) - END IF - ELSE - IF ( ERREST ) THEN - MINRWRK = MAX( 7, LRWQP3, LRWSVDJ, LRWCON ) - ELSE - MINRWRK = MAX( 7, LRWQP3, LRWSVDJ ) - END IF - END IF - IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M - ELSE IF ( LSVEC .AND. (.NOT.RSVEC) ) THEN -* .. minimal and optimal sizes of the complex workspace if the -* singular values and the left singular vectors are requested - IF ( ERREST ) THEN - MINWRK = N + MAX( LWQP3,LWCON,N+LWQRF,LWSVDJ,LWUNMQRM ) - ELSE - MINWRK = N + MAX( LWQP3, N+LWQRF, LWSVDJ, LWUNMQRM ) - END IF - IF ( LQUERY ) THEN - CALL ZGESVJ( 'L', 'U', 'N', N,N, U, LDU, SVA, N, A, - $ LDA, CDUMMY, -1, RDUMMY, -1, IERR ) - LWRK_ZGESVJ = CDUMMY(1) - CALL ZUNMQR( 'L', 'N', M, N, N, A, LDA, CDUMMY, U, - $ LDU, CDUMMY, -1, IERR ) - LWRK_ZUNMQRM = CDUMMY(1) - IF ( ERREST ) THEN - OPTWRK = N + MAX( LWRK_ZGEQP3, LWCON, N+LWRK_ZGEQRF, - $ LWRK_ZGESVJ, LWRK_ZUNMQRM ) - ELSE - OPTWRK = N + MAX( LWRK_ZGEQP3, N+LWRK_ZGEQRF, - $ LWRK_ZGESVJ, LWRK_ZUNMQRM ) - END IF - END IF - IF ( L2TRAN .OR. ROWPIV ) THEN - IF ( ERREST ) THEN - MINRWRK = MAX( 7, 2*M, LRWQP3, LRWSVDJ, LRWCON ) - ELSE - MINRWRK = MAX( 7, 2*M, LRWQP3, LRWSVDJ ) - END IF - ELSE - IF ( ERREST ) THEN - MINRWRK = MAX( 7, LRWQP3, LRWSVDJ, LRWCON ) - ELSE - MINRWRK = MAX( 7, LRWQP3, LRWSVDJ ) - END IF - END IF - IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M - ELSE -* .. minimal and optimal sizes of the complex workspace if the -* full SVD is requested - IF ( .NOT. JRACC ) THEN - IF ( ERREST ) THEN - MINWRK = MAX( N+LWQP3, N+LWCON, 2*N+N**2+LWCON, - $ 2*N+LWQRF, 2*N+LWQP3, - $ 2*N+N**2+N+LWLQF, 2*N+N**2+N+N**2+LWCON, - $ 2*N+N**2+N+LWSVDJ, 2*N+N**2+N+LWSVDJV, - $ 2*N+N**2+N+LWUNMQR,2*N+N**2+N+LWUNMLQ, - $ N+N**2+LWSVDJ, N+LWUNMQRM ) - ELSE - MINWRK = MAX( N+LWQP3, 2*N+N**2+LWCON, - $ 2*N+LWQRF, 2*N+LWQP3, - $ 2*N+N**2+N+LWLQF, 2*N+N**2+N+N**2+LWCON, - $ 2*N+N**2+N+LWSVDJ, 2*N+N**2+N+LWSVDJV, - $ 2*N+N**2+N+LWUNMQR,2*N+N**2+N+LWUNMLQ, - $ N+N**2+LWSVDJ, N+LWUNMQRM ) - END IF - MINIWRK = MINIWRK + N - IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M - ELSE - IF ( ERREST ) THEN - MINWRK = MAX( N+LWQP3, N+LWCON, 2*N+LWQRF, - $ 2*N+N**2+LWSVDJV, 2*N+N**2+N+LWUNMQR, - $ N+LWUNMQRM ) - ELSE - MINWRK = MAX( N+LWQP3, 2*N+LWQRF, - $ 2*N+N**2+LWSVDJV, 2*N+N**2+N+LWUNMQR, - $ N+LWUNMQRM ) - END IF - IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M - END IF - IF ( LQUERY ) THEN - CALL ZUNMQR( 'L', 'N', M, N, N, A, LDA, CDUMMY, U, - $ LDU, CDUMMY, -1, IERR ) - LWRK_ZUNMQRM = CDUMMY(1) - CALL ZUNMQR( 'L', 'N', N, N, N, A, LDA, CDUMMY, U, - $ LDU, CDUMMY, -1, IERR ) - LWRK_ZUNMQR = CDUMMY(1) - IF ( .NOT. JRACC ) THEN - CALL ZGEQP3( N,N, A, LDA, IWORK, CDUMMY,CDUMMY, -1, - $ RDUMMY, IERR ) - LWRK_ZGEQP3N = CDUMMY(1) - CALL ZGESVJ( 'L', 'U', 'N', N, N, U, LDU, SVA, - $ N, V, LDV, CDUMMY, -1, RDUMMY, -1, IERR ) - LWRK_ZGESVJ = CDUMMY(1) - CALL ZGESVJ( 'U', 'U', 'N', N, N, U, LDU, SVA, - $ N, V, LDV, CDUMMY, -1, RDUMMY, -1, IERR ) - LWRK_ZGESVJU = CDUMMY(1) - CALL ZGESVJ( 'L', 'U', 'V', N, N, U, LDU, SVA, - $ N, V, LDV, CDUMMY, -1, RDUMMY, -1, IERR ) - LWRK_ZGESVJV = CDUMMY(1) - CALL ZUNMLQ( 'L', 'C', N, N, N, A, LDA, CDUMMY, - $ V, LDV, CDUMMY, -1, IERR ) - LWRK_ZUNMLQ = CDUMMY(1) - IF ( ERREST ) THEN - OPTWRK = MAX( N+LWRK_ZGEQP3, N+LWCON, - $ 2*N+N**2+LWCON, 2*N+LWRK_ZGEQRF, - $ 2*N+LWRK_ZGEQP3N, - $ 2*N+N**2+N+LWRK_ZGELQF, - $ 2*N+N**2+N+N**2+LWCON, - $ 2*N+N**2+N+LWRK_ZGESVJ, - $ 2*N+N**2+N+LWRK_ZGESVJV, - $ 2*N+N**2+N+LWRK_ZUNMQR, - $ 2*N+N**2+N+LWRK_ZUNMLQ, - $ N+N**2+LWRK_ZGESVJU, - $ N+LWRK_ZUNMQRM ) - ELSE - OPTWRK = MAX( N+LWRK_ZGEQP3, - $ 2*N+N**2+LWCON, 2*N+LWRK_ZGEQRF, - $ 2*N+LWRK_ZGEQP3N, - $ 2*N+N**2+N+LWRK_ZGELQF, - $ 2*N+N**2+N+N**2+LWCON, - $ 2*N+N**2+N+LWRK_ZGESVJ, - $ 2*N+N**2+N+LWRK_ZGESVJV, - $ 2*N+N**2+N+LWRK_ZUNMQR, - $ 2*N+N**2+N+LWRK_ZUNMLQ, - $ N+N**2+LWRK_ZGESVJU, - $ N+LWRK_ZUNMQRM ) - END IF - ELSE - CALL ZGESVJ( 'L', 'U', 'V', N, N, U, LDU, SVA, - $ N, V, LDV, CDUMMY, -1, RDUMMY, -1, IERR ) - LWRK_ZGESVJV = CDUMMY(1) - CALL ZUNMQR( 'L', 'N', N, N, N, CDUMMY, N, CDUMMY, - $ V, LDV, CDUMMY, -1, IERR ) - LWRK_ZUNMQR = CDUMMY(1) - CALL ZUNMQR( 'L', 'N', M, N, N, A, LDA, CDUMMY, U, - $ LDU, CDUMMY, -1, IERR ) - LWRK_ZUNMQRM = CDUMMY(1) - IF ( ERREST ) THEN - OPTWRK = MAX( N+LWRK_ZGEQP3, N+LWCON, - $ 2*N+LWRK_ZGEQRF, 2*N+N**2, - $ 2*N+N**2+LWRK_ZGESVJV, - $ 2*N+N**2+N+LWRK_ZUNMQR,N+LWRK_ZUNMQRM ) - ELSE - OPTWRK = MAX( N+LWRK_ZGEQP3, 2*N+LWRK_ZGEQRF, - $ 2*N+N**2, 2*N+N**2+LWRK_ZGESVJV, - $ 2*N+N**2+N+LWRK_ZUNMQR, - $ N+LWRK_ZUNMQRM ) - END IF - END IF - END IF - IF ( L2TRAN .OR. ROWPIV ) THEN - MINRWRK = MAX( 7, 2*M, LRWQP3, LRWSVDJ, LRWCON ) - ELSE - MINRWRK = MAX( 7, LRWQP3, LRWSVDJ, LRWCON ) - END IF - END IF - MINWRK = MAX( 2, MINWRK ) - OPTWRK = MAX( 2, OPTWRK ) - IF ( LWORK .LT. MINWRK .AND. (.NOT.LQUERY) ) INFO = - 17 - IF ( LRWORK .LT. MINRWRK .AND. (.NOT.LQUERY) ) INFO = - 19 - END IF -* - IF ( INFO .NE. 0 ) THEN -* #:( - CALL XERBLA( 'ZGEJSV', - INFO ) - RETURN - ELSE IF ( LQUERY ) THEN - CWORK(1) = OPTWRK - CWORK(2) = MINWRK - RWORK(1) = MINRWRK - IWORK(1) = MAX( 4, MINIWRK ) - RETURN - END IF -* -* Quick return for void matrix (Y3K safe) -* #:) - IF ( ( M .EQ. 0 ) .OR. ( N .EQ. 0 ) ) THEN - IWORK(1:4) = 0 - RWORK(1:7) = 0 - RETURN - ENDIF -* -* Determine whether the matrix U should be M x N or M x M -* - IF ( LSVEC ) THEN - N1 = N - IF ( LSAME( JOBU, 'F' ) ) N1 = M - END IF -* -* Set numerical parameters -* -*! NOTE: Make sure DLAMCH() does not fail on the target architecture. -* - EPSLN = DLAMCH('Epsilon') - SFMIN = DLAMCH('SafeMinimum') - SMALL = SFMIN / EPSLN - BIG = DLAMCH('O') -* BIG = ONE / SFMIN -* -* Initialize SVA(1:N) = diag( ||A e_i||_2 )_1^N -* -*(!) If necessary, scale SVA() to protect the largest norm from -* overflow. It is possible that this scaling pushes the smallest -* column norm left from the underflow threshold (extreme case). -* - SCALEM = ONE / SQRT(DBLE(M)*DBLE(N)) - NOSCAL = .TRUE. - GOSCAL = .TRUE. - DO 1874 p = 1, N - AAPP = ZERO - AAQQ = ONE - CALL ZLASSQ( M, A(1,p), 1, AAPP, AAQQ ) - IF ( AAPP .GT. BIG ) THEN - INFO = - 9 - CALL XERBLA( 'ZGEJSV', -INFO ) - RETURN - END IF - AAQQ = SQRT(AAQQ) - IF ( ( AAPP .LT. (BIG / AAQQ) ) .AND. NOSCAL ) THEN - SVA(p) = AAPP * AAQQ - ELSE - NOSCAL = .FALSE. - SVA(p) = AAPP * ( AAQQ * SCALEM ) - IF ( GOSCAL ) THEN - GOSCAL = .FALSE. - CALL DSCAL( p-1, SCALEM, SVA, 1 ) - END IF - END IF - 1874 CONTINUE -* - IF ( NOSCAL ) SCALEM = ONE -* - AAPP = ZERO - AAQQ = BIG - DO 4781 p = 1, N - AAPP = MAX( AAPP, SVA(p) ) - IF ( SVA(p) .NE. ZERO ) AAQQ = MIN( AAQQ, SVA(p) ) - 4781 CONTINUE -* -* Quick return for zero M x N matrix -* #:) - IF ( AAPP .EQ. ZERO ) THEN - IF ( LSVEC ) CALL ZLASET( 'G', M, N1, CZERO, CONE, U, LDU ) - IF ( RSVEC ) CALL ZLASET( 'G', N, N, CZERO, CONE, V, LDV ) - RWORK(1) = ONE - RWORK(2) = ONE - IF ( ERREST ) RWORK(3) = ONE - IF ( LSVEC .AND. RSVEC ) THEN - RWORK(4) = ONE - RWORK(5) = ONE - END IF - IF ( L2TRAN ) THEN - RWORK(6) = ZERO - RWORK(7) = ZERO - END IF - IWORK(1) = 0 - IWORK(2) = 0 - IWORK(3) = 0 - IWORK(4) = -1 - RETURN - END IF -* -* Issue warning if denormalized column norms detected. Override the -* high relative accuracy request. Issue licence to kill nonzero columns -* (set them to zero) whose norm is less than sigma_max / BIG (roughly). -* #:( - WARNING = 0 - IF ( AAQQ .LE. SFMIN ) THEN - L2RANK = .TRUE. - L2KILL = .TRUE. - WARNING = 1 - END IF -* -* Quick return for one-column matrix -* #:) - IF ( N .EQ. 1 ) THEN -* - IF ( LSVEC ) THEN - CALL ZLASCL( 'G',0,0,SVA(1),SCALEM, M,1,A(1,1),LDA,IERR ) - CALL ZLACPY( 'A', M, 1, A, LDA, U, LDU ) -* computing all M left singular vectors of the M x 1 matrix - IF ( N1 .NE. N ) THEN - CALL ZGEQRF( M, N, U,LDU, CWORK, CWORK(N+1),LWORK-N,IERR ) - CALL ZUNGQR( M,N1,1, U,LDU,CWORK,CWORK(N+1),LWORK-N,IERR ) - CALL ZCOPY( M, A(1,1), 1, U(1,1), 1 ) - END IF - END IF - IF ( RSVEC ) THEN - V(1,1) = CONE - END IF - IF ( SVA(1) .LT. (BIG*SCALEM) ) THEN - SVA(1) = SVA(1) / SCALEM - SCALEM = ONE - END IF - RWORK(1) = ONE / SCALEM - RWORK(2) = ONE - IF ( SVA(1) .NE. ZERO ) THEN - IWORK(1) = 1 - IF ( ( SVA(1) / SCALEM) .GE. SFMIN ) THEN - IWORK(2) = 1 - ELSE - IWORK(2) = 0 - END IF - ELSE - IWORK(1) = 0 - IWORK(2) = 0 - END IF - IWORK(3) = 0 - IWORK(4) = -1 - IF ( ERREST ) RWORK(3) = ONE - IF ( LSVEC .AND. RSVEC ) THEN - RWORK(4) = ONE - RWORK(5) = ONE - END IF - IF ( L2TRAN ) THEN - RWORK(6) = ZERO - RWORK(7) = ZERO - END IF - RETURN -* - END IF -* - TRANSP = .FALSE. -* - AATMAX = -ONE - AATMIN = BIG - IF ( ROWPIV .OR. L2TRAN ) THEN -* -* Compute the row norms, needed to determine row pivoting sequence -* (in the case of heavily row weighted A, row pivoting is strongly -* advised) and to collect information needed to compare the -* structures of A * A^* and A^* * A (in the case L2TRAN.EQ..TRUE.). -* - IF ( L2TRAN ) THEN - DO 1950 p = 1, M - XSC = ZERO - TEMP1 = ONE - CALL ZLASSQ( N, A(p,1), LDA, XSC, TEMP1 ) -* ZLASSQ gets both the ell_2 and the ell_infinity norm -* in one pass through the vector - RWORK(M+p) = XSC * SCALEM - RWORK(p) = XSC * (SCALEM*SQRT(TEMP1)) - AATMAX = MAX( AATMAX, RWORK(p) ) - IF (RWORK(p) .NE. ZERO) - $ AATMIN = MIN(AATMIN,RWORK(p)) - 1950 CONTINUE - ELSE - DO 1904 p = 1, M - RWORK(M+p) = SCALEM*ABS( A(p,IZAMAX(N,A(p,1),LDA)) ) - AATMAX = MAX( AATMAX, RWORK(M+p) ) - AATMIN = MIN( AATMIN, RWORK(M+p) ) - 1904 CONTINUE - END IF -* - END IF -* -* For square matrix A try to determine whether A^* would be better -* input for the preconditioned Jacobi SVD, with faster convergence. -* The decision is based on an O(N) function of the vector of column -* and row norms of A, based on the Shannon entropy. This should give -* the right choice in most cases when the difference actually matters. -* It may fail and pick the slower converging side. -* - ENTRA = ZERO - ENTRAT = ZERO - IF ( L2TRAN ) THEN -* - XSC = ZERO - TEMP1 = ONE - CALL DLASSQ( N, SVA, 1, XSC, TEMP1 ) - TEMP1 = ONE / TEMP1 -* - ENTRA = ZERO - DO 1113 p = 1, N - BIG1 = ( ( SVA(p) / XSC )**2 ) * TEMP1 - IF ( BIG1 .NE. ZERO ) ENTRA = ENTRA + BIG1 * DLOG(BIG1) - 1113 CONTINUE - ENTRA = - ENTRA / DLOG(DBLE(N)) -* -* Now, SVA().^2/Trace(A^* * A) is a point in the probability simplex. -* It is derived from the diagonal of A^* * A. Do the same with the -* diagonal of A * A^*, compute the entropy of the corresponding -* probability distribution. Note that A * A^* and A^* * A have the -* same trace. -* - ENTRAT = ZERO - DO 1114 p = 1, M - BIG1 = ( ( RWORK(p) / XSC )**2 ) * TEMP1 - IF ( BIG1 .NE. ZERO ) ENTRAT = ENTRAT + BIG1 * DLOG(BIG1) - 1114 CONTINUE - ENTRAT = - ENTRAT / DLOG(DBLE(M)) -* -* Analyze the entropies and decide A or A^*. Smaller entropy -* usually means better input for the algorithm. -* - TRANSP = ( ENTRAT .LT. ENTRA ) -* -* If A^* is better than A, take the adjoint of A. This is allowed -* only for square matrices, M=N. - IF ( TRANSP ) THEN -* In an optimal implementation, this trivial transpose -* should be replaced with faster transpose. - DO 1115 p = 1, N - 1 - A(p,p) = CONJG(A(p,p)) - DO 1116 q = p + 1, N - CTEMP = CONJG(A(q,p)) - A(q,p) = CONJG(A(p,q)) - A(p,q) = CTEMP - 1116 CONTINUE - 1115 CONTINUE - A(N,N) = CONJG(A(N,N)) - DO 1117 p = 1, N - RWORK(M+p) = SVA(p) - SVA(p) = RWORK(p) -* previously computed row 2-norms are now column 2-norms -* of the transposed matrix - 1117 CONTINUE - TEMP1 = AAPP - AAPP = AATMAX - AATMAX = TEMP1 - TEMP1 = AAQQ - AAQQ = AATMIN - AATMIN = TEMP1 - KILL = LSVEC - LSVEC = RSVEC - RSVEC = KILL - IF ( LSVEC ) N1 = N -* - ROWPIV = .TRUE. - END IF -* - END IF -* END IF L2TRAN -* -* Scale the matrix so that its maximal singular value remains less -* than SQRT(BIG) -- the matrix is scaled so that its maximal column -* has Euclidean norm equal to SQRT(BIG/N). The only reason to keep -* SQRT(BIG) instead of BIG is the fact that ZGEJSV uses LAPACK and -* BLAS routines that, in some implementations, are not capable of -* working in the full interval [SFMIN,BIG] and that they may provoke -* overflows in the intermediate results. If the singular values spread -* from SFMIN to BIG, then ZGESVJ will compute them. So, in that case, -* one should use ZGESVJ instead of ZGEJSV. -* >> change in the April 2016 update: allow bigger range, i.e. the -* largest column is allowed up to BIG/N and ZGESVJ will do the rest. - BIG1 = SQRT( BIG ) - TEMP1 = SQRT( BIG / DBLE(N) ) -* TEMP1 = BIG/DBLE(N) -* - CALL DLASCL( 'G', 0, 0, AAPP, TEMP1, N, 1, SVA, N, IERR ) - IF ( AAQQ .GT. (AAPP * SFMIN) ) THEN - AAQQ = ( AAQQ / AAPP ) * TEMP1 - ELSE - AAQQ = ( AAQQ * TEMP1 ) / AAPP - END IF - TEMP1 = TEMP1 * SCALEM - CALL ZLASCL( 'G', 0, 0, AAPP, TEMP1, M, N, A, LDA, IERR ) -* -* To undo scaling at the end of this procedure, multiply the -* computed singular values with USCAL2 / USCAL1. -* - USCAL1 = TEMP1 - USCAL2 = AAPP -* - IF ( L2KILL ) THEN -* L2KILL enforces computation of nonzero singular values in -* the restricted range of condition number of the initial A, -* sigma_max(A) / sigma_min(A) approx. SQRT(BIG)/SQRT(SFMIN). - XSC = SQRT( SFMIN ) - ELSE - XSC = SMALL -* -* Now, if the condition number of A is too big, -* sigma_max(A) / sigma_min(A) .GT. SQRT(BIG/N) * EPSLN / SFMIN, -* as a precaution measure, the full SVD is computed using ZGESVJ -* with accumulated Jacobi rotations. This provides numerically -* more robust computation, at the cost of slightly increased run -* time. Depending on the concrete implementation of BLAS and LAPACK -* (i.e. how they behave in presence of extreme ill-conditioning) the -* implementor may decide to remove this switch. - IF ( ( AAQQ.LT.SQRT(SFMIN) ) .AND. LSVEC .AND. RSVEC ) THEN - JRACC = .TRUE. - END IF -* - END IF - IF ( AAQQ .LT. XSC ) THEN - DO 700 p = 1, N - IF ( SVA(p) .LT. XSC ) THEN - CALL ZLASET( 'A', M, 1, CZERO, CZERO, A(1,p), LDA ) - SVA(p) = ZERO - END IF - 700 CONTINUE - END IF -* -* Preconditioning using QR factorization with pivoting -* - IF ( ROWPIV ) THEN -* Optional row permutation (Bjoerck row pivoting): -* A result by Cox and Higham shows that the Bjoerck's -* row pivoting combined with standard column pivoting -* has similar effect as Powell-Reid complete pivoting. -* The ell-infinity norms of A are made nonincreasing. - IF ( ( LSVEC .AND. RSVEC ) .AND. .NOT.( JRACC ) ) THEN - IWOFF = 2*N - ELSE - IWOFF = N - END IF - DO 1952 p = 1, M - 1 - q = IDAMAX( M-p+1, RWORK(M+p), 1 ) + p - 1 - IWORK(IWOFF+p) = q - IF ( p .NE. q ) THEN - TEMP1 = RWORK(M+p) - RWORK(M+p) = RWORK(M+q) - RWORK(M+q) = TEMP1 - END IF - 1952 CONTINUE - CALL ZLASWP( N, A, LDA, 1, M-1, IWORK(IWOFF+1), 1 ) - END IF -* -* End of the preparation phase (scaling, optional sorting and -* transposing, optional flushing of small columns). -* -* Preconditioning -* -* If the full SVD is needed, the right singular vectors are computed -* from a matrix equation, and for that we need theoretical analysis -* of the Businger-Golub pivoting. So we use ZGEQP3 as the first RR QRF. -* In all other cases the first RR QRF can be chosen by other criteria -* (eg speed by replacing global with restricted window pivoting, such -* as in xGEQPX from TOMS # 782). Good results will be obtained using -* xGEQPX with properly (!) chosen numerical parameters. -* Any improvement of ZGEQP3 improves overal performance of ZGEJSV. -* -* A * P1 = Q1 * [ R1^* 0]^*: - DO 1963 p = 1, N -* .. all columns are free columns - IWORK(p) = 0 - 1963 CONTINUE - CALL ZGEQP3( M, N, A, LDA, IWORK, CWORK, CWORK(N+1), LWORK-N, - $ RWORK, IERR ) -* -* The upper triangular matrix R1 from the first QRF is inspected for -* rank deficiency and possibilities for deflation, or possible -* ill-conditioning. Depending on the user specified flag L2RANK, -* the procedure explores possibilities to reduce the numerical -* rank by inspecting the computed upper triangular factor. If -* L2RANK or L2ABER are up, then ZGEJSV will compute the SVD of -* A + dA, where ||dA|| <= f(M,N)*EPSLN. -* - NR = 1 - IF ( L2ABER ) THEN -* Standard absolute error bound suffices. All sigma_i with -* sigma_i < N*EPSLN*||A|| are flushed to zero. This is an -* agressive enforcement of lower numerical rank by introducing a -* backward error of the order of N*EPSLN*||A||. - TEMP1 = SQRT(DBLE(N))*EPSLN - DO 3001 p = 2, N - IF ( ABS(A(p,p)) .GE. (TEMP1*ABS(A(1,1))) ) THEN - NR = NR + 1 - ELSE - GO TO 3002 - END IF - 3001 CONTINUE - 3002 CONTINUE - ELSE IF ( L2RANK ) THEN -* .. similarly as above, only slightly more gentle (less agressive). -* Sudden drop on the diagonal of R1 is used as the criterion for -* close-to-rank-deficient. - TEMP1 = SQRT(SFMIN) - DO 3401 p = 2, N - IF ( ( ABS(A(p,p)) .LT. (EPSLN*ABS(A(p-1,p-1))) ) .OR. - $ ( ABS(A(p,p)) .LT. SMALL ) .OR. - $ ( L2KILL .AND. (ABS(A(p,p)) .LT. TEMP1) ) ) GO TO 3402 - NR = NR + 1 - 3401 CONTINUE - 3402 CONTINUE -* - ELSE -* The goal is high relative accuracy. However, if the matrix -* has high scaled condition number the relative accuracy is in -* general not feasible. Later on, a condition number estimator -* will be deployed to estimate the scaled condition number. -* Here we just remove the underflowed part of the triangular -* factor. This prevents the situation in which the code is -* working hard to get the accuracy not warranted by the data. - TEMP1 = SQRT(SFMIN) - DO 3301 p = 2, N - IF ( ( ABS(A(p,p)) .LT. SMALL ) .OR. - $ ( L2KILL .AND. (ABS(A(p,p)) .LT. TEMP1) ) ) GO TO 3302 - NR = NR + 1 - 3301 CONTINUE - 3302 CONTINUE -* - END IF -* - ALMORT = .FALSE. - IF ( NR .EQ. N ) THEN - MAXPRJ = ONE - DO 3051 p = 2, N - TEMP1 = ABS(A(p,p)) / SVA(IWORK(p)) - MAXPRJ = MIN( MAXPRJ, TEMP1 ) - 3051 CONTINUE - IF ( MAXPRJ**2 .GE. ONE - DBLE(N)*EPSLN ) ALMORT = .TRUE. - END IF -* -* - SCONDA = - ONE - CONDR1 = - ONE - CONDR2 = - ONE -* - IF ( ERREST ) THEN - IF ( N .EQ. NR ) THEN - IF ( RSVEC ) THEN -* .. V is available as workspace - CALL ZLACPY( 'U', N, N, A, LDA, V, LDV ) - DO 3053 p = 1, N - TEMP1 = SVA(IWORK(p)) - CALL ZDSCAL( p, ONE/TEMP1, V(1,p), 1 ) - 3053 CONTINUE - IF ( LSVEC )THEN - CALL ZPOCON( 'U', N, V, LDV, ONE, TEMP1, - $ CWORK(N+1), RWORK, IERR ) - ELSE - CALL ZPOCON( 'U', N, V, LDV, ONE, TEMP1, - $ CWORK, RWORK, IERR ) - END IF -* - ELSE IF ( LSVEC ) THEN -* .. U is available as workspace - CALL ZLACPY( 'U', N, N, A, LDA, U, LDU ) - DO 3054 p = 1, N - TEMP1 = SVA(IWORK(p)) - CALL ZDSCAL( p, ONE/TEMP1, U(1,p), 1 ) - 3054 CONTINUE - CALL ZPOCON( 'U', N, U, LDU, ONE, TEMP1, - $ CWORK(N+1), RWORK, IERR ) - ELSE - CALL ZLACPY( 'U', N, N, A, LDA, CWORK, N ) -*[] CALL ZLACPY( 'U', N, N, A, LDA, CWORK(N+1), N ) -* Change: here index shifted by N to the left, CWORK(1:N) -* not needed for SIGMA only computation - DO 3052 p = 1, N - TEMP1 = SVA(IWORK(p)) -*[] CALL ZDSCAL( p, ONE/TEMP1, CWORK(N+(p-1)*N+1), 1 ) - CALL ZDSCAL( p, ONE/TEMP1, CWORK((p-1)*N+1), 1 ) - 3052 CONTINUE -* .. the columns of R are scaled to have unit Euclidean lengths. -*[] CALL ZPOCON( 'U', N, CWORK(N+1), N, ONE, TEMP1, -*[] $ CWORK(N+N*N+1), RWORK, IERR ) - CALL ZPOCON( 'U', N, CWORK, N, ONE, TEMP1, - $ CWORK(N*N+1), RWORK, IERR ) -* - END IF - IF ( TEMP1 .NE. ZERO ) THEN - SCONDA = ONE / SQRT(TEMP1) - ELSE - SCONDA = - ONE - END IF -* SCONDA is an estimate of SQRT(||(R^* * R)^(-1)||_1). -* N^(-1/4) * SCONDA <= ||R^(-1)||_2 <= N^(1/4) * SCONDA - ELSE - SCONDA = - ONE - END IF - END IF -* - L2PERT = L2PERT .AND. ( ABS( A(1,1)/A(NR,NR) ) .GT. SQRT(BIG1) ) -* If there is no violent scaling, artificial perturbation is not needed. -* -* Phase 3: -* - IF ( .NOT. ( RSVEC .OR. LSVEC ) ) THEN -* -* Singular Values only -* -* .. transpose A(1:NR,1:N) - DO 1946 p = 1, MIN( N-1, NR ) - CALL ZCOPY( N-p, A(p,p+1), LDA, A(p+1,p), 1 ) - CALL ZLACGV( N-p+1, A(p,p), 1 ) - 1946 CONTINUE - IF ( NR .EQ. N ) A(N,N) = CONJG(A(N,N)) -* -* The following two DO-loops introduce small relative perturbation -* into the strict upper triangle of the lower triangular matrix. -* Small entries below the main diagonal are also changed. -* This modification is useful if the computing environment does not -* provide/allow FLUSH TO ZERO underflow, for it prevents many -* annoying denormalized numbers in case of strongly scaled matrices. -* The perturbation is structured so that it does not introduce any -* new perturbation of the singular values, and it does not destroy -* the job done by the preconditioner. -* The licence for this perturbation is in the variable L2PERT, which -* should be .FALSE. if FLUSH TO ZERO underflow is active. -* - IF ( .NOT. ALMORT ) THEN -* - IF ( L2PERT ) THEN -* XSC = SQRT(SMALL) - XSC = EPSLN / DBLE(N) - DO 4947 q = 1, NR - CTEMP = DCMPLX(XSC*ABS(A(q,q)),ZERO) - DO 4949 p = 1, N - IF ( ( (p.GT.q) .AND. (ABS(A(p,q)).LE.TEMP1) ) - $ .OR. ( p .LT. q ) ) -* $ A(p,q) = TEMP1 * ( A(p,q) / ABS(A(p,q)) ) - $ A(p,q) = CTEMP - 4949 CONTINUE - 4947 CONTINUE - ELSE - CALL ZLASET( 'U', NR-1,NR-1, CZERO,CZERO, A(1,2),LDA ) - END IF -* -* .. second preconditioning using the QR factorization -* - CALL ZGEQRF( N,NR, A,LDA, CWORK, CWORK(N+1),LWORK-N, IERR ) -* -* .. and transpose upper to lower triangular - DO 1948 p = 1, NR - 1 - CALL ZCOPY( NR-p, A(p,p+1), LDA, A(p+1,p), 1 ) - CALL ZLACGV( NR-p+1, A(p,p), 1 ) - 1948 CONTINUE -* - END IF -* -* Row-cyclic Jacobi SVD algorithm with column pivoting -* -* .. again some perturbation (a "background noise") is added -* to drown denormals - IF ( L2PERT ) THEN -* XSC = SQRT(SMALL) - XSC = EPSLN / DBLE(N) - DO 1947 q = 1, NR - CTEMP = DCMPLX(XSC*ABS(A(q,q)),ZERO) - DO 1949 p = 1, NR - IF ( ( (p.GT.q) .AND. (ABS(A(p,q)).LE.TEMP1) ) - $ .OR. ( p .LT. q ) ) -* $ A(p,q) = TEMP1 * ( A(p,q) / ABS(A(p,q)) ) - $ A(p,q) = CTEMP - 1949 CONTINUE - 1947 CONTINUE - ELSE - CALL ZLASET( 'U', NR-1, NR-1, CZERO, CZERO, A(1,2), LDA ) - END IF -* -* .. and one-sided Jacobi rotations are started on a lower -* triangular matrix (plus perturbation which is ignored in -* the part which destroys triangular form (confusing?!)) -* - CALL ZGESVJ( 'L', 'N', 'N', NR, NR, A, LDA, SVA, - $ N, V, LDV, CWORK, LWORK, RWORK, LRWORK, INFO ) -* - SCALEM = RWORK(1) - NUMRANK = NINT(RWORK(2)) -* -* - ELSE IF ( ( RSVEC .AND. ( .NOT. LSVEC ) .AND. ( .NOT. JRACC ) ) - $ .OR. - $ ( JRACC .AND. ( .NOT. LSVEC ) .AND. ( NR .NE. N ) ) ) THEN -* -* -> Singular Values and Right Singular Vectors <- -* - IF ( ALMORT ) THEN -* -* .. in this case NR equals N - DO 1998 p = 1, NR - CALL ZCOPY( N-p+1, A(p,p), LDA, V(p,p), 1 ) - CALL ZLACGV( N-p+1, V(p,p), 1 ) - 1998 CONTINUE - CALL ZLASET( 'U', NR-1,NR-1, CZERO, CZERO, V(1,2), LDV ) -* - CALL ZGESVJ( 'L','U','N', N, NR, V, LDV, SVA, NR, A, LDA, - $ CWORK, LWORK, RWORK, LRWORK, INFO ) - SCALEM = RWORK(1) - NUMRANK = NINT(RWORK(2)) - - ELSE -* -* .. two more QR factorizations ( one QRF is not enough, two require -* accumulated product of Jacobi rotations, three are perfect ) -* - CALL ZLASET( 'L', NR-1,NR-1, CZERO, CZERO, A(2,1), LDA ) - CALL ZGELQF( NR,N, A, LDA, CWORK, CWORK(N+1), LWORK-N, IERR) - CALL ZLACPY( 'L', NR, NR, A, LDA, V, LDV ) - CALL ZLASET( 'U', NR-1,NR-1, CZERO, CZERO, V(1,2), LDV ) - CALL ZGEQRF( NR, NR, V, LDV, CWORK(N+1), CWORK(2*N+1), - $ LWORK-2*N, IERR ) - DO 8998 p = 1, NR - CALL ZCOPY( NR-p+1, V(p,p), LDV, V(p,p), 1 ) - CALL ZLACGV( NR-p+1, V(p,p), 1 ) - 8998 CONTINUE - CALL ZLASET('U', NR-1, NR-1, CZERO, CZERO, V(1,2), LDV) -* - CALL ZGESVJ( 'L', 'U','N', NR, NR, V,LDV, SVA, NR, U, - $ LDU, CWORK(N+1), LWORK-N, RWORK, LRWORK, INFO ) - SCALEM = RWORK(1) - NUMRANK = NINT(RWORK(2)) - IF ( NR .LT. N ) THEN - CALL ZLASET( 'A',N-NR, NR, CZERO,CZERO, V(NR+1,1), LDV ) - CALL ZLASET( 'A',NR, N-NR, CZERO,CZERO, V(1,NR+1), LDV ) - CALL ZLASET( 'A',N-NR,N-NR,CZERO,CONE, V(NR+1,NR+1),LDV ) - END IF -* - CALL ZUNMLQ( 'L', 'C', N, N, NR, A, LDA, CWORK, - $ V, LDV, CWORK(N+1), LWORK-N, IERR ) -* - END IF -* .. permute the rows of V -* DO 8991 p = 1, N -* CALL ZCOPY( N, V(p,1), LDV, A(IWORK(p),1), LDA ) -* 8991 CONTINUE -* CALL ZLACPY( 'All', N, N, A, LDA, V, LDV ) - CALL ZLAPMR( .FALSE., N, N, V, LDV, IWORK ) -* - IF ( TRANSP ) THEN - CALL ZLACPY( 'A', N, N, V, LDV, U, LDU ) - END IF -* - ELSE IF ( JRACC .AND. (.NOT. LSVEC) .AND. ( NR.EQ. N ) ) THEN -* - CALL ZLASET( 'L', N-1,N-1, CZERO, CZERO, A(2,1), LDA ) -* - CALL ZGESVJ( 'U','N','V', N, N, A, LDA, SVA, N, V, LDV, - $ CWORK, LWORK, RWORK, LRWORK, INFO ) - SCALEM = RWORK(1) - NUMRANK = NINT(RWORK(2)) - CALL ZLAPMR( .FALSE., N, N, V, LDV, IWORK ) -* - ELSE IF ( LSVEC .AND. ( .NOT. RSVEC ) ) THEN -* -* .. Singular Values and Left Singular Vectors .. -* -* .. second preconditioning step to avoid need to accumulate -* Jacobi rotations in the Jacobi iterations. - DO 1965 p = 1, NR - CALL ZCOPY( N-p+1, A(p,p), LDA, U(p,p), 1 ) - CALL ZLACGV( N-p+1, U(p,p), 1 ) - 1965 CONTINUE - CALL ZLASET( 'U', NR-1, NR-1, CZERO, CZERO, U(1,2), LDU ) -* - CALL ZGEQRF( N, NR, U, LDU, CWORK(N+1), CWORK(2*N+1), - $ LWORK-2*N, IERR ) -* - DO 1967 p = 1, NR - 1 - CALL ZCOPY( NR-p, U(p,p+1), LDU, U(p+1,p), 1 ) - CALL ZLACGV( N-p+1, U(p,p), 1 ) - 1967 CONTINUE - CALL ZLASET( 'U', NR-1, NR-1, CZERO, CZERO, U(1,2), LDU ) -* - CALL ZGESVJ( 'L', 'U', 'N', NR,NR, U, LDU, SVA, NR, A, - $ LDA, CWORK(N+1), LWORK-N, RWORK, LRWORK, INFO ) - SCALEM = RWORK(1) - NUMRANK = NINT(RWORK(2)) -* - IF ( NR .LT. M ) THEN - CALL ZLASET( 'A', M-NR, NR,CZERO, CZERO, U(NR+1,1), LDU ) - IF ( NR .LT. N1 ) THEN - CALL ZLASET( 'A',NR, N1-NR, CZERO, CZERO, U(1,NR+1),LDU ) - CALL ZLASET( 'A',M-NR,N1-NR,CZERO,CONE,U(NR+1,NR+1),LDU ) - END IF - END IF -* - CALL ZUNMQR( 'L', 'N', M, N1, N, A, LDA, CWORK, U, - $ LDU, CWORK(N+1), LWORK-N, IERR ) -* - IF ( ROWPIV ) - $ CALL ZLASWP( N1, U, LDU, 1, M-1, IWORK(IWOFF+1), -1 ) -* - DO 1974 p = 1, N1 - XSC = ONE / DZNRM2( M, U(1,p), 1 ) - CALL ZDSCAL( M, XSC, U(1,p), 1 ) - 1974 CONTINUE -* - IF ( TRANSP ) THEN - CALL ZLACPY( 'A', N, N, U, LDU, V, LDV ) - END IF -* - ELSE -* -* .. Full SVD .. -* - IF ( .NOT. JRACC ) THEN -* - IF ( .NOT. ALMORT ) THEN -* -* Second Preconditioning Step (QRF [with pivoting]) -* Note that the composition of TRANSPOSE, QRF and TRANSPOSE is -* equivalent to an LQF CALL. Since in many libraries the QRF -* seems to be better optimized than the LQF, we do explicit -* transpose and use the QRF. This is subject to changes in an -* optimized implementation of ZGEJSV. -* - DO 1968 p = 1, NR - CALL ZCOPY( N-p+1, A(p,p), LDA, V(p,p), 1 ) - CALL ZLACGV( N-p+1, V(p,p), 1 ) - 1968 CONTINUE -* -* .. the following two loops perturb small entries to avoid -* denormals in the second QR factorization, where they are -* as good as zeros. This is done to avoid painfully slow -* computation with denormals. The relative size of the perturbation -* is a parameter that can be changed by the implementer. -* This perturbation device will be obsolete on machines with -* properly implemented arithmetic. -* To switch it off, set L2PERT=.FALSE. To remove it from the -* code, remove the action under L2PERT=.TRUE., leave the ELSE part. -* The following two loops should be blocked and fused with the -* transposed copy above. -* - IF ( L2PERT ) THEN - XSC = SQRT(SMALL) - DO 2969 q = 1, NR - CTEMP = DCMPLX(XSC*ABS( V(q,q) ),ZERO) - DO 2968 p = 1, N - IF ( ( p .GT. q ) .AND. ( ABS(V(p,q)) .LE. TEMP1 ) - $ .OR. ( p .LT. q ) ) -* $ V(p,q) = TEMP1 * ( V(p,q) / ABS(V(p,q)) ) - $ V(p,q) = CTEMP - IF ( p .LT. q ) V(p,q) = - V(p,q) - 2968 CONTINUE - 2969 CONTINUE - ELSE - CALL ZLASET( 'U', NR-1, NR-1, CZERO, CZERO, V(1,2), LDV ) - END IF -* -* Estimate the row scaled condition number of R1 -* (If R1 is rectangular, N > NR, then the condition number -* of the leading NR x NR submatrix is estimated.) -* - CALL ZLACPY( 'L', NR, NR, V, LDV, CWORK(2*N+1), NR ) - DO 3950 p = 1, NR - TEMP1 = DZNRM2(NR-p+1,CWORK(2*N+(p-1)*NR+p),1) - CALL ZDSCAL(NR-p+1,ONE/TEMP1,CWORK(2*N+(p-1)*NR+p),1) - 3950 CONTINUE - CALL ZPOCON('L',NR,CWORK(2*N+1),NR,ONE,TEMP1, - $ CWORK(2*N+NR*NR+1),RWORK,IERR) - CONDR1 = ONE / SQRT(TEMP1) -* .. here need a second oppinion on the condition number -* .. then assume worst case scenario -* R1 is OK for inverse <=> CONDR1 .LT. DBLE(N) -* more conservative <=> CONDR1 .LT. SQRT(DBLE(N)) -* - COND_OK = SQRT(SQRT(DBLE(NR))) -*[TP] COND_OK is a tuning parameter. -* - IF ( CONDR1 .LT. COND_OK ) THEN -* .. the second QRF without pivoting. Note: in an optimized -* implementation, this QRF should be implemented as the QRF -* of a lower triangular matrix. -* R1^* = Q2 * R2 - CALL ZGEQRF( N, NR, V, LDV, CWORK(N+1), CWORK(2*N+1), - $ LWORK-2*N, IERR ) -* - IF ( L2PERT ) THEN - XSC = SQRT(SMALL)/EPSLN - DO 3959 p = 2, NR - DO 3958 q = 1, p - 1 - CTEMP=DCMPLX(XSC*MIN(ABS(V(p,p)),ABS(V(q,q))), - $ ZERO) - IF ( ABS(V(q,p)) .LE. TEMP1 ) -* $ V(q,p) = TEMP1 * ( V(q,p) / ABS(V(q,p)) ) - $ V(q,p) = CTEMP - 3958 CONTINUE - 3959 CONTINUE - END IF -* - IF ( NR .NE. N ) - $ CALL ZLACPY( 'A', N, NR, V, LDV, CWORK(2*N+1), N ) -* .. save ... -* -* .. this transposed copy should be better than naive - DO 1969 p = 1, NR - 1 - CALL ZCOPY( NR-p, V(p,p+1), LDV, V(p+1,p), 1 ) - CALL ZLACGV(NR-p+1, V(p,p), 1 ) - 1969 CONTINUE - V(NR,NR)=CONJG(V(NR,NR)) -* - CONDR2 = CONDR1 -* - ELSE -* -* .. ill-conditioned case: second QRF with pivoting -* Note that windowed pivoting would be equaly good -* numerically, and more run-time efficient. So, in -* an optimal implementation, the next call to ZGEQP3 -* should be replaced with eg. CALL ZGEQPX (ACM TOMS #782) -* with properly (carefully) chosen parameters. -* -* R1^* * P2 = Q2 * R2 - DO 3003 p = 1, NR - IWORK(N+p) = 0 - 3003 CONTINUE - CALL ZGEQP3( N, NR, V, LDV, IWORK(N+1), CWORK(N+1), - $ CWORK(2*N+1), LWORK-2*N, RWORK, IERR ) -** CALL ZGEQRF( N, NR, V, LDV, CWORK(N+1), CWORK(2*N+1), -** $ LWORK-2*N, IERR ) - IF ( L2PERT ) THEN - XSC = SQRT(SMALL) - DO 3969 p = 2, NR - DO 3968 q = 1, p - 1 - CTEMP=DCMPLX(XSC*MIN(ABS(V(p,p)),ABS(V(q,q))), - $ ZERO) - IF ( ABS(V(q,p)) .LE. TEMP1 ) -* $ V(q,p) = TEMP1 * ( V(q,p) / ABS(V(q,p)) ) - $ V(q,p) = CTEMP - 3968 CONTINUE - 3969 CONTINUE - END IF -* - CALL ZLACPY( 'A', N, NR, V, LDV, CWORK(2*N+1), N ) -* - IF ( L2PERT ) THEN - XSC = SQRT(SMALL) - DO 8970 p = 2, NR - DO 8971 q = 1, p - 1 - CTEMP=DCMPLX(XSC*MIN(ABS(V(p,p)),ABS(V(q,q))), - $ ZERO) -* V(p,q) = - TEMP1*( V(q,p) / ABS(V(q,p)) ) - V(p,q) = - CTEMP - 8971 CONTINUE - 8970 CONTINUE - ELSE - CALL ZLASET( 'L',NR-1,NR-1,CZERO,CZERO,V(2,1),LDV ) - END IF -* Now, compute R2 = L3 * Q3, the LQ factorization. - CALL ZGELQF( NR, NR, V, LDV, CWORK(2*N+N*NR+1), - $ CWORK(2*N+N*NR+NR+1), LWORK-2*N-N*NR-NR, IERR ) -* .. and estimate the condition number - CALL ZLACPY( 'L',NR,NR,V,LDV,CWORK(2*N+N*NR+NR+1),NR ) - DO 4950 p = 1, NR - TEMP1 = DZNRM2( p, CWORK(2*N+N*NR+NR+p), NR ) - CALL ZDSCAL( p, ONE/TEMP1, CWORK(2*N+N*NR+NR+p), NR ) - 4950 CONTINUE - CALL ZPOCON( 'L',NR,CWORK(2*N+N*NR+NR+1),NR,ONE,TEMP1, - $ CWORK(2*N+N*NR+NR+NR*NR+1),RWORK,IERR ) - CONDR2 = ONE / SQRT(TEMP1) -* -* - IF ( CONDR2 .GE. COND_OK ) THEN -* .. save the Householder vectors used for Q3 -* (this overwrittes the copy of R2, as it will not be -* needed in this branch, but it does not overwritte the -* Huseholder vectors of Q2.). - CALL ZLACPY( 'U', NR, NR, V, LDV, CWORK(2*N+1), N ) -* .. and the rest of the information on Q3 is in -* WORK(2*N+N*NR+1:2*N+N*NR+N) - END IF -* - END IF -* - IF ( L2PERT ) THEN - XSC = SQRT(SMALL) - DO 4968 q = 2, NR - CTEMP = XSC * V(q,q) - DO 4969 p = 1, q - 1 -* V(p,q) = - TEMP1*( V(p,q) / ABS(V(p,q)) ) - V(p,q) = - CTEMP - 4969 CONTINUE - 4968 CONTINUE - ELSE - CALL ZLASET( 'U', NR-1,NR-1, CZERO,CZERO, V(1,2), LDV ) - END IF -* -* Second preconditioning finished; continue with Jacobi SVD -* The input matrix is lower trinagular. -* -* Recover the right singular vectors as solution of a well -* conditioned triangular matrix equation. -* - IF ( CONDR1 .LT. COND_OK ) THEN -* - CALL ZGESVJ( 'L','U','N',NR,NR,V,LDV,SVA,NR,U, LDU, - $ CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,RWORK, - $ LRWORK, INFO ) - SCALEM = RWORK(1) - NUMRANK = NINT(RWORK(2)) - DO 3970 p = 1, NR - CALL ZCOPY( NR, V(1,p), 1, U(1,p), 1 ) - CALL ZDSCAL( NR, SVA(p), V(1,p), 1 ) - 3970 CONTINUE - -* .. pick the right matrix equation and solve it -* - IF ( NR .EQ. N ) THEN -* :)) .. best case, R1 is inverted. The solution of this matrix -* equation is Q2*V2 = the product of the Jacobi rotations -* used in ZGESVJ, premultiplied with the orthogonal matrix -* from the second QR factorization. - CALL ZTRSM('L','U','N','N', NR,NR,CONE, A,LDA, V,LDV) - ELSE -* .. R1 is well conditioned, but non-square. Adjoint of R2 -* is inverted to get the product of the Jacobi rotations -* used in ZGESVJ. The Q-factor from the second QR -* factorization is then built in explicitly. - CALL ZTRSM('L','U','C','N',NR,NR,CONE,CWORK(2*N+1), - $ N,V,LDV) - IF ( NR .LT. N ) THEN - CALL ZLASET('A',N-NR,NR,CZERO,CZERO,V(NR+1,1),LDV) - CALL ZLASET('A',NR,N-NR,CZERO,CZERO,V(1,NR+1),LDV) - CALL ZLASET('A',N-NR,N-NR,CZERO,CONE,V(NR+1,NR+1),LDV) - END IF - CALL ZUNMQR('L','N',N,N,NR,CWORK(2*N+1),N,CWORK(N+1), - $ V,LDV,CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR) - END IF -* - ELSE IF ( CONDR2 .LT. COND_OK ) THEN -* -* The matrix R2 is inverted. The solution of the matrix equation -* is Q3^* * V3 = the product of the Jacobi rotations (appplied to -* the lower triangular L3 from the LQ factorization of -* R2=L3*Q3), pre-multiplied with the transposed Q3. - CALL ZGESVJ( 'L', 'U', 'N', NR, NR, V, LDV, SVA, NR, U, - $ LDU, CWORK(2*N+N*NR+NR+1), LWORK-2*N-N*NR-NR, - $ RWORK, LRWORK, INFO ) - SCALEM = RWORK(1) - NUMRANK = NINT(RWORK(2)) - DO 3870 p = 1, NR - CALL ZCOPY( NR, V(1,p), 1, U(1,p), 1 ) - CALL ZDSCAL( NR, SVA(p), U(1,p), 1 ) - 3870 CONTINUE - CALL ZTRSM('L','U','N','N',NR,NR,CONE,CWORK(2*N+1),N, - $ U,LDU) -* .. apply the permutation from the second QR factorization - DO 873 q = 1, NR - DO 872 p = 1, NR - CWORK(2*N+N*NR+NR+IWORK(N+p)) = U(p,q) - 872 CONTINUE - DO 874 p = 1, NR - U(p,q) = CWORK(2*N+N*NR+NR+p) - 874 CONTINUE - 873 CONTINUE - IF ( NR .LT. N ) THEN - CALL ZLASET( 'A',N-NR,NR,CZERO,CZERO,V(NR+1,1),LDV ) - CALL ZLASET( 'A',NR,N-NR,CZERO,CZERO,V(1,NR+1),LDV ) - CALL ZLASET('A',N-NR,N-NR,CZERO,CONE,V(NR+1,NR+1),LDV) - END IF - CALL ZUNMQR( 'L','N',N,N,NR,CWORK(2*N+1),N,CWORK(N+1), - $ V,LDV,CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR ) - ELSE -* Last line of defense. -* #:( This is a rather pathological case: no scaled condition -* improvement after two pivoted QR factorizations. Other -* possibility is that the rank revealing QR factorization -* or the condition estimator has failed, or the COND_OK -* is set very close to ONE (which is unnecessary). Normally, -* this branch should never be executed, but in rare cases of -* failure of the RRQR or condition estimator, the last line of -* defense ensures that ZGEJSV completes the task. -* Compute the full SVD of L3 using ZGESVJ with explicit -* accumulation of Jacobi rotations. - CALL ZGESVJ( 'L', 'U', 'V', NR, NR, V, LDV, SVA, NR, U, - $ LDU, CWORK(2*N+N*NR+NR+1), LWORK-2*N-N*NR-NR, - $ RWORK, LRWORK, INFO ) - SCALEM = RWORK(1) - NUMRANK = NINT(RWORK(2)) - IF ( NR .LT. N ) THEN - CALL ZLASET( 'A',N-NR,NR,CZERO,CZERO,V(NR+1,1),LDV ) - CALL ZLASET( 'A',NR,N-NR,CZERO,CZERO,V(1,NR+1),LDV ) - CALL ZLASET('A',N-NR,N-NR,CZERO,CONE,V(NR+1,NR+1),LDV) - END IF - CALL ZUNMQR( 'L','N',N,N,NR,CWORK(2*N+1),N,CWORK(N+1), - $ V,LDV,CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR ) -* - CALL ZUNMLQ( 'L', 'C', NR, NR, NR, CWORK(2*N+1), N, - $ CWORK(2*N+N*NR+1), U, LDU, CWORK(2*N+N*NR+NR+1), - $ LWORK-2*N-N*NR-NR, IERR ) - DO 773 q = 1, NR - DO 772 p = 1, NR - CWORK(2*N+N*NR+NR+IWORK(N+p)) = U(p,q) - 772 CONTINUE - DO 774 p = 1, NR - U(p,q) = CWORK(2*N+N*NR+NR+p) - 774 CONTINUE - 773 CONTINUE -* - END IF -* -* Permute the rows of V using the (column) permutation from the -* first QRF. Also, scale the columns to make them unit in -* Euclidean norm. This applies to all cases. -* - TEMP1 = SQRT(DBLE(N)) * EPSLN - DO 1972 q = 1, N - DO 972 p = 1, N - CWORK(2*N+N*NR+NR+IWORK(p)) = V(p,q) - 972 CONTINUE - DO 973 p = 1, N - V(p,q) = CWORK(2*N+N*NR+NR+p) - 973 CONTINUE - XSC = ONE / DZNRM2( N, V(1,q), 1 ) - IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) ) - $ CALL ZDSCAL( N, XSC, V(1,q), 1 ) - 1972 CONTINUE -* At this moment, V contains the right singular vectors of A. -* Next, assemble the left singular vector matrix U (M x N). - IF ( NR .LT. M ) THEN - CALL ZLASET('A', M-NR, NR, CZERO, CZERO, U(NR+1,1), LDU) - IF ( NR .LT. N1 ) THEN - CALL ZLASET('A',NR,N1-NR,CZERO,CZERO,U(1,NR+1),LDU) - CALL ZLASET('A',M-NR,N1-NR,CZERO,CONE, - $ U(NR+1,NR+1),LDU) - END IF - END IF -* -* The Q matrix from the first QRF is built into the left singular -* matrix U. This applies to all cases. -* - CALL ZUNMQR( 'L', 'N', M, N1, N, A, LDA, CWORK, U, - $ LDU, CWORK(N+1), LWORK-N, IERR ) - -* The columns of U are normalized. The cost is O(M*N) flops. - TEMP1 = SQRT(DBLE(M)) * EPSLN - DO 1973 p = 1, NR - XSC = ONE / DZNRM2( M, U(1,p), 1 ) - IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) ) - $ CALL ZDSCAL( M, XSC, U(1,p), 1 ) - 1973 CONTINUE -* -* If the initial QRF is computed with row pivoting, the left -* singular vectors must be adjusted. -* - IF ( ROWPIV ) - $ CALL ZLASWP( N1, U, LDU, 1, M-1, IWORK(IWOFF+1), -1 ) -* - ELSE -* -* .. the initial matrix A has almost orthogonal columns and -* the second QRF is not needed -* - CALL ZLACPY( 'U', N, N, A, LDA, CWORK(N+1), N ) - IF ( L2PERT ) THEN - XSC = SQRT(SMALL) - DO 5970 p = 2, N - CTEMP = XSC * CWORK( N + (p-1)*N + p ) - DO 5971 q = 1, p - 1 -* CWORK(N+(q-1)*N+p)=-TEMP1 * ( CWORK(N+(p-1)*N+q) / -* $ ABS(CWORK(N+(p-1)*N+q)) ) - CWORK(N+(q-1)*N+p)=-CTEMP - 5971 CONTINUE - 5970 CONTINUE - ELSE - CALL ZLASET( 'L',N-1,N-1,CZERO,CZERO,CWORK(N+2),N ) - END IF -* - CALL ZGESVJ( 'U', 'U', 'N', N, N, CWORK(N+1), N, SVA, - $ N, U, LDU, CWORK(N+N*N+1), LWORK-N-N*N, RWORK, LRWORK, - $ INFO ) -* - SCALEM = RWORK(1) - NUMRANK = NINT(RWORK(2)) - DO 6970 p = 1, N - CALL ZCOPY( N, CWORK(N+(p-1)*N+1), 1, U(1,p), 1 ) - CALL ZDSCAL( N, SVA(p), CWORK(N+(p-1)*N+1), 1 ) - 6970 CONTINUE -* - CALL ZTRSM( 'L', 'U', 'N', 'N', N, N, - $ CONE, A, LDA, CWORK(N+1), N ) - DO 6972 p = 1, N - CALL ZCOPY( N, CWORK(N+p), N, V(IWORK(p),1), LDV ) - 6972 CONTINUE - TEMP1 = SQRT(DBLE(N))*EPSLN - DO 6971 p = 1, N - XSC = ONE / DZNRM2( N, V(1,p), 1 ) - IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) ) - $ CALL ZDSCAL( N, XSC, V(1,p), 1 ) - 6971 CONTINUE -* -* Assemble the left singular vector matrix U (M x N). -* - IF ( N .LT. M ) THEN - CALL ZLASET( 'A', M-N, N, CZERO, CZERO, U(N+1,1), LDU ) - IF ( N .LT. N1 ) THEN - CALL ZLASET('A',N, N1-N, CZERO, CZERO, U(1,N+1),LDU) - CALL ZLASET( 'A',M-N,N1-N, CZERO, CONE,U(N+1,N+1),LDU) - END IF - END IF - CALL ZUNMQR( 'L', 'N', M, N1, N, A, LDA, CWORK, U, - $ LDU, CWORK(N+1), LWORK-N, IERR ) - TEMP1 = SQRT(DBLE(M))*EPSLN - DO 6973 p = 1, N1 - XSC = ONE / DZNRM2( M, U(1,p), 1 ) - IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) ) - $ CALL ZDSCAL( M, XSC, U(1,p), 1 ) - 6973 CONTINUE -* - IF ( ROWPIV ) - $ CALL ZLASWP( N1, U, LDU, 1, M-1, IWORK(IWOFF+1), -1 ) -* - END IF -* -* end of the >> almost orthogonal case << in the full SVD -* - ELSE -* -* This branch deploys a preconditioned Jacobi SVD with explicitly -* accumulated rotations. It is included as optional, mainly for -* experimental purposes. It does perfom well, and can also be used. -* In this implementation, this branch will be automatically activated -* if the condition number sigma_max(A) / sigma_min(A) is predicted -* to be greater than the overflow threshold. This is because the -* a posteriori computation of the singular vectors assumes robust -* implementation of BLAS and some LAPACK procedures, capable of working -* in presence of extreme values, e.g. when the singular values spread from -* the underflow to the overflow threshold. -* - DO 7968 p = 1, NR - CALL ZCOPY( N-p+1, A(p,p), LDA, V(p,p), 1 ) - CALL ZLACGV( N-p+1, V(p,p), 1 ) - 7968 CONTINUE -* - IF ( L2PERT ) THEN - XSC = SQRT(SMALL/EPSLN) - DO 5969 q = 1, NR - CTEMP = DCMPLX(XSC*ABS( V(q,q) ),ZERO) - DO 5968 p = 1, N - IF ( ( p .GT. q ) .AND. ( ABS(V(p,q)) .LE. TEMP1 ) - $ .OR. ( p .LT. q ) ) -* $ V(p,q) = TEMP1 * ( V(p,q) / ABS(V(p,q)) ) - $ V(p,q) = CTEMP - IF ( p .LT. q ) V(p,q) = - V(p,q) - 5968 CONTINUE - 5969 CONTINUE - ELSE - CALL ZLASET( 'U', NR-1, NR-1, CZERO, CZERO, V(1,2), LDV ) - END IF - - CALL ZGEQRF( N, NR, V, LDV, CWORK(N+1), CWORK(2*N+1), - $ LWORK-2*N, IERR ) - CALL ZLACPY( 'L', N, NR, V, LDV, CWORK(2*N+1), N ) -* - DO 7969 p = 1, NR - CALL ZCOPY( NR-p+1, V(p,p), LDV, U(p,p), 1 ) - CALL ZLACGV( NR-p+1, U(p,p), 1 ) - 7969 CONTINUE - - IF ( L2PERT ) THEN - XSC = SQRT(SMALL/EPSLN) - DO 9970 q = 2, NR - DO 9971 p = 1, q - 1 - CTEMP = DCMPLX(XSC * MIN(ABS(U(p,p)),ABS(U(q,q))), - $ ZERO) -* U(p,q) = - TEMP1 * ( U(q,p) / ABS(U(q,p)) ) - U(p,q) = - CTEMP - 9971 CONTINUE - 9970 CONTINUE - ELSE - CALL ZLASET('U', NR-1, NR-1, CZERO, CZERO, U(1,2), LDU ) - END IF - - CALL ZGESVJ( 'L', 'U', 'V', NR, NR, U, LDU, SVA, - $ N, V, LDV, CWORK(2*N+N*NR+1), LWORK-2*N-N*NR, - $ RWORK, LRWORK, INFO ) - SCALEM = RWORK(1) - NUMRANK = NINT(RWORK(2)) - - IF ( NR .LT. N ) THEN - CALL ZLASET( 'A',N-NR,NR,CZERO,CZERO,V(NR+1,1),LDV ) - CALL ZLASET( 'A',NR,N-NR,CZERO,CZERO,V(1,NR+1),LDV ) - CALL ZLASET( 'A',N-NR,N-NR,CZERO,CONE,V(NR+1,NR+1),LDV ) - END IF - - CALL ZUNMQR( 'L','N',N,N,NR,CWORK(2*N+1),N,CWORK(N+1), - $ V,LDV,CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR ) -* -* Permute the rows of V using the (column) permutation from the -* first QRF. Also, scale the columns to make them unit in -* Euclidean norm. This applies to all cases. -* - TEMP1 = SQRT(DBLE(N)) * EPSLN - DO 7972 q = 1, N - DO 8972 p = 1, N - CWORK(2*N+N*NR+NR+IWORK(p)) = V(p,q) - 8972 CONTINUE - DO 8973 p = 1, N - V(p,q) = CWORK(2*N+N*NR+NR+p) - 8973 CONTINUE - XSC = ONE / DZNRM2( N, V(1,q), 1 ) - IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) ) - $ CALL ZDSCAL( N, XSC, V(1,q), 1 ) - 7972 CONTINUE -* -* At this moment, V contains the right singular vectors of A. -* Next, assemble the left singular vector matrix U (M x N). -* - IF ( NR .LT. M ) THEN - CALL ZLASET( 'A', M-NR, NR, CZERO, CZERO, U(NR+1,1), LDU ) - IF ( NR .LT. N1 ) THEN - CALL ZLASET('A',NR, N1-NR, CZERO, CZERO, U(1,NR+1),LDU) - CALL ZLASET('A',M-NR,N1-NR, CZERO, CONE,U(NR+1,NR+1),LDU) - END IF - END IF -* - CALL ZUNMQR( 'L', 'N', M, N1, N, A, LDA, CWORK, U, - $ LDU, CWORK(N+1), LWORK-N, IERR ) -* - IF ( ROWPIV ) - $ CALL ZLASWP( N1, U, LDU, 1, M-1, IWORK(IWOFF+1), -1 ) -* -* - END IF - IF ( TRANSP ) THEN -* .. swap U and V because the procedure worked on A^* - DO 6974 p = 1, N - CALL ZSWAP( N, U(1,p), 1, V(1,p), 1 ) - 6974 CONTINUE - END IF -* - END IF -* end of the full SVD -* -* Undo scaling, if necessary (and possible) -* - IF ( USCAL2 .LE. (BIG/SVA(1))*USCAL1 ) THEN - CALL DLASCL( 'G', 0, 0, USCAL1, USCAL2, NR, 1, SVA, N, IERR ) - USCAL1 = ONE - USCAL2 = ONE - END IF -* - IF ( NR .LT. N ) THEN - DO 3004 p = NR+1, N - SVA(p) = ZERO - 3004 CONTINUE - END IF -* - RWORK(1) = USCAL2 * SCALEM - RWORK(2) = USCAL1 - IF ( ERREST ) RWORK(3) = SCONDA - IF ( LSVEC .AND. RSVEC ) THEN - RWORK(4) = CONDR1 - RWORK(5) = CONDR2 - END IF - IF ( L2TRAN ) THEN - RWORK(6) = ENTRA - RWORK(7) = ENTRAT - END IF -* - IWORK(1) = NR - IWORK(2) = NUMRANK - IWORK(3) = WARNING - IF ( TRANSP ) THEN - IWORK(4) = 1 - ELSE - IWORK(4) = -1 - END IF - -* - RETURN -* .. -* .. END OF ZGEJSV -* .. - END -* +*> \brief \b ZGEJSV +* +* =========== DOCUMENTATION =========== +* +* Online html documentation available at +* http://www.netlib.org/lapack/explore-html/ +* +*> \htmlonly +*> Download ZGEJSV + dependencies +*> +*> [TGZ] +*> +*> [ZIP] +*> +*> [TXT] +*> \endhtmlonly +* +* Definition: +* =========== +* +* SUBROUTINE ZGEJSV( JOBA, JOBU, JOBV, JOBR, JOBT, JOBP, +* M, N, A, LDA, SVA, U, LDU, V, LDV, +* CWORK, LWORK, RWORK, LRWORK, IWORK, INFO ) +* +* .. Scalar Arguments .. +* IMPLICIT NONE +* INTEGER INFO, LDA, LDU, LDV, LWORK, M, N +* .. +* .. Array Arguments .. +* COMPLEX*16 A( LDA, * ), U( LDU, * ), V( LDV, * ), CWORK( LWORK ) +* DOUBLE PRECISION SVA( N ), RWORK( LRWORK ) +* INTEGER IWORK( * ) +* CHARACTER*1 JOBA, JOBP, JOBR, JOBT, JOBU, JOBV +* .. +* +* +*> \par Purpose: +* ============= +*> +*> \verbatim +*> +*> ZGEJSV computes the singular value decomposition (SVD) of a complex M-by-N +*> matrix [A], where M >= N. The SVD of [A] is written as +*> +*> [A] = [U] * [SIGMA] * [V]^*, +*> +*> where [SIGMA] is an N-by-N (M-by-N) matrix which is zero except for its N +*> diagonal elements, [U] is an M-by-N (or M-by-M) unitary matrix, and +*> [V] is an N-by-N unitary matrix. The diagonal elements of [SIGMA] are +*> the singular values of [A]. The columns of [U] and [V] are the left and +*> the right singular vectors of [A], respectively. The matrices [U] and [V] +*> are computed and stored in the arrays U and V, respectively. The diagonal +*> of [SIGMA] is computed and stored in the array SVA. +*> \endverbatim +*> +*> Arguments: +*> ========== +*> +*> \param[in] JOBA +*> \verbatim +*> JOBA is CHARACTER*1 +*> Specifies the level of accuracy: +*> = 'C': This option works well (high relative accuracy) if A = B * D, +*> with well-conditioned B and arbitrary diagonal matrix D. +*> The accuracy cannot be spoiled by COLUMN scaling. The +*> accuracy of the computed output depends on the condition of +*> B, and the procedure aims at the best theoretical accuracy. +*> The relative error max_{i=1:N}|d sigma_i| / sigma_i is +*> bounded by f(M,N)*epsilon* cond(B), independent of D. +*> The input matrix is preprocessed with the QRF with column +*> pivoting. This initial preprocessing and preconditioning by +*> a rank revealing QR factorization is common for all values of +*> JOBA. Additional actions are specified as follows: +*> = 'E': Computation as with 'C' with an additional estimate of the +*> condition number of B. It provides a realistic error bound. +*> = 'F': If A = D1 * C * D2 with ill-conditioned diagonal scalings +*> D1, D2, and well-conditioned matrix C, this option gives +*> higher accuracy than the 'C' option. If the structure of the +*> input matrix is not known, and relative accuracy is +*> desirable, then this option is advisable. The input matrix A +*> is preprocessed with QR factorization with FULL (row and +*> column) pivoting. +*> = 'G' Computation as with 'F' with an additional estimate of the +*> condition number of B, where A=B*D. If A has heavily weighted +*> rows, then using this condition number gives too pessimistic +*> error bound. +*> = 'A': Small singular values are not well determined by the data +*> and are considered as noisy; the matrix is treated as +*> numerically rank defficient. The error in the computed +*> singular values is bounded by f(m,n)*epsilon*||A||. +*> The computed SVD A = U * S * V^* restores A up to +*> f(m,n)*epsilon*||A||. +*> This gives the procedure the licence to discard (set to zero) +*> all singular values below N*epsilon*||A||. +*> = 'R': Similar as in 'A'. Rank revealing property of the initial +*> QR factorization is used do reveal (using triangular factor) +*> a gap sigma_{r+1} < epsilon * sigma_r in which case the +*> numerical RANK is declared to be r. The SVD is computed with +*> absolute error bounds, but more accurately than with 'A'. +*> \endverbatim +*> +*> \param[in] JOBU +*> \verbatim +*> JOBU is CHARACTER*1 +*> Specifies whether to compute the columns of U: +*> = 'U': N columns of U are returned in the array U. +*> = 'F': full set of M left sing. vectors is returned in the array U. +*> = 'W': U may be used as workspace of length M*N. See the description +*> of U. +*> = 'N': U is not computed. +*> \endverbatim +*> +*> \param[in] JOBV +*> \verbatim +*> JOBV is CHARACTER*1 +*> Specifies whether to compute the matrix V: +*> = 'V': N columns of V are returned in the array V; Jacobi rotations +*> are not explicitly accumulated. +*> = 'J': N columns of V are returned in the array V, but they are +*> computed as the product of Jacobi rotations, if JOBT .EQ. 'N'. +*> = 'W': V may be used as workspace of length N*N. See the description +*> of V. +*> = 'N': V is not computed. +*> \endverbatim +*> +*> \param[in] JOBR +*> \verbatim +*> JOBR is CHARACTER*1 +*> Specifies the RANGE for the singular values. Issues the licence to +*> set to zero small positive singular values if they are outside +*> specified range. If A .NE. 0 is scaled so that the largest singular +*> value of c*A is around SQRT(BIG), BIG=DLAMCH('O'), then JOBR issues +*> the licence to kill columns of A whose norm in c*A is less than +*> SQRT(SFMIN) (for JOBR.EQ.'R'), or less than SMALL=SFMIN/EPSLN, +*> where SFMIN=DLAMCH('S'), EPSLN=DLAMCH('E'). +*> = 'N': Do not kill small columns of c*A. This option assumes that +*> BLAS and QR factorizations and triangular solvers are +*> implemented to work in that range. If the condition of A +*> is greater than BIG, use ZGESVJ. +*> = 'R': RESTRICTED range for sigma(c*A) is [SQRT(SFMIN), SQRT(BIG)] +*> (roughly, as described above). This option is recommended. +*> =========================== +*> For computing the singular values in the FULL range [SFMIN,BIG] +*> use ZGESVJ. +*> \endverbatim +*> +*> \param[in] JOBT +*> \verbatim +*> JOBT is CHARACTER*1 +*> If the matrix is square then the procedure may determine to use +*> transposed A if A^* seems to be better with respect to convergence. +*> If the matrix is not square, JOBT is ignored. +*> The decision is based on two values of entropy over the adjoint +*> orbit of A^* * A. See the descriptions of WORK(6) and WORK(7). +*> = 'T': transpose if entropy test indicates possibly faster +*> convergence of Jacobi process if A^* is taken as input. If A is +*> replaced with A^*, then the row pivoting is included automatically. +*> = 'N': do not speculate. +*> The option 'T' can be used to compute only the singular values, or +*> the full SVD (U, SIGMA and V). For only one set of singular vectors +*> (U or V), the caller should provide both U and V, as one of the +*> matrices is used as workspace if the matrix A is transposed. +*> The implementer can easily remove this constraint and make the +*> code more complicated. See the descriptions of U and V. +*> In general, this option is considered experimental, and 'N'; should +*> be preferred. This is subject to changes in the future. +*> \endverbatim +*> +*> \param[in] JOBP +*> \verbatim +*> JOBP is CHARACTER*1 +*> Issues the licence to introduce structured perturbations to drown +*> denormalized numbers. This licence should be active if the +*> denormals are poorly implemented, causing slow computation, +*> especially in cases of fast convergence (!). For details see [1,2]. +*> For the sake of simplicity, this perturbations are included only +*> when the full SVD or only the singular values are requested. The +*> implementer/user can easily add the perturbation for the cases of +*> computing one set of singular vectors. +*> = 'P': introduce perturbation +*> = 'N': do not perturb +*> \endverbatim +*> +*> \param[in] M +*> \verbatim +*> M is INTEGER +*> The number of rows of the input matrix A. M >= 0. +*> \endverbatim +*> +*> \param[in] N +*> \verbatim +*> N is INTEGER +*> The number of columns of the input matrix A. M >= N >= 0. +*> \endverbatim +*> +*> \param[in,out] A +*> \verbatim +*> A is COMPLEX*16 array, dimension (LDA,N) +*> On entry, the M-by-N matrix A. +*> \endverbatim +*> +*> \param[in] LDA +*> \verbatim +*> LDA is INTEGER +*> The leading dimension of the array A. LDA >= max(1,M). +*> \endverbatim +*> +*> \param[out] SVA +*> \verbatim +*> SVA is DOUBLE PRECISION array, dimension (N) +*> On exit, +*> - For WORK(1)/WORK(2) = ONE: The singular values of A. During the +*> computation SVA contains Euclidean column norms of the +*> iterated matrices in the array A. +*> - For WORK(1) .NE. WORK(2): The singular values of A are +*> (WORK(1)/WORK(2)) * SVA(1:N). This factored form is used if +*> sigma_max(A) overflows or if small singular values have been +*> saved from underflow by scaling the input matrix A. +*> - If JOBR='R' then some of the singular values may be returned +*> as exact zeros obtained by "set to zero" because they are +*> below the numerical rank threshold or are denormalized numbers. +*> \endverbatim +*> +*> \param[out] U +*> \verbatim +*> U is COMPLEX*16 array, dimension ( LDU, N ) +*> If JOBU = 'U', then U contains on exit the M-by-N matrix of +*> the left singular vectors. +*> If JOBU = 'F', then U contains on exit the M-by-M matrix of +*> the left singular vectors, including an ONB +*> of the orthogonal complement of the Range(A). +*> If JOBU = 'W' .AND. (JOBV.EQ.'V' .AND. JOBT.EQ.'T' .AND. M.EQ.N), +*> then U is used as workspace if the procedure +*> replaces A with A^*. In that case, [V] is computed +*> in U as left singular vectors of A^* and then +*> copied back to the V array. This 'W' option is just +*> a reminder to the caller that in this case U is +*> reserved as workspace of length N*N. +*> If JOBU = 'N' U is not referenced, unless JOBT='T'. +*> \endverbatim +*> +*> \param[in] LDU +*> \verbatim +*> LDU is INTEGER +*> The leading dimension of the array U, LDU >= 1. +*> IF JOBU = 'U' or 'F' or 'W', then LDU >= M. +*> \endverbatim +*> +*> \param[out] V +*> \verbatim +*> V is COMPLEX*16 array, dimension ( LDV, N ) +*> If JOBV = 'V', 'J' then V contains on exit the N-by-N matrix of +*> the right singular vectors; +*> If JOBV = 'W', AND (JOBU.EQ.'U' AND JOBT.EQ.'T' AND M.EQ.N), +*> then V is used as workspace if the pprocedure +*> replaces A with A^*. In that case, [U] is computed +*> in V as right singular vectors of A^* and then +*> copied back to the U array. This 'W' option is just +*> a reminder to the caller that in this case V is +*> reserved as workspace of length N*N. +*> If JOBV = 'N' V is not referenced, unless JOBT='T'. +*> \endverbatim +*> +*> \param[in] LDV +*> \verbatim +*> LDV is INTEGER +*> The leading dimension of the array V, LDV >= 1. +*> If JOBV = 'V' or 'J' or 'W', then LDV >= N. +*> \endverbatim +*> +*> \param[out] CWORK +*> \verbatim +*> CWORK is COMPLEX*16 array, dimension (MAX(2,LWORK)) +*> If the call to ZGEJSV is a workspace query (indicated by LWORK=-1 or +*> LRWORK=-1), then on exit CWORK(1) contains the required length of +*> CWORK for the job parameters used in the call. +*> \endverbatim +*> +*> \param[in] LWORK +*> \verbatim +*> LWORK is INTEGER +*> Length of CWORK to confirm proper allocation of workspace. +*> LWORK depends on the job: +*> +*> 1. If only SIGMA is needed ( JOBU.EQ.'N', JOBV.EQ.'N' ) and +*> 1.1 .. no scaled condition estimate required (JOBA.NE.'E'.AND.JOBA.NE.'G'): +*> LWORK >= 2*N+1. This is the minimal requirement. +*> ->> For optimal performance (blocked code) the optimal value +*> is LWORK >= N + (N+1)*NB. Here NB is the optimal +*> block size for ZGEQP3 and ZGEQRF. +*> In general, optimal LWORK is computed as +*> LWORK >= max(N+LWORK(ZGEQP3),N+LWORK(ZGEQRF), LWORK(ZGESVJ)). +*> 1.2. .. an estimate of the scaled condition number of A is +*> required (JOBA='E', or 'G'). In this case, LWORK the minimal +*> requirement is LWORK >= N*N + 2*N. +*> ->> For optimal performance (blocked code) the optimal value +*> is LWORK >= max(N+(N+1)*NB, N*N+2*N)=N**2+2*N. +*> In general, the optimal length LWORK is computed as +*> LWORK >= max(N+LWORK(ZGEQP3),N+LWORK(ZGEQRF), LWORK(ZGESVJ), +*> N*N+LWORK(ZPOCON)). +*> 2. If SIGMA and the right singular vectors are needed (JOBV.EQ.'V'), +*> (JOBU.EQ.'N') +*> 2.1 .. no scaled condition estimate requested (JOBE.EQ.'N'): +*> -> the minimal requirement is LWORK >= 3*N. +*> -> For optimal performance, +*> LWORK >= max(N+(N+1)*NB, 2*N+N*NB)=2*N+N*NB, +*> where NB is the optimal block size for ZGEQP3, ZGEQRF, ZGELQ, +*> ZUNMLQ. In general, the optimal length LWORK is computed as +*> LWORK >= max(N+LWORK(ZGEQP3), N+LWORK(ZGESVJ), +*> N+LWORK(ZGELQF), 2*N+LWORK(ZGEQRF), N+LWORK(ZUNMLQ)). +*> 2.2 .. an estimate of the scaled condition number of A is +*> required (JOBA='E', or 'G'). +*> -> the minimal requirement is LWORK >= 3*N. +*> -> For optimal performance, +*> LWORK >= max(N+(N+1)*NB, 2*N,2*N+N*NB)=2*N+N*NB, +*> where NB is the optimal block size for ZGEQP3, ZGEQRF, ZGELQ, +*> ZUNMLQ. In general, the optimal length LWORK is computed as +*> LWORK >= max(N+LWORK(ZGEQP3), LWORK(ZPOCON), N+LWORK(ZGESVJ), +*> N+LWORK(ZGELQF), 2*N+LWORK(ZGEQRF), N+LWORK(ZUNMLQ)). +*> 3. If SIGMA and the left singular vectors are needed +*> 3.1 .. no scaled condition estimate requested (JOBE.EQ.'N'): +*> -> the minimal requirement is LWORK >= 3*N. +*> -> For optimal performance: +*> if JOBU.EQ.'U' :: LWORK >= max(3*N, N+(N+1)*NB, 2*N+N*NB)=2*N+N*NB, +*> where NB is the optimal block size for ZGEQP3, ZGEQRF, ZUNMQR. +*> In general, the optimal length LWORK is computed as +*> LWORK >= max(N+LWORK(ZGEQP3), 2*N+LWORK(ZGEQRF), N+LWORK(ZUNMQR)). +*> 3.2 .. an estimate of the scaled condition number of A is +*> required (JOBA='E', or 'G'). +*> -> the minimal requirement is LWORK >= 3*N. +*> -> For optimal performance: +*> if JOBU.EQ.'U' :: LWORK >= max(3*N, N+(N+1)*NB, 2*N+N*NB)=2*N+N*NB, +*> where NB is the optimal block size for ZGEQP3, ZGEQRF, ZUNMQR. +*> In general, the optimal length LWORK is computed as +*> LWORK >= max(N+LWORK(ZGEQP3),N+LWORK(ZPOCON), +*> 2*N+LWORK(ZGEQRF), N+LWORK(ZUNMQR)). +*> 4. If the full SVD is needed: (JOBU.EQ.'U' or JOBU.EQ.'F') and +*> 4.1. if JOBV.EQ.'V' +*> the minimal requirement is LWORK >= 5*N+2*N*N. +*> 4.2. if JOBV.EQ.'J' the minimal requirement is +*> LWORK >= 4*N+N*N. +*> In both cases, the allocated CWORK can accommodate blocked runs +*> of ZGEQP3, ZGEQRF, ZGELQF, SUNMQR, ZUNMLQ. +*> +*> If the call to ZGEJSV is a workspace query (indicated by LWORK=-1 or +*> LRWORK=-1), then on exit CWORK(1) contains the optimal and CWORK(2) contains the +*> minimal length of CWORK for the job parameters used in the call. +*> \endverbatim +*> +*> \param[out] RWORK +*> \verbatim +*> RWORK is DOUBLE PRECISION array, dimension (MAX(7,LWORK)) +*> On exit, +*> RWORK(1) = Determines the scaling factor SCALE = RWORK(2) / RWORK(1) +*> such that SCALE*SVA(1:N) are the computed singular values +*> of A. (See the description of SVA().) +*> RWORK(2) = See the description of RWORK(1). +*> RWORK(3) = SCONDA is an estimate for the condition number of +*> column equilibrated A. (If JOBA .EQ. 'E' or 'G') +*> SCONDA is an estimate of SQRT(||(R^* * R)^(-1)||_1). +*> It is computed using SPOCON. It holds +*> N^(-1/4) * SCONDA <= ||R^(-1)||_2 <= N^(1/4) * SCONDA +*> where R is the triangular factor from the QRF of A. +*> However, if R is truncated and the numerical rank is +*> determined to be strictly smaller than N, SCONDA is +*> returned as -1, thus indicating that the smallest +*> singular values might be lost. +*> +*> If full SVD is needed, the following two condition numbers are +*> useful for the analysis of the algorithm. They are provied for +*> a developer/implementer who is familiar with the details of +*> the method. +*> +*> RWORK(4) = an estimate of the scaled condition number of the +*> triangular factor in the first QR factorization. +*> RWORK(5) = an estimate of the scaled condition number of the +*> triangular factor in the second QR factorization. +*> The following two parameters are computed if JOBT .EQ. 'T'. +*> They are provided for a developer/implementer who is familiar +*> with the details of the method. +*> RWORK(6) = the entropy of A^* * A :: this is the Shannon entropy +*> of diag(A^* * A) / Trace(A^* * A) taken as point in the +*> probability simplex. +*> RWORK(7) = the entropy of A * A^*. (See the description of RWORK(6).) +*> If the call to ZGEJSV is a workspace query (indicated by LWORK=-1 or +*> LRWORK=-1), then on exit RWORK(1) contains the required length of +*> RWORK for the job parameters used in the call. +*> \endverbatim +*> +*> \param[in] LRWORK +*> \verbatim +*> LRWORK is INTEGER +*> Length of RWORK to confirm proper allocation of workspace. +*> LRWORK depends on the job: +*> +*> 1. If only the singular values are requested i.e. if +*> LSAME(JOBU,'N') .AND. LSAME(JOBV,'N') +*> then: +*> 1.1. If LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G'), +*> then: LRWORK = max( 7, 2 * M ). +*> 1.2. Otherwise, LRWORK = max( 7, N ). +*> 2. If singular values with the right singular vectors are requested +*> i.e. if +*> (LSAME(JOBV,'V').OR.LSAME(JOBV,'J')) .AND. +*> .NOT.(LSAME(JOBU,'U').OR.LSAME(JOBU,'F')) +*> then: +*> 2.1. If LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G'), +*> then LRWORK = max( 7, 2 * M ). +*> 2.2. Otherwise, LRWORK = max( 7, N ). +*> 3. If singular values with the left singular vectors are requested, i.e. if +*> (LSAME(JOBU,'U').OR.LSAME(JOBU,'F')) .AND. +*> .NOT.(LSAME(JOBV,'V').OR.LSAME(JOBV,'J')) +*> then: +*> 3.1. If LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G'), +*> then LRWORK = max( 7, 2 * M ). +*> 3.2. Otherwise, LRWORK = max( 7, N ). +*> 4. If singular values with both the left and the right singular vectors +*> are requested, i.e. if +*> (LSAME(JOBU,'U').OR.LSAME(JOBU,'F')) .AND. +*> (LSAME(JOBV,'V').OR.LSAME(JOBV,'J')) +*> then: +*> 4.1. If LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G'), +*> then LRWORK = max( 7, 2 * M ). +*> 4.2. Otherwise, LRWORK = max( 7, N ). +*> +*> If, on entry, LRWORK = -1 or LWORK=-1, a workspace query is assumed and +*> the length of RWORK is returned in RWORK(1). +*> \endverbatim +*> +*> \param[out] IWORK +*> \verbatim +*> IWORK is INTEGER array, of dimension at least 4, that further depends +*> on the job: +*> +*> 1. If only the singular values are requested then: +*> If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') ) +*> then the length of IWORK is N+M; otherwise the length of IWORK is N. +*> 2. If the singular values and the right singular vectors are requested then: +*> If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') ) +*> then the length of IWORK is N+M; otherwise the length of IWORK is N. +*> 3. If the singular values and the left singular vectors are requested then: +*> If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') ) +*> then the length of IWORK is N+M; otherwise the length of IWORK is N. +*> 4. If the singular values with both the left and the right singular vectors +*> are requested, then: +*> 4.1. If LSAME(JOBV,'J') the length of IWORK is determined as follows: +*> If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') ) +*> then the length of IWORK is N+M; otherwise the length of IWORK is N. +*> 4.2. If LSAME(JOBV,'V') the length of IWORK is determined as follows: +*> If ( LSAME(JOBT,'T') .OR. LSAME(JOBA,'F') .OR. LSAME(JOBA,'G') ) +*> then the length of IWORK is 2*N+M; otherwise the length of IWORK is 2*N. +*> +*> On exit, +*> IWORK(1) = the numerical rank determined after the initial +*> QR factorization with pivoting. See the descriptions +*> of JOBA and JOBR. +*> IWORK(2) = the number of the computed nonzero singular values +*> IWORK(3) = if nonzero, a warning message: +*> If IWORK(3).EQ.1 then some of the column norms of A +*> were denormalized floats. The requested high accuracy +*> is not warranted by the data. +*> IWORK(4) = 1 or -1. If IWORK(4) .EQ. 1, then the procedure used A^* to +*> do the job as specified by the JOB parameters. +*> If the call to ZGEJSV is a workspace query (indicated by LWORK .EQ. -1 or +*> LRWORK .EQ. -1), then on exit IWORK(1) contains the required length of +*> IWORK for the job parameters used in the call. +*> \endverbatim +*> +*> \param[out] INFO +*> \verbatim +*> INFO is INTEGER +*> < 0 : if INFO = -i, then the i-th argument had an illegal value. +*> = 0 : successful exit; +*> > 0 : ZGEJSV did not converge in the maximal allowed number +*> of sweeps. The computed values may be inaccurate. +*> \endverbatim +* +* Authors: +* ======== +* +*> \author Univ. of Tennessee +*> \author Univ. of California Berkeley +*> \author Univ. of Colorado Denver +*> \author NAG Ltd. +* +*> \date June 2016 +* +*> \ingroup complex16GEsing +* +*> \par Further Details: +* ===================== +*> +*> \verbatim +*> +*> ZGEJSV implements a preconditioned Jacobi SVD algorithm. It uses ZGEQP3, +*> ZGEQRF, and ZGELQF as preprocessors and preconditioners. Optionally, an +*> additional row pivoting can be used as a preprocessor, which in some +*> cases results in much higher accuracy. An example is matrix A with the +*> structure A = D1 * C * D2, where D1, D2 are arbitrarily ill-conditioned +*> diagonal matrices and C is well-conditioned matrix. In that case, complete +*> pivoting in the first QR factorizations provides accuracy dependent on the +*> condition number of C, and independent of D1, D2. Such higher accuracy is +*> not completely understood theoretically, but it works well in practice. +*> Further, if A can be written as A = B*D, with well-conditioned B and some +*> diagonal D, then the high accuracy is guaranteed, both theoretically and +*> in software, independent of D. For more details see [1], [2]. +*> The computational range for the singular values can be the full range +*> ( UNDERFLOW,OVERFLOW ), provided that the machine arithmetic and the BLAS +*> & LAPACK routines called by ZGEJSV are implemented to work in that range. +*> If that is not the case, then the restriction for safe computation with +*> the singular values in the range of normalized IEEE numbers is that the +*> spectral condition number kappa(A)=sigma_max(A)/sigma_min(A) does not +*> overflow. This code (ZGEJSV) is best used in this restricted range, +*> meaning that singular values of magnitude below ||A||_2 / DLAMCH('O') are +*> returned as zeros. See JOBR for details on this. +*> Further, this implementation is somewhat slower than the one described +*> in [1,2] due to replacement of some non-LAPACK components, and because +*> the choice of some tuning parameters in the iterative part (ZGESVJ) is +*> left to the implementer on a particular machine. +*> The rank revealing QR factorization (in this code: ZGEQP3) should be +*> implemented as in [3]. We have a new version of ZGEQP3 under development +*> that is more robust than the current one in LAPACK, with a cleaner cut in +*> rank deficient cases. It will be available in the SIGMA library [4]. +*> If M is much larger than N, it is obvious that the initial QRF with +*> column pivoting can be preprocessed by the QRF without pivoting. That +*> well known trick is not used in ZGEJSV because in some cases heavy row +*> weighting can be treated with complete pivoting. The overhead in cases +*> M much larger than N is then only due to pivoting, but the benefits in +*> terms of accuracy have prevailed. The implementer/user can incorporate +*> this extra QRF step easily. The implementer can also improve data movement +*> (matrix transpose, matrix copy, matrix transposed copy) - this +*> implementation of ZGEJSV uses only the simplest, naive data movement. +*> \endverbatim +* +*> \par Contributor: +* ================== +*> +*> Zlatko Drmac, Department of Mathematics, Faculty of Science, +*> University of Zagreb (Zagreb, Croatia); drmac@math.hr +* +*> \par References: +* ================ +*> +*> \verbatim +*> +*> [1] Z. Drmac and K. Veselic: New fast and accurate Jacobi SVD algorithm I. +*> SIAM J. Matrix Anal. Appl. Vol. 35, No. 2 (2008), pp. 1322-1342. +*> LAPACK Working note 169. +*> [2] Z. Drmac and K. Veselic: New fast and accurate Jacobi SVD algorithm II. +*> SIAM J. Matrix Anal. Appl. Vol. 35, No. 2 (2008), pp. 1343-1362. +*> LAPACK Working note 170. +*> [3] Z. Drmac and Z. Bujanovic: On the failure of rank-revealing QR +*> factorization software - a case study. +*> ACM Trans. Math. Softw. Vol. 35, No 2 (2008), pp. 1-28. +*> LAPACK Working note 176. +*> [4] Z. Drmac: SIGMA - mathematical software library for accurate SVD, PSV, +*> QSVD, (H,K)-SVD computations. +*> Department of Mathematics, University of Zagreb, 2008, 2016. +*> \endverbatim +* +*> \par Bugs, examples and comments: +* ================================= +*> +*> Please report all bugs and send interesting examples and/or comments to +*> drmac@math.hr. Thank you. +*> +* ===================================================================== + SUBROUTINE ZGEJSV( JOBA, JOBU, JOBV, JOBR, JOBT, JOBP, + $ M, N, A, LDA, SVA, U, LDU, V, LDV, + $ CWORK, LWORK, RWORK, LRWORK, IWORK, INFO ) +* +* -- LAPACK computational routine (version 3.7.1) -- +* -- LAPACK is a software package provided by Univ. of Tennessee, -- +* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- +* June 2017 +* +* .. Scalar Arguments .. + IMPLICIT NONE + INTEGER INFO, LDA, LDU, LDV, LWORK, LRWORK, M, N +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), U( LDU, * ), V( LDV, * ), + $ CWORK( LWORK ) + DOUBLE PRECISION SVA( N ), RWORK( LRWORK ) + INTEGER IWORK( * ) + CHARACTER*1 JOBA, JOBP, JOBR, JOBT, JOBU, JOBV +* .. +* +* =========================================================================== +* +* .. Local Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0 ) + COMPLEX*16 CZERO, CONE + PARAMETER ( CZERO = ( 0.0D0, 0.0D0 ), CONE = ( 1.0D0, 0.0D0 ) ) +* .. +* .. Local Scalars .. + COMPLEX*16 CTEMP + DOUBLE PRECISION AAPP, AAQQ, AATMAX, AATMIN, BIG, BIG1, + $ COND_OK, CONDR1, CONDR2, ENTRA, ENTRAT, EPSLN, + $ MAXPRJ, SCALEM, SCONDA, SFMIN, SMALL, TEMP1, + $ USCAL1, USCAL2, XSC + INTEGER IERR, N1, NR, NUMRANK, p, q, WARNING + LOGICAL ALMORT, DEFR, ERREST, GOSCAL, JRACC, KILL, LQUERY, + $ LSVEC, L2ABER, L2KILL, L2PERT, L2RANK, L2TRAN, NOSCAL, + $ ROWPIV, RSVEC, TRANSP +* + INTEGER OPTWRK, MINWRK, MINRWRK, MINIWRK + INTEGER LWCON, LWLQF, LWQP3, LWQRF, LWUNMLQ, LWUNMQR, LWUNMQRM, + $ LWSVDJ, LWSVDJV, LRWQP3, LRWCON, LRWSVDJ, IWOFF + INTEGER LWRK_ZGELQF, LWRK_ZGEQP3, LWRK_ZGEQP3N, LWRK_ZGEQRF, + $ LWRK_ZGESVJ, LWRK_ZGESVJV, LWRK_ZGESVJU, LWRK_ZUNMLQ, + $ LWRK_ZUNMQR, LWRK_ZUNMQRM +* .. +* .. Local Arrays + COMPLEX*16 CDUMMY(1) + DOUBLE PRECISION RDUMMY(1) +* +* .. Intrinsic Functions .. + INTRINSIC ABS, DCMPLX, CONJG, DLOG, MAX, MIN, DBLE, NINT, SQRT +* .. +* .. External Functions .. + DOUBLE PRECISION DLAMCH, DZNRM2 + INTEGER IDAMAX, IZAMAX + LOGICAL LSAME + EXTERNAL IDAMAX, IZAMAX, LSAME, DLAMCH, DZNRM2 +* .. +* .. External Subroutines .. + EXTERNAL DLASSQ, ZCOPY, ZGELQF, ZGEQP3, ZGEQRF, ZLACPY, ZLAPMR, + $ ZLASCL, DLASCL, ZLASET, ZLASSQ, ZLASWP, ZUNGQR, ZUNMLQ, + $ ZUNMQR, ZPOCON, DSCAL, ZDSCAL, ZSWAP, ZTRSM, ZLACGV, + $ XERBLA +* + EXTERNAL ZGESVJ +* .. +* +* Test the input arguments +* + LSVEC = LSAME( JOBU, 'U' ) .OR. LSAME( JOBU, 'F' ) + JRACC = LSAME( JOBV, 'J' ) + RSVEC = LSAME( JOBV, 'V' ) .OR. JRACC + ROWPIV = LSAME( JOBA, 'F' ) .OR. LSAME( JOBA, 'G' ) + L2RANK = LSAME( JOBA, 'R' ) + L2ABER = LSAME( JOBA, 'A' ) + ERREST = LSAME( JOBA, 'E' ) .OR. LSAME( JOBA, 'G' ) + L2TRAN = LSAME( JOBT, 'T' ) .AND. ( M .EQ. N ) + L2KILL = LSAME( JOBR, 'R' ) + DEFR = LSAME( JOBR, 'N' ) + L2PERT = LSAME( JOBP, 'P' ) +* + LQUERY = ( LWORK .EQ. -1 ) .OR. ( LRWORK .EQ. -1 ) +* + IF ( .NOT.(ROWPIV .OR. L2RANK .OR. L2ABER .OR. + $ ERREST .OR. LSAME( JOBA, 'C' ) )) THEN + INFO = - 1 + ELSE IF ( .NOT.( LSVEC .OR. LSAME( JOBU, 'N' ) .OR. + $ ( LSAME( JOBU, 'W' ) .AND. RSVEC .AND. L2TRAN ) ) ) THEN + INFO = - 2 + ELSE IF ( .NOT.( RSVEC .OR. LSAME( JOBV, 'N' ) .OR. + $ ( LSAME( JOBV, 'W' ) .AND. LSVEC .AND. L2TRAN ) ) ) THEN + INFO = - 3 + ELSE IF ( .NOT. ( L2KILL .OR. DEFR ) ) THEN + INFO = - 4 + ELSE IF ( .NOT. ( LSAME(JOBT,'T') .OR. LSAME(JOBT,'N') ) ) THEN + INFO = - 5 + ELSE IF ( .NOT. ( L2PERT .OR. LSAME( JOBP, 'N' ) ) ) THEN + INFO = - 6 + ELSE IF ( M .LT. 0 ) THEN + INFO = - 7 + ELSE IF ( ( N .LT. 0 ) .OR. ( N .GT. M ) ) THEN + INFO = - 8 + ELSE IF ( LDA .LT. M ) THEN + INFO = - 10 + ELSE IF ( LSVEC .AND. ( LDU .LT. M ) ) THEN + INFO = - 13 + ELSE IF ( RSVEC .AND. ( LDV .LT. N ) ) THEN + INFO = - 15 + ELSE +* #:) + INFO = 0 + END IF +* + IF ( INFO .EQ. 0 ) THEN +* .. compute the minimal and the optimal workspace lengths +* [[The expressions for computing the minimal and the optimal +* values of LCWORK, LRWORK are written with a lot of redundancy and +* can be simplified. However, this verbose form is useful for +* maintenance and modifications of the code.]] +* +* .. minimal workspace length for ZGEQP3 of an M x N matrix, +* ZGEQRF of an N x N matrix, ZGELQF of an N x N matrix, +* ZUNMLQ for computing N x N matrix, ZUNMQR for computing N x N +* matrix, ZUNMQR for computing M x N matrix, respectively. + LWQP3 = N+1 + LWQRF = MAX( 1, N ) + LWLQF = MAX( 1, N ) + LWUNMLQ = MAX( 1, N ) + LWUNMQR = MAX( 1, N ) + LWUNMQRM = MAX( 1, M ) +* .. minimal workspace length for ZPOCON of an N x N matrix + LWCON = 2 * N +* .. minimal workspace length for ZGESVJ of an N x N matrix, +* without and with explicit accumulation of Jacobi rotations + LWSVDJ = MAX( 2 * N, 1 ) + LWSVDJV = MAX( 2 * N, 1 ) +* .. minimal REAL workspace length for ZGEQP3, ZPOCON, ZGESVJ + LRWQP3 = N + LRWCON = N + LRWSVDJ = N + IF ( LQUERY ) THEN + CALL ZGEQP3( M, N, A, LDA, IWORK, CDUMMY, CDUMMY, -1, + $ RDUMMY, IERR ) + LWRK_ZGEQP3 = CDUMMY(1) + CALL ZGEQRF( N, N, A, LDA, CDUMMY, CDUMMY,-1, IERR ) + LWRK_ZGEQRF = CDUMMY(1) + CALL ZGELQF( N, N, A, LDA, CDUMMY, CDUMMY,-1, IERR ) + LWRK_ZGELQF = CDUMMY(1) + END IF + MINWRK = 2 + OPTWRK = 2 + MINIWRK = N + IF ( .NOT. (LSVEC .OR. RSVEC ) ) THEN +* .. minimal and optimal sizes of the complex workspace if +* only the singular values are requested + IF ( ERREST ) THEN + MINWRK = MAX( N+LWQP3, N**2+LWCON, N+LWQRF, LWSVDJ ) + ELSE + MINWRK = MAX( N+LWQP3, N+LWQRF, LWSVDJ ) + END IF + IF ( LQUERY ) THEN + CALL ZGESVJ( 'L', 'N', 'N', N, N, A, LDA, SVA, N, V, + $ LDV, CDUMMY, -1, RDUMMY, -1, IERR ) + LWRK_ZGESVJ = CDUMMY(1) + IF ( ERREST ) THEN + OPTWRK = MAX( N+LWRK_ZGEQP3, N**2+LWCON, + $ N+LWRK_ZGEQRF, LWRK_ZGESVJ ) + ELSE + OPTWRK = MAX( N+LWRK_ZGEQP3, N+LWRK_ZGEQRF, + $ LWRK_ZGESVJ ) + END IF + END IF + IF ( L2TRAN .OR. ROWPIV ) THEN + IF ( ERREST ) THEN + MINRWRK = MAX( 7, 2*M, LRWQP3, LRWCON, LRWSVDJ ) + ELSE + MINRWRK = MAX( 7, 2*M, LRWQP3, LRWSVDJ ) + END IF + ELSE + IF ( ERREST ) THEN + MINRWRK = MAX( 7, LRWQP3, LRWCON, LRWSVDJ ) + ELSE + MINRWRK = MAX( 7, LRWQP3, LRWSVDJ ) + END IF + END IF + IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M + ELSE IF ( RSVEC .AND. (.NOT.LSVEC) ) THEN +* .. minimal and optimal sizes of the complex workspace if the +* singular values and the right singular vectors are requested + IF ( ERREST ) THEN + MINWRK = MAX( N+LWQP3, LWCON, LWSVDJ, N+LWLQF, + $ 2*N+LWQRF, N+LWSVDJ, N+LWUNMLQ ) + ELSE + MINWRK = MAX( N+LWQP3, LWSVDJ, N+LWLQF, 2*N+LWQRF, + $ N+LWSVDJ, N+LWUNMLQ ) + END IF + IF ( LQUERY ) THEN + CALL ZGESVJ( 'L', 'U', 'N', N,N, U, LDU, SVA, N, A, + $ LDA, CDUMMY, -1, RDUMMY, -1, IERR ) + LWRK_ZGESVJ = CDUMMY(1) + CALL ZUNMLQ( 'L', 'C', N, N, N, A, LDA, CDUMMY, + $ V, LDV, CDUMMY, -1, IERR ) + LWRK_ZUNMLQ = CDUMMY(1) + IF ( ERREST ) THEN + OPTWRK = MAX( N+LWRK_ZGEQP3, LWCON, LWRK_ZGESVJ, + $ N+LWRK_ZGELQF, 2*N+LWRK_ZGEQRF, + $ N+LWRK_ZGESVJ, N+LWRK_ZUNMLQ ) + ELSE + OPTWRK = MAX( N+LWRK_ZGEQP3, LWRK_ZGESVJ,N+LWRK_ZGELQF, + $ 2*N+LWRK_ZGEQRF, N+LWRK_ZGESVJ, + $ N+LWRK_ZUNMLQ ) + END IF + END IF + IF ( L2TRAN .OR. ROWPIV ) THEN + IF ( ERREST ) THEN + MINRWRK = MAX( 7, 2*M, LRWQP3, LRWSVDJ, LRWCON ) + ELSE + MINRWRK = MAX( 7, 2*M, LRWQP3, LRWSVDJ ) + END IF + ELSE + IF ( ERREST ) THEN + MINRWRK = MAX( 7, LRWQP3, LRWSVDJ, LRWCON ) + ELSE + MINRWRK = MAX( 7, LRWQP3, LRWSVDJ ) + END IF + END IF + IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M + ELSE IF ( LSVEC .AND. (.NOT.RSVEC) ) THEN +* .. minimal and optimal sizes of the complex workspace if the +* singular values and the left singular vectors are requested + IF ( ERREST ) THEN + MINWRK = N + MAX( LWQP3,LWCON,N+LWQRF,LWSVDJ,LWUNMQRM ) + ELSE + MINWRK = N + MAX( LWQP3, N+LWQRF, LWSVDJ, LWUNMQRM ) + END IF + IF ( LQUERY ) THEN + CALL ZGESVJ( 'L', 'U', 'N', N,N, U, LDU, SVA, N, A, + $ LDA, CDUMMY, -1, RDUMMY, -1, IERR ) + LWRK_ZGESVJ = CDUMMY(1) + CALL ZUNMQR( 'L', 'N', M, N, N, A, LDA, CDUMMY, U, + $ LDU, CDUMMY, -1, IERR ) + LWRK_ZUNMQRM = CDUMMY(1) + IF ( ERREST ) THEN + OPTWRK = N + MAX( LWRK_ZGEQP3, LWCON, N+LWRK_ZGEQRF, + $ LWRK_ZGESVJ, LWRK_ZUNMQRM ) + ELSE + OPTWRK = N + MAX( LWRK_ZGEQP3, N+LWRK_ZGEQRF, + $ LWRK_ZGESVJ, LWRK_ZUNMQRM ) + END IF + END IF + IF ( L2TRAN .OR. ROWPIV ) THEN + IF ( ERREST ) THEN + MINRWRK = MAX( 7, 2*M, LRWQP3, LRWSVDJ, LRWCON ) + ELSE + MINRWRK = MAX( 7, 2*M, LRWQP3, LRWSVDJ ) + END IF + ELSE + IF ( ERREST ) THEN + MINRWRK = MAX( 7, LRWQP3, LRWSVDJ, LRWCON ) + ELSE + MINRWRK = MAX( 7, LRWQP3, LRWSVDJ ) + END IF + END IF + IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M + ELSE +* .. minimal and optimal sizes of the complex workspace if the +* full SVD is requested + IF ( .NOT. JRACC ) THEN + IF ( ERREST ) THEN + MINWRK = MAX( N+LWQP3, N+LWCON, 2*N+N**2+LWCON, + $ 2*N+LWQRF, 2*N+LWQP3, + $ 2*N+N**2+N+LWLQF, 2*N+N**2+N+N**2+LWCON, + $ 2*N+N**2+N+LWSVDJ, 2*N+N**2+N+LWSVDJV, + $ 2*N+N**2+N+LWUNMQR,2*N+N**2+N+LWUNMLQ, + $ N+N**2+LWSVDJ, N+LWUNMQRM ) + ELSE + MINWRK = MAX( N+LWQP3, 2*N+N**2+LWCON, + $ 2*N+LWQRF, 2*N+LWQP3, + $ 2*N+N**2+N+LWLQF, 2*N+N**2+N+N**2+LWCON, + $ 2*N+N**2+N+LWSVDJ, 2*N+N**2+N+LWSVDJV, + $ 2*N+N**2+N+LWUNMQR,2*N+N**2+N+LWUNMLQ, + $ N+N**2+LWSVDJ, N+LWUNMQRM ) + END IF + MINIWRK = MINIWRK + N + IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M + ELSE + IF ( ERREST ) THEN + MINWRK = MAX( N+LWQP3, N+LWCON, 2*N+LWQRF, + $ 2*N+N**2+LWSVDJV, 2*N+N**2+N+LWUNMQR, + $ N+LWUNMQRM ) + ELSE + MINWRK = MAX( N+LWQP3, 2*N+LWQRF, + $ 2*N+N**2+LWSVDJV, 2*N+N**2+N+LWUNMQR, + $ N+LWUNMQRM ) + END IF + IF ( ROWPIV .OR. L2TRAN ) MINIWRK = MINIWRK + M + END IF + IF ( LQUERY ) THEN + CALL ZUNMQR( 'L', 'N', M, N, N, A, LDA, CDUMMY, U, + $ LDU, CDUMMY, -1, IERR ) + LWRK_ZUNMQRM = CDUMMY(1) + CALL ZUNMQR( 'L', 'N', N, N, N, A, LDA, CDUMMY, U, + $ LDU, CDUMMY, -1, IERR ) + LWRK_ZUNMQR = CDUMMY(1) + IF ( .NOT. JRACC ) THEN + CALL ZGEQP3( N,N, A, LDA, IWORK, CDUMMY,CDUMMY, -1, + $ RDUMMY, IERR ) + LWRK_ZGEQP3N = CDUMMY(1) + CALL ZGESVJ( 'L', 'U', 'N', N, N, U, LDU, SVA, + $ N, V, LDV, CDUMMY, -1, RDUMMY, -1, IERR ) + LWRK_ZGESVJ = CDUMMY(1) + CALL ZGESVJ( 'U', 'U', 'N', N, N, U, LDU, SVA, + $ N, V, LDV, CDUMMY, -1, RDUMMY, -1, IERR ) + LWRK_ZGESVJU = CDUMMY(1) + CALL ZGESVJ( 'L', 'U', 'V', N, N, U, LDU, SVA, + $ N, V, LDV, CDUMMY, -1, RDUMMY, -1, IERR ) + LWRK_ZGESVJV = CDUMMY(1) + CALL ZUNMLQ( 'L', 'C', N, N, N, A, LDA, CDUMMY, + $ V, LDV, CDUMMY, -1, IERR ) + LWRK_ZUNMLQ = CDUMMY(1) + IF ( ERREST ) THEN + OPTWRK = MAX( N+LWRK_ZGEQP3, N+LWCON, + $ 2*N+N**2+LWCON, 2*N+LWRK_ZGEQRF, + $ 2*N+LWRK_ZGEQP3N, + $ 2*N+N**2+N+LWRK_ZGELQF, + $ 2*N+N**2+N+N**2+LWCON, + $ 2*N+N**2+N+LWRK_ZGESVJ, + $ 2*N+N**2+N+LWRK_ZGESVJV, + $ 2*N+N**2+N+LWRK_ZUNMQR, + $ 2*N+N**2+N+LWRK_ZUNMLQ, + $ N+N**2+LWRK_ZGESVJU, + $ N+LWRK_ZUNMQRM ) + ELSE + OPTWRK = MAX( N+LWRK_ZGEQP3, + $ 2*N+N**2+LWCON, 2*N+LWRK_ZGEQRF, + $ 2*N+LWRK_ZGEQP3N, + $ 2*N+N**2+N+LWRK_ZGELQF, + $ 2*N+N**2+N+N**2+LWCON, + $ 2*N+N**2+N+LWRK_ZGESVJ, + $ 2*N+N**2+N+LWRK_ZGESVJV, + $ 2*N+N**2+N+LWRK_ZUNMQR, + $ 2*N+N**2+N+LWRK_ZUNMLQ, + $ N+N**2+LWRK_ZGESVJU, + $ N+LWRK_ZUNMQRM ) + END IF + ELSE + CALL ZGESVJ( 'L', 'U', 'V', N, N, U, LDU, SVA, + $ N, V, LDV, CDUMMY, -1, RDUMMY, -1, IERR ) + LWRK_ZGESVJV = CDUMMY(1) + CALL ZUNMQR( 'L', 'N', N, N, N, CDUMMY, N, CDUMMY, + $ V, LDV, CDUMMY, -1, IERR ) + LWRK_ZUNMQR = CDUMMY(1) + CALL ZUNMQR( 'L', 'N', M, N, N, A, LDA, CDUMMY, U, + $ LDU, CDUMMY, -1, IERR ) + LWRK_ZUNMQRM = CDUMMY(1) + IF ( ERREST ) THEN + OPTWRK = MAX( N+LWRK_ZGEQP3, N+LWCON, + $ 2*N+LWRK_ZGEQRF, 2*N+N**2, + $ 2*N+N**2+LWRK_ZGESVJV, + $ 2*N+N**2+N+LWRK_ZUNMQR,N+LWRK_ZUNMQRM ) + ELSE + OPTWRK = MAX( N+LWRK_ZGEQP3, 2*N+LWRK_ZGEQRF, + $ 2*N+N**2, 2*N+N**2+LWRK_ZGESVJV, + $ 2*N+N**2+N+LWRK_ZUNMQR, + $ N+LWRK_ZUNMQRM ) + END IF + END IF + END IF + IF ( L2TRAN .OR. ROWPIV ) THEN + MINRWRK = MAX( 7, 2*M, LRWQP3, LRWSVDJ, LRWCON ) + ELSE + MINRWRK = MAX( 7, LRWQP3, LRWSVDJ, LRWCON ) + END IF + END IF + MINWRK = MAX( 2, MINWRK ) + OPTWRK = MAX( 2, OPTWRK ) + IF ( LWORK .LT. MINWRK .AND. (.NOT.LQUERY) ) INFO = - 17 + IF ( LRWORK .LT. MINRWRK .AND. (.NOT.LQUERY) ) INFO = - 19 + END IF +* + IF ( INFO .NE. 0 ) THEN +* #:( + CALL XERBLA( 'ZGEJSV', - INFO ) + RETURN + ELSE IF ( LQUERY ) THEN + CWORK(1) = OPTWRK + CWORK(2) = MINWRK + RWORK(1) = MINRWRK + IWORK(1) = MAX( 4, MINIWRK ) + RETURN + END IF +* +* Quick return for void matrix (Y3K safe) +* #:) + IF ( ( M .EQ. 0 ) .OR. ( N .EQ. 0 ) ) THEN + IWORK(1:4) = 0 + RWORK(1:7) = 0 + RETURN + ENDIF +* +* Determine whether the matrix U should be M x N or M x M +* + IF ( LSVEC ) THEN + N1 = N + IF ( LSAME( JOBU, 'F' ) ) N1 = M + END IF +* +* Set numerical parameters +* +*! NOTE: Make sure DLAMCH() does not fail on the target architecture. +* + EPSLN = DLAMCH('Epsilon') + SFMIN = DLAMCH('SafeMinimum') + SMALL = SFMIN / EPSLN + BIG = DLAMCH('O') +* BIG = ONE / SFMIN +* +* Initialize SVA(1:N) = diag( ||A e_i||_2 )_1^N +* +*(!) If necessary, scale SVA() to protect the largest norm from +* overflow. It is possible that this scaling pushes the smallest +* column norm left from the underflow threshold (extreme case). +* + SCALEM = ONE / SQRT(DBLE(M)*DBLE(N)) + NOSCAL = .TRUE. + GOSCAL = .TRUE. + DO 1874 p = 1, N + AAPP = ZERO + AAQQ = ONE + CALL ZLASSQ( M, A(1,p), 1, AAPP, AAQQ ) + IF ( AAPP .GT. BIG ) THEN + INFO = - 9 + CALL XERBLA( 'ZGEJSV', -INFO ) + RETURN + END IF + AAQQ = SQRT(AAQQ) + IF ( ( AAPP .LT. (BIG / AAQQ) ) .AND. NOSCAL ) THEN + SVA(p) = AAPP * AAQQ + ELSE + NOSCAL = .FALSE. + SVA(p) = AAPP * ( AAQQ * SCALEM ) + IF ( GOSCAL ) THEN + GOSCAL = .FALSE. + CALL DSCAL( p-1, SCALEM, SVA, 1 ) + END IF + END IF + 1874 CONTINUE +* + IF ( NOSCAL ) SCALEM = ONE +* + AAPP = ZERO + AAQQ = BIG + DO 4781 p = 1, N + AAPP = MAX( AAPP, SVA(p) ) + IF ( SVA(p) .NE. ZERO ) AAQQ = MIN( AAQQ, SVA(p) ) + 4781 CONTINUE +* +* Quick return for zero M x N matrix +* #:) + IF ( AAPP .EQ. ZERO ) THEN + IF ( LSVEC ) CALL ZLASET( 'G', M, N1, CZERO, CONE, U, LDU ) + IF ( RSVEC ) CALL ZLASET( 'G', N, N, CZERO, CONE, V, LDV ) + RWORK(1) = ONE + RWORK(2) = ONE + IF ( ERREST ) RWORK(3) = ONE + IF ( LSVEC .AND. RSVEC ) THEN + RWORK(4) = ONE + RWORK(5) = ONE + END IF + IF ( L2TRAN ) THEN + RWORK(6) = ZERO + RWORK(7) = ZERO + END IF + IWORK(1) = 0 + IWORK(2) = 0 + IWORK(3) = 0 + IWORK(4) = -1 + RETURN + END IF +* +* Issue warning if denormalized column norms detected. Override the +* high relative accuracy request. Issue licence to kill nonzero columns +* (set them to zero) whose norm is less than sigma_max / BIG (roughly). +* #:( + WARNING = 0 + IF ( AAQQ .LE. SFMIN ) THEN + L2RANK = .TRUE. + L2KILL = .TRUE. + WARNING = 1 + END IF +* +* Quick return for one-column matrix +* #:) + IF ( N .EQ. 1 ) THEN +* + IF ( LSVEC ) THEN + CALL ZLASCL( 'G',0,0,SVA(1),SCALEM, M,1,A(1,1),LDA,IERR ) + CALL ZLACPY( 'A', M, 1, A, LDA, U, LDU ) +* computing all M left singular vectors of the M x 1 matrix + IF ( N1 .NE. N ) THEN + CALL ZGEQRF( M, N, U,LDU, CWORK, CWORK(N+1),LWORK-N,IERR ) + CALL ZUNGQR( M,N1,1, U,LDU,CWORK,CWORK(N+1),LWORK-N,IERR ) + CALL ZCOPY( M, A(1,1), 1, U(1,1), 1 ) + END IF + END IF + IF ( RSVEC ) THEN + V(1,1) = CONE + END IF + IF ( SVA(1) .LT. (BIG*SCALEM) ) THEN + SVA(1) = SVA(1) / SCALEM + SCALEM = ONE + END IF + RWORK(1) = ONE / SCALEM + RWORK(2) = ONE + IF ( SVA(1) .NE. ZERO ) THEN + IWORK(1) = 1 + IF ( ( SVA(1) / SCALEM) .GE. SFMIN ) THEN + IWORK(2) = 1 + ELSE + IWORK(2) = 0 + END IF + ELSE + IWORK(1) = 0 + IWORK(2) = 0 + END IF + IWORK(3) = 0 + IWORK(4) = -1 + IF ( ERREST ) RWORK(3) = ONE + IF ( LSVEC .AND. RSVEC ) THEN + RWORK(4) = ONE + RWORK(5) = ONE + END IF + IF ( L2TRAN ) THEN + RWORK(6) = ZERO + RWORK(7) = ZERO + END IF + RETURN +* + END IF +* + TRANSP = .FALSE. +* + AATMAX = -ONE + AATMIN = BIG + IF ( ROWPIV .OR. L2TRAN ) THEN +* +* Compute the row norms, needed to determine row pivoting sequence +* (in the case of heavily row weighted A, row pivoting is strongly +* advised) and to collect information needed to compare the +* structures of A * A^* and A^* * A (in the case L2TRAN.EQ..TRUE.). +* + IF ( L2TRAN ) THEN + DO 1950 p = 1, M + XSC = ZERO + TEMP1 = ONE + CALL ZLASSQ( N, A(p,1), LDA, XSC, TEMP1 ) +* ZLASSQ gets both the ell_2 and the ell_infinity norm +* in one pass through the vector + RWORK(M+p) = XSC * SCALEM + RWORK(p) = XSC * (SCALEM*SQRT(TEMP1)) + AATMAX = MAX( AATMAX, RWORK(p) ) + IF (RWORK(p) .NE. ZERO) + $ AATMIN = MIN(AATMIN,RWORK(p)) + 1950 CONTINUE + ELSE + DO 1904 p = 1, M + RWORK(M+p) = SCALEM*ABS( A(p,IZAMAX(N,A(p,1),LDA)) ) + AATMAX = MAX( AATMAX, RWORK(M+p) ) + AATMIN = MIN( AATMIN, RWORK(M+p) ) + 1904 CONTINUE + END IF +* + END IF +* +* For square matrix A try to determine whether A^* would be better +* input for the preconditioned Jacobi SVD, with faster convergence. +* The decision is based on an O(N) function of the vector of column +* and row norms of A, based on the Shannon entropy. This should give +* the right choice in most cases when the difference actually matters. +* It may fail and pick the slower converging side. +* + ENTRA = ZERO + ENTRAT = ZERO + IF ( L2TRAN ) THEN +* + XSC = ZERO + TEMP1 = ONE + CALL DLASSQ( N, SVA, 1, XSC, TEMP1 ) + TEMP1 = ONE / TEMP1 +* + ENTRA = ZERO + DO 1113 p = 1, N + BIG1 = ( ( SVA(p) / XSC )**2 ) * TEMP1 + IF ( BIG1 .NE. ZERO ) ENTRA = ENTRA + BIG1 * DLOG(BIG1) + 1113 CONTINUE + ENTRA = - ENTRA / DLOG(DBLE(N)) +* +* Now, SVA().^2/Trace(A^* * A) is a point in the probability simplex. +* It is derived from the diagonal of A^* * A. Do the same with the +* diagonal of A * A^*, compute the entropy of the corresponding +* probability distribution. Note that A * A^* and A^* * A have the +* same trace. +* + ENTRAT = ZERO + DO 1114 p = 1, M + BIG1 = ( ( RWORK(p) / XSC )**2 ) * TEMP1 + IF ( BIG1 .NE. ZERO ) ENTRAT = ENTRAT + BIG1 * DLOG(BIG1) + 1114 CONTINUE + ENTRAT = - ENTRAT / DLOG(DBLE(M)) +* +* Analyze the entropies and decide A or A^*. Smaller entropy +* usually means better input for the algorithm. +* + TRANSP = ( ENTRAT .LT. ENTRA ) +* +* If A^* is better than A, take the adjoint of A. This is allowed +* only for square matrices, M=N. + IF ( TRANSP ) THEN +* In an optimal implementation, this trivial transpose +* should be replaced with faster transpose. + DO 1115 p = 1, N - 1 + A(p,p) = CONJG(A(p,p)) + DO 1116 q = p + 1, N + CTEMP = CONJG(A(q,p)) + A(q,p) = CONJG(A(p,q)) + A(p,q) = CTEMP + 1116 CONTINUE + 1115 CONTINUE + A(N,N) = CONJG(A(N,N)) + DO 1117 p = 1, N + RWORK(M+p) = SVA(p) + SVA(p) = RWORK(p) +* previously computed row 2-norms are now column 2-norms +* of the transposed matrix + 1117 CONTINUE + TEMP1 = AAPP + AAPP = AATMAX + AATMAX = TEMP1 + TEMP1 = AAQQ + AAQQ = AATMIN + AATMIN = TEMP1 + KILL = LSVEC + LSVEC = RSVEC + RSVEC = KILL + IF ( LSVEC ) N1 = N +* + ROWPIV = .TRUE. + END IF +* + END IF +* END IF L2TRAN +* +* Scale the matrix so that its maximal singular value remains less +* than SQRT(BIG) -- the matrix is scaled so that its maximal column +* has Euclidean norm equal to SQRT(BIG/N). The only reason to keep +* SQRT(BIG) instead of BIG is the fact that ZGEJSV uses LAPACK and +* BLAS routines that, in some implementations, are not capable of +* working in the full interval [SFMIN,BIG] and that they may provoke +* overflows in the intermediate results. If the singular values spread +* from SFMIN to BIG, then ZGESVJ will compute them. So, in that case, +* one should use ZGESVJ instead of ZGEJSV. +* >> change in the April 2016 update: allow bigger range, i.e. the +* largest column is allowed up to BIG/N and ZGESVJ will do the rest. + BIG1 = SQRT( BIG ) + TEMP1 = SQRT( BIG / DBLE(N) ) +* TEMP1 = BIG/DBLE(N) +* + CALL DLASCL( 'G', 0, 0, AAPP, TEMP1, N, 1, SVA, N, IERR ) + IF ( AAQQ .GT. (AAPP * SFMIN) ) THEN + AAQQ = ( AAQQ / AAPP ) * TEMP1 + ELSE + AAQQ = ( AAQQ * TEMP1 ) / AAPP + END IF + TEMP1 = TEMP1 * SCALEM + CALL ZLASCL( 'G', 0, 0, AAPP, TEMP1, M, N, A, LDA, IERR ) +* +* To undo scaling at the end of this procedure, multiply the +* computed singular values with USCAL2 / USCAL1. +* + USCAL1 = TEMP1 + USCAL2 = AAPP +* + IF ( L2KILL ) THEN +* L2KILL enforces computation of nonzero singular values in +* the restricted range of condition number of the initial A, +* sigma_max(A) / sigma_min(A) approx. SQRT(BIG)/SQRT(SFMIN). + XSC = SQRT( SFMIN ) + ELSE + XSC = SMALL +* +* Now, if the condition number of A is too big, +* sigma_max(A) / sigma_min(A) .GT. SQRT(BIG/N) * EPSLN / SFMIN, +* as a precaution measure, the full SVD is computed using ZGESVJ +* with accumulated Jacobi rotations. This provides numerically +* more robust computation, at the cost of slightly increased run +* time. Depending on the concrete implementation of BLAS and LAPACK +* (i.e. how they behave in presence of extreme ill-conditioning) the +* implementor may decide to remove this switch. + IF ( ( AAQQ.LT.SQRT(SFMIN) ) .AND. LSVEC .AND. RSVEC ) THEN + JRACC = .TRUE. + END IF +* + END IF + IF ( AAQQ .LT. XSC ) THEN + DO 700 p = 1, N + IF ( SVA(p) .LT. XSC ) THEN + CALL ZLASET( 'A', M, 1, CZERO, CZERO, A(1,p), LDA ) + SVA(p) = ZERO + END IF + 700 CONTINUE + END IF +* +* Preconditioning using QR factorization with pivoting +* + IF ( ROWPIV ) THEN +* Optional row permutation (Bjoerck row pivoting): +* A result by Cox and Higham shows that the Bjoerck's +* row pivoting combined with standard column pivoting +* has similar effect as Powell-Reid complete pivoting. +* The ell-infinity norms of A are made nonincreasing. + IF ( ( LSVEC .AND. RSVEC ) .AND. .NOT.( JRACC ) ) THEN + IWOFF = 2*N + ELSE + IWOFF = N + END IF + DO 1952 p = 1, M - 1 + q = IDAMAX( M-p+1, RWORK(M+p), 1 ) + p - 1 + IWORK(IWOFF+p) = q + IF ( p .NE. q ) THEN + TEMP1 = RWORK(M+p) + RWORK(M+p) = RWORK(M+q) + RWORK(M+q) = TEMP1 + END IF + 1952 CONTINUE + CALL ZLASWP( N, A, LDA, 1, M-1, IWORK(IWOFF+1), 1 ) + END IF +* +* End of the preparation phase (scaling, optional sorting and +* transposing, optional flushing of small columns). +* +* Preconditioning +* +* If the full SVD is needed, the right singular vectors are computed +* from a matrix equation, and for that we need theoretical analysis +* of the Businger-Golub pivoting. So we use ZGEQP3 as the first RR QRF. +* In all other cases the first RR QRF can be chosen by other criteria +* (eg speed by replacing global with restricted window pivoting, such +* as in xGEQPX from TOMS # 782). Good results will be obtained using +* xGEQPX with properly (!) chosen numerical parameters. +* Any improvement of ZGEQP3 improves overal performance of ZGEJSV. +* +* A * P1 = Q1 * [ R1^* 0]^*: + DO 1963 p = 1, N +* .. all columns are free columns + IWORK(p) = 0 + 1963 CONTINUE + CALL ZGEQP3( M, N, A, LDA, IWORK, CWORK, CWORK(N+1), LWORK-N, + $ RWORK, IERR ) +* +* The upper triangular matrix R1 from the first QRF is inspected for +* rank deficiency and possibilities for deflation, or possible +* ill-conditioning. Depending on the user specified flag L2RANK, +* the procedure explores possibilities to reduce the numerical +* rank by inspecting the computed upper triangular factor. If +* L2RANK or L2ABER are up, then ZGEJSV will compute the SVD of +* A + dA, where ||dA|| <= f(M,N)*EPSLN. +* + NR = 1 + IF ( L2ABER ) THEN +* Standard absolute error bound suffices. All sigma_i with +* sigma_i < N*EPSLN*||A|| are flushed to zero. This is an +* agressive enforcement of lower numerical rank by introducing a +* backward error of the order of N*EPSLN*||A||. + TEMP1 = SQRT(DBLE(N))*EPSLN + DO 3001 p = 2, N + IF ( ABS(A(p,p)) .GE. (TEMP1*ABS(A(1,1))) ) THEN + NR = NR + 1 + ELSE + GO TO 3002 + END IF + 3001 CONTINUE + 3002 CONTINUE + ELSE IF ( L2RANK ) THEN +* .. similarly as above, only slightly more gentle (less agressive). +* Sudden drop on the diagonal of R1 is used as the criterion for +* close-to-rank-deficient. + TEMP1 = SQRT(SFMIN) + DO 3401 p = 2, N + IF ( ( ABS(A(p,p)) .LT. (EPSLN*ABS(A(p-1,p-1))) ) .OR. + $ ( ABS(A(p,p)) .LT. SMALL ) .OR. + $ ( L2KILL .AND. (ABS(A(p,p)) .LT. TEMP1) ) ) GO TO 3402 + NR = NR + 1 + 3401 CONTINUE + 3402 CONTINUE +* + ELSE +* The goal is high relative accuracy. However, if the matrix +* has high scaled condition number the relative accuracy is in +* general not feasible. Later on, a condition number estimator +* will be deployed to estimate the scaled condition number. +* Here we just remove the underflowed part of the triangular +* factor. This prevents the situation in which the code is +* working hard to get the accuracy not warranted by the data. + TEMP1 = SQRT(SFMIN) + DO 3301 p = 2, N + IF ( ( ABS(A(p,p)) .LT. SMALL ) .OR. + $ ( L2KILL .AND. (ABS(A(p,p)) .LT. TEMP1) ) ) GO TO 3302 + NR = NR + 1 + 3301 CONTINUE + 3302 CONTINUE +* + END IF +* + ALMORT = .FALSE. + IF ( NR .EQ. N ) THEN + MAXPRJ = ONE + DO 3051 p = 2, N + TEMP1 = ABS(A(p,p)) / SVA(IWORK(p)) + MAXPRJ = MIN( MAXPRJ, TEMP1 ) + 3051 CONTINUE + IF ( MAXPRJ**2 .GE. ONE - DBLE(N)*EPSLN ) ALMORT = .TRUE. + END IF +* +* + SCONDA = - ONE + CONDR1 = - ONE + CONDR2 = - ONE +* + IF ( ERREST ) THEN + IF ( N .EQ. NR ) THEN + IF ( RSVEC ) THEN +* .. V is available as workspace + CALL ZLACPY( 'U', N, N, A, LDA, V, LDV ) + DO 3053 p = 1, N + TEMP1 = SVA(IWORK(p)) + CALL ZDSCAL( p, ONE/TEMP1, V(1,p), 1 ) + 3053 CONTINUE + IF ( LSVEC )THEN + CALL ZPOCON( 'U', N, V, LDV, ONE, TEMP1, + $ CWORK(N+1), RWORK, IERR ) + ELSE + CALL ZPOCON( 'U', N, V, LDV, ONE, TEMP1, + $ CWORK, RWORK, IERR ) + END IF +* + ELSE IF ( LSVEC ) THEN +* .. U is available as workspace + CALL ZLACPY( 'U', N, N, A, LDA, U, LDU ) + DO 3054 p = 1, N + TEMP1 = SVA(IWORK(p)) + CALL ZDSCAL( p, ONE/TEMP1, U(1,p), 1 ) + 3054 CONTINUE + CALL ZPOCON( 'U', N, U, LDU, ONE, TEMP1, + $ CWORK(N+1), RWORK, IERR ) + ELSE + CALL ZLACPY( 'U', N, N, A, LDA, CWORK, N ) +*[] CALL ZLACPY( 'U', N, N, A, LDA, CWORK(N+1), N ) +* Change: here index shifted by N to the left, CWORK(1:N) +* not needed for SIGMA only computation + DO 3052 p = 1, N + TEMP1 = SVA(IWORK(p)) +*[] CALL ZDSCAL( p, ONE/TEMP1, CWORK(N+(p-1)*N+1), 1 ) + CALL ZDSCAL( p, ONE/TEMP1, CWORK((p-1)*N+1), 1 ) + 3052 CONTINUE +* .. the columns of R are scaled to have unit Euclidean lengths. +*[] CALL ZPOCON( 'U', N, CWORK(N+1), N, ONE, TEMP1, +*[] $ CWORK(N+N*N+1), RWORK, IERR ) + CALL ZPOCON( 'U', N, CWORK, N, ONE, TEMP1, + $ CWORK(N*N+1), RWORK, IERR ) +* + END IF + IF ( TEMP1 .NE. ZERO ) THEN + SCONDA = ONE / SQRT(TEMP1) + ELSE + SCONDA = - ONE + END IF +* SCONDA is an estimate of SQRT(||(R^* * R)^(-1)||_1). +* N^(-1/4) * SCONDA <= ||R^(-1)||_2 <= N^(1/4) * SCONDA + ELSE + SCONDA = - ONE + END IF + END IF +* + L2PERT = L2PERT .AND. ( ABS( A(1,1)/A(NR,NR) ) .GT. SQRT(BIG1) ) +* If there is no violent scaling, artificial perturbation is not needed. +* +* Phase 3: +* + IF ( .NOT. ( RSVEC .OR. LSVEC ) ) THEN +* +* Singular Values only +* +* .. transpose A(1:NR,1:N) + DO 1946 p = 1, MIN( N-1, NR ) + CALL ZCOPY( N-p, A(p,p+1), LDA, A(p+1,p), 1 ) + CALL ZLACGV( N-p+1, A(p,p), 1 ) + 1946 CONTINUE + IF ( NR .EQ. N ) A(N,N) = CONJG(A(N,N)) +* +* The following two DO-loops introduce small relative perturbation +* into the strict upper triangle of the lower triangular matrix. +* Small entries below the main diagonal are also changed. +* This modification is useful if the computing environment does not +* provide/allow FLUSH TO ZERO underflow, for it prevents many +* annoying denormalized numbers in case of strongly scaled matrices. +* The perturbation is structured so that it does not introduce any +* new perturbation of the singular values, and it does not destroy +* the job done by the preconditioner. +* The licence for this perturbation is in the variable L2PERT, which +* should be .FALSE. if FLUSH TO ZERO underflow is active. +* + IF ( .NOT. ALMORT ) THEN +* + IF ( L2PERT ) THEN +* XSC = SQRT(SMALL) + XSC = EPSLN / DBLE(N) + DO 4947 q = 1, NR + CTEMP = DCMPLX(XSC*ABS(A(q,q)),ZERO) + DO 4949 p = 1, N + IF ( ( (p.GT.q) .AND. (ABS(A(p,q)).LE.TEMP1) ) + $ .OR. ( p .LT. q ) ) +* $ A(p,q) = TEMP1 * ( A(p,q) / ABS(A(p,q)) ) + $ A(p,q) = CTEMP + 4949 CONTINUE + 4947 CONTINUE + ELSE + CALL ZLASET( 'U', NR-1,NR-1, CZERO,CZERO, A(1,2),LDA ) + END IF +* +* .. second preconditioning using the QR factorization +* + CALL ZGEQRF( N,NR, A,LDA, CWORK, CWORK(N+1),LWORK-N, IERR ) +* +* .. and transpose upper to lower triangular + DO 1948 p = 1, NR - 1 + CALL ZCOPY( NR-p, A(p,p+1), LDA, A(p+1,p), 1 ) + CALL ZLACGV( NR-p+1, A(p,p), 1 ) + 1948 CONTINUE +* + END IF +* +* Row-cyclic Jacobi SVD algorithm with column pivoting +* +* .. again some perturbation (a "background noise") is added +* to drown denormals + IF ( L2PERT ) THEN +* XSC = SQRT(SMALL) + XSC = EPSLN / DBLE(N) + DO 1947 q = 1, NR + CTEMP = DCMPLX(XSC*ABS(A(q,q)),ZERO) + DO 1949 p = 1, NR + IF ( ( (p.GT.q) .AND. (ABS(A(p,q)).LE.TEMP1) ) + $ .OR. ( p .LT. q ) ) +* $ A(p,q) = TEMP1 * ( A(p,q) / ABS(A(p,q)) ) + $ A(p,q) = CTEMP + 1949 CONTINUE + 1947 CONTINUE + ELSE + CALL ZLASET( 'U', NR-1, NR-1, CZERO, CZERO, A(1,2), LDA ) + END IF +* +* .. and one-sided Jacobi rotations are started on a lower +* triangular matrix (plus perturbation which is ignored in +* the part which destroys triangular form (confusing?!)) +* + CALL ZGESVJ( 'L', 'N', 'N', NR, NR, A, LDA, SVA, + $ N, V, LDV, CWORK, LWORK, RWORK, LRWORK, INFO ) +* + SCALEM = RWORK(1) + NUMRANK = NINT(RWORK(2)) +* +* + ELSE IF ( ( RSVEC .AND. ( .NOT. LSVEC ) .AND. ( .NOT. JRACC ) ) + $ .OR. + $ ( JRACC .AND. ( .NOT. LSVEC ) .AND. ( NR .NE. N ) ) ) THEN +* +* -> Singular Values and Right Singular Vectors <- +* + IF ( ALMORT ) THEN +* +* .. in this case NR equals N + DO 1998 p = 1, NR + CALL ZCOPY( N-p+1, A(p,p), LDA, V(p,p), 1 ) + CALL ZLACGV( N-p+1, V(p,p), 1 ) + 1998 CONTINUE + CALL ZLASET( 'U', NR-1,NR-1, CZERO, CZERO, V(1,2), LDV ) +* + CALL ZGESVJ( 'L','U','N', N, NR, V, LDV, SVA, NR, A, LDA, + $ CWORK, LWORK, RWORK, LRWORK, INFO ) + SCALEM = RWORK(1) + NUMRANK = NINT(RWORK(2)) + + ELSE +* +* .. two more QR factorizations ( one QRF is not enough, two require +* accumulated product of Jacobi rotations, three are perfect ) +* + CALL ZLASET( 'L', NR-1,NR-1, CZERO, CZERO, A(2,1), LDA ) + CALL ZGELQF( NR,N, A, LDA, CWORK, CWORK(N+1), LWORK-N, IERR) + CALL ZLACPY( 'L', NR, NR, A, LDA, V, LDV ) + CALL ZLASET( 'U', NR-1,NR-1, CZERO, CZERO, V(1,2), LDV ) + CALL ZGEQRF( NR, NR, V, LDV, CWORK(N+1), CWORK(2*N+1), + $ LWORK-2*N, IERR ) + DO 8998 p = 1, NR + CALL ZCOPY( NR-p+1, V(p,p), LDV, V(p,p), 1 ) + CALL ZLACGV( NR-p+1, V(p,p), 1 ) + 8998 CONTINUE + CALL ZLASET('U', NR-1, NR-1, CZERO, CZERO, V(1,2), LDV) +* + CALL ZGESVJ( 'L', 'U','N', NR, NR, V,LDV, SVA, NR, U, + $ LDU, CWORK(N+1), LWORK-N, RWORK, LRWORK, INFO ) + SCALEM = RWORK(1) + NUMRANK = NINT(RWORK(2)) + IF ( NR .LT. N ) THEN + CALL ZLASET( 'A',N-NR, NR, CZERO,CZERO, V(NR+1,1), LDV ) + CALL ZLASET( 'A',NR, N-NR, CZERO,CZERO, V(1,NR+1), LDV ) + CALL ZLASET( 'A',N-NR,N-NR,CZERO,CONE, V(NR+1,NR+1),LDV ) + END IF +* + CALL ZUNMLQ( 'L', 'C', N, N, NR, A, LDA, CWORK, + $ V, LDV, CWORK(N+1), LWORK-N, IERR ) +* + END IF +* .. permute the rows of V +* DO 8991 p = 1, N +* CALL ZCOPY( N, V(p,1), LDV, A(IWORK(p),1), LDA ) +* 8991 CONTINUE +* CALL ZLACPY( 'All', N, N, A, LDA, V, LDV ) + CALL ZLAPMR( .FALSE., N, N, V, LDV, IWORK ) +* + IF ( TRANSP ) THEN + CALL ZLACPY( 'A', N, N, V, LDV, U, LDU ) + END IF +* + ELSE IF ( JRACC .AND. (.NOT. LSVEC) .AND. ( NR.EQ. N ) ) THEN +* + CALL ZLASET( 'L', N-1,N-1, CZERO, CZERO, A(2,1), LDA ) +* + CALL ZGESVJ( 'U','N','V', N, N, A, LDA, SVA, N, V, LDV, + $ CWORK, LWORK, RWORK, LRWORK, INFO ) + SCALEM = RWORK(1) + NUMRANK = NINT(RWORK(2)) + CALL ZLAPMR( .FALSE., N, N, V, LDV, IWORK ) +* + ELSE IF ( LSVEC .AND. ( .NOT. RSVEC ) ) THEN +* +* .. Singular Values and Left Singular Vectors .. +* +* .. second preconditioning step to avoid need to accumulate +* Jacobi rotations in the Jacobi iterations. + DO 1965 p = 1, NR + CALL ZCOPY( N-p+1, A(p,p), LDA, U(p,p), 1 ) + CALL ZLACGV( N-p+1, U(p,p), 1 ) + 1965 CONTINUE + CALL ZLASET( 'U', NR-1, NR-1, CZERO, CZERO, U(1,2), LDU ) +* + CALL ZGEQRF( N, NR, U, LDU, CWORK(N+1), CWORK(2*N+1), + $ LWORK-2*N, IERR ) +* + DO 1967 p = 1, NR - 1 + CALL ZCOPY( NR-p, U(p,p+1), LDU, U(p+1,p), 1 ) + CALL ZLACGV( N-p+1, U(p,p), 1 ) + 1967 CONTINUE + CALL ZLASET( 'U', NR-1, NR-1, CZERO, CZERO, U(1,2), LDU ) +* + CALL ZGESVJ( 'L', 'U', 'N', NR,NR, U, LDU, SVA, NR, A, + $ LDA, CWORK(N+1), LWORK-N, RWORK, LRWORK, INFO ) + SCALEM = RWORK(1) + NUMRANK = NINT(RWORK(2)) +* + IF ( NR .LT. M ) THEN + CALL ZLASET( 'A', M-NR, NR,CZERO, CZERO, U(NR+1,1), LDU ) + IF ( NR .LT. N1 ) THEN + CALL ZLASET( 'A',NR, N1-NR, CZERO, CZERO, U(1,NR+1),LDU ) + CALL ZLASET( 'A',M-NR,N1-NR,CZERO,CONE,U(NR+1,NR+1),LDU ) + END IF + END IF +* + CALL ZUNMQR( 'L', 'N', M, N1, N, A, LDA, CWORK, U, + $ LDU, CWORK(N+1), LWORK-N, IERR ) +* + IF ( ROWPIV ) + $ CALL ZLASWP( N1, U, LDU, 1, M-1, IWORK(IWOFF+1), -1 ) +* + DO 1974 p = 1, N1 + XSC = ONE / DZNRM2( M, U(1,p), 1 ) + CALL ZDSCAL( M, XSC, U(1,p), 1 ) + 1974 CONTINUE +* + IF ( TRANSP ) THEN + CALL ZLACPY( 'A', N, N, U, LDU, V, LDV ) + END IF +* + ELSE +* +* .. Full SVD .. +* + IF ( .NOT. JRACC ) THEN +* + IF ( .NOT. ALMORT ) THEN +* +* Second Preconditioning Step (QRF [with pivoting]) +* Note that the composition of TRANSPOSE, QRF and TRANSPOSE is +* equivalent to an LQF CALL. Since in many libraries the QRF +* seems to be better optimized than the LQF, we do explicit +* transpose and use the QRF. This is subject to changes in an +* optimized implementation of ZGEJSV. +* + DO 1968 p = 1, NR + CALL ZCOPY( N-p+1, A(p,p), LDA, V(p,p), 1 ) + CALL ZLACGV( N-p+1, V(p,p), 1 ) + 1968 CONTINUE +* +* .. the following two loops perturb small entries to avoid +* denormals in the second QR factorization, where they are +* as good as zeros. This is done to avoid painfully slow +* computation with denormals. The relative size of the perturbation +* is a parameter that can be changed by the implementer. +* This perturbation device will be obsolete on machines with +* properly implemented arithmetic. +* To switch it off, set L2PERT=.FALSE. To remove it from the +* code, remove the action under L2PERT=.TRUE., leave the ELSE part. +* The following two loops should be blocked and fused with the +* transposed copy above. +* + IF ( L2PERT ) THEN + XSC = SQRT(SMALL) + DO 2969 q = 1, NR + CTEMP = DCMPLX(XSC*ABS( V(q,q) ),ZERO) + DO 2968 p = 1, N + IF ( ( p .GT. q ) .AND. ( ABS(V(p,q)) .LE. TEMP1 ) + $ .OR. ( p .LT. q ) ) +* $ V(p,q) = TEMP1 * ( V(p,q) / ABS(V(p,q)) ) + $ V(p,q) = CTEMP + IF ( p .LT. q ) V(p,q) = - V(p,q) + 2968 CONTINUE + 2969 CONTINUE + ELSE + CALL ZLASET( 'U', NR-1, NR-1, CZERO, CZERO, V(1,2), LDV ) + END IF +* +* Estimate the row scaled condition number of R1 +* (If R1 is rectangular, N > NR, then the condition number +* of the leading NR x NR submatrix is estimated.) +* + CALL ZLACPY( 'L', NR, NR, V, LDV, CWORK(2*N+1), NR ) + DO 3950 p = 1, NR + TEMP1 = DZNRM2(NR-p+1,CWORK(2*N+(p-1)*NR+p),1) + CALL ZDSCAL(NR-p+1,ONE/TEMP1,CWORK(2*N+(p-1)*NR+p),1) + 3950 CONTINUE + CALL ZPOCON('L',NR,CWORK(2*N+1),NR,ONE,TEMP1, + $ CWORK(2*N+NR*NR+1),RWORK,IERR) + CONDR1 = ONE / SQRT(TEMP1) +* .. here need a second oppinion on the condition number +* .. then assume worst case scenario +* R1 is OK for inverse <=> CONDR1 .LT. DBLE(N) +* more conservative <=> CONDR1 .LT. SQRT(DBLE(N)) +* + COND_OK = SQRT(SQRT(DBLE(NR))) +*[TP] COND_OK is a tuning parameter. +* + IF ( CONDR1 .LT. COND_OK ) THEN +* .. the second QRF without pivoting. Note: in an optimized +* implementation, this QRF should be implemented as the QRF +* of a lower triangular matrix. +* R1^* = Q2 * R2 + CALL ZGEQRF( N, NR, V, LDV, CWORK(N+1), CWORK(2*N+1), + $ LWORK-2*N, IERR ) +* + IF ( L2PERT ) THEN + XSC = SQRT(SMALL)/EPSLN + DO 3959 p = 2, NR + DO 3958 q = 1, p - 1 + CTEMP=DCMPLX(XSC*MIN(ABS(V(p,p)),ABS(V(q,q))), + $ ZERO) + IF ( ABS(V(q,p)) .LE. TEMP1 ) +* $ V(q,p) = TEMP1 * ( V(q,p) / ABS(V(q,p)) ) + $ V(q,p) = CTEMP + 3958 CONTINUE + 3959 CONTINUE + END IF +* + IF ( NR .NE. N ) + $ CALL ZLACPY( 'A', N, NR, V, LDV, CWORK(2*N+1), N ) +* .. save ... +* +* .. this transposed copy should be better than naive + DO 1969 p = 1, NR - 1 + CALL ZCOPY( NR-p, V(p,p+1), LDV, V(p+1,p), 1 ) + CALL ZLACGV(NR-p+1, V(p,p), 1 ) + 1969 CONTINUE + V(NR,NR)=CONJG(V(NR,NR)) +* + CONDR2 = CONDR1 +* + ELSE +* +* .. ill-conditioned case: second QRF with pivoting +* Note that windowed pivoting would be equaly good +* numerically, and more run-time efficient. So, in +* an optimal implementation, the next call to ZGEQP3 +* should be replaced with eg. CALL ZGEQPX (ACM TOMS #782) +* with properly (carefully) chosen parameters. +* +* R1^* * P2 = Q2 * R2 + DO 3003 p = 1, NR + IWORK(N+p) = 0 + 3003 CONTINUE + CALL ZGEQP3( N, NR, V, LDV, IWORK(N+1), CWORK(N+1), + $ CWORK(2*N+1), LWORK-2*N, RWORK, IERR ) +** CALL ZGEQRF( N, NR, V, LDV, CWORK(N+1), CWORK(2*N+1), +** $ LWORK-2*N, IERR ) + IF ( L2PERT ) THEN + XSC = SQRT(SMALL) + DO 3969 p = 2, NR + DO 3968 q = 1, p - 1 + CTEMP=DCMPLX(XSC*MIN(ABS(V(p,p)),ABS(V(q,q))), + $ ZERO) + IF ( ABS(V(q,p)) .LE. TEMP1 ) +* $ V(q,p) = TEMP1 * ( V(q,p) / ABS(V(q,p)) ) + $ V(q,p) = CTEMP + 3968 CONTINUE + 3969 CONTINUE + END IF +* + CALL ZLACPY( 'A', N, NR, V, LDV, CWORK(2*N+1), N ) +* + IF ( L2PERT ) THEN + XSC = SQRT(SMALL) + DO 8970 p = 2, NR + DO 8971 q = 1, p - 1 + CTEMP=DCMPLX(XSC*MIN(ABS(V(p,p)),ABS(V(q,q))), + $ ZERO) +* V(p,q) = - TEMP1*( V(q,p) / ABS(V(q,p)) ) + V(p,q) = - CTEMP + 8971 CONTINUE + 8970 CONTINUE + ELSE + CALL ZLASET( 'L',NR-1,NR-1,CZERO,CZERO,V(2,1),LDV ) + END IF +* Now, compute R2 = L3 * Q3, the LQ factorization. + CALL ZGELQF( NR, NR, V, LDV, CWORK(2*N+N*NR+1), + $ CWORK(2*N+N*NR+NR+1), LWORK-2*N-N*NR-NR, IERR ) +* .. and estimate the condition number + CALL ZLACPY( 'L',NR,NR,V,LDV,CWORK(2*N+N*NR+NR+1),NR ) + DO 4950 p = 1, NR + TEMP1 = DZNRM2( p, CWORK(2*N+N*NR+NR+p), NR ) + CALL ZDSCAL( p, ONE/TEMP1, CWORK(2*N+N*NR+NR+p), NR ) + 4950 CONTINUE + CALL ZPOCON( 'L',NR,CWORK(2*N+N*NR+NR+1),NR,ONE,TEMP1, + $ CWORK(2*N+N*NR+NR+NR*NR+1),RWORK,IERR ) + CONDR2 = ONE / SQRT(TEMP1) +* +* + IF ( CONDR2 .GE. COND_OK ) THEN +* .. save the Householder vectors used for Q3 +* (this overwrittes the copy of R2, as it will not be +* needed in this branch, but it does not overwritte the +* Huseholder vectors of Q2.). + CALL ZLACPY( 'U', NR, NR, V, LDV, CWORK(2*N+1), N ) +* .. and the rest of the information on Q3 is in +* WORK(2*N+N*NR+1:2*N+N*NR+N) + END IF +* + END IF +* + IF ( L2PERT ) THEN + XSC = SQRT(SMALL) + DO 4968 q = 2, NR + CTEMP = XSC * V(q,q) + DO 4969 p = 1, q - 1 +* V(p,q) = - TEMP1*( V(p,q) / ABS(V(p,q)) ) + V(p,q) = - CTEMP + 4969 CONTINUE + 4968 CONTINUE + ELSE + CALL ZLASET( 'U', NR-1,NR-1, CZERO,CZERO, V(1,2), LDV ) + END IF +* +* Second preconditioning finished; continue with Jacobi SVD +* The input matrix is lower trinagular. +* +* Recover the right singular vectors as solution of a well +* conditioned triangular matrix equation. +* + IF ( CONDR1 .LT. COND_OK ) THEN +* + CALL ZGESVJ( 'L','U','N',NR,NR,V,LDV,SVA,NR,U, LDU, + $ CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,RWORK, + $ LRWORK, INFO ) + SCALEM = RWORK(1) + NUMRANK = NINT(RWORK(2)) + DO 3970 p = 1, NR + CALL ZCOPY( NR, V(1,p), 1, U(1,p), 1 ) + CALL ZDSCAL( NR, SVA(p), V(1,p), 1 ) + 3970 CONTINUE + +* .. pick the right matrix equation and solve it +* + IF ( NR .EQ. N ) THEN +* :)) .. best case, R1 is inverted. The solution of this matrix +* equation is Q2*V2 = the product of the Jacobi rotations +* used in ZGESVJ, premultiplied with the orthogonal matrix +* from the second QR factorization. + CALL ZTRSM('L','U','N','N', NR,NR,CONE, A,LDA, V,LDV) + ELSE +* .. R1 is well conditioned, but non-square. Adjoint of R2 +* is inverted to get the product of the Jacobi rotations +* used in ZGESVJ. The Q-factor from the second QR +* factorization is then built in explicitly. + CALL ZTRSM('L','U','C','N',NR,NR,CONE,CWORK(2*N+1), + $ N,V,LDV) + IF ( NR .LT. N ) THEN + CALL ZLASET('A',N-NR,NR,CZERO,CZERO,V(NR+1,1),LDV) + CALL ZLASET('A',NR,N-NR,CZERO,CZERO,V(1,NR+1),LDV) + CALL ZLASET('A',N-NR,N-NR,CZERO,CONE,V(NR+1,NR+1),LDV) + END IF + CALL ZUNMQR('L','N',N,N,NR,CWORK(2*N+1),N,CWORK(N+1), + $ V,LDV,CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR) + END IF +* + ELSE IF ( CONDR2 .LT. COND_OK ) THEN +* +* The matrix R2 is inverted. The solution of the matrix equation +* is Q3^* * V3 = the product of the Jacobi rotations (appplied to +* the lower triangular L3 from the LQ factorization of +* R2=L3*Q3), pre-multiplied with the transposed Q3. + CALL ZGESVJ( 'L', 'U', 'N', NR, NR, V, LDV, SVA, NR, U, + $ LDU, CWORK(2*N+N*NR+NR+1), LWORK-2*N-N*NR-NR, + $ RWORK, LRWORK, INFO ) + SCALEM = RWORK(1) + NUMRANK = NINT(RWORK(2)) + DO 3870 p = 1, NR + CALL ZCOPY( NR, V(1,p), 1, U(1,p), 1 ) + CALL ZDSCAL( NR, SVA(p), U(1,p), 1 ) + 3870 CONTINUE + CALL ZTRSM('L','U','N','N',NR,NR,CONE,CWORK(2*N+1),N, + $ U,LDU) +* .. apply the permutation from the second QR factorization + DO 873 q = 1, NR + DO 872 p = 1, NR + CWORK(2*N+N*NR+NR+IWORK(N+p)) = U(p,q) + 872 CONTINUE + DO 874 p = 1, NR + U(p,q) = CWORK(2*N+N*NR+NR+p) + 874 CONTINUE + 873 CONTINUE + IF ( NR .LT. N ) THEN + CALL ZLASET( 'A',N-NR,NR,CZERO,CZERO,V(NR+1,1),LDV ) + CALL ZLASET( 'A',NR,N-NR,CZERO,CZERO,V(1,NR+1),LDV ) + CALL ZLASET('A',N-NR,N-NR,CZERO,CONE,V(NR+1,NR+1),LDV) + END IF + CALL ZUNMQR( 'L','N',N,N,NR,CWORK(2*N+1),N,CWORK(N+1), + $ V,LDV,CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR ) + ELSE +* Last line of defense. +* #:( This is a rather pathological case: no scaled condition +* improvement after two pivoted QR factorizations. Other +* possibility is that the rank revealing QR factorization +* or the condition estimator has failed, or the COND_OK +* is set very close to ONE (which is unnecessary). Normally, +* this branch should never be executed, but in rare cases of +* failure of the RRQR or condition estimator, the last line of +* defense ensures that ZGEJSV completes the task. +* Compute the full SVD of L3 using ZGESVJ with explicit +* accumulation of Jacobi rotations. + CALL ZGESVJ( 'L', 'U', 'V', NR, NR, V, LDV, SVA, NR, U, + $ LDU, CWORK(2*N+N*NR+NR+1), LWORK-2*N-N*NR-NR, + $ RWORK, LRWORK, INFO ) + SCALEM = RWORK(1) + NUMRANK = NINT(RWORK(2)) + IF ( NR .LT. N ) THEN + CALL ZLASET( 'A',N-NR,NR,CZERO,CZERO,V(NR+1,1),LDV ) + CALL ZLASET( 'A',NR,N-NR,CZERO,CZERO,V(1,NR+1),LDV ) + CALL ZLASET('A',N-NR,N-NR,CZERO,CONE,V(NR+1,NR+1),LDV) + END IF + CALL ZUNMQR( 'L','N',N,N,NR,CWORK(2*N+1),N,CWORK(N+1), + $ V,LDV,CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR ) +* + CALL ZUNMLQ( 'L', 'C', NR, NR, NR, CWORK(2*N+1), N, + $ CWORK(2*N+N*NR+1), U, LDU, CWORK(2*N+N*NR+NR+1), + $ LWORK-2*N-N*NR-NR, IERR ) + DO 773 q = 1, NR + DO 772 p = 1, NR + CWORK(2*N+N*NR+NR+IWORK(N+p)) = U(p,q) + 772 CONTINUE + DO 774 p = 1, NR + U(p,q) = CWORK(2*N+N*NR+NR+p) + 774 CONTINUE + 773 CONTINUE +* + END IF +* +* Permute the rows of V using the (column) permutation from the +* first QRF. Also, scale the columns to make them unit in +* Euclidean norm. This applies to all cases. +* + TEMP1 = SQRT(DBLE(N)) * EPSLN + DO 1972 q = 1, N + DO 972 p = 1, N + CWORK(2*N+N*NR+NR+IWORK(p)) = V(p,q) + 972 CONTINUE + DO 973 p = 1, N + V(p,q) = CWORK(2*N+N*NR+NR+p) + 973 CONTINUE + XSC = ONE / DZNRM2( N, V(1,q), 1 ) + IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) ) + $ CALL ZDSCAL( N, XSC, V(1,q), 1 ) + 1972 CONTINUE +* At this moment, V contains the right singular vectors of A. +* Next, assemble the left singular vector matrix U (M x N). + IF ( NR .LT. M ) THEN + CALL ZLASET('A', M-NR, NR, CZERO, CZERO, U(NR+1,1), LDU) + IF ( NR .LT. N1 ) THEN + CALL ZLASET('A',NR,N1-NR,CZERO,CZERO,U(1,NR+1),LDU) + CALL ZLASET('A',M-NR,N1-NR,CZERO,CONE, + $ U(NR+1,NR+1),LDU) + END IF + END IF +* +* The Q matrix from the first QRF is built into the left singular +* matrix U. This applies to all cases. +* + CALL ZUNMQR( 'L', 'N', M, N1, N, A, LDA, CWORK, U, + $ LDU, CWORK(N+1), LWORK-N, IERR ) + +* The columns of U are normalized. The cost is O(M*N) flops. + TEMP1 = SQRT(DBLE(M)) * EPSLN + DO 1973 p = 1, NR + XSC = ONE / DZNRM2( M, U(1,p), 1 ) + IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) ) + $ CALL ZDSCAL( M, XSC, U(1,p), 1 ) + 1973 CONTINUE +* +* If the initial QRF is computed with row pivoting, the left +* singular vectors must be adjusted. +* + IF ( ROWPIV ) + $ CALL ZLASWP( N1, U, LDU, 1, M-1, IWORK(IWOFF+1), -1 ) +* + ELSE +* +* .. the initial matrix A has almost orthogonal columns and +* the second QRF is not needed +* + CALL ZLACPY( 'U', N, N, A, LDA, CWORK(N+1), N ) + IF ( L2PERT ) THEN + XSC = SQRT(SMALL) + DO 5970 p = 2, N + CTEMP = XSC * CWORK( N + (p-1)*N + p ) + DO 5971 q = 1, p - 1 +* CWORK(N+(q-1)*N+p)=-TEMP1 * ( CWORK(N+(p-1)*N+q) / +* $ ABS(CWORK(N+(p-1)*N+q)) ) + CWORK(N+(q-1)*N+p)=-CTEMP + 5971 CONTINUE + 5970 CONTINUE + ELSE + CALL ZLASET( 'L',N-1,N-1,CZERO,CZERO,CWORK(N+2),N ) + END IF +* + CALL ZGESVJ( 'U', 'U', 'N', N, N, CWORK(N+1), N, SVA, + $ N, U, LDU, CWORK(N+N*N+1), LWORK-N-N*N, RWORK, LRWORK, + $ INFO ) +* + SCALEM = RWORK(1) + NUMRANK = NINT(RWORK(2)) + DO 6970 p = 1, N + CALL ZCOPY( N, CWORK(N+(p-1)*N+1), 1, U(1,p), 1 ) + CALL ZDSCAL( N, SVA(p), CWORK(N+(p-1)*N+1), 1 ) + 6970 CONTINUE +* + CALL ZTRSM( 'L', 'U', 'N', 'N', N, N, + $ CONE, A, LDA, CWORK(N+1), N ) + DO 6972 p = 1, N + CALL ZCOPY( N, CWORK(N+p), N, V(IWORK(p),1), LDV ) + 6972 CONTINUE + TEMP1 = SQRT(DBLE(N))*EPSLN + DO 6971 p = 1, N + XSC = ONE / DZNRM2( N, V(1,p), 1 ) + IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) ) + $ CALL ZDSCAL( N, XSC, V(1,p), 1 ) + 6971 CONTINUE +* +* Assemble the left singular vector matrix U (M x N). +* + IF ( N .LT. M ) THEN + CALL ZLASET( 'A', M-N, N, CZERO, CZERO, U(N+1,1), LDU ) + IF ( N .LT. N1 ) THEN + CALL ZLASET('A',N, N1-N, CZERO, CZERO, U(1,N+1),LDU) + CALL ZLASET( 'A',M-N,N1-N, CZERO, CONE,U(N+1,N+1),LDU) + END IF + END IF + CALL ZUNMQR( 'L', 'N', M, N1, N, A, LDA, CWORK, U, + $ LDU, CWORK(N+1), LWORK-N, IERR ) + TEMP1 = SQRT(DBLE(M))*EPSLN + DO 6973 p = 1, N1 + XSC = ONE / DZNRM2( M, U(1,p), 1 ) + IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) ) + $ CALL ZDSCAL( M, XSC, U(1,p), 1 ) + 6973 CONTINUE +* + IF ( ROWPIV ) + $ CALL ZLASWP( N1, U, LDU, 1, M-1, IWORK(IWOFF+1), -1 ) +* + END IF +* +* end of the >> almost orthogonal case << in the full SVD +* + ELSE +* +* This branch deploys a preconditioned Jacobi SVD with explicitly +* accumulated rotations. It is included as optional, mainly for +* experimental purposes. It does perfom well, and can also be used. +* In this implementation, this branch will be automatically activated +* if the condition number sigma_max(A) / sigma_min(A) is predicted +* to be greater than the overflow threshold. This is because the +* a posteriori computation of the singular vectors assumes robust +* implementation of BLAS and some LAPACK procedures, capable of working +* in presence of extreme values, e.g. when the singular values spread from +* the underflow to the overflow threshold. +* + DO 7968 p = 1, NR + CALL ZCOPY( N-p+1, A(p,p), LDA, V(p,p), 1 ) + CALL ZLACGV( N-p+1, V(p,p), 1 ) + 7968 CONTINUE +* + IF ( L2PERT ) THEN + XSC = SQRT(SMALL/EPSLN) + DO 5969 q = 1, NR + CTEMP = DCMPLX(XSC*ABS( V(q,q) ),ZERO) + DO 5968 p = 1, N + IF ( ( p .GT. q ) .AND. ( ABS(V(p,q)) .LE. TEMP1 ) + $ .OR. ( p .LT. q ) ) +* $ V(p,q) = TEMP1 * ( V(p,q) / ABS(V(p,q)) ) + $ V(p,q) = CTEMP + IF ( p .LT. q ) V(p,q) = - V(p,q) + 5968 CONTINUE + 5969 CONTINUE + ELSE + CALL ZLASET( 'U', NR-1, NR-1, CZERO, CZERO, V(1,2), LDV ) + END IF + + CALL ZGEQRF( N, NR, V, LDV, CWORK(N+1), CWORK(2*N+1), + $ LWORK-2*N, IERR ) + CALL ZLACPY( 'L', N, NR, V, LDV, CWORK(2*N+1), N ) +* + DO 7969 p = 1, NR + CALL ZCOPY( NR-p+1, V(p,p), LDV, U(p,p), 1 ) + CALL ZLACGV( NR-p+1, U(p,p), 1 ) + 7969 CONTINUE + + IF ( L2PERT ) THEN + XSC = SQRT(SMALL/EPSLN) + DO 9970 q = 2, NR + DO 9971 p = 1, q - 1 + CTEMP = DCMPLX(XSC * MIN(ABS(U(p,p)),ABS(U(q,q))), + $ ZERO) +* U(p,q) = - TEMP1 * ( U(q,p) / ABS(U(q,p)) ) + U(p,q) = - CTEMP + 9971 CONTINUE + 9970 CONTINUE + ELSE + CALL ZLASET('U', NR-1, NR-1, CZERO, CZERO, U(1,2), LDU ) + END IF + + CALL ZGESVJ( 'L', 'U', 'V', NR, NR, U, LDU, SVA, + $ N, V, LDV, CWORK(2*N+N*NR+1), LWORK-2*N-N*NR, + $ RWORK, LRWORK, INFO ) + SCALEM = RWORK(1) + NUMRANK = NINT(RWORK(2)) + + IF ( NR .LT. N ) THEN + CALL ZLASET( 'A',N-NR,NR,CZERO,CZERO,V(NR+1,1),LDV ) + CALL ZLASET( 'A',NR,N-NR,CZERO,CZERO,V(1,NR+1),LDV ) + CALL ZLASET( 'A',N-NR,N-NR,CZERO,CONE,V(NR+1,NR+1),LDV ) + END IF + + CALL ZUNMQR( 'L','N',N,N,NR,CWORK(2*N+1),N,CWORK(N+1), + $ V,LDV,CWORK(2*N+N*NR+NR+1),LWORK-2*N-N*NR-NR,IERR ) +* +* Permute the rows of V using the (column) permutation from the +* first QRF. Also, scale the columns to make them unit in +* Euclidean norm. This applies to all cases. +* + TEMP1 = SQRT(DBLE(N)) * EPSLN + DO 7972 q = 1, N + DO 8972 p = 1, N + CWORK(2*N+N*NR+NR+IWORK(p)) = V(p,q) + 8972 CONTINUE + DO 8973 p = 1, N + V(p,q) = CWORK(2*N+N*NR+NR+p) + 8973 CONTINUE + XSC = ONE / DZNRM2( N, V(1,q), 1 ) + IF ( (XSC .LT. (ONE-TEMP1)) .OR. (XSC .GT. (ONE+TEMP1)) ) + $ CALL ZDSCAL( N, XSC, V(1,q), 1 ) + 7972 CONTINUE +* +* At this moment, V contains the right singular vectors of A. +* Next, assemble the left singular vector matrix U (M x N). +* + IF ( NR .LT. M ) THEN + CALL ZLASET( 'A', M-NR, NR, CZERO, CZERO, U(NR+1,1), LDU ) + IF ( NR .LT. N1 ) THEN + CALL ZLASET('A',NR, N1-NR, CZERO, CZERO, U(1,NR+1),LDU) + CALL ZLASET('A',M-NR,N1-NR, CZERO, CONE,U(NR+1,NR+1),LDU) + END IF + END IF +* + CALL ZUNMQR( 'L', 'N', M, N1, N, A, LDA, CWORK, U, + $ LDU, CWORK(N+1), LWORK-N, IERR ) +* + IF ( ROWPIV ) + $ CALL ZLASWP( N1, U, LDU, 1, M-1, IWORK(IWOFF+1), -1 ) +* +* + END IF + IF ( TRANSP ) THEN +* .. swap U and V because the procedure worked on A^* + DO 6974 p = 1, N + CALL ZSWAP( N, U(1,p), 1, V(1,p), 1 ) + 6974 CONTINUE + END IF +* + END IF +* end of the full SVD +* +* Undo scaling, if necessary (and possible) +* + IF ( USCAL2 .LE. (BIG/SVA(1))*USCAL1 ) THEN + CALL DLASCL( 'G', 0, 0, USCAL1, USCAL2, NR, 1, SVA, N, IERR ) + USCAL1 = ONE + USCAL2 = ONE + END IF +* + IF ( NR .LT. N ) THEN + DO 3004 p = NR+1, N + SVA(p) = ZERO + 3004 CONTINUE + END IF +* + RWORK(1) = USCAL2 * SCALEM + RWORK(2) = USCAL1 + IF ( ERREST ) RWORK(3) = SCONDA + IF ( LSVEC .AND. RSVEC ) THEN + RWORK(4) = CONDR1 + RWORK(5) = CONDR2 + END IF + IF ( L2TRAN ) THEN + RWORK(6) = ENTRA + RWORK(7) = ENTRAT + END IF +* + IWORK(1) = NR + IWORK(2) = NUMRANK + IWORK(3) = WARNING + IF ( TRANSP ) THEN + IWORK(4) = 1 + ELSE + IWORK(4) = -1 + END IF + +* + RETURN +* .. +* .. END OF ZGEJSV +* .. + END +* diff -Nru lapack-3.7.0/SRC/zgelqt3.f lapack-3.7.1/SRC/zgelqt3.f --- lapack-3.7.0/SRC/zgelqt3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zgelqt3.f 2017-06-17 22:46:53.000000000 +0000 @@ -100,7 +100,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleGEcomputational * @@ -109,8 +109,8 @@ *> *> \verbatim *> -*> The matrix V stores the elementary reflectors H(i) in the i-th column -*> below the diagonal. For example, if M=5 and N=3, the matrix V is +*> The matrix V stores the elementary reflectors H(i) in the i-th row +*> above the diagonal. For example, if M=5 and N=3, the matrix V is *> *> V = ( 1 v1 v1 v1 v1 ) *> ( 1 v2 v2 v2 ) @@ -131,10 +131,10 @@ * ===================================================================== RECURSIVE SUBROUTINE ZGELQT3( M, N, A, LDA, T, LDT, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, M, N, LDT diff -Nru lapack-3.7.0/SRC/zgelqt.f lapack-3.7.1/SRC/zgelqt.f --- lapack-3.7.0/SRC/zgelqt.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zgelqt.f 2017-06-17 22:46:53.000000000 +0000 @@ -108,7 +108,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleGEcomputational * @@ -117,8 +117,8 @@ *> *> \verbatim *> -*> The matrix V stores the elementary reflectors H(i) in the i-th column -*> below the diagonal. For example, if M=5 and N=3, the matrix V is +*> The matrix V stores the elementary reflectors H(i) in the i-th row +*> above the diagonal. For example, if M=5 and N=3, the matrix V is *> *> V = ( 1 v1 v1 v1 v1 ) *> ( 1 v2 v2 v2 ) @@ -127,11 +127,11 @@ *> *> where the vi's represent the vectors which define H(i), which are returned *> in the matrix A. The 1's along the diagonal of V are not stored in A. -*> Let K=MIN(M,N). The number of blocks is B = ceiling(K/NB), where each -*> block is of order NB except for the last block, which is of order -*> IB = K - (B-1)*NB. For each of the B blocks, a upper triangular block -*> reflector factor is computed: T1, T2, ..., TB. The NB-by-NB (and IB-by-IB -*> for the last block) T's are stored in the NB-by-N matrix T as +*> Let K=MIN(M,N). The number of blocks is B = ceiling(K/MB), where each +*> block is of order MB except for the last block, which is of order +*> IB = K - (B-1)*MB. For each of the B blocks, a upper triangular block +*> reflector factor is computed: T1, T2, ..., TB. The MB-by-MB (and IB-by-IB +*> for the last block) T's are stored in the MB-by-K matrix T as *> *> T = (T1 T2 ... TB). *> \endverbatim @@ -139,10 +139,10 @@ * ===================================================================== SUBROUTINE ZGELQT( M, N, MB, A, LDA, T, LDT, WORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDT, M, N, MB diff -Nru lapack-3.7.0/SRC/zgelsd.f lapack-3.7.1/SRC/zgelsd.f --- lapack-3.7.0/SRC/zgelsd.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zgelsd.f 2017-06-17 22:46:53.000000000 +0000 @@ -90,7 +90,7 @@ *> of the matrices B and X. NRHS >= 0. *> \endverbatim *> -*> \param[in] A +*> \param[in,out] A *> \verbatim *> A is COMPLEX*16 array, dimension (LDA,N) *> On entry, the M-by-N matrix A. @@ -210,7 +210,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16GEsolve * @@ -225,10 +225,10 @@ SUBROUTINE ZGELSD( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK, $ WORK, LWORK, RWORK, IWORK, INFO ) * -* -- LAPACK driver routine (version 3.7.0) -- +* -- LAPACK driver routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS, RANK diff -Nru lapack-3.7.0/SRC/zgemlqt.f lapack-3.7.1/SRC/zgemlqt.f --- lapack-3.7.0/SRC/zgemlqt.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zgemlqt.f 2017-06-17 22:46:53.000000000 +0000 @@ -6,7 +6,7 @@ * http://www.netlib.org/lapack/explore-html/ * *> \htmlonly -*> Download DGEMQRT + dependencies +*> Download DGEMLQT + dependencies *> *> [TGZ] *> @@ -35,16 +35,16 @@ *> *> \verbatim *> -*> ZGEMQRT overwrites the general real M-by-N matrix C with +*> ZGEMLQT overwrites the general real M-by-N matrix C with *> *> SIDE = 'L' SIDE = 'R' *> TRANS = 'N': Q C C Q -*> TRANS = 'C': Q**C C C Q**C +*> TRANS = 'C': Q**H C C Q**H *> *> where Q is a complex orthogonal matrix defined as the product of K *> elementary reflectors: *> -*> Q = H(1) H(2) . . . H(K) = I - V C V**C +*> Q = H(1) H(2) . . . H(K) = I - V T V**H *> *> generated using the compact WY representation as returned by ZGELQT. *> @@ -57,15 +57,15 @@ *> \param[in] SIDE *> \verbatim *> SIDE is CHARACTER*1 -*> = 'L': apply Q or Q**C from the Left; -*> = 'R': apply Q or Q**C from the Right. +*> = 'L': apply Q or Q**H from the Left; +*> = 'R': apply Q or Q**H from the Right. *> \endverbatim *> *> \param[in] TRANS *> \verbatim *> TRANS is CHARACTER*1 *> = 'N': No transpose, apply Q; -*> = 'C': Transpose, apply Q**C. +*> = 'C': Transpose, apply Q**H. *> \endverbatim *> *> \param[in] M @@ -99,7 +99,9 @@ *> *> \param[in] V *> \verbatim -*> V is COMPLEX*16 array, dimension (LDV,K) +*> V is COMPLEX*16 array, dimension +*> (LDV,M) if SIDE = 'L', +*> (LDV,N) if SIDE = 'R' *> The i-th row must contain the vector which defines the *> elementary reflector H(i), for i = 1,2,...,k, as returned by *> DGELQT in the first K rows of its array argument A. @@ -108,16 +110,14 @@ *> \param[in] LDV *> \verbatim *> LDV is INTEGER -*> The leading dimension of the array V. -*> If SIDE = 'L', LDA >= max(1,M); -*> if SIDE = 'R', LDA >= max(1,N). +*> The leading dimension of the array V. LDV >= max(1,K). *> \endverbatim *> *> \param[in] T *> \verbatim *> T is COMPLEX*16 array, dimension (LDT,K) *> The upper triangular factors of the block reflectors -*> as returned by DGELQT, stored as a MB-by-M matrix. +*> as returned by DGELQT, stored as a MB-by-K matrix. *> \endverbatim *> *> \param[in] LDT @@ -130,7 +130,7 @@ *> \verbatim *> C is COMPLEX*16 array, dimension (LDC,N) *> On entry, the M-by-N matrix C. -*> On exit, C is overwritten by Q C, Q**C C, C Q**C or C Q. +*> On exit, C is overwritten by Q C, Q**H C, C Q**H or C Q. *> \endverbatim *> *> \param[in] LDC @@ -160,7 +160,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleGEcomputational * @@ -168,10 +168,10 @@ SUBROUTINE ZGEMLQT( SIDE, TRANS, M, N, K, MB, V, LDV, T, LDT, $ C, LDC, WORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER SIDE, TRANS diff -Nru lapack-3.7.0/SRC/zgeqrt.f lapack-3.7.1/SRC/zgeqrt.f --- lapack-3.7.0/SRC/zgeqrt.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zgeqrt.f 2017-06-17 22:46:53.000000000 +0000 @@ -108,7 +108,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16GEcomputational * @@ -133,7 +133,7 @@ *> block is of order NB except for the last block, which is of order *> IB = K - (B-1)*NB. For each of the B blocks, a upper triangular block *> reflector factor is computed: T1, T2, ..., TB. The NB-by-NB (and IB-by-IB -*> for the last block) T's are stored in the NB-by-N matrix T as +*> for the last block) T's are stored in the NB-by-K matrix T as *> *> T = (T1 T2 ... TB). *> \endverbatim @@ -141,10 +141,10 @@ * ===================================================================== SUBROUTINE ZGEQRT( M, N, NB, A, LDA, T, LDT, WORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDT, M, N, NB diff -Nru lapack-3.7.0/SRC/zgesv.f lapack-3.7.1/SRC/zgesv.f --- lapack-3.7.0/SRC/zgesv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zgesv.f 2017-06-17 22:46:53.000000000 +0000 @@ -1,4 +1,4 @@ -*> \brief ZGESV computes the solution to system of linear equations A * X = B for GE matrices (simple driver) +*> \brief ZGESV computes the solution to system of linear equations A * X = B for GE matrices (simple driver) * * =========== DOCUMENTATION =========== * @@ -115,17 +115,17 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16GEsolve * * ===================================================================== SUBROUTINE ZGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO ) * -* -- LAPACK driver routine (version 3.7.0) -- +* -- LAPACK driver routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDB, N, NRHS diff -Nru lapack-3.7.0/SRC/zgesvj.f lapack-3.7.1/SRC/zgesvj.f --- lapack-3.7.0/SRC/zgesvj.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zgesvj.f 2017-06-17 22:46:53.000000000 +0000 @@ -52,7 +52,7 @@ * *> \param[in] JOBA *> \verbatim -*> JOBA is CHARACTER* 1 +*> JOBA is CHARACTER*1 *> Specifies the structure of A. *> = 'L': The input matrix A is lower triangular; *> = 'U': The input matrix A is upper triangular; @@ -206,7 +206,7 @@ *> *> \param[in,out] CWORK *> \verbatim -*> CWORK is COMPLEX*16 array, dimension max(1,LWORK). +*> CWORK is COMPLEX*16 array, dimension (max(1,LWORK)) *> Used as workspace. *> If on entry LWORK .EQ. -1, then a workspace query is assumed and *> no computation is done; CWORK(1) is set to the minial (and optimal) @@ -221,7 +221,7 @@ *> *> \param[in,out] RWORK *> \verbatim -*> RWORK is DOUBLE PRECISION array, dimension max(6,LRWORK). +*> RWORK is DOUBLE PRECISION array, dimension (max(6,LRWORK)) *> On entry, *> If JOBU .EQ. 'C' : *> RWORK(1) = CTOL, where CTOL defines the threshold for convergence. @@ -318,6 +318,8 @@ *> \par References: * ================ *> +*> \verbatim +*> *> [1] P. P. M. De Rijk: A one-sided Jacobi algorithm for computing the *> singular value decomposition on a vector computer. *> SIAM J. Sci. Stat. Comp., Vol. 10 (1998), pp. 359-371. @@ -349,7 +351,7 @@ SUBROUTINE ZGESVJ( JOBA, JOBU, JOBV, M, N, A, LDA, SVA, MV, V, $ LDV, CWORK, LWORK, RWORK, LRWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 diff -Nru lapack-3.7.0/SRC/zgetsls.f lapack-3.7.1/SRC/zgetsls.f --- lapack-3.7.0/SRC/zgetsls.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zgetsls.f 2017-06-17 22:46:53.000000000 +0000 @@ -53,7 +53,7 @@ *> \verbatim *> TRANS is CHARACTER*1 *> = 'N': the linear system involves A; -*> = 'C': the linear system involves A**C. +*> = 'C': the linear system involves A**H. *> \endverbatim *> *> \param[in] M @@ -152,7 +152,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16GEsolve * @@ -160,10 +160,10 @@ SUBROUTINE ZGETSLS( TRANS, M, N, NRHS, A, LDA, B, LDB, $ WORK, LWORK, INFO ) * -* -- LAPACK driver routine (version 3.7.0) -- +* -- LAPACK driver routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER TRANS @@ -187,8 +187,8 @@ INTEGER I, IASCL, IBSCL, J, MINMN, MAXMN, BROW, $ SCLLEN, MNK, TSZO, TSZM, LWO, LWM, LW1, LW2, $ WSIZEO, WSIZEM, INFO2 - DOUBLE PRECISION ANRM, BIGNUM, BNRM, SMLNUM - COMPLEX*16 TQ( 5 ), WORKQ + DOUBLE PRECISION ANRM, BIGNUM, BNRM, SMLNUM, DUM( 1 ) + COMPLEX*16 TQ( 5 ), WORKQ( 1 ) * .. * .. External Functions .. LOGICAL LSAME @@ -236,31 +236,31 @@ IF( M.GE.N ) THEN CALL ZGEQR( M, N, A, LDA, TQ, -1, WORKQ, -1, INFO2 ) TSZO = INT( TQ( 1 ) ) - LWO = INT( WORKQ ) + LWO = INT( WORKQ( 1 ) ) CALL ZGEMQR( 'L', TRANS, M, NRHS, N, A, LDA, TQ, $ TSZO, B, LDB, WORKQ, -1, INFO2 ) - LWO = MAX( LWO, INT( WORKQ ) ) + LWO = MAX( LWO, INT( WORKQ( 1 ) ) ) CALL ZGEQR( M, N, A, LDA, TQ, -2, WORKQ, -2, INFO2 ) TSZM = INT( TQ( 1 ) ) - LWM = INT( WORKQ ) + LWM = INT( WORKQ( 1 ) ) CALL ZGEMQR( 'L', TRANS, M, NRHS, N, A, LDA, TQ, $ TSZM, B, LDB, WORKQ, -1, INFO2 ) - LWM = MAX( LWM, INT( WORKQ ) ) + LWM = MAX( LWM, INT( WORKQ( 1 ) ) ) WSIZEO = TSZO + LWO WSIZEM = TSZM + LWM ELSE CALL ZGELQ( M, N, A, LDA, TQ, -1, WORKQ, -1, INFO2 ) TSZO = INT( TQ( 1 ) ) - LWO = INT( WORKQ ) + LWO = INT( WORKQ( 1 ) ) CALL ZGEMLQ( 'L', TRANS, N, NRHS, M, A, LDA, TQ, $ TSZO, B, LDB, WORKQ, -1, INFO2 ) - LWO = MAX( LWO, INT( WORKQ ) ) + LWO = MAX( LWO, INT( WORKQ( 1 ) ) ) CALL ZGELQ( M, N, A, LDA, TQ, -2, WORKQ, -2, INFO2 ) TSZM = INT( TQ( 1 ) ) - LWM = INT( WORKQ ) + LWM = INT( WORKQ( 1 ) ) CALL ZGEMLQ( 'L', TRANS, N, NRHS, M, A, LDA, TQ, $ TSZO, B, LDB, WORKQ, -1, INFO2 ) - LWM = MAX( LWM, INT( WORKQ ) ) + LWM = MAX( LWM, INT( WORKQ( 1 ) ) ) WSIZEO = TSZO + LWO WSIZEM = TSZM + LWM END IF @@ -305,7 +305,7 @@ * * Scale A, B if max element outside range [SMLNUM,BIGNUM] * - ANRM = ZLANGE( 'M', M, N, A, LDA, WORK ) + ANRM = ZLANGE( 'M', M, N, A, LDA, DUM ) IASCL = 0 IF( ANRM.GT.ZERO .AND. ANRM.LT.SMLNUM ) THEN * @@ -331,7 +331,7 @@ IF ( TRAN ) THEN BROW = N END IF - BNRM = ZLANGE( 'M', BROW, NRHS, B, LDB, WORK ) + BNRM = ZLANGE( 'M', BROW, NRHS, B, LDB, DUM ) IBSCL = 0 IF( BNRM.GT.ZERO .AND. BNRM.LT.SMLNUM ) THEN * diff -Nru lapack-3.7.0/SRC/zggesx.f lapack-3.7.1/SRC/zggesx.f --- lapack-3.7.0/SRC/zggesx.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zggesx.f 2017-06-17 22:46:53.000000000 +0000 @@ -104,7 +104,7 @@ *> *> \param[in] SELCTG *> \verbatim -*> SELCTG is procedure) LOGICAL FUNCTION of two COMPLEX*16 arguments +*> SELCTG is a LOGICAL FUNCTION of two COMPLEX*16 arguments *> SELCTG must be declared EXTERNAL in the calling subroutine. *> If SORT = 'N', SELCTG is not referenced. *> If SORT = 'S', SELCTG is used to select eigenvalues to sort @@ -320,7 +320,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16GEeigen * @@ -330,10 +330,10 @@ $ LDVSR, RCONDE, RCONDV, WORK, LWORK, RWORK, $ IWORK, LIWORK, BWORK, INFO ) * -* -- LAPACK driver routine (version 3.7.0) -- +* -- LAPACK driver routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER JOBVSL, JOBVSR, SENSE, SORT diff -Nru lapack-3.7.0/SRC/zgsvj0.f lapack-3.7.1/SRC/zgsvj0.f --- lapack-3.7.0/SRC/zgsvj0.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zgsvj0.f 2017-06-17 22:46:53.000000000 +0000 @@ -169,7 +169,7 @@ *> *> \param[out] WORK *> \verbatim -*> WORK is COMPLEX*16 array, dimension LWORK. +*> WORK is COMPLEX*16 array, dimension (LWORK) *> \endverbatim *> *> \param[in] LWORK @@ -218,7 +218,7 @@ SUBROUTINE ZGSVJ0( JOBV, M, N, A, LDA, D, SVA, MV, V, LDV, EPS, $ SFMIN, TOL, NSWEEP, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 diff -Nru lapack-3.7.0/SRC/zhb2st_kernels.f lapack-3.7.1/SRC/zhb2st_kernels.f --- lapack-3.7.0/SRC/zhb2st_kernels.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zhb2st_kernels.f 2017-06-17 22:46:53.000000000 +0000 @@ -47,45 +47,87 @@ * Arguments: * ========== * -*> @param[in] n -*> The order of the matrix A. -*> -*> @param[in] nb -*> The size of the band. -*> -*> @param[in, out] A -*> A pointer to the matrix A. -*> -*> @param[in] lda -*> The leading dimension of the matrix A. +*> \param[in] UPLO +*> \verbatim +*> UPLO is CHARACTER*1 +*> \endverbatim *> -*> @param[out] V -*> COMPLEX*16 array, dimension 2*n if eigenvalues only are -*> requested or to be queried for vectors. +*> \param[in] WANTZ +*> \verbatim +*> WANTZ is LOGICAL which indicate if Eigenvalue are requested or both +*> Eigenvalue/Eigenvectors. +*> \endverbatim *> -*> @param[out] TAU -*> COMPLEX*16 array, dimension (2*n). -*> The scalar factors of the Householder reflectors are stored -*> in this array. +*> \param[in] TTYPE +*> \verbatim +*> TTYPE is INTEGER +*> \endverbatim *> -*> @param[in] st +*> \param[in] ST +*> \verbatim +*> ST is INTEGER *> internal parameter for indices. +*> \endverbatim *> -*> @param[in] ed +*> \param[in] ED +*> \verbatim +*> ED is INTEGER *> internal parameter for indices. +*> \endverbatim *> -*> @param[in] sweep +*> \param[in] SWEEP +*> \verbatim +*> SWEEP is INTEGER *> internal parameter for indices. +*> \endverbatim *> -*> @param[in] Vblksiz -*> internal parameter for indices. +*> \param[in] N +*> \verbatim +*> N is INTEGER. The order of the matrix A. +*> \endverbatim *> -*> @param[in] wantz -*> logical which indicate if Eigenvalue are requested or both -*> Eigenvalue/Eigenvectors. +*> \param[in] NB +*> \verbatim +*> NB is INTEGER. The size of the band. +*> \endverbatim +*> +*> \param[in] IB +*> \verbatim +*> IB is INTEGER. +*> \endverbatim +*> +*> \param[in, out] A +*> \verbatim +*> A is COMPLEX*16 array. A pointer to the matrix A. +*> \endverbatim +*> +*> \param[in] LDA +*> \verbatim +*> LDA is INTEGER. The leading dimension of the matrix A. +*> \endverbatim +*> +*> \param[out] V +*> \verbatim +*> V is COMPLEX*16 array, dimension 2*n if eigenvalues only are +*> requested or to be queried for vectors. +*> \endverbatim +*> +*> \param[out] TAU +*> \verbatim +*> TAU is COMPLEX*16 array, dimension (2*n). +*> The scalar factors of the Householder reflectors are stored +*> in this array. +*> \endverbatim +*> +*> \param[in] LDVT +*> \verbatim +*> LDVT is INTEGER. +*> \endverbatim *> -*> @param[in] work -*> Workspace of size nb. +*> \param[in] WORK +*> \verbatim +*> WORK is COMPLEX*16 array. Workspace of size nb. +*> \endverbatim *> *> \par Further Details: * ===================== @@ -128,10 +170,10 @@ * IMPLICIT NONE * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/SRC/zhbev_2stage.f lapack-3.7.1/SRC/zhbev_2stage.f --- lapack-3.7.0/SRC/zhbev_2stage.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zhbev_2stage.f 2017-06-17 22:46:53.000000000 +0000 @@ -171,7 +171,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16OTHEReigen * @@ -213,10 +213,10 @@ * IMPLICIT NONE * -* -- LAPACK driver routine (version 3.7.0) -- +* -- LAPACK driver routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER JOBZ, UPLO @@ -247,7 +247,7 @@ EXTERNAL LSAME, DLAMCH, ZLANHB, ILAENV * .. * .. External Subroutines .. - EXTERNAL DSCAL, DSTERF, XERBLA, ZLASCL, ZSTEQR + EXTERNAL DSCAL, DSTERF, XERBLA, ZLASCL, ZSTEQR, $ ZHETRD_2STAGE * .. * .. Intrinsic Functions .. diff -Nru lapack-3.7.0/SRC/zhecon_3.f lapack-3.7.1/SRC/zhecon_3.f --- lapack-3.7.0/SRC/zhecon_3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zhecon_3.f 2017-06-17 22:46:53.000000000 +0000 @@ -95,7 +95,7 @@ *> On entry, contains the superdiagonal (or subdiagonal) *> elements of the Hermitian block diagonal matrix D *> with 1-by-1 or 2-by-2 diagonal blocks, where -*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; +*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. *> *> NOTE: For 1-by-1 diagonal block D(k), where @@ -149,7 +149,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16HEcomputational * @@ -157,7 +157,7 @@ * ================== *> \verbatim *> -*> December 2016, Igor Kozachenko, +*> June 2017, Igor Kozachenko, *> Computer Science Division, *> University of California, Berkeley *> @@ -171,10 +171,10 @@ SUBROUTINE ZHECON_3( UPLO, N, A, LDA, E, IPIV, ANORM, RCOND, $ WORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO @@ -189,7 +189,7 @@ * ===================================================================== * * .. Parameters .. - REAL ONE, ZERO + DOUBLE PRECISION ONE, ZERO PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) * .. * .. Local Scalars .. diff -Nru lapack-3.7.0/SRC/zhecon_rook.f lapack-3.7.1/SRC/zhecon_rook.f --- lapack-3.7.0/SRC/zhecon_rook.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zhecon_rook.f 2017-06-17 22:46:53.000000000 +0000 @@ -117,7 +117,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16HEcomputational * @@ -125,7 +125,7 @@ * ================== *> \verbatim *> -*> December 2016, Igor Kozachenko, +*> June 2017, Igor Kozachenko, *> Computer Science Division, *> University of California, Berkeley *> @@ -139,10 +139,10 @@ SUBROUTINE ZHECON_ROOK( UPLO, N, A, LDA, IPIV, ANORM, RCOND, WORK, $ INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO @@ -157,7 +157,7 @@ * ===================================================================== * * .. Parameters .. - REAL ONE, ZERO + DOUBLE PRECISION ONE, ZERO PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) * .. * .. Local Scalars .. diff -Nru lapack-3.7.0/SRC/zhegv_2stage.f lapack-3.7.1/SRC/zhegv_2stage.f --- lapack-3.7.0/SRC/zhegv_2stage.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zhegv_2stage.f 2017-06-17 22:46:53.000000000 +0000 @@ -47,7 +47,7 @@ *> positive definite. *> This routine use the 2stage technique for the reduction to tridiagonal *> which showed higher performance on recent architecture and for large -* sizes N>2000. +*> sizes N>2000. *> \endverbatim * * Arguments: @@ -192,7 +192,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16HEeigen * @@ -234,10 +234,10 @@ * IMPLICIT NONE * -* -- LAPACK driver routine (version 3.7.0) -- +* -- LAPACK driver routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER JOBZ, UPLO diff -Nru lapack-3.7.0/SRC/zhetrd_2stage.f lapack-3.7.1/SRC/zhetrd_2stage.f --- lapack-3.7.0/SRC/zhetrd_2stage.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zhetrd_2stage.f 2017-06-17 22:46:53.000000000 +0000 @@ -144,7 +144,7 @@ *> *> \param[out] WORK *> \verbatim -*> WORK is COMPLEX*16 array, dimension LWORK. +*> WORK is COMPLEX*16 array, dimension (LWORK) *> \endverbatim *> *> \param[in] LWORK @@ -183,7 +183,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16HEcomputational * @@ -227,10 +227,10 @@ * IMPLICIT NONE * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER VECT, UPLO diff -Nru lapack-3.7.0/SRC/zhetrd_he2hb.f lapack-3.7.1/SRC/zhetrd_he2hb.f --- lapack-3.7.0/SRC/zhetrd_he2hb.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zhetrd_he2hb.f 2017-06-17 22:46:53.000000000 +0000 @@ -123,7 +123,7 @@ *> *> \param[out] WORK *> \verbatim -*> WORK is COMPLEX*16 array, dimension LWORK. +*> WORK is COMPLEX*16 array, dimension (LWORK) *> On exit, if INFO = 0, or if LWORK=-1, *> WORK(1) returns the size of LWORK. *> \endverbatim @@ -132,7 +132,7 @@ *> \verbatim *> LWORK is INTEGER *> The dimension of the array WORK which should be calculated -* by a workspace query. LWORK = MAX(1, LWORK_QUERY) +*> by a workspace query. LWORK = MAX(1, LWORK_QUERY) *> If LWORK = -1, then a workspace query is assumed; the routine *> only calculates the optimal size of the WORK array, returns *> this value as the first entry of the WORK array, and no error @@ -158,7 +158,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16HEcomputational * @@ -222,7 +222,7 @@ *> *> where tau is a complex scalar, and v is a complex vector with *> v(kd+1:i) = 0 and v(i+kd+1) = 1; v(i+kd+2:n) is stored on exit in -* A(i+kd+2:n,i), and tau in TAU(i). +*> A(i+kd+2:n,i), and tau in TAU(i). *> *> The contents of A on exit are illustrated by the following examples *> with n = 5: @@ -245,10 +245,10 @@ * IMPLICIT NONE * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/SRC/zhetrf_aa.f lapack-3.7.1/SRC/zhetrf_aa.f --- lapack-3.7.0/SRC/zhetrf_aa.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zhetrf_aa.f 2017-06-17 22:46:53.000000000 +0000 @@ -114,11 +114,7 @@ *> \verbatim *> INFO is INTEGER *> = 0: successful exit -*> < 0: if INFO = -i, the i-th argument had an illegal value -*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization -*> has been completed, but the block diagonal matrix D is -*> exactly singular, and division by zero will occur if it -*> is used to solve a system of equations. +*> < 0: if INFO = -i, the i-th argument had an illegal value. *> \endverbatim * * Authors: @@ -159,7 +155,7 @@ * * .. Local Scalars .. LOGICAL LQUERY, UPPER - INTEGER J, LWKOPT, IINFO + INTEGER J, LWKOPT INTEGER NB, MJ, NJ, K1, K2, J1, J2, J3, JB COMPLEX*16 ALPHA * .. @@ -215,13 +211,10 @@ IPIV( 1 ) = 1 IF ( N.EQ.1 ) THEN A( 1, 1 ) = DBLE( A( 1, 1 ) ) - IF ( A( 1, 1 ).EQ.ZERO ) THEN - INFO = 1 - END IF RETURN END IF * -* Adjubst block size based on the workspace size +* Adjust block size based on the workspace size * IF( LWORK.LT.((1+NB)*N) ) THEN NB = ( LWORK-N ) / N @@ -261,11 +254,7 @@ * CALL ZLAHEF_AA( UPLO, 2-K1, N-J, JB, $ A( MAX(1, J), J+1 ), LDA, - $ IPIV( J+1 ), WORK, N, WORK( N*NB+1 ), - $ IINFO ) - IF( (IINFO.GT.0) .AND. (INFO.EQ.0) ) THEN - INFO = IINFO+J - ENDIF + $ IPIV( J+1 ), WORK, N, WORK( N*NB+1 ) ) * * Ajust IPIV and apply it back (J-th step picks (J+1)-th pivot) * @@ -385,10 +374,7 @@ * CALL ZLAHEF_AA( UPLO, 2-K1, N-J, JB, $ A( J+1, MAX(1, J) ), LDA, - $ IPIV( J+1 ), WORK, N, WORK( N*NB+1 ), IINFO) - IF( (IINFO.GT.0) .AND. (INFO.EQ.0) ) THEN - INFO = IINFO+J - ENDIF + $ IPIV( J+1 ), WORK, N, WORK( N*NB+1 ) ) * * Ajust IPIV and apply it back (J-th step picks (J+1)-th pivot) * diff -Nru lapack-3.7.0/SRC/zhetri2x.f lapack-3.7.1/SRC/zhetri2x.f --- lapack-3.7.0/SRC/zhetri2x.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zhetri2x.f 2017-06-17 22:46:53.000000000 +0000 @@ -113,17 +113,17 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16HEcomputational * * ===================================================================== SUBROUTINE ZHETRI2X( UPLO, N, A, LDA, IPIV, WORK, NB, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO @@ -137,7 +137,7 @@ * ===================================================================== * * .. Parameters .. - REAL ONE + DOUBLE PRECISION ONE COMPLEX*16 CONE, ZERO PARAMETER ( ONE = 1.0D+0, $ CONE = ( 1.0D+0, 0.0D+0 ), diff -Nru lapack-3.7.0/SRC/zhetri_3.f lapack-3.7.1/SRC/zhetri_3.f --- lapack-3.7.0/SRC/zhetri_3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zhetri_3.f 2017-06-17 22:46:53.000000000 +0000 @@ -102,7 +102,7 @@ *> On entry, contains the superdiagonal (or subdiagonal) *> elements of the Hermitian block diagonal matrix D *> with 1-by-1 or 2-by-2 diagonal blocks, where -*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; +*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. *> *> NOTE: For 1-by-1 diagonal block D(k), where @@ -152,7 +152,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16HEcomputational * @@ -160,7 +160,7 @@ * ================== *> \verbatim *> -*> December 2016, Igor Kozachenko, +*> June 2017, Igor Kozachenko, *> Computer Science Division, *> University of California, Berkeley *> @@ -170,10 +170,10 @@ SUBROUTINE ZHETRI_3( UPLO, N, A, LDA, E, IPIV, WORK, LWORK, $ INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/SRC/zhetri_3x.f lapack-3.7.1/SRC/zhetri_3x.f --- lapack-3.7.0/SRC/zhetri_3x.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zhetri_3x.f 2017-06-17 22:46:53.000000000 +0000 @@ -99,7 +99,7 @@ *> On entry, contains the superdiagonal (or subdiagonal) *> elements of the Hermitian block diagonal matrix D *> with 1-by-1 or 2-by-2 diagonal blocks, where -*> If UPLO = 'U': E(i) = D(i-1,i), i=2:N, E(1) not refernced; +*> If UPLO = 'U': E(i) = D(i-1,i), i=2:N, E(1) not referenced; *> If UPLO = 'L': E(i) = D(i+1,i), i=1:N-1, E(N) not referenced. *> *> NOTE: For 1-by-1 diagonal block D(k), where @@ -142,7 +142,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16HEcomputational * @@ -150,7 +150,7 @@ * ================== *> \verbatim *> -*> December 2016, Igor Kozachenko, +*> June 2017, Igor Kozachenko, *> Computer Science Division, *> University of California, Berkeley *> @@ -159,10 +159,10 @@ * ===================================================================== SUBROUTINE ZHETRI_3X( UPLO, N, A, LDA, E, IPIV, WORK, NB, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/SRC/zhetrs_3.f lapack-3.7.1/SRC/zhetrs_3.f --- lapack-3.7.0/SRC/zhetrs_3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zhetrs_3.f 2017-06-17 22:46:53.000000000 +0000 @@ -99,7 +99,7 @@ *> On entry, contains the superdiagonal (or subdiagonal) *> elements of the Hermitian block diagonal matrix D *> with 1-by-1 or 2-by-2 diagonal blocks, where -*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; +*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. *> *> NOTE: For 1-by-1 diagonal block D(k), where @@ -142,7 +142,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16HEcomputational * @@ -151,7 +151,7 @@ *> *> \verbatim *> -*> December 2016, Igor Kozachenko, +*> June 2017, Igor Kozachenko, *> Computer Science Division, *> University of California, Berkeley *> @@ -165,10 +165,10 @@ SUBROUTINE ZHETRS_3( UPLO, N, NRHS, A, LDA, E, IPIV, B, LDB, $ INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/SRC/zhetrs_aa.f lapack-3.7.1/SRC/zhetrs_aa.f --- lapack-3.7.0/SRC/zhetrs_aa.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zhetrs_aa.f 2017-06-17 22:46:53.000000000 +0000 @@ -67,7 +67,7 @@ *> of the matrix B. NRHS >= 0. *> \endverbatim *> -*> \param[in,out] A +*> \param[in] A *> \verbatim *> A is COMPLEX*16 array, dimension (LDA,N) *> Details of factors computed by ZHETRF_AA. @@ -122,7 +122,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16HEcomputational * @@ -130,10 +130,10 @@ SUBROUTINE ZHETRS_AA( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, $ WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * IMPLICIT NONE * diff -Nru lapack-3.7.0/SRC/zhfrk.f lapack-3.7.1/SRC/zhfrk.f --- lapack-3.7.0/SRC/zhfrk.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zhfrk.f 2017-06-17 22:46:53.000000000 +0000 @@ -117,7 +117,7 @@ *> *> \param[in] A *> \verbatim -*> A is COMPLEX*16 array of DIMENSION (LDA,ka) +*> A is COMPLEX*16 array, dimension (LDA,ka) *> where KA *> is K when TRANS = 'N' or 'n', and is N otherwise. Before *> entry with TRANS = 'N' or 'n', the leading N--by--K part of @@ -160,7 +160,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16OTHERcomputational * @@ -168,10 +168,10 @@ SUBROUTINE ZHFRK( TRANSR, UPLO, TRANS, N, K, ALPHA, A, LDA, BETA, $ C ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. DOUBLE PRECISION ALPHA, BETA diff -Nru lapack-3.7.0/SRC/zhpevd.f lapack-3.7.1/SRC/zhpevd.f --- lapack-3.7.0/SRC/zhpevd.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zhpevd.f 2017-06-17 22:46:53.000000000 +0000 @@ -134,8 +134,7 @@ *> *> \param[out] RWORK *> \verbatim -*> RWORK is DOUBLE PRECISION array, -*> dimension (LRWORK) +*> RWORK is DOUBLE PRECISION array, dimension (MAX(1,LRWORK)) *> On exit, if INFO = 0, RWORK(1) returns the required LRWORK. *> \endverbatim *> @@ -193,7 +192,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16OTHEReigen * @@ -201,10 +200,10 @@ SUBROUTINE ZHPEVD( JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, LWORK, $ RWORK, LRWORK, IWORK, LIWORK, INFO ) * -* -- LAPACK driver routine (version 3.7.0) -- +* -- LAPACK driver routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER JOBZ, UPLO diff -Nru lapack-3.7.0/SRC/zlabrd.f lapack-3.7.1/SRC/zlabrd.f --- lapack-3.7.0/SRC/zlabrd.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zlabrd.f 2017-06-17 22:46:53.000000000 +0000 @@ -111,7 +111,7 @@ *> *> \param[out] TAUQ *> \verbatim -*> TAUQ is COMPLEX*16 array dimension (NB) +*> TAUQ is COMPLEX*16 array, dimension (NB) *> The scalar factors of the elementary reflectors which *> represent the unitary matrix Q. See Further Details. *> \endverbatim @@ -157,7 +157,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16OTHERauxiliary * @@ -212,10 +212,10 @@ SUBROUTINE ZLABRD( M, N, NB, A, LDA, D, E, TAUQ, TAUP, X, LDX, Y, $ LDY ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER LDA, LDX, LDY, M, N, NB diff -Nru lapack-3.7.0/SRC/zla_gbamv.f lapack-3.7.1/SRC/zla_gbamv.f --- lapack-3.7.0/SRC/zla_gbamv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zla_gbamv.f 2017-06-17 22:46:53.000000000 +0000 @@ -107,7 +107,7 @@ *> *> \param[in] AB *> \verbatim -*> AB is COMPLEX*16 array of DIMENSION ( LDAB, n ) +*> AB is COMPLEX*16 array, dimension ( LDAB, n ) *> Before entry, the leading m by n part of the array AB must *> contain the matrix of coefficients. *> Unchanged on exit. @@ -178,7 +178,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16GBcomputational * @@ -186,10 +186,10 @@ SUBROUTINE ZLA_GBAMV( TRANS, M, N, KL, KU, ALPHA, AB, LDAB, X, $ INCX, BETA, Y, INCY ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. DOUBLE PRECISION ALPHA, BETA diff -Nru lapack-3.7.0/SRC/zla_gbrfsx_extended.f lapack-3.7.1/SRC/zla_gbrfsx_extended.f --- lapack-3.7.0/SRC/zla_gbrfsx_extended.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zla_gbrfsx_extended.f 2017-06-17 22:46:53.000000000 +0000 @@ -208,8 +208,7 @@ *> *> \param[in,out] ERR_BNDS_NORM *> \verbatim -*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension -*> (NRHS, N_ERR_BNDS) +*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS) *> For each right-hand side, this array contains information about *> various error bounds and condition numbers corresponding to the *> normwise relative error, which is defined as follows: @@ -255,8 +254,7 @@ *> *> \param[in,out] ERR_BNDS_COMP *> \verbatim -*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension -*> (NRHS, N_ERR_BNDS) +*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS) *> For each right-hand side, this array contains information about *> various error bounds and condition numbers corresponding to the *> componentwise relative error, which is defined as follows: @@ -399,7 +397,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16GBcomputational * @@ -412,10 +410,10 @@ $ Y_TAIL, RCOND, ITHRESH, RTHRESH, $ DZ_UB, IGNORE_CWISE, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDAB, LDAFB, LDB, LDY, N, KL, KU, NRHS, diff -Nru lapack-3.7.0/SRC/zla_geamv.f lapack-3.7.1/SRC/zla_geamv.f --- lapack-3.7.0/SRC/zla_geamv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zla_geamv.f 2017-06-17 22:46:53.000000000 +0000 @@ -96,7 +96,7 @@ *> *> \param[in] A *> \verbatim -*> A is COMPLEX*16 array of DIMENSION ( LDA, n ) +*> A is COMPLEX*16 array, dimension ( LDA, n ) *> Before entry, the leading m by n part of the array A must *> contain the matrix of coefficients. *> Unchanged on exit. @@ -113,7 +113,7 @@ *> *> \param[in] X *> \verbatim -*> X is COMPLEX*16 array of DIMENSION at least +*> X is COMPLEX*16 array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n' *> and at least *> ( 1 + ( m - 1 )*abs( INCX ) ) otherwise. @@ -167,7 +167,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16GEcomputational * @@ -175,10 +175,10 @@ SUBROUTINE ZLA_GEAMV ( TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA, $ Y, INCY ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. DOUBLE PRECISION ALPHA, BETA diff -Nru lapack-3.7.0/SRC/zla_gerfsx_extended.f lapack-3.7.1/SRC/zla_gerfsx_extended.f --- lapack-3.7.0/SRC/zla_gerfsx_extended.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zla_gerfsx_extended.f 2017-06-17 22:46:53.000000000 +0000 @@ -195,8 +195,7 @@ *> *> \param[in,out] ERRS_N *> \verbatim -*> ERRS_N is DOUBLE PRECISION array, dimension -*> (NRHS, N_ERR_BNDS) +*> ERRS_N is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS) *> For each right-hand side, this array contains information about *> various error bounds and condition numbers corresponding to the *> normwise relative error, which is defined as follows: @@ -242,8 +241,7 @@ *> *> \param[in,out] ERRS_C *> \verbatim -*> ERRS_C is DOUBLE PRECISION array, dimension -*> (NRHS, N_ERR_BNDS) +*> ERRS_C is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS) *> For each right-hand side, this array contains information about *> various error bounds and condition numbers corresponding to the *> componentwise relative error, which is defined as follows: @@ -386,7 +384,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16GEcomputational * @@ -398,10 +396,10 @@ $ Y_TAIL, RCOND, ITHRESH, RTHRESH, $ DZ_UB, IGNORE_CWISE, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE, diff -Nru lapack-3.7.0/SRC/zla_heamv.f lapack-3.7.1/SRC/zla_heamv.f --- lapack-3.7.0/SRC/zla_heamv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zla_heamv.f 2017-06-17 22:46:53.000000000 +0000 @@ -89,7 +89,7 @@ *> *> \param[in] A *> \verbatim -*> A is COMPLEX*16 array, DIMENSION ( LDA, n ). +*> A is COMPLEX*16 array, dimension ( LDA, n ). *> Before entry, the leading m by n part of the array A must *> contain the matrix of coefficients. *> Unchanged on exit. @@ -106,7 +106,7 @@ *> *> \param[in] X *> \verbatim -*> X is COMPLEX*16 array, DIMENSION at least +*> X is COMPLEX*16 array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ) *> Before entry, the incremented array X must contain the *> vector x. @@ -154,7 +154,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16HEcomputational * @@ -178,10 +178,10 @@ SUBROUTINE ZLA_HEAMV( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y, $ INCY ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. DOUBLE PRECISION ALPHA, BETA diff -Nru lapack-3.7.0/SRC/zlahef_aa.f lapack-3.7.1/SRC/zlahef_aa.f --- lapack-3.7.0/SRC/zlahef_aa.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zlahef_aa.f 2017-06-17 22:46:53.000000000 +0000 @@ -19,11 +19,11 @@ * =========== * * SUBROUTINE ZLAHEF_AA( UPLO, J1, M, NB, A, LDA, IPIV, -* H, LDH, WORK, INFO ) +* H, LDH, WORK ) * * .. Scalar Arguments .. * CHARACTER UPLO -* INTEGER J1, M, NB, LDA, LDH, INFO +* INTEGER J1, M, NB, LDA, LDH * .. * .. Array Arguments .. * INTEGER IPIV( * ) @@ -127,16 +127,6 @@ *> WORK is COMPLEX*16 workspace, dimension (M). *> \endverbatim *> -*> \param[out] INFO -*> \verbatim -*> INFO is INTEGER -*> = 0: successful exit -*> < 0: if INFO = -i, the i-th argument had an illegal value -*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization -*> has been completed, but the block diagonal matrix D is -*> exactly singular, and division by zero will occur if it -*> is used to solve a system of equations. -*> \endverbatim * * Authors: * ======== @@ -146,24 +136,24 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16HEcomputational * * ===================================================================== SUBROUTINE ZLAHEF_AA( UPLO, J1, M, NB, A, LDA, IPIV, - $ H, LDH, WORK, INFO ) + $ H, LDH, WORK ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * IMPLICIT NONE * * .. Scalar Arguments .. CHARACTER UPLO - INTEGER M, NB, J1, LDA, LDH, INFO + INTEGER M, NB, J1, LDA, LDH * .. * .. Array Arguments .. INTEGER IPIV( * ) @@ -192,7 +182,6 @@ * .. * .. Executable Statements .. * - INFO = 0 J = 1 * * K1 is the first column of the panel to be factorized @@ -319,12 +308,6 @@ * Set A(J, J+1) = T(J, J+1) * A( K, J+1 ) = WORK( 2 ) - IF( (A( K, J ).EQ.ZERO ) .AND. - $ ( (J.EQ.M) .OR. (A( K, J+1 ).EQ.ZERO))) THEN - IF(INFO .EQ. 0) THEN - INFO = J - END IF - END IF * IF( J.LT.NB ) THEN * @@ -345,10 +328,6 @@ CALL ZLASET( 'Full', 1, M-J-1, ZERO, ZERO, $ A( K, J+2 ), LDA) END IF - ELSE - IF( (A( K, J ).EQ.ZERO) .AND. (INFO.EQ.0) ) THEN - INFO = J - END IF END IF J = J + 1 GO TO 10 @@ -473,11 +452,6 @@ * Set A(J+1, J) = T(J+1, J) * A( J+1, K ) = WORK( 2 ) - IF( (A( J, K ).EQ.ZERO) .AND. - $ ( (J.EQ.M) .OR. (A( J+1, K ).EQ.ZERO)) ) THEN - IF (INFO .EQ. 0) - $ INFO = J - END IF * IF( J.LT.NB ) THEN * @@ -498,9 +472,6 @@ CALL ZLASET( 'Full', M-J-1, 1, ZERO, ZERO, $ A( J+2, K ), LDA ) END IF - ELSE - IF( (A( J, K ).EQ.ZERO) .AND. (J.EQ.M) - $ .AND. (INFO.EQ.0) ) INFO = J END IF J = J + 1 GO TO 30 diff -Nru lapack-3.7.0/SRC/zla_herfsx_extended.f lapack-3.7.1/SRC/zla_herfsx_extended.f --- lapack-3.7.0/SRC/zla_herfsx_extended.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zla_herfsx_extended.f 2017-06-17 22:46:53.000000000 +0000 @@ -161,8 +161,7 @@ *> *> \param[in,out] Y *> \verbatim -*> Y is COMPLEX*16 array, dimension -*> (LDY,NRHS) +*> Y is COMPLEX*16 array, dimension (LDY,NRHS) *> On entry, the solution matrix X, as computed by ZHETRS. *> On exit, the improved solution matrix Y. *> \endverbatim @@ -194,8 +193,7 @@ *> *> \param[in,out] ERR_BNDS_NORM *> \verbatim -*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension -*> (NRHS, N_ERR_BNDS) +*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS) *> For each right-hand side, this array contains information about *> various error bounds and condition numbers corresponding to the *> normwise relative error, which is defined as follows: @@ -241,8 +239,7 @@ *> *> \param[in,out] ERR_BNDS_COMP *> \verbatim -*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension -*> (NRHS, N_ERR_BNDS) +*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS) *> For each right-hand side, this array contains information about *> various error bounds and condition numbers corresponding to the *> componentwise relative error, which is defined as follows: @@ -385,7 +382,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16HEcomputational * @@ -398,10 +395,10 @@ $ RTHRESH, DZ_UB, IGNORE_CWISE, $ INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE, diff -Nru lapack-3.7.0/SRC/zlalsa.f lapack-3.7.1/SRC/zlalsa.f --- lapack-3.7.0/SRC/zlalsa.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zlalsa.f 2017-06-17 22:46:53.000000000 +0000 @@ -232,8 +232,7 @@ *> *> \param[out] IWORK *> \verbatim -*> IWORK is INTEGER array. -*> The dimension must be at least 3 * N +*> IWORK is INTEGER array, dimension (3*N) *> \endverbatim *> *> \param[out] INFO @@ -251,7 +250,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16OTHERcomputational * @@ -268,10 +267,10 @@ $ GIVCOL, LDGCOL, PERM, GIVNUM, C, S, RWORK, $ IWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER ICOMPQ, INFO, LDB, LDBX, LDGCOL, LDU, N, NRHS, diff -Nru lapack-3.7.0/SRC/zlalsd.f lapack-3.7.1/SRC/zlalsd.f --- lapack-3.7.0/SRC/zlalsd.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zlalsd.f 2017-06-17 22:46:53.000000000 +0000 @@ -136,8 +136,7 @@ *> *> \param[out] WORK *> \verbatim -*> WORK is COMPLEX*16 array, dimension at least -*> (N * NRHS). +*> WORK is COMPLEX*16 array, dimension (N * NRHS) *> \endverbatim *> *> \param[out] RWORK @@ -173,7 +172,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16OTHERcomputational * @@ -188,10 +187,10 @@ SUBROUTINE ZLALSD( UPLO, SMLSIZ, N, NRHS, D, E, B, LDB, RCOND, $ RANK, WORK, RWORK, IWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/SRC/zlamswlq.f lapack-3.7.1/SRC/zlamswlq.f --- lapack-3.7.0/SRC/zlamswlq.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zlamswlq.f 2017-06-17 22:46:53.000000000 +0000 @@ -23,7 +23,7 @@ *> *> SIDE = 'L' SIDE = 'R' *> TRANS = 'N': Q * C C * Q -*> TRANS = 'T': Q**T * C C * Q**T +*> TRANS = 'C': Q**H * C C * Q**H *> where Q is a real orthogonal matrix defined as the product of blocked *> elementary reflectors computed by short wide LQ *> factorization (ZLASWLQ) @@ -35,21 +35,21 @@ *> \param[in] SIDE *> \verbatim *> SIDE is CHARACTER*1 -*> = 'L': apply Q or Q**T from the Left; -*> = 'R': apply Q or Q**T from the Right. +*> = 'L': apply Q or Q**H from the Left; +*> = 'R': apply Q or Q**H from the Right. *> \endverbatim *> *> \param[in] TRANS *> \verbatim *> TRANS is CHARACTER*1 *> = 'N': No transpose, apply Q; -*> = 'T': Transpose, apply Q**T. +*> = 'C': Conjugate Transpose, apply Q**H. *> \endverbatim *> *> \param[in] M *> \verbatim *> M is INTEGER -*> The number of rows of the matrix A. M >=0. +*> The number of rows of the matrix C. M >=0. *> \endverbatim *> *> \param[in] N @@ -88,12 +88,14 @@ *> *> \endverbatim *> -*> \param[in,out] A +*> \param[in] A *> \verbatim -*> A is COMPLEX*16 array, dimension (LDA,K) +*> A is COMPLEX*16 array, dimension +*> (LDA,M) if SIDE = 'L', +*> (LDA,N) if SIDE = 'R' *> The i-th row must contain the vector which defines the blocked *> elementary reflector H(i), for i = 1,2,...,k, as returned by -*> DLASWLQ in the first k rows of its array argument A. +*> ZLASWLQ in the first k rows of its array argument A. *> \endverbatim *> *> \param[in] LDA @@ -123,7 +125,7 @@ *> \verbatim *> C is COMPLEX*16 array, dimension (LDC,N) *> On entry, the M-by-N matrix C. -*> On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q. +*> On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q. *> \endverbatim *> *> \param[in] LDC @@ -200,14 +202,14 @@ SUBROUTINE ZLAMSWLQ( SIDE, TRANS, M, N, K, MB, NB, A, LDA, T, $ LDT, C, LDC, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER SIDE, TRANS - INTEGER INFO, LDA, M, N, K, MB, NB, LDT, LWORK, LDC, LW + INTEGER INFO, LDA, M, N, K, MB, NB, LDT, LWORK, LDC * .. * .. Array Arguments .. COMPLEX*16 A( LDA, * ), WORK( * ), C(LDC, * ), @@ -219,7 +221,7 @@ * .. * .. Local Scalars .. LOGICAL LEFT, RIGHT, TRAN, NOTRAN, LQUERY - INTEGER I, II, KK, CTR + INTEGER I, II, KK, LW, CTR * .. * .. External Functions .. LOGICAL LSAME diff -Nru lapack-3.7.0/SRC/zlamtsqr.f lapack-3.7.1/SRC/zlamtsqr.f --- lapack-3.7.0/SRC/zlamtsqr.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zlamtsqr.f 2017-06-17 22:46:53.000000000 +0000 @@ -23,7 +23,7 @@ *> *> SIDE = 'L' SIDE = 'R' *> TRANS = 'N': Q * C C * Q -*> TRANS = 'C': Q**C * C C * Q**C +*> TRANS = 'C': Q**H * C C * Q**H *> where Q is a real orthogonal matrix defined as the product *> of blocked elementary reflectors computed by tall skinny *> QR factorization (ZLATSQR) @@ -35,15 +35,15 @@ *> \param[in] SIDE *> \verbatim *> SIDE is CHARACTER*1 -*> = 'L': apply Q or Q**T from the Left; -*> = 'R': apply Q or Q**T from the Right. +*> = 'L': apply Q or Q**H from the Left; +*> = 'R': apply Q or Q**H from the Right. *> \endverbatim *> *> \param[in] TRANS *> \verbatim *> TRANS is CHARACTER*1 *> = 'N': No transpose, apply Q; -*> = 'C': Conjugate Transpose, apply Q**C. +*> = 'C': Conjugate Transpose, apply Q**H. *> \endverbatim *> *> \param[in] M @@ -81,7 +81,7 @@ *> N >= NB >= 1. *> \endverbatim *> -*> \param[in,out] A +*> \param[in] A *> \verbatim *> A is COMPLEX*16 array, dimension (LDA,K) *> The i-th column must contain the vector which defines the @@ -117,7 +117,7 @@ *> \verbatim *> C is COMPLEX*16 array, dimension (LDC,N) *> On entry, the M-by-N matrix C. -*> On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q. +*> On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q. *> \endverbatim *> *> \param[in] LDC @@ -195,10 +195,10 @@ SUBROUTINE ZLAMTSQR( SIDE, TRANS, M, N, K, MB, NB, A, LDA, T, $ LDT, C, LDC, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER SIDE, TRANS diff -Nru lapack-3.7.0/SRC/zla_porfsx_extended.f lapack-3.7.1/SRC/zla_porfsx_extended.f --- lapack-3.7.0/SRC/zla_porfsx_extended.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zla_porfsx_extended.f 2017-06-17 22:46:53.000000000 +0000 @@ -153,8 +153,7 @@ *> *> \param[in,out] Y *> \verbatim -*> Y is COMPLEX*16 array, dimension -*> (LDY,NRHS) +*> Y is COMPLEX*16 array, dimension (LDY,NRHS) *> On entry, the solution matrix X, as computed by ZPOTRS. *> On exit, the improved solution matrix Y. *> \endverbatim @@ -186,8 +185,7 @@ *> *> \param[in,out] ERR_BNDS_NORM *> \verbatim -*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension -*> (NRHS, N_ERR_BNDS) +*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS) *> For each right-hand side, this array contains information about *> various error bounds and condition numbers corresponding to the *> normwise relative error, which is defined as follows: @@ -233,8 +231,7 @@ *> *> \param[in,out] ERR_BNDS_COMP *> \verbatim -*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension -*> (NRHS, N_ERR_BNDS) +*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS) *> For each right-hand side, this array contains information about *> various error bounds and condition numbers corresponding to the *> componentwise relative error, which is defined as follows: @@ -377,7 +374,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16POcomputational * @@ -390,10 +387,10 @@ $ RTHRESH, DZ_UB, IGNORE_CWISE, $ INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE, diff -Nru lapack-3.7.0/SRC/zlaqr1.f lapack-3.7.1/SRC/zlaqr1.f --- lapack-3.7.0/SRC/zlaqr1.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zlaqr1.f 2017-06-17 22:46:53.000000000 +0000 @@ -50,19 +50,19 @@ * *> \param[in] N *> \verbatim -*> N is integer +*> N is INTEGER *> Order of the matrix H. N must be either 2 or 3. *> \endverbatim *> *> \param[in] H *> \verbatim -*> H is COMPLEX*16 array of dimension (LDH,N) +*> H is COMPLEX*16 array, dimension (LDH,N) *> The 2-by-2 or 3-by-3 matrix H in (*). *> \endverbatim *> *> \param[in] LDH *> \verbatim -*> LDH is integer +*> LDH is INTEGER *> The leading dimension of H as declared in *> the calling procedure. LDH.GE.N *> \endverbatim @@ -81,7 +81,7 @@ *> *> \param[out] V *> \verbatim -*> V is COMPLEX*16 array of dimension N +*> V is COMPLEX*16 array, dimension (N) *> A scalar multiple of the first column of the *> matrix K in (*). *> \endverbatim @@ -94,7 +94,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16OTHERauxiliary * @@ -107,10 +107,10 @@ * ===================================================================== SUBROUTINE ZLAQR1( N, H, LDH, S1, S2, V ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. COMPLEX*16 S1, S2 diff -Nru lapack-3.7.0/SRC/zlaqr2.f lapack-3.7.1/SRC/zlaqr2.f --- lapack-3.7.0/SRC/zlaqr2.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zlaqr2.f 2017-06-17 22:46:53.000000000 +0000 @@ -119,7 +119,7 @@ *> *> \param[in] LDH *> \verbatim -*> LDH is integer +*> LDH is INTEGER *> Leading dimension of H just as declared in the calling *> subroutine. N .LE. LDH *> \endverbatim @@ -147,14 +147,14 @@ *> *> \param[in] LDZ *> \verbatim -*> LDZ is integer +*> LDZ is INTEGER *> The leading dimension of Z just as declared in the *> calling subroutine. 1 .LE. LDZ. *> \endverbatim *> *> \param[out] NS *> \verbatim -*> NS is integer +*> NS is INTEGER *> The number of unconverged (ie approximate) eigenvalues *> returned in SR and SI that may be used as shifts by the *> calling subroutine. @@ -162,14 +162,14 @@ *> *> \param[out] ND *> \verbatim -*> ND is integer +*> ND is INTEGER *> The number of converged eigenvalues uncovered by this *> subroutine. *> \endverbatim *> *> \param[out] SH *> \verbatim -*> SH is COMPLEX*16 array, dimension KBOT +*> SH is COMPLEX*16 array, dimension (KBOT) *> On output, approximate eigenvalues that may *> be used for shifts are stored in SH(KBOT-ND-NS+1) *> through SR(KBOT-ND). Converged eigenvalues are @@ -184,14 +184,14 @@ *> *> \param[in] LDV *> \verbatim -*> LDV is integer scalar +*> LDV is INTEGER *> The leading dimension of V just as declared in the *> calling subroutine. NW .LE. LDV *> \endverbatim *> *> \param[in] NH *> \verbatim -*> NH is integer scalar +*> NH is INTEGER *> The number of columns of T. NH.GE.NW. *> \endverbatim *> @@ -202,14 +202,14 @@ *> *> \param[in] LDT *> \verbatim -*> LDT is integer +*> LDT is INTEGER *> The leading dimension of T just as declared in the *> calling subroutine. NW .LE. LDT *> \endverbatim *> *> \param[in] NV *> \verbatim -*> NV is integer +*> NV is INTEGER *> The number of rows of work array WV available for *> workspace. NV.GE.NW. *> \endverbatim @@ -221,21 +221,21 @@ *> *> \param[in] LDWV *> \verbatim -*> LDWV is integer +*> LDWV is INTEGER *> The leading dimension of W just as declared in the *> calling subroutine. NW .LE. LDV *> \endverbatim *> *> \param[out] WORK *> \verbatim -*> WORK is COMPLEX*16 array, dimension LWORK. +*> WORK is COMPLEX*16 array, dimension (LWORK) *> On exit, WORK(1) is set to an estimate of the optimal value *> of LWORK for the given values of N, NW, KTOP and KBOT. *> \endverbatim *> *> \param[in] LWORK *> \verbatim -*> LWORK is integer +*> LWORK is INTEGER *> The dimension of the work array WORK. LWORK = 2*NW *> suffices, but greater efficiency may result from larger *> values of LWORK. @@ -255,7 +255,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16OTHERauxiliary * @@ -270,10 +270,10 @@ $ IHIZ, Z, LDZ, NS, ND, SH, V, LDV, NH, T, LDT, $ NV, WV, LDWV, WORK, LWORK ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV, diff -Nru lapack-3.7.0/SRC/zlaqr3.f lapack-3.7.1/SRC/zlaqr3.f --- lapack-3.7.0/SRC/zlaqr3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zlaqr3.f 2017-06-17 22:46:53.000000000 +0000 @@ -116,7 +116,7 @@ *> *> \param[in] LDH *> \verbatim -*> LDH is integer +*> LDH is INTEGER *> Leading dimension of H just as declared in the calling *> subroutine. N .LE. LDH *> \endverbatim @@ -144,14 +144,14 @@ *> *> \param[in] LDZ *> \verbatim -*> LDZ is integer +*> LDZ is INTEGER *> The leading dimension of Z just as declared in the *> calling subroutine. 1 .LE. LDZ. *> \endverbatim *> *> \param[out] NS *> \verbatim -*> NS is integer +*> NS is INTEGER *> The number of unconverged (ie approximate) eigenvalues *> returned in SR and SI that may be used as shifts by the *> calling subroutine. @@ -159,14 +159,14 @@ *> *> \param[out] ND *> \verbatim -*> ND is integer +*> ND is INTEGER *> The number of converged eigenvalues uncovered by this *> subroutine. *> \endverbatim *> *> \param[out] SH *> \verbatim -*> SH is COMPLEX*16 array, dimension KBOT +*> SH is COMPLEX*16 array, dimension (KBOT) *> On output, approximate eigenvalues that may *> be used for shifts are stored in SH(KBOT-ND-NS+1) *> through SR(KBOT-ND). Converged eigenvalues are @@ -181,14 +181,14 @@ *> *> \param[in] LDV *> \verbatim -*> LDV is integer scalar +*> LDV is INTEGER *> The leading dimension of V just as declared in the *> calling subroutine. NW .LE. LDV *> \endverbatim *> *> \param[in] NH *> \verbatim -*> NH is integer scalar +*> NH is INTEGER *> The number of columns of T. NH.GE.NW. *> \endverbatim *> @@ -199,14 +199,14 @@ *> *> \param[in] LDT *> \verbatim -*> LDT is integer +*> LDT is INTEGER *> The leading dimension of T just as declared in the *> calling subroutine. NW .LE. LDT *> \endverbatim *> *> \param[in] NV *> \verbatim -*> NV is integer +*> NV is INTEGER *> The number of rows of work array WV available for *> workspace. NV.GE.NW. *> \endverbatim @@ -218,21 +218,21 @@ *> *> \param[in] LDWV *> \verbatim -*> LDWV is integer +*> LDWV is INTEGER *> The leading dimension of W just as declared in the *> calling subroutine. NW .LE. LDV *> \endverbatim *> *> \param[out] WORK *> \verbatim -*> WORK is COMPLEX*16 array, dimension LWORK. +*> WORK is COMPLEX*16 array, dimension (LWORK) *> On exit, WORK(1) is set to an estimate of the optimal value *> of LWORK for the given values of N, NW, KTOP and KBOT. *> \endverbatim *> *> \param[in] LWORK *> \verbatim -*> LWORK is integer +*> LWORK is INTEGER *> The dimension of the work array WORK. LWORK = 2*NW *> suffices, but greater efficiency may result from larger *> values of LWORK. @@ -267,7 +267,7 @@ $ IHIZ, Z, LDZ, NS, ND, SH, V, LDV, NH, T, LDT, $ NV, WV, LDWV, WORK, LWORK ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 diff -Nru lapack-3.7.0/SRC/zlaqr5.f lapack-3.7.1/SRC/zlaqr5.f --- lapack-3.7.0/SRC/zlaqr5.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zlaqr5.f 2017-06-17 22:46:53.000000000 +0000 @@ -47,21 +47,21 @@ * *> \param[in] WANTT *> \verbatim -*> WANTT is logical scalar +*> WANTT is LOGICAL *> WANTT = .true. if the triangular Schur factor *> is being computed. WANTT is set to .false. otherwise. *> \endverbatim *> *> \param[in] WANTZ *> \verbatim -*> WANTZ is logical scalar +*> WANTZ is LOGICAL *> WANTZ = .true. if the unitary Schur factor is being *> computed. WANTZ is set to .false. otherwise. *> \endverbatim *> *> \param[in] KACC22 *> \verbatim -*> KACC22 is integer with value 0, 1, or 2. +*> KACC22 is INTEGER with value 0, 1, or 2. *> Specifies the computation mode of far-from-diagonal *> orthogonal updates. *> = 0: ZLAQR5 does not accumulate reflections and does not @@ -77,19 +77,19 @@ *> *> \param[in] N *> \verbatim -*> N is integer scalar +*> N is INTEGER *> N is the order of the Hessenberg matrix H upon which this *> subroutine operates. *> \endverbatim *> *> \param[in] KTOP *> \verbatim -*> KTOP is integer scalar +*> KTOP is INTEGER *> \endverbatim *> *> \param[in] KBOT *> \verbatim -*> KBOT is integer scalar +*> KBOT is INTEGER *> These are the first and last rows and columns of an *> isolated diagonal block upon which the QR sweep is to be *> applied. It is assumed without a check that @@ -100,21 +100,21 @@ *> *> \param[in] NSHFTS *> \verbatim -*> NSHFTS is integer scalar +*> NSHFTS is INTEGER *> NSHFTS gives the number of simultaneous shifts. NSHFTS *> must be positive and even. *> \endverbatim *> *> \param[in,out] S *> \verbatim -*> S is COMPLEX*16 array of size (NSHFTS) +*> S is COMPLEX*16 array, dimension (NSHFTS) *> S contains the shifts of origin that define the multi- *> shift QR sweep. On output S may be reordered. *> \endverbatim *> *> \param[in,out] H *> \verbatim -*> H is COMPLEX*16 array of size (LDH,N) +*> H is COMPLEX*16 array, dimension (LDH,N) *> On input H contains a Hessenberg matrix. On output a *> multi-shift QR sweep with shifts SR(J)+i*SI(J) is applied *> to the isolated diagonal block in rows and columns KTOP @@ -123,7 +123,7 @@ *> *> \param[in] LDH *> \verbatim -*> LDH is integer scalar +*> LDH is INTEGER *> LDH is the leading dimension of H just as declared in the *> calling procedure. LDH.GE.MAX(1,N). *> \endverbatim @@ -142,7 +142,7 @@ *> *> \param[in,out] Z *> \verbatim -*> Z is COMPLEX*16 array of size (LDZ,IHIZ) +*> Z is COMPLEX*16 array, dimension (LDZ,IHIZ) *> If WANTZ = .TRUE., then the QR Sweep unitary *> similarity transformation is accumulated into *> Z(ILOZ:IHIZ,ILOZ:IHIZ) from the right. @@ -151,71 +151,69 @@ *> *> \param[in] LDZ *> \verbatim -*> LDZ is integer scalar +*> LDZ is INTEGER *> LDA is the leading dimension of Z just as declared in *> the calling procedure. LDZ.GE.N. *> \endverbatim *> *> \param[out] V *> \verbatim -*> V is COMPLEX*16 array of size (LDV,NSHFTS/2) +*> V is COMPLEX*16 array, dimension (LDV,NSHFTS/2) *> \endverbatim *> *> \param[in] LDV *> \verbatim -*> LDV is integer scalar +*> LDV is INTEGER *> LDV is the leading dimension of V as declared in the *> calling procedure. LDV.GE.3. *> \endverbatim *> *> \param[out] U *> \verbatim -*> U is COMPLEX*16 array of size -*> (LDU,3*NSHFTS-3) +*> U is COMPLEX*16 array, dimension (LDU,3*NSHFTS-3) *> \endverbatim *> *> \param[in] LDU *> \verbatim -*> LDU is integer scalar +*> LDU is INTEGER *> LDU is the leading dimension of U just as declared in the *> in the calling subroutine. LDU.GE.3*NSHFTS-3. *> \endverbatim *> *> \param[in] NH *> \verbatim -*> NH is integer scalar +*> NH is INTEGER *> NH is the number of columns in array WH available for *> workspace. NH.GE.1. *> \endverbatim *> *> \param[out] WH *> \verbatim -*> WH is COMPLEX*16 array of size (LDWH,NH) +*> WH is COMPLEX*16 array, dimension (LDWH,NH) *> \endverbatim *> *> \param[in] LDWH *> \verbatim -*> LDWH is integer scalar +*> LDWH is INTEGER *> Leading dimension of WH just as declared in the *> calling procedure. LDWH.GE.3*NSHFTS-3. *> \endverbatim *> *> \param[in] NV *> \verbatim -*> NV is integer scalar +*> NV is INTEGER *> NV is the number of rows in WV agailable for workspace. *> NV.GE.1. *> \endverbatim *> *> \param[out] WV *> \verbatim -*> WV is COMPLEX*16 array of size -*> (LDWV,3*NSHFTS-3) +*> WV is COMPLEX*16 array, dimension (LDWV,3*NSHFTS-3) *> \endverbatim *> *> \param[in] LDWV *> \verbatim -*> LDWV is integer scalar +*> LDWV is INTEGER *> LDWV is the leading dimension of WV as declared in the *> in the calling subroutine. LDWV.GE.NV. *> \endverbatim @@ -251,7 +249,7 @@ $ H, LDH, ILOZ, IHIZ, Z, LDZ, V, LDV, U, LDU, NV, $ WV, LDWV, NH, WH, LDWH ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 diff -Nru lapack-3.7.0/SRC/zlarrv.f lapack-3.7.1/SRC/zlarrv.f --- lapack-3.7.0/SRC/zlarrv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zlarrv.f 2017-06-17 22:46:53.000000000 +0000 @@ -286,7 +286,7 @@ $ IBLOCK, INDEXW, GERS, Z, LDZ, ISUPPZ, $ WORK, IWORK, INFO ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 @@ -348,6 +348,13 @@ * .. INFO = 0 +* +* Quick return if possible +* + IF( N.LE.0 ) THEN + RETURN + END IF +* * The first N entries of WORK are reserved for the eigenvalues INDLD = N+1 INDLLD= 2*N+1 diff -Nru lapack-3.7.0/SRC/zlaswlq.f lapack-3.7.1/SRC/zlaswlq.f --- lapack-3.7.0/SRC/zlaswlq.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zlaswlq.f 2017-06-17 22:46:53.000000000 +0000 @@ -55,7 +55,7 @@ *> \verbatim *> A is COMPLEX*16 array, dimension (LDA,N) *> On entry, the M-by-N matrix A. -*> On exit, the elements on and bleow the diagonal +*> On exit, the elements on and below the diagonal *> of the array contain the N-by-N lower triangular matrix L; *> the elements above the diagonal represent Q by the rows *> of blocked V (see Further Details). @@ -150,10 +150,10 @@ SUBROUTINE ZLASWLQ( M, N, MB, NB, A, LDA, T, LDT, WORK, LWORK, $ INFO) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd. -- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, M, N, MB, NB, LWORK, LDT diff -Nru lapack-3.7.0/SRC/zlaswp.f lapack-3.7.1/SRC/zlaswp.f --- lapack-3.7.0/SRC/zlaswp.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zlaswp.f 2017-06-17 22:46:53.000000000 +0000 @@ -79,14 +79,15 @@ *> \verbatim *> IPIV is INTEGER array, dimension (K1+(K2-K1)*abs(INCX)) *> The vector of pivot indices. Only the elements in positions -*> K1 through K1+(K2-K1)*INCX of IPIV are accessed. -*> IPIV(K) = L implies rows K and L are to be interchanged. +*> K1 through K1+(K2-K1)*abs(INCX) of IPIV are accessed. +*> IPIV(K1+(K-K1)*abs(INCX)) = L implies rows K and L are to be +*> interchanged. *> \endverbatim *> *> \param[in] INCX *> \verbatim *> INCX is INTEGER -*> The increment between successive values of IPIV. If IPIV +*> The increment between successive values of IPIV. If INCX *> is negative, the pivots are applied in reverse order. *> \endverbatim * @@ -98,7 +99,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16OTHERauxiliary * @@ -114,10 +115,10 @@ * ===================================================================== SUBROUTINE ZLASWP( N, A, LDA, K1, K2, IPIV, INCX ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INCX, K1, K2, LDA, N @@ -135,7 +136,8 @@ * .. * .. Executable Statements .. * -* Interchange row I with row IPIV(I) for each of rows K1 through K2. +* Interchange row I with row IPIV(K1+(I-K1)*abs(INCX)) for each of rows +* K1 through K2. * IF( INCX.GT.0 ) THEN IX0 = K1 diff -Nru lapack-3.7.0/SRC/zla_syamv.f lapack-3.7.1/SRC/zla_syamv.f --- lapack-3.7.0/SRC/zla_syamv.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zla_syamv.f 2017-06-17 22:46:53.000000000 +0000 @@ -90,7 +90,7 @@ *> *> \param[in] A *> \verbatim -*> A is COMPLEX*16 array, DIMENSION ( LDA, n ). +*> A is COMPLEX*16 array, dimension ( LDA, n ). *> Before entry, the leading m by n part of the array A must *> contain the matrix of coefficients. *> Unchanged on exit. @@ -107,7 +107,7 @@ *> *> \param[in] X *> \verbatim -*> X is COMPLEX*16 array, DIMENSION at least +*> X is COMPLEX*16 array, dimension at least *> ( 1 + ( n - 1 )*abs( INCX ) ) *> Before entry, the incremented array X must contain the *> vector x. @@ -155,7 +155,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16SYcomputational * @@ -179,10 +179,10 @@ SUBROUTINE ZLA_SYAMV( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y, $ INCY ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. DOUBLE PRECISION ALPHA, BETA diff -Nru lapack-3.7.0/SRC/zlasyf_aa.f lapack-3.7.1/SRC/zlasyf_aa.f --- lapack-3.7.0/SRC/zlasyf_aa.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zlasyf_aa.f 2017-06-17 22:46:53.000000000 +0000 @@ -19,11 +19,11 @@ * =========== * * SUBROUTINE ZLASYF_AA( UPLO, J1, M, NB, A, LDA, IPIV, -* H, LDH, WORK, INFO ) +* H, LDH, WORK ) * * .. Scalar Arguments .. * CHARACTER UPLO -* INTEGER J1, M, NB, LDA, LDH, INFO +* INTEGER J1, M, NB, LDA, LDH * .. * .. Array Arguments .. * INTEGER IPIV( * ) @@ -99,12 +99,12 @@ *> \param[in] LDA *> \verbatim *> LDA is INTEGER -*> The leading dimension of the array A. LDA >= max(1,N). +*> The leading dimension of the array A. LDA >= max(1,M). *> \endverbatim *> *> \param[out] IPIV *> \verbatim -*> IPIV is INTEGER array, dimension (N) +*> IPIV is INTEGER array, dimension (M) *> Details of the row and column interchanges, *> the row and column k were interchanged with the row and *> column IPIV(k). @@ -127,16 +127,6 @@ *> WORK is COMPLEX*16 workspace, dimension (M). *> \endverbatim *> -*> \param[out] INFO -*> \verbatim -*> INFO is INTEGER -*> = 0: successful exit -*> < 0: if INFO = -i, the i-th argument had an illegal value -*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization -*> has been completed, but the block diagonal matrix D is -*> exactly singular, and division by zero will occur if it -*> is used to solve a system of equations. -*> \endverbatim * * Authors: * ======== @@ -146,24 +136,24 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16SYcomputational * * ===================================================================== SUBROUTINE ZLASYF_AA( UPLO, J1, M, NB, A, LDA, IPIV, - $ H, LDH, WORK, INFO ) + $ H, LDH, WORK ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * IMPLICIT NONE * * .. Scalar Arguments .. CHARACTER UPLO - INTEGER M, NB, J1, LDA, LDH, INFO + INTEGER M, NB, J1, LDA, LDH * .. * .. Array Arguments .. INTEGER IPIV( * ) @@ -192,7 +182,6 @@ * .. * .. Executable Statements .. * - INFO = 0 J = 1 * * K1 is the first column of the panel to be factorized @@ -217,8 +206,8 @@ * K = J1+J-1 * -* H(J:N, J) := A(J, J:N) - H(J:N, 1:(J-1)) * L(J1:(J-1), J), -* where H(J:N, J) has been initialized to be A(J, J:N) +* H(J:M, J) := A(J, J:M) - H(J:M, 1:(J-1)) * L(J1:(J-1), J), +* where H(J:M, J) has been initialized to be A(J, J:M) * IF( K.GT.2 ) THEN * @@ -234,14 +223,14 @@ $ ONE, H( J, J ), 1 ) END IF * -* Copy H(i:n, i) into WORK +* Copy H(i:M, i) into WORK * CALL ZCOPY( M-J+1, H( J, J ), 1, WORK( 1 ), 1 ) * IF( J.GT.K1 ) THEN * -* Compute WORK := WORK - L(J-1, J:N) * T(J-1,J), -* where A(J-1, J) stores T(J-1, J) and A(J-2, J:N) stores U(J-1, J:N) +* Compute WORK := WORK - L(J-1, J:M) * T(J-1,J), +* where A(J-1, J) stores T(J-1, J) and A(J-2, J:M) stores U(J-1, J:M) * ALPHA = -A( K-1, J ) CALL ZAXPY( M-J+1, ALPHA, A( K-2, J ), LDA, WORK( 1 ), 1 ) @@ -253,8 +242,8 @@ * IF( J.LT.M ) THEN * -* Compute WORK(2:N) = T(J, J) L(J, (J+1):N) -* where A(J, J) stores T(J, J) and A(J-1, (J+1):N) stores U(J, (J+1):N) +* Compute WORK(2:M) = T(J, J) L(J, (J+1):M) +* where A(J, J) stores T(J, J) and A(J-1, (J+1):M) stores U(J, (J+1):M) * IF( K.GT.1 ) THEN ALPHA = -A( K, J ) @@ -262,7 +251,7 @@ $ WORK( 2 ), 1 ) ENDIF * -* Find max(|WORK(2:n)|) +* Find max(|WORK(2:M)|) * I2 = IZAMAX( M-J, WORK( 2 ), 1 ) + 1 PIV = WORK( I2 ) @@ -277,14 +266,14 @@ WORK( I2 ) = WORK( I1 ) WORK( I1 ) = PIV * -* Swap A(I1, I1+1:N) with A(I1+1:N, I2) +* Swap A(I1, I1+1:M) with A(I1+1:M, I2) * I1 = I1+J-1 I2 = I2+J-1 CALL ZSWAP( I2-I1-1, A( J1+I1-1, I1+1 ), LDA, $ A( J1+I1, I2 ), 1 ) * -* Swap A(I1, I2+1:N) with A(I2, I2+1:N) +* Swap A(I1, I2+1:M) with A(I2, I2+1:M) * CALL ZSWAP( M-I2, A( J1+I1-1, I2+1 ), LDA, $ A( J1+I2-1, I2+1 ), LDA ) @@ -315,23 +304,17 @@ * Set A(J, J+1) = T(J, J+1) * A( K, J+1 ) = WORK( 2 ) - IF( (A( K, J ).EQ.ZERO ) .AND. - $ ( (J.EQ.M) .OR. (A( K, J+1 ).EQ.ZERO))) THEN - IF(INFO .EQ. 0) THEN - INFO = J - ENDIF - END IF * IF( J.LT.NB ) THEN * -* Copy A(J+1:N, J+1) into H(J:N, J), +* Copy A(J+1:M, J+1) into H(J:M, J), * CALL ZCOPY( M-J, A( K+1, J+1 ), LDA, $ H( J+1, J+1 ), 1 ) END IF * -* Compute L(J+2, J+1) = WORK( 3:N ) / T(J, J+1), -* where A(J, J+1) = T(J, J+1) and A(J+2:N, J) = L(J+2:N, J+1) +* Compute L(J+2, J+1) = WORK( 3:M ) / T(J, J+1), +* where A(J, J+1) = T(J, J+1) and A(J+2:M, J) = L(J+2:M, J+1) * IF( A( K, J+1 ).NE.ZERO ) THEN ALPHA = ONE / A( K, J+1 ) @@ -341,10 +324,6 @@ CALL ZLASET( 'Full', 1, M-J-1, ZERO, ZERO, $ A( K, J+2 ), LDA) END IF - ELSE - IF( (A( K, J ).EQ.ZERO) .AND. (INFO.EQ.0) ) THEN - INFO = J - END IF END IF J = J + 1 GO TO 10 @@ -367,8 +346,8 @@ * K = J1+J-1 * -* H(J:N, J) := A(J:N, J) - H(J:N, 1:(J-1)) * L(J, J1:(J-1))^T, -* where H(J:N, J) has been initialized to be A(J:N, J) +* H(J:M, J) := A(J:M, J) - H(J:M, 1:(J-1)) * L(J, J1:(J-1))^T, +* where H(J:M, J) has been initialized to be A(J:M, J) * IF( K.GT.2 ) THEN * @@ -384,13 +363,13 @@ $ ONE, H( J, J ), 1 ) END IF * -* Copy H(J:N, J) into WORK +* Copy H(J:M, J) into WORK * CALL ZCOPY( M-J+1, H( J, J ), 1, WORK( 1 ), 1 ) * IF( J.GT.K1 ) THEN * -* Compute WORK := WORK - L(J:N, J-1) * T(J-1,J), +* Compute WORK := WORK - L(J:M, J-1) * T(J-1,J), * where A(J-1, J) = T(J-1, J) and A(J, J-2) = L(J, J-1) * ALPHA = -A( J, K-1 ) @@ -403,8 +382,8 @@ * IF( J.LT.M ) THEN * -* Compute WORK(2:N) = T(J, J) L((J+1):N, J) -* where A(J, J) = T(J, J) and A((J+1):N, J-1) = L((J+1):N, J) +* Compute WORK(2:M) = T(J, J) L((J+1):M, J) +* where A(J, J) = T(J, J) and A((J+1):M, J-1) = L((J+1):M, J) * IF( K.GT.1 ) THEN ALPHA = -A( J, K ) @@ -412,7 +391,7 @@ $ WORK( 2 ), 1 ) ENDIF * -* Find max(|WORK(2:n)|) +* Find max(|WORK(2:M)|) * I2 = IZAMAX( M-J, WORK( 2 ), 1 ) + 1 PIV = WORK( I2 ) @@ -427,14 +406,14 @@ WORK( I2 ) = WORK( I1 ) WORK( I1 ) = PIV * -* Swap A(I1+1:N, I1) with A(I2, I1+1:N) +* Swap A(I1+1:M, I1) with A(I2, I1+1:M) * I1 = I1+J-1 I2 = I2+J-1 CALL ZSWAP( I2-I1-1, A( I1+1, J1+I1-1 ), 1, $ A( I2, J1+I1 ), LDA ) * -* Swap A(I2+1:N, I1) with A(I2+1:N, I2) +* Swap A(I2+1:M, I1) with A(I2+1:M, I2) * CALL ZSWAP( M-I2, A( I2+1, J1+I1-1 ), 1, $ A( I2+1, J1+I2-1 ), 1 ) @@ -465,22 +444,17 @@ * Set A(J+1, J) = T(J+1, J) * A( J+1, K ) = WORK( 2 ) - IF( (A( J, K ).EQ.ZERO) .AND. - $ ( (J.EQ.M) .OR. (A( J+1, K ).EQ.ZERO)) ) THEN - IF (INFO .EQ. 0) - $ INFO = J - END IF * IF( J.LT.NB ) THEN * -* Copy A(J+1:N, J+1) into H(J+1:N, J), +* Copy A(J+1:M, J+1) into H(J+1:M, J), * CALL ZCOPY( M-J, A( J+1, K+1 ), 1, $ H( J+1, J+1 ), 1 ) END IF * -* Compute L(J+2, J+1) = WORK( 3:N ) / T(J, J+1), -* where A(J, J+1) = T(J, J+1) and A(J+2:N, J) = L(J+2:N, J+1) +* Compute L(J+2, J+1) = WORK( 3:M ) / T(J, J+1), +* where A(J, J+1) = T(J, J+1) and A(J+2:M, J) = L(J+2:M, J+1) * IF( A( J+1, K ).NE.ZERO ) THEN ALPHA = ONE / A( J+1, K ) @@ -490,10 +464,6 @@ CALL ZLASET( 'Full', M-J-1, 1, ZERO, ZERO, $ A( J+2, K ), LDA ) END IF - ELSE - IF( (A( J, K ).EQ.ZERO) .AND. (INFO.EQ.0) ) THEN - INFO = J - END IF END IF J = J + 1 GO TO 30 diff -Nru lapack-3.7.0/SRC/zla_syrfsx_extended.f lapack-3.7.1/SRC/zla_syrfsx_extended.f --- lapack-3.7.0/SRC/zla_syrfsx_extended.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zla_syrfsx_extended.f 2017-06-17 22:46:53.000000000 +0000 @@ -161,8 +161,7 @@ *> *> \param[in,out] Y *> \verbatim -*> Y is COMPLEX*16 array, dimension -*> (LDY,NRHS) +*> Y is COMPLEX*16 array, dimension (LDY,NRHS) *> On entry, the solution matrix X, as computed by ZSYTRS. *> On exit, the improved solution matrix Y. *> \endverbatim @@ -194,8 +193,7 @@ *> *> \param[in,out] ERR_BNDS_NORM *> \verbatim -*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension -*> (NRHS, N_ERR_BNDS) +*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS) *> For each right-hand side, this array contains information about *> various error bounds and condition numbers corresponding to the *> normwise relative error, which is defined as follows: @@ -241,8 +239,7 @@ *> *> \param[in,out] ERR_BNDS_COMP *> \verbatim -*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension -*> (NRHS, N_ERR_BNDS) +*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS) *> For each right-hand side, this array contains information about *> various error bounds and condition numbers corresponding to the *> componentwise relative error, which is defined as follows: @@ -385,7 +382,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16SYcomputational * @@ -398,10 +395,10 @@ $ RTHRESH, DZ_UB, IGNORE_CWISE, $ INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE, diff -Nru lapack-3.7.0/SRC/zstedc.f lapack-3.7.1/SRC/zstedc.f --- lapack-3.7.0/SRC/zstedc.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zstedc.f 2017-06-17 22:46:53.000000000 +0000 @@ -128,8 +128,7 @@ *> *> \param[out] RWORK *> \verbatim -*> RWORK is DOUBLE PRECISION array, -*> dimension (LRWORK) +*> RWORK is DOUBLE PRECISION array, dimension (MAX(1,LRWORK)) *> On exit, if INFO = 0, RWORK(1) returns the optimal LRWORK. *> \endverbatim *> @@ -199,7 +198,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16OTHERcomputational * @@ -213,10 +212,10 @@ SUBROUTINE ZSTEDC( COMPZ, N, D, E, Z, LDZ, WORK, LWORK, RWORK, $ LRWORK, IWORK, LIWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER COMPZ diff -Nru lapack-3.7.0/SRC/zstegr.f lapack-3.7.1/SRC/zstegr.f --- lapack-3.7.0/SRC/zstegr.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zstegr.f 2017-06-17 22:46:53.000000000 +0000 @@ -184,7 +184,7 @@ *> *> \param[out] ISUPPZ *> \verbatim -*> ISUPPZ is INTEGER ARRAY, dimension ( 2*max(1,M) ) +*> ISUPPZ is INTEGER array, dimension ( 2*max(1,M) ) *> The support of the eigenvectors in Z, i.e., the indices *> indicating the nonzero elements in Z. The i-th computed eigenvector *> is nonzero only in elements ISUPPZ( 2*i-1 ) through @@ -265,7 +265,7 @@ $ ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK, $ LIWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 diff -Nru lapack-3.7.0/SRC/zstemr.f lapack-3.7.1/SRC/zstemr.f --- lapack-3.7.0/SRC/zstemr.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zstemr.f 2017-06-17 22:46:53.000000000 +0000 @@ -239,7 +239,7 @@ *> *> \param[out] ISUPPZ *> \verbatim -*> ISUPPZ is INTEGER ARRAY, dimension ( 2*max(1,M) ) +*> ISUPPZ is INTEGER array, dimension ( 2*max(1,M) ) *> The support of the eigenvectors in Z, i.e., the indices *> indicating the nonzero elements in Z. The i-th computed eigenvector *> is nonzero only in elements ISUPPZ( 2*i-1 ) through @@ -338,7 +338,7 @@ $ M, W, Z, LDZ, NZC, ISUPPZ, TRYRAC, WORK, LWORK, $ IWORK, LIWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 diff -Nru lapack-3.7.0/SRC/zsycon_3.f lapack-3.7.1/SRC/zsycon_3.f --- lapack-3.7.0/SRC/zsycon_3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zsycon_3.f 2017-06-17 22:46:53.000000000 +0000 @@ -95,7 +95,7 @@ *> On entry, contains the superdiagonal (or subdiagonal) *> elements of the symmetric block diagonal matrix D *> with 1-by-1 or 2-by-2 diagonal blocks, where -*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; +*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. *> *> NOTE: For 1-by-1 diagonal block D(k), where @@ -149,7 +149,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16SYcomputational * @@ -157,7 +157,7 @@ * ================== *> \verbatim *> -*> December 2016, Igor Kozachenko, +*> June 2017, Igor Kozachenko, *> Computer Science Division, *> University of California, Berkeley *> @@ -171,10 +171,10 @@ SUBROUTINE ZSYCON_3( UPLO, N, A, LDA, E, IPIV, ANORM, RCOND, $ WORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/SRC/zsyconvf.f lapack-3.7.1/SRC/zsyconvf.f --- lapack-3.7.0/SRC/zsyconvf.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zsyconvf.f 2017-06-17 22:46:53.000000000 +0000 @@ -45,7 +45,7 @@ *> If parameter WAY = 'R': *> ZSYCONVF performs the conversion in reverse direction, i.e. *> converts the factorization output format used in ZSYTRF_RK -*> (or ZSYTRF_BK) provided on entry in parametes A and E into +*> (or ZSYTRF_BK) provided on entry in parameters A and E into *> the factorization output format used in ZSYTRF that is stored *> on exit in parameter A. It also coverts in place details of *> the intechanges stored in IPIV from the format used in ZSYTRF_RK @@ -192,7 +192,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16SYcomputational * @@ -201,7 +201,7 @@ *> *> \verbatim *> -*> December 2016, Igor Kozachenko, +*> June 2017, Igor Kozachenko, *> Computer Science Division, *> University of California, Berkeley *> @@ -209,10 +209,10 @@ * ===================================================================== SUBROUTINE ZSYCONVF( UPLO, WAY, N, A, LDA, E, IPIV, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO, WAY diff -Nru lapack-3.7.0/SRC/zsyconvf_rook.f lapack-3.7.1/SRC/zsyconvf_rook.f --- lapack-3.7.0/SRC/zsyconvf_rook.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zsyconvf_rook.f 2017-06-17 22:46:53.000000000 +0000 @@ -44,7 +44,7 @@ *> If parameter WAY = 'R': *> ZSYCONVF_ROOK performs the conversion in reverse direction, i.e. *> converts the factorization output format used in ZSYTRF_RK -*> (or ZSYTRF_BK) provided on entry in parametes A and E into +*> (or ZSYTRF_BK) provided on entry in parameters A and E into *> the factorization output format used in ZSYTRF_ROOK that is stored *> on exit in parameter A. IPIV format for ZSYTRF_ROOK and *> ZSYTRF_RK (or ZSYTRF_BK) is the same and is not converted. @@ -183,7 +183,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16SYcomputational * @@ -192,7 +192,7 @@ *> *> \verbatim *> -*> December 2016, Igor Kozachenko, +*> June 2017, Igor Kozachenko, *> Computer Science Division, *> University of California, Berkeley *> @@ -200,10 +200,10 @@ * ===================================================================== SUBROUTINE ZSYCONVF_ROOK( UPLO, WAY, N, A, LDA, E, IPIV, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO, WAY diff -Nru lapack-3.7.0/SRC/zsytrf_aa.f lapack-3.7.1/SRC/zsytrf_aa.f --- lapack-3.7.0/SRC/zsytrf_aa.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zsytrf_aa.f 2017-06-17 22:46:53.000000000 +0000 @@ -114,11 +114,7 @@ *> \verbatim *> INFO is INTEGER *> = 0: successful exit -*> < 0: if INFO = -i, the i-th argument had an illegal value -*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization -*> has been completed, but the block diagonal matrix D is -*> exactly singular, and division by zero will occur if it -*> is used to solve a system of equations. +*> < 0: if INFO = -i, the i-th argument had an illegal value. *> \endverbatim * * Authors: @@ -159,7 +155,7 @@ * * .. Local Scalars .. LOGICAL LQUERY, UPPER - INTEGER J, LWKOPT, IINFO + INTEGER J, LWKOPT INTEGER NB, MJ, NJ, K1, K2, J1, J2, J3, JB COMPLEX*16 ALPHA * .. @@ -214,13 +210,10 @@ ENDIF IPIV( 1 ) = 1 IF ( N.EQ.1 ) THEN - IF ( A( 1, 1 ).EQ.ZERO ) THEN - INFO = 1 - END IF RETURN END IF * -* Adjubst block size based on the workspace size +* Adjust block size based on the workspace size * IF( LWORK.LT.((1+NB)*N) ) THEN NB = ( LWORK-N ) / N @@ -260,11 +253,7 @@ * CALL ZLASYF_AA( UPLO, 2-K1, N-J, JB, $ A( MAX(1, J), J+1 ), LDA, - $ IPIV( J+1 ), WORK, N, WORK( N*NB+1 ), - $ IINFO ) - IF( (IINFO.GT.0) .AND. (INFO.EQ.0) ) THEN - INFO = IINFO+J - ENDIF + $ IPIV( J+1 ), WORK, N, WORK( N*NB+1 ) ) * * Ajust IPIV and apply it back (J-th step picks (J+1)-th pivot) * @@ -383,10 +372,7 @@ * CALL ZLASYF_AA( UPLO, 2-K1, N-J, JB, $ A( J+1, MAX(1, J) ), LDA, - $ IPIV( J+1 ), WORK, N, WORK( N*NB+1 ), IINFO) - IF( (IINFO.GT.0) .AND. (INFO.EQ.0) ) THEN - INFO = IINFO+J - ENDIF + $ IPIV( J+1 ), WORK, N, WORK( N*NB+1 ) ) * * Ajust IPIV and apply it back (J-th step picks (J+1)-th pivot) * diff -Nru lapack-3.7.0/SRC/zsytri2x.f lapack-3.7.1/SRC/zsytri2x.f --- lapack-3.7.0/SRC/zsytri2x.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zsytri2x.f 2017-06-17 22:46:53.000000000 +0000 @@ -87,7 +87,7 @@ *> *> \param[out] WORK *> \verbatim -*> WORK is COMPLEX*16 array, dimension (N+NNB+1,NNB+3) +*> WORK is COMPLEX*16 array, dimension (N+NB+1,NB+3) *> \endverbatim *> *> \param[in] NB @@ -113,17 +113,17 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16SYcomputational * * ===================================================================== SUBROUTINE ZSYTRI2X( UPLO, N, A, LDA, IPIV, WORK, NB, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/SRC/zsytri_3.f lapack-3.7.1/SRC/zsytri_3.f --- lapack-3.7.0/SRC/zsytri_3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zsytri_3.f 2017-06-17 22:46:53.000000000 +0000 @@ -102,7 +102,7 @@ *> On entry, contains the superdiagonal (or subdiagonal) *> elements of the symmetric block diagonal matrix D *> with 1-by-1 or 2-by-2 diagonal blocks, where -*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; +*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. *> *> NOTE: For 1-by-1 diagonal block D(k), where @@ -152,7 +152,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16SYcomputational * @@ -160,7 +160,7 @@ * ================== *> \verbatim *> -*> December 2016, Igor Kozachenko, +*> June 2017, Igor Kozachenko, *> Computer Science Division, *> University of California, Berkeley *> @@ -170,10 +170,10 @@ SUBROUTINE ZSYTRI_3( UPLO, N, A, LDA, E, IPIV, WORK, LWORK, $ INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/SRC/zsytri_3x.f lapack-3.7.1/SRC/zsytri_3x.f --- lapack-3.7.0/SRC/zsytri_3x.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zsytri_3x.f 2017-06-17 22:46:53.000000000 +0000 @@ -99,7 +99,7 @@ *> On entry, contains the superdiagonal (or subdiagonal) *> elements of the symmetric block diagonal matrix D *> with 1-by-1 or 2-by-2 diagonal blocks, where -*> If UPLO = 'U': E(i) = D(i-1,i), i=2:N, E(1) not refernced; +*> If UPLO = 'U': E(i) = D(i-1,i), i=2:N, E(1) not referenced; *> If UPLO = 'L': E(i) = D(i+1,i), i=1:N-1, E(N) not referenced. *> *> NOTE: For 1-by-1 diagonal block D(k), where @@ -142,7 +142,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16SYcomputational * @@ -150,7 +150,7 @@ * ================== *> \verbatim *> -*> December 2016, Igor Kozachenko, +*> June 2017, Igor Kozachenko, *> Computer Science Division, *> University of California, Berkeley *> @@ -159,10 +159,10 @@ * ===================================================================== SUBROUTINE ZSYTRI_3X( UPLO, N, A, LDA, E, IPIV, WORK, NB, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/SRC/zsytrs_3.f lapack-3.7.1/SRC/zsytrs_3.f --- lapack-3.7.0/SRC/zsytrs_3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zsytrs_3.f 2017-06-17 22:46:53.000000000 +0000 @@ -99,7 +99,7 @@ *> On entry, contains the superdiagonal (or subdiagonal) *> elements of the symmetric block diagonal matrix D *> with 1-by-1 or 2-by-2 diagonal blocks, where -*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; +*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. *> *> NOTE: For 1-by-1 diagonal block D(k), where @@ -142,7 +142,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16SYcomputational * @@ -151,7 +151,7 @@ *> *> \verbatim *> -*> December 2016, Igor Kozachenko, +*> June 2017, Igor Kozachenko, *> Computer Science Division, *> University of California, Berkeley *> @@ -165,10 +165,10 @@ SUBROUTINE ZSYTRS_3( UPLO, N, NRHS, A, LDA, E, IPIV, B, LDB, $ INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/SRC/zsytrs_aa.f lapack-3.7.1/SRC/zsytrs_aa.f --- lapack-3.7.0/SRC/zsytrs_aa.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zsytrs_aa.f 2017-06-17 22:46:53.000000000 +0000 @@ -66,7 +66,7 @@ *> of the matrix B. NRHS >= 0. *> \endverbatim *> -*> \param[in,out] A +*> \param[in] A *> \verbatim *> A is COMPLEX*16 array, dimension (LDA,N) *> Details of factors computed by ZSYTRF_AA. @@ -121,7 +121,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16SYcomputational * @@ -129,10 +129,10 @@ SUBROUTINE ZSYTRS_AA( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, $ WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * IMPLICIT NONE * diff -Nru lapack-3.7.0/SRC/ztgex2.f lapack-3.7.1/SRC/ztgex2.f --- lapack-3.7.0/SRC/ztgex2.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/ztgex2.f 2017-06-17 22:46:53.000000000 +0000 @@ -76,7 +76,7 @@ *> *> \param[in,out] A *> \verbatim -*> A is COMPLEX*16 arrays, dimensions (LDA,N) +*> A is COMPLEX*16 array, dimensions (LDA,N) *> On entry, the matrix A in the pair (A, B). *> On exit, the updated matrix A. *> \endverbatim @@ -89,7 +89,7 @@ *> *> \param[in,out] B *> \verbatim -*> B is COMPLEX*16 arrays, dimensions (LDB,N) +*> B is COMPLEX*16 array, dimensions (LDB,N) *> On entry, the matrix B in the pair (A, B). *> On exit, the updated matrix B. *> \endverbatim @@ -102,7 +102,7 @@ *> *> \param[in,out] Q *> \verbatim -*> Q is COMPLEX*16 array, dimension (LDZ,N) +*> Q is COMPLEX*16 array, dimension (LDQ,N) *> If WANTQ = .TRUE, on entry, the unitary matrix Q. On exit, *> the updated matrix Q. *> Not referenced if WANTQ = .FALSE.. @@ -153,7 +153,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16GEauxiliary * @@ -190,10 +190,10 @@ SUBROUTINE ZTGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z, $ LDZ, J1, INFO ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. LOGICAL WANTQ, WANTZ diff -Nru lapack-3.7.0/SRC/ztgexc.f lapack-3.7.1/SRC/ztgexc.f --- lapack-3.7.0/SRC/ztgexc.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/ztgexc.f 2017-06-17 22:46:53.000000000 +0000 @@ -102,7 +102,7 @@ *> *> \param[in,out] Q *> \verbatim -*> Q is COMPLEX*16 array, dimension (LDZ,N) +*> Q is COMPLEX*16 array, dimension (LDQ,N) *> On entry, if WANTQ = .TRUE., the unitary matrix Q. *> On exit, the updated matrix Q. *> If WANTQ = .FALSE., Q is not referenced. @@ -163,7 +163,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16GEcomputational * @@ -200,10 +200,10 @@ SUBROUTINE ZTGEXC( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z, $ LDZ, IFST, ILST, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. LOGICAL WANTQ, WANTZ diff -Nru lapack-3.7.0/SRC/ztgsen.f lapack-3.7.1/SRC/ztgsen.f --- lapack-3.7.0/SRC/ztgsen.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/ztgsen.f 2017-06-17 22:46:53.000000000 +0000 @@ -72,7 +72,7 @@ * *> \param[in] IJOB *> \verbatim -*> IJOB is integer +*> IJOB is INTEGER *> Specifies whether condition numbers are required for the *> cluster of eigenvalues (PL and PR) or the deflating subspaces *> (Difu and Difl): @@ -433,7 +433,7 @@ $ ALPHA, BETA, Q, LDQ, Z, LDZ, M, PL, PR, DIF, $ WORK, LWORK, IWORK, LIWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 diff -Nru lapack-3.7.0/SRC/ztplqt2.f lapack-3.7.1/SRC/ztplqt2.f --- lapack-3.7.0/SRC/ztplqt2.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/ztplqt2.f 2017-06-17 22:46:53.000000000 +0000 @@ -65,7 +65,7 @@ *> *> \param[in,out] A *> \verbatim -*> A is COMPLEX*16 array, dimension (LDA,N) +*> A is COMPLEX*16 array, dimension (LDA,M) *> On entry, the lower triangular M-by-M matrix A. *> On exit, the elements on and below the diagonal of the array *> contain the lower triangular matrix L. @@ -74,7 +74,7 @@ *> \param[in] LDA *> \verbatim *> LDA is INTEGER -*> The leading dimension of the array A. LDA >= max(1,N). +*> The leading dimension of the array A. LDA >= max(1,M). *> \endverbatim *> *> \param[in,out] B @@ -119,7 +119,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleOTHERcomputational * @@ -133,7 +133,7 @@ *> C = [ A ][ B ] *> *> -*> where A is an lower triangular N-by-N matrix, and B is M-by-N pentagonal +*> where A is an lower triangular M-by-M matrix, and B is M-by-N pentagonal *> matrix consisting of a M-by-(N-L) rectangular matrix B1 left of a M-by-L *> upper trapezoidal matrix B2: *> @@ -149,13 +149,13 @@ *> above the diagonal (of A) in the M-by-(M+N) input matrix C *> *> C = [ A ][ B ] -*> [ A ] <- lower triangular N-by-N +*> [ A ] <- lower triangular M-by-M *> [ B ] <- M-by-N pentagonal *> *> so that W can be represented as *> *> W = [ I ][ V ] -*> [ I ] <- identity, N-by-N +*> [ I ] <- identity, M-by-M *> [ V ] <- M-by-N, same form as B. *> *> Thus, all of information needed for W is contained on exit in B, which @@ -177,10 +177,10 @@ * ===================================================================== SUBROUTINE ZTPLQT2( M, N, L, A, LDA, B, LDB, T, LDT, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDB, LDT, N, M, L diff -Nru lapack-3.7.0/SRC/ztplqt.f lapack-3.7.1/SRC/ztplqt.f --- lapack-3.7.0/SRC/ztplqt.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/ztplqt.f 2017-06-17 22:46:53.000000000 +0000 @@ -73,8 +73,8 @@ *> *> \param[in,out] A *> \verbatim -*> A is COMPLEX*16 array, dimension (LDA,N) -*> On entry, the lower triangular N-by-N matrix A. +*> A is COMPLEX*16 array, dimension (LDA,M) +*> On entry, the lower triangular M-by-M matrix A. *> On exit, the elements on and below the diagonal of the array *> contain the lower triangular matrix L. *> \endverbatim @@ -82,7 +82,7 @@ *> \param[in] LDA *> \verbatim *> LDA is INTEGER -*> The leading dimension of the array A. LDA >= max(1,N). +*> The leading dimension of the array A. LDA >= max(1,M). *> \endverbatim *> *> \param[in,out] B @@ -132,7 +132,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleOTHERcomputational * @@ -146,26 +146,26 @@ *> C = [ A ] [ B ] *> *> -*> where A is an lower triangular N-by-N matrix, and B is M-by-N pentagonal +*> where A is an lower triangular M-by-M matrix, and B is M-by-N pentagonal *> matrix consisting of a M-by-(N-L) rectangular matrix B1 on left of a M-by-L *> upper trapezoidal matrix B2: *> [ B ] = [ B1 ] [ B2 ] *> [ B1 ] <- M-by-(N-L) rectangular -*> [ B2 ] <- M-by-L upper trapezoidal. +*> [ B2 ] <- M-by-L lower trapezoidal. *> *> The lower trapezoidal matrix B2 consists of the first L columns of a -*> N-by-N lower triangular matrix, where 0 <= L <= MIN(M,N). If L=0, +*> M-by-M lower triangular matrix, where 0 <= L <= MIN(M,N). If L=0, *> B is rectangular M-by-N; if M=L=N, B is lower triangular. *> *> The matrix W stores the elementary reflectors H(i) in the i-th row *> above the diagonal (of A) in the M-by-(M+N) input matrix C *> [ C ] = [ A ] [ B ] -*> [ A ] <- lower triangular N-by-N +*> [ A ] <- lower triangular M-by-M *> [ B ] <- M-by-N pentagonal *> *> so that W can be represented as *> [ W ] = [ I ] [ V ] -*> [ I ] <- identity, N-by-N +*> [ I ] <- identity, M-by-M *> [ V ] <- M-by-N, same form as B. *> *> Thus, all of information needed for W is contained on exit in B, which @@ -189,10 +189,10 @@ SUBROUTINE ZTPLQT( M, N, L, MB, A, LDA, B, LDB, T, LDT, WORK, $ INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDB, LDT, N, M, L, MB diff -Nru lapack-3.7.0/SRC/ztpmlqt.f lapack-3.7.1/SRC/ztpmlqt.f --- lapack-3.7.0/SRC/ztpmlqt.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/ztpmlqt.f 2017-06-17 22:46:53.000000000 +0000 @@ -6,7 +6,7 @@ * http://www.netlib.org/lapack/explore-html/ * *> \htmlonly -*> Download DTPMQRT + dependencies +*> Download ZTPMLQT + dependencies *> *> [TGZ] *> @@ -36,9 +36,9 @@ *> *> \verbatim *> -*> ZTPMQRT applies a complex orthogonal matrix Q obtained from a -*> "triangular-pentagonal" real block reflector H to a general -*> real matrix C, which consists of two blocks A and B. +*> ZTPMLQT applies a complex orthogonal matrix Q obtained from a +*> "triangular-pentagonal" complex block reflector H to a general +*> complex matrix C, which consists of two blocks A and B. *> \endverbatim * * Arguments: @@ -47,15 +47,15 @@ *> \param[in] SIDE *> \verbatim *> SIDE is CHARACTER*1 -*> = 'L': apply Q or Q**C from the Left; -*> = 'R': apply Q or Q**C from the Right. +*> = 'L': apply Q or Q**H from the Left; +*> = 'R': apply Q or Q**H from the Right. *> \endverbatim *> *> \param[in] TRANS *> \verbatim *> TRANS is CHARACTER*1 *> = 'N': No transpose, apply Q; -*> = 'C': Transpose, apply Q**C. +*> = 'C': Transpose, apply Q**H. *> \endverbatim *> *> \param[in] M @@ -128,7 +128,7 @@ *> (LDA,K) if SIDE = 'R' *> On entry, the K-by-N or M-by-K matrix A. *> On exit, A is overwritten by the corresponding block of -*> Q*C or Q**C*C or C*Q or C*Q**C. See Further Details. +*> Q*C or Q**H*C or C*Q or C*Q**H. See Further Details. *> \endverbatim *> *> \param[in] LDA @@ -144,7 +144,7 @@ *> B is COMPLEX*16 array, dimension (LDB,N) *> On entry, the M-by-N matrix B. *> On exit, B is overwritten by the corresponding block of -*> Q*C or Q**C*C or C*Q or C*Q**C. See Further Details. +*> Q*C or Q**H*C or C*Q or C*Q**H. See Further Details. *> \endverbatim *> *> \param[in] LDB @@ -175,7 +175,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup doubleOTHERcomputational * @@ -205,21 +205,21 @@ *> *> If TRANS='N' and SIDE='L', C is on exit replaced with Q * C. *> -*> If TRANS='C' and SIDE='L', C is on exit replaced with Q**C * C. +*> If TRANS='C' and SIDE='L', C is on exit replaced with Q**H * C. *> *> If TRANS='N' and SIDE='R', C is on exit replaced with C * Q. *> -*> If TRANS='C' and SIDE='R', C is on exit replaced with C * Q**C. +*> If TRANS='C' and SIDE='R', C is on exit replaced with C * Q**H. *> \endverbatim *> * ===================================================================== SUBROUTINE ZTPMLQT( SIDE, TRANS, M, N, K, L, MB, V, LDV, T, LDT, $ A, LDA, B, LDB, WORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER SIDE, TRANS diff -Nru lapack-3.7.0/SRC/ztrevc3.f lapack-3.7.1/SRC/ztrevc3.f --- lapack-3.7.0/SRC/ztrevc3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/ztrevc3.f 2017-06-17 22:46:53.000000000 +0000 @@ -222,7 +222,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * * @precisions fortran z -> c * @@ -247,10 +247,10 @@ $ LDVR, MM, M, WORK, LWORK, RWORK, LRWORK, INFO) IMPLICIT NONE * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER HOWMNY, SIDE @@ -287,7 +287,7 @@ EXTERNAL LSAME, ILAENV, IZAMAX, DLAMCH, DZASUM * .. * .. External Subroutines .. - EXTERNAL XERBLA, ZCOPY, ZDSCAL, ZGEMV, ZLATRS + EXTERNAL XERBLA, ZCOPY, ZDSCAL, ZGEMV, ZLATRS, $ ZGEMM, DLABAD, ZLASET * .. * .. Intrinsic Functions .. diff -Nru lapack-3.7.0/SRC/zunbdb1.f lapack-3.7.1/SRC/zunbdb1.f --- lapack-3.7.0/SRC/zunbdb1.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zunbdb1.f 2017-06-17 22:46:53.000000000 +0000 @@ -32,7 +32,7 @@ * * *> \par Purpose: -*> ============= +* ============= *> *>\verbatim *> @@ -203,7 +203,7 @@ SUBROUTINE ZUNBDB1( M, P, Q, X11, LDX11, X21, LDX21, THETA, PHI, $ TAUP1, TAUP2, TAUQ1, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * July 2012 diff -Nru lapack-3.7.0/SRC/zunbdb2.f lapack-3.7.1/SRC/zunbdb2.f --- lapack-3.7.0/SRC/zunbdb2.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zunbdb2.f 2017-06-17 22:46:53.000000000 +0000 @@ -32,7 +32,7 @@ * * *> \par Purpose: -*> ============= +* ============= *> *>\verbatim *> @@ -201,7 +201,7 @@ SUBROUTINE ZUNBDB2( M, P, Q, X11, LDX11, X21, LDX21, THETA, PHI, $ TAUP1, TAUP2, TAUQ1, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * July 2012 diff -Nru lapack-3.7.0/SRC/zunbdb3.f lapack-3.7.1/SRC/zunbdb3.f --- lapack-3.7.0/SRC/zunbdb3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zunbdb3.f 2017-06-17 22:46:53.000000000 +0000 @@ -32,7 +32,7 @@ * * *> \par Purpose: -*> ============= +* ============= *> *>\verbatim *> @@ -201,7 +201,7 @@ SUBROUTINE ZUNBDB3( M, P, Q, X11, LDX11, X21, LDX21, THETA, PHI, $ TAUP1, TAUP2, TAUQ1, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * July 2012 diff -Nru lapack-3.7.0/SRC/zunbdb4.f lapack-3.7.1/SRC/zunbdb4.f --- lapack-3.7.0/SRC/zunbdb4.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zunbdb4.f 2017-06-17 22:46:53.000000000 +0000 @@ -33,7 +33,7 @@ * * *> \par Purpose: -*> ============= +* ============= *> *>\verbatim *> @@ -213,7 +213,7 @@ $ TAUP1, TAUP2, TAUQ1, PHANTOM, WORK, LWORK, $ INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * July 2012 diff -Nru lapack-3.7.0/SRC/zunbdb5.f lapack-3.7.1/SRC/zunbdb5.f --- lapack-3.7.0/SRC/zunbdb5.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zunbdb5.f 2017-06-17 22:46:53.000000000 +0000 @@ -31,7 +31,7 @@ * * *> \par Purpose: -*> ============= +* ============= *> *>\verbatim *> @@ -156,7 +156,7 @@ SUBROUTINE ZUNBDB5( M1, M2, N, X1, INCX1, X2, INCX2, Q1, LDQ1, Q2, $ LDQ2, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * July 2012 diff -Nru lapack-3.7.0/SRC/zunbdb6.f lapack-3.7.1/SRC/zunbdb6.f --- lapack-3.7.0/SRC/zunbdb6.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zunbdb6.f 2017-06-17 22:46:53.000000000 +0000 @@ -31,7 +31,7 @@ * * *> \par Purpose: -*> ============= +* ============= *> *>\verbatim *> @@ -154,7 +154,7 @@ SUBROUTINE ZUNBDB6( M1, M2, N, X1, INCX1, X2, INCX2, Q1, LDQ1, Q2, $ LDQ2, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * July 2012 diff -Nru lapack-3.7.0/SRC/zuncsd2by1.f lapack-3.7.1/SRC/zuncsd2by1.f --- lapack-3.7.0/SRC/zuncsd2by1.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zuncsd2by1.f 2017-06-17 22:46:53.000000000 +0000 @@ -39,7 +39,7 @@ * * *> \par Purpose: -*> ============= +* ============= *> *>\verbatim *> @@ -254,7 +254,7 @@ $ LDV1T, WORK, LWORK, RWORK, LRWORK, IWORK, $ INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * July 2012 diff -Nru lapack-3.7.0/SRC/zuncsd.f lapack-3.7.1/SRC/zuncsd.f --- lapack-3.7.0/SRC/zuncsd.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zuncsd.f 2017-06-17 22:46:53.000000000 +0000 @@ -188,7 +188,7 @@ *> *> \param[out] U1 *> \verbatim -*> U1 is COMPLEX*16 array, dimension (P) +*> U1 is COMPLEX*16 array, dimension (LDU1,P) *> If JOBU1 = 'Y', U1 contains the P-by-P unitary matrix U1. *> \endverbatim *> @@ -201,7 +201,7 @@ *> *> \param[out] U2 *> \verbatim -*> U2 is COMPLEX*16 array, dimension (M-P) +*> U2 is COMPLEX*16 array, dimension (LDU2,M-P) *> If JOBU2 = 'Y', U2 contains the (M-P)-by-(M-P) unitary *> matrix U2. *> \endverbatim @@ -215,7 +215,7 @@ *> *> \param[out] V1T *> \verbatim -*> V1T is COMPLEX*16 array, dimension (Q) +*> V1T is COMPLEX*16 array, dimension (LDV1T,Q) *> If JOBV1T = 'Y', V1T contains the Q-by-Q matrix unitary *> matrix V1**H. *> \endverbatim @@ -229,7 +229,7 @@ *> *> \param[out] V2T *> \verbatim -*> V2T is COMPLEX*16 array, dimension (M-Q) +*> V2T is COMPLEX*16 array, dimension (LDV2T,M-Q) *> If JOBV2T = 'Y', V2T contains the (M-Q)-by-(M-Q) unitary *> matrix V2**H. *> \endverbatim @@ -308,7 +308,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16OTHERcomputational * @@ -320,10 +320,10 @@ $ LDV2T, WORK, LWORK, RWORK, LRWORK, $ IWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER JOBU1, JOBU2, JOBV1T, JOBV2T, SIGNS, TRANS diff -Nru lapack-3.7.0/SRC/zunm22.f lapack-3.7.1/SRC/zunm22.f --- lapack-3.7.0/SRC/zunm22.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/SRC/zunm22.f 2017-06-17 22:46:53.000000000 +0000 @@ -52,8 +52,8 @@ *> N2-by-N2 upper triangular matrix. *> \endverbatim * -* Arguments -* ========= +* Arguments: +* ========== * *> \param[in] SIDE *> \verbatim @@ -162,7 +162,7 @@ SUBROUTINE ZUNM22( SIDE, TRANS, M, N, N1, N2, Q, LDQ, C, LDC, $ WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.6.0) -- +* -- LAPACK computational routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * January 2015 diff -Nru lapack-3.7.0/TESTING/dbal.in lapack-3.7.1/TESTING/dbal.in --- lapack-3.7.0/TESTING/dbal.in 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/dbal.in 2017-06-17 22:46:53.000000000 +0000 @@ -87,13 +87,13 @@ 0.0000D+00 0.8192D+04 0.0000D+00 0.0000D+00 0.8000D+01 1 5 - 1.0000D+00 0.0000D-03 0.0000D-03 0.0000D-03 250.0000D-03 + 1.0000D+00 0.0000D-03 0.0000D-03 0.0000D-03 2.0000D+00 0.0000D-03 2.0000D+00 1.0240D+03 16.0000D+00 16.0000D+00 - 256.0000D-03 1.0000D-03 4.0000D+00 0.0000D-03 2.0480D+03 + 3.2000D-02 1.0000D-03 4.0000D+00 0.0000D-03 2.0480D+03 0.0000D-03 250.0000D-03 16.0000D+00 4.0000D+00 4.0000D+00 0.0000D-03 2.0480D+03 0.0000D-03 0.0000D-03 8.0000D+00 - 64.0000D+00 500.0000D-03 62.5000D-03 4.0000D+00 2.0000D+00 + 8.0000D+00 500.0000D-03 62.5000D-03 4.0000D+00 2.0000D+00 4 0.1000D+01 0.1000D+07 0.1000D+07 0.1000D+07 @@ -167,15 +167,15 @@ 0.0000D+00 0.8000D+01 0.0000D+00 0.4000D-02 0.1250D+00 -0.2000D+00 0.3000D+01 2 5 - 6.4000D+01 2.5000D-01 5.00000D-01 0.0000D+00 0.0000D+00 1.0000D+00 -2.0000D+00 - 0.0000D+00 4.0000D+00 2.00000D+00 4.0960D+00 1.6000D+00 0.0000D+00 1.0240D+01 - 0.0000D+00 5.0000D-01 3.00000D+00 4.0960D+00 1.0000D+00 0.0000D+00 -6.4000D+00 - 0.0000D+00 1.0000D+00 -3.90625D+00 1.0000D+00 -3.1250D+00 0.0000D+00 8.0000D+00 - 0.0000D+00 -2.0000D+00 4.00000D+00 1.6000D+00 2.0000D+00 -8.0000D+00 8.0000D+00 + 6.4000D+01 1.0000D+00 5.00000D-01 0.0000D+00 0.0000D+00 1.0000D+00 -2.0000D+00 + 0.0000D+00 4.0000D+00 5.00000D-01 1.0240D+00 8.0000D-01 0.0000D+00 2.5600D+00 + 0.0000D+00 2.0000D+00 3.00000D+00 4.0960D+00 2.0000D+00 0.0000D+00 -6.4000D+00 + 0.0000D+00 4.0000D+00 -3.90625D+00 1.0000D+00 -6.2500D+00 0.0000D+00 8.0000D+00 + 0.0000D+00 -4.0000D+00 2.00000D+00 8.0000D-01 2.0000D+00 -4.0000D+00 4.0000D+00 0.0000D+00 0.0000D+00 0.00000D+00 0.0000D+00 0.0000D+00 6.0000D+00 1.0000D+00 0.0000D+00 0.0000D+00 0.00000D+00 0.0000D+00 0.0000D+00 0.0000D+00 0.0000D+00 - 3.0000D+00 1.953125D-03 3.1250D-02 3.2000D+01 2.5000D-01 1.0000D+00 6.0000D+00 + 3.0000D+00 7.812500D-03 3.1250D-02 3.2000D+01 5.0000D-01 1.0000D+00 6.0000D+00 5 0.1000D+04 0.2000D+01 0.3000D+01 0.4000D+01 0.5000D+06 @@ -185,13 +185,13 @@ 0.6000D+01 0.2000D+03 0.1000D+01 0.6000D+03 0.3000D+01 1 5 - 1.0000D+03 3.1250D-02 3.7500D-01 6.2500D-02 3.90625D+03 - 5.7600D+02 0.0000D+00 1.6000D-03 1.0000D+00 1.5000D+00 - 0.0000D+00 -3.7500D+01 2.0000D+00 1.2500D-01 6.2500D-02 - 5.7600D+02 2.0000D-03 8.0000D+00 1.0000D+00 -5.0000D+02 - 7.6800D+02 4.0000D+02 1.6000D+01 1.2000D+03 3.0000D+00 + 1.0000D+03 3.1250D-02 3.7500D-01 3.1250D-02 1.95312500D+03 + 5.7600D+02 0.0000D+00 1.6000D-03 5.0000D-01 7.50000000D-01 + 0.0000D+00 -3.7500D+01 2.0000D+00 6.2500D-02 3.12500000D-02 + 1.1520D+03 4.0000D-03 1.6000D+01 1.0000D+00 -5.00000000D+02 + 1.5360D+03 8.0000D+02 3.2000D+01 1.2000D+03 3.00000000D+00 - 1.2800D+02 2.0000D+00 1.6000D+01 2.0000D+00 1.0000D+00 + 3.2000D+01 5.0000D-01 4.0000D+00 2.5000D-01 1.2500D-01 6 1.0000D+00 1.0000D+120 0.0000D+00 0.0000D+00 0.0000D+00 0.0000D+00 @@ -202,14 +202,13 @@ 0.0000D+00 0.0000D+00 0.0000D+00 0.0000D+00 1.0000D-120 1.0000D+00 1 6 - 1.000000000000000000D+00 6.344854593289122931D+03 0.000000000000000000D+00 0.000000000000000000D+00 0.000000000000000000D+00 0.000000000000000000D+00 - 1.576080247855779135D-04 1.000000000000000000D+00 6.344854593289122931D+03 0.000000000000000000D+00 0.000000000000000000D+00 0.000000000000000000D+00 - 0.000000000000000000D+00 1.576080247855779135D-04 1.000000000000000000D+00 3.172427296644561466D+03 0.000000000000000000D+00 0.000000000000000000D+00 - 0.000000000000000000D+00 0.000000000000000000D+00 3.152160495711558270D-04 1.000000000000000000D+00 1.586213648322280733D+03 0.000000000000000000D+00 - 0.000000000000000000D+00 0.000000000000000000D+00 0.000000000000000000D+00 6.304320991423116539D-04 1.000000000000000000D+00 1.586213648322280733D+03 - 0.000000000000000000D+00 0.000000000000000000D+00 0.000000000000000000D+00 0.000000000000000000D+00 6.304320991423116539D-04 1.000000000000000000D+00 - - 2.494800386918399765D+291 1.582914569427869018D+175 1.004336277661868922D+59 3.186183822264904554D-58 5.053968264940243633D-175 8.016673440035891112D-292 +0.10000000000000000000D+01 0.63448545932891229313D+04 0.00000000000000000000D+00 0.00000000000000000000D+00 0.00000000000000000000D+00 0.00000000000000000000D+00 +0.15760802478557791348D-03 0.10000000000000000000D+01 0.63448545932891229313D+04 0.00000000000000000000D+00 0.00000000000000000000D+00 0.00000000000000000000D+00 +0.00000000000000000000D+00 0.15760802478557791348D-03 0.10000000000000000000D+01 0.31724272966445614657D+04 0.00000000000000000000D+00 0.00000000000000000000D+00 +0.00000000000000000000D+00 0.00000000000000000000D+00 0.31521604957115582695D-03 0.10000000000000000000D+01 0.15862136483222807328D+04 0.00000000000000000000D+00 +0.00000000000000000000D+00 0.00000000000000000000D+00 0.00000000000000000000D+00 0.63043209914231165391D-03 0.10000000000000000000D+01 0.79310682416114036641D+03 +0.00000000000000000000D+00 0.00000000000000000000D+00 0.00000000000000000000D+00 0.00000000000000000000D+00 0.12608641982846233078D-02 0.10000000000000000000D+01 + 2.494800386918399765D+291 1.582914569427869018D+175 1.004336277661868922D+59 3.186183822264904554D-58 5.053968264940243633D-175 0.40083367200179455560D-291; 0 diff -Nru lapack-3.7.0/TESTING/EIG/cchkhb2stg.f lapack-3.7.1/TESTING/EIG/cchkhb2stg.f --- lapack-3.7.0/TESTING/EIG/cchkhb2stg.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/EIG/cchkhb2stg.f 2017-06-17 22:46:53.000000000 +0000 @@ -313,7 +313,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex_eig * @@ -323,10 +323,10 @@ $ D2, D3, U, LDU, WORK, LWORK, RWORK, RESULT, $ INFO ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDU, LWORK, NOUNIT, NSIZES, NTYPES, @@ -373,7 +373,7 @@ * .. * .. External Subroutines .. EXTERNAL SLASUM, XERBLA, CHBT21, CHBTRD, CLACPY, CLASET, - $ CLATMR, CLATMS, CHBTRD_HB2ST, CSTEQR + $ CLATMR, CLATMS, CHETRD_HB2ST, CSTEQR * .. * .. Intrinsic Functions .. INTRINSIC ABS, REAL, CONJG, MAX, MIN, SQRT diff -Nru lapack-3.7.0/TESTING/EIG/cdrvst2stg.f lapack-3.7.1/TESTING/EIG/cdrvst2stg.f --- lapack-3.7.0/TESTING/EIG/cdrvst2stg.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/EIG/cdrvst2stg.f 2017-06-17 22:46:53.000000000 +0000 @@ -328,7 +328,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex_eig * @@ -338,10 +338,10 @@ $ LDU, V, TAU, Z, WORK, LWORK, RWORK, LRWORK, $ IWORK, LIWORK, RESULT, INFO ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDU, LIWORK, LRWORK, LWORK, NOUNIT, @@ -399,8 +399,7 @@ $ CHET22, CHPEV, CHPEVD, CHPEVX, CLACPY, CLASET, $ CHEEVD_2STAGE, CHEEVR_2STAGE, CHEEVX_2STAGE, $ CHEEV_2STAGE, CHBEV_2STAGE, CHBEVD_2STAGE, - $ CHBEVX_2STAGE, CHETRD_2STAGE, CHETRD_SY2SB, - $ CHETRD_SB2ST, CLATMR, CLATMS + $ CHBEVX_2STAGE, CLATMR, CLATMS * .. * .. Intrinsic Functions .. INTRINSIC ABS, REAL, INT, LOG, MAX, MIN, SQRT diff -Nru lapack-3.7.0/TESTING/EIG/cerrst.f lapack-3.7.1/TESTING/EIG/cerrst.f --- lapack-3.7.0/TESTING/EIG/cerrst.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/EIG/cerrst.f 2017-06-17 22:46:53.000000000 +0000 @@ -27,8 +27,8 @@ *> CHPEV, CHPEVX, CHPEVD, and CSTEDC. *> CHEEVD_2STAGE, CHEEVR_2STAGE, CHEEVX_2STAGE, *> CHEEV_2STAGE, CHBEV_2STAGE, CHBEVD_2STAGE, -*> CHBEVX_2STAGE, CHETRD_2STAGE, CHETRD_SY2SB, -*> CHETRD_SB2ST +*> CHBEVX_2STAGE, CHETRD_2STAGE, CHETRD_HE2HB, +*> CHETRD_HB2ST *> \endverbatim * * Arguments: @@ -54,17 +54,17 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex_eig * * ===================================================================== SUBROUTINE CERRST( PATH, NUNIT ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER*3 PATH @@ -100,8 +100,8 @@ $ CUNGTR, CUNMTR, CUPGTR, CUPMTR, $ CHEEVD_2STAGE, CHEEVR_2STAGE, CHEEVX_2STAGE, $ CHEEV_2STAGE, CHBEV_2STAGE, CHBEVD_2STAGE, - $ CHBEVX_2STAGE, CHETRD_2STAGE, CHETRD_SY2SB, - $ CHETRD_SB2ST + $ CHBEVX_2STAGE, CHETRD_2STAGE, CHETRD_HE2HB, + $ CHETRD_HB2ST * .. * .. Scalars in Common .. LOGICAL LERR, OK diff -Nru lapack-3.7.0/TESTING/EIG/cget02.f lapack-3.7.1/TESTING/EIG/cget02.f --- lapack-3.7.0/TESTING/EIG/cget02.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/EIG/cget02.f 2017-06-17 22:46:53.000000000 +0000 @@ -125,7 +125,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex_eig * @@ -133,10 +133,10 @@ SUBROUTINE CGET02( TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB, $ RWORK, RESID ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER TRANS @@ -154,7 +154,7 @@ REAL ZERO, ONE PARAMETER ( ZERO = 0.0E+0, ONE = 1.0E+0 ) COMPLEX CONE - PARAMETER ( CONE = 1.0E+0 ) + PARAMETER ( CONE = ( 1.0E+0, 0.0E+0 ) ) * .. * .. Local Scalars .. INTEGER J, N1, N2 @@ -191,7 +191,7 @@ * Exit with RESID = 1/EPS if ANORM = 0. * EPS = SLAMCH( 'Epsilon' ) - ANORM = CLANGE( '1', N1, N2, A, LDA, RWORK ) + ANORM = CLANGE( '1', M, N, A, LDA, RWORK ) IF( ANORM.LE.ZERO ) THEN RESID = ONE / EPS RETURN diff -Nru lapack-3.7.0/TESTING/EIG/clarhs.f lapack-3.7.1/TESTING/EIG/clarhs.f --- lapack-3.7.0/TESTING/EIG/clarhs.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/EIG/clarhs.f 2017-06-17 22:46:53.000000000 +0000 @@ -189,8 +189,8 @@ *> \param[out] INFO *> \verbatim *> INFO is INTEGER -*> = 0: successful exit -*> < 0: if INFO = -i, the i-th argument had an illegal value +*> = 0: successful exit +*> < 0: if INFO = -i, the i-th argument had an illegal value *> \endverbatim * * Authors: @@ -201,7 +201,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex_eig * @@ -209,10 +209,10 @@ SUBROUTINE CLARHS( PATH, XTYPE, UPLO, TRANS, M, N, KL, KU, NRHS, $ A, LDA, X, LDX, B, LDB, ISEED, INFO ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER TRANS, UPLO, XTYPE diff -Nru lapack-3.7.0/TESTING/EIG/CMakeLists.txt lapack-3.7.1/TESTING/EIG/CMakeLists.txt --- lapack-3.7.0/TESTING/EIG/CMakeLists.txt 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/EIG/CMakeLists.txt 2017-06-17 22:46:53.000000000 +0000 @@ -3,34 +3,13 @@ # The test files are organized as follows: # # AEIGTST -- Auxiliary test routines used in all precisions -# SCIGTST -- Auxiliary test routines used in REAL and COMPLEX -# DZIGTST -- Auxiliary test routines used in DOUBLE PRECISION and -# COMPLEX*16 +# SCIGTST -- Auxiliary test routines used in single precision +# DZIGTST -- Auxiliary test routines used in double precision # SEIGTST -- Single precision real test routines # CEIGTST -- Single precision complex test routines # DEIGTST -- Double precision real test routines # ZEIGTST -- Double precision complex test routines # -# Test programs can be generated for all or some of the four different -# precisions. Enter make followed by one or more of the data types -# desired. Some examples: -# make single -# make single complex -# make single double complex complex16 -# Alternatively, the command -# make -# without any arguments creates all four test programs. -# The executable files are called -# xeigtsts, xeigtstd, xeigtstc, and xeigtstz -# and are created in the next higher directory level. -# -# To remove the object files after the executable files have been -# created, enter -# make clean -# On some systems, you can force the source files to be recompiled by -# entering (for example) -# make single FRC=FRC -# ######################################################################## set(AEIGTST @@ -119,25 +98,21 @@ macro(add_eig_executable name) add_executable(${name} ${ARGN}) - target_link_libraries(${name} tmglib ${LAPACK_LIBRARIES}) + target_link_libraries(${name} tmglib ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) endmacro() if(BUILD_SINGLE) -add_eig_executable(xeigtsts ${SEIGTST} ${SCIGTST} ${AEIGTST} - ${SECOND_SRC}) +add_eig_executable(xeigtsts ${SEIGTST} ${SCIGTST} ${AEIGTST}) endif() if(BUILD_COMPLEX) -add_eig_executable(xeigtstc ${CEIGTST} ${SCIGTST} ${AEIGTST} - ${SECOND_SRC}) +add_eig_executable(xeigtstc ${CEIGTST} ${SCIGTST} ${AEIGTST}) endif() if(BUILD_DOUBLE) -add_eig_executable(xeigtstd ${DEIGTST} ${DZIGTST} ${AEIGTST} - ${DSECOND_SRC}) +add_eig_executable(xeigtstd ${DEIGTST} ${DZIGTST} ${AEIGTST}) endif() if(BUILD_COMPLEX16) -add_eig_executable(xeigtstz ${ZEIGTST} ${DZIGTST} ${AEIGTST} - ${DSECOND_SRC}) +add_eig_executable(xeigtstz ${ZEIGTST} ${DZIGTST} ${AEIGTST}) endif() diff -Nru lapack-3.7.0/TESTING/EIG/dchksb2stg.f lapack-3.7.1/TESTING/EIG/dchksb2stg.f --- lapack-3.7.0/TESTING/EIG/dchksb2stg.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/EIG/dchksb2stg.f 2017-06-17 22:46:53.000000000 +0000 @@ -307,7 +307,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup double_eig * @@ -316,10 +316,10 @@ $ ISEED, THRESH, NOUNIT, A, LDA, SD, SE, D1, $ D2, D3, U, LDU, WORK, LWORK, RESULT, INFO ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDU, LWORK, NOUNIT, NSIZES, NTYPES, @@ -363,7 +363,7 @@ * .. * .. External Subroutines .. EXTERNAL DLACPY, DLASET, DLASUM, DLATMR, DLATMS, DSBT21, - $ DSBTRD, XERBLA, DSBTRD_SB2ST, DSTEQR + $ DSBTRD, XERBLA, DSYTRD_SB2ST, DSTEQR * .. * .. Intrinsic Functions .. INTRINSIC ABS, DBLE, MAX, MIN, SQRT diff -Nru lapack-3.7.0/TESTING/EIG/dget02.f lapack-3.7.1/TESTING/EIG/dget02.f --- lapack-3.7.0/TESTING/EIG/dget02.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/EIG/dget02.f 2017-06-17 22:46:53.000000000 +0000 @@ -125,7 +125,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup double_eig * @@ -133,10 +133,10 @@ SUBROUTINE DGET02( TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB, $ RWORK, RESID ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER TRANS @@ -189,7 +189,7 @@ * Exit with RESID = 1/EPS if ANORM = 0. * EPS = DLAMCH( 'Epsilon' ) - ANORM = DLANGE( '1', N1, N2, A, LDA, RWORK ) + ANORM = DLANGE( '1', M, N, A, LDA, RWORK ) IF( ANORM.LE.ZERO ) THEN RESID = ONE / EPS RETURN diff -Nru lapack-3.7.0/TESTING/EIG/dlarhs.f lapack-3.7.1/TESTING/EIG/dlarhs.f --- lapack-3.7.0/TESTING/EIG/dlarhs.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/EIG/dlarhs.f 2017-06-17 22:46:53.000000000 +0000 @@ -184,8 +184,8 @@ *> \param[out] INFO *> \verbatim *> INFO is INTEGER -*> = 0: successful exit -*> < 0: if INFO = -i, the i-th argument had an illegal value +*> = 0: successful exit +*> < 0: if INFO = -i, the i-th argument had an illegal value *> \endverbatim * * Authors: @@ -196,7 +196,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup double_eig * @@ -204,10 +204,10 @@ SUBROUTINE DLARHS( PATH, XTYPE, UPLO, TRANS, M, N, KL, KU, NRHS, $ A, LDA, X, LDX, B, LDB, ISEED, INFO ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER TRANS, UPLO, XTYPE diff -Nru lapack-3.7.0/TESTING/EIG/Makefile lapack-3.7.1/TESTING/EIG/Makefile --- lapack-3.7.0/TESTING/EIG/Makefile 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/EIG/Makefile 2017-06-17 22:46:53.000000000 +0000 @@ -5,9 +5,8 @@ # The test files are organized as follows: # # AEIGTST -- Auxiliary test routines used in all precisions -# SCIGTST -- Auxiliary test routines used in REAL and COMPLEX -# DZIGTST -- Auxiliary test routines used in DOUBLE PRECISION and -# COMPLEX*16 +# SCIGTST -- Auxiliary test routines used in single precision +# DZIGTST -- Auxiliary test routines used in double precision # SEIGTST -- Single precision real test routines # CEIGTST -- Single precision complex test routines # DEIGTST -- Double precision real test routines @@ -24,11 +23,10 @@ # without any arguments creates all four test programs. # The executable files are called # xeigtsts, xeigtstd, xeigtstc, and xeigtstz -# and are created in the next higher directory level. # # To remove the object files after the executable files have been # created, enter -# make clean +# make cleanobj # On some systems, you can force the source files to be recompiled by # entering (for example) # make single FRC=FRC @@ -121,30 +119,22 @@ all: single complex double complex16 -single: ../xeigtsts -complex: ../xeigtstc -double: ../xeigtstd -complex16: ../xeigtstz - -../xeigtsts: $(SEIGTST) $(SCIGTST) $(AEIGTST) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) -o $@ \ - $(SEIGTST) $(SCIGTST) $(AEIGTST) ../../$(TMGLIB) \ - ../../$(LAPACKLIB) $(BLASLIB) - -../xeigtstc: $(CEIGTST) $(SCIGTST) $(AEIGTST) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) -o $@ \ - $(CEIGTST) $(SCIGTST) $(AEIGTST) ../../$(TMGLIB) \ - ../../$(LAPACKLIB) $(BLASLIB) - -../xeigtstd: $(DEIGTST) $(DZIGTST) $(AEIGTST) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) -o $@ \ - $(DEIGTST) $(DZIGTST) $(AEIGTST) ../../$(TMGLIB) \ - ../../$(LAPACKLIB) $(BLASLIB) - -../xeigtstz: $(ZEIGTST) $(DZIGTST) $(AEIGTST) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) -o $@ \ - $(ZEIGTST) $(DZIGTST) $(AEIGTST) ../../$(TMGLIB) \ - ../../$(LAPACKLIB) $(BLASLIB) +single: xeigtsts +complex: xeigtstc +double: xeigtstd +complex16: xeigtstz + +xeigtsts: $(SEIGTST) $(SCIGTST) $(AEIGTST) ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) + $(LOADER) $(LOADOPTS) -o $@ $^ + +xeigtstc: $(CEIGTST) $(SCIGTST) $(AEIGTST) ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) + $(LOADER) $(LOADOPTS) -o $@ $^ + +xeigtstd: $(DEIGTST) $(DZIGTST) $(AEIGTST) ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) + $(LOADER) $(LOADOPTS) -o $@ $^ + +xeigtstz: $(ZEIGTST) $(DZIGTST) $(AEIGTST) ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) + $(LOADER) $(LOADOPTS) -o $@ $^ $(AEIGTST): $(FRC) $(SCIGTST): $(FRC) @@ -157,8 +147,11 @@ FRC: @FRC=$(FRC) -clean: +clean: cleanobj cleanexe +cleanobj: rm -f *.o +cleanexe: + rm -f xeigtst* schkee.o: schkee.f $(FORTRAN) $(DRVOPTS) -c -o $@ $< diff -Nru lapack-3.7.0/TESTING/EIG/schksb2stg.f lapack-3.7.1/TESTING/EIG/schksb2stg.f --- lapack-3.7.0/TESTING/EIG/schksb2stg.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/EIG/schksb2stg.f 2017-06-17 22:46:53.000000000 +0000 @@ -307,7 +307,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup single_eig * @@ -316,10 +316,10 @@ $ ISEED, THRESH, NOUNIT, A, LDA, SD, SE, D1, $ D2, D3, U, LDU, WORK, LWORK, RESULT, INFO ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDU, LWORK, NOUNIT, NSIZES, NTYPES, @@ -363,7 +363,7 @@ * .. * .. External Subroutines .. EXTERNAL SLACPY, SLASET, SLASUM, SLATMR, SLATMS, SSBT21, - $ SSBTRD, XERBLA, SSBTRD_SB2ST, SSTEQR + $ SSBTRD, XERBLA, SSYTRD_SB2ST, SSTEQR * .. * .. Intrinsic Functions .. INTRINSIC ABS, REAL, MAX, MIN, SQRT diff -Nru lapack-3.7.0/TESTING/EIG/sget02.f lapack-3.7.1/TESTING/EIG/sget02.f --- lapack-3.7.0/TESTING/EIG/sget02.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/EIG/sget02.f 2017-06-17 22:46:53.000000000 +0000 @@ -125,7 +125,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup single_eig * @@ -133,10 +133,10 @@ SUBROUTINE SGET02( TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB, $ RWORK, RESID ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER TRANS @@ -189,7 +189,7 @@ * Exit with RESID = 1/EPS if ANORM = 0. * EPS = SLAMCH( 'Epsilon' ) - ANORM = SLANGE( '1', N1, N2, A, LDA, RWORK ) + ANORM = SLANGE( '1', M, N, A, LDA, RWORK ) IF( ANORM.LE.ZERO ) THEN RESID = ONE / EPS RETURN diff -Nru lapack-3.7.0/TESTING/EIG/slarhs.f lapack-3.7.1/TESTING/EIG/slarhs.f --- lapack-3.7.0/TESTING/EIG/slarhs.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/EIG/slarhs.f 2017-06-17 22:46:53.000000000 +0000 @@ -184,8 +184,8 @@ *> \param[out] INFO *> \verbatim *> INFO is INTEGER -*> = 0: successful exit -*> < 0: if INFO = -i, the i-th argument had an illegal value +*> = 0: successful exit +*> < 0: if INFO = -i, the i-th argument had an illegal value *> \endverbatim * * Authors: @@ -196,7 +196,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup single_eig * @@ -204,10 +204,10 @@ SUBROUTINE SLARHS( PATH, XTYPE, UPLO, TRANS, M, N, KL, KU, NRHS, $ A, LDA, X, LDX, B, LDB, ISEED, INFO ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER TRANS, UPLO, XTYPE diff -Nru lapack-3.7.0/TESTING/EIG/zchkhb2stg.f lapack-3.7.1/TESTING/EIG/zchkhb2stg.f --- lapack-3.7.0/TESTING/EIG/zchkhb2stg.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/EIG/zchkhb2stg.f 2017-06-17 22:46:53.000000000 +0000 @@ -313,7 +313,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16_eig * @@ -323,10 +323,10 @@ $ D2, D3, U, LDU, WORK, LWORK, RWORK, RESULT, $ INFO ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDU, LWORK, NOUNIT, NSIZES, NTYPES, @@ -373,7 +373,7 @@ * .. * .. External Subroutines .. EXTERNAL DLASUM, XERBLA, ZHBT21, ZHBTRD, ZLACPY, ZLASET, - $ ZLATMR, ZLATMS, ZHBTRD_HB2ST, ZSTEQR + $ ZLATMR, ZLATMS, ZHETRD_HB2ST, ZSTEQR * .. * .. Intrinsic Functions .. INTRINSIC ABS, DBLE, DCONJG, MAX, MIN, SQRT diff -Nru lapack-3.7.0/TESTING/EIG/zdrvst2stg.f lapack-3.7.1/TESTING/EIG/zdrvst2stg.f --- lapack-3.7.0/TESTING/EIG/zdrvst2stg.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/EIG/zdrvst2stg.f 2017-06-17 22:46:53.000000000 +0000 @@ -328,7 +328,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16_eig * @@ -338,10 +338,10 @@ $ LDU, V, TAU, Z, WORK, LWORK, RWORK, LRWORK, $ IWORK, LIWORK, RESULT, INFO ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDU, LIWORK, LRWORK, LWORK, NOUNIT, @@ -399,8 +399,7 @@ $ ZHET22, ZHPEV, ZHPEVD, ZHPEVX, ZLACPY, ZLASET, $ ZHEEVD_2STAGE, ZHEEVR_2STAGE, ZHEEVX_2STAGE, $ ZHEEV_2STAGE, ZHBEV_2STAGE, ZHBEVD_2STAGE, - $ ZHBEVX_2STAGE, ZHETRD_2STAGE, ZHETRD_SY2SB, - $ ZHETRD_SB2ST, ZLATMR, ZLATMS + $ ZHBEVX_2STAGE, ZHETRD_2STAGE, ZLATMR, ZLATMS * .. * .. Intrinsic Functions .. INTRINSIC ABS, DBLE, INT, LOG, MAX, MIN, SQRT diff -Nru lapack-3.7.0/TESTING/EIG/zerrst.f lapack-3.7.1/TESTING/EIG/zerrst.f --- lapack-3.7.0/TESTING/EIG/zerrst.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/EIG/zerrst.f 2017-06-17 22:46:53.000000000 +0000 @@ -29,8 +29,7 @@ *> ZHPEV, CHPEVX, CHPEVD, and ZSTEDC. *> ZHEEVD_2STAGE, ZHEEVR_2STAGE, ZHEEVX_2STAGE, *> ZHEEV_2STAGE, ZHBEV_2STAGE, ZHBEVD_2STAGE, -*> ZHBEVX_2STAGE, ZHETRD_2STAGE, ZHETRD_SY2SB, -*> ZHETRD_SB2ST +*> ZHBEVX_2STAGE, ZHETRD_2STAGE *> \endverbatim * * Arguments: @@ -56,17 +55,17 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16_eig * * ===================================================================== SUBROUTINE ZERRST( PATH, NUNIT ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER*3 PATH @@ -102,8 +101,7 @@ $ ZUNGTR, ZUNMTR, ZUPGTR, ZUPMTR, $ ZHEEVD_2STAGE, ZHEEVR_2STAGE, ZHEEVX_2STAGE, $ ZHEEV_2STAGE, ZHBEV_2STAGE, ZHBEVD_2STAGE, - $ ZHBEVX_2STAGE, ZHETRD_2STAGE, ZHETRD_SY2SB, - $ ZHETRD_SB2ST + $ ZHBEVX_2STAGE, ZHETRD_2STAGE * .. * .. Scalars in Common .. LOGICAL LERR, OK diff -Nru lapack-3.7.0/TESTING/EIG/zget02.f lapack-3.7.1/TESTING/EIG/zget02.f --- lapack-3.7.0/TESTING/EIG/zget02.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/EIG/zget02.f 2017-06-17 22:46:53.000000000 +0000 @@ -125,7 +125,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16_eig * @@ -133,10 +133,10 @@ SUBROUTINE ZGET02( TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB, $ RWORK, RESID ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER TRANS @@ -154,7 +154,7 @@ DOUBLE PRECISION ZERO, ONE PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) COMPLEX*16 CONE - PARAMETER ( CONE = 1.0D+0 ) + PARAMETER ( CONE = ( 1.0D+0, 0.0D+0 ) ) * .. * .. Local Scalars .. INTEGER J, N1, N2 @@ -191,7 +191,7 @@ * Exit with RESID = 1/EPS if ANORM = 0. * EPS = DLAMCH( 'Epsilon' ) - ANORM = ZLANGE( '1', N1, N2, A, LDA, RWORK ) + ANORM = ZLANGE( '1', M, N, A, LDA, RWORK ) IF( ANORM.LE.ZERO ) THEN RESID = ONE / EPS RETURN diff -Nru lapack-3.7.0/TESTING/EIG/zlarhs.f lapack-3.7.1/TESTING/EIG/zlarhs.f --- lapack-3.7.0/TESTING/EIG/zlarhs.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/EIG/zlarhs.f 2017-06-17 22:46:53.000000000 +0000 @@ -189,8 +189,8 @@ *> \param[out] INFO *> \verbatim *> INFO is INTEGER -*> = 0: successful exit -*> < 0: if INFO = -i, the i-th argument had an illegal value +*> = 0: successful exit +*> < 0: if INFO = -i, the i-th argument had an illegal value *> \endverbatim * * Authors: @@ -201,7 +201,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16_eig * @@ -209,10 +209,10 @@ SUBROUTINE ZLARHS( PATH, XTYPE, UPLO, TRANS, M, N, KL, KU, NRHS, $ A, LDA, X, LDX, B, LDB, ISEED, INFO ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER TRANS, UPLO, XTYPE diff -Nru lapack-3.7.0/TESTING/LIN/cchkhe_aa.f lapack-3.7.1/TESTING/LIN/cchkhe_aa.f --- lapack-3.7.0/TESTING/LIN/cchkhe_aa.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/cchkhe_aa.f 2017-06-17 22:46:53.000000000 +0000 @@ -162,7 +162,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * * *> \ingroup complex_lin @@ -172,10 +172,10 @@ $ THRESH, TSTERR, NMAX, A, AFAC, AINV, B, $ X, XACT, WORK, RWORK, IWORK, NOUT ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * IMPLICIT NONE * @@ -218,18 +218,13 @@ INTEGER ISEED( 4 ), ISEEDY( 4 ) REAL RESULT( NTESTS ) * .. -* .. External Functions .. - REAL DGET06, CLANHE - EXTERNAL DGET06, CLANHE -* .. * .. External Subroutines .. - EXTERNAL ALAERH, ALAHD, ALASUM, XLAENV, CERRHE, CGET04, - $ ZHECON, CHERFS, CHET01_AA, CHETRF_AA, ZHETRI2, - $ CHETRS_AA, CLACPY, CLAIPD, CLARHS, CLATB4, - $ CLATMS, CPOT02, ZPOT03, ZPOT05 + EXTERNAL ALAERH, ALAHD, ALASUM, XLAENV, CERRHE, CHET01_AA, + $ CHETRF_AA, CHETRS_AA, CLACPY, CLAIPD, CLARHS, + $ CLATB4, CLATMS, CPOT02 * .. * .. Intrinsic Functions .. - INTRINSIC REAL, IMAG, MAX, MIN + INTRINSIC MAX, MIN * .. * .. Scalars in Common .. LOGICAL LERR, OK @@ -439,22 +434,22 @@ * Adjust the expected value of INFO to account for * pivoting. * - IF( IZERO.GT.0 ) THEN - J = 1 - K = IZERO - 100 CONTINUE - IF( J.EQ.K ) THEN - K = IWORK( J ) - ELSE IF( IWORK( J ).EQ.K ) THEN - K = J - END IF - IF( J.LT.K ) THEN - J = J + 1 - GO TO 100 - END IF - ELSE +c IF( IZERO.GT.0 ) THEN +c J = 1 +c K = IZERO +c 100 CONTINUE +c IF( J.EQ.K ) THEN +c K = IWORK( J ) +c ELSE IF( IWORK( J ).EQ.K ) THEN +c K = J +c END IF +c IF( J.LT.K ) THEN +c J = J + 1 +c GO TO 100 +c END IF +c ELSE K = 0 - END IF +c END IF * * Check error code from CHETRF and handle error. * @@ -517,30 +512,33 @@ * Check error code from CHETRS and handle error. * IF( INFO.NE.0 ) THEN - CALL ALAERH( PATH, 'CHETRS_AA', INFO, 0, - $ UPLO, N, N, -1, -1, NRHS, IMAT, - $ NFAIL, NERRS, NOUT ) - END IF -* - CALL CLACPY( 'Full', N, NRHS, B, LDA, WORK, LDA ) + IF( IZERO.EQ.0 ) THEN + CALL ALAERH( PATH, 'CHETRS_AA', INFO, 0, + $ UPLO, N, N, -1, -1, NRHS, IMAT, + $ NFAIL, NERRS, NOUT ) + END IF + ELSE + CALL CLACPY( 'Full', N, NRHS, B, LDA, WORK, LDA + $ ) * -* Compute the residual for the solution +* Compute the residual for the solution * - CALL CPOT02( UPLO, N, NRHS, A, LDA, X, LDA, WORK, - $ LDA, RWORK, RESULT( 2 ) ) + CALL CPOT02( UPLO, N, NRHS, A, LDA, X, LDA, + $ WORK, LDA, RWORK, RESULT( 2 ) ) * -* Print information about the tests that did not pass -* the threshold. -* - DO 120 K = 2, 2 - IF( RESULT( K ).GE.THRESH ) THEN - IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 ) - $ CALL ALAHD( NOUT, PATH ) - WRITE( NOUT, FMT = 9998 )UPLO, N, NRHS, - $ IMAT, K, RESULT( K ) - NFAIL = NFAIL + 1 - END IF - 120 CONTINUE +* Print information about the tests that did not pass +* the threshold. +* + DO 120 K = 2, 2 + IF( RESULT( K ).GE.THRESH ) THEN + IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 ) + $ CALL ALAHD( NOUT, PATH ) + WRITE( NOUT, FMT = 9998 )UPLO, N, NRHS, + $ IMAT, K, RESULT( K ) + NFAIL = NFAIL + 1 + END IF + 120 CONTINUE + END IF NRUN = NRUN + 1 * * End do for each value of NRHS in NSVAL. diff -Nru lapack-3.7.0/TESTING/LIN/cchkrfp.f lapack-3.7.1/TESTING/LIN/cchkrfp.f --- lapack-3.7.0/TESTING/LIN/cchkrfp.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/cchkrfp.f 2017-06-17 22:46:53.000000000 +0000 @@ -59,7 +59,7 @@ * ===================================================================== PROGRAM CCHKRFP * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * April 2012 @@ -215,11 +215,6 @@ * IF( FATAL ) THEN WRITE( NOUT, FMT = 9999 ) - STOP - END IF -* - IF( FATAL ) THEN - WRITE( NOUT, FMT = 9999 ) STOP END IF * diff -Nru lapack-3.7.0/TESTING/LIN/cchksy_aa.f lapack-3.7.1/TESTING/LIN/cchksy_aa.f --- lapack-3.7.0/TESTING/LIN/cchksy_aa.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/cchksy_aa.f 2017-06-17 22:46:53.000000000 +0000 @@ -161,7 +161,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * * @generated from LIN/dchksy_aa.f, fortran d -> c, Wed Nov 16 21:34:18 2016 * @@ -172,10 +172,10 @@ $ THRESH, TSTERR, NMAX, A, AFAC, AINV, B, $ X, XACT, WORK, RWORK, IWORK, NOUT ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * IMPLICIT NONE * @@ -218,15 +218,10 @@ INTEGER ISEED( 4 ), ISEEDY( 4 ) REAL RESULT( NTESTS ) * .. -* .. External Functions .. - REAL DGET06, CLANSY - EXTERNAL DGET06, CLANSY -* .. * .. External Subroutines .. - EXTERNAL ALAERH, ALAHD, ALASUM, CERRSY, CGET04, CLACPY, - $ CLARHS, CLATB4, CLATMS, CSYT02, DSYT03, DSYT05, - $ DSYCON, CSYRFS, CSYT01_AA, CSYTRF_AA, - $ DSYTRI2, CSYTRS_AA, XLAENV + EXTERNAL ALAERH, ALAHD, ALASUM, CERRSY, CLACPY, CLARHS, + $ CLATB4, CLATMS, CSYT02, CSYT01_AA, CSYTRF_AA, + $ CSYTRS_AA, XLAENV * .. * .. Intrinsic Functions .. INTRINSIC MAX, MIN @@ -440,22 +435,22 @@ * Adjust the expected value of INFO to account for * pivoting. * - IF( IZERO.GT.0 ) THEN - J = 1 - K = IZERO - 100 CONTINUE - IF( J.EQ.K ) THEN - K = IWORK( J ) - ELSE IF( IWORK( J ).EQ.K ) THEN - K = J - END IF - IF( J.LT.K ) THEN - J = J + 1 - GO TO 100 - END IF - ELSE +c IF( IZERO.GT.0 ) THEN +c J = 1 +c K = IZERO +c 100 CONTINUE +c IF( J.EQ.K ) THEN +c K = IWORK( J ) +c ELSE IF( IWORK( J ).EQ.K ) THEN +c K = J +c END IF +c IF( J.LT.K ) THEN +c J = J + 1 +c GO TO 100 +c END IF +c ELSE K = 0 - END IF +c END IF * * Check error code from CSYTRF and handle error. * @@ -519,31 +514,34 @@ * Check error code from CSYTRS and handle error. * IF( INFO.NE.0 ) THEN - CALL ALAERH( PATH, 'CSYTRS_AA', INFO, 0, - $ UPLO, N, N, -1, -1, NRHS, IMAT, - $ NFAIL, NERRS, NOUT ) - END IF -* - CALL CLACPY( 'Full', N, NRHS, B, LDA, WORK, LDA ) -* -* Compute the residual for the solution + IF( IZERO.EQ.0 ) THEN + CALL ALAERH( PATH, 'CSYTRS_AA', INFO, 0, + $ UPLO, N, N, -1, -1, NRHS, IMAT, + $ NFAIL, NERRS, NOUT ) + END IF + ELSE + CALL CLACPY( 'Full', N, NRHS, B, LDA, WORK, LDA + $ ) * - CALL CSYT02( UPLO, N, NRHS, A, LDA, X, LDA, WORK, - $ LDA, RWORK, RESULT( 2 ) ) +* Compute the residual for the solution * + CALL CSYT02( UPLO, N, NRHS, A, LDA, X, LDA, + $ WORK, LDA, RWORK, RESULT( 2 ) ) * -* Print information about the tests that did not pass -* the threshold. * - DO 120 K = 2, 2 - IF( RESULT( K ).GE.THRESH ) THEN - IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 ) - $ CALL ALAHD( NOUT, PATH ) - WRITE( NOUT, FMT = 9998 )UPLO, N, NRHS, - $ IMAT, K, RESULT( K ) - NFAIL = NFAIL + 1 - END IF - 120 CONTINUE +* Print information about the tests that did not pass +* the threshold. +* + DO 120 K = 2, 2 + IF( RESULT( K ).GE.THRESH ) THEN + IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 ) + $ CALL ALAHD( NOUT, PATH ) + WRITE( NOUT, FMT = 9998 )UPLO, N, NRHS, + $ IMAT, K, RESULT( K ) + NFAIL = NFAIL + 1 + END IF + 120 CONTINUE + END IF NRUN = NRUN + 1 * * End do for each value of NRHS in NSVAL. diff -Nru lapack-3.7.0/TESTING/LIN/cdrvls.f lapack-3.7.1/TESTING/LIN/cdrvls.f --- lapack-3.7.0/TESTING/LIN/cdrvls.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/cdrvls.f 2017-06-17 22:46:53.000000000 +0000 @@ -183,7 +183,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex_lin * @@ -192,10 +192,10 @@ $ NBVAL, NXVAL, THRESH, TSTERR, A, COPYA, B, $ COPYB, C, S, COPYS, NOUT ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. LOGICAL TSTERR @@ -237,9 +237,9 @@ REAL EPS, NORMA, NORMB, RCOND * .. * .. Local Arrays .. - INTEGER ISEED( 4 ), ISEEDY( 4 ), IWORKQUERY - REAL RESULT( NTESTS ), RWORKQUERY - COMPLEX WORKQUERY + INTEGER ISEED( 4 ), ISEEDY( 4 ), IWQ + REAL RESULT( NTESTS ), RWQ + COMPLEX WQ * .. * .. Allocatable Arrays .. COMPLEX, ALLOCATABLE :: WORK (:) @@ -324,48 +324,85 @@ M = MMAX N = NMAX NRHS = NSMAX - LDA = MAX( 1, M ) - LDB = MAX( 1, M, N ) MNMIN = MAX( MIN( M, N ), 1 ) * * Compute workspace needed for routines * CQRT14, CQRT17 (two side cases), CQRT15 and CQRT12 * - LWORK = MAX( ( M+N )*NRHS, + LWORK = MAX( 1, ( M+N )*NRHS, $ ( N+NRHS )*( M+2 ), ( M+NRHS )*( N+2 ), $ MAX( M+MNMIN, NRHS*MNMIN,2*N+M ), $ MAX( M*N+4*MNMIN+MAX(M,N), M*N+2*MNMIN+4*N ) ) + LRWORK = 1 + LIWORK = 1 +* +* Iterate through all test cases and compute necessary workspace +* sizes for ?GELS, ?GETSLS, ?GELSY, ?GELSS and ?GELSD routines. +* + DO IM = 1, NM + M = MVAL( IM ) + LDA = MAX( 1, M ) + DO IN = 1, NN + N = NVAL( IN ) + MNMIN = MAX(MIN( M, N ),1) + LDB = MAX( 1, M, N ) + DO INS = 1, NNS + NRHS = NSVAL( INS ) + DO IRANK = 1, 2 + DO ISCALE = 1, 3 + ITYPE = ( IRANK-1 )*3 + ISCALE + IF( DOTYPE( ITYPE ) ) THEN + IF( IRANK.EQ.1 ) THEN + DO ITRAN = 1, 2 + IF( ITRAN.EQ.1 ) THEN + TRANS = 'N' + ELSE + TRANS = 'C' + END IF +* +* Compute workspace needed for CGELS + CALL CGELS( TRANS, M, N, NRHS, A, LDA, + $ B, LDB, WQ, -1, INFO ) + LWORK_CGELS = INT( WQ ) +* Compute workspace needed for CGETSLS + CALL CGETSLS( TRANS, M, N, NRHS, A, LDA, + $ B, LDB, WQ, -1, INFO ) + LWORK_CGETSLS = INT( WQ ) + ENDDO + END IF +* Compute workspace needed for CGELSY + CALL CGELSY( M, N, NRHS, A, LDA, B, LDB, + $ IWQ, RCOND, CRANK, WQ, -1, RWORK, + $ INFO ) + LWORK_CGELSY = INT( WQ ) + LRWORK_CGELSY = 2*N +* Compute workspace needed for CGELSS + CALL CGELSS( M, N, NRHS, A, LDA, B, LDB, S, + $ RCOND, CRANK, WQ, -1, RWORK, INFO ) + LWORK_CGELSS = INT( WQ ) + LRWORK_CGELSS = 5*MNMIN +* Compute workspace needed for CGELSD + CALL CGELSD( M, N, NRHS, A, LDA, B, LDB, S, + $ RCOND, CRANK, WQ, -1, RWQ, IWQ, + $ INFO ) + LWORK_CGELSD = INT( WQ ) + LRWORK_CGELSD = INT( RWQ ) +* Compute LIWORK workspace needed for CGELSY and CGELSD + LIWORK = MAX( LIWORK, N, IWQ ) +* Compute LRWORK workspace needed for CGELSY, CGELSS and CGELSD + LRWORK = MAX( LRWORK, LRWORK_CGELSY, + $ LRWORK_CGELSS, LRWORK_CGELSD ) +* Compute LWORK workspace needed for all functions + LWORK = MAX( LWORK, LWORK_CGELS, LWORK_CGETSLS, + $ LWORK_CGELSY, LWORK_CGELSS, + $ LWORK_CGELSD ) + END IF + ENDDO + ENDDO + ENDDO + ENDDO + ENDDO * -* Compute workspace needed for CGELS - CALL CGELS( 'N', M, N, NRHS, A, LDA, B, LDB, - $ WORKQUERY, -1, INFO ) - LWORK_CGELS = INT( WORKQUERY ) -* Compute workspace needed for CGETSLS - CALL CGETSLS( 'N', M, N, NRHS, A, LDA, B, LDB, - $ WORKQUERY, -1, INFO ) - LWORK_CGETSLS = INT( WORKQUERY ) -* Compute workspace needed for CGELSY - CALL CGELSY( M, N, NRHS, A, LDA, B, LDB, IWORKQUERY, - $ RCOND, CRANK, WORKQUERY, -1, RWORK, INFO ) - LWORK_CGELSY = INT( WORKQUERY ) - LRWORK_CGELSY = 2*N -* Compute workspace needed for CGELSS - CALL CGELSS( M, N, NRHS, A, LDA, B, LDB, S, - $ RCOND, CRANK, WORKQUERY, -1, RWORK, INFO ) - LWORK_CGELSS = INT( WORKQUERY ) - LRWORK_CGELSS = 5*MNMIN -* Compute workspace needed for CGELSD - CALL CGELSD( M, N, NRHS, A, LDA, B, LDB, S, RCOND, CRANK, - $ WORKQUERY, -1, RWORKQUERY, IWORKQUERY, INFO ) - LWORK_CGELSD = INT( WORKQUERY ) - LRWORK_CGELSD = INT( RWORKQUERY ) -* Compute LIWORK workspace needed for CGELSY and CGELSD - LIWORK = MAX( 1, N, IWORKQUERY ) -* Compute LRWORK workspace needed for CGELSY, CGELSS and CGELSD - LRWORK = MAX( 1, LRWORK_CGELSY, LRWORK_CGELSS, LRWORK_CGELSD ) -* Compute LWORK workspace needed for all functions - LWORK = MAX( 1, LWORK, LWORK_CGELS, LWORK_CGETSLS, LWORK_CGELSY, - $ LWORK_CGELSS, LWORK_CGELSD ) LWLSY = LWORK * ALLOCATE( WORK( LWORK ) ) diff -Nru lapack-3.7.0/TESTING/LIN/cdrvrf3.f lapack-3.7.1/TESTING/LIN/cdrvrf3.f --- lapack-3.7.0/TESTING/LIN/cdrvrf3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/cdrvrf3.f 2017-06-17 22:46:53.000000000 +0000 @@ -111,7 +111,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex_lin * @@ -119,10 +119,10 @@ SUBROUTINE CDRVRF3( NOUT, NN, NVAL, THRESH, A, LDA, ARF, B1, B2, + S_WORK_CLANGE, C_WORK_CGEQRF, TAU ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER LDA, NN, NOUT @@ -227,7 +227,7 @@ * IF ( IALPHA.EQ. 1) THEN ALPHA = ZERO - ELSE IF ( IALPHA.EQ. 1) THEN + ELSE IF ( IALPHA.EQ. 2) THEN ALPHA = ONE ELSE ALPHA = CLARND( 4, ISEED ) diff -Nru lapack-3.7.0/TESTING/LIN/cdrvrf4.f lapack-3.7.1/TESTING/LIN/cdrvrf4.f --- lapack-3.7.0/TESTING/LIN/cdrvrf4.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/cdrvrf4.f 2017-06-17 22:46:53.000000000 +0000 @@ -106,7 +106,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex_lin * @@ -114,10 +114,10 @@ SUBROUTINE CDRVRF4( NOUT, NN, NVAL, THRESH, C1, C2, LDC, CRF, A, + LDA, S_WORK_CLANGE ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER LDA, LDC, NN, NOUT @@ -209,10 +209,10 @@ IF ( IALPHA.EQ. 1) THEN ALPHA = ZERO BETA = ZERO - ELSE IF ( IALPHA.EQ. 1) THEN + ELSE IF ( IALPHA.EQ. 2) THEN ALPHA = ONE BETA = ZERO - ELSE IF ( IALPHA.EQ. 1) THEN + ELSE IF ( IALPHA.EQ. 3) THEN ALPHA = ZERO BETA = ONE ELSE diff -Nru lapack-3.7.0/TESTING/LIN/cdrvsy_aa.f lapack-3.7.1/TESTING/LIN/cdrvsy_aa.f --- lapack-3.7.0/TESTING/LIN/cdrvsy_aa.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/cdrvsy_aa.f 2017-06-17 22:46:53.000000000 +0000 @@ -144,7 +144,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * * @generated from LIN/ddrvsy_aa.f, fortran d -> c, Thu Nov 17 12:14:51 2016 * @@ -155,10 +155,10 @@ $ NMAX, A, AFAC, AINV, B, X, XACT, WORK, $ RWORK, IWORK, NOUT ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. LOGICAL TSTERR @@ -204,8 +204,8 @@ EXTERNAL DGET06, CLANSY * .. * .. External Subroutines .. - EXTERNAL ALADHD, ALAERH, ALASVM, DERRVX, CGET04, CLACPY, - $ CLARHS, CLASET, CLATB4, CLATMS, CSYT02, DSYT05, + EXTERNAL ALADHD, ALAERH, ALASVM, CERRVX, CGET04, CLACPY, + $ CLARHS, CLASET, CLATB4, CLATMS, CSYT02, $ CSYSV_AA, CSYT01_AA, CSYTRF_AA, XLAENV * .. * .. Scalars in Common .. diff -Nru lapack-3.7.0/TESTING/LIN/chet01_3.f lapack-3.7.1/TESTING/LIN/chet01_3.f --- lapack-3.7.0/TESTING/LIN/chet01_3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/chet01_3.f 2017-06-17 22:46:53.000000000 +0000 @@ -92,7 +92,7 @@ *> On entry, contains the superdiagonal (or subdiagonal) *> elements of the Hermitian block diagonal matrix D *> with 1-by-1 or 2-by-2 diagonal blocks, where -*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; +*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. *> \endverbatim *> @@ -133,7 +133,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex_lin * @@ -141,10 +141,10 @@ SUBROUTINE CHET01_3( UPLO, N, A, LDA, AFAC, LDAFAC, E, IPIV, C, $ LDC, RWORK, RESID ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/TESTING/LIN/chkxer.f lapack-3.7.1/TESTING/LIN/chkxer.f --- lapack-3.7.0/TESTING/LIN/chkxer.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/chkxer.f 2017-06-17 22:46:53.000000000 +0000 @@ -14,25 +14,7 @@ * LOGICAL LERR, OK * CHARACTER*(*) SRNAMT * INTEGER INFOT, NOUT -* .. -* .. Intrinsic Functions .. -* INTRINSIC LEN_TRIM -* .. -* .. Executable Statements .. -* IF( .NOT.LERR ) THEN -* WRITE( NOUT, FMT = 9999 )INFOT, -* $ SRNAMT( 1:LEN_TRIM( SRNAMT ) ) -* OK = .FALSE. -* END IF -* LERR = .FALSE. -* RETURN * -* 9999 FORMAT( ' *** Illegal value of parameter number ', I2, -* $ ' not detected by ', A6, ' ***' ) -* -* End of CHKXER. -* -* END * *> \par Purpose: * ============= @@ -52,17 +34,17 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex_lin * * ===================================================================== SUBROUTINE CHKXER( SRNAMT, INFOT, NOUT, LERR, OK ) * -* -- LAPACK test routine (input) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. LOGICAL LERR, OK diff -Nru lapack-3.7.0/TESTING/LIN/clahilb.f lapack-3.7.1/TESTING/LIN/clahilb.f --- lapack-3.7.0/TESTING/LIN/clahilb.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/clahilb.f 2017-06-17 22:46:53.000000000 +0000 @@ -8,11 +8,11 @@ * Definition: * =========== * -* SUBROUTINE CLAHILB(N, NRHS, A, LDA, X, LDX, B, LDB, WORK, +* SUBROUTINE CLAHILB( N, NRHS, A, LDA, X, LDX, B, LDB, WORK, * INFO, PATH) * * .. Scalar Arguments .. -* INTEGER T, N, NRHS, LDA, LDX, LDB, INFO +* INTEGER N, NRHS, LDA, LDX, LDB, INFO * .. Array Arguments .. * REAL WORK(N) * COMPLEX A(LDA,N), X(LDX, NRHS), B(LDB, NRHS) @@ -56,7 +56,7 @@ *> *> \param[in] NRHS *> \verbatim -*> NRHS is NRHS +*> NRHS is INTEGER *> The requested number of right-hand sides. *> \endverbatim *> @@ -126,21 +126,21 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex_lin * * ===================================================================== - SUBROUTINE CLAHILB(N, NRHS, A, LDA, X, LDX, B, LDB, WORK, + SUBROUTINE CLAHILB( N, NRHS, A, LDA, X, LDX, B, LDB, WORK, $ INFO, PATH) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. - INTEGER T, N, NRHS, LDA, LDX, LDB, INFO + INTEGER N, NRHS, LDA, LDX, LDB, INFO * .. Array Arguments .. REAL WORK(N) COMPLEX A(LDA,N), X(LDX, NRHS), B(LDB, NRHS) @@ -220,7 +220,8 @@ END DO * * Generate the scaled Hilbert matrix in A -* If we are testing SY routines, take D1_i = D2_i, else, D1_i = D2_i* +* If we are testing SY routines, take +* D1_i = D2_i, else, D1_i = D2_i* IF ( LSAMEN( 2, C2, 'SY' ) ) THEN DO J = 1, N DO I = 1, N @@ -250,8 +251,9 @@ WORK(J) = ( ( (WORK(J-1)/(J-1)) * (J-1 - N) ) /(J-1) ) $ * (N +J -1) END DO -* -* If we are testing SY routines, take D1_i = D2_i, else, D1_i = D2_i* + +* If we are testing SY routines, +* take D1_i = D2_i, else, D1_i = D2_i* IF ( LSAMEN( 2, C2, 'SY' ) ) THEN DO J = 1, NRHS DO I = 1, N diff -Nru lapack-3.7.0/TESTING/LIN/clarhs.f lapack-3.7.1/TESTING/LIN/clarhs.f --- lapack-3.7.0/TESTING/LIN/clarhs.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/clarhs.f 2017-06-17 22:46:53.000000000 +0000 @@ -190,7 +190,7 @@ *> \verbatim *> INFO is INTEGER *> = 0: successful exit -*> < 0: if INFO = -k, the k-th argument had an illegal value +*> < 0: if INFO = -i, the i-th argument had an illegal value *> \endverbatim * * Authors: @@ -201,7 +201,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex_lin * @@ -209,10 +209,10 @@ SUBROUTINE CLARHS( PATH, XTYPE, UPLO, TRANS, M, N, KL, KU, NRHS, $ A, LDA, X, LDX, B, LDB, ISEED, INFO ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER TRANS, UPLO, XTYPE diff -Nru lapack-3.7.0/TESTING/LIN/CMakeLists.txt lapack-3.7.1/TESTING/LIN/CMakeLists.txt --- lapack-3.7.0/TESTING/LIN/CMakeLists.txt 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/CMakeLists.txt 2017-06-17 22:46:53.000000000 +0000 @@ -13,10 +13,10 @@ schksp.f schksy.f schksy_rook.f schksy_rk.f schksy_aa.f schktb.f schktp.f schktr.f schktz.f sdrvgt.f sdrvls.f sdrvpb.f - sdrvpp.f sdrvpt.f sdrvsp.f sdrvsy.f sdrvsy_rook.f sdrvsy_rk.f sdrvsy_aa.f + sdrvpp.f sdrvpt.f sdrvsp.f sdrvsy_rook.f sdrvsy_rk.f sdrvsy_aa.f serrgt.f serrlq.f serrls.f - serrpo.f serrps.f serrql.f serrqp.f serrqr.f - serrrq.f serrsy.f serrtr.f serrtz.f serrvx.f + serrps.f serrql.f serrqp.f serrqr.f + serrrq.f serrtr.f serrtz.f sgbt01.f sgbt02.f sgbt05.f sgelqs.f sgeqls.f sgeqrs.f sgerqs.f sget01.f sget02.f sget03.f sget04.f sget06.f sget07.f sgtt01.f sgtt02.f @@ -33,15 +33,17 @@ stbt02.f stbt03.f stbt05.f stbt06.f stpt01.f stpt02.f stpt03.f stpt05.f stpt06.f strt01.f strt02.f strt03.f strt05.f strt06.f - sgennd.f - sqrt04.f sqrt05.f schkqrt.f serrqrt.f schkqrtp.f serrqrtp.f + sgennd.f sqrt04.f sqrt05.f schkqrt.f serrqrt.f schkqrtp.f serrqrtp.f schklqt.f schklqtp.f schktsqr.f serrlqt.f serrlqtp.f serrtsqr.f stsqr01.f slqt04.f slqt05.f) -if(USEXBLAS) - list(APPEND SLINTST sdrvgex.f serrgex.f sdrvgbx.f sdrvpox.f sebchvxx.f) +if(USE_XBLAS) + list(APPEND SLINTST sdrvgbx.f sdrvgex.f sdrvsyx.f sdrvpox.f + serrvxx.f serrgex.f serrsyx.f serrpox.f + sebchvxx.f) else() - list(APPEND SLINTST sdrvge.f serrge.f sdrvgb.f sdrvpo.f) + list(APPEND SLINTST sdrvgb.f sdrvge.f sdrvsy.f sdrvpo.f + serrvx.f serrge.f serrsy.f serrpo.f) endif() set(CLINTST cchkaa.f @@ -50,13 +52,12 @@ cchkpo.f cchkps.f cchkpp.f cchkpt.f cchkq3.f cchkql.f cchkqr.f cchkrq.f cchksp.f cchksy.f cchksy_rook.f cchksy_rk.f cchksy_aa.f cchktb.f cchktp.f cchktr.f cchktz.f - cdrvgt.f cdrvhe.f cdrvhe_rook.f cdrvhe_rk.f cdrvhe_aa.f cdrvhp.f + cdrvgt.f cdrvhe_rook.f cdrvhe_rk.f cdrvhe_aa.f cdrvhp.f cdrvls.f cdrvpb.f cdrvpp.f cdrvpt.f - cdrvsp.f cdrvsy.f cdrvsy_rook.f cdrvsy_rk.f cdrvsy_aa.f - cerrgt.f cerrhe.f cerrlq.f + cdrvsp.f cdrvsy_rook.f cdrvsy_rk.f cdrvsy_aa.f + cerrgt.f cerrlq.f cerrls.f cerrps.f cerrql.f cerrqp.f - cerrqr.f cerrrq.f cerrsy.f cerrtr.f cerrtz.f - cerrvx.f + cerrqr.f cerrrq.f cerrtr.f cerrtz.f cgbt01.f cgbt02.f cgbt05.f cgelqs.f cgeqls.f cgeqrs.f cgerqs.f cget01.f cget02.f cget03.f cget04.f cget07.f cgtt01.f cgtt02.f @@ -81,11 +82,13 @@ cchklqt.f cchklqtp.f cchktsqr.f cerrlqt.f cerrlqtp.f cerrtsqr.f ctsqr01.f clqt04.f clqt05.f) -if(USEXBLAS) - list(APPEND - CLINTST cdrvgex.f cdrvgbx.f cerrgex.f cdrvpox.f cerrpox.f cebchvxx.f) +if(USE_XBLAS) + list(APPEND CLINTST cdrvgbx.f cdrvgex.f cdrvhex.f cdrvsyx.f cdrvpox.f + cerrvxx.f cerrgex.f cerrhex.f cerrsyx.f cerrpox.f + cebchvxx.f) else() - list(APPEND CLINTST cdrvge.f cdrvgb.f cerrge.f cdrvpo.f cerrpo.f) + list(APPEND CLINTST cdrvgb.f cdrvge.f cdrvhe.f cdrvsy.f cdrvpo.f + cerrvx.f cerrge.f cerrhe.f cerrsy.f cerrpo.f) endif() set(DLINTST dchkaa.f @@ -95,10 +98,10 @@ dchksp.f dchksy.f dchksy_rook.f dchksy_rk.f dchksy_aa.f dchktb.f dchktp.f dchktr.f dchktz.f ddrvgt.f ddrvls.f ddrvpb.f - ddrvpp.f ddrvpt.f ddrvsp.f ddrvsy.f ddrvsy_rook.f ddrvsy_rk.f ddrvsy_aa.f + ddrvpp.f ddrvpt.f ddrvsp.f ddrvsy_rook.f ddrvsy_rk.f ddrvsy_aa.f derrgt.f derrlq.f derrls.f derrps.f derrql.f derrqp.f derrqr.f - derrrq.f derrsy.f derrtr.f derrtz.f derrvx.f + derrrq.f derrtr.f derrtz.f dgbt01.f dgbt02.f dgbt05.f dgelqs.f dgeqls.f dgeqrs.f dgerqs.f dget01.f dget02.f dget03.f dget04.f dget06.f dget07.f dgtt01.f dgtt02.f @@ -120,12 +123,13 @@ dchklq.f dchklqt.f dchklqtp.f dchktsqr.f derrlqt.f derrlqtp.f derrtsqr.f dtsqr01.f dlqt04.f dlqt05.f) -if(USEXBLAS) - list(APPEND - DLINTST ddrvgex.f ddrvgbx.f derrgex.f ddrvpox.f derrpox.f debchvxx.f) +if(USE_XBLAS) + list(APPEND DLINTST ddrvgbx.f ddrvgex.f ddrvsyx.f ddrvpox.f + derrvxx.f derrgex.f derrsyx.f derrpox.f + debchvxx.f) else() - list(APPEND - DLINTST ddrvge.f ddrvgb.f derrge.f ddrvpo.f derrpo.f) + list(APPEND DLINTST ddrvgb.f ddrvge.f ddrvsy.f ddrvpo.f + derrvx.f derrge.f derrsy.f derrpo.f) endif() set(ZLINTST zchkaa.f @@ -134,13 +138,12 @@ zchkpo.f zchkps.f zchkpp.f zchkpt.f zchkq3.f zchkql.f zchkqr.f zchkrq.f zchksp.f zchksy.f zchksy_rook.f zchksy_rk.f zchksy_aa.f zchktb.f zchktp.f zchktr.f zchktz.f - zdrvgt.f zdrvhe.f zdrvhe_rook.f zdrvhe_rk.f zdrvhe_aa.f zdrvhp.f + zdrvgt.f zdrvhe_rook.f zdrvhe_rk.f zdrvhe_aa.f zdrvhp.f zdrvls.f zdrvpb.f zdrvpp.f zdrvpt.f - zdrvsp.f zdrvsy.f zdrvsy_rook.f zdrvsy_rk.f zdrvsy_aa.f - zerrgt.f zerrhe.f zerrlq.f + zdrvsp.f zdrvsy_rook.f zdrvsy_rk.f zdrvsy_aa.f + zerrgt.f zerrlq.f zerrls.f zerrps.f zerrql.f zerrqp.f - zerrqr.f zerrrq.f zerrsy.f zerrtr.f zerrtz.f - zerrvx.f + zerrqr.f zerrrq.f zerrtr.f zerrtz.f zgbt01.f zgbt02.f zgbt05.f zgelqs.f zgeqls.f zgeqrs.f zgerqs.f zget01.f zget02.f zget03.f zget04.f zget07.f zgtt01.f zgtt02.f @@ -165,12 +168,13 @@ zchklqt.f zchklqtp.f zchktsqr.f zerrlqt.f zerrlqtp.f zerrtsqr.f ztsqr01.f zlqt04.f zlqt05.f) -if(USEXBLAS) - list(APPEND - ZLINTST zdrvgex.f zdrvgbx.f zerrgex.f zdrvpox.f zerrpox.f zebchvxx.f) +if(USE_XBLAS) + list(APPEND ZLINTST zdrvgbx.f zdrvgex.f zdrvhex.f zdrvsyx.f zdrvpox.f + zerrvxx.f zerrgex.f zerrhex.f zerrsyx.f zerrpox.f + zebchvxx.f) else() - list(APPEND - ZLINTST zdrvge.f zdrvgb.f zerrge.f zdrvpo.f zerrpo.f) + list(APPEND ZLINTST zdrvgb.f zdrvge.f zdrvhe.f zdrvsy.f zdrvpo.f + zerrvx.f zerrge.f zerrhe.f zerrsy.f zerrpo.f) endif() set(DSLINTST dchkab.f @@ -203,33 +207,33 @@ macro(add_lin_executable name) add_executable(${name} ${ARGN}) - target_link_libraries(${name} tmglib ${LAPACK_LIBRARIES}) + target_link_libraries(${name} tmglib ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) endmacro() if(BUILD_SINGLE) - add_lin_executable(xlintsts ${ALINTST} ${SCLNTST} ${SLINTST} ${SECOND_SRC}) - add_lin_executable(xlintstrfs ${SLINTSTRFP} ${SECOND_SRC}) + add_lin_executable(xlintsts ${ALINTST} ${SLINTST} ${SCLNTST}) + add_lin_executable(xlintstrfs ${SLINTSTRFP}) endif() if(BUILD_DOUBLE) - add_lin_executable(xlintstd ${ALINTST} ${DLINTST} ${DZLNTST} ${DSECOND_SRC}) - add_lin_executable(xlintstrfd ${DLINTSTRFP} ${DSECOND_SRC}) + add_lin_executable(xlintstd ${ALINTST} ${DLINTST} ${DZLNTST}) + add_lin_executable(xlintstrfd ${DLINTSTRFP}) endif() if(BUILD_SINGLE AND BUILD_DOUBLE) - add_lin_executable(xlintstds ${DSLINTST} ${SECOND_SRC} ${DSECOND_SRC}) + add_lin_executable(xlintstds ${DSLINTST}) endif() if(BUILD_COMPLEX) - add_lin_executable(xlintstc ${ALINTST} ${CLINTST} ${SCLNTST} ${SECOND_SRC}) - add_lin_executable(xlintstrfc ${CLINTSTRFP} ${SECOND_SRC}) + add_lin_executable(xlintstc ${ALINTST} ${CLINTST} ${SCLNTST}) + add_lin_executable(xlintstrfc ${CLINTSTRFP}) endif() if(BUILD_COMPLEX16) - add_lin_executable(xlintstz ${ALINTST} ${ZLINTST} ${DZLNTST} ${DSECOND_SRC}) - add_lin_executable(xlintstrfz ${ZLINTSTRFP} ${DSECOND_SRC}) + add_lin_executable(xlintstz ${ALINTST} ${ZLINTST} ${DZLNTST}) + add_lin_executable(xlintstrfz ${ZLINTSTRFP}) endif() if(BUILD_COMPLEX AND BUILD_COMPLEX16) - add_lin_executable(xlintstzc ${ZCLINTST} ${SECOND_SRC} ${DSECOND_SRC}) + add_lin_executable(xlintstzc ${ZCLINTST}) endif() diff -Nru lapack-3.7.0/TESTING/LIN/csyt01_3.f lapack-3.7.1/TESTING/LIN/csyt01_3.f --- lapack-3.7.0/TESTING/LIN/csyt01_3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/csyt01_3.f 2017-06-17 22:46:53.000000000 +0000 @@ -92,7 +92,7 @@ *> On entry, contains the superdiagonal (or subdiagonal) *> elements of the symmetric block diagonal matrix D *> with 1-by-1 or 2-by-2 diagonal blocks, where -*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; +*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. *> \endverbatim *> @@ -133,7 +133,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex_lin * @@ -141,10 +141,10 @@ SUBROUTINE CSYT01_3( UPLO, N, A, LDA, AFAC, LDAFAC, E, IPIV, C, $ LDC, RWORK, RESID ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/TESTING/LIN/dchklqtp.f lapack-3.7.1/TESTING/LIN/dchklqtp.f --- lapack-3.7.0/TESTING/LIN/dchklqtp.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/dchklqtp.f 2017-06-17 22:46:53.000000000 +0000 @@ -94,7 +94,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup double_lin * @@ -103,10 +103,10 @@ $ NBVAL, NOUT ) IMPLICIT NONE * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. LOGICAL TSTERR @@ -132,7 +132,7 @@ DOUBLE PRECISION RESULT( NTESTS ) * .. * .. External Subroutines .. - EXTERNAL ALAERH, ALAHD, ALASUM, DERRLQTP, DLQT04 + EXTERNAL ALAERH, ALAHD, ALASUM, DERRLQTP, DLQT05 * .. * .. Scalars in Common .. LOGICAL LERR, OK diff -Nru lapack-3.7.0/TESTING/LIN/dchkrfp.f lapack-3.7.1/TESTING/LIN/dchkrfp.f --- lapack-3.7.0/TESTING/LIN/dchkrfp.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/dchkrfp.f 2017-06-17 22:46:53.000000000 +0000 @@ -59,7 +59,7 @@ * ===================================================================== PROGRAM DCHKRFP * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * April 2012 @@ -214,11 +214,6 @@ * IF( FATAL ) THEN WRITE( NOUT, FMT = 9999 ) - STOP - END IF -* - IF( FATAL ) THEN - WRITE( NOUT, FMT = 9999 ) STOP END IF * diff -Nru lapack-3.7.0/TESTING/LIN/dchksy_aa.f lapack-3.7.1/TESTING/LIN/dchksy_aa.f --- lapack-3.7.0/TESTING/LIN/dchksy_aa.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/dchksy_aa.f 2017-06-17 22:46:53.000000000 +0000 @@ -161,7 +161,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * * @precisions fortran d -> z c * @@ -172,10 +172,10 @@ $ THRESH, TSTERR, NMAX, A, AFAC, AINV, B, $ X, XACT, WORK, RWORK, IWORK, NOUT ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * IMPLICIT NONE * @@ -215,15 +215,10 @@ INTEGER ISEED( 4 ), ISEEDY( 4 ) DOUBLE PRECISION RESULT( NTESTS ) * .. -* .. External Functions .. - DOUBLE PRECISION DGET06, DLANSY - EXTERNAL DGET06, DLANSY -* .. * .. External Subroutines .. - EXTERNAL ALAERH, ALAHD, ALASUM, DERRSY, DGET04, DLACPY, - $ DLARHS, DLATB4, DLATMS, DPOT02, DPOT03, DPOT05, - $ DSYCON, DSYRFS, DSYT01_AA, DSYTRF_AA, - $ DSYTRI2, DSYTRS_AA, XLAENV + EXTERNAL ALAERH, ALAHD, ALASUM, DERRSY, DLACPY, DLARHS, + $ DLATB4, DLATMS, DPOT02, DSYT01_AA, DSYTRF_AA, + $ DSYTRS_AA, XLAENV * .. * .. Intrinsic Functions .. INTRINSIC MAX, MIN @@ -437,22 +432,22 @@ * Adjust the expected value of INFO to account for * pivoting. * - IF( IZERO.GT.0 ) THEN - J = 1 - K = IZERO - 100 CONTINUE - IF( J.EQ.K ) THEN - K = IWORK( J ) - ELSE IF( IWORK( J ).EQ.K ) THEN - K = J - END IF - IF( J.LT.K ) THEN - J = J + 1 - GO TO 100 - END IF - ELSE +c IF( IZERO.GT.0 ) THEN +c J = 1 +c K = IZERO +c 100 CONTINUE +c IF( J.EQ.K ) THEN +c K = IWORK( J ) +c ELSE IF( IWORK( J ).EQ.K ) THEN +c K = J +c END IF +c IF( J.LT.K ) THEN +c J = J + 1 +c GO TO 100 +c END IF +c ELSE K = 0 - END IF +c END IF * * Check error code from DSYTRF and handle error. * @@ -516,31 +511,34 @@ * Check error code from DSYTRS and handle error. * IF( INFO.NE.0 ) THEN - CALL ALAERH( PATH, 'DSYTRS_AA', INFO, 0, - $ UPLO, N, N, -1, -1, NRHS, IMAT, - $ NFAIL, NERRS, NOUT ) - END IF -* - CALL DLACPY( 'Full', N, NRHS, B, LDA, WORK, LDA ) -* -* Compute the residual for the solution + IF( IZERO.EQ.0 ) THEN + CALL ALAERH( PATH, 'DSYTRS_AA', INFO, 0, + $ UPLO, N, N, -1, -1, NRHS, IMAT, + $ NFAIL, NERRS, NOUT ) + END IF + ELSE + CALL DLACPY( 'Full', N, NRHS, B, LDA, WORK, LDA + $ ) * - CALL DPOT02( UPLO, N, NRHS, A, LDA, X, LDA, WORK, - $ LDA, RWORK, RESULT( 2 ) ) +* Compute the residual for the solution * + CALL DPOT02( UPLO, N, NRHS, A, LDA, X, LDA, + $ WORK, LDA, RWORK, RESULT( 2 ) ) * -* Print information about the tests that did not pass -* the threshold. * - DO 120 K = 2, 2 - IF( RESULT( K ).GE.THRESH ) THEN - IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 ) - $ CALL ALAHD( NOUT, PATH ) - WRITE( NOUT, FMT = 9998 )UPLO, N, NRHS, - $ IMAT, K, RESULT( K ) - NFAIL = NFAIL + 1 - END IF - 120 CONTINUE +* Print information about the tests that did not pass +* the threshold. +* + DO 120 K = 2, 2 + IF( RESULT( K ).GE.THRESH ) THEN + IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 ) + $ CALL ALAHD( NOUT, PATH ) + WRITE( NOUT, FMT = 9998 )UPLO, N, NRHS, + $ IMAT, K, RESULT( K ) + NFAIL = NFAIL + 1 + END IF + 120 CONTINUE + END IF NRUN = NRUN + 1 * * End do for each value of NRHS in NSVAL. diff -Nru lapack-3.7.0/TESTING/LIN/ddrvls.f lapack-3.7.1/TESTING/LIN/ddrvls.f --- lapack-3.7.0/TESTING/LIN/ddrvls.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/ddrvls.f 2017-06-17 22:46:53.000000000 +0000 @@ -183,7 +183,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup double_lin * @@ -192,10 +192,10 @@ $ NBVAL, NXVAL, THRESH, TSTERR, A, COPYA, B, $ COPYB, C, S, COPYS, NOUT ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. LOGICAL TSTERR @@ -233,8 +233,8 @@ DOUBLE PRECISION EPS, NORMA, NORMB, RCOND * .. * .. Local Arrays .. - INTEGER ISEED( 4 ), ISEEDY( 4 ), IWORKQUERY - DOUBLE PRECISION RESULT( NTESTS ), WORKQUERY + INTEGER ISEED( 4 ), ISEEDY( 4 ), IWQ + DOUBLE PRECISION RESULT( NTESTS ), WQ * .. * .. Allocatable Arrays .. DOUBLE PRECISION, ALLOCATABLE :: WORK (:) @@ -321,43 +321,76 @@ M = MMAX N = NMAX NRHS = NSMAX - LDA = MAX( 1, M ) - LDB = MAX( 1, M, N ) MNMIN = MAX( MIN( M, N ), 1 ) * * Compute workspace needed for routines * DQRT14, DQRT17 (two side cases), DQRT15 and DQRT12 * - LWORK = MAX( ( M+N )*NRHS, + LWORK = MAX( 1, ( M+N )*NRHS, $ ( N+NRHS )*( M+2 ), ( M+NRHS )*( N+2 ), $ MAX( M+MNMIN, NRHS*MNMIN,2*N+M ), $ MAX( M*N+4*MNMIN+MAX(M,N), M*N+2*MNMIN+4*N ) ) + LIWORK = 1 +* +* Iterate through all test cases and compute necessary workspace +* sizes for ?GELS, ?GETSLS, ?GELSY, ?GELSS and ?GELSD routines. +* + DO IM = 1, NM + M = MVAL( IM ) + LDA = MAX( 1, M ) + DO IN = 1, NN + N = NVAL( IN ) + MNMIN = MAX(MIN( M, N ),1) + LDB = MAX( 1, M, N ) + DO INS = 1, NNS + NRHS = NSVAL( INS ) + DO IRANK = 1, 2 + DO ISCALE = 1, 3 + ITYPE = ( IRANK-1 )*3 + ISCALE + IF( DOTYPE( ITYPE ) ) THEN + IF( IRANK.EQ.1 ) THEN + DO ITRAN = 1, 2 + IF( ITRAN.EQ.1 ) THEN + TRANS = 'N' + ELSE + TRANS = 'T' + END IF +* +* Compute workspace needed for DGELS + CALL DGELS( TRANS, M, N, NRHS, A, LDA, + $ B, LDB, WQ, -1, INFO ) + LWORK_DGELS = INT ( WQ ) +* Compute workspace needed for DGETSLS + CALL DGETSLS( TRANS, M, N, NRHS, A, LDA, + $ B, LDB, WQ, -1, INFO ) + LWORK_DGETSLS = INT( WQ ) + ENDDO + END IF +* Compute workspace needed for DGELSY + CALL DGELSY( M, N, NRHS, A, LDA, B, LDB, IWQ, + $ RCOND, CRANK, WQ, -1, INFO ) + LWORK_DGELSY = INT( WQ ) +* Compute workspace needed for DGELSS + CALL DGELSS( M, N, NRHS, A, LDA, B, LDB, S, + $ RCOND, CRANK, WQ, -1 , INFO ) + LWORK_DGELSS = INT( WQ ) +* Compute workspace needed for DGELSD + CALL DGELSD( M, N, NRHS, A, LDA, B, LDB, S, + $ RCOND, CRANK, WQ, -1, IWQ, INFO ) + LWORK_DGELSD = INT( WQ ) +* Compute LIWORK workspace needed for DGELSY and DGELSD + LIWORK = MAX( LIWORK, N, IWQ ) +* Compute LWORK workspace needed for all functions + LWORK = MAX( LWORK, LWORK_DGELS, LWORK_DGETSLS, + $ LWORK_DGELSY, LWORK_DGELSS, + $ LWORK_DGELSD ) + END IF + ENDDO + ENDDO + ENDDO + ENDDO + ENDDO * -* Compute workspace needed for DGELS - CALL DGELS( 'N', M, N, NRHS, A, LDA, B, LDB, - $ WORKQUERY, -1, INFO ) - LWORK_DGELS = INT ( WORKQUERY ) -* Compute workspace needed for DGETSLS - CALL DGETSLS( 'N', M, N, NRHS, A, LDA, B, LDB, - $ WORKQUERY, -1, INFO ) - LWORK_DGETSLS = INT( WORKQUERY ) -* Compute workspace needed for DGELSY - CALL DGELSY( M, N, NRHS, A, LDA, B, LDB, IWORKQUERY, - $ RCOND, CRANK, WORKQUERY, -1, INFO ) - LWORK_DGELSY = INT( WORKQUERY ) -* Compute workspace needed for DGELSS - CALL DGELSS( M, N, NRHS, A, LDA, B, LDB, S, - $ RCOND, CRANK, WORKQUERY, -1 , INFO ) - LWORK_DGELSS = INT( WORKQUERY ) -* Compute workspace needed for DGELSD - CALL DGELSD( M, N, NRHS, A, LDA, B, LDB, S, - $ RCOND, CRANK, WORKQUERY, -1, IWORKQUERY, INFO ) - LWORK_DGELSD = INT( WORKQUERY ) -* Compute LIWORK workspace needed for DGELSY and DGELSD - LIWORK = MAX( 1, N, IWORKQUERY ) -* Compute LWORK workspace needed for all functions - LWORK = MAX( 1, LWORK, LWORK_DGELS, LWORK_DGETSLS, LWORK_DGELSY, - $ LWORK_DGELSS, LWORK_DGELSD ) LWLSY = LWORK * ALLOCATE( WORK( LWORK ) ) diff -Nru lapack-3.7.0/TESTING/LIN/ddrvrf3.f lapack-3.7.1/TESTING/LIN/ddrvrf3.f --- lapack-3.7.0/TESTING/LIN/ddrvrf3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/ddrvrf3.f 2017-06-17 22:46:53.000000000 +0000 @@ -110,7 +110,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup double_lin * @@ -118,10 +118,10 @@ SUBROUTINE DDRVRF3( NOUT, NN, NVAL, THRESH, A, LDA, ARF, B1, B2, + D_WORK_DLANGE, D_WORK_DGEQRF, TAU ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER LDA, NN, NOUT @@ -223,7 +223,7 @@ * IF ( IALPHA.EQ. 1) THEN ALPHA = ZERO - ELSE IF ( IALPHA.EQ. 1) THEN + ELSE IF ( IALPHA.EQ. 2) THEN ALPHA = ONE ELSE ALPHA = DLARND( 2, ISEED ) diff -Nru lapack-3.7.0/TESTING/LIN/ddrvsy_aa.f lapack-3.7.1/TESTING/LIN/ddrvsy_aa.f --- lapack-3.7.0/TESTING/LIN/ddrvsy_aa.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/ddrvsy_aa.f 2017-06-17 22:46:53.000000000 +0000 @@ -143,7 +143,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * * @precisions fortran d -> z c * @@ -154,10 +154,10 @@ $ NMAX, A, AFAC, AINV, B, X, XACT, WORK, $ RWORK, IWORK, NOUT ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. LOGICAL TSTERR @@ -201,7 +201,7 @@ * .. * .. External Subroutines .. EXTERNAL ALADHD, ALAERH, ALASVM, DERRVX, DGET04, DLACPY, - $ DLARHS, DLASET, DLATB4, DLATMS, DPOT02, DPOT05, + $ DLARHS, DLASET, DLATB4, DLATMS, DPOT02, $ DSYSV_AA, DSYT01_AA, DSYTRF_AA, XLAENV * .. * .. Scalars in Common .. diff -Nru lapack-3.7.0/TESTING/LIN/dlahilb.f lapack-3.7.1/TESTING/LIN/dlahilb.f --- lapack-3.7.0/TESTING/LIN/dlahilb.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/dlahilb.f 2017-06-17 22:46:53.000000000 +0000 @@ -8,7 +8,7 @@ * Definition: * =========== * -* SUBROUTINE DLAHILB(N, NRHS, A, LDA, X, LDX, B, LDB, WORK, INFO) +* SUBROUTINE DLAHILB( N, NRHS, A, LDA, X, LDX, B, LDB, WORK, INFO) * * .. Scalar Arguments .. * INTEGER N, NRHS, LDA, LDX, LDB, INFO @@ -53,7 +53,7 @@ *> *> \param[in] NRHS *> \verbatim -*> NRHS is NRHS +*> NRHS is INTEGER *> The requested number of right-hand sides. *> \endverbatim *> @@ -117,17 +117,17 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup double_lin * * ===================================================================== - SUBROUTINE DLAHILB(N, NRHS, A, LDA, X, LDX, B, LDB, WORK, INFO) + SUBROUTINE DLAHILB( N, NRHS, A, LDA, X, LDX, B, LDB, WORK, INFO) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER N, NRHS, LDA, LDX, LDB, INFO @@ -140,7 +140,6 @@ INTEGER TM, TI, R INTEGER M INTEGER I, J - COMPLEX*16 TMP * .. * .. Parameters .. * NMAX_EXACT the largest dimension where the generated data is @@ -203,9 +202,8 @@ * * Generate matrix B as simply the first NRHS columns of M * the * identity. - TMP = DBLE(M) - CALL DLASET('Full', N, NRHS, 0.0D+0, TMP, B, LDB) -* + CALL DLASET('Full', N, NRHS, 0.0D+0, DBLE(M), B, LDB) + * Generate the true solutions in X. Because B = the first NRHS * columns of M*I, the true solutions are just the first NRHS columns * of the inverse Hilbert matrix. diff -Nru lapack-3.7.0/TESTING/LIN/dsyt01_3.f lapack-3.7.1/TESTING/LIN/dsyt01_3.f --- lapack-3.7.0/TESTING/LIN/dsyt01_3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/dsyt01_3.f 2017-06-17 22:46:53.000000000 +0000 @@ -91,7 +91,7 @@ *> On entry, contains the superdiagonal (or subdiagonal) *> elements of the symmetric block diagonal matrix D *> with 1-by-1 or 2-by-2 diagonal blocks, where -*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; +*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. *> \endverbatim *> @@ -132,7 +132,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup double_lin * @@ -140,10 +140,10 @@ SUBROUTINE DSYT01_3( UPLO, N, A, LDA, AFAC, LDAFAC, E, IPIV, C, $ LDC, RWORK, RESID ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/TESTING/LIN/Makefile lapack-3.7.1/TESTING/LIN/Makefile --- lapack-3.7.0/TESTING/LIN/Makefile 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/Makefile 2017-06-17 22:46:53.000000000 +0000 @@ -7,10 +7,10 @@ # ALINTST -- Auxiliary test routines # SLINTST -- Single precision real test routines # CLINTST -- Single precision complex test routines -# SCLNTST -- Single and Complex routines in common +# SCLNTST -- Single precision real and complex routines in common # DLINTST -- Double precision real test routines # ZLINTST -- Double precision complex test routines -# DZLNTST -- Double and Double Complex routines in common +# DZLNTST -- Double precision real and complex routines in common # # Test programs can be generated for all or some of the four different # precisions. Enter make followed by one or more of the data types @@ -22,12 +22,11 @@ # make # without any arguments creates all four test programs. # The executable files are called -# xlintims, xlintimd, xlintimc, and xlintimz -# and are created in the next higher directory level. +# xlintsts, xlintstd, xlintstc, and xlintstz # # To remove the object files after the executable files have been # created, enter -# make clean +# make cleanobj # On some systems, you can force the source files to be recompiled by # entering (for example) # make single FRC=FRC @@ -54,7 +53,7 @@ schksp.o schksy.o schksy_rook.o schksy_rk.o schksy_aa.o schktb.o schktp.o schktr.o \ schktz.o \ sdrvgt.o sdrvls.o sdrvpb.o \ - sdrvpp.o sdrvpt.o sdrvsp.o sdrvsy_rook.o sdrvsy_rk.o sdrvsy_aa.o \ + sdrvpp.o sdrvpt.o sdrvsp.o sdrvsy_rook.o sdrvsy_rk.o sdrvsy_aa.o \ serrgt.o serrlq.o serrls.o \ serrps.o serrql.o serrqp.o serrqr.o \ serrrq.o serrtr.o serrtz.o \ @@ -79,11 +78,12 @@ serrlqt.o serrlqtp.o serrtsqr.o stsqr01.o slqt04.o slqt05.o ifdef USEXBLAS -SLINTST += serrvxx.o sdrvgex.o sdrvsyx.o serrgex.o sdrvgbx.o sdrvpox.o \ - sebchvxx.o serrsyx.o serrpox.o +SLINTST += sdrvgbx.o sdrvgex.o sdrvsyx.o sdrvpox.o \ + serrvxx.o serrgex.o serrsyx.o serrpox.o \ + sebchvxx.o else -SLINTST += serrvx.o sdrvge.o sdrvsy.o serrge.o sdrvgb.o sdrvpo.o \ - serrsy.o serrpo.o +SLINTST += sdrvgb.o sdrvge.o sdrvsy.o sdrvpo.o \ + serrvx.o serrge.o serrsy.o serrpo.o endif CLINTST = cchkaa.o \ @@ -101,8 +101,8 @@ cgbt01.o cgbt02.o cgbt05.o cgelqs.o cgeqls.o cgeqrs.o \ cgerqs.o cget01.o cget02.o \ cget03.o cget04.o cget07.o cgtt01.o cgtt02.o \ - cgtt05.o chet01.o chet01_rook.o chet01_3.o \ - chet01_aa.o chpt01.o claipd.o claptm.o clarhs.o clatb4.o clatb5.o \ + cgtt05.o chet01.o chet01_rook.o chet01_3.o chet01_aa.o \ + chpt01.o claipd.o claptm.o clarhs.o clatb4.o clatb5.o \ clatsp.o clatsy.o clattb.o clattp.o clattr.o \ clavhe.o clavhe_rook.o clavhp.o clavsp.o clavsy.o clavsy_rook.o clqt01.o \ clqt02.o clqt03.o cpbt01.o cpbt02.o cpbt05.o \ @@ -123,11 +123,12 @@ cerrlqt.o cerrlqtp.o cerrtsqr.o ctsqr01.o clqt04.o clqt05.o ifdef USEXBLAS -CLINTST += cerrvxx.o cdrvgex.o cdrvsyx.o cdrvgbx.o cerrgex.o cdrvpox.o \ - cdrvhex.o cerrpox.o cebchvxx.o cerrsyx.o cerrhex.o +CLINTST += cdrvgbx.o cdrvgex.o cdrvhex.o cdrvsyx.o cdrvpox.o \ + cerrvxx.o cerrgex.o cerrhex.o cerrsyx.o cerrpox.o \ + cebchvxx.o else -CLINTST += cerrvx.o cdrvge.o cdrvsy.o cdrvgb.o cerrge.o cdrvpo.o \ - cdrvhe.o cerrpo.o cerrsy.o cerrhe.o +CLINTST += cdrvgb.o cdrvge.o cdrvhe.o cdrvsy.o cdrvpo.o \ + cerrvx.o cerrge.o cerrhe.o cerrsy.o cerrpo.o endif DLINTST = dchkaa.o \ @@ -163,11 +164,12 @@ derrlqt.o derrlqtp.o derrtsqr.o dtsqr01.o dlqt04.o dlqt05.o ifdef USEXBLAS -DLINTST += derrvxx.o ddrvgex.o ddrvsyx.o ddrvgbx.o derrgex.o ddrvpox.o derrpox.o \ - debchvxx.o derrsyx.o +DLINTST += ddrvgbx.o ddrvgex.o ddrvsyx.o ddrvpox.o \ + derrvxx.o derrgex.o derrsyx.o derrpox.o \ + debchvxx.o else -DLINTST += derrvx.o ddrvge.o ddrvsy.o ddrvgb.o derrge.o ddrvpo.o derrpo.o \ - derrsy.o +DLINTST += ddrvgb.o ddrvge.o ddrvsy.o ddrvpo.o \ + derrvx.o derrge.o derrsy.o derrpo.o endif ZLINTST = zchkaa.o \ @@ -185,8 +187,8 @@ zgbt01.o zgbt02.o zgbt05.o zgelqs.o zgeqls.o zgeqrs.o \ zgerqs.o zget01.o zget02.o \ zget03.o zget04.o zget07.o zgtt01.o zgtt02.o \ - zgtt05.o zhet01.o zhet01_rook.o zhet01_3.o \ - zhet01_aa.o zhpt01.o zlaipd.o zlaptm.o zlarhs.o zlatb4.o zlatb5.o \ + zgtt05.o zhet01.o zhet01_rook.o zhet01_3.o zhet01_aa.o \ + zhpt01.o zlaipd.o zlaptm.o zlarhs.o zlatb4.o zlatb5.o \ zlatsp.o zlatsy.o zlattb.o zlattp.o zlattr.o \ zlavhe.o zlavhe_rook.o zlavhp.o zlavsp.o zlavsy.o zlavsy_rook.o zlqt01.o \ zlqt02.o zlqt03.o zpbt01.o zpbt02.o zpbt05.o \ @@ -207,11 +209,12 @@ zerrlqt.o zerrlqtp.o zerrtsqr.o ztsqr01.o zlqt04.o zlqt05.o ifdef USEXBLAS -ZLINTST += zerrvxx.o zdrvgex.o zdrvsyx.o zdrvgbx.o zerrgex.o zdrvpox.o zdrvhex.o \ - zerrpox.o zebchvxx.o zerrsyx.o zerrhex.o +ZLINTST += zdrvgbx.o zdrvgex.o zdrvhex.o zdrvsyx.o zdrvpox.o \ + zerrvxx.o zerrgex.o zerrhex.o zerrsyx.o zerrpox.o \ + zebchvxx.o else -ZLINTST += zerrvx.o zdrvge.o zdrvsy.o zdrvgb.o zerrge.o zdrvpo.o \ - zdrvhe.o zerrpo.o zerrsy.o zerrhe.o +ZLINTST += zdrvgb.o zdrvge.o zdrvhe.o zdrvsy.o zdrvpo.o \ + zerrvx.o zerrge.o zerrhe.o zerrsy.o zerrpo.o endif DSLINTST = dchkab.o \ @@ -244,55 +247,45 @@ all: single double complex complex16 proto-single proto-double proto-complex proto-complex16 -single: ../xlintsts -double: ../xlintstd -complex: ../xlintstc -complex16: ../xlintstz - -proto-single: ../xlintstrfs -proto-double: ../xlintstds ../xlintstrfd -proto-complex: ../xlintstrfc -proto-complex16: ../xlintstzc ../xlintstrfz - -../xlintsts: $(ALINTST) $(SLINTST) $(SCLNTST) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) -o $@ $(ALINTST) $(SCLNTST) $(SLINTST) \ - ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) - -../xlintstc: $(ALINTST) $(CLINTST) $(SCLNTST) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) -o $@ $(ALINTST) $(SCLNTST) $(CLINTST) \ - ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) - -../xlintstd: $(ALINTST) $(DLINTST) $(DZLNTST) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) -o $@ $^ \ - ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) - -../xlintstz: $(ALINTST) $(ZLINTST) $(DZLNTST) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) -o $@ $(ALINTST) $(DZLNTST) $(ZLINTST) \ - ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) - -../xlintstds: $(DSLINTST) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) -o $@ $(DSLINTST) \ - ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) - -../xlintstzc: $(ZCLINTST) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) -o $@ $(ZCLINTST) \ - ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) - -../xlintstrfs: $(SLINTSTRFP) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) -o $@ $(SLINTSTRFP) \ - ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) - -../xlintstrfd: $(DLINTSTRFP) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) -o $@ $(DLINTSTRFP) \ - ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) - -../xlintstrfc: $(CLINTSTRFP) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) -o $@ $(CLINTSTRFP) \ - ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) - -../xlintstrfz: $(ZLINTSTRFP) ../../$(LAPACKLIB) - $(LOADER) $(LOADOPTS) -o $@ $(ZLINTSTRFP) \ - ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) +single: xlintsts +double: xlintstd +complex: xlintstc +complex16: xlintstz + +proto-single: xlintstrfs +proto-double: xlintstds xlintstrfd +proto-complex: xlintstrfc +proto-complex16: xlintstzc xlintstrfz + +xlintsts: $(ALINTST) $(SLINTST) $(SCLNTST) ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) + $(LOADER) $(LOADOPTS) -o $@ $^ + +xlintstc: $(ALINTST) $(CLINTST) $(SCLNTST) ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) + $(LOADER) $(LOADOPTS) -o $@ $^ + +xlintstd: $(ALINTST) $(DLINTST) $(DZLNTST) ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) + $(LOADER) $(LOADOPTS) -o $@ $^ + +xlintstz: $(ALINTST) $(ZLINTST) $(DZLNTST) ../../$(TMGLIB) ../../$(LAPACKLIB) $(XBLASLIB) $(BLASLIB) + $(LOADER) $(LOADOPTS) -o $@ $^ + +xlintstds: $(DSLINTST) ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) + $(LOADER) $(LOADOPTS) -o $@ $^ + +xlintstzc: $(ZCLINTST) ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) + $(LOADER) $(LOADOPTS) -o $@ $^ + +xlintstrfs: $(SLINTSTRFP) ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) + $(LOADER) $(LOADOPTS) -o $@ $^ + +xlintstrfd: $(DLINTSTRFP) ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) + $(LOADER) $(LOADOPTS) -o $@ $^ + +xlintstrfc: $(CLINTSTRFP) ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) + $(LOADER) $(LOADOPTS) -o $@ $^ + +xlintstrfz: $(ZLINTSTRFP) ../../$(TMGLIB) ../../$(LAPACKLIB) $(BLASLIB) + $(LOADER) $(LOADOPTS) -o $@ $^ $(ALINTST): $(FRC) $(SCLNTST): $(FRC) @@ -305,8 +298,11 @@ FRC: @FRC=$(FRC) -clean: +clean: cleanobj cleanexe +cleanobj: rm -f *.o +cleanexe: + rm -f xlintst* schkaa.o: schkaa.f $(FORTRAN) $(DRVOPTS) -c -o $@ $< diff -Nru lapack-3.7.0/TESTING/LIN/schklqtp.f lapack-3.7.1/TESTING/LIN/schklqtp.f --- lapack-3.7.0/TESTING/LIN/schklqtp.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/schklqtp.f 2017-06-17 22:46:53.000000000 +0000 @@ -94,7 +94,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup double_lin * @@ -103,10 +103,10 @@ $ NBVAL, NOUT ) IMPLICIT NONE * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. LOGICAL TSTERR @@ -132,7 +132,7 @@ REAL RESULT( NTESTS ) * .. * .. External Subroutines .. - EXTERNAL ALAERH, ALAHD, ALASUM, DERRLQTP, DLQT04 + EXTERNAL ALAERH, ALAHD, ALASUM, SERRLQTP, SLQT05 * .. * .. Scalars in Common .. LOGICAL LERR, OK diff -Nru lapack-3.7.0/TESTING/LIN/schkrfp.f lapack-3.7.1/TESTING/LIN/schkrfp.f --- lapack-3.7.0/TESTING/LIN/schkrfp.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/schkrfp.f 2017-06-17 22:46:53.000000000 +0000 @@ -59,7 +59,7 @@ * ===================================================================== PROGRAM SCHKRFP * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * April 2012 @@ -213,11 +213,6 @@ * IF( FATAL ) THEN WRITE( NOUT, FMT = 9999 ) - STOP - END IF -* - IF( FATAL ) THEN - WRITE( NOUT, FMT = 9999 ) STOP END IF * diff -Nru lapack-3.7.0/TESTING/LIN/schksy_aa.f lapack-3.7.1/TESTING/LIN/schksy_aa.f --- lapack-3.7.0/TESTING/LIN/schksy_aa.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/schksy_aa.f 2017-06-17 22:46:53.000000000 +0000 @@ -161,7 +161,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * * @precisions fortran d -> z c * @@ -172,10 +172,10 @@ $ THRESH, TSTERR, NMAX, A, AFAC, AINV, B, $ X, XACT, WORK, RWORK, IWORK, NOUT ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * IMPLICIT NONE * @@ -215,15 +215,10 @@ INTEGER ISEED( 4 ), ISEEDY( 4 ) REAL RESULT( NTESTS ) * .. -* .. External Functions .. - REAL DGET06, SLANSY - EXTERNAL DGET06, SLANSY -* .. * .. External Subroutines .. - EXTERNAL ALAERH, ALAHD, ALASUM, SERRSY, SGET04, SLACPY, - $ SLARHS, SLATB4, SLATMS, SPOT02, DPOT03, DPOT05, - $ DSYCON, SSYRFS, SSYT01_AA, SSYTRF_AA, - $ DSYTRI2, SSYTRS_AA, XLAENV + EXTERNAL ALAERH, ALAHD, ALASUM, SERRSY, SLACPY, SLARHS, + $ SLATB4, SLATMS, SPOT02, SSYT01_AA, SSYTRF_AA, + $ SSYTRS_AA, XLAENV * .. * .. Intrinsic Functions .. INTRINSIC MAX, MIN @@ -438,22 +433,22 @@ * Adjust the expected value of INFO to account for * pivoting. * - IF( IZERO.GT.0 ) THEN - J = 1 - K = IZERO - 100 CONTINUE - IF( J.EQ.K ) THEN - K = IWORK( J ) - ELSE IF( IWORK( J ).EQ.K ) THEN - K = J - END IF - IF( J.LT.K ) THEN - J = J + 1 - GO TO 100 - END IF - ELSE +c IF( IZERO.GT.0 ) THEN +c J = 1 +c K = IZERO +c 100 CONTINUE +c IF( J.EQ.K ) THEN +c K = IWORK( J ) +c ELSE IF( IWORK( J ).EQ.K ) THEN +c K = J +c END IF +c IF( J.LT.K ) THEN +c J = J + 1 +c GO TO 100 +c END IF +c ELSE K = 0 - END IF +c END IF * * Check error code from SSYTRF and handle error. * @@ -517,31 +512,34 @@ * Check error code from SSYTRS and handle error. * IF( INFO.NE.0 ) THEN - CALL ALAERH( PATH, 'SSYTRS_AA', INFO, 0, - $ UPLO, N, N, -1, -1, NRHS, IMAT, - $ NFAIL, NERRS, NOUT ) - END IF -* - CALL SLACPY( 'Full', N, NRHS, B, LDA, WORK, LDA ) + IF( IZERO.EQ.0 ) THEN + CALL ALAERH( PATH, 'SSYTRS_AA', INFO, 0, + $ UPLO, N, N, -1, -1, NRHS, IMAT, + $ NFAIL, NERRS, NOUT ) + END IF + ELSE + CALL SLACPY( 'Full', N, NRHS, B, LDA, WORK, LDA + $ ) * -* Compute the residual for the solution +* Compute the residual for the solution * - CALL SPOT02( UPLO, N, NRHS, A, LDA, X, LDA, WORK, - $ LDA, RWORK, RESULT( 2 ) ) + CALL SPOT02( UPLO, N, NRHS, A, LDA, X, LDA, + $ WORK, LDA, RWORK, RESULT( 2 ) ) * * * Print information about the tests that did not pass * the threshold. * - DO 120 K = 2, 2 - IF( RESULT( K ).GE.THRESH ) THEN - IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 ) - $ CALL ALAHD( NOUT, PATH ) - WRITE( NOUT, FMT = 9998 )UPLO, N, NRHS, - $ IMAT, K, RESULT( K ) - NFAIL = NFAIL + 1 - END IF - 120 CONTINUE + DO 120 K = 2, 2 + IF( RESULT( K ).GE.THRESH ) THEN + IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 ) + $ CALL ALAHD( NOUT, PATH ) + WRITE( NOUT, FMT = 9998 )UPLO, N, NRHS, + $ IMAT, K, RESULT( K ) + NFAIL = NFAIL + 1 + END IF + 120 CONTINUE + END IF NRUN = NRUN + 1 * * End do for each value of NRHS in NSVAL. diff -Nru lapack-3.7.0/TESTING/LIN/sdrvls.f lapack-3.7.1/TESTING/LIN/sdrvls.f --- lapack-3.7.0/TESTING/LIN/sdrvls.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/sdrvls.f 2017-06-17 22:46:53.000000000 +0000 @@ -183,7 +183,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup single_lin * @@ -192,10 +192,10 @@ $ NBVAL, NXVAL, THRESH, TSTERR, A, COPYA, B, $ COPYB, C, S, COPYS, NOUT ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. LOGICAL TSTERR @@ -233,8 +233,8 @@ REAL EPS, NORMA, NORMB, RCOND * .. * .. Local Arrays .. - INTEGER ISEED( 4 ), ISEEDY( 4 ), IWORKQUERY - REAL RESULT( NTESTS ), WORKQUERY + INTEGER ISEED( 4 ), ISEEDY( 4 ), IWQ + REAL RESULT( NTESTS ), WQ * .. * .. Allocatable Arrays .. REAL, ALLOCATABLE :: WORK (:) @@ -321,43 +321,76 @@ M = MMAX N = NMAX NRHS = NSMAX - LDA = MAX( 1, M ) - LDB = MAX( 1, M, N ) MNMIN = MAX( MIN( M, N ), 1 ) * * Compute workspace needed for routines * SQRT14, SQRT17 (two side cases), SQRT15 and SQRT12 * - LWORK = MAX( ( M+N )*NRHS, + LWORK = MAX( 1, ( M+N )*NRHS, $ ( N+NRHS )*( M+2 ), ( M+NRHS )*( N+2 ), $ MAX( M+MNMIN, NRHS*MNMIN,2*N+M ), $ MAX( M*N+4*MNMIN+MAX(M,N), M*N+2*MNMIN+4*N ) ) + LIWORK = 1 +* +* Iterate through all test cases and compute necessary workspace +* sizes for ?GELS, ?GETSLS, ?GELSY, ?GELSS and ?GELSD routines. +* + DO IM = 1, NM + M = MVAL( IM ) + LDA = MAX( 1, M ) + DO IN = 1, NN + N = NVAL( IN ) + MNMIN = MAX(MIN( M, N ),1) + LDB = MAX( 1, M, N ) + DO INS = 1, NNS + NRHS = NSVAL( INS ) + DO IRANK = 1, 2 + DO ISCALE = 1, 3 + ITYPE = ( IRANK-1 )*3 + ISCALE + IF( DOTYPE( ITYPE ) ) THEN + IF( IRANK.EQ.1 ) THEN + DO ITRAN = 1, 2 + IF( ITRAN.EQ.1 ) THEN + TRANS = 'N' + ELSE + TRANS = 'T' + END IF +* +* Compute workspace needed for SGELS + CALL SGELS( TRANS, M, N, NRHS, A, LDA, + $ B, LDB, WQ, -1, INFO ) + LWORK_SGELS = INT ( WQ ) +* Compute workspace needed for SGETSLS + CALL SGETSLS( TRANS, M, N, NRHS, A, LDA, + $ B, LDB, WQ, -1, INFO ) + LWORK_SGETSLS = INT( WQ ) + ENDDO + END IF +* Compute workspace needed for SGELSY + CALL SGELSY( M, N, NRHS, A, LDA, B, LDB, IWQ, + $ RCOND, CRANK, WQ, -1, INFO ) + LWORK_SGELSY = INT( WQ ) +* Compute workspace needed for SGELSS + CALL SGELSS( M, N, NRHS, A, LDA, B, LDB, S, + $ RCOND, CRANK, WQ, -1 , INFO ) + LWORK_SGELSS = INT( WQ ) +* Compute workspace needed for SGELSD + CALL SGELSD( M, N, NRHS, A, LDA, B, LDB, S, + $ RCOND, CRANK, WQ, -1, IWQ, INFO ) + LWORK_SGELSD = INT( WQ ) +* Compute LIWORK workspace needed for SGELSY and SGELSD + LIWORK = MAX( LIWORK, N, IWQ ) +* Compute LWORK workspace needed for all functions + LWORK = MAX( LWORK, LWORK_SGELS, LWORK_SGETSLS, + $ LWORK_SGELSY, LWORK_SGELSS, + $ LWORK_SGELSD ) + END IF + ENDDO + ENDDO + ENDDO + ENDDO + ENDDO * -* Compute workspace needed for SGELS - CALL SGELS( 'N', M, N, NRHS, A, LDA, B, LDB, - $ WORKQUERY, -1, INFO ) - LWORK_SGELS = INT ( WORKQUERY ) -* Compute workspace needed for SGETSLS - CALL SGETSLS( 'N', M, N, NRHS, A, LDA, B, LDB, - $ WORKQUERY, -1, INFO ) - LWORK_SGETSLS = INT( WORKQUERY ) -* Compute workspace needed for SGELSY - CALL SGELSY( M, N, NRHS, A, LDA, B, LDB, IWORKQUERY, - $ RCOND, CRANK, WORKQUERY, -1, INFO ) - LWORK_SGELSY = INT( WORKQUERY ) -* Compute workspace needed for SGELSS - CALL SGELSS( M, N, NRHS, A, LDA, B, LDB, S, - $ RCOND, CRANK, WORKQUERY, -1 , INFO ) - LWORK_SGELSS = INT( WORKQUERY ) -* Compute workspace needed for SGELSD - CALL SGELSD( M, N, NRHS, A, LDA, B, LDB, S, - $ RCOND, CRANK, WORKQUERY, -1, IWORKQUERY, INFO ) - LWORK_SGELSD = INT( WORKQUERY ) -* Compute LIWORK workspace needed for SGELSY and SGELSD - LIWORK = MAX( 1, N, IWORKQUERY ) -* Compute LWORK workspace needed for all functions - LWORK = MAX( 1, LWORK, LWORK_SGELS, LWORK_SGETSLS, LWORK_SGELSY, - $ LWORK_SGELSS, LWORK_SGELSD ) LWLSY = LWORK * ALLOCATE( WORK( LWORK ) ) diff -Nru lapack-3.7.0/TESTING/LIN/sdrvrf3.f lapack-3.7.1/TESTING/LIN/sdrvrf3.f --- lapack-3.7.0/TESTING/LIN/sdrvrf3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/sdrvrf3.f 2017-06-17 22:46:53.000000000 +0000 @@ -110,7 +110,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup single_lin * @@ -118,10 +118,10 @@ SUBROUTINE SDRVRF3( NOUT, NN, NVAL, THRESH, A, LDA, ARF, B1, B2, + S_WORK_SLANGE, S_WORK_SGEQRF, TAU ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER LDA, NN, NOUT @@ -223,7 +223,7 @@ * IF ( IALPHA.EQ. 1) THEN ALPHA = ZERO - ELSE IF ( IALPHA.EQ. 1) THEN + ELSE IF ( IALPHA.EQ. 2) THEN ALPHA = ONE ELSE ALPHA = SLARND( 2, ISEED ) diff -Nru lapack-3.7.0/TESTING/LIN/sdrvsy_aa.f lapack-3.7.1/TESTING/LIN/sdrvsy_aa.f --- lapack-3.7.0/TESTING/LIN/sdrvsy_aa.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/sdrvsy_aa.f 2017-06-17 22:46:53.000000000 +0000 @@ -143,7 +143,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup real_lin * @@ -152,10 +152,10 @@ $ NMAX, A, AFAC, AINV, B, X, XACT, WORK, $ RWORK, IWORK, NOUT ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. LOGICAL TSTERR @@ -199,7 +199,7 @@ * .. * .. External Subroutines .. EXTERNAL ALADHD, ALAERH, ALASVM, SERRVX, SGET04, SLACPY, - $ SLARHS, SLASET, SLATB4, SLATMS, SPOT02, DPOT05, + $ SLARHS, SLASET, SLATB4, SLATMS, SPOT02, $ SSYSV_AA, SSYT01_AA, SSYTRF_AA, XLAENV * .. * .. Scalars in Common .. diff -Nru lapack-3.7.0/TESTING/LIN/serrsy.f lapack-3.7.1/TESTING/LIN/serrsy.f --- lapack-3.7.0/TESTING/LIN/serrsy.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/serrsy.f 2017-06-17 22:46:53.000000000 +0000 @@ -48,17 +48,17 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup single_lin * * ===================================================================== SUBROUTINE SERRSY( PATH, NUNIT ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER*3 PATH @@ -92,7 +92,7 @@ $ SSYTF2_RK, SSYTF2_ROOK, SSYTRF, SSYTRF_RK, $ SSYTRF_ROOK, SSYTRI, SSYTF2, SSYTRI_3, $ SSYTRI_3X, SSYTRI_ROOK, SSYTRF_AA, SSYTRI2, - $ SYTRI2X, SSYTRS, SSYTRS_3, SSYTRS_ROOK, + $ SSYTRI2X, SSYTRS, SSYTRS_3, SSYTRS_ROOK, $ SSYTRS_AA * .. * .. Scalars in Common .. diff -Nru lapack-3.7.0/TESTING/LIN/slahilb.f lapack-3.7.1/TESTING/LIN/slahilb.f --- lapack-3.7.0/TESTING/LIN/slahilb.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/slahilb.f 2017-06-17 22:46:53.000000000 +0000 @@ -8,7 +8,7 @@ * Definition: * =========== * -* SUBROUTINE SLAHILB(N, NRHS, A, LDA, X, LDX, B, LDB, WORK, INFO) +* SUBROUTINE SLAHILB( N, NRHS, A, LDA, X, LDX, B, LDB, WORK, INFO) * * .. Scalar Arguments .. * INTEGER N, NRHS, LDA, LDX, LDB, INFO @@ -53,7 +53,7 @@ *> *> \param[in] NRHS *> \verbatim -*> NRHS is NRHS +*> NRHS is INTEGER *> The requested number of right-hand sides. *> \endverbatim *> @@ -117,17 +117,17 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup single_lin * * ===================================================================== - SUBROUTINE SLAHILB(N, NRHS, A, LDA, X, LDX, B, LDB, WORK, INFO) + SUBROUTINE SLAHILB( N, NRHS, A, LDA, X, LDX, B, LDB, WORK, INFO) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER N, NRHS, LDA, LDX, LDB, INFO diff -Nru lapack-3.7.0/TESTING/LIN/ssyt01_3.f lapack-3.7.1/TESTING/LIN/ssyt01_3.f --- lapack-3.7.0/TESTING/LIN/ssyt01_3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/ssyt01_3.f 2017-06-17 22:46:53.000000000 +0000 @@ -91,7 +91,7 @@ *> On entry, contains the superdiagonal (or subdiagonal) *> elements of the symmetric block diagonal matrix D *> with 1-by-1 or 2-by-2 diagonal blocks, where -*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; +*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. *> \endverbatim *> @@ -132,7 +132,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup single_lin * @@ -140,10 +140,10 @@ SUBROUTINE SSYT01_3( UPLO, N, A, LDA, AFAC, LDAFAC, E, IPIV, C, $ LDC, RWORK, RESID ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/TESTING/LIN/zchkhe_aa.f lapack-3.7.1/TESTING/LIN/zchkhe_aa.f --- lapack-3.7.0/TESTING/LIN/zchkhe_aa.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/zchkhe_aa.f 2017-06-17 22:46:53.000000000 +0000 @@ -162,7 +162,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * * *> \ingroup complex16_lin @@ -172,10 +172,10 @@ $ THRESH, TSTERR, NMAX, A, AFAC, AINV, B, $ X, XACT, WORK, RWORK, IWORK, NOUT ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * IMPLICIT NONE * @@ -218,15 +218,10 @@ INTEGER ISEED( 4 ), ISEEDY( 4 ) DOUBLE PRECISION RESULT( NTESTS ) * .. -* .. External Functions .. - DOUBLE PRECISION DGET06, ZLANHE - EXTERNAL DGET06, ZLANHE -* .. * .. External Subroutines .. - EXTERNAL ALAERH, ALAHD, ALASUM, XLAENV, ZERRHE, ZGET04, - $ ZHECON, ZHERFS, ZHET01_AA, ZHETRF_AA, ZHETRI2, - $ ZHETRS_AA, ZLACPY, ZLAIPD, ZLARHS, ZLATB4, - $ ZLATMS, ZPOT02, ZPOT03, ZPOT05 + EXTERNAL ALAERH, ALAHD, ALASUM, XLAENV, ZERRHE, + $ ZHET01_AA, ZHETRF_AA, ZHETRS_AA, ZLACPY, + $ ZLAIPD, ZLARHS, ZLATB4, ZLATMS, ZPOT02 * .. * .. Intrinsic Functions .. INTRINSIC MAX, MIN @@ -438,22 +433,22 @@ * Adjust the expected value of INFO to account for * pivoting. * - IF( IZERO.GT.0 ) THEN - J = 1 - K = IZERO - 100 CONTINUE - IF( J.EQ.K ) THEN - K = IWORK( J ) - ELSE IF( IWORK( J ).EQ.K ) THEN - K = J - END IF - IF( J.LT.K ) THEN - J = J + 1 - GO TO 100 - END IF - ELSE +c IF( IZERO.GT.0 ) THEN +c J = 1 +c K = IZERO +c 100 CONTINUE +c IF( J.EQ.K ) THEN +c K = IWORK( J ) +c ELSE IF( IWORK( J ).EQ.K ) THEN +c K = J +c END IF +c IF( J.LT.K ) THEN +c J = J + 1 +c GO TO 100 +c END IF +c ELSE K = 0 - END IF +c END IF * * Check error code from ZHETRF and handle error. * @@ -516,30 +511,34 @@ * Check error code from ZHETRS and handle error. * IF( INFO.NE.0 ) THEN - CALL ALAERH( PATH, 'ZHETRS', INFO, 0, UPLO, N, - $ N, -1, -1, NRHS, IMAT, NFAIL, - $ NERRS, NOUT ) - END IF + IF( IZERO.EQ.0 ) THEN + CALL ALAERH( PATH, 'ZHETRS_AA', INFO, 0, + $ UPLO, N, N, -1, -1, NRHS, IMAT, + $ NFAIL, NERRS, NOUT ) + END IF + ELSE * - CALL ZLACPY( 'Full', N, NRHS, B, LDA, WORK, LDA ) + CALL ZLACPY( 'Full', N, NRHS, B, LDA, WORK, LDA + $ ) * -* Compute the residual for the solution +* Compute the residual for the solution * - CALL ZPOT02( UPLO, N, NRHS, A, LDA, X, LDA, WORK, - $ LDA, RWORK, RESULT( 2 ) ) + CALL ZPOT02( UPLO, N, NRHS, A, LDA, X, LDA, + $ WORK, LDA, RWORK, RESULT( 2 ) ) * -* Print information about the tests that did not pass -* the threshold. -* - DO 120 K = 2, 2 - IF( RESULT( K ).GE.THRESH ) THEN - IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 ) - $ CALL ALAHD( NOUT, PATH ) - WRITE( NOUT, FMT = 9998 )UPLO, N, NRHS, - $ IMAT, K, RESULT( K ) - NFAIL = NFAIL + 1 - END IF - 120 CONTINUE +* Print information about the tests that did not pass +* the threshold. +* + DO 120 K = 2, 2 + IF( RESULT( K ).GE.THRESH ) THEN + IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 ) + $ CALL ALAHD( NOUT, PATH ) + WRITE( NOUT, FMT = 9998 )UPLO, N, NRHS, + $ IMAT, K, RESULT( K ) + NFAIL = NFAIL + 1 + END IF + 120 CONTINUE + END IF NRUN = NRUN + 1 * * End do for each value of NRHS in NSVAL. diff -Nru lapack-3.7.0/TESTING/LIN/zchkrfp.f lapack-3.7.1/TESTING/LIN/zchkrfp.f --- lapack-3.7.0/TESTING/LIN/zchkrfp.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/zchkrfp.f 2017-06-17 22:46:53.000000000 +0000 @@ -59,7 +59,7 @@ * ===================================================================== PROGRAM ZCHKRFP * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * April 2012 @@ -215,11 +215,6 @@ * IF( FATAL ) THEN WRITE( NOUT, FMT = 9999 ) - STOP - END IF -* - IF( FATAL ) THEN - WRITE( NOUT, FMT = 9999 ) STOP END IF * diff -Nru lapack-3.7.0/TESTING/LIN/zchksy_aa.f lapack-3.7.1/TESTING/LIN/zchksy_aa.f --- lapack-3.7.0/TESTING/LIN/zchksy_aa.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/zchksy_aa.f 2017-06-17 22:46:53.000000000 +0000 @@ -161,7 +161,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * * @generated from LIN/dchksy_aa.f, fortran d -> z, Wed Nov 16 21:34:18 2016 * @@ -172,10 +172,10 @@ $ THRESH, TSTERR, NMAX, A, AFAC, AINV, B, $ X, XACT, WORK, RWORK, IWORK, NOUT ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * IMPLICIT NONE * @@ -218,15 +218,10 @@ INTEGER ISEED( 4 ), ISEEDY( 4 ) DOUBLE PRECISION RESULT( NTESTS ) * .. -* .. External Functions .. - DOUBLE PRECISION DGET06, ZLANSY - EXTERNAL DGET06, ZLANSY -* .. * .. External Subroutines .. - EXTERNAL ALAERH, ALAHD, ALASUM, ZERRSY, ZGET04, ZLACPY, - $ ZLARHS, ZLATB4, ZLATMS, ZSYT02, DSYT03, DSYT05, - $ DSYCON, ZSYRFS, ZSYT01_AA, ZSYTRF_AA, - $ DSYTRI2, ZSYTRS_AA, XLAENV + EXTERNAL ALAERH, ALAHD, ALASUM, ZERRSY, ZLACPY, ZLARHS, + $ ZLATB4, ZLATMS, ZSYT02, ZSYT01_AA, ZSYTRF_AA, + $ ZSYTRS_AA, XLAENV * .. * .. Intrinsic Functions .. INTRINSIC MAX, MIN @@ -440,22 +435,22 @@ * Adjust the expected value of INFO to account for * pivoting. * - IF( IZERO.GT.0 ) THEN - J = 1 - K = IZERO - 100 CONTINUE - IF( J.EQ.K ) THEN - K = IWORK( J ) - ELSE IF( IWORK( J ).EQ.K ) THEN - K = J - END IF - IF( J.LT.K ) THEN - J = J + 1 - GO TO 100 - END IF - ELSE +c IF( IZERO.GT.0 ) THEN +c J = 1 +c K = IZERO +c 100 CONTINUE +c IF( J.EQ.K ) THEN +c K = IWORK( J ) +c ELSE IF( IWORK( J ).EQ.K ) THEN +c K = J +c END IF +c IF( J.LT.K ) THEN +c J = J + 1 +c GO TO 100 +c END IF +c ELSE K = 0 - END IF +c END IF * * Check error code from ZSYTRF and handle error. * @@ -519,31 +514,34 @@ * Check error code from ZSYTRS and handle error. * IF( INFO.NE.0 ) THEN - CALL ALAERH( PATH, 'ZSYTRS_AA', INFO, 0, - $ UPLO, N, N, -1, -1, NRHS, IMAT, - $ NFAIL, NERRS, NOUT ) - END IF -* - CALL ZLACPY( 'Full', N, NRHS, B, LDA, WORK, LDA ) -* -* Compute the residual for the solution + IF( IZERO.EQ.0 ) THEN + CALL ALAERH( PATH, 'ZSYTRS_AA', INFO, 0, + $ UPLO, N, N, -1, -1, NRHS, IMAT, + $ NFAIL, NERRS, NOUT ) + END IF + ELSE + CALL ZLACPY( 'Full', N, NRHS, B, LDA, WORK, LDA + $ ) * - CALL ZSYT02( UPLO, N, NRHS, A, LDA, X, LDA, WORK, - $ LDA, RWORK, RESULT( 2 ) ) +* Compute the residual for the solution * + CALL ZSYT02( UPLO, N, NRHS, A, LDA, X, LDA, + $ WORK, LDA, RWORK, RESULT( 2 ) ) * -* Print information about the tests that did not pass -* the threshold. * - DO 120 K = 2, 2 - IF( RESULT( K ).GE.THRESH ) THEN - IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 ) - $ CALL ALAHD( NOUT, PATH ) - WRITE( NOUT, FMT = 9998 )UPLO, N, NRHS, - $ IMAT, K, RESULT( K ) - NFAIL = NFAIL + 1 - END IF - 120 CONTINUE +* Print information about the tests that did not pass +* the threshold. +* + DO 120 K = 2, 2 + IF( RESULT( K ).GE.THRESH ) THEN + IF( NFAIL.EQ.0 .AND. NERRS.EQ.0 ) + $ CALL ALAHD( NOUT, PATH ) + WRITE( NOUT, FMT = 9998 )UPLO, N, NRHS, + $ IMAT, K, RESULT( K ) + NFAIL = NFAIL + 1 + END IF + 120 CONTINUE + END IF NRUN = NRUN + 1 * * End do for each value of NRHS in NSVAL. diff -Nru lapack-3.7.0/TESTING/LIN/zchktsqr.f lapack-3.7.1/TESTING/LIN/zchktsqr.f --- lapack-3.7.0/TESTING/LIN/zchktsqr.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/zchktsqr.f 2017-06-17 22:46:53.000000000 +0000 @@ -94,7 +94,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup double_lin * @@ -103,10 +103,10 @@ $ NBVAL, NOUT ) IMPLICIT NONE * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. LOGICAL TSTERR @@ -132,8 +132,8 @@ DOUBLE PRECISION RESULT( NTESTS ) * .. * .. External Subroutines .. - EXTERNAL ALAERH, ALAHD, ALASUM, DERRTSQR, - $ DTSQR01, XLAENV + EXTERNAL ALAERH, ALAHD, ALASUM, ZERRTSQR, + $ ZTSQR01, XLAENV * .. * .. Intrinsic Functions .. INTRINSIC MAX, MIN diff -Nru lapack-3.7.0/TESTING/LIN/zdrvls.f lapack-3.7.1/TESTING/LIN/zdrvls.f --- lapack-3.7.0/TESTING/LIN/zdrvls.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/zdrvls.f 2017-06-17 22:46:53.000000000 +0000 @@ -183,7 +183,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16_lin * @@ -192,10 +192,10 @@ $ NBVAL, NXVAL, THRESH, TSTERR, A, COPYA, B, $ COPYB, C, S, COPYS, NOUT ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. LOGICAL TSTERR @@ -237,9 +237,9 @@ DOUBLE PRECISION EPS, NORMA, NORMB, RCOND * .. * .. Local Arrays .. - INTEGER ISEED( 4 ), ISEEDY( 4 ), IWORKQUERY - DOUBLE PRECISION RESULT( NTESTS ), RWORKQUERY - COMPLEX*16 WORKQUERY + INTEGER ISEED( 4 ), ISEEDY( 4 ), IWQ + DOUBLE PRECISION RESULT( NTESTS ), RWQ + COMPLEX*16 WQ * .. * .. Allocatable Arrays .. COMPLEX*16, ALLOCATABLE :: WORK (:) @@ -324,48 +324,85 @@ M = MMAX N = NMAX NRHS = NSMAX - LDA = MAX( 1, M ) - LDB = MAX( 1, M, N ) MNMIN = MAX( MIN( M, N ), 1 ) * * Compute workspace needed for routines * ZQRT14, ZQRT17 (two side cases), ZQRT15 and ZQRT12 * - LWORK = MAX( ( M+N )*NRHS, + LWORK = MAX( 1, ( M+N )*NRHS, $ ( N+NRHS )*( M+2 ), ( M+NRHS )*( N+2 ), $ MAX( M+MNMIN, NRHS*MNMIN,2*N+M ), $ MAX( M*N+4*MNMIN+MAX(M,N), M*N+2*MNMIN+4*N ) ) + LRWORK = 1 + LIWORK = 1 +* +* Iterate through all test cases and compute necessary workspace +* sizes for ?GELS, ?GETSLS, ?GELSY, ?GELSS and ?GELSD routines. +* + DO IM = 1, NM + M = MVAL( IM ) + LDA = MAX( 1, M ) + DO IN = 1, NN + N = NVAL( IN ) + MNMIN = MAX(MIN( M, N ),1) + LDB = MAX( 1, M, N ) + DO INS = 1, NNS + NRHS = NSVAL( INS ) + DO IRANK = 1, 2 + DO ISCALE = 1, 3 + ITYPE = ( IRANK-1 )*3 + ISCALE + IF( DOTYPE( ITYPE ) ) THEN + IF( IRANK.EQ.1 ) THEN + DO ITRAN = 1, 2 + IF( ITRAN.EQ.1 ) THEN + TRANS = 'N' + ELSE + TRANS = 'C' + END IF +* +* Compute workspace needed for ZGELS + CALL ZGELS( TRANS, M, N, NRHS, A, LDA, + $ B, LDB, WQ, -1, INFO ) + LWORK_ZGELS = INT ( WQ ) +* Compute workspace needed for ZGETSLS + CALL ZGETSLS( TRANS, M, N, NRHS, A, LDA, + $ B, LDB, WQ, -1, INFO ) + LWORK_ZGETSLS = INT( WQ ) + ENDDO + END IF +* Compute workspace needed for ZGELSY + CALL ZGELSY( M, N, NRHS, A, LDA, B, LDB, IWQ, + $ RCOND, CRANK, WQ, -1, RWORK, INFO ) + LWORK_ZGELSY = INT( WQ ) + LRWORK_ZGELSY = 2*N +* Compute workspace needed for ZGELSS + CALL ZGELSS( M, N, NRHS, A, LDA, B, LDB, S, + $ RCOND, CRANK, WQ, -1 , RWORK, + $ INFO ) + LWORK_ZGELSS = INT( WQ ) + LRWORK_ZGELSS = 5*MNMIN +* Compute workspace needed for ZGELSD + CALL ZGELSD( M, N, NRHS, A, LDA, B, LDB, S, + $ RCOND, CRANK, WQ, -1, RWQ, IWQ, + $ INFO ) + LWORK_ZGELSD = INT( WQ ) + LRWORK_ZGELSD = INT( RWQ ) +* Compute LIWORK workspace needed for ZGELSY and ZGELSD + LIWORK = MAX( LIWORK, N, IWQ ) +* Compute LRWORK workspace needed for ZGELSY, ZGELSS and ZGELSD + LRWORK = MAX( LRWORK, LRWORK_ZGELSY, + $ LRWORK_ZGELSS, LRWORK_ZGELSD ) +* Compute LWORK workspace needed for all functions + LWORK = MAX( LWORK, LWORK_ZGELS, LWORK_ZGETSLS, + $ LWORK_ZGELSY, LWORK_ZGELSS, + $ LWORK_ZGELSD ) + END IF + ENDDO + ENDDO + ENDDO + ENDDO + ENDDO * -* Compute workspace needed for ZGELS - CALL ZGELS( 'N', M, N, NRHS, A, LDA, B, LDB, - $ WORKQUERY, -1, INFO ) - LWORK_ZGELS = INT ( WORKQUERY ) -* Compute workspace needed for ZGETSLS - CALL ZGETSLS( 'N', M, N, NRHS, A, LDA, B, LDB, - $ WORKQUERY, -1, INFO ) - LWORK_ZGETSLS = INT( WORKQUERY ) -* Compute workspace needed for ZGELSY - CALL ZGELSY( M, N, NRHS, A, LDA, B, LDB, IWORKQUERY, - $ RCOND, CRANK, WORKQUERY, -1, RWORK, INFO ) - LWORK_ZGELSY = INT( WORKQUERY ) - LRWORK_ZGELSY = 2*N -* Compute workspace needed for ZGELSS - CALL ZGELSS( M, N, NRHS, A, LDA, B, LDB, S, - $ RCOND, CRANK, WORKQUERY, -1 , RWORK, INFO ) - LWORK_ZGELSS = INT( WORKQUERY ) - LRWORK_ZGELSS = 5*MNMIN -* Compute workspace needed for ZGELSD - CALL ZGELSD( M, N, NRHS, A, LDA, B, LDB, S, RCOND, CRANK, - $ WORKQUERY, -1, RWORKQUERY, IWORKQUERY, INFO ) - LWORK_ZGELSD = INT( WORKQUERY ) - LRWORK_ZGELSD = INT( RWORKQUERY ) -* Compute LIWORK workspace needed for ZGELSY and ZGELSD - LIWORK = MAX( 1, N, IWORKQUERY ) -* Compute LRWORK workspace needed for ZGELSY, ZGELSS and ZGELSD - LRWORK = MAX( 1, LRWORK_ZGELSY, LRWORK_ZGELSS, LRWORK_ZGELSD ) -* Compute LWORK workspace needed for all functions - LWORK = MAX( 1, LWORK, LWORK_ZGELS, LWORK_ZGETSLS, LWORK_ZGELSY, - $ LWORK_ZGELSS, LWORK_ZGELSD ) LWLSY = LWORK * ALLOCATE( WORK( LWORK ) ) diff -Nru lapack-3.7.0/TESTING/LIN/zdrvrf3.f lapack-3.7.1/TESTING/LIN/zdrvrf3.f --- lapack-3.7.0/TESTING/LIN/zdrvrf3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/zdrvrf3.f 2017-06-17 22:46:53.000000000 +0000 @@ -111,7 +111,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16_lin * @@ -119,10 +119,10 @@ SUBROUTINE ZDRVRF3( NOUT, NN, NVAL, THRESH, A, LDA, ARF, B1, B2, + D_WORK_ZLANGE, Z_WORK_ZGEQRF, TAU ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER LDA, NN, NOUT @@ -227,7 +227,7 @@ * IF ( IALPHA.EQ. 1) THEN ALPHA = ZERO - ELSE IF ( IALPHA.EQ. 1) THEN + ELSE IF ( IALPHA.EQ. 2) THEN ALPHA = ONE ELSE ALPHA = ZLARND( 4, ISEED ) diff -Nru lapack-3.7.0/TESTING/LIN/zdrvrf4.f lapack-3.7.1/TESTING/LIN/zdrvrf4.f --- lapack-3.7.0/TESTING/LIN/zdrvrf4.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/zdrvrf4.f 2017-06-17 22:46:53.000000000 +0000 @@ -106,7 +106,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16_lin * @@ -114,10 +114,10 @@ SUBROUTINE ZDRVRF4( NOUT, NN, NVAL, THRESH, C1, C2, LDC, CRF, A, + LDA, D_WORK_ZLANGE ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER LDA, LDC, NN, NOUT @@ -209,10 +209,10 @@ IF ( IALPHA.EQ. 1) THEN ALPHA = ZERO BETA = ZERO - ELSE IF ( IALPHA.EQ. 1) THEN + ELSE IF ( IALPHA.EQ. 2) THEN ALPHA = ONE BETA = ZERO - ELSE IF ( IALPHA.EQ. 1) THEN + ELSE IF ( IALPHA.EQ. 3) THEN ALPHA = ZERO BETA = ONE ELSE diff -Nru lapack-3.7.0/TESTING/LIN/zdrvsy_aa.f lapack-3.7.1/TESTING/LIN/zdrvsy_aa.f --- lapack-3.7.0/TESTING/LIN/zdrvsy_aa.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/zdrvsy_aa.f 2017-06-17 22:46:53.000000000 +0000 @@ -144,7 +144,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * * @generated from LIN/ddrvsy_aa.f, fortran d -> z, Thu Nov 17 12:14:51 2016 * @@ -155,10 +155,10 @@ $ NMAX, A, AFAC, AINV, B, X, XACT, WORK, $ RWORK, IWORK, NOUT ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. LOGICAL TSTERR @@ -204,8 +204,8 @@ EXTERNAL DGET06, ZLANSY * .. * .. External Subroutines .. - EXTERNAL ALADHD, ALAERH, ALASVM, DERRVX, ZGET04, ZLACPY, - $ ZLARHS, ZLASET, ZLATB4, ZLATMS, ZSYT02, DSYT05, + EXTERNAL ALADHD, ALAERH, ALASVM, ZERRVX, ZGET04, ZLACPY, + $ ZLARHS, ZLASET, ZLATB4, ZLATMS, ZSYT02, $ ZSYSV_AA, ZSYT01_AA, ZSYTRF_AA, XLAENV * .. * .. Scalars in Common .. diff -Nru lapack-3.7.0/TESTING/LIN/zerrsy.f lapack-3.7.1/TESTING/LIN/zerrsy.f --- lapack-3.7.0/TESTING/LIN/zerrsy.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/zerrsy.f 2017-06-17 22:46:53.000000000 +0000 @@ -48,17 +48,17 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16_lin * * ===================================================================== SUBROUTINE ZERRSY( PATH, NUNIT ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER*3 PATH @@ -91,7 +91,7 @@ $ ZSPTRS, ZSYCON, ZSYCON_3, ZSYCON_ROOK, ZSYRFS, $ ZSYTF2, ZSYTF2_RK, ZSYTF2_ROOK, ZSYTRF, $ ZSYTRF_RK, ZSYTRF_ROOK, ZSYTRI, ZSYTRI_3, - $ ZSYTRI_3X, ZSYTRI_ROOK, ZSYTRI2, ZSYTRI2Z, + $ ZSYTRI_3X, ZSYTRI_ROOK, ZSYTRI2, ZSYTRI2X, $ ZSYTRS, ZSYTRS_3, ZSYTRS_ROOK * .. * .. Scalars in Common .. diff -Nru lapack-3.7.0/TESTING/LIN/zhet01_3.f lapack-3.7.1/TESTING/LIN/zhet01_3.f --- lapack-3.7.0/TESTING/LIN/zhet01_3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/zhet01_3.f 2017-06-17 22:46:53.000000000 +0000 @@ -92,7 +92,7 @@ *> On entry, contains the superdiagonal (or subdiagonal) *> elements of the Hermitian block diagonal matrix D *> with 1-by-1 or 2-by-2 diagonal blocks, where -*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; +*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. *> \endverbatim *> @@ -133,7 +133,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16_lin * @@ -141,10 +141,10 @@ SUBROUTINE ZHET01_3( UPLO, N, A, LDA, AFAC, LDAFAC, E, IPIV, C, $ LDC, RWORK, RESID ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/TESTING/LIN/zlahilb.f lapack-3.7.1/TESTING/LIN/zlahilb.f --- lapack-3.7.0/TESTING/LIN/zlahilb.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/zlahilb.f 2017-06-17 22:46:53.000000000 +0000 @@ -8,7 +8,7 @@ * Definition: * =========== * -* SUBROUTINE ZLAHILB(N, NRHS, A, LDA, X, LDX, B, LDB, WORK, +* SUBROUTINE ZLAHILB( N, NRHS, A, LDA, X, LDX, B, LDB, WORK, * INFO, PATH) * * .. Scalar Arguments .. @@ -56,7 +56,7 @@ *> *> \param[in] NRHS *> \verbatim -*> NRHS is NRHS +*> NRHS is INTEGER *> The requested number of right-hand sides. *> \endverbatim *> @@ -126,18 +126,18 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16_lin * * ===================================================================== - SUBROUTINE ZLAHILB(N, NRHS, A, LDA, X, LDX, B, LDB, WORK, + SUBROUTINE ZLAHILB( N, NRHS, A, LDA, X, LDX, B, LDB, WORK, $ INFO, PATH) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER N, NRHS, LDA, LDX, LDB, INFO @@ -220,7 +220,8 @@ END DO * * Generate the scaled Hilbert matrix in A -* If we are testing SY routines, take D1_i = D2_i, else, D1_i = D2_i* +* If we are testing SY routines, +* take D1_i = D2_i, else, D1_i = D2_i* IF ( LSAMEN( 2, C2, 'SY' ) ) THEN DO J = 1, N DO I = 1, N @@ -250,8 +251,9 @@ WORK(J) = ( ( (WORK(J-1)/(J-1)) * (J-1 - N) ) /(J-1) ) $ * (N +J -1) END DO -* -* If we are testing SY routines, take D1_i = D2_i, else, D1_i = D2_i* + +* If we are testing SY routines, +* take D1_i = D2_i, else, D1_i = D2_i* IF ( LSAMEN( 2, C2, 'SY' ) ) THEN DO J = 1, NRHS DO I = 1, N diff -Nru lapack-3.7.0/TESTING/LIN/zlarhs.f lapack-3.7.1/TESTING/LIN/zlarhs.f --- lapack-3.7.0/TESTING/LIN/zlarhs.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/zlarhs.f 2017-06-17 22:46:53.000000000 +0000 @@ -190,7 +190,7 @@ *> \verbatim *> INFO is INTEGER *> = 0: successful exit -*> < 0: if INFO = -k, the k-th argument had an illegal value +*> < 0: if INFO = -i, the i-th argument had an illegal value *> \endverbatim * * Authors: @@ -201,7 +201,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16_lin * @@ -209,10 +209,10 @@ SUBROUTINE ZLARHS( PATH, XTYPE, UPLO, TRANS, M, N, KL, KU, NRHS, $ A, LDA, X, LDX, B, LDB, ISEED, INFO ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER TRANS, UPLO, XTYPE diff -Nru lapack-3.7.0/TESTING/LIN/zsyt01_3.f lapack-3.7.1/TESTING/LIN/zsyt01_3.f --- lapack-3.7.0/TESTING/LIN/zsyt01_3.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/LIN/zsyt01_3.f 2017-06-17 22:46:53.000000000 +0000 @@ -92,7 +92,7 @@ *> On entry, contains the superdiagonal (or subdiagonal) *> elements of the symmetric block diagonal matrix D *> with 1-by-1 or 2-by-2 diagonal blocks, where -*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not refernced; +*> If UPLO = 'U': E(i) = D(i-1,i),i=2:N, E(1) not referenced; *> If UPLO = 'L': E(i) = D(i+1,i),i=1:N-1, E(N) not referenced. *> \endverbatim *> @@ -133,7 +133,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16_lin * @@ -141,10 +141,10 @@ SUBROUTINE ZSYT01_3( UPLO, N, A, LDA, AFAC, LDAFAC, E, IPIV, C, $ LDC, RWORK, RESID ) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. CHARACTER UPLO diff -Nru lapack-3.7.0/TESTING/Makefile lapack-3.7.1/TESTING/Makefile --- lapack-3.7.0/TESTING/Makefile 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/Makefile 2017-06-17 22:46:53.000000000 +0000 @@ -21,10 +21,9 @@ # The executable files are called: # xlintsts, xlintstd, xlintstc, and xlintstz for LIN # xeigtsts, xeigtstd, xeigtstc, and xeigtstz for EIG -# and exist in the current directory level. # # To remove the output files after the tests have been run, enter -# make clean +# make cleantest # # To re-run specific tests after a make, enter (for example): # 'rm ssvd.out; make' or: @@ -37,11 +36,6 @@ include ../make.inc -ifneq ($(strip $(VARLIB)),) - LAPACKLIB := $(VARLIB) ../$(LAPACKLIB) -endif - - all: single complex double complex16 singleproto doubleproto complexproto complex16proto SEIGTST= snep.out \ @@ -157,443 +151,441 @@ # # ======== SINGLE LIN TESTS =========================== -stest.out: stest.in xlintsts +stest.out: stest.in LIN/xlintsts @echo Testing REAL LAPACK linear equation routines - ./xlintsts < stest.in > $@ 2>&1 + ./LIN/xlintsts < $< > $@ 2>&1 # # ======== COMPLEX LIN TESTS ========================== -ctest.out: ctest.in xlintstc +ctest.out: ctest.in LIN/xlintstc @echo Testing COMPLEX LAPACK linear equation routines - ./xlintstc < ctest.in > $@ 2>&1 + ./LIN/xlintstc < $< > $@ 2>&1 # # ======== DOUBLE LIN TESTS =========================== -dtest.out: dtest.in xlintstd +dtest.out: dtest.in LIN/xlintstd @echo Testing DOUBLE PRECISION LAPACK linear equation routines - ./xlintstd < dtest.in > $@ 2>&1 + ./LIN/xlintstd < $< > $@ 2>&1 # # ======== COMPLEX16 LIN TESTS ======================== -ztest.out: ztest.in xlintstz +ztest.out: ztest.in LIN/xlintstz @echo Testing COMPLEX16 LAPACK linear equation routines - ./xlintstz < ztest.in > $@ 2>&1 + ./LIN/xlintstz < $< > $@ 2>&1 # # ======== SINGLE-DOUBLE PROTO LIN TESTS ============== -dstest.out: dstest.in xlintstds +dstest.out: dstest.in LIN/xlintstds @echo Testing SINGLE-DOUBLE PRECISION LAPACK prototype linear equation routines - ./xlintstds < dstest.in > $@ 2>&1 + ./LIN/xlintstds < $< > $@ 2>&1 # # ======== COMPLEX-COMPLEX16 LIN TESTS ======================== -zctest.out: zctest.in xlintstzc +zctest.out: zctest.in LIN/xlintstzc @echo Testing COMPLEX-COMPLEX16 LAPACK prototype linear equation routines - ./xlintstzc < zctest.in > $@ 2>&1 + ./LIN/xlintstzc < $< > $@ 2>&1 # # ======== SINGLE RFP LIN TESTS ======================== -stest_rfp.out: stest_rfp.in xlintstrfs +stest_rfp.out: stest_rfp.in LIN/xlintstrfs @echo Testing REAL LAPACK RFP prototype linear equation routines - ./xlintstrfs < stest_rfp.in > $@ 2>&1 + ./LIN/xlintstrfs < $< > $@ 2>&1 # # ======== COMPLEX16 RFP LIN TESTS ======================== -dtest_rfp.out: dtest_rfp.in xlintstrfd +dtest_rfp.out: dtest_rfp.in LIN/xlintstrfd @echo Testing DOUBLE PRECISION LAPACK RFP prototype linear equation routines - ./xlintstrfd < dtest_rfp.in > $@ 2>&1 + ./LIN/xlintstrfd < $< > $@ 2>&1 # # ======== COMPLEX16 RFP LIN TESTS ======================== -ctest_rfp.out: ctest_rfp.in xlintstrfc +ctest_rfp.out: ctest_rfp.in LIN/xlintstrfc @echo Testing COMPLEX LAPACK RFP prototype linear equation routines - ./xlintstrfc < ctest_rfp.in > $@ 2>&1 + ./LIN/xlintstrfc < $< > $@ 2>&1 # # ======== COMPLEX16 RFP LIN TESTS ======================== -ztest_rfp.out: ztest_rfp.in xlintstrfz +ztest_rfp.out: ztest_rfp.in LIN/xlintstrfz @echo Testing COMPLEX16 LAPACK RFP prototype linear equation routines - ./xlintstrfz < ztest_rfp.in > $@ 2>&1 + ./LIN/xlintstrfz < $< > $@ 2>&1 # # # ======== SINGLE EIG TESTS =========================== # -snep.out: nep.in xeigtsts +snep.out: nep.in EIG/xeigtsts @echo NEP: Testing Nonsymmetric Eigenvalue Problem routines - ./xeigtsts < nep.in > $@ 2>&1 + ./EIG/xeigtsts < $< > $@ 2>&1 -ssep.out: sep.in xeigtsts +ssep.out: sep.in EIG/xeigtsts @echo SEP: Testing Symmetric Eigenvalue Problem routines - ./xeigtsts < sep.in > $@ 2>&1 + ./EIG/xeigtsts < $< > $@ 2>&1 -sse2.out: se2.in xeigtsts +sse2.out: se2.in EIG/xeigtsts @echo SEP: Testing Symmetric Eigenvalue Problem routines - ./xeigtsts < se2.in > $@ 2>&1 + ./EIG/xeigtsts < $< > $@ 2>&1 -ssvd.out: svd.in xeigtsts +ssvd.out: svd.in EIG/xeigtsts @echo SVD: Testing Singular Value Decomposition routines - ./xeigtsts < svd.in > $@ 2>&1 + ./EIG/xeigtsts < $< > $@ 2>&1 -sec.out: sec.in xeigtsts +sec.out: sec.in EIG/xeigtsts @echo SEC: Testing REAL Eigen Condition Routines - ./xeigtsts < sec.in > $@ 2>&1 + ./EIG/xeigtsts < $< > $@ 2>&1 -sed.out: sed.in xeigtsts +sed.out: sed.in EIG/xeigtsts @echo SEV: Testing REAL Nonsymmetric Eigenvalue Driver - ./xeigtsts < sed.in > $@ 2>&1 + ./EIG/xeigtsts < $< > $@ 2>&1 -sgg.out: sgg.in xeigtsts +sgg.out: sgg.in EIG/xeigtsts @echo SGG: Testing REAL Nonsymmetric Generalized Eigenvalue Problem routines - ./xeigtsts < sgg.in > $@ 2>&1 + ./EIG/xeigtsts < $< > $@ 2>&1 -sgd.out: sgd.in xeigtsts +sgd.out: sgd.in EIG/xeigtsts @echo SGD: Testing REAL Nonsymmetric Generalized Eigenvalue Problem driver routines - ./xeigtsts < sgd.in > $@ 2>&1 + ./EIG/xeigtsts < $< > $@ 2>&1 -ssb.out: ssb.in xeigtsts +ssb.out: ssb.in EIG/xeigtsts @echo SSB: Testing REAL Symmetric Eigenvalue Problem routines - ./xeigtsts < ssb.in > $@ 2>&1 + ./EIG/xeigtsts < $< > $@ 2>&1 -ssg.out: ssg.in xeigtsts +ssg.out: ssg.in EIG/xeigtsts @echo SSG: Testing REAL Symmetric Generalized Eigenvalue Problem routines - ./xeigtsts < ssg.in > $@ 2>&1 + ./EIG/xeigtsts < $< > $@ 2>&1 -sbal.out: sbal.in xeigtsts +sbal.out: sbal.in EIG/xeigtsts @echo SGEBAL: Testing the balancing of a REAL general matrix - ./xeigtsts < sbal.in > $@ 2>&1 + ./EIG/xeigtsts < $< > $@ 2>&1 -sbak.out: sbak.in xeigtsts +sbak.out: sbak.in EIG/xeigtsts @echo SGEBAK: Testing the back transformation of a REAL balanced matrix - ./xeigtsts < sbak.in > $@ 2>&1 + ./EIG/xeigtsts < $< > $@ 2>&1 -sgbal.out: sgbal.in xeigtsts +sgbal.out: sgbal.in EIG/xeigtsts @echo SGGBAL: Testing the balancing of a pair of REAL general matrices - ./xeigtsts < sgbal.in > $@ 2>&1 + ./EIG/xeigtsts < $< > $@ 2>&1 -sgbak.out: sgbak.in xeigtsts +sgbak.out: sgbak.in EIG/xeigtsts @echo SGGBAK: Testing the back transformation of a pair of REAL balanced matrices - ./xeigtsts < sgbak.in > $@ 2>&1 + ./EIG/xeigtsts < $< > $@ 2>&1 -sbb.out: sbb.in xeigtsts +sbb.out: sbb.in EIG/xeigtsts @echo SBB: Testing banded Singular Value Decomposition routines - ./xeigtsts < sbb.in > $@ 2>&1 + ./EIG/xeigtsts < $< > $@ 2>&1 -sglm.out: glm.in xeigtsts +sglm.out: glm.in EIG/xeigtsts @echo GLM: Testing Generalized Linear Regression Model routines - ./xeigtsts < glm.in > $@ 2>&1 + ./EIG/xeigtsts < $< > $@ 2>&1 -sgqr.out: gqr.in xeigtsts +sgqr.out: gqr.in EIG/xeigtsts @echo GQR: Testing Generalized QR and RQ factorization routines - ./xeigtsts < gqr.in > $@ 2>&1 + ./EIG/xeigtsts < $< > $@ 2>&1 -sgsv.out: gsv.in xeigtsts +sgsv.out: gsv.in EIG/xeigtsts @echo GSV: Testing Generalized Singular Value Decomposition routines - ./xeigtsts < gsv.in > $@ 2>&1 + ./EIG/xeigtsts < $< > $@ 2>&1 -scsd.out: csd.in xeigtsts +scsd.out: csd.in EIG/xeigtsts @echo CSD: Testing CS Decomposition routines - ./xeigtsts < csd.in > $@ 2>&1 + ./EIG/xeigtsts < $< > $@ 2>&1 -slse.out: lse.in xeigtsts +slse.out: lse.in EIG/xeigtsts @echo LSE: Testing Constrained Linear Least Squares routines - ./xeigtsts < lse.in > $@ 2>&1 + ./EIG/xeigtsts < $< > $@ 2>&1 # # ======== COMPLEX EIG TESTS =========================== -cnep.out: nep.in xeigtstc +cnep.out: nep.in EIG/xeigtstc @echo NEP: Testing Nonsymmetric Eigenvalue Problem routines - ./xeigtstc < nep.in > $@ 2>&1 + ./EIG/xeigtstc < $< > $@ 2>&1 -csep.out: sep.in xeigtstc +csep.out: sep.in EIG/xeigtstc @echo SEP: Testing Symmetric Eigenvalue Problem routines - ./xeigtstc < sep.in > $@ 2>&1 + ./EIG/xeigtstc < $< > $@ 2>&1 -cse2.out: se2.in xeigtstc +cse2.out: se2.in EIG/xeigtstc @echo SEP: Testing Symmetric Eigenvalue Problem routines - ./xeigtstc < se2.in > $@ 2>&1 + ./EIG/xeigtstc < $< > $@ 2>&1 -csvd.out: svd.in xeigtstc +csvd.out: svd.in EIG/xeigtstc @echo SVD: Testing Singular Value Decomposition routines - ./xeigtstc < svd.in > $@ 2>&1 + ./EIG/xeigtstc < $< > $@ 2>&1 -cec.out: cec.in xeigtstc +cec.out: cec.in EIG/xeigtstc @echo CEC: Testing COMPLEX Eigen Condition Routines - ./xeigtstc < cec.in > $@ 2>&1 + ./EIG/xeigtstc < $< > $@ 2>&1 -ced.out: ced.in xeigtstc +ced.out: ced.in EIG/xeigtstc @echo CES: Testing COMPLEX Nonsymmetric Schur Form Driver - ./xeigtstc < ced.in > $@ 2>&1 + ./EIG/xeigtstc < $< > $@ 2>&1 -cgg.out: cgg.in xeigtstc +cgg.out: cgg.in EIG/xeigtstc @echo CGG: Testing COMPLEX Nonsymmetric Generalized Eigenvalue Problem routines - ./xeigtstc < cgg.in > $@ 2>&1 + ./EIG/xeigtstc < $< > $@ 2>&1 -cgd.out: cgd.in xeigtstc +cgd.out: cgd.in EIG/xeigtstc @echo CGD: Testing COMPLEX Nonsymmetric Generalized Eigenvalue Problem driver routines - ./xeigtstc < cgd.in > $@ 2>&1 + ./EIG/xeigtstc < $< > $@ 2>&1 -csb.out: csb.in xeigtstc +csb.out: csb.in EIG/xeigtstc @echo CHB: Testing Hermitian Eigenvalue Problem routines - ./xeigtstc < csb.in > $@ 2>&1 + ./EIG/xeigtstc < $< > $@ 2>&1 -csg.out: csg.in xeigtstc +csg.out: csg.in EIG/xeigtstc @echo CSG: Testing Symmetric Generalized Eigenvalue Problem routines - ./xeigtstc < csg.in > $@ 2>&1 + ./EIG/xeigtstc < $< > $@ 2>&1 -cbal.out: cbal.in xeigtstc +cbal.out: cbal.in EIG/xeigtstc @echo CGEBAL: Testing the balancing of a COMPLEX general matrix - ./xeigtstc < cbal.in > $@ 2>&1 + ./EIG/xeigtstc < $< > $@ 2>&1 -cbak.out: cbak.in xeigtstc +cbak.out: cbak.in EIG/xeigtstc @echo CGEBAK: Testing the back transformation of a COMPLEX balanced matrix - ./xeigtstc < cbak.in > $@ 2>&1 + ./EIG/xeigtstc < $< > $@ 2>&1 -cgbal.out: cgbal.in xeigtstc +cgbal.out: cgbal.in EIG/xeigtstc @echo CGGBAL: Testing the balancing of a pair of COMPLEX general matrices - ./xeigtstc < cgbal.in > $@ 2>&1 + ./EIG/xeigtstc < $< > $@ 2>&1 -cgbak.out: cgbak.in xeigtstc +cgbak.out: cgbak.in EIG/xeigtstc @echo CGGBAK: Testing the back transformation of a pair of COMPLEX balanced matrices - ./xeigtstc < cgbak.in > $@ 2>&1 + ./EIG/xeigtstc < $< > $@ 2>&1 -cbb.out: cbb.in xeigtstc +cbb.out: cbb.in EIG/xeigtstc @echo CBB: Testing banded Singular Value Decomposition routines - ./xeigtstc < cbb.in > $@ 2>&1 + ./EIG/xeigtstc < $< > $@ 2>&1 -cglm.out: glm.in xeigtstc +cglm.out: glm.in EIG/xeigtstc @echo GLM: Testing Generalized Linear Regression Model routines - ./xeigtstc < glm.in > $@ 2>&1 + ./EIG/xeigtstc < $< > $@ 2>&1 -cgqr.out: gqr.in xeigtstc +cgqr.out: gqr.in EIG/xeigtstc @echo GQR: Testing Generalized QR and RQ factorization routines - ./xeigtstc < gqr.in > $@ 2>&1 + ./EIG/xeigtstc < $< > $@ 2>&1 -cgsv.out: gsv.in xeigtstc +cgsv.out: gsv.in EIG/xeigtstc @echo GSV: Testing Generalized Singular Value Decomposition routines - ./xeigtstc < gsv.in > $@ 2>&1 + ./EIG/xeigtstc < $< > $@ 2>&1 -ccsd.out: csd.in xeigtstc +ccsd.out: csd.in EIG/xeigtstc @echo CSD: Testing CS Decomposition routines - ./xeigtstc < csd.in > $@ 2>&1 + ./EIG/xeigtstc < $< > $@ 2>&1 -clse.out: lse.in xeigtstc +clse.out: lse.in EIG/xeigtstc @echo LSE: Testing Constrained Linear Least Squares routines - ./xeigtstc < lse.in > $@ 2>&1 + ./EIG/xeigtstc < $< > $@ 2>&1 # # ======== DOUBLE EIG TESTS =========================== -dnep.out: nep.in xeigtstd +dnep.out: nep.in EIG/xeigtstd @echo NEP: Testing Nonsymmetric Eigenvalue Problem routines - ./xeigtstd < nep.in > $@ 2>&1 + ./EIG/xeigtstd < $< > $@ 2>&1 -dsep.out: sep.in xeigtstd +dsep.out: sep.in EIG/xeigtstd @echo SEP: Testing Symmetric Eigenvalue Problem routines - ./xeigtstd < sep.in > $@ 2>&1 + ./EIG/xeigtstd < $< > $@ 2>&1 -dse2.out: se2.in xeigtstd +dse2.out: se2.in EIG/xeigtstd @echo SEP: Testing Symmetric Eigenvalue Problem routines - ./xeigtstd < se2.in > $@ 2>&1 + ./EIG/xeigtstd < $< > $@ 2>&1 -dsvd.out: svd.in xeigtstd +dsvd.out: svd.in EIG/xeigtstd @echo SVD: Testing Singular Value Decomposition routines - ./xeigtstd < svd.in > $@ 2>&1 + ./EIG/xeigtstd < $< > $@ 2>&1 -dec.out: dec.in xeigtstd +dec.out: dec.in EIG/xeigtstd @echo DEC: Testing DOUBLE PRECISION Eigen Condition Routines - ./xeigtstd < dec.in > $@ 2>&1 + ./EIG/xeigtstd < $< > $@ 2>&1 -ded.out: ded.in xeigtstd +ded.out: ded.in EIG/xeigtstd @echo DEV: Testing DOUBLE PRECISION Nonsymmetric Eigenvalue Driver - ./xeigtstd < ded.in > $@ 2>&1 + ./EIG/xeigtstd < $< > $@ 2>&1 -dgg.out: dgg.in xeigtstd +dgg.out: dgg.in EIG/xeigtstd @echo DGG: Testing DOUBLE PRECISION Nonsymmetric Generalized Eigenvalue Problem routines - ./xeigtstd < dgg.in > $@ 2>&1 + ./EIG/xeigtstd < $< > $@ 2>&1 -dgd.out: dgd.in xeigtstd +dgd.out: dgd.in EIG/xeigtstd @echo DGD: Testing DOUBLE PRECISION Nonsymmetric Generalized Eigenvalue Problem driver routines - ./xeigtstd < dgd.in > $@ 2>&1 + ./EIG/xeigtstd < $< > $@ 2>&1 -dsb.out: dsb.in xeigtstd +dsb.out: dsb.in EIG/xeigtstd @echo DSB: Testing DOUBLE PRECISION Symmetric Eigenvalue Problem routines - ./xeigtstd < dsb.in > $@ 2>&1 + ./EIG/xeigtstd < $< > $@ 2>&1 -dsg.out: dsg.in xeigtstd +dsg.out: dsg.in EIG/xeigtstd @echo DSG: Testing DOUBLE PRECISION Symmetric Generalized Eigenvalue Problem routines - ./xeigtstd < dsg.in > $@ 2>&1 + ./EIG/xeigtstd < $< > $@ 2>&1 -dbal.out: dbal.in xeigtstd +dbal.out: dbal.in EIG/xeigtstd @echo DGEBAL: Testing the balancing of a DOUBLE PRECISION general matrix - ./xeigtstd < dbal.in > $@ 2>&1 + ./EIG/xeigtstd < $< > $@ 2>&1 -dbak.out: dbak.in xeigtstd +dbak.out: dbak.in EIG/xeigtstd @echo DGEBAK: Testing the back transformation of a DOUBLE PRECISION balanced matrix - ./xeigtstd < dbak.in > $@ 2>&1 + ./EIG/xeigtstd < $< > $@ 2>&1 -dgbal.out: dgbal.in xeigtstd +dgbal.out: dgbal.in EIG/xeigtstd @echo DGGBAL: Testing the balancing of a pair of DOUBLE PRECISION general matrices - ./xeigtstd < dgbal.in > $@ 2>&1 + ./EIG/xeigtstd < $< > $@ 2>&1 -dgbak.out: dgbak.in xeigtstd +dgbak.out: dgbak.in EIG/xeigtstd @echo DGGBAK: Testing the back transformation of a pair of DOUBLE PRECISION balanced matrices - ./xeigtstd < dgbak.in > $@ 2>&1 + ./EIG/xeigtstd < $< > $@ 2>&1 -dbb.out: dbb.in xeigtstd +dbb.out: dbb.in EIG/xeigtstd @echo DBB: Testing banded Singular Value Decomposition routines - ./xeigtstd < dbb.in > $@ 2>&1 + ./EIG/xeigtstd < $< > $@ 2>&1 -dglm.out: glm.in xeigtstd +dglm.out: glm.in EIG/xeigtstd @echo GLM: Testing Generalized Linear Regression Model routines - ./xeigtstd < glm.in > $@ 2>&1 + ./EIG/xeigtstd < $< > $@ 2>&1 -dgqr.out: gqr.in xeigtstd +dgqr.out: gqr.in EIG/xeigtstd @echo GQR: Testing Generalized QR and RQ factorization routines - ./xeigtstd < gqr.in > $@ 2>&1 + ./EIG/xeigtstd < $< > $@ 2>&1 -dgsv.out: gsv.in xeigtstd +dgsv.out: gsv.in EIG/xeigtstd @echo GSV: Testing Generalized Singular Value Decomposition routines - ./xeigtstd < gsv.in > $@ 2>&1 + ./EIG/xeigtstd < $< > $@ 2>&1 -dcsd.out: csd.in xeigtstd +dcsd.out: csd.in EIG/xeigtstd @echo CSD: Testing CS Decomposition routines - ./xeigtstd < csd.in > $@ 2>&1 + ./EIG/xeigtstd < $< > $@ 2>&1 -dlse.out: lse.in xeigtstd +dlse.out: lse.in EIG/xeigtstd @echo LSE: Testing Constrained Linear Least Squares routines - ./xeigtstd < lse.in > $@ 2>&1 + ./EIG/xeigtstd < $< > $@ 2>&1 # # ======== COMPLEX16 EIG TESTS =========================== -znep.out: nep.in xeigtstz +znep.out: nep.in EIG/xeigtstz @echo NEP: Testing Nonsymmetric Eigenvalue Problem routines - ./xeigtstz < nep.in > $@ 2>&1 + ./EIG/xeigtstz < $< > $@ 2>&1 -zsep.out: sep.in xeigtstz +zsep.out: sep.in EIG/xeigtstz @echo SEP: Testing Symmetric Eigenvalue Problem routines - ./xeigtstz < sep.in > $@ 2>&1 + ./EIG/xeigtstz < $< > $@ 2>&1 -zse2.out: se2.in xeigtstz +zse2.out: se2.in EIG/xeigtstz @echo SEP: Testing Symmetric Eigenvalue Problem routines - ./xeigtstz < se2.in > $@ 2>&1 + ./EIG/xeigtstz < $< > $@ 2>&1 -zsvd.out: svd.in xeigtstz +zsvd.out: svd.in EIG/xeigtstz @echo SVD: Testing Singular Value Decomposition routines - ./xeigtstz < svd.in > $@ 2>&1 + ./EIG/xeigtstz < $< > $@ 2>&1 -zec.out: zec.in xeigtstz +zec.out: zec.in EIG/xeigtstz @echo ZEC: Testing COMPLEX16 Eigen Condition Routines - ./xeigtstz < zec.in > $@ 2>&1 + ./EIG/xeigtstz < $< > $@ 2>&1 -zed.out: zed.in xeigtstz +zed.out: zed.in EIG/xeigtstz @echo ZES: Testing COMPLEX16 Nonsymmetric Schur Form Driver - ./xeigtstz < zed.in > $@ 2>&1 + ./EIG/xeigtstz < $< > $@ 2>&1 -zgg.out: zgg.in xeigtstz +zgg.out: zgg.in EIG/xeigtstz @echo ZGG: Testing COMPLEX16 Nonsymmetric Generalized Eigenvalue Problem routines - ./xeigtstz < zgg.in > $@ 2>&1 + ./EIG/xeigtstz < $< > $@ 2>&1 -zgd.out: zgd.in xeigtstz +zgd.out: zgd.in EIG/xeigtstz @echo ZGD: Testing COMPLEX16 Nonsymmetric Generalized Eigenvalue Problem driver routines - ./xeigtstz < zgd.in > $@ 2>&1 + ./EIG/xeigtstz < $< > $@ 2>&1 -zsb.out: zsb.in xeigtstz +zsb.out: zsb.in EIG/xeigtstz @echo ZHB: Testing Hermitian Eigenvalue Problem routines - ./xeigtstz < zsb.in > $@ 2>&1 + ./EIG/xeigtstz < $< > $@ 2>&1 -zsg.out: zsg.in xeigtstz +zsg.out: zsg.in EIG/xeigtstz @echo ZSG: Testing Symmetric Generalized Eigenvalue Problem routines - ./xeigtstz < zsg.in > $@ 2>&1 + ./EIG/xeigtstz < $< > $@ 2>&1 -zbal.out: zbal.in xeigtstz +zbal.out: zbal.in EIG/xeigtstz @echo ZGEBAL: Testing the balancing of a COMPLEX16 general matrix - ./xeigtstz < zbal.in > $@ 2>&1 + ./EIG/xeigtstz < $< > $@ 2>&1 -zbak.out: zbak.in xeigtstz +zbak.out: zbak.in EIG/xeigtstz @echo ZGEBAK: Testing the back transformation of a COMPLEX16 balanced matrix - ./xeigtstz < zbak.in > $@ 2>&1 + ./EIG/xeigtstz < $< > $@ 2>&1 -zgbal.out: zgbal.in xeigtstz +zgbal.out: zgbal.in EIG/xeigtstz @echo ZGGBAL: Testing the balancing of a pair of COMPLEX general matrices - ./xeigtstz < zgbal.in > $@ 2>&1 + ./EIG/xeigtstz < $< > $@ 2>&1 -zgbak.out: zgbak.in xeigtstz +zgbak.out: zgbak.in EIG/xeigtstz @echo ZGGBAK: Testing the back transformation of a pair of COMPLEX16 balanced matrices - ./xeigtstz < zgbak.in > $@ 2>&1 + ./EIG/xeigtstz < $< > $@ 2>&1 -zbb.out: zbb.in xeigtstz +zbb.out: zbb.in EIG/xeigtstz @echo ZBB: Testing banded Singular Value Decomposition routines - ./xeigtstz < zbb.in > $@ 2>&1 + ./EIG/xeigtstz < $< > $@ 2>&1 -zglm.out: glm.in xeigtstz +zglm.out: glm.in EIG/xeigtstz @echo GLM: Testing Generalized Linear Regression Model routines - ./xeigtstz < glm.in > $@ 2>&1 + ./EIG/xeigtstz < $< > $@ 2>&1 -zgqr.out: gqr.in xeigtstz +zgqr.out: gqr.in EIG/xeigtstz @echo GQR: Testing Generalized QR and RQ factorization routines - ./xeigtstz < gqr.in > $@ 2>&1 + ./EIG/xeigtstz < $< > $@ 2>&1 -zgsv.out: gsv.in xeigtstz +zgsv.out: gsv.in EIG/xeigtstz @echo GSV: Testing Generalized Singular Value Decomposition routines - ./xeigtstz < gsv.in > $@ 2>&1 + ./EIG/xeigtstz < $< > $@ 2>&1 -zcsd.out: csd.in xeigtstz +zcsd.out: csd.in EIG/xeigtstz @echo CSD: Testing CS Decomposition routines - ./xeigtstz < csd.in > $@ 2>&1 + ./EIG/xeigtstz < $< > $@ 2>&1 -zlse.out: lse.in xeigtstz +zlse.out: lse.in EIG/xeigtstz @echo LSE: Testing Constrained Linear Least Squares routines - ./xeigtstz < lse.in > $@ 2>&1 + ./EIG/xeigtstz < $< > $@ 2>&1 # ============================================================================== -xlintsts: ../$(LAPACKLIB) ../$(TMGLIB) $(FRCLIN) $(FRC) - cd LIN ; $(MAKE) single +LIN/xlintsts: $(FRCLIN) $(FRC) + $(MAKE) -C LIN xlintsts -xlintstc: ../$(LAPACKLIB) ../$(TMGLIB) $(FRCLIN) $(FRC) - cd LIN ; $(MAKE) complex +LIN/xlintstc: $(FRCLIN) $(FRC) + $(MAKE) -C LIN xlintstc -xlintstd: ../$(LAPACKLIB) ../$(TMGLIB) $(FRCLIN) $(FRC) - cd LIN ; $(MAKE) double +LIN/xlintstd: $(FRCLIN) $(FRC) + $(MAKE) -C LIN xlintstd -xlintstz: ../$(LAPACKLIB) ../$(TMGLIB) $(FRCLIN) $(FRC) - cd LIN ; $(MAKE) complex16 +LIN/xlintstz: $(FRCLIN) $(FRC) + $(MAKE) -C LIN xlintstz -xlintstrfs: ../$(LAPACKLIB) ../$(TMGLIB) $(FRCLIN) $(FRC) - cd LIN ; $(MAKE) proto-single +LIN/xlintstrfs: $(FRCLIN) $(FRC) + $(MAKE) -C LIN xlintstrfs -xlintstrfc: ../$(LAPACKLIB) ../$(TMGLIB) $(FRCLIN) $(FRC) - cd LIN ; $(MAKE) proto-complex +LIN/xlintstrfc: $(FRCLIN) $(FRC) + $(MAKE) -C LIN xlintstrfc -xlintstrfd: ../$(LAPACKLIB) ../$(TMGLIB) $(FRCLIN) $(FRC) - cd LIN ; $(MAKE) proto-double +LIN/xlintstrfd: $(FRCLIN) $(FRC) + $(MAKE) -C LIN xlintstrfd -xlintstrfz: ../$(LAPACKLIB) ../$(TMGLIB) $(FRCLIN) $(FRC) - cd LIN ; $(MAKE) proto-complex16 +LIN/xlintstrfz: $(FRCLIN) $(FRC) + $(MAKE) -C LIN xlintstrfz -xlintstds: ../$(LAPACKLIB) ../$(TMGLIB) $(FRCLIN) $(FRC) - cd LIN ; $(MAKE) proto-double +LIN/xlintstds: $(FRCLIN) $(FRC) + $(MAKE) -C LIN xlintstds -xlintstzc: ../$(LAPACKLIB) ../$(TMGLIB) $(FRCLIN) $(FRC) - cd LIN ; $(MAKE) proto-complex16 +LIN/xlintstzc: $(FRCLIN) $(FRC) + $(MAKE) -C LIN xlintstzc -xeigtsts: ../$(LAPACKLIB) ../$(TMGLIB) $(FRCEIG) $(FRC) - cd EIG ; $(MAKE) single +EIG/xeigtsts: $(FRCEIG) $(FRC) + $(MAKE) -C EIG xeigtsts -xeigtstc: ../$(LAPACKLIB) ../$(TMGLIB) $(FRCEIG) $(FRC) - cd EIG ; $(MAKE) complex +EIG/xeigtstc: $(FRCEIG) $(FRC) + $(MAKE) -C EIG xeigtstc -xeigtstd: ../$(LAPACKLIB) ../$(TMGLIB) $(FRCEIG) $(FRC) - cd EIG ; $(MAKE) double +EIG/xeigtstd: $(FRCEIG) $(FRC) + $(MAKE) -C EIG xeigtstd -xeigtstz: ../$(LAPACKLIB) ../$(TMGLIB) $(FRCEIG) $(FRC) - cd EIG ; $(MAKE) complex16 +EIG/xeigtstz: $(FRCEIG) $(FRC) + $(MAKE) -C EIG xeigtstz -clean: +clean: cleantest +cleantest: rm -f *.out core -cleanup: - rm -f x* *.out core - FRCLIN: @FRCLIN=$(FRCLIN) diff -Nru lapack-3.7.0/TESTING/MATGEN/clahilb.f lapack-3.7.1/TESTING/MATGEN/clahilb.f --- lapack-3.7.0/TESTING/MATGEN/clahilb.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/MATGEN/clahilb.f 2017-06-17 22:46:53.000000000 +0000 @@ -126,7 +126,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex_matgen * @@ -134,10 +134,10 @@ SUBROUTINE CLAHILB( N, NRHS, A, LDA, X, LDX, B, LDB, WORK, $ INFO, PATH) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER N, NRHS, LDA, LDX, LDB, INFO @@ -154,7 +154,7 @@ INTEGER I, J COMPLEX TMP CHARACTER*2 C2 - +* .. * .. Parameters .. * NMAX_EXACT the largest dimension where the generated data is * exact. @@ -163,7 +163,7 @@ * ??? complex uses how many bits ??? INTEGER NMAX_EXACT, NMAX_APPROX, SIZE_D PARAMETER (NMAX_EXACT = 6, NMAX_APPROX = 11, SIZE_D = 8) - +* * d's are generated from random permuation of those eight elements. COMPLEX D1(8), D2(8), INVD1(8), INVD2(8) DATA D1 /(-1,0),(0,1),(-1,-1),(0,-1),(1,0),(-1,1),(1,1),(1,-1)/ @@ -173,7 +173,6 @@ $ (-.5,-.5),(.5,-.5),(.5,.5)/ DATA INVD2 /(-1,0),(0,1),(-.5,-.5),(0,-1),(1,0), $ (-.5,.5),(.5,.5),(.5,-.5)/ - * .. * .. External Functions EXTERNAL CLASET, LSAMEN @@ -204,7 +203,7 @@ IF (N .GT. NMAX_EXACT) THEN INFO = 1 END IF - +* * Compute M = the LCM of the integers [1, 2*N-1]. The largest * reasonable N is small enough that integers suffice (up to N = 11). M = 1 @@ -219,7 +218,7 @@ END DO M = (M / TI) * I END DO - +* * Generate the scaled Hilbert matrix in A * If we are testing SY routines, take * D1_i = D2_i, else, D1_i = D2_i* @@ -238,12 +237,12 @@ END DO END DO END IF - +* * Generate matrix B as simply the first NRHS columns of M * the * identity. TMP = REAL(M) CALL CLASET('Full', N, NRHS, (0.0,0.0), TMP, B, LDB) - +* * Generate the true solutions in X. Because B = the first NRHS * columns of M*I, the true solutions are just the first NRHS columns * of the inverse Hilbert matrix. diff -Nru lapack-3.7.0/TESTING/MATGEN/CMakeLists.txt lapack-3.7.1/TESTING/MATGEN/CMakeLists.txt --- lapack-3.7.0/TESTING/MATGEN/CMakeLists.txt 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/MATGEN/CMakeLists.txt 2017-06-17 22:46:53.000000000 +0000 @@ -2,74 +2,51 @@ # This is the makefile to create a library of the test matrix # generators used in LAPACK. The files are organized as follows: # -# SCATGEN -- Auxiliary routines called from both REAL and COMPLEX -# DZATGEN -- Auxiliary routines called from both DOUBLE PRECISION -# and COMPLEX*16 +# SCATGEN -- Auxiliary routines called from single precision +# DZATGEN -- Auxiliary routines called from double precision # SMATGEN -- Single precision real matrix generation routines # CMATGEN -- Single precision complex matrix generation routines # DMATGEN -- Double precision real matrix generation routines # ZMATGEN -- Double precision complex matrix generation routines # -# The library can be set up to include routines for any combination -# of the four precisions. To create or add to the library, enter make -# followed by one or more of the precisions desired. Some examples: -# make single -# make single complex -# make single double complex complex16 -# Alternatively, the command -# make -# without any arguments creates a library of all four precisions. -# The library is called -# tmglib.a -# and is created at the LAPACK directory level. -# -# To remove the object files after the library is created, enter -# make clean -# On some systems, you can force the source files to be recompiled by -# entering (for example) -# make single FRC=FRC -# ####################################################################### -set(SCATGEN slatm1.f slaran.f slarnd.f) +set(SCATGEN slatm1.f slatm7.f slaran.f slarnd.f) set(SMATGEN slatms.f slatme.f slatmr.f slatmt.f slagge.f slagsy.f slakf2.f slarge.f slaror.f slarot.f slatm2.f - slatm3.f slatm5.f slatm6.f slatm7.f slahilb.f) + slatm3.f slatm5.f slatm6.f slahilb.f) 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 slatm7.f) + clatm1.f clarnd.f clatm2.f clatm3.f clatm5.f clatm6.f clahilb.f) -set(DZATGEN dlatm1.f dlaran.f dlarnd.f) +set(DZATGEN dlatm1.f dlatm7.f dlaran.f dlarnd.f) set(DMATGEN dlatms.f dlatme.f dlatmr.f dlatmt.f dlagge.f dlagsy.f dlakf2.f dlarge.f dlaror.f dlarot.f dlatm2.f - dlatm3.f dlatm5.f dlatm6.f dlatm7.f dlahilb.f) + dlatm3.f dlatm5.f dlatm6.f dlahilb.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 dlatm7.f) + zlatm1.f zlarnd.f zlatm2.f zlatm3.f zlatm5.f zlatm6.f zlahilb.f) + +set(SOURCES) if(BUILD_SINGLE) - set(ALLOBJ ${SMATGEN} ${SCATGEN}) + list(APPEND SOURCES ${SMATGEN} ${SCATGEN}) endif() if(BUILD_DOUBLE) - set(ALLOBJ ${ALLOBJ} ${DMATGEN} ${DZATGEN}) + list(APPEND SOURCES ${DMATGEN} ${DZATGEN}) endif() if(BUILD_COMPLEX) - set(ALLOBJ ${ALLOBJ} ${CMATGEN} ${SCATGEN}) + list(APPEND SOURCES ${CMATGEN} ${SCATGEN}) endif() if(BUILD_COMPLEX16) - set(ALLOBJ ${ALLOBJ} ${ZMATGEN} ${DZATGEN}) + list(APPEND SOURCES ${ZMATGEN} ${DZATGEN}) endif() +list(REMOVE_DUPLICATES SOURCES) -if(NOT ALLOBJ) - set(ALLOBJ ${SMATGEN} ${CMATGEN} ${SCATGEN} ${DMATGEN} ${ZMATGEN} - ${DZATGEN}) -else() - list(REMOVE_DUPLICATES ALLOBJ) -endif() -add_library(tmglib ${ALLOBJ}) -target_link_libraries(tmglib ${LAPACK_LIBRARIES}) +add_library(tmglib ${SOURCES}) +target_link_libraries(tmglib ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) lapack_install_library(tmglib) diff -Nru lapack-3.7.0/TESTING/MATGEN/dlahilb.f lapack-3.7.1/TESTING/MATGEN/dlahilb.f --- lapack-3.7.0/TESTING/MATGEN/dlahilb.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/MATGEN/dlahilb.f 2017-06-17 22:46:53.000000000 +0000 @@ -1,4 +1,4 @@ -C> \brief \b DLAHILB +*> \brief \b DLAHILB * * =========== DOCUMENTATION =========== * @@ -117,17 +117,17 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup double_matgen * * ===================================================================== SUBROUTINE DLAHILB( N, NRHS, A, LDA, X, LDX, B, LDB, WORK, INFO) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER N, NRHS, LDA, LDX, LDB, INFO @@ -140,7 +140,7 @@ INTEGER TM, TI, R INTEGER M INTEGER I, J - +* .. * .. Parameters .. * NMAX_EXACT the largest dimension where the generated data is * exact. @@ -177,7 +177,7 @@ IF (N .GT. NMAX_EXACT) THEN INFO = 1 END IF - +* * Compute M = the LCM of the integers [1, 2*N-1]. The largest * reasonable N is small enough that integers suffice (up to N = 11). M = 1 @@ -192,14 +192,14 @@ END DO M = (M / TI) * I END DO - +* * Generate the scaled Hilbert matrix in A DO J = 1, N DO I = 1, N A(I, J) = DBLE(M) / (I + J - 1) END DO END DO - +* * Generate matrix B as simply the first NRHS columns of M * the * identity. CALL DLASET('Full', N, NRHS, 0.0D+0, DBLE(M), B, LDB) @@ -212,12 +212,12 @@ WORK(J) = ( ( (WORK(J-1)/(J-1)) * (J-1 - N) ) /(J-1) ) $ * (N +J -1) END DO - +* DO J = 1, NRHS DO I = 1, N X(I, J) = (WORK(I)*WORK(J)) / (I + J - 1) END DO END DO - +* END diff -Nru lapack-3.7.0/TESTING/MATGEN/Makefile lapack-3.7.1/TESTING/MATGEN/Makefile --- lapack-3.7.0/TESTING/MATGEN/Makefile 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/MATGEN/Makefile 2017-06-17 22:46:53.000000000 +0000 @@ -4,9 +4,8 @@ # This is the makefile to create a library of the test matrix # generators used in LAPACK. The files are organized as follows: # -# SCATGEN -- Auxiliary routines called from both REAL and COMPLEX -# DZATGEN -- Auxiliary routines called from both DOUBLE PRECISION -# and COMPLEX*16 +# SCATGEN -- Auxiliary routines called from single precision +# DZATGEN -- Auxiliary routines called from double precision # SMATGEN -- Single precision real matrix generation routines # CMATGEN -- Single precision complex matrix generation routines # DMATGEN -- Double precision real matrix generation routines @@ -26,28 +25,28 @@ # and is created at the LAPACK directory level. # # To remove the object files after the library is created, enter -# make clean +# make cleanobj # On some systems, you can force the source files to be recompiled by # entering (for example) # make single FRC=FRC # ####################################################################### -SCATGEN = slatm1.o slaran.o slarnd.o +SCATGEN = slatm1.o slatm7.o slaran.o slarnd.o SMATGEN = slatms.o slatme.o slatmr.o slatmt.o \ slagge.o slagsy.o slakf2.o slarge.o slaror.o slarot.o slatm2.o \ - slatm3.o slatm5.o slatm6.o slatm7.o slahilb.o + slatm3.o slatm5.o slatm6.o slahilb.o CMATGEN = clatms.o clatme.o clatmr.o clatmt.o \ clagge.o claghe.o clagsy.o clakf2.o clarge.o claror.o clarot.o \ clatm1.o clarnd.o clatm2.o clatm3.o clatm5.o clatm6.o clahilb.o -DZATGEN = dlatm1.o dlaran.o dlarnd.o +DZATGEN = dlatm1.o dlatm7.o dlaran.o dlarnd.o DMATGEN = dlatms.o dlatme.o dlatmr.o dlatmt.o \ dlagge.o dlagsy.o dlakf2.o dlarge.o dlaror.o dlarot.o dlatm2.o \ - dlatm3.o dlatm5.o dlatm6.o dlatm7.o dlahilb.o + dlatm3.o dlatm5.o dlatm6.o dlahilb.o ZMATGEN = zlatms.o zlatme.o zlatmr.o zlatmt.o \ zlagge.o zlaghe.o zlagsy.o zlakf2.o zlarge.o zlaror.o zlarot.o \ @@ -59,23 +58,23 @@ $(DZATGEN) ../../$(TMGLIB): $(ALLOBJ) - $(ARCH) $(ARCHFLAGS) $@ $(ALLOBJ) + $(ARCH) $(ARCHFLAGS) $@ $^ $(RANLIB) $@ single: $(SMATGEN) $(SCATGEN) - $(ARCH) $(ARCHFLAGS) ../../$(TMGLIB) $(SMATGEN) $(SCATGEN) + $(ARCH) $(ARCHFLAGS) ../../$(TMGLIB) $^ $(RANLIB) ../../$(TMGLIB) complex: $(CMATGEN) $(SCATGEN) - $(ARCH) $(ARCHFLAGS) ../../$(TMGLIB) $(CMATGEN) $(SCATGEN) + $(ARCH) $(ARCHFLAGS) ../../$(TMGLIB) $^ $(RANLIB) ../../$(TMGLIB) double: $(DMATGEN) $(DZATGEN) - $(ARCH) $(ARCHFLAGS) ../../$(TMGLIB) $(DMATGEN) $(DZATGEN) + $(ARCH) $(ARCHFLAGS) ../../$(TMGLIB) $^ $(RANLIB) ../../$(TMGLIB) complex16: $(ZMATGEN) $(DZATGEN) - $(ARCH) $(ARCHFLAGS) ../../$(TMGLIB) $(ZMATGEN) $(DZATGEN) + $(ARCH) $(ARCHFLAGS) ../../$(TMGLIB) $^ $(RANLIB) ../../$(TMGLIB) $(SCATGEN): $(FRC) @@ -88,8 +87,11 @@ FRC: @FRC=$(FRC) -clean: +clean: cleanobj cleanlib +cleanobj: rm -f *.o +cleanlib: + rm -f ../../$(TMGLIB) .f.o: $(FORTRAN) $(OPTS) -c -o $@ $< diff -Nru lapack-3.7.0/TESTING/MATGEN/slahilb.f lapack-3.7.1/TESTING/MATGEN/slahilb.f --- lapack-3.7.0/TESTING/MATGEN/slahilb.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/MATGEN/slahilb.f 2017-06-17 22:46:53.000000000 +0000 @@ -117,17 +117,17 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup real_matgen * * ===================================================================== SUBROUTINE SLAHILB( N, NRHS, A, LDA, X, LDX, B, LDB, WORK, INFO) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER N, NRHS, LDA, LDX, LDB, INFO @@ -140,7 +140,7 @@ INTEGER TM, TI, R INTEGER M INTEGER I, J - +* .. * .. Parameters .. * NMAX_EXACT the largest dimension where the generated data is * exact. @@ -148,7 +148,6 @@ * a small componentwise relative error. INTEGER NMAX_EXACT, NMAX_APPROX PARAMETER (NMAX_EXACT = 6, NMAX_APPROX = 11) - * .. * .. External Functions EXTERNAL SLASET @@ -177,7 +176,7 @@ IF (N .GT. NMAX_EXACT) THEN INFO = 1 END IF - +* * Compute M = the LCM of the integers [1, 2*N-1]. The largest * reasonable N is small enough that integers suffice (up to N = 11). M = 1 @@ -192,18 +191,18 @@ END DO M = (M / TI) * I END DO - +* * Generate the scaled Hilbert matrix in A DO J = 1, N DO I = 1, N A(I, J) = REAL(M) / (I + J - 1) END DO END DO - +* * Generate matrix B as simply the first NRHS columns of M * the * identity. CALL SLASET('Full', N, NRHS, 0.0, REAL(M), B, LDB) - +* * Generate the true solutions in X. Because B = the first NRHS * columns of M*I, the true solutions are just the first NRHS columns * of the inverse Hilbert matrix. @@ -212,12 +211,12 @@ WORK(J) = ( ( (WORK(J-1)/(J-1)) * (J-1 - N) ) /(J-1) ) $ * (N +J -1) END DO - +* DO J = 1, NRHS DO I = 1, N X(I, J) = (WORK(I)*WORK(J)) / (I + J - 1) END DO END DO - +* END diff -Nru lapack-3.7.0/TESTING/MATGEN/zlahilb.f lapack-3.7.1/TESTING/MATGEN/zlahilb.f --- lapack-3.7.0/TESTING/MATGEN/zlahilb.f 2016-12-23 23:01:32.000000000 +0000 +++ lapack-3.7.1/TESTING/MATGEN/zlahilb.f 2017-06-17 22:46:53.000000000 +0000 @@ -126,7 +126,7 @@ *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date June 2017 * *> \ingroup complex16_matgen * @@ -134,10 +134,10 @@ SUBROUTINE ZLAHILB( N, NRHS, A, LDA, X, LDX, B, LDB, WORK, $ INFO, PATH) * -* -- LAPACK test routine (version 3.7.0) -- +* -- LAPACK test routine (version 3.7.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* June 2017 * * .. Scalar Arguments .. INTEGER N, NRHS, LDA, LDX, LDB, INFO @@ -154,7 +154,7 @@ INTEGER I, J COMPLEX*16 TMP CHARACTER*2 C2 - +* .. * .. Parameters .. * NMAX_EXACT the largest dimension where the generated data is * exact. @@ -163,7 +163,7 @@ * ??? complex uses how many bits ??? INTEGER NMAX_EXACT, NMAX_APPROX, SIZE_D PARAMETER (NMAX_EXACT = 6, NMAX_APPROX = 11, SIZE_D = 8) - +* * d's are generated from random permuation of those eight elements. COMPLEX*16 d1(8), d2(8), invd1(8), invd2(8) DATA D1 /(-1,0),(0,1),(-1,-1),(0,-1),(1,0),(-1,1),(1,1),(1,-1)/ @@ -203,7 +203,7 @@ IF (N .GT. NMAX_EXACT) THEN INFO = 1 END IF - +* * Compute M = the LCM of the integers [1, 2*N-1]. The largest * reasonable N is small enough that integers suffice (up to N = 11). M = 1 @@ -218,7 +218,7 @@ END DO M = (M / TI) * I END DO - +* * Generate the scaled Hilbert matrix in A * If we are testing SY routines, * take D1_i = D2_i, else, D1_i = D2_i* @@ -237,12 +237,12 @@ END DO END DO END IF - +* * Generate matrix B as simply the first NRHS columns of M * the * identity. TMP = DBLE(M) CALL ZLASET('Full', N, NRHS, (0.0D+0,0.0D+0), TMP, B, LDB) - +* * Generate the true solutions in X. Because B = the first NRHS * columns of M*I, the true solutions are just the first NRHS columns * of the inverse Hilbert matrix. diff -Nru lapack-3.7.0/.travis.yml lapack-3.7.1/.travis.yml --- lapack-3.7.0/.travis.yml 1970-01-01 00:00:00.000000000 +0000 +++ lapack-3.7.1/.travis.yml 2017-06-17 22:46:53.000000000 +0000 @@ -0,0 +1,62 @@ +language: cpp + +addons: + apt: + sources: + - george-edison55-precise-backports # cmake + packages: + - cmake + - cmake-data + - gfortran + +os: + - linux + - osx + +env: + - CMAKE_BUILD_TYPE=Release + - CMAKE_BUILD_TYPE=Coverage + +install: + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; + then + for pkg in gcc cmake; do + if brew list -1 | grep -q "^${pkg}\$"; then + brew outdated $pkg || brew upgrade $pkg; + else + brew install $pkg; + fi + done + fi + +script: + - export PR=https://api.github.com/repos/$TRAVIS_REPO_SLUG/pulls/$TRAVIS_PULL_REQUEST + - export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo `curl -s $PR | jq -r .head.ref`; fi) + - echo "TRAVIS_BRANCH=$TRAVIS_BRANCH, PR=$PR, BRANCH=$BRANCH" + - export SRC_DIR=$(pwd) + - export BLD_DIR=${SRC_DIR}/lapack-travis-bld + - export INST_DIR=${SRC_DIR}/../lapack-travis-install + - mkdir -p ${BLD_DIR} + - cd ${BLD_DIR} +# See issue #17 on github dashboard. Once resolved, use -DCBLAS=ON +# - cmake -DCMAKE_INSTALL_PREFIX=${INST_DIR} -DLAPACKE=ON ${SRC_DIR} + - cmake -DBUILDNAME:STRING="travis-${TRAVIS_OS_NAME}-${BRANCH}" + -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} + -DCMAKE_INSTALL_PREFIX=${INST_DIR} + -DCBLAS:BOOL=ON + -DLAPACKE:BOOL=ON + -DBUILD_TESTING=ON + -DLAPACKE_WITH_TMG:BOOL=ON + ${SRC_DIR} + - ctest -D ExperimentalStart + - ctest -D ExperimentalConfigure + - ctest -D ExperimentalBuild -j2 + - ctest -D ExperimentalTest --schedule-random -j2 --output-on-failure --timeout 100 + - ctest -D ExperimentalSubmit + - make install -j2 + - if [[ "$CMAKE_BUILD_TYPE" == "Coverage" ]]; + then + echo "Coverage"; + make coverage; + bash <(curl -s https://codecov.io/bash) -X gcov; + fi