Commit Graph
186 Commits
Author SHA1 Message Date
Hans Johnson 9dafba6d41 STYLE: Remove trailing whitespace in Fortran files
This is mostly a long term maintenance improvement.

Many coding styles require elimination of trailing whitespace, and
many editors and source code management configurations automatically
gobble up whitespace. When these tools gobble up whitespace, it
complicates reviewing the meaningful code changes.

By removing whitespace on one patch, it makes future
code reviews much easier.

=SCRIPT====================================================================

if which tempfile &>/dev/null; then
  TEMPMAKER=tempfile
elif which mktemp &>/dev/null; then
  TEMPMAKER=mktemp
else
  echo "Cannot find tempfile program." 2>&1
  exit 1
fi

MYTEMP=$($TEMPMAKER)
trap 'rm -f $MYTEMP' SIGINT SIGTERM

stripit() {
  echo "stripping $1"
  sed 's/[ \t]*$//' "$1" > $MYTEMP
  cp $MYTEMP "$1"
}

if [ $# -gt 0 ]; then
  while [ "$1" != "" ]; do
    stripit $1
    shift
  done
else
  while read -t 2; do
    stripit $REPLY
  done
fi

rm $MYTEMP
=================================================
2016-07-09 11:19:34 -05:00
Hans Johnson 9c7f84bd60 STYLE: Remove trailing whitespace in MISC files
This is mostly a long term maintenance improvement.

Many coding styles require elimination of trailing whitespace, and
many editors and source code management configurations automatically
gobble up whitespace. When these tools gobble up whitespace, it
complicates reviewing the meaningful code changes.

By removing whitespace on one patch, it makes future
code reviews much easier.

=SCRIPT====================================================================

if which tempfile &>/dev/null; then
  TEMPMAKER=tempfile
elif which mktemp &>/dev/null; then
  TEMPMAKER=mktemp
else
  echo "Cannot find tempfile program." 2>&1
  exit 1
fi

MYTEMP=$($TEMPMAKER)
trap 'rm -f $MYTEMP' SIGINT SIGTERM

stripit() {
  echo "stripping $1"
  sed 's/[ \t]*$//' "$1" > $MYTEMP
  cp $MYTEMP "$1"
}

if [ $# -gt 0 ]; then
  while [ "$1" != "" ]; do
    stripit $1
    shift
  done
else
  while read -t 2; do
    stripit $REPLY
  done
fi

rm $MYTEMP
=================================================
2016-07-09 11:19:33 -05:00
Hans Johnson f8fb0842d5 STYLE: Remove trailing whitespace in CMake files
This is mostly a long term maintenance improvement.

Many coding styles require elimination of trailing whitespace, and
many editors and source code management configurations automatically
gobble up whitespace. When these tools gobble up whitespace, it
complicates reviewing the meaningful code changes.

By removing whitespace on one patch, it makes future
code reviews much easier.
2016-07-09 10:34:19 -05:00
Sébastien Villemot 40a3b2fb15 Description: Fix various typos
Author: Sébastien Villemot <sebastien@debian.org>
Forwarded: yes, by email to lapack@cs.utk.edu on 2016-06-26
2016-06-27 20:07:25 -06:00
julie 7d0ed410c4 Fix for pkgconfig files lapack.pc, blas.pc - PATCH sent by Christoph Conrads on March 1st 2016 2016-03-02 04:00:38 +00:00
julie 50d40d7852 Updating version number 2015-11-15 20:33:40 +00:00
langou 2f2f760e62 Minor edits in the BLAS header to better describe the functionality.
See: http://icl.cs.utk.edu/lapack-forum/viewtopic.php?t=4786
2015-09-03 03:05:54 +00:00
julie d8350cf73f Committing Nico's change about build system improvements for LAPACK
"One of the improvements with the patches is that SOVERSION and VERSION are now properly set and the proper symlinks are created:
```
liblapack.so -> liblapack.so.3
liblapack.so.3 -> liblapack.so.3.5.0
liblapack.so.3.5.0
```
Since BLAS is shipped with LAPACK and no separate version number is given for BLAS, I applied the same there, too."

Tested on Julie's Mac

TO DO: To test under Windows
====

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
in the CMake Wiki:
  http://www.cmake.org/Wiki/CMake_RPATH_handling#Mac_OS_X_and_the_RPATH
2015-09-02 05:32:19 +00:00
langou 2b911746d5 Edited the code of xGBMV, xGEMV and xGEMM by removing the test for an entry of
B (or X) being zero to skip a loop so as to enable better NaN (or Inf)
propagation.

Taking DGEMM as an example, if you use notation: 
	C(I,J) = C(I,J) + alpha * A(I,L) * B(L,J), 
the reference BLAS DGEMM is using the JLI version of matrix matrix multiply and
is checking, for each J (from 1 to N) and for each L (from 1 to K), whether
B(L,J) is zero (or not) to save (or not) the 2M following operations.

(See the "IF (B(L,J).NE.ZERO) THEN" in the code below.)

The snippets of code is as follows

              DO 90 J = 1,N
                  DO 80 L = 1,K
                      IF (B(L,J).NE.ZERO) THEN
                          TEMP = ALPHA*B(L,J)
                          DO 70 I = 1,M
                              C(I,J) = C(I,J) + TEMP*A(I,L)
   70                     CONTINUE
                      END IF
   80             CONTINUE
   90         CONTINUE

This induces some non NaN-propagation in a pretty ad-hoc way. For better NaN
propagation, this patch removes the above IF statement.

The snippet of code now becomes

              DO 90 J = 1,N
                  DO 80 L = 1,K
                      TEMP = ALPHA*B(L,J)
                      DO 70 I = 1,M
                          C(I,J) = C(I,J) + TEMP*A(I,L)
   70                 CONTINUE
   80             CONTINUE
   90         CONTINUE

This enables correct NaN propagation for this piece of code.

Rationale: BLAS does not correctly propagate all NaNs (and Infs). We still have
no NaN propagation where for example ALPHA=0, etc. The goal of this commit is
to have correct NaN propagation no matter what the entries of the input
matrices/vectors (A, B, C, X, etc.) are.  BLAS do not correctly propagate NaNs
and Infs based on some values of the scalars (ALPHA, BETA, etc.).

See below the email from Tom Callaway from RedHat, sent on July 9th to
lapack@cs.utk.edu.

Hello LAPACK people,

Martyn & Lejeczek (on CC) reported an issue to Fedora relating to R using our
system copy of BLAS (from LAPACK).

As noted in the R administration and Installation Manual, "R relies on ISO/IEC
60559 compliance of an external BLAS. This can be broken if for example the
code assumes that terms with a zero factor are always zero and do not need to
be computed - whereas x*0 can be NaN. This is checked in the test suite."

In the stock BLAS, DGBMV, DGEMM, and DGEMV fail this. R has been patching their
bundled BLAS to resolve this issue since 2010, but Fedora now uses the system
BLAS.

Attached is a patch (from upstream R) to fix this issue in the LAPACK BLAS.
Please consider applying it.

Thanks,

~tom
2014-07-12 19:58:39 +00:00
julie 54a506304c Applied patch provided from vitaut on LAPACK forum on June 13th.
The patch fixes the warnings (Policy CMP0026) by replacing the deprecated LOCATION target
property with the generator expression $<TARGET_FILE>

See http://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=13&t=4556&p=10939#p10939
2014-06-14 17:04:05 +00:00
langou 54d66c762f ( Let me know if I broke anything. I double checked. We should be fine but )
( please let me know if concerns/problems.                                 )

1) The comments in ICMAX1 (resp. IZMAX1) were not correct. The comments read:
"ICMAX1 finds the index of the element whose real part has maximum absolute
value." It should have read: "ICMAX1 finds the index of the first vector
element of maximum absolute value." This is corrected. The problem was reported
Eloy Romero Alcalde from the SLEPc team, Universitat Politècnica de València
and confirmed by Nick Higham, Sven Hammarling and Julien Langou.

2) The routine ICAMAX (resp. IZAMAX) from the BLAS evolved without ICMAX1
(resp. IZMAX1). Reconcialated both version. So essentially took the ICAMAX
currently in the BLAS and changed it appropriately for an ICMAX1.

