LCOV - code coverage report
Current view: top level - init - initParallelProcesses.F90 (source / functions) Hit Total Coverage
Test: combined.info Lines: 123 123 100.0 %
Date: 2019-09-08 04:53:50 Functions: 1 1 100.0 %

          Line data    Source code
       1             : !--------------------------------------------------------------------------------
       2             : ! Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany
       3             : ! This file is part of FLEUR and available as free software under the conditions
       4             : ! of the MIT license as expressed in the LICENSE file in more detail.
       5             : !--------------------------------------------------------------------------------
       6             : 
       7             : MODULE m_InitParallelProcesses
       8             : 
       9             : CONTAINS
      10             : 
      11             : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      12             : !
      13             : ! This subroutine distributes input data from inp.xml to all parallel
      14             : ! processes
      15             : !
      16             : !                                GM'16
      17             : !
      18             : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      19          48 : SUBROUTINE initParallelProcesses(atoms,vacuum,input,stars,sliceplot,banddos,&
      20             :                                  dimension,cell,sym,xcpot,noco,oneD,hybrid,&
      21             :                                  kpts,enpara,sphhar,mpi,obsolete)
      22             : 
      23             :    USE m_types
      24             : 
      25             :    IMPLICIT NONE
      26             : 
      27             :    TYPE(t_mpi),      INTENT(INOUT) :: mpi
      28             :    TYPE(t_input),    INTENT(INOUT) :: input
      29             :    TYPE(t_sym),      INTENT(INOUT) :: sym
      30             :    TYPE(t_stars),    INTENT(INOUT) :: stars 
      31             :    TYPE(t_atoms),    INTENT(INOUT) :: atoms
      32             :    TYPE(t_vacuum),   INTENT(INOUT) :: vacuum
      33             :    TYPE(t_kpts),     INTENT(INOUT) :: kpts
      34             :    TYPE(t_oneD),     INTENT(INOUT) :: oneD
      35             :    TYPE(t_hybrid),   INTENT(INOUT) :: hybrid
      36             :    TYPE(t_cell),     INTENT(INOUT) :: cell
      37             :    TYPE(t_banddos),  INTENT(INOUT) :: banddos
      38             :    TYPE(t_sliceplot),INTENT(INOUT) :: sliceplot
      39             :    CLASS(t_xcpot),    INTENT(INOUT) :: xcpot
      40             :    TYPE(t_noco),     INTENT(INOUT) :: noco
      41             :    TYPE(t_dimension),INTENT(INOUT) :: dimension
      42             :    TYPE(t_enpara),   INTENT(INOUT) :: enpara
      43             :    TYPE(t_sphhar),   INTENT(INOUT) :: sphhar
      44             :    TYPE(t_obsolete), INTENT(INOUT) :: obsolete
      45             : #ifdef CPP_MPI
      46             :    INCLUDE 'mpif.h'
      47             : 
      48             :    INTEGER ierr(3)
      49             : 
      50             :    EXTERNAL MPI_BCAST
      51             : 
      52          48 :    CALL MPI_BCAST(atoms%ntype,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      53          48 :    CALL MPI_BCAST(atoms%ntype,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      54          48 :    CALL MPI_BCAST(atoms%nat,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      55          48 :    CALL MPI_BCAST(atoms%nlod,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      56          48 :    CALL MPI_BCAST(atoms%lmaxd,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      57          48 :    CALL MPI_BCAST(atoms%llod,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      58          48 :    CALL MPI_BCAST(atoms%jmtd,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      59          48 :    CALL MPI_BCAST(sym%nop,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      60          48 :    CALL MPI_BCAST(sym%nop2,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      61          48 :    CALL MPI_BCAST(stars%ng3,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      62          48 :    CALL MPI_BCAST(stars%ng2,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      63          48 :    CALL MPI_BCAST(stars%mx1,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      64          48 :    CALL MPI_BCAST(stars%mx2,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      65          48 :    CALL MPI_BCAST(stars%mx3,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      66          48 :    CALL MPI_BCAST(stars%kq1_fft,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      67          48 :    CALL MPI_BCAST(stars%kq2_fft,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      68          48 :    CALL MPI_BCAST(stars%kq3_fft,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      69          48 :    CALL MPI_BCAST(sphhar%nlhd,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      70          48 :    CALL MPI_BCAST(sphhar%ntypsd,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      71          48 :    CALL MPI_BCAST(sphhar%memd,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      72          48 :    CALL MPI_BCAST(input%jspins,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      73          48 :    CALL MPI_BCAST(dimension%nstd,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      74          48 :    CALL MPI_BCAST(stars%kimax,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      75          48 :    CALL MPI_BCAST(stars%kimax2,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      76          48 :    CALL MPI_BCAST(dimension%ncvd,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      77          48 :    CALL MPI_BCAST(dimension%nvd,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      78          48 :    CALL MPI_BCAST(dimension%neigd,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      79          48 :    CALL MPI_BCAST(dimension%nv2d,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      80          48 :    CALL MPI_BCAST(dimension%msh,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      81          48 :    CALL MPI_BCAST(dimension%nspd,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      82          48 :    CALL MPI_BCAST(kpts%numSpecialPoints,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      83          48 :    CALL MPI_BCAST(kpts%nkpt,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      84          48 :    CALL MPI_BCAST(kpts%ntet,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      85          48 :    CALL MPI_BCAST(input%jspins,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      86          48 :    CALL MPI_BCAST(input%l_rdmft,1,MPI_LOGICAL,0,mpi%mpi_comm,ierr)
      87          48 :    CALL MPI_BCAST(vacuum%layerd,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      88          48 :    CALL MPI_BCAST(vacuum%nmzxyd,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      89          48 :    CALL MPI_BCAST(vacuum%nmzd,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      90          48 :    CALL MPI_BCAST(oneD%odd%k3,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      91          48 :    CALL MPI_BCAST(oneD%odd%M,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      92          48 :    CALL MPI_BCAST(oneD%odd%mb,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      93          48 :    CALL MPI_BCAST(oneD%odd%n2d,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      94          48 :    CALL MPI_BCAST(oneD%odd%nop,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      95          48 :    CALL MPI_BCAST(oneD%odd%nn2d,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      96             :    !CALL MPI_BCAST(obsolete%nwdd,1,MPI_INTEGER,0,mpi%mpi_comm,ierr)
      97             : 
      98          48 :    IF (mpi%irank.NE.0) THEN
      99          24 :       IF(ALLOCATED(atoms%neq)) DEALLOCATE(atoms%neq)
     100          24 :       IF(ALLOCATED(atoms%volmts)) DEALLOCATE(atoms%volmts)
     101          24 :       IF(ALLOCATED(atoms%taual)) DEALLOCATE(atoms%taual)
     102          24 :       IF(ALLOCATED(atoms%rmt)) DEALLOCATE(atoms%rmt)
     103          24 :       ALLOCATE(atoms%nz(atoms%ntype),atoms%zatom(atoms%ntype)) !nz and zatom have the same content!
     104          24 :       ALLOCATE(atoms%jri(atoms%ntype),atoms%dx(atoms%ntype),atoms%rmt(atoms%ntype))
     105          24 :       ALLOCATE(atoms%lmax(atoms%ntype),atoms%nlo(atoms%ntype),atoms%lnonsph(atoms%ntype))
     106          24 :       ALLOCATE(atoms%ncst(atoms%ntype),atoms%lda_u(4*atoms%ntype))
     107          24 :       ALLOCATE(atoms%nflip(atoms%ntype),atoms%bmu(atoms%ntype),atoms%neq(atoms%ntype))
     108          24 :       ALLOCATE(atoms%l_geo(atoms%ntype),atoms%relax(3,atoms%ntype))
     109          24 :       ALLOCATE(atoms%taual(3,atoms%nat),atoms%pos(3,atoms%nat))
     110          24 :       ALLOCATE(atoms%numStatesProvided(atoms%ntype))
     111          24 :       ALLOCATE(atoms%rmsh(atoms%jmtd,atoms%ntype))
     112          24 :       ALLOCATE(atoms%volmts(atoms%ntype))
     113             :    
     114          24 :       ALLOCATE(atoms%ncv(atoms%ntype))
     115          24 :       ALLOCATE(atoms%ngopr(atoms%nat))
     116          24 :       ALLOCATE(atoms%lapw_l(atoms%ntype))
     117          24 :       ALLOCATE(atoms%invsat(atoms%nat))
     118          24 :       ALLOCATE(atoms%nlhtyp(atoms%ntype),atoms%ntypsy(atoms%nat))
     119             : 
     120          24 :       ALLOCATE(sphhar%clnu(sphhar%memd,0:sphhar%nlhd,sphhar%ntypsd))
     121          24 :       ALLOCATE(sphhar%llh(0:sphhar%nlhd,sphhar%ntypsd))
     122          24 :       ALLOCATE(sphhar%mlh(sphhar%memd,0:sphhar%nlhd,sphhar%ntypsd))
     123          24 :       ALLOCATE(sphhar%nlh(sphhar%ntypsd),sphhar%nmem(0:sphhar%nlhd,sphhar%ntypsd))
     124             : 
     125          24 :       ALLOCATE(noco%l_relax(atoms%ntype),noco%b_con(2,atoms%ntype))
     126          24 :       ALLOCATE(noco%alphInit(atoms%ntype),noco%alph(atoms%ntype),noco%beta(atoms%ntype))
     127             : 
     128             :   
     129          24 :       ALLOCATE(kpts%specialPoints(3,kpts%numSpecialPoints))
     130          24 :       ALLOCATE(kpts%specialPointNames(kpts%numSpecialPoints))
     131          24 :       ALLOCATE(kpts%bk(3,kpts%nkpt))
     132          24 :       ALLOCATE(kpts%wtkpt(kpts%nkpt))
     133          24 :       ALLOCATE(kpts%ntetra(4,kpts%ntet))
     134          24 :       ALLOCATE(kpts%voltet(kpts%ntet))
     135             : 
     136             :     
     137          24 :       ALLOCATE(sym%mrot(3,3,sym%nop),sym%tau(3,sym%nop))
     138          24 :       ALLOCATE(sym%invarop(atoms%nat,sym%nop),sym%invarind(atoms%nat))
     139          24 :       ALLOCATE(sym%multab(sym%nop,sym%nop),sym%invtab(sym%nop))
     140          24 :       ALLOCATE(sym%invsatnr(atoms%nat),sym%d_wgn(-3:3,-3:3,3,sym%nop))
     141             : 
     142          24 :       ALLOCATE(atoms%llo(atoms%nlod,atoms%ntype))
     143          24 :       ALLOCATE(atoms%ulo_der(atoms%nlod,atoms%ntype))
     144          24 :       ALLOCATE(atoms%l_dulo(atoms%nlod,atoms%ntype)) ! For what is this?
     145          24 :       ALLOCATE(atoms%lo1l(0:atoms%llod,atoms%ntype))
     146          24 :       ALLOCATE(atoms%nlol(0:atoms%llod,atoms%ntype))
     147             : 
     148          24 :       ALLOCATE(atoms%coreStateOccs(dimension%nstd,2,atoms%ntype));atoms%coreStateOccs=0.0
     149          24 :       ALLOCATE(atoms%coreStateNprnc(dimension%nstd,atoms%ntype))
     150          24 :       ALLOCATE(atoms%coreStateKappa(dimension%nstd,atoms%ntype))
     151             : 
     152          24 :       ALLOCATE(vacuum%izlay(vacuum%layerd,2))
     153             : 
     154          24 :       ALLOCATE(stars%ig(-stars%mx1:stars%mx1,-stars%mx2:stars%mx2,-stars%mx3:stars%mx3))
     155          24 :       ALLOCATE(stars%ig2(stars%ng3))
     156          24 :       ALLOCATE(stars%kv2(2,stars%ng2),stars%kv3(3,stars%ng3))
     157          24 :       ALLOCATE(stars%nstr2(stars%ng2),stars%nstr(stars%ng3))
     158          24 :       ALLOCATE(stars%sk2(stars%ng2),stars%sk3(stars%ng3),stars%phi2(stars%ng2))
     159          24 :       ALLOCATE(stars%igfft(0:stars%kimax,2),stars%igfft2(0:stars%kimax2,2))
     160          24 :       ALLOCATE(stars%rgphs(-stars%mx1:stars%mx1,-stars%mx2:stars%mx2,-stars%mx3:stars%mx3))
     161          24 :       ALLOCATE(stars%pgfft(0:stars%kimax),stars%pgfft2(0:stars%kimax2))
     162          24 :       IF(ALLOCATED(stars%ufft)) DEALLOCATE(stars%ufft)
     163          24 :       ALLOCATE(stars%ufft(0:27*stars%mx1*stars%mx2*stars%mx3-1),stars%ustep(stars%ng3))
     164             : 
     165          24 :       ALLOCATE(oneD%ig1(-oneD%odd%k3:oneD%odd%k3,-oneD%odd%M:oneD%odd%M))
     166          24 :       ALLOCATE(oneD%kv1(2,oneD%odd%n2d),oneD%nstr1(oneD%odd%n2d))
     167          24 :       ALLOCATE(oneD%ngopr1(atoms%nat),oneD%mrot1(3,3,oneD%odd%nop),oneD%tau1(3,oneD%odd%nop))
     168          24 :       ALLOCATE(oneD%invtab1(oneD%odd%nop),oneD%multab1(oneD%odd%nop,oneD%odd%nop))
     169          24 :       ALLOCATE(oneD%igfft1(0:oneD%odd%nn2d-1,2),oneD%pgfft1(0:oneD%odd%nn2d-1))
     170             : 
     171          24 :       ALLOCATE(hybrid%nindx(0:atoms%lmaxd,atoms%ntype))
     172          24 :       ALLOCATE(hybrid%select1(4,atoms%ntype),hybrid%lcutm1(atoms%ntype))
     173          24 :       ALLOCATE(hybrid%lcutwf(atoms%ntype))
     174             : 
     175          24 :       IF (xcpot%needs_grad()) THEN
     176          20 :          ALLOCATE (stars%ft2_gfx(0:stars%kimax2),stars%ft2_gfy(0:stars%kimax2))
     177             :          ALLOCATE (oneD%pgft1x(0:oneD%odd%nn2d-1),oneD%pgft1xx(0:oneD%odd%nn2d-1),&
     178             :                    oneD%pgft1xy(0:oneD%odd%nn2d-1),&
     179          20 :                    oneD%pgft1y(0:oneD%odd%nn2d-1),oneD%pgft1yy(0:oneD%odd%nn2d-1))
     180             :       ELSE
     181           4 :          ALLOCATE (stars%ft2_gfx(0:1),stars%ft2_gfy(0:1))
     182             :          ALLOCATE (oneD%pgft1x(0:1),oneD%pgft1xx(0:1),oneD%pgft1xy(0:1),&
     183           4 :                    oneD%pgft1y(0:1),oneD%pgft1yy(0:1))
     184             :       END IF
     185             : 
     186             :       ! Explicit atom-dependent xc functional
     187          24 :       ALLOCATE(atoms%namex(atoms%ntype))
     188          24 :       ALLOCATE(atoms%relcor(atoms%ntype))
     189          24 :       ALLOCATE(atoms%icorr(atoms%ntype))
     190          24 :       ALLOCATE(atoms%krla(atoms%ntype))
     191          79 :       atoms%namex = ''
     192          24 :       atoms%icorr = -99
     193             : 
     194          24 :       oneD%odd%nq2 = oneD%odd%n2d
     195             : 
     196          24 :       stars%sk2(:) = 0.0
     197          24 :       stars%phi2(:) = 0.0
     198             :    END IF
     199             : #endif
     200          48 : END SUBROUTINE initParallelProcesses
     201             : 
     202             : END MODULE m_InitParallelProcesses

Generated by: LCOV version 1.13