Commit 459809f8 authored by Matthias Redies's avatar Matthias Redies

Merge branch 'develop' into MetaGGA

parents 749abd62 0afb6b19
...@@ -9,7 +9,7 @@ stages: ...@@ -9,7 +9,7 @@ stages:
- test-intel - test-intel
build-gfortran: build-gfortran-hdf5:
image: iffregistry.fz-juelich.de/fleur/fleur:latest image: iffregistry.fz-juelich.de/fleur/fleur:latest
stage: build stage: build
cache: cache:
...@@ -22,7 +22,7 @@ build-gfortran: ...@@ -22,7 +22,7 @@ build-gfortran:
# - triggers # - triggers
# - web # - web
test-gfortran: test-gfortran-hdf5:
image: iffregistry.fz-juelich.de/fleur/fleur:latest image: iffregistry.fz-juelich.de/fleur/fleur:latest
stage: test stage: test
cache: cache:
...@@ -148,4 +148,4 @@ gfortran-coverage: ...@@ -148,4 +148,4 @@ gfortran-coverage:
url: https://fleur.iffgit.fz-juelich.de/fleur/coverage_html url: https://fleur.iffgit.fz-juelich.de/fleur/coverage_html
only: only:
- web - web
- schedules - schedules
\ No newline at end of file
...@@ -536,6 +536,7 @@ input%preconditioning_param = evaluateFirstOnly(xmlGetAttributeValue('/fleurInpu ...@@ -536,6 +536,7 @@ input%preconditioning_param = evaluateFirstOnly(xmlGetAttributeValue('/fleurInpu
noco%l_ss = evaluateFirstBoolOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@l_ss')) noco%l_ss = evaluateFirstBoolOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@l_ss'))
noco%l_mperp = evaluateFirstBoolOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@l_mperp')) noco%l_mperp = evaluateFirstBoolOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@l_mperp'))
noco%l_constr = evaluateFirstBoolOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@l_constr')) noco%l_constr = evaluateFirstBoolOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@l_constr'))
noco%l_mtNocoPot = evaluateFirstBoolOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@l_mtNocoPot'))
noco%mix_b = evaluateFirstOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@mix_b')) noco%mix_b = evaluateFirstOnly(xmlGetAttributeValue(TRIM(ADJUSTL(xPathA))//'/@mix_b'))
......
...@@ -86,6 +86,7 @@ ...@@ -86,6 +86,7 @@
<xsd:attribute name="mix_b" type="xsd:string"/> <xsd:attribute name="mix_b" type="xsd:string"/>
<xsd:attribute default="0.0" name="thetaJ" type="xsd:string" use="optional"/> <xsd:attribute default="0.0" name="thetaJ" type="xsd:string" use="optional"/>
<xsd:attribute default="0" name="nsh" type="xsd:nonNegativeInteger" use="optional"/> <xsd:attribute default="0" name="nsh" type="xsd:nonNegativeInteger" use="optional"/>
<xsd:attribute default="F" name="l_mtNocoPot" type="FleurBool" use="optional"/>
</xsd:complexType> </xsd:complexType>
<xsd:complexType name="OneDParamType"> <xsd:complexType name="OneDParamType">
......
...@@ -160,6 +160,8 @@ ...@@ -160,6 +160,8 @@
banddos%e_mcd_up = 0.0 banddos%e_mcd_up = 0.0
banddos%unfoldband = .FALSE. banddos%unfoldband = .FALSE.
noco%l_mtNocoPot = .FALSE.
IF (input%l_inpXML) THEN IF (input%l_inpXML) THEN
ALLOCATE(noel(1)) ALLOCATE(noel(1))
IF (mpi%irank.EQ.0) THEN IF (mpi%irank.EQ.0) THEN
......
...@@ -76,7 +76,7 @@ CONTAINS ...@@ -76,7 +76,7 @@ CONTAINS
l(21)=input%pallst ; l(22)=sliceplot%slice ; l(23)=noco%l_soc ; l(24)=vacuum%starcoeff l(21)=input%pallst ; l(22)=sliceplot%slice ; l(23)=noco%l_soc ; l(24)=vacuum%starcoeff
l(25)=noco%l_noco ; l(26)=noco%l_ss; l(27)=noco%l_mperp; l(28)=noco%l_constr l(25)=noco%l_noco ; l(26)=noco%l_ss; l(27)=noco%l_mperp; l(28)=noco%l_constr
l(29)=oneD%odd%d1 ; l(32)=input%ctail ; l(33)=banddos%l_orb l(29)=oneD%odd%d1 ; l(32)=input%ctail ; l(33)=banddos%l_orb
l(34)=banddos%l_mcd ; l(35)=banddos%unfoldband l(34)=banddos%l_mcd ; l(35)=banddos%unfoldband ; l(36)=noco%l_mtNocoPot
l(38)=field%efield%l_segmented l(38)=field%efield%l_segmented
l(39)=sym%symor ; l(40)=input%frcor ; l(41)=input%tria ; l(42)=field%efield%dirichlet l(39)=sym%symor ; l(40)=input%frcor ; l(41)=input%tria ; l(42)=field%efield%dirichlet
l(43)=field%efield%l_dirichlet_coeff ; l(44)=input%l_coreSpec ; l(45)=input%ldauLinMix l(43)=field%efield%l_dirichlet_coeff ; l(44)=input%l_coreSpec ; l(45)=input%ldauLinMix
...@@ -119,6 +119,7 @@ CONTAINS ...@@ -119,6 +119,7 @@ CONTAINS
field%efield%l_segmented = l(38) ; sym%symor=l(39); field%efield%dirichlet = l(40) field%efield%l_segmented = l(38) ; sym%symor=l(39); field%efield%dirichlet = l(40)
field%efield%l_dirichlet_coeff = l(41) ; input%l_coreSpec=l(44) ; input%ldauLinMix=l(45) field%efield%l_dirichlet_coeff = l(41) ; input%l_coreSpec=l(44) ; input%ldauLinMix=l(45)
banddos%unfoldband=l(35) banddos%unfoldband=l(35)
noco%l_mtNocoPot=l(36)
! !
! -> Broadcast the arrays: ! -> Broadcast the arrays:
IF (field%efield%l_segmented) THEN IF (field%efield%l_segmented) THEN
......
...@@ -196,7 +196,7 @@ CONTAINS ...@@ -196,7 +196,7 @@ CONTAINS
INTEGER:: n,k_only,pe_k_only(nkpt) INTEGER:: n,k_only,pe_k_only(nkpt)
#ifdef CPP_MPI
!Create a list of PE that will lead to k-point parallelization only !Create a list of PE that will lead to k-point parallelization only
k_only=0 k_only=0
DO n=1,nkpt DO n=1,nkpt
...@@ -209,6 +209,7 @@ CONTAINS ...@@ -209,6 +209,7 @@ CONTAINS
WRITE(*,*) pe_k_only(:k_only) WRITE(*,*) pe_k_only(:k_only)
!check if eigenvalue parallelization is possible !check if eigenvalue parallelization is possible
IF (parallel_solver_available()) WRITE(*,*) "Additional eigenvalue parallelization possible" IF (parallel_solver_available()) WRITE(*,*) "Additional eigenvalue parallelization possible"
#endif
END SUBROUTINE priv_dist_info END SUBROUTINE priv_dist_info
......
...@@ -78,10 +78,15 @@ MODULE m_types_mat ...@@ -78,10 +78,15 @@ MODULE m_types_mat
CALL mat%alloc(l_real,matsize1,matsize2) CALL mat%alloc(l_real,matsize1,matsize2)
END SUBROUTINE t_mat_init END SUBROUTINE t_mat_init
SUBROUTINE t_mat_init_template(mat,templ) SUBROUTINE t_mat_init_template(mat,templ,global_size1,global_size2)
IMPLICIT NONE IMPLICIT NONE
CLASS(t_mat),INTENT(INOUT) :: mat CLASS(t_mat),INTENT(INOUT) :: mat
CLASS(t_mat),INTENT(IN) :: templ CLASS(t_mat),INTENT(IN) :: templ
INTEGER,INTENT(IN),OPTIONAL:: global_size1,global_size2
IF (PRESENT(global_size1).AND.PRESENT(global_size2)) THEN
IF ((global_size1.NE.templ%matsize1).OR.(global_size2.NE.templ%matsize2)) CALL judft_error("BUG:Invalid change of size in init by template")
END IF
mat%l_real=templ%l_real mat%l_real=templ%l_real
mat%matsize1=templ%matsize1 mat%matsize1=templ%matsize1
mat%matsize2=templ%matsize2 mat%matsize2=templ%matsize2
...@@ -129,9 +134,9 @@ MODULE m_types_mat ...@@ -129,9 +134,9 @@ MODULE m_types_mat
END SUBROUTINE t_mat_alloc END SUBROUTINE t_mat_alloc
SUBROUTINE t_mat_multiply(mat1,mat2,res) SUBROUTINE t_mat_multiply(mat1,mat2,res)
CLASS(t_mat),INTENT(INOUT) ::mat1 CLASS(t_mat),INTENT(INOUT) ::mat1
TYPE(t_mat),INTENT(IN) ::mat2 CLASS(t_mat),INTENT(IN) ::mat2
TYPE(t_mat),INTENT(OUT),OPTIONAL ::res CLASS(t_mat),INTENT(OUT),OPTIONAL ::res
if (mat1%matsize2.ne.mat2%matsize1) CALL judft_error("Cannot multiply matrices because of non-matching dimensions",hint="This is a BUG in FLEUR, please report") if (mat1%matsize2.ne.mat2%matsize1) CALL judft_error("Cannot multiply matrices because of non-matching dimensions",hint="This is a BUG in FLEUR, please report")
......
...@@ -39,6 +39,7 @@ MODULE m_types_mpimat ...@@ -39,6 +39,7 @@ MODULE m_types_mpimat
PROCEDURE,PASS :: copy => mpimat_copy !<overwriten from t_mat, also performs redistribution PROCEDURE,PASS :: copy => mpimat_copy !<overwriten from t_mat, also performs redistribution
PROCEDURE,PASS :: move => mpimat_move !<overwriten from t_mat, also performs redistribution PROCEDURE,PASS :: move => mpimat_move !<overwriten from t_mat, also performs redistribution
PROCEDURE,PASS :: free => mpimat_free !<overwriten from t_mat, takes care of blacs-grids PROCEDURE,PASS :: free => mpimat_free !<overwriten from t_mat, takes care of blacs-grids
PROCEDURE,PASS :: multiply =>mpimat_multiply !<overwriten from t_mat, takes care of blacs-grids
PROCEDURE,PASS :: init_details => mpimat_init PROCEDURE,PASS :: init_details => mpimat_init
PROCEDURE,PASS :: init_template =>mpimat_init_template !<overwriten from t_mat, also calls alloc in t_mat PROCEDURE,PASS :: init_template =>mpimat_init_template !<overwriten from t_mat, also calls alloc in t_mat
PROCEDURE,PASS :: add_transpose => mpimat_add_transpose !<overwriten from t_mat PROCEDURE,PASS :: add_transpose => mpimat_add_transpose !<overwriten from t_mat
...@@ -52,6 +53,47 @@ MODULE m_types_mpimat ...@@ -52,6 +53,47 @@ MODULE m_types_mpimat
CONTAINS CONTAINS
SUBROUTINE mpimat_multiply(mat1,mat2,res)
CLASS(t_mpimat),INTENT(INOUT) :: mat1
CLASS(t_mat),INTENT(IN) :: mat2
CLASS(t_mat),INTENT(OUT),OPTIONAL :: res
#ifdef CPP_SCALAPACK
TYPE(t_mpimat)::m,r
IF (.NOT.PRESENT(res)) CALL judft_error("BUG: in mpicase the multiply requires the optional result argument")
SELECT TYPE(mat2)
TYPE IS (t_mpimat)
SELECT TYPE(res)
TYPE is (t_mpimat)
CALL m%init(mat1,mat2%global_size1,mat2%global_size2)
CALL m%copy(mat2,1,1)
CALL r%init(mat1,res%global_size1,res%global_size2)
IF (mat1%l_real) THEN
CALL pdgemm('N','N',mat1%global_size1, m%global_size2,mat1%global_size2, 1.0, &
mat1%data_r, 1,1,mat1%blacsdata%blacs_desc, &
m%data_r, 1,1,m%blacsdata%blacs_desc,0.0, &
r%data_r, 1,1,r%blacsdata%blacs_desc )
ELSE
CALL pzgemm('N','N',mat1%global_size1, m%global_size2,mat1%global_size2, CMPLX(1.0,0.0), &
mat1%data_c, 1,1,mat1%blacsdata%blacs_desc, &
m%data_c, 1,1,m%blacsdata%blacs_desc,CMPLX(0.0,0.0), &
r%data_c, 1,1,r%blacsdata%blacs_desc )
ENDIF
CALL res%copy(r,1,1)
CALL r%free()
CALL m%free()
CLASS default
CALL judft_error("BUG in mpimat%multiply")
END SELECT
CLASS default
CALL judft_error("BUG in mpimat%multiply")
END SELECT
#endif
END SUBROUTINE mpimat_multiply
SUBROUTINE print_matrix(mat,fileno) SUBROUTINE print_matrix(mat,fileno)
CLASS(t_mpimat),INTENT(INOUT) ::mat CLASS(t_mpimat),INTENT(INOUT) ::mat
INTEGER:: fileno INTEGER:: fileno
...@@ -308,20 +350,36 @@ CONTAINS ...@@ -308,20 +350,36 @@ CONTAINS
#endif #endif
END SUBROUTINE mpimat_init END SUBROUTINE mpimat_init
SUBROUTINE mpimat_init_template(mat,templ) SUBROUTINE mpimat_init_template(mat,templ,global_size1,global_size2)
IMPLICIT NONE IMPLICIT NONE
CLASS(t_mpimat),INTENT(INOUT) :: mat CLASS(t_mpimat),INTENT(INOUT) :: mat
CLASS(t_mat),INTENT(IN) :: templ CLASS(t_mat),INTENT(IN) :: templ
INTEGER,INTENT(IN),OPTIONAL :: global_size1,global_size2
INTEGER::numroc
EXTERNAL::numroc
SELECT TYPE(templ) SELECT TYPE(templ)
TYPE IS (t_mpimat) TYPE IS (t_mpimat)
mat%l_real=templ%l_real mat%l_real=templ%l_real
mat%matsize1=templ%matsize1 IF (PRESENT(global_size1).AND.PRESENT(global_size2)) THEN
mat%matsize2=templ%matsize2 ALLOCATE(mat%blacsdata)
mat%global_size1=templ%global_size1 mat%blacsdata=templ%blacsdata
mat%global_size2=templ%global_size2 mat%blacsdata%no_use=1
mat%blacsdata=>templ%blacsdata mat%blacsdata%blacs_desc(3)=global_size1
mat%blacsdata%no_use=mat%blacsdata%no_use+1 mat%blacsdata%blacs_desc(4)=global_size2
mat%global_size1=global_size1
mat%global_size2=global_size2
mat%matsize1=NUMROC( global_size1,mat%blacsdata%blacs_desc(5), mat%blacsdata%myrow, mat%blacsdata%blacs_desc(7), mat%blacsdata%nprow )
mat%matsize1=NUMROC( global_size2,mat%blacsdata%blacs_desc(6), mat%blacsdata%mycol, mat%blacsdata%blacs_desc(8), mat%blacsdata%npcol )
ELSE
mat%matsize1=templ%matsize1
mat%matsize2=templ%matsize2
mat%global_size1=templ%global_size1
mat%global_size2=templ%global_size2
mat%blacsdata=>templ%blacsdata
mat%blacsdata%no_use=mat%blacsdata%no_use+1
ENDIF
CALL mat%alloc() CALL mat%alloc()
CLASS default CLASS default
...@@ -409,8 +467,12 @@ CONTAINS ...@@ -409,8 +467,12 @@ CONTAINS
k = k + 1 k = k + 1
ENDDO ENDDO
ENDDO ENDDO
#ifdef CPP_BLACSDEFAULT
!Get the Blacs default context !Get the Blacs default context
CALL BLACS_GET(0,0,ictextblacs) CALL BLACS_GET(0,0,ictextblacs)
#else
ictextblacs=mpi_subcom
#endif
! Create the Grid ! Create the Grid
CALL BLACS_GRIDMAP(ictextblacs,iusermap,size(iusermap,1),blacsdata%nprow,blacsdata%npcol) CALL BLACS_GRIDMAP(ictextblacs,iusermap,size(iusermap,1),blacsdata%nprow,blacsdata%npcol)
! Now control, whether the BLACS grid is the one we wanted ! Now control, whether the BLACS grid is the one we wanted
......
...@@ -344,6 +344,7 @@ MODULE m_types_setup ...@@ -344,6 +344,7 @@ MODULE m_types_setup
LOGICAL:: l_ss LOGICAL:: l_ss
LOGICAL:: l_mperp LOGICAL:: l_mperp
LOGICAL:: l_constr LOGICAL:: l_constr
LOGICAL:: l_mtNocoPot
REAL:: qss(3) REAL:: qss(3)
REAL:: mix_b REAL:: mix_b
LOGICAL, ALLOCATABLE :: l_relax(:) LOGICAL, ALLOCATABLE :: l_relax(:)
......
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