Abort on error in QR-decomposition

If the QR-decomposition is used wrongly (matrix size is not a
multiple of block size) the the execution will abort, in
order to prevent the wrong results, discussed in a previous commit

Debug messages are now available by setting the environment variable
"ELPA_DEBUG_MESSAGES" to "yes".
parent 3d880b65
......@@ -9,7 +9,7 @@ AM_LDFLAGS = $(SCALAPACK_LDFLAGS)
lib_LTLIBRARIES = libelpa@SUFFIX@.la
libelpa@SUFFIX@_la_LINK = $(FCLINK) $(AM_LDFLAGS) -version-info $(ELPA_SO_VERSION) -lstdc++
libelpa@SUFFIX@_la_SOURCES = src/elpa1.F90 src/elpa2.F90
libelpa@SUFFIX@_la_SOURCES = src/elpa_utilities.F90 src/elpa1.F90 src/elpa2_utilities.F90 src/elpa2.F90
libelpa@SUFFIX@_la_SOURCES += src/elpa_qr/qr_utils.f90 \
src/elpa_qr/elpa_qrkernels.f90 \
src/elpa_qr/elpa_pdlarfb.f90 \
......
......@@ -170,7 +170,8 @@ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
"$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(elpa_includedir)"
LTLIBRARIES = $(lib_LTLIBRARIES)
libelpa@SUFFIX@_la_LIBADD =
am__libelpa@SUFFIX@_la_SOURCES_DIST = src/elpa1.F90 src/elpa2.F90 \
am__libelpa@SUFFIX@_la_SOURCES_DIST = src/elpa_utilities.F90 \
src/elpa1.F90 src/elpa2_utilities.F90 src/elpa2.F90 \
src/elpa_qr/qr_utils.f90 src/elpa_qr/elpa_qrkernels.f90 \
src/elpa_qr/elpa_pdlarfb.f90 src/elpa_qr/elpa_pdgeqrf.f90 \
src/timer.F90 src/ftimings/ftimings.F90 \
......@@ -212,14 +213,14 @@ am__dirstamp = $(am__leading_dot)dirstamp
@WITH_REAL_AVX_BLOCK6_KERNEL_TRUE@am__objects_12 = src/elpa2_kernels/elpa2_kernels_real_sse-avx_6hv.lo
@WITH_COMPLEX_AVX_BLOCK1_KERNEL_TRUE@am__objects_13 = src/elpa2_kernels/elpa2_kernels_complex_sse-avx_1hv.lo
@WITH_COMPLEX_AVX_BLOCK2_KERNEL_TRUE@am__objects_14 = src/elpa2_kernels/elpa2_kernels_complex_sse-avx_2hv.lo
am_libelpa@SUFFIX@_la_OBJECTS = src/elpa1.lo src/elpa2.lo \
src/elpa_qr/qr_utils.lo src/elpa_qr/elpa_qrkernels.lo \
src/elpa_qr/elpa_pdlarfb.lo src/elpa_qr/elpa_pdgeqrf.lo \
$(am__objects_1) $(am__objects_2) $(am__objects_3) \
$(am__objects_4) $(am__objects_5) $(am__objects_6) \
$(am__objects_7) $(am__objects_8) $(am__objects_9) \
$(am__objects_10) $(am__objects_11) $(am__objects_12) \
$(am__objects_13) $(am__objects_14)
am_libelpa@SUFFIX@_la_OBJECTS = src/elpa_utilities.lo src/elpa1.lo \
src/elpa2_utilities.lo src/elpa2.lo src/elpa_qr/qr_utils.lo \
src/elpa_qr/elpa_qrkernels.lo src/elpa_qr/elpa_pdlarfb.lo \
src/elpa_qr/elpa_pdgeqrf.lo $(am__objects_1) $(am__objects_2) \
$(am__objects_3) $(am__objects_4) $(am__objects_5) \
$(am__objects_6) $(am__objects_7) $(am__objects_8) \
$(am__objects_9) $(am__objects_10) $(am__objects_11) \
$(am__objects_12) $(am__objects_13) $(am__objects_14)
libelpa@SUFFIX@_la_OBJECTS = $(am_libelpa@SUFFIX@_la_OBJECTS)
PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
am__elpa1_test_complex@SUFFIX@_SOURCES_DIST = test/test_complex.F90 \
......@@ -797,14 +798,14 @@ AM_LDFLAGS = $(SCALAPACK_LDFLAGS)
# libelpa
lib_LTLIBRARIES = libelpa@SUFFIX@.la
libelpa@SUFFIX@_la_LINK = $(FCLINK) $(AM_LDFLAGS) -version-info $(ELPA_SO_VERSION) -lstdc++
libelpa@SUFFIX@_la_SOURCES = src/elpa1.F90 src/elpa2.F90 \
src/elpa_qr/qr_utils.f90 src/elpa_qr/elpa_qrkernels.f90 \
src/elpa_qr/elpa_pdlarfb.f90 src/elpa_qr/elpa_pdgeqrf.f90 \
$(am__append_1) $(am__append_2) $(am__append_3) \
$(am__append_4) $(am__append_5) $(am__append_6) \
$(am__append_7) $(am__append_8) $(am__append_9) \
$(am__append_10) $(am__append_11) $(am__append_12) \
$(am__append_13) $(am__append_14)
libelpa@SUFFIX@_la_SOURCES = src/elpa_utilities.F90 src/elpa1.F90 \
src/elpa2_utilities.F90 src/elpa2.F90 src/elpa_qr/qr_utils.f90 \
src/elpa_qr/elpa_qrkernels.f90 src/elpa_qr/elpa_pdlarfb.f90 \
src/elpa_qr/elpa_pdgeqrf.f90 $(am__append_1) $(am__append_2) \
$(am__append_3) $(am__append_4) $(am__append_5) \
$(am__append_6) $(am__append_7) $(am__append_8) \
$(am__append_9) $(am__append_10) $(am__append_11) \
$(am__append_12) $(am__append_13) $(am__append_14)
#if WITH_AVX_SANDYBRIDGE
# libelpa@SUFFIX@_la_SOURCES += src/elpa2_kernels/elpa2_kernels_real_sse-avx_2hv.c \
......@@ -984,7 +985,11 @@ src/$(am__dirstamp):
src/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) src/$(DEPDIR)
@: > src/$(DEPDIR)/$(am__dirstamp)
src/elpa_utilities.lo: src/$(am__dirstamp) \
src/$(DEPDIR)/$(am__dirstamp)
src/elpa1.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
src/elpa2_utilities.lo: src/$(am__dirstamp) \
src/$(DEPDIR)/$(am__dirstamp)
src/elpa2.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
src/elpa_qr/$(am__dirstamp):
@$(MKDIR_P) src/elpa_qr
......
......@@ -5,19 +5,20 @@ This file contains the release notes for the ELPA 2015.02.001 version
What is new?
-------------
a)
a) ABI change
---------------------
Most importantly, the ABI of the ELPA libray changed!
A rebuild/relink of the user code using the ELPA library is mandatory!
b)
b) QR-decomposition
---------------------
The only major change (which results in point a) is in the ELPA-2
part of the library for real matrices:
the fully blocked QR decomposition has been moved from the development part
to the release! However, this is still experimental, since there is still
a bug. For some matrix sizes the results are wrong
to the release!
It is now possible to use this QR decomposition by either setting an
environment variable "ELPA_QR_DECOMPOSITION" to "yes", or to call the
......@@ -28,19 +29,33 @@ Note, that the environment variable always takes precedence over the setting in
the API call.
Furthernote, that if neither the environment variable or the API keyword are not
set, or set to "no" or ".false.", respectively, then no qr decomposition is used
set, or set to "no" or ".false.", respectively, then no QR-decomposition is used
(i.e. the previous behaviour is maintained).
The QR-decomposition fails, if the chosen matrix size is not a multiple of the
blocksize. The library will give a warning message if this happens and it will
abort.
c)
c) Debug messages
----------------------
By setting the environment variable "ELPA_DEBUG_MESSAGES" to "yes", ELPA will now
print more information if an error occurs.
d) Optimization flags
-----------------------
The configure procedure was adapted to be more consistent. No compiler omptimization
flags are set automatically anymore, this is up to the user at build time
d)
e) OpenMP check
----------------------
The checks for OpenMP in the configure have been improved
Any incompatibles to previous version?
---------------------------------------
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
! This file is part of ELPA.
!
! The ELPA library was originally created by the ELPA consortium,
! consisting of the following organizations:
!
! - Rechenzentrum Garching der Max-Planck-Gesellschaft (RZG),
! - Bergische Universität Wuppertal, Lehrstuhl für angewandte
! Informatik,
! - Technische Universität München, Lehrstuhl für Informatik mit
! Schwerpunkt Wissenschaftliches Rechnen ,
! - Fritz-Haber-Institut, Berlin, Abt. Theorie,
! - Max-Plack-Institut für Mathematik in den Naturwissenschaftrn,
! Leipzig, Abt. Komplexe Strukutren in Biologie und Kognition,
! and
! - IBM Deutschland GmbH
!
!
! More information can be found here:
! http://elpa.rzg.mpg.de/
!
! ELPA is free software: you can redistribute it and/or modify
! it under the terms of the version 3 of the license of the
! GNU Lesser General Public License as published by the Free
! Software Foundation.
!
! ELPA is distributed in the hope that it will be useful,
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! GNU Lesser General Public License for more details.
!
! You should have received a copy of the GNU Lesser General Public License
! along with ELPA. If not, see <http://www.gnu.org/licenses/>
!
! ELPA reflects a substantial effort on the part of the original
! ELPA consortium, and we ask you to respect the spirit of the
! license that we chose: i.e., please contribute any changes you
! may have back to the original ELPA library distribution, and keep
! any derivatives of ELPA under the same license that we chose for
! the original distribution, the GNU Lesser General Public License.
!
!
! ELPA1 -- Faster replacements for ScaLAPACK symmetric eigenvalue routines
!
! Copyright of the original code rests with the authors inside the ELPA
! consortium. The copyright of any additional modifications shall rest
! with their original authors, but shall adhere to the licensing terms
! distributed along with the original code in the file "COPYING".
! ELPA2 -- 2-stage solver for ELPA
!
! Copyright of the original code rests with the authors inside the ELPA
! consortium. The copyright of any additional modifications shall rest
! with their original authors, but shall adhere to the licensing terms
! distributed along with the original code in the file "COPYING".
#include "config-f90.h"
module ELPA_utilities
#ifdef HAVE_ISO_FORTRAN_ENV
use iso_fortran_env, only : error_unit
#endif
implicit none
PRIVATE ! By default, all routines contained are private
public :: debug_messages_via_environment_variable
#ifndef HAVE_ISO_FORTRAN_ENV
integer, parameter :: error_unit = 6
#endif
!******
contains
function debug_messages_via_environment_variable() result(isSet)
#ifdef HAVE_DETAILED_TIMINGS
use timings
#endif
implicit none
logical :: isSet
CHARACTER(len=255) :: ELPA_DEBUG_MESSAGES
#ifdef HAVE_DETAILED_TIMINGS
call timer%start("debug_messages_via_environment_variable")
#endif
isSet = .false.
#if defined(HAVE_ENVIRONMENT_CHECKING)
call get_environment_variable("ELPA_DEBUG_MESSAGES",ELPA_DEBUG_MESSAGES)
#endif
if (trim(ELPA_DEBUG_MESSAGES) .eq. "yes") then
isSet = .true.
endif
if (trim(ELPA_DEBUG_MESSAGES) .eq. "no") then
isSet = .true.
endif
#ifdef HAVE_DETAILED_TIMINGS
call timer%stop("debug_messages_via_environment_variable")
#endif
end function debug_messages_via_environment_variable
!-------------------------------------------------------------------------------
end module ELPA_utilities
! This file is part of ELPA.
!
! The ELPA library was originally created by the ELPA consortium,
! The ELPA library was originally created by the ELPA consortium,
! consisting of the following organizations:
!
! - Rechenzentrum Garching der Max-Planck-Gesellschaft (RZG),
! - Rechenzentrum Garching der Max-Planck-Gesellschaft (RZG),
! - Bergische Universität Wuppertal, Lehrstuhl für angewandte
! Informatik,
! - Technische Universität München, Lehrstuhl für Informatik mit
! Schwerpunkt Wissenschaftliches Rechnen ,
! - Fritz-Haber-Institut, Berlin, Abt. Theorie,
! - Max-Plack-Institut für Mathematik in den Naturwissenschaftrn,
! Leipzig, Abt. Komplexe Strukutren in Biologie und Kognition,
! and
! Schwerpunkt Wissenschaftliches Rechnen ,
! - Fritz-Haber-Institut, Berlin, Abt. Theorie,
! - Max-Plack-Institut für Mathematik in den Naturwissenschaftrn,
! Leipzig, Abt. Komplexe Strukutren in Biologie und Kognition,
! and
! - IBM Deutschland GmbH
!
!
......@@ -19,8 +19,8 @@
! http://elpa.rzg.mpg.de/
!
! ELPA is free software: you can redistribute it and/or modify
! it under the terms of the version 3 of the license of the
! GNU Lesser General Public License as published by the Free
! it under the terms of the version 3 of the license of the
! GNU Lesser General Public License as published by the Free
! Software Foundation.
!
! ELPA is distributed in the hope that it will be useful,
......@@ -40,7 +40,7 @@
!
!
! ELPA1 -- Faster replacements for ScaLAPACK symmetric eigenvalue routines
!
!
! Copyright of the original code rests with the authors inside the ELPA
! consortium. The copyright of any additional modifications shall rest
! with their original authors, but shall adhere to the licensing terms
......@@ -49,7 +49,7 @@
! ELPA2 -- 2-stage solver for ELPA
!
!
! Copyright of the original code rests with the authors inside the ELPA
! consortium. The copyright of any additional modifications shall rest
! with their original authors, but shall adhere to the licensing terms
......@@ -61,6 +61,8 @@ program print_available_elpa2_kernels
use ELPA1
use ELPA2
use elpa2_utilities
implicit none
integer :: i
......
......@@ -79,6 +79,8 @@ program test_complex2
use ELPA1
use ELPA2
use elpa2_utilities
#ifdef WITH_OPENMP
use test_util
#endif
......
......@@ -79,6 +79,8 @@ program test_complex2
use ELPA1
use ELPA2
use elpa2_utilities
#ifdef WITH_OPENMP
use test_util
#endif
......
......@@ -80,6 +80,8 @@ program test_real2
use ELPA1
use ELPA2
use elpa2_utilities
#ifdef WITH_OPENMP
use test_util
#endif
......
......@@ -80,6 +80,8 @@ program test_real2
use ELPA1
use ELPA2
use elpa2_utilities
#ifdef WITH_OPENMP
use test_util
#endif
......
......@@ -81,6 +81,8 @@ program test_real2
use ELPA1
use ELPA2
use elpa2_utilities
#ifdef WITH_OPENMP
use test_util
#endif
......@@ -143,9 +145,9 @@ program test_real2
success = .true.
write_to_file = .false.
nblk = 16
na = 4000
nev = 1500
nblk = 2
na = 4000
nev = 1500
if (COMMAND_ARGUMENT_COUNT() == 3) then
call GET_COMMAND_ARGUMENT(1, arg1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment