Skip to content

Commit

Permalink
merged origin into local branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Simkern committed Jun 19, 2024
2 parents e04f288 + dba53b9 commit 636eb8c
Show file tree
Hide file tree
Showing 12 changed files with 159 additions and 154 deletions.
4 changes: 2 additions & 2 deletions run_tests.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Gfortran.
python deployment.py

fpm test --compiler "gfortran" --flag "-O0 -g3 -fbacktrace -Wall -Wextra -fcheck=all -pedantic -Wconversion -fbounds-check -ffpe-trap=zero,overflow,underflow" --verbose
#fpm test --compiler "gfortran" --flag "-O3 -march=native -mtune=native"
fpm test --compiler "gfortran" --flag "-O0 -g3 -fbacktrace -Wall -Wextra -fcheck=all -pedantic -Wconversion -fbounds-check -ffpe-trap=zero,overflow" --verbose
fpm test --compiler "gfortran" --flag "-O3 -march=native -mtune=native"

# Ifort
#fpm test --compiler "ifort"
Expand Down
2 changes: 1 addition & 1 deletion src/AbstractVectors.f90
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module lightkrylov_AbstractVectors
implicit none
private

character*128, parameter :: this_module = 'Lightkrylov_AbstractVectors'
character(len=128), parameter :: this_module = 'Lightkrylov_AbstractVectors'

public :: innerprod
public :: linear_combination
Expand Down
2 changes: 1 addition & 1 deletion src/AbstractVectors.fypp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module lightkrylov_AbstractVectors
implicit none
private

character*128, parameter :: this_module = 'Lightkrylov_AbstractVectors'
character(len=128), parameter :: this_module = 'Lightkrylov_AbstractVectors'

public :: innerprod
public :: linear_combination
Expand Down
62 changes: 29 additions & 33 deletions src/BaseKrylov.f90
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module lightkrylov_BaseKrylov
implicit none
private

character*128, parameter :: this_module = 'LightKrylov_BaseKrylov'
character(len=128), parameter :: this_module = 'LightKrylov_BaseKrylov'

public :: qr
public :: apply_permutation_matrix
Expand Down Expand Up @@ -1127,7 +1127,7 @@ subroutine qr_no_pivoting_rsp(Q, R, info, verbosity, tol)
! Internal variables.
real(sp) :: alpha
real(sp) :: beta(size(Q))
integer :: idx, j, kdim, iwrk
integer :: j

! Deals with the optional args.
verbose = optval(verbosity, .false.)
Expand Down Expand Up @@ -1179,7 +1179,7 @@ subroutine qr_with_pivoting_rsp(Q, R, perm, info, verbosity, tol)

! Internal variables
real(sp) :: beta
integer :: idx, i, j, kdim, iwrk
integer :: idx, i, j, kdim
integer :: idxv(1)
real(sp) :: Rii(size(Q))

Expand Down Expand Up @@ -1332,7 +1332,7 @@ subroutine apply_permutation_matrix_array_rsp(Q, perm)
integer :: i
real(sp), allocatable :: Qwrk(:, :)

Qwrk = Q
allocate(Qwrk, source=Q)
do i = 1, size(perm)
Q(:, i) = Qwrk(:, perm(i))
enddo
Expand All @@ -1351,7 +1351,7 @@ subroutine apply_inverse_permutation_matrix_array_rsp(Q, perm)
integer :: inv_perm(size(perm))
real(sp), allocatable :: Qwrk(:, :)

Qwrk = Q ; inv_perm = 0
allocate(Qwrk, source=Q) ; inv_perm = 0

! Inverse permutation vector.
do i = 1, size(perm)
Expand Down Expand Up @@ -1384,7 +1384,7 @@ subroutine qr_no_pivoting_rdp(Q, R, info, verbosity, tol)
! Internal variables.
real(dp) :: alpha
real(dp) :: beta(size(Q))
integer :: idx, j, kdim, iwrk
integer :: j

! Deals with the optional args.
verbose = optval(verbosity, .false.)
Expand Down Expand Up @@ -1436,7 +1436,7 @@ subroutine qr_with_pivoting_rdp(Q, R, perm, info, verbosity, tol)

! Internal variables
real(dp) :: beta
integer :: idx, i, j, kdim, iwrk
integer :: idx, i, j, kdim
integer :: idxv(1)
real(dp) :: Rii(size(Q))

Expand Down Expand Up @@ -1589,7 +1589,7 @@ subroutine apply_permutation_matrix_array_rdp(Q, perm)
integer :: i
real(dp), allocatable :: Qwrk(:, :)