3) Remove the use of statement function in ICMAX1 (resp. IZMAX1). Now obsolete
in FORTRAN.

4) Change comments in BLAS routines: SCABS1, DCABS1, ICAMAX, IZAMAX, SCASUM,
and DZASUM. Remove the use of "absolute value of a complex number" for the
quantity "| Re(.) | + | Im(.) |". For example:
before
   DCABS1 computes absolute value of a double complex number 
after
   DCABS1 computes |Re(.)| + |Im(.)| of a double complex number
2014-02-10 19:55:39 +00:00
julie f0b200da5b Update version number 2012-04-13 18:22:32 +00:00
julie 55d43f3c3c Remove unused parameters 2012-04-11 19:43:59 +00:00
james 5906b88423 Fixed problem with optimizer breaking error checking, now using F90 EPSILON intrinsic.
Thanks to Harald Anlauf for providing the solution.
2012-01-20 15:12:13 +00:00
james a880822a50 replaced calculation of EPS with F90 call to EPSILON intrinsic 2012-01-20 03:06:12 +00:00
julie 4029478e7b Correct some more new lines in program - Thanks Igor for finding out the problem 2011-11-23 18:10:47 +00:00
julie 84118d4efb Update version number to 3.4.0 2011-11-11 19:34:11 +00:00
julie 1c3ba60067 Cosmetic changes in Doxygen presentation.
Use \par instead of \details for section.

