Commit 682c1aeb authored by Daniel Wortmann's avatar Daniel Wortmann

Added additional mpi_bc routine, more init stuff done

parent 8880aa02
cmake_minimum_required(VERSION 3.0)
project(FLEUR LANGUAGES Fortran)
include("../cmake/Generate_Schema.cmake")
set(FLEURINPUT_COMPILEOPTS "-r8")
add_library(fleurinput STATIC
types_coreSpecInput.f90 types_hybrid.f90 types_noco.f90 types_vacuum.f90 fleurinput_read_xml.f90
types_banddos.f90 types_fleurinput_base.f90 types_input.f90 types_oneD.f90 types_wannier.f90
types_cell.f90 types_kpts.f90 types_fleurinput.f90 types_sliceplot.f90 types_sym.f90
types_atoms.F90 types_econfig.F90 types_field.F90 types_xcpot.F90 types_enparaXML.f90 types_forcetheo_data.f90
types_xml.f90 calculator.f constants.f90 mpi_bc_tool.F90 ../io/xml/inputSchema.h ../io/xml/dropInputSchema.c ../io/xml/xmlInterfaceWrapper.c
fleurinput_read_xml.f90 fleurinput_mpi_bc.f90
types_fleurinput_base.f90 types_input.f90 types_oneD.f90
types_coreSpecInput.f90 types_hybrid.f90 types_noco.f90
types_vacuum.f90 types_banddos.f90 types_wannier.f90
types_cell.f90 types_kpts.f90 types_fleurinput.f90
types_sliceplot.f90 types_sym.f90 types_atoms.F90
types_econfig.F90 types_field.F90 types_xcpot.F90
types_enparaXML.f90 types_forcetheo_data.f90
types_xml.f90
calculator.f constants.f90 mpi_bc_tool.F90 ../io/xml/inputSchema.h ../io/xml/dropInputSchema.c ../io/xml/xmlInterfaceWrapper.c
)
#Set module directories
include_directories("${CMAKE_CURRENT_BINARY_DIR}/modules/fleurinput")
......
......@@ -10,7 +10,7 @@ CONTAINS
TYPE(t_cell),INTENT(OUT)::cell
TYPE(t_sym),INTENT(OUT)::sym
TYPE(t_atoms),INTENT(OUT)::atoms
TYPE(t_input),INTENT(OUT)::input !mpi_bc done
TYPE(t_input),INTENT(OUT)::input
TYPE(t_noco),INTENT(OUT)::noco
TYPE(t_vacuum),INTENT(OUT)::vacuum
TYPE(t_field),INTENT(OUT)::field
......
......@@ -15,9 +15,10 @@ MODULE m_mpi_bc_tool
!have the same shape as the one on irank
INTERFACE mpi_bc
MODULE PROCEDURE mpi_bc_int,mpi_bc_int1,mpi_bc_int2,mpi_bc_int3,mpi_bc_int4,mpi_bc_int5
MODULE PROCEDURE mpi_bc_real33,mpi_bc_real,mpi_bc_real1,mpi_bc_real2,mpi_bc_real3,mpi_bc_real4,mpi_bc_real5
MODULE PROCEDURE mpi_bc_real_3,mpi_bc_real_fixed2,mpi_bc_real,mpi_bc_real1,mpi_bc_real2,mpi_bc_real3,mpi_bc_real4,mpi_bc_real5
MODULE PROCEDURE mpi_bc_complex,mpi_bc_complex1,mpi_bc_complex2,mpi_bc_complex3,mpi_bc_complex4,mpi_bc_complex5
MODULE PROCEDURE mpi_bc_logical,mpi_bc_logical1,mpi_bc_logical2
MODULE PROCEDURE mpi_bc_character_fixed1
END INTERFACE mpi_bc
PUBLIC :: mpi_bc
CONTAINS
......@@ -237,9 +238,22 @@ CONTAINS
! now the same for reals
!
SUBROUTINE mpi_bc_real33(irank,mpi_comm,r)!Special routine for non-allocatable 3x3 arrays
SUBROUTINE mpi_bc_real_fixed2(irank,mpi_comm,r)!Special routine for non-allocatable 2d arrays
IMPLICIT NONE
REAL,INTENT(INOUT) :: r(3,3)
REAL,INTENT(INOUT) :: r(:,:)
INTEGER,INTENT(IN) :: mpi_comm,irank
INTEGER:: ierr
#ifdef CPP_MPI
CALL MPI_BCAST(r,size(r),MPI_DOUBLE_PRECISION,irank,mpi_comm,ierr)
#endif
IF (ierr.NE.0) CALL judft_error("MPI_BCAST failed")
END SUBROUTINE mpi_bc_real_fixed2
SUBROUTINE mpi_bc_real_3(irank,mpi_comm,r)!Special routine for non-allocatable 3x3 arrays
IMPLICIT NONE
REAL,INTENT(INOUT) :: r(3)
INTEGER,INTENT(IN) :: mpi_comm,irank
INTEGER:: ierr
......@@ -248,7 +262,7 @@ CONTAINS
CALL MPI_BCAST(r,9,MPI_DOUBLE_PRECISION,irank,mpi_comm,ierr)
#endif
IF (ierr.NE.0) CALL judft_error("MPI_BCAST failed")
END SUBROUTINE mpi_bc_real33
END SUBROUTINE mpi_bc_real_3
SUBROUTINE mpi_bc_real(r,irank,mpi_comm)
IMPLICIT NONE
......@@ -549,4 +563,20 @@ CONTAINS
#endif
IF (ierr.NE.0) CALL judft_error("MPI_BCAST failed")
END SUBROUTINE mpi_bc_complex5
SUBROUTINE mpi_bc_character_fixed1(irank,mpi_comm,c)
IMPLICIT NONE
CHARACTER(len=*),INTENT(INOUT) :: c
INTEGER,INTENT(IN) :: mpi_comm,irank
INTEGER:: ierr
#ifdef CPP_MPI
CALL MPI_BCAST(c,len_trim(c),MPI_CHARACTER,irank,mpi_comm,ierr)
#endif
IF (ierr.NE.0) CALL judft_error("MPI_BCAST failed")
END SUBROUTINE mpi_bc_character_fixed1
END MODULE m_mpi_bc_tool
......@@ -29,10 +29,43 @@ MODULE m_types_banddos
INTEGER :: s_cell_z
REAL :: alpha,beta,gamma !For orbital decomp. (was orbcomprot)
CONTAINS
PROCEDURE :: read_xml
PROCEDURE :: read_xml=>read_xml_banddos
PROCEDURE :: mpi_bc=>mpi_bc_banddos
END TYPE t_banddos
CONTAINS
SUBROUTINE read_xml(this,xml)
SUBROUTINE mpi_bc_banddos(this,mpi_comm,irank)
USE m_mpi_bc_tool
CLASS(t_banddos),INTENT(INOUT)::this
integer,INTENT(IN):: mpi_comm
INTEGER,INTENT(IN),OPTIONAL::irank
INTEGER ::rank
if (present(irank)) THEN
rank=0
else
rank=irank
end if
CALL mpi_bc(this%dos ,rank,mpi_comm)
CALL mpi_bc(this%band ,rank,mpi_comm)
CALL mpi_bc(this%l_mcd ,rank,mpi_comm)
CALL mpi_bc(this%l_orb ,rank,mpi_comm)
CALL mpi_bc(this%vacdos ,rank,mpi_comm)
CALL mpi_bc(this%ndir ,rank,mpi_comm)
CALL mpi_bc(this%orbCompAtom,rank,mpi_comm)
CALL mpi_bc(this%e1_dos,rank,mpi_comm)
CALL mpi_bc(this%e2_dos,rank,mpi_comm)
CALL mpi_bc(this%sig_dos,rank,mpi_comm)
CALL mpi_bc(this%e_mcd_lo ,rank,mpi_comm)
CALL mpi_bc(this%e_mcd_up,rank,mpi_comm)
CALL mpi_bc(this%unfoldband ,rank,mpi_comm)
CALL mpi_bc(this%s_cell_x,rank,mpi_comm)
CALL mpi_bc(this%s_cell_y,rank,mpi_comm)
CALL mpi_bc(this%s_cell_z,rank,mpi_comm)
CALL mpi_bc(this%alpha,rank,mpi_comm)
CALL mpi_bc(this%beta,rank,mpi_comm)
CALL mpi_bc(this%gamma,rank,mpi_comm)
END SUBROUTINE mpi_bc_banddos
SUBROUTINE read_xml_banddos(this,xml)
USE m_types_xml
CLASS(t_banddos),INTENT(INOUT)::this
TYPE(t_xml),INTENT(IN)::xml
......@@ -82,7 +115,7 @@ CONTAINS
this%s_cell_y = evaluateFirstOnly(xml%GetAttributeValue('/fleurInput/output/unfoldingBand/@supercellY'))
this%s_cell_z = evaluateFirstOnly(xml%GetAttributeValue('/fleurInput/output/unfoldingBand/@supercellZ'))
END IF
END SUBROUTINE read_xml
END SUBROUTINE read_xml_banddos
END MODULE m_types_banddos
......@@ -27,9 +27,42 @@ MODULE m_types_coreSpecInput
REAL :: beta_ex ! maximal (measured) angle of outcoming electrons
REAL :: I0 ! incoming intensity
CONTAINS
PROCEDURE read_xml=>read_xml_corespecinput
PROCEDURE :: read_xml=>read_xml_corespecinput
PROCEDURE :: mpi_bc=>mpi_bc_corespecinput
END TYPE t_coreSpecInput
CONTAINS
SUBROUTINE mpi_bc_corespecinput(this,mpi_comm,irank)
use m_mpi_bc_tool
class(t_corespecinput),INTENT(INOUT)::this
integer,INTENT(IN):: mpi_comm
INTEGER,INTENT(IN),OPTIONAL::irank
INTEGER ::rank,n
if (present(irank)) THEN
rank=0
else
rank=irank
end if
CALL mpi_bc(this%verb,rank,mpi_comm)
CALL mpi_bc(this%atomType ,rank,mpi_comm)
CALL mpi_bc(this%lx ,rank,mpi_comm)
CALL mpi_bc(this%ek0 ,rank,mpi_comm)
CALL mpi_bc(this%emn ,rank,mpi_comm)
CALL mpi_bc(this%emx ,rank,mpi_comm)
CALL mpi_bc(this%ein ,rank,mpi_comm)
CALL mpi_bc(this%nqphi ,rank,mpi_comm)
CALL mpi_bc(this%nqr ,rank,mpi_comm)
CALL mpi_bc(this%alpha_ex ,rank,mpi_comm)
CALL mpi_bc(this%beta_ex ,rank,mpi_comm)
CALL MPI_BC(THIS%I0 ,RANK,MPI_COMM)
!CALL MPI_BC(THIS%edge,RANK,MPI_COMM)
DO n=1,SIZE(this%edgeidx)
CALL MPI_BC(THIS%edgeidx(n),RANK,MPI_COMM)
END DO
END SUBROUTINE mpi_bc_corespecinput
SUBROUTINE read_xml_corespecinput(This,xml)
USE m_types_xml
CLASS(t_coreSpecInput),INTENT(INOUT)::this
......
......@@ -16,6 +16,7 @@ MODULE m_types_enparaXML
PROCEDURE :: init
procedure :: set_quantum_numbers
PROCEDURE :: read_xml=>read_xml_enpara
procedure :: mpi_bc => mpi_bc_enpara
END TYPE t_enparaXML
......@@ -24,6 +25,24 @@ MODULE m_types_enparaXML
CONTAINS
SUBROUTINE mpi_bc_enpara(this,mpi_comm,irank)
USE m_mpi_bc_tool
CLASS(t_enparaXML),INTENT(INOUT)::this
INTEGER,INTENT(IN):: mpi_comm
INTEGER,INTENT(IN),OPTIONAL::irank
INTEGER ::rank
IF (PRESENT(irank)) THEN
rank=0
ELSE
rank=irank
END IF
CALL mpi_bc(this%qn_el,rank,mpi_comm)
CALL mpi_bc(this%qn_ello,rank,mpi_comm)
CALL mpi_bc(rank,mpi_comm,this%evac0)
END SUBROUTINE mpi_bc_enpara
SUBROUTINE read_xml_enpara(this,xml)
use m_types_xml
CLASS(t_enparaXML),INTENT(INOUT):: this
......
......@@ -32,16 +32,55 @@ MODULE m_types_field
TYPE t_field
TYPE(t_efield) :: efield
LOGICAL :: l_b_field=.false.
LOGICAL :: l_b_field=.FALSE.
REAL :: b_field
REAL,ALLOCATABLE :: b_field_mt(:)
CONTAINS
PROCEDURE :: init=>init_field
PROCEDURE :: read_xml
PROCEDURE :: read_xml=>read_xml_field
PROCEDURE :: mpi_bc=>mpi_bc_field
END TYPE t_field
PUBLIC t_field,t_efield
CONTAINS
SUBROUTINE mpi_bc_field(this,mpi_comm,irank)
USE m_mpi_bc_tool
CLASS(t_field),INTENT(INOUT)::this
INTEGER,INTENT(IN):: mpi_comm
INTEGER,INTENT(IN),OPTIONAL::irank
INTEGER ::rank
IF (PRESENT(irank)) THEN
rank=0
ELSE
rank=irank
END IF
CALL mpi_bc(this%l_b_field,rank,mpi_comm)
CALL mpi_bc(this%b_field,rank,mpi_comm)
CALL mpi_bc(this%b_field_mt,rank,mpi_comm)
CALL mpi_bc(this%efield%zsigma ,rank,mpi_comm)
CALL mpi_bc(this%efield%sigma ,rank,mpi_comm)
CALL mpi_bc(this%efield%sig_b(1),rank,mpi_comm)
CALL mpi_bc(this%efield%sig_b(2),rank,mpi_comm)
CALL mpi_bc(this%efield%vslope ,rank,mpi_comm)
CALL mpi_bc(this%efield%sigEF ,rank,mpi_comm)
CALL mpi_bc(this%efield%rhoEF ,rank,mpi_comm)
CALL MPI_BC(THIS%EFIELD%C1,RANK,MPI_COMM)
CALL mpi_bc(this%efield%C2 ,rank,mpi_comm)
CALL mpi_bc(this%efield%l_segmented ,rank,mpi_comm)
CALL mpi_bc(this%efield%plot_charge ,rank,mpi_comm)
CALL mpi_bc(this%efield%plot_rho ,rank,mpi_comm)
CALL mpi_bc(this%efield%autocomp ,rank,mpi_comm)
CALL mpi_bc(this%efield%dirichlet ,rank,mpi_comm)
CALL mpi_bc(this%efield%l_dirichlet_coeff ,rank,mpi_comm)
CALL mpi_bc(this%efield%l_eV ,rank,mpi_comm)
END SUBROUTINE mpi_bc_field
SUBROUTINE init_field(this)
!USE m_types_setup
IMPLICIT NONE
......@@ -51,7 +90,7 @@ CONTAINS
!this%efield%sigma=>sigma
END SUBROUTINE init_field
SUBROUTINE read_xml(this,xml)
SUBROUTINE read_xml_field(this,xml)
USE m_types_xml
CLASS(t_field),INTENT(OUT)::this
TYPE(t_xml),INTENT(IN)::xml
......@@ -84,5 +123,5 @@ CONTAINS
ELSE
ALLOCATE(this%efield%shapes(0))
END IF
END SUBROUTINE read_xml
END SUBROUTINE read_xml_field
END MODULE m_types_field
......@@ -34,8 +34,27 @@ MODULE m_types_forcetheo_data
CONTAINS
PROCEDURE :: read_xml=>read_xml_forcetheo_data
PROCEDURE :: mpi_bc=>mpi_bc_forcetheo_data
END TYPE t_forcetheo_data
CONTAINS
SUBROUTINE mpi_bc_forcetheo_data(this,mpi_comm,irank)
use m_mpi_bc_tool
CLASS(t_forcetheo_data),INTENT(INOUT)::this
integer,INTENT(IN):: mpi_comm
INTEGER,INTENT(IN),OPTIONAL::irank
INTEGER ::rank
if (present(irank)) THEN
rank=0
else
rank=irank
end if
CALL mpi_bc(this%mode,rank,mpi_comm)
CALL mpi_bc(this%qvec,rank,mpi_comm)
CALL mpi_bc(this%theta,rank,mpi_comm)
CALL mpi_bc(this%phi ,rank,mpi_comm)
END SUBROUTINE mpi_bc_forcetheo_data
SUBROUTINE read_xml_forcetheo_data(this,xml)
USE m_types_xml
CLASS(t_forcetheo_data),INTENT(INOUT):: this
......
......@@ -49,11 +49,64 @@ MODULE m_types_hybrid
REAL, ALLOCATABLE :: div_vv(:, :, :)
CONTAINS
PROCEDURE :: read_xml =>read_xml_hybrid
PROCEDURE :: mpi_bc =>mpi_bc_hybrid
END TYPE t_hybrid
PUBLIC t_hybrid
CONTAINS
SUBROUTINE mpi_bc_hybrid(this,mpi_comm,irank)
USE m_mpi_bc_tool
CLASS(t_hybrid),INTENT(INOUT)::this
INTEGER,INTENT(IN):: mpi_comm
INTEGER,INTENT(IN),OPTIONAL::irank
INTEGER ::rank
IF (PRESENT(irank)) THEN
rank=0
ELSE
rank=irank
END IF
CALL mpi_bc(this%l_hybrid,rank,mpi_comm)
CALL mpi_bc(this%l_subvxc ,rank,mpi_comm)
CALL mpi_bc(this%l_calhf ,rank,mpi_comm)
CALL mpi_bc(this%l_addhf ,rank,mpi_comm)
CALL mpi_bc(this%ewaldlambda ,rank,mpi_comm)
CALL mpi_bc(this%lexp ,rank,mpi_comm)
CALL mpi_bc(this%bands1,rank,mpi_comm)
CALL mpi_bc(this%nbasp,rank,mpi_comm)
CALL mpi_bc(this%maxlcutm1,rank,mpi_comm)
CALL mpi_bc(this%maxindxm1,rank,mpi_comm)
CALL mpi_bc(this%maxbasm1,rank,mpi_comm)
CALL mpi_bc(this%maxindxp1,rank,mpi_comm)
CALL mpi_bc(this%maxgptm,rank,mpi_comm)
CALL mpi_bc(this%maxgptm1,rank,mpi_comm)
CALL mpi_bc(this%maxindx,rank,mpi_comm)
CALL mpi_bc(this%maxlmindx,rank,mpi_comm)
CALL mpi_bc(this%gptmd,rank,mpi_comm)
CALL mpi_bc(this%nindx,rank,mpi_comm)
CALL mpi_bc(this%select1,rank,mpi_comm)
CALL mpi_bc(this%lcutm1,rank,mpi_comm)
CALL mpi_bc(this%nindxm1,rank,mpi_comm)
CALL mpi_bc(this%gptm,rank,mpi_comm)
CALL mpi_bc(this%ngptm1,rank,mpi_comm)
CALL mpi_bc(this%pgptm1,rank,mpi_comm)
CALL mpi_bc(this%ngptm,rank,mpi_comm)
CALL mpi_bc(this%pgptm,rank,mpi_comm)
CALL mpi_bc(this%lcutwf,rank,mpi_comm)
CALL mpi_bc(this%map,rank,mpi_comm)
CALL mpi_bc(this%tvec,rank,mpi_comm)
CALL mpi_bc(this%nbasm,rank,mpi_comm)
CALL mpi_bc(this%gcutm1,rank,mpi_comm)
CALL mpi_bc(this%tolerance1 ,rank,mpi_comm)
CALL mpi_bc(this%basm1,rank,mpi_comm)
CALL mpi_bc(this%d_wgn2,rank,mpi_comm)
CALL mpi_bc(this%ne_eig,rank,mpi_comm)
CALL mpi_bc(this%nbands,rank,mpi_comm)
CALL mpi_bc(this%nobd,rank,mpi_comm)
CALL mpi_bc(this%div_vv,rank,mpi_comm)
END SUBROUTINE mpi_bc_hybrid
SUBROUTINE read_xml_hybrid(this,xml)
USE m_types_xml
CLASS(t_hybrid),INTENT(INout):: this
......
......@@ -33,12 +33,42 @@ MODULE m_types_kpts
PROCEDURE :: add_special_line
PROCEDURE :: print_xml
PROCEDURE :: read_xml=>read_xml_kpts
PROCEDURE :: mpi_bc => mpi_bc_kpts
ENDTYPE t_kpts
PUBLIC :: t_kpts
CONTAINS
SUBROUTINE mpi_bc_kpts(this,mpi_comm,irank)
USE m_mpi_bc_tool
CLASS(t_kpts),INTENT(INOUT)::this
INTEGER,INTENT(IN):: mpi_comm
INTEGER,INTENT(IN),OPTIONAL::irank
INTEGER ::rank
IF (PRESENT(irank)) THEN
rank=0
ELSE
rank=irank
END IF
CALL mpi_bc(this%nkpt,rank,mpi_comm)
CALL mpi_bc(this%ntet,rank,mpi_comm)
CALL mpi_bc(this%l_gamma,rank,mpi_comm)
CALL mpi_bc(this%bk,rank,mpi_comm)
CALL mpi_bc(this%wtkpt,rank,mpi_comm)
CALL mpi_bc(this%nkptf,rank,mpi_comm)
CALL mpi_bc(this%bkf,rank,mpi_comm)
CALL mpi_bc(this%bkp,rank,mpi_comm)
CALL mpi_bc(this%bksym,rank,mpi_comm)
CALL mpi_bc(this%numSpecialPoints,rank,mpi_comm)
CALL mpi_bc(this%specialPointIndices,rank,mpi_comm)
CALL mpi_bc(this%specialPoints,rank,mpi_comm)
CALL mpi_bc(this%ntetra,rank,mpi_comm)
CALL mpi_bc(this%voltet,rank,mpi_comm)
CALL mpi_bc(this%sc_list ,rank,mpi_comm)
END SUBROUTINE mpi_bc_kpts
SUBROUTINE read_xml_kpts(this,xml)
USE m_types_xml
USE m_calculator
......
......@@ -31,11 +31,46 @@ MODULE m_types_noco
CONTAINS
PROCEDURE :: read_xml=>read_xml_noco
PROCEDURE :: mpi_bc =>mpi_bc_noco
END TYPE t_noco
PUBLIC t_noco
CONTAINS
SUBROUTINE mpi_bc_noco(this,mpi_comm,irank)
USE m_mpi_bc_tool
CLASS(t_noco),INTENT(INOUT)::this
INTEGER,INTENT(IN):: mpi_comm
INTEGER,INTENT(IN),OPTIONAL::irank
INTEGER ::rank
IF (PRESENT(irank)) THEN
rank=0
ELSE
rank=irank
END IF
CALL mpi_bc(this%l_ss,rank,mpi_comm)
CALL mpi_bc(this%l_soc,rank,mpi_comm)
CALL mpi_bc(this%l_noco ,rank,mpi_comm)
CALL mpi_bc(this%l_mperp ,rank,mpi_comm)
CALL mpi_bc(this%l_constr ,rank,mpi_comm)
CALL mpi_bc(this%l_mtNocoPot ,rank,mpi_comm)
CALL mpi_bc(rank,mpi_comm,this%qss)
CALL mpi_bc(this%mix_b,rank,mpi_comm)
CALL mpi_bc(this%l_spav,rank,mpi_comm)
CALL mpi_bc(this%theta,rank,mpi_comm)
CALL mpi_bc(this%phi,rank,mpi_comm)
CALL mpi_bc(this%l_relax,rank,mpi_comm)
CALL mpi_bc(this%alphInit,rank,mpi_comm)
CALL mpi_bc(this%alph,rank,mpi_comm)
CALL mpi_bc(this%beta,rank,mpi_comm)
CALL mpi_bc(this%b_con,rank,mpi_comm)
CALL mpi_bc(this%socscale,rank,mpi_comm)
END SUBROUTINE mpi_bc_noco
SUBROUTINE read_xml_noco(this,xml)
USE m_types_xml
CLASS(t_noco),INTENT(inout):: this
......
......@@ -78,9 +78,33 @@ MODULE m_types_oneD
REAL, POINTER :: pgft1xy(:)
contains
procedure :: read_xml=>read_xml_oneD
PROCEDURE :: mpi_bc=>mpi_bc_oneD
END TYPE t_oneD
PUBLIC::t_oneD,od_dim,od_inp,od_gga,od_lda,od_sym
CONTAINS
SUBROUTINE mpi_bc_oneD(this,mpi_comm,irank)
use m_mpi_bc_tool
class(t_oneD),INTENT(INOUT)::this
integer,INTENT(IN):: mpi_comm
INTEGER,INTENT(IN),OPTIONAL::irank
INTEGER ::rank
if (present(irank)) THEN
rank=0
else
rank=irank
end if
!Attention only few variables are broadcasted
CALL mpi_bc(this%odd%d1 ,rank,mpi_comm)
CALL mpi_bc(this%odd%M ,rank,mpi_comm)
CALL mpi_bc(this%odd%mb ,rank,mpi_comm)
CALL mpi_bc(this%odd%m_cyl ,rank,mpi_comm)
CALL mpi_bc(this%odd%chi ,rank,mpi_comm)
CALL mpi_bc(this%odd%rot ,rank,mpi_comm)
CALL mpi_bc(this%odd%invs ,rank,mpi_comm)
CALL mpi_bc(this%odd%zrfs ,rank,mpi_comm)
END SUBROUTINE mpi_bc_oneD
SUBROUTINE read_xml_oneD(this,xml)
use m_types_xml
class(t_oned),intent(inout)::this
......
......@@ -20,9 +20,32 @@ MODULE m_types_sliceplot
REAL :: e2s=0.
CONTAINS
PROCEDURE :: read_xml=>read_xml_sliceplot
PROCEDURE :: mpi_bc=>mpi_bc_sliceplot
END TYPE t_sliceplot
CONTAINS
SUBROUTINE mpi_bc_sliceplot(this,mpi_comm,irank)
USE m_mpi_bc_tool
CLASS(t_sliceplot),INTENT(INOUT)::this
INTEGER,INTENT(IN):: mpi_comm
INTEGER,INTENT(IN),OPTIONAL::irank
INTEGER ::rank
IF (PRESENT(irank)) THEN
rank=0
ELSE
rank=irank
END IF
CALL mpi_bc(this%iplot,rank,mpi_comm)
CALL mpi_bc(this%slice,rank,mpi_comm)
CALL mpi_bc(this%plpot,rank,mpi_comm)
CALL mpi_bc(this%kk,rank,mpi_comm)
CALL mpi_bc(this%nnne,rank,mpi_comm)
CALL mpi_bc(this%e1s,rank,mpi_comm)
CALL mpi_bc(this%e2s,rank,mpi_comm)
END SUBROUTINE mpi_bc_sliceplot
SUBROUTINE read_xml_sliceplot(this,xml)
USE m_types_xml
CLASS(t_sliceplot),INTENT(inOUT)::this
......
......@@ -31,8 +31,42 @@ MODULE m_types_vacuum
INTEGER, ALLOCATABLE :: izlay(:, :)
CONTAINS
PROCEDURE :: read_xml
PROCEDURE :: mpi_bc => mpi_bc_vacuum
END TYPE t_vacuum
CONTAINS
SUBROUTINE mpi_bc_vacuum(this,mpi_comm,irank)
use m_mpi_bc_tool
CLASS(t_vacuum),INTENT(INOUT)::this
INTEGER,INTENT(IN):: mpi_comm
INTEGER,INTENT(IN),OPTIONAL::irank
INTEGER ::rank
IF (PRESENT(irank)) THEN
rank=0
else
rank=irank
END IF
CALL mpi_bc(this%nmz,rank,mpi_comm)
CALL mpi_bc(this%nmzd,rank,mpi_comm)
CALL mpi_bc(this%nmzxy,rank,mpi_comm)
CALL mpi_bc(this%nmzxyd,rank,mpi_comm)
CALL mpi_bc(this%layerd,rank,mpi_comm)
CALL mpi_bc(this%layers,rank,mpi_comm)
CALL mpi_bc(this%nvac,rank,mpi_comm)
CALL mpi_bc(this%nvacd,rank,mpi_comm)
CALL mpi_bc(this%delz,rank,mpi_comm)
CALL mpi_bc(this%dvac,rank,mpi_comm)
CALL mpi_bc(this%nstars,rank,mpi_comm)
CALL mpi_bc(this%nstm,rank,mpi_comm)
CALL mpi_bc(this%tworkf,rank,mpi_comm)
CALL mpi_bc(this%locx(1),rank,mpi_comm)
CALL mpi_bc(this%locy(1),rank,mpi_comm)
CALL mpi_bc(this%locx(2),rank,mpi_comm)
CALL mpi_bc(this%locy(2),rank,mpi_comm)
CALL mpi_bc(this%starcoeff,rank,mpi_comm)
CALL mpi_bc(this%izlay,rank,mpi_comm)
END SUBROUTINE mpi_bc_vacuum
SUBROUTINE read_xml(this,xml)
USE m_types_xml
CLASS(t_vacuum),INTENT(INOUT)::this
......
This diff is collapsed.
......@@ -36,6 +36,14 @@ MODULE m_types_xcpot
TYPE,ABSTRACT,EXTENDS(t_fleurinput_base) :: t_xcpot
REAL :: gmaxxc
!Data for libxc
LOGICAL :: l_libxc=.FALSE.
INTEGER :: func_vxc_id_c, func_vxc_id_x !> functionals to be used for potential & density convergence
INTEGER :: func_exc_id_c, func_exc_id_x !> functionals to be used in exc- & totale-calculations
!For inbuild
LOGICAL :: l_inbuild=.FALSE.
CHARACTER(len=10):: inbuild_name="vwn"
LOGICAL :: l_relativistic=.FALSE.
CONTAINS
PROCEDURE :: vxc_is_LDA => xcpot_vxc_is_LDA
PROCEDURE :: vxc_is_GGA => xcpot_vxc_is_GGA
......@@ -59,70 +67,171 @@ MODULE m_types_xcpot
PROCEDURE :: get_exc => xcpot_get_exc
PROCEDURE,NOPASS :: alloc_gradients => xcpot_alloc_gradients
PROCEDURE :: read_xml=>read_xml_xcpot
PROCEDURE :: mpi_bc=>mpi_bc_xcpot
END TYPE t_xcpot
CONTAINS
CONTAINS
SUBROUTINE mpi_bc_xcpot(this,mpi_comm,irank)
USE m_mpi_bc_tool
CLASS(t_xcpot),INTENT(INOUT)::this
INTEGER,INTENT(IN):: mpi_comm
INTEGER,INTENT(IN),OPTIONAL::irank
INTEGER ::rank
IF (PRESENT(irank)) THEN
rank=0
ELSE
rank=irank
END IF
CALL mpi_bc(this%l_libxc,rank,mpi_comm)
CALL mpi_bc(this%func_vxc_id_c,rank,mpi_comm)
CALL mpi_bc(this%func_vxc_id_x ,rank,mpi_comm)
CALL mpi_bc(this%func_exc_id_c,rank,mpi_comm)
CALL mpi_bc(this%func_exc_id_x ,rank,mpi_comm)
CALL mpi_bc(this%l_inbuild,rank,mpi_comm)
CALL mpi_bc(rank,mpi_comm,this%inbuild_name)
CALL mpi_bc(this%l_relativistic,rank,mpi_comm)
END SUBROUTINE mpi_bc_xcpot
SUBROUTINE read_xml_xcpot(this,xml)
USE m_types_xml
CLASS(t_xcpot),INTENT(INOUT):: this
TYPE(t_xml),INTENT(in) :: xml
CHARACTER(len=10)::xpathA,xpathB
INTEGER :: vxc_id_x,vxc_id_c, exc_id_x, exc_id_c,jspins
LOGICAL :: l_libxc_names
l_libxc_names=.FALSE.
IF (xml%GetNumberOfNodes('/fleurInput/calculationSetup/cutoffs/@GmaxXC')==1)&
this%gmaxxc = evaluateFirstOnly(xml%GetAttributeValue('/fleurInput/calculationSetup/cutoffs/@GmaxXC'))
IF (xml%GetNumberOfNodes('/fleurInput/xcFunctional/@name')==1) THEN
this%l_inbuild=.TRUE.
this%inbuild_name=TRIM(ADJUSTL(xml%GetAttributeValue(TRIM(ADJUSTL('/fleurInput/xcFunctional/@name')))))
this%l_relativistic=evaluateFirstBoolOnly(xml%GetAttributeValue('/fleurInput/xcFunctional/@relativisticCorrections'))
ENDIF
!Input for libxc
! Read in xc functional parameters
!Read in libxc parameters if present
xPathA = '/fleurInput/xcFunctional/LibXCID'
xPathB = '/fleurInput/xcFunctional/LibXCName'
! LibXCID
IF (xml%GetNumberOfNodes(xPathA) == 1) THEN
this%l_libxc=.TRUE.
this%func_vxc_id_x=evaluateFirstOnly(xml%GetAttributeValue(xPathA // '/@exchange'))