Qwrk = Q
allocate(Qwrk, source=Q)
do i = 1, size(perm)
Q(:, i) = Qwrk(:, perm(i))
enddo
Expand All @@ -1608,7 +1608,7 @@ subroutine apply_inverse_permutation_matrix_array_rdp(Q, perm)
integer :: inv_perm(size(perm))
real(dp), allocatable :: Qwrk(:, :)

Qwrk = Q ; inv_perm = 0
allocate(Qwrk, source=Q) ; inv_perm = 0

! Inverse permutation vector.
do i = 1, size(perm)
Expand Down Expand Up @@ -1641,7 +1641,7 @@ subroutine qr_no_pivoting_csp(Q, R, info, verbosity, tol)
! Internal variables.
complex(sp) :: alpha
complex(sp) :: beta(size(Q))
integer :: idx, j, kdim, iwrk
integer :: j

! Deals with the optional args.
verbose = optval(verbosity, .false.)
Expand Down Expand Up @@ -1693,7 +1693,7 @@ subroutine qr_with_pivoting_csp(Q, R, perm, info, verbosity, tol)

! Internal variables
complex(sp) :: beta
integer :: idx, i, j, kdim, iwrk
integer :: idx, i, j, kdim
integer :: idxv(1)
complex(sp) :: Rii(size(Q))

Expand Down Expand Up @@ -1846,7 +1846,7 @@ subroutine apply_permutation_matrix_array_csp(Q, perm)
integer :: i
complex(sp), allocatable :: Qwrk(:, :)

Qwrk = Q
allocate(Qwrk, source=Q)
do i = 1, size(perm)
Q(:, i) = Qwrk(:, perm(i))
enddo
Expand All @@ -1865,7 +1865,7 @@ subroutine apply_inverse_permutation_matrix_array_csp(Q, perm)
integer :: inv_perm(size(perm))
complex(sp), allocatable :: Qwrk(:, :)

Qwrk = Q ; inv_perm = 0
allocate(Qwrk, source=Q) ; inv_perm = 0

! Inverse permutation vector.
do i = 1, size(perm)
Expand Down Expand Up @@ -1898,7 +1898,7 @@ subroutine qr_no_pivoting_cdp(Q, R, info, verbosity, tol)
! Internal variables.
complex(dp) :: alpha
complex(dp) :: beta(size(Q))
integer :: idx, j, kdim, iwrk
integer :: j

! Deals with the optional args.
verbose = optval(verbosity, .false.)
Expand Down Expand Up @@ -1950,7 +1950,7 @@ subroutine qr_with_pivoting_cdp(Q, R, perm, info, verbosity, tol)

! Internal variables
complex(dp) :: beta
integer :: idx, i, j, kdim, iwrk
integer :: idx, i, j, kdim
integer :: idxv(1)
complex(dp) :: Rii(size(Q))

Expand Down Expand Up @@ -2103,7 +2103,7 @@ subroutine apply_permutation_matrix_array_cdp(Q, perm)
integer :: i
complex(dp), allocatable :: Qwrk(:, :)

Qwrk = Q
allocate(Qwrk, source=Q)
do i = 1, size(perm)
Q(:, i) = Qwrk(:, perm(i))
enddo
Expand All @@ -2122,7 +2122,7 @@ subroutine apply_inverse_permutation_matrix_array_cdp(Q, perm)
integer :: inv_perm(size(perm))
complex(dp), allocatable :: Qwrk(:, :)

Qwrk = Q ; inv_perm = 0
allocate(Qwrk, source=Q) ; inv_perm = 0

