Commit febc6cfd authored by Gregor Michalicek's avatar Gregor Michalicek

Some more cleanup in eig66 routines

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