add a Contributors Section and a Reference Section.
Remove (some) verbatim section when not needed.
Those changes have been done by hand so I am not sure I manage to catch them all.
2011-11-03 20:32:56 +00:00
julie 0d9e213c67 Correct Warning detected during Doxygen Generation.
Now each routine should have the correct list of arguments.
This allowed to detect and fix problems in parameter description of many routines.
2011-10-31 22:21:11 +00:00
julie e1d39294ae Integrating Doxygen in comments 2011-10-06 06:53:11 +00:00
julie 55890ddab9 Improve CMAKE BUILD system and OUTPUT PARSING when not all precisions are needed.
The following variables will control the precision to be built:
  BUILD_SINGLE
  BUILD_DOUBLE
  BUILD_COMPLEX
  BUILD_COMPLEX16

For mixed precision SINGLE/DOUBLE routines, both BUILD_SINGLE and BUILD_DOUBLE needs to be on.
(same for COMPLEX/COMPLEX16)
2011-09-23 19:50:27 +00:00
julie 46b5d7df01 Replace DOUBLE COMPLEX by COMPLEX*16
Replace SNGL by REAL
2011-08-15 18:25:57 +00:00
julie 0d0b443c69 Summer cleanup
Cleanup some codes, like unused variables.
Used -Walls to detect problems.
2011-06-22 09:45:40 +00:00
julie d9d50d133b First pass for BLAS to homgenize notation for transpose (**T) and conjugate transpose (**H)
Corresponds to bug0024
2011-04-02 11:46:46 +00:00
julie 1767365dbf Remove GO TO STATEMENT in DROTMG/DROTM and SROTMG/SROTM.
Incorporate OLD Testings from ACM Collected algorithms : algorithm 539 
for:
   - DROTMG/SROTMG
   - DROTM/SROTM
   - DSDOT / SDSDOT

All BLAS routines are now tested.
Now up to us to change the BLAS but at least this is consistent.
2011-03-16 22:52:01 +00:00
julie e9dac1f3c4 Remove the easy GO TO statments....still 13 to remove in drotm.f and 36 in drotmg.f 2011-03-10 23:33:40 +00:00
julie 6cb10ef589 minor fix: add comment to warn that vector and matrix arguments are not referenced when N = 0, or M = 0 2011-01-04 19:58:09 +00:00
julie 0d5645bfec Merge some of Sebastien Fabbro's patch for CMAKE 2010-12-15 18:44:42 +00:00
julie 4ff24babc1 Patch provided by the kitware team on Aug 5th (Brad King and Bill Hoffman)
Add the install rules and exports the targets.
Now one can write

find_package(LAPACK 3.2.2)

in another project to find either the LAPACK build tree or the
install tree.
2010-08-10 16:57:20 +00:00
julie 3137c2a46f Take off comment to put xerbla back in BLAS lib 2010-03-10 17:48:14 +00:00
julie 708ac3e2f4 Fix bug0023: SROTMG and DROTMG uses deprecated Fortran ASSIGN statement and assigned GOTO statement, actually fixed ROTM also 2009-09-10 22:59:31 +00:00
julie 17112c1f29 Add CMAKE support to LAPACK 2009-08-11 21:58:21 +00:00
julie 1a86352338 Following a out-of-bound complaint by gfortran
Modify size in declaration of DX and DY.
It was set to 1, and 5 or N in the comments !!!!!
Put * in the declaration and N in the comments

This routine may need to be double-checked.
2009-01-12 22:16:18 +00:00
julie a0d64643e4 Last round of modifications to the comments for the generation of the manpages 2009-01-02 21:57:02 +00:00
julie ff981f106b 2008-12-16 17:06:58 +00:00
jason baba851215 Move LAPACK trunk into position. 2008-10-28 01:38:50 +00:00