Commit e4868860 authored by Ben Hourahine's avatar Ben Hourahine Committed by Yingzhou Li

Updated all integer and real types to be consistent, i.e., integer(i4) and real(r8)

parent a6fd1e54
Pipeline #1695 passed with stage
in 4 minutes and 26 seconds
......@@ -60,15 +60,15 @@ contains
type(rci_handle), intent(in) :: r_h
!**** OUTPUT **********************************!
integer, intent(out) :: task
integer(i4), intent(out) :: task
!**** INOUT ***********************************!
integer, intent(inout) :: ijob ! job id
integer(i4), intent(inout) :: ijob ! job id
type(rci_instr), intent(inout) :: iS
!**** LOCAL ***********************************!
integer, save :: iter ! step num.
integer, save :: m, n ! size of the wave functions.
integer(i4), save :: iter ! step num.
integer(i4), save :: m, n ! size of the wave functions.
if (ijob <= SID_ALLOCATE) then
ijob = SID_ALLOCATE + 1
......@@ -111,14 +111,14 @@ contains
type(rci_handle), intent(in) :: r_h
!**** OUTPUT **********************************!
integer, intent(out) :: task
integer(i4), intent(out) :: task
!**** INOUT ***********************************!
integer, intent(inout) :: ijob ! job id
integer(i4), intent(inout) :: ijob ! job id
type(rci_instr), intent(inout) :: iS
!**** LOCAL ***********************************!
integer, save :: iter ! step num.
integer(i4), save :: iter ! step num.
if (ijob <= SID_DEALLOCATE) then
ijob = SID_DEALLOCATE + 1
......@@ -158,24 +158,24 @@ contains
!**** INPUT ***********************************!
!**** OUTPUT **********************************!
integer, intent(out) :: task
integer(i4), intent(out) :: task
!**** INOUT ***********************************!
type(rci_handle), intent(inout) :: r_h
integer, intent(inout) :: ijob ! job id
integer(i4), intent(inout) :: ijob ! job id
real(r8), intent(inout) :: resvec(:)
type(rci_instr), intent(inout) :: iS
!**** LOCAL ***********************************!
integer :: it, iti
integer, save :: m ! size of basis
integer, save :: n ! number of current states
integer, save :: nact ! number of active states
integer, save :: n_state ! number of wanted states
integer, save :: niter ! iteration num.
integer, save :: ninneriter ! inner iteration num.
integer, save :: max_iter ! max number of iterations
integer, save :: max_inneriter ! max number of inner iterations
integer(i4) :: it, iti
integer(i4), save :: m ! size of basis
integer(i4), save :: n ! number of current states
integer(i4), save :: nact ! number of active states
integer(i4), save :: n_state ! number of wanted states
integer(i4), save :: niter ! iteration num.
integer(i4), save :: ninneriter ! inner iteration num.
integer(i4), save :: max_iter ! max number of iterations
integer(i4), save :: max_inneriter ! max number of inner iterations
real(r8), save :: tol_iter ! convergence tolerance
real(r8), save :: c ! center of spectrum
......
......@@ -63,15 +63,15 @@ contains
type(rci_handle), intent(in) :: r_h
!**** OUTPUT **********************************!
integer, intent(out) :: task
integer(i4), intent(out) :: task
!**** INOUT ***********************************!
integer, intent(inout) :: ijob ! job id
integer(i4), intent(inout) :: ijob ! job id
type(rci_instr), intent(inout) :: iS
!**** LOCAL ***********************************!
integer, save :: iter ! step num.
integer, save :: m, n ! size of the wave functions.
integer(i4), save :: iter ! step num.
integer(i4), save :: m, n ! size of the wave functions.
if (ijob <= SID_ALLOCATE) then
ijob = SID_ALLOCATE + 1
......@@ -118,14 +118,14 @@ contains
type(rci_handle), intent(in) :: r_h
!**** OUTPUT **********************************!
integer, intent(out) :: task
integer(i4), intent(out) :: task
!**** INOUT ***********************************!
integer, intent(inout) :: ijob ! job id
integer(i4), intent(inout) :: ijob ! job id
type(rci_instr), intent(inout) :: iS
!**** LOCAL ***********************************!
integer, save :: iter ! step num.
integer(i4), save :: iter ! step num.
if (ijob <= SID_DEALLOCATE) then
ijob = SID_DEALLOCATE + 1
......@@ -169,24 +169,24 @@ contains
!**** INPUT ***********************************!
!**** OUTPUT **********************************!
integer, intent(out) :: task
integer(i4), intent(out) :: task
!**** INOUT ***********************************!
type(rci_handle), intent(inout) :: r_h
integer, intent(inout) :: ijob ! job id
integer(i4), intent(inout) :: ijob ! job id
real(r8), intent(inout) :: resvec(:)
type(rci_instr), intent(inout) :: iS
!**** LOCAL ***********************************!
integer :: it, iti
integer, save :: m ! size of basis
integer, save :: n ! number of current states
integer, save :: n_state ! number of wanted states
integer, save :: n_restart ! number of restarted states
integer, save :: next ! number of extended states
integer, save :: niter ! iteration num.
integer, save :: max_iter ! max number of iterations
integer, save :: max_n ! max number of basis in reduced space
integer(i4) :: it, iti
integer(i4), save :: m ! size of basis
integer(i4), save :: n ! number of current states
integer(i4), save :: n_state ! number of wanted states
integer(i4), save :: n_restart ! number of restarted states
integer(i4), save :: next ! number of extended states
integer(i4), save :: niter ! iteration num.
integer(i4), save :: max_iter ! max number of iterations
integer(i4), save :: max_n ! max number of basis in reduced space
real(r8), save :: tol_iter ! convergence tolerance
......
......@@ -71,15 +71,15 @@ contains
type(rci_handle), intent(in) :: r_h
!**** OUTPUT **********************************!
integer, intent(out) :: task
integer(i4), intent(out) :: task
!**** INOUT ***********************************!
integer, intent(inout) :: ijob ! job id
integer(i4), intent(inout) :: ijob ! job id
type(rci_instr), intent(inout) :: iS
!**** LOCAL ***********************************!
integer, save :: iter ! CG step num.
integer, save :: m, n ! size of the wave functions.
integer(i4), save :: iter ! CG step num.
integer(i4), save :: m, n ! size of the wave functions.
if (ijob <= SID_ALLOCATE) then
ijob = SID_ALLOCATE + 1
......@@ -126,14 +126,14 @@ contains
type(rci_handle), intent(in) :: r_h
!**** OUTPUT **********************************!
integer, intent(out) :: task
integer(i4), intent(out) :: task
!**** INOUT ***********************************!
integer, intent(inout) :: ijob ! job id
integer(i4), intent(inout) :: ijob ! job id
type(rci_instr), intent(inout) :: iS
!**** LOCAL ***********************************!
integer, save :: iter ! CG step num.
integer(i4), save :: iter ! CG step num.
if (ijob <= SID_DEALLOCATE) then
ijob = SID_DEALLOCATE + 1
......@@ -175,25 +175,25 @@ contains
implicit none
!**** OUTPUT **********************************!
integer, intent(out) :: task
integer(i4), intent(out) :: task
!**** INOUT ***********************************!
type(rci_handle), intent(inout) :: r_h
integer, intent(inout) :: ijob ! job id
integer(i4), intent(inout) :: ijob ! job id
type(rci_instr), intent(inout) :: iS
real(r8), intent(inout) :: resvec(:)
!**** LOCAL ***********************************!
integer, save :: m ! size of basis
integer, save :: n ! number of occupied states
integer, save :: max_iter
integer, save :: max_n ! max number of columns
integer(i4), save :: m ! size of basis
integer(i4), save :: n ! number of occupied states
integer(i4), save :: max_iter
integer(i4), save :: max_n ! max number of columns
real(r8), save :: tol_iter ! convergence tolerance of CG
logical, save :: ls_conv ! line search converged?
logical, save :: ls_fail ! line search failed?
integer, save :: icg ! CG step num.
integer(i4), save :: icg ! CG step num.
real(r8), save :: est_ub ! estimated upper bound of spectrum
real(r8), save :: lambda ! CG step size
......
......@@ -72,15 +72,15 @@ contains
type(rci_handle), intent(in) :: r_h
!**** OUTPUT **********************************!
integer, intent(out) :: task
integer(i4), intent(out) :: task
!**** INOUT ***********************************!
integer, intent(inout) :: ijob ! job id
integer(i4), intent(inout) :: ijob ! job id
type(rci_instr), intent(inout) :: iS
!**** LOCAL ***********************************!
integer, save :: iter ! step num.
integer, save :: m, n ! size of the wave functions.
integer(i4), save :: iter ! step num.
integer(i4), save :: m, n ! size of the wave functions.
if (ijob <= SID_ALLOCATE) then
ijob = SID_ALLOCATE + 1
......@@ -127,14 +127,14 @@ contains
type(rci_handle), intent(in) :: r_h
!**** OUTPUT **********************************!
integer, intent(out) :: task
integer(i4), intent(out) :: task
!**** INOUT ***********************************!
integer, intent(inout) :: ijob ! job id
integer(i4), intent(inout) :: ijob ! job id
type(rci_instr), intent(inout) :: iS
!**** LOCAL ***********************************!
integer, save :: iter ! step num.
integer(i4), save :: iter ! step num.
if (ijob <= SID_DEALLOCATE) then
ijob = SID_DEALLOCATE + 1
......@@ -178,29 +178,29 @@ contains
!**** INPUT ***********************************!
!**** OUTPUT **********************************!
integer, intent(out) :: task
integer(i4), intent(out) :: task
!**** INOUT ***********************************!
type(rci_handle), intent(inout) :: r_h
integer, intent(inout) :: ijob ! job id
integer(i4), intent(inout) :: ijob ! job id
real(r8), intent(inout) :: resvec(:)
type(rci_instr), intent(inout) :: iS
!**** LOCAL ***********************************!
integer :: it, iti
integer, save :: m ! size of basis
integer, save :: n ! number of current states
integer, save :: max_n ! max number of columns
integer, save :: iter ! iteration num.
integer, save :: iter_diag ! iteration num.
integer, save :: max_iter ! max number of iterations
integer, save :: rrstep ! iteration number gap between RR step
integer, save :: sbsize ! size of the sequential diag block
integer, save :: sbsize_last ! size of the last block
integer, save :: lsize ! local size of the block
integer, save :: lsize3 ! size of combined block
integer, save :: nsb ! number of the blocks
integer, save :: nact ! number of active columns
integer(i4) :: it, iti
integer(i4), save :: m ! size of basis
integer(i4), save :: n ! number of current states
integer(i4), save :: max_n ! max number of columns
integer(i4), save :: iter ! iteration num.
integer(i4), save :: iter_diag ! iteration num.
integer(i4), save :: max_iter ! max number of iterations
integer(i4), save :: rrstep ! iteration number gap between RR step
integer(i4), save :: sbsize ! size of the sequential diag block
integer(i4), save :: sbsize_last ! size of the last block
integer(i4), save :: lsize ! local size of the block
integer(i4), save :: lsize3 ! size of combined block
integer(i4), save :: nsb ! number of the blocks
integer(i4), save :: nact ! number of active columns
real(r8), save :: tol_iter ! convergence tolerance
real(r8), save :: tol_lock ! locking tolerance
......@@ -211,7 +211,7 @@ contains
logical, save :: ovlp_is_unit ! ovlp is unit flag
logical, save :: conv_flag = .false. ! indicator for convergence
integer, save, allocatable :: act_idx(:)
integer(i4), save, allocatable :: act_idx(:)
!**********************************************!
......
......@@ -53,18 +53,18 @@ module ELSI_RCI_DATATYPE
! A, B, C: General matrices
type, public :: rci_instr
character :: jobz, uplo ! job char; and upper or lower
character :: side ! left or right side
character :: trH, trS, trP, trA, trB ! Operation for H, S, P, A, B
character :: jobz, uplo ! job char; and upper or lower
character :: side ! left or right side
character :: trH, trS, trP, trA, trB ! Operation for H, S, P, A, B
integer :: m, n ! size of the output matrix
integer :: k ! size of the intermediate multiplication
integer :: lda, ldb, ldc ! leading size for matrix A, B and C
integer(i4) :: m, n ! size of the output matrix
integer(i4) :: k ! size of the intermediate multiplication
integer(i4) :: lda, ldb, ldc ! leading size for matrix A, B and C
integer :: rAoff,cAoff ! row and column offset of A
integer :: rBoff,cBoff ! row and column offset of B
integer(i4) :: rAoff,cAoff ! row and column offset of A
integer(i4) :: rBoff,cBoff ! row and column offset of B
integer :: Aidx, Bidx, Cidx ! indices for matrix A, B and C
integer(i4) :: Aidx, Bidx, Cidx ! indices for matrix A, B and C
real(r8) :: alpha, beta ! coefficients
......
......@@ -31,10 +31,10 @@ contains
type(rci_handle), intent(in) :: r_h
!**** OUTPUT **********************************!
integer, intent(out) :: task
integer(i4), intent(out) :: task
!**** INOUT ***********************************!
integer, intent(inout) :: ijob ! job id
integer(i4), intent(inout) :: ijob ! job id
type(rci_instr), intent(inout) :: iS
select case (r_h%solver)
......@@ -58,10 +58,10 @@ contains
type(rci_handle), intent(in) :: r_h
!**** OUTPUT **********************************!
integer, intent(out) :: task
integer(i4), intent(out) :: task
!**** INOUT ***********************************!
integer, intent(inout) :: ijob ! job id
integer(i4), intent(inout) :: ijob ! job id
type(rci_instr), intent(inout) :: iS
select case (r_h%solver)
......@@ -84,11 +84,11 @@ contains
!**** INPUT ***********************************!
!**** OUTPUT **********************************!
integer, intent(out) :: task
integer(i4), intent(out) :: task
!**** INOUT ***********************************!
type(rci_handle), intent(inout) :: r_h
integer, intent(inout) :: ijob ! job id
integer(i4), intent(inout) :: ijob ! job id
real(r8), intent(inout) :: resvec(:)
type(rci_instr), intent(inout) :: iS
......
......@@ -116,7 +116,7 @@ contains
implicit none
!**** OUTPUT ***********************************!
integer(kind=i4), intent(out) :: task
integer(i4), intent(out) :: task
task = RCI_STOP
......@@ -133,7 +133,7 @@ contains
logical, intent(in) :: conv_flag ! convergence flag
!**** OUTPUT ***********************************!
integer(kind=i4), intent(out) :: task
integer(i4), intent(out) :: task
if (conv_flag) then
task = RCI_CONVERGE
......@@ -151,13 +151,13 @@ contains
implicit none
!**** INPUT ***********************************!
integer, intent(in) :: m ! height of A
integer, intent(in) :: n ! width of A
integer, intent(in) :: Aidx ! indices for matrix A
integer(i4), intent(in) :: m ! height of A
integer(i4), intent(in) :: n ! width of A
integer(i4), intent(in) :: Aidx ! indices for matrix A
!**** OUTPUT ***********************************!
type(rci_instr), intent(out) :: iS
integer(kind=i4), intent(out) :: task
type(rci_instr), intent(out) :: iS
integer(i4), intent(out) :: task
task = RCI_ALLOCATE
iS%Aidx = Aidx
......@@ -174,11 +174,11 @@ contains
implicit none
!**** INPUT ***********************************!
integer, intent(in) :: Aidx ! indices for matrix A
integer(i4), intent(in) :: Aidx ! indices for matrix A
!**** OUTPUT ***********************************!
type(rci_instr), intent(out) :: iS
integer(kind=i4), intent(out) :: task
type(rci_instr), intent(out) :: iS
integer(i4), intent(out) :: task
task = RCI_DEALLOCATE
iS%Aidx = Aidx
......@@ -196,13 +196,13 @@ contains
!**** INPUT ***********************************!
character, intent(in) :: trH ! transpose of H
integer, intent(in) :: m ! height of B
integer, intent(in) :: n ! width of B
integer, intent(in) :: Aidx, Bidx ! indices for matrix A and B
integer(i4), intent(in) :: m ! height of B
integer(i4), intent(in) :: n ! width of B
integer(i4), intent(in) :: Aidx, Bidx ! indices for matrix A and B
!**** OUTPUT ***********************************!
type(rci_instr), intent(out) :: iS
integer(kind=i4), intent(out) :: task
type(rci_instr), intent(out) :: iS
integer(i4), intent(out) :: task
task = RCI_H_MULTI
iS%TrH = trH
......@@ -224,13 +224,13 @@ contains
!**** INPUT ***********************************!
character, intent(in) :: trS ! transpose of S
integer, intent(in) :: m ! height of B
integer, intent(in) :: n ! width of B
integer, intent(in) :: Aidx, Bidx ! indices for matrix A and B
integer(i4), intent(in) :: m ! height of B
integer(i4), intent(in) :: n ! width of B
integer(i4), intent(in) :: Aidx, Bidx ! indices for matrix A and B
!**** OUTPUT ***********************************!
type(rci_instr), intent(out) :: iS
integer(kind=i4), intent(out) :: task
type(rci_instr), intent(out) :: iS
integer(i4), intent(out) :: task
task = RCI_S_MULTI
iS%TrS = trS
......@@ -252,13 +252,13 @@ contains
!**** INPUT ***********************************!
character, intent(in) :: trP ! transpose of P
integer, intent(in) :: m ! height of B
integer, intent(in) :: n ! width of B
integer, intent(in) :: Aidx, Bidx ! indices for matrix A and B
integer(i4), intent(in) :: m ! height of B
integer(i4), intent(in) :: n ! width of B
integer(i4), intent(in) :: Aidx, Bidx ! indices for matrix A and B
!**** OUTPUT ***********************************!
type(rci_instr), intent(out) :: iS
integer(kind=i4), intent(out) :: task
type(rci_instr), intent(out) :: iS
integer(i4), intent(out) :: task
task = RCI_P_MULTI
iS%TrP = trP
......@@ -278,11 +278,11 @@ contains
!**** INPUT ***********************************!
character, intent(in) :: trA ! transpose of A
integer, intent(in) :: Aidx, Bidx ! indices for matrix A and B
integer(i4), intent(in) :: Aidx, Bidx ! indices for matrix A and B
!**** OUTPUT ***********************************!
type(rci_instr), intent(out) :: iS
integer(kind=i4), intent(out) :: task
type(rci_instr), intent(out) :: iS
integer(i4), intent(out) :: task
task = RCI_COPY
iS%trA = trA
......@@ -300,15 +300,15 @@ contains
implicit none
!**** INPUT ***********************************!
integer, intent(in) :: Aidx, Bidx ! indices for matrix A and B
integer, intent(in) :: lda, ldb ! lda for matrix A and B
integer, intent(in) :: m, n ! size of the submatrix
integer, intent(in) :: rAoff, cAoff ! offsets of A
integer, intent(in) :: rBoff, cBoff ! offsets of B
integer(i4), intent(in) :: Aidx, Bidx ! indices for matrix A and B
integer(i4), intent(in) :: lda, ldb ! lda for matrix A and B
integer(i4), intent(in) :: m, n ! size of the submatrix
integer(i4), intent(in) :: rAoff, cAoff ! offsets of A
integer(i4), intent(in) :: rBoff, cBoff ! offsets of B
!**** OUTPUT ***********************************!
type(rci_instr), intent(out) :: iS
integer(kind=i4), intent(out) :: task
type(rci_instr), intent(out) :: iS
integer(i4), intent(out) :: task
task = RCI_SUBCOPY
iS%m = m
......@@ -332,13 +332,13 @@ contains
implicit none
!**** INPUT ***********************************!
integer, intent(in) :: m ! height of B
integer, intent(in) :: n ! width of B
integer, intent(in) :: Aidx, Bidx ! indices for matrix A and B
integer(i4), intent(in) :: m ! height of B
integer(i4), intent(in) :: n ! width of B
integer(i4), intent(in) :: Aidx, Bidx ! indices for matrix A and B
!**** OUTPUT ***********************************!
type(rci_instr), intent(out) :: iS
integer(kind=i4), intent(out) :: task
type(rci_instr), intent(out) :: iS
integer(i4), intent(out) :: task
task = RCI_SUBCOL
iS%m = m
......@@ -356,13 +356,13 @@ contains
implicit none
!**** INPUT ***********************************!
integer, intent(in) :: m ! height of B
integer, intent(in) :: n ! width of B
integer, intent(in) :: Aidx, Bidx ! indices for matrix A and B
integer(i4), intent(in) :: m ! height of B
integer(i4), intent(in) :: n ! width of B
integer(i4), intent(in) :: Aidx, Bidx ! indices for matrix A and B
!**** OUTPUT ***********************************!
type(rci_instr), intent(out) :: iS
integer(kind=i4), intent(out) :: task
type(rci_instr), intent(out) :: iS
integer(i4), intent(out) :: task
task = RCI_SUBROW
iS%m = m
......@@ -380,13 +380,13 @@ contains
implicit none
!**** INPUT ***********************************!
integer, intent(in) :: n ! height of A
integer, intent(in) :: Aidx ! indices for matrix A
integer, intent(in) :: lda
integer(i4), intent(in) :: n ! height of A
integer(i4), intent(in) :: Aidx ! indices for matrix A
integer(i4), intent(in) :: lda
!**** OUTPUT ***********************************!
type(rci_instr), intent(out) :: iS
integer(kind=i4), intent(out) :: task
type(rci_instr), intent(out) :: iS
integer(i4), intent(out) :: task
task = RCI_TRACE
iS%n = n
......@@ -403,14 +403,14 @@ contains
implicit none
!**** INPUT ***********************************!
integer, intent(in) :: m ! height of A
integer, intent(in) :: n ! width of A
integer, intent(in) :: Aidx, Bidx ! indices for matrix A and B
integer, intent(in) :: lda, ldb ! lda for matrix A and B
integer(i4), intent(in) :: m ! height of A
integer(i4), intent(in) :: n ! width of A
integer(i4), intent(in) :: Aidx, Bidx ! indices for matrix A and B
integer(i4), intent(in) :: lda, ldb ! lda for matrix A and B
!**** OUTPUT ***********************************!