! Inverse permutation vector.
do i = 1, size(perm)
Expand Down Expand Up @@ -2527,7 +2527,7 @@ subroutine lanczos_bidiagonalization_rsp(A, U, V, B, info, kstart, kend, verbosi
logical :: verbose
real(sp) :: tolerance
real(sp) :: alpha, beta
integer :: i, j, k, kdim
integer :: k, kdim


info = 0
Expand Down Expand Up @@ -2611,7 +2611,7 @@ subroutine lanczos_bidiagonalization_rdp(A, U, V, B, info, kstart, kend, verbosi
logical :: verbose
real(dp) :: tolerance
real(dp) :: alpha, beta
integer :: i, j, k, kdim
integer :: k, kdim


info = 0
Expand Down Expand Up @@ -2695,7 +2695,7 @@ subroutine lanczos_bidiagonalization_csp(A, U, V, B, info, kstart, kend, verbosi
logical :: verbose
real(sp) :: tolerance
complex(sp) :: alpha, beta
integer :: i, j, k, kdim
integer :: k, kdim


info = 0
Expand Down Expand Up @@ -2779,7 +2779,7 @@ subroutine lanczos_bidiagonalization_cdp(A, U, V, B, info, kstart, kend, verbosi
logical :: verbose
real(dp) :: tolerance
complex(dp) :: alpha, beta
integer :: i, j, k, kdim
integer :: k, kdim


info = 0
Expand Down Expand Up @@ -2858,7 +2858,7 @@ subroutine lanczos_tridiagonalization_rsp(A, X, T, info, kstart, kend, verbosity
logical :: verbose
real(sp) :: tolerance
real(sp) :: beta
integer :: i, j, k, kdim
integer :: k, kdim

! Deal with optional args.
kdim = size(X) - 1
Expand Down Expand Up @@ -2897,7 +2897,6 @@ subroutine update_tridiag_matrix_rsp(T, X, k)
class(abstract_vector_rsp), intent(inout) :: X(:)

! Internal variables.
class(abstract_vector_rsp), allocatable :: wrk
integer :: i, info

info = 0
Expand Down Expand Up @@ -2929,7 +2928,7 @@ subroutine lanczos_tridiagonalization_rdp(A, X, T, info, kstart, kend, verbosity
logical :: verbose
real(dp) :: tolerance
real(dp) :: beta
integer :: i, j, k, kdim
integer :: k, kdim

! Deal with optional args.
kdim = size(X) - 1
Expand Down Expand Up @@ -2968,7 +2967,6 @@ subroutine update_tridiag_matrix_rdp(T, X, k)
class(abstract_vector_rdp), intent(inout) :: X(:)

! Internal variables.
class(abstract_vector_rdp), allocatable :: wrk
integer :: i, info

info = 0
Expand Down Expand Up @@ -3000,7 +2998,7 @@ subroutine lanczos_tridiagonalization_csp(A, X, T, info, kstart, kend, verbosity
logical :: verbose
real(sp) :: tolerance
real(sp) :: beta
integer :: i, j, k, kdim
integer :: k, kdim

! Deal with optional args.
kdim = size(X) - 1
Expand Down Expand Up @@ -3039,7 +3037,6 @@ subroutine update_tridiag_matrix_csp(T, X, k)
class(abstract_vector_csp), intent(inout) :: X(:)

! Internal variables.
class(abstract_vector_csp), allocatable :: wrk
integer :: i, info

info = 0
Expand Down Expand Up @@ -3071,7 +3068,7 @@ subroutine lanczos_tridiagonalization_cdp(A, X, T, info, kstart, kend, verbosity
logical :: verbose
real(dp) :: tolerance
real(dp) :: beta
integer :: i, j, k, kdim
integer :: k, kdim

! Deal with optional args.
kdim = size(X) - 1
Expand Down Expand Up @@ -3110,7 +3107,6 @@ subroutine update_tridiag_matrix_cdp(T, X, k)
class(abstract_vector_cdp), intent(inout) :: X(:)

! Internal variables.
class(abstract_vector_cdp), allocatable :: wrk
integer :: i, info

info = 0
Expand Down Expand Up @@ -3147,7 +3143,7 @@ subroutine krylov_schur_rsp(n, X, H, select_eigs)
!----- Internal variables -----
!--------------------------------------

integer :: i, j, kdim
integer :: i, kdim

! Schur-related.
real(sp) :: Z(size(H, 2), size(H, 2))
Expand Down Expand Up @@ -3211,7 +3207,7 @@ subroutine krylov_schur_rdp(n, X, H, select_eigs)
!----- Internal variables -----
!--------------------------------------

integer :: i, j, kdim
integer :: i, kdim

! Schur-related.
real(dp) :: Z(size(H, 2), size(H, 2))
Expand Down Expand Up @@ -3275,7 +3271,7 @@ subroutine krylov_schur_csp(n, X, H, select_eigs)
!----- Internal variables -----
!--------------------------------------

integer :: i, j, kdim
integer :: i, kdim

! Schur-related.
complex(sp) :: Z(size(H, 2), size(H, 2))
Expand Down Expand Up @@ -3339,7 +3335,7 @@ subroutine krylov_schur_cdp(n, X, H, select_eigs)
!----- Internal variables -----
!--------------------------------------

integer :: i, j, kdim
integer :: i, kdim

! Schur-related.
complex(dp) :: Z(size(H, 2), size(H, 2))
Expand Down
Loading

0 comments on commit 636eb8c

Please sign in to comment.