Commit febc6cfd authored by Gregor Michalicek's avatar Gregor Michalicek

Some more cleanup in eig66 routines

parent edb402d8
......@@ -38,7 +38,7 @@ IMPLICIT NONE
CONTAINS
SUBROUTINE init_chase(mpi,dimension,atoms,kpts,noco,vacuum,l_real)
SUBROUTINE init_chase(mpi,dimension,atoms,kpts,noco,l_real)
USE m_types
USE m_types_mpi
......@@ -52,7 +52,6 @@ IMPLICIT NONE
TYPE(t_atoms), INTENT(IN) :: atoms
TYPE(t_kpts), INTENT(IN) :: kpts
TYPE(t_noco), INTENT(IN) :: noco
TYPE(t_vacuum), INTENT(IN) :: vacuum
LOGICAL, INTENT(IN) :: l_real
......@@ -62,9 +61,7 @@ IMPLICIT NONE
nevd = min(dimension%neigd,dimension%nvd+atoms%nlotot)
nexd = min(max(nevd/4, 45),dimension%nvd+atoms%nlotot-nevd) !dimensioning for workspace
chase_eig_id=open_eig(mpi%mpi_comm,DIMENSION%nbasfcn,nevd+nexd,kpts%nkpt,DIMENSION%jspd,atoms%lmaxd,&
atoms%nlod,atoms%ntype,atoms%nlotot,noco%l_noco,.TRUE.,l_real,noco%l_soc,.FALSE.,&
mpi%n_size,layers=vacuum%layers,nstars=vacuum%nstars,ncored=DIMENSION%nstd,&
nsld=atoms%nat,nat=atoms%nat)
atoms%nlod,atoms%ntype,atoms%nlotot,noco%l_noco,.TRUE.,l_real,noco%l_soc,.FALSE.,mpi%n_size)
END IF
END SUBROUTINE init_chase
......
......@@ -115,11 +115,8 @@ CONTAINS
!IF (mpi%irank.EQ.0) CALL openXMLElementFormPoly('iteration',(/'numberForCurrentRun','overallNumber '/),(/iter,v%iter/),&
! RESHAPE((/19,13,5,5/),(/2,2/)))
eig_id=open_eig(&
mpi%mpi_comm,DIMENSION%nbasfcn,DIMENSION%neigd,kpts%nkpt,DIMENSION%jspd,atoms%lmaxd,&
atoms%nlod,atoms%ntype,atoms%nlotot,noco%l_noco,.TRUE.,l_real,noco%l_soc,.FALSE.,&
mpi%n_size,layers=vacuum%layers,nstars=vacuum%nstars,ncored=DIMENSION%nstd,&
nsld=atoms%nat,nat=atoms%nat)
eig_id=open_eig(mpi%mpi_comm,DIMENSION%nbasfcn,DIMENSION%neigd,kpts%nkpt,DIMENSION%jspd,atoms%lmaxd,&
atoms%nlod,atoms%ntype,atoms%nlotot,noco%l_noco,.TRUE.,l_real,noco%l_soc,.FALSE.,mpi%n_size)
!---> set up and solve the eigenvalue problem
!---> loop over spins
......
MODULE m_calc_hybrid
USE m_judft
CONTAINS
SUBROUTINE calc_hybrid(hybrid,kpts,atoms,input,DIMENSION,mpi,noco,cell,vacuum,oneD,results,sym,xcpot,v,it )
SUBROUTINE calc_hybrid(hybrid,kpts,atoms,input,DIMENSION,mpi,noco,cell,oneD,results,sym,xcpot,v,it )
USE m_types
USE m_mixedbasis
USE m_coulombmatrix
......@@ -17,7 +17,6 @@ CONTAINS
TYPE(t_oneD),INTENT(IN) :: oneD
TYPE(t_hybrid),INTENT(INOUT) :: hybrid
TYPE(t_input),INTENT(IN) :: input
TYPE(t_vacuum),INTENT(IN) :: vacuum
TYPE(t_noco),INTENT(IN) :: noco
TYPE(t_results),INTENT(INOUT):: results
TYPE(t_sym),INTENT(IN) :: sym
......@@ -99,11 +98,8 @@ CONTAINS
CALL timestart("Preparation for Hybrid functionals")
CALL juDFT_WARN ("Hybrid functionals not working in this version")
eig_id=open_eig(&
mpi%mpi_comm,dimension%nbasfcn,dimension%neigd,kpts%nkpt,dimension%jspd,atoms%lmaxd,atoms%nlod,atoms%ntype,atoms%nlotot&
,noco%l_noco,.FALSE.,sym%invs.AND..NOT.noco%l_noco,noco%l_soc,.FALSE.,&
mpi%n_size,layers=vacuum%layers,nstars=vacuum%nstars,ncored=DIMENSION%nstd,&
nsld=atoms%nat,nat=atoms%nat)
eig_id=open_eig(mpi%mpi_comm,dimension%nbasfcn,dimension%neigd,kpts%nkpt,dimension%jspd,atoms%lmaxd,atoms%nlod,&
atoms%ntype,atoms%nlotot,noco%l_noco,.FALSE.,sym%invs.AND..NOT.noco%l_noco,noco%l_soc,.FALSE.,mpi%n_size)
!construct the mixed-basis
CALL timestart("generation of mixed basis")
......
......@@ -34,11 +34,10 @@ CONTAINS
END SELECT
END SUBROUTINE priv_find_data
SUBROUTINE open_eig(id,nmat,neig,nkpts,jspins,lmax,nlo,ntype,nlotot,create,l_real,l_soc,filename,layers,nstars,ncored,nsld,nat)
SUBROUTINE open_eig(id,nmat,neig,nkpts,jspins,lmax,nlo,ntype,nlotot,create,l_real,l_soc,filename)
INTEGER, INTENT(IN) :: id,nmat,neig,nkpts,jspins,nlo,ntype,lmax,nlotot
LOGICAL, INTENT(IN) :: create,l_real,l_soc
CHARACTER(LEN=*),INTENT(IN),OPTIONAL :: filename
INTEGER,INTENT(IN),OPTIONAL :: layers,nstars,ncored,nsld,nat
!locals
LOGICAL :: l_file
INTEGER :: i1,recl_z,recl_eig
......
......@@ -57,7 +57,7 @@ CONTAINS
END SELECT
END SUBROUTINE priv_find_data
!----------------------------------------------------------------------
SUBROUTINE open_eig(id,mpi_comm,nmat,neig,nkpts,jspins,lmax,nlo,ntype,create,l_real,l_soc,nlotot,readonly,filename,layers,nstars,ncored,nsld,nat)
SUBROUTINE open_eig(id,mpi_comm,nmat,neig,nkpts,jspins,lmax,nlo,ntype,create,l_real,l_soc,nlotot,readonly,filename)
!*****************************************************************
! opens hdf-file for eigenvectors+values
......@@ -68,7 +68,6 @@ CONTAINS
INTEGER, INTENT(IN) :: nmat,neig,nkpts,jspins,nlo,ntype,lmax,nlotot
LOGICAL, INTENT(IN) :: create,readonly,l_real,l_soc
CHARACTER(LEN=*),OPTIONAL :: filename
INTEGER,INTENT(IN),OPTIONAL :: layers,nstars,ncored,nsld,nat
#ifdef CPP_HDF
......
......@@ -16,8 +16,7 @@ MODULE m_eig66_io
CONTAINS
FUNCTION open_eig(mpi_comm,nmat,neig,nkpts,jspins,lmax,nlo,ntype,nlotot,&
l_noco,l_create,l_real,l_soc,l_readonly,n_size,mode_in,&
filename,layers,nstars,ncored,nsld,nat)&
l_noco,l_create,l_real,l_soc,l_readonly,n_size,mode_in,filename)&
RESULT(id)
USE m_eig66_hdf,ONLY:open_eig_hdf=>open_eig
USE m_eig66_DA ,ONLY:open_eig_DA=>open_eig
......@@ -28,7 +27,6 @@ CONTAINS
LOGICAL,INTENT(IN) :: l_noco,l_readonly,l_create,l_real,l_soc
INTEGER,INTENT(IN),OPTIONAL :: n_size,mode_in
CHARACTER(LEN=*),INTENT(IN),OPTIONAL :: filename
INTEGER,INTENT(IN),OPTIONAL :: layers,nstars,ncored,nsld,nat
INTEGER:: id,mode
INTEGER:: neig_local,isize,err
......@@ -72,13 +70,13 @@ CONTAINS
CALL timestart("Open file/memory for IO of eig66")
SELECT CASE (eig66_data_mode(id))
CASE (DA_mode)
CALL open_eig_DA(id,nmat,neig_local,nkpts,jspins,lmax,nlo,ntype,nlotot,l_create,l_real,l_soc,filename,layers,nstars,ncored,nsld,nat)
CALL open_eig_DA(id,nmat,neig_local,nkpts,jspins,lmax,nlo,ntype,nlotot,l_create,l_real,l_soc,filename)
CASE (hdf_mode)
CALL open_eig_HDF(id,mpi_comm,nmat,neig_local,nkpts,jspins,lmax,nlo,ntype,l_create,l_real,l_soc,nlotot,l_readonly,filename,layers,nstars,ncored,nsld,nat)
CALL open_eig_HDF(id,mpi_comm,nmat,neig_local,nkpts,jspins,lmax,nlo,ntype,l_create,l_real,l_soc,nlotot,l_readonly,filename)
CASE (mem_mode)
CALL open_eig_MEM(id,nmat,neig_local,nkpts,jspins,lmax,nlo,ntype,l_create,l_real,l_soc,nlotot,l_noco,filename,layers,nstars,ncored,nsld,nat)
CALL open_eig_MEM(id,nmat,neig_local,nkpts,jspins,lmax,nlo,ntype,l_create,l_real,l_soc,nlotot,l_noco,filename)
CASE (mpi_mode)
CALL open_eig_MPI(id,mpi_comm,nmat,neig_local,nkpts,jspins,lmax,nlo,ntype,l_create,l_real,l_soc,nlotot,l_noco,n_size,filename,layers,nstars,ncored,nsld,nat)
CALL open_eig_MPI(id,mpi_comm,nmat,neig_local,nkpts,jspins,lmax,nlo,ntype,l_create,l_real,l_soc,nlotot,l_noco,n_size,filename)
CASE DEFAULT
CALL juDFT_error("Invalid IO-mode in eig66_io")
END SELECT
......
......@@ -25,11 +25,10 @@ CONTAINS
END SELECT
END SUBROUTINE priv_find_data
SUBROUTINE open_eig(id,nmat,neig,nkpts,jspins,lmax,nlo,ntype,l_create,l_real,l_soc,nlotot,l_noco,filename,layers,nstars,ncored,nsld,nat)
SUBROUTINE open_eig(id,nmat,neig,nkpts,jspins,lmax,nlo,ntype,l_create,l_real,l_soc,nlotot,l_noco,filename)
INTEGER, INTENT(IN) :: id,nmat,neig,nkpts,jspins,nlo,ntype,lmax,nlotot
LOGICAL, INTENT(IN) :: l_noco,l_create,l_real,l_soc
CHARACTER(LEN=*),INTENT(IN),OPTIONAL :: filename
INTEGER,INTENT(IN),OPTIONAL :: layers,nstars,ncored,nsld,nat
!locals
INTEGER:: length
TYPE(t_data_mem),POINTER:: d
......
......@@ -25,14 +25,13 @@ CONTAINS
END SUBROUTINE priv_find_data
SUBROUTINE open_eig(id,mpi_comm,nmat,neig,nkpts,jspins,lmax,nlo,ntype,create,l_real,l_soc,nlotot,l_noco,n_size_opt,filename,layers,nstars,ncored,nsld,nat)
SUBROUTINE open_eig(id,mpi_comm,nmat,neig,nkpts,jspins,lmax,nlo,ntype,create,l_real,l_soc,nlotot,l_noco,n_size_opt,filename)
USE,INTRINSIC::iso_c_binding
IMPLICIT NONE
INTEGER, INTENT(IN) :: id,mpi_comm,nmat,neig,nkpts,jspins,nlo,ntype,lmax,nlotot
LOGICAL, INTENT(IN) :: l_noco,create,l_real,l_soc
INTEGER,INTENT(IN),OPTIONAL:: n_size_opt
CHARACTER(LEN=*),INTENT(IN),OPTIONAL :: filename
INTEGER,INTENT(IN),OPTIONAL :: layers,nstars,ncored,nsld,nat
#ifdef CPP_MPI
INTEGER:: isize,e,slot_size,local_slots
INTEGER,PARAMETER::mcored=27 !there should not be more that 27 core states
......
......@@ -135,7 +135,7 @@ CONTAINS
!-Wannier
#ifdef CPP_CHASE
CALL init_chase(mpi,dimension,atoms,kpts,noco,vacuum,sym%invs.AND..NOT.noco%l_noco)
CALL init_chase(mpi,dimension,atoms,kpts,noco,sym%invs.AND..NOT.noco%l_noco)
#endif
it = 0
......@@ -215,7 +215,7 @@ CONTAINS
SELECT TYPE(xcpot)
TYPE IS(t_xcpot_inbuild)
CALL calc_hybrid(hybrid,kpts,atoms,input,DIMENSION,mpi,noco,&
cell,vacuum,oneD,results,sym,xcpot,vTot,it)
cell,oneD,results,sym,xcpot,vTot,it)
END SELECT
ENDIF
!#endif
......
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