ifdef preprocessor macro refactoring (PHonon package)

git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@12962 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
spigafi 2016-09-14 20:20:07 +00:00
parent 6738eb9e33
commit 441f121b0c
21 changed files with 27 additions and 27 deletions

View File

@ -18,7 +18,7 @@ subroutine stop_pp
use io_files, only: iunwfc
use mp_global, only: mp_global_end
USE parallel_include
#ifdef __MPI
#if defined(__MPI)
integer :: info
logical :: op

View File

@ -163,7 +163,7 @@ SUBROUTINE d2ion (nat,ntyp,ityp,zv,tau,alat,omega, &
ENDDO
!
30 CONTINUE
#ifdef __MPI
#if defined(__MPI)
CALL mp_sum( dyn, intra_pool_comm )
#endif
RETURN

View File

@ -111,7 +111,7 @@ SUBROUTINE dielec(do_zstar)
ENDDO
ENDDO
! end do
#ifdef __MPI
#if defined(__MPI)
IF (do_zstar) CALL mp_sum( zstar, intra_pool_comm )
CALL mp_sum( epsilon0, intra_pool_comm )
#endif

View File

@ -45,7 +45,7 @@ SUBROUTINE drhodv(nu_i)
dynel(nu_j) = dynel(nu_j) + 2.0d0*wk(ik)*work(ibnd)
ENDDO
ENDDO
#ifdef __MPI
#if defined(__MPI)
CALL mp_sum( dynel, intra_pool_comm )
#endif
!

View File

@ -112,7 +112,7 @@ SUBROUTINE dynmatcc(dyncc)
!
DEALLOCATE(rhocg)
DEALLOCATE(gc)
#ifdef __MPI
#if defined(__MPI)
CALL mp_sum( dyncc1, intra_pool_comm )
#endif
CALL dscal(3*nat*3*nat,-omega,dyncc1,1)

View File

@ -33,7 +33,7 @@ PROGRAM phcg
!
! Initialize MPI, clocks, print initial messages
!
#ifdef __MPI
#if defined(__MPI)
CALL mp_startup ( )
#endif
CALL environment_start ( code )

View File

@ -89,7 +89,7 @@ SUBROUTINE rhod2vkb(dyn0)
#ifdef GAMMA
dynloc(:,:) = 2.d0 * dynloc(:,:)
#endif
#ifdef __MPI
#if defined(__MPI)
CALL mp_sum( dynloc, intra_pool_comm )
#endif
!

View File

@ -70,7 +70,7 @@ subroutine add_zstar_ue_us(imode0,npe)
!
pdsp = (0.d0,0.d0)
call psidspsi (ik, u (1, mode), pdsp )
#ifdef __MPI
#if defined(__MPI)
call mp_sum(pdsp, intra_bgrp_comm )
#endif
!

View File

@ -13,7 +13,7 @@ subroutine bcast_ph_input ( )
! the other processors
!
!
#ifdef __MPI
#if defined(__MPI)
use mp, only: mp_bcast
use mp_world, only: world_comm

View File

@ -29,7 +29,7 @@ SUBROUTINE davcio_drho( drho, lrec, iunit, nrec, isw )
INTEGER :: iunit, lrec, nrec, isw
COMPLEX(DP) :: drho(dfftp%nnr,nspin_mag)
!
#ifdef __MPI
#if defined(__MPI)
!
! ... local variables
!

View File

@ -164,7 +164,7 @@ subroutine dvpsi_e2
call davcio_drho (aux3 (1, ipa), lrdrho, iudrho, ipa, -1)
enddo
#ifdef __MPI
#if defined(__MPI)
if (my_pool_id .ne. 0) goto 100
#endif
d2muxc (:) = 0.d0

View File

@ -626,7 +626,7 @@ SUBROUTINE elphsum ( )
kunit_save=kunit
kunit=1
#ifdef __MPI
#if defined(__MPI)
ALLOCATE(etfit_dist(nbnd,nksfit_dist))
ALLOCATE(wkfit_dist(nksfit_dist))
CALL poolscatter( 1, nksfit, wkfit, nksfit_dist, wkfit_dist )
@ -649,7 +649,7 @@ SUBROUTINE elphsum ( )
dosfit(isig) = dos_ef ( ngauss1, deg(isig), effit(isig), etfit_dist, &
wkfit_dist, nksfit_dist, nbnd) / 2.0d0
enddo
#ifdef __MPI
#if defined(__MPI)
DEALLOCATE(etfit_dist)
DEALLOCATE(wkfit_dist)
#endif

View File

@ -170,7 +170,7 @@ subroutine gmressolve_all (h_psi, cg_psi, e, d0psi, dpsi, h_diag, &
!print*,'r3',sum(dpsi),sum(d0psi)
! norm of pre. r : bet = |r|
bet(ibnd) = zdotc (ndim, r(1,ibnd), 1, r(1,ibnd), 1)
#ifdef __MPI
#if defined(__MPI)
call mp_sum ( bet(ibnd), intra_bgrp_comm )
#endif
bet(ibnd) = sqrt( bet(ibnd) )
@ -231,7 +231,7 @@ subroutine gmressolve_all (h_psi, cg_psi, e, d0psi, dpsi, h_diag, &
! compute hm(i,j)
! hm(i,j) = zdotc (ndim, w(1,ibnd), 1, v(1,ibnd,i), 1)
hm4para(1) = zdotc (ndim, w(1,ibnd), 1, v(1,ibnd,i), 1)
#ifdef __MPI
#if defined(__MPI)
call mp_sum ( hm4para, intra_bgrp_comm )
#endif
hm(i,j) = hm4para(1)
@ -242,7 +242,7 @@ subroutine gmressolve_all (h_psi, cg_psi, e, d0psi, dpsi, h_diag, &
! compute hm(j+1,j)
! hm(j+1,j) = zdotc (ndim, w(1,ibnd), 1, w(1,ibnd), 1)
hm4para(1) = zdotc (ndim, w(1,ibnd), 1, w(1,ibnd), 1)
#ifdef __MPI
#if defined(__MPI)
call mp_sum ( hm4para, intra_bgrp_comm )
#endif
hm(j+1,j) = hm4para(1)

View File

@ -109,7 +109,7 @@ subroutine incdrhous (drhoscf, weight, ik, dbecsum, evcr, wgg, becq, &
endif
enddo
enddo
#ifdef __MPI
#if defined(__MPI)
call mp_sum (ps1,intra_bgrp_comm)
#endif
dpsi (:,:) = (0.d0, 0.d0)

View File

@ -135,7 +135,7 @@ subroutine incdrhous_nc (drhoscf, weight, ik, dbecsum, evcr, wgg, becq, &
endif
enddo
enddo
#ifdef __MPI
#if defined(__MPI)
call mp_sum (ps1, intra_bgrp_comm)
#endif
dpsi (:,:) = (0.d0, 0.d0)

View File

@ -162,7 +162,7 @@ subroutine set_irr (nat, at, bg, xq, s, sr, tau, ntyp, ityp, ftau, invs, nsym, &
USE constants, ONLY: tpi
USE random_numbers, ONLY : randy
USE rap_point_group, ONLY : name_rap
#ifdef __MPI
#if defined(__MPI)
use mp, only: mp_bcast
use io_global, only : ionode_id
use mp_global, only : intra_image_comm
@ -436,7 +436,7 @@ subroutine set_irr (nat, at, bg, xq, s, sr, tau, ntyp, ityp, ftau, invs, nsym, &
! nsymq=1
! minus_q=.false.
#ifdef __MPI
#if defined(__MPI)
!
! parallel stuff: first node broadcasts everything to all nodes
!
@ -912,7 +912,7 @@ subroutine set_irr_sym (nat, at, bg, xq, s, rtau, irt, &
enddo
#ifdef __MPI
#if defined(__MPI)
!
! parallel stuff: first node broadcasts everything to all nodes
!

View File

@ -103,7 +103,7 @@ subroutine print_clock_ph
call print_clock ('mix_pot')
call print_clock ('ef_shift')
call print_clock ('localdos')
#ifdef __MPI
#if defined(__MPI)
call print_clock ('psymdvscf')
#else
call print_clock ('symdvscf')

View File

@ -22,7 +22,7 @@ subroutine psyme2 (dvtosym)
! the potential to symmetrize
!-local variable
#ifdef __MPI
#if defined(__MPI)
integer :: i, iper, npp0
complex(DP), allocatable :: ddvtosym (:,:)

View File

@ -39,7 +39,7 @@ subroutine read_wfc_rspace_and_fwfft( evc , ik , lrec , iunit , npw , igmap )
!
! read wfc in real space
!
#ifdef __MPI
#if defined(__MPI)
!
! ... First task reads and broadcasts ddrho to all pools
!

View File

@ -527,7 +527,7 @@ SUBROUTINE solve_linter (irr, imode0, npe, drhoscf)
! of the change of potential and Q
!
call newdq (dvscfin, npe)
#ifdef __MPI
#if defined(__MPI)
aux_avg (1) = DBLE (ltaver)
aux_avg (2) = DBLE (lintercall)
call mp_sum ( aux_avg, inter_pool_comm )

View File

@ -202,7 +202,7 @@ subroutine zstar_eu_us
!
pdsp = (0.d0,0.d0)
call psidspsi (ik, u (1, mode), pdsp )
#ifdef __MPI
#if defined(__MPI)
call mp_sum( pdsp, intra_bgrp_comm )
#endif
!
@ -256,7 +256,7 @@ subroutine zstar_eu_us
deallocate (aux1)
fact=1.0_DP
#ifdef __MPI
#if defined(__MPI)
fact=1.0_DP/nproc_pool/npool
#endif
IF (okpaw) THEN