From 78830ab2c8cd696b259d5b075f65186ff7eeca61 Mon Sep 17 00:00:00 2001 From: giannozz Date: Sat, 2 Apr 2016 07:44:22 +0000 Subject: [PATCH] Neither OpenMP nor MPI was properly working in the routine just added. The latter was actually a pre-existing bug: some variables related to the treatment of van der Waals interactions were neither set nor properly broadcast. Not a big deal until the day you want to use them. git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@12275 c92efa57-630b-4861-b058-cf58834340f0 --- PHonon/PH/d2ionq_mm.f90 | 2 +- PW/src/pw_restart.f90 | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/PHonon/PH/d2ionq_mm.f90 b/PHonon/PH/d2ionq_mm.f90 index 65d0e3849..ec8f177bc 100644 --- a/PHonon/PH/d2ionq_mm.f90 +++ b/PHonon/PH/d2ionq_mm.f90 @@ -109,7 +109,7 @@ SUBROUTINE d2ionq_mm ( alat , nat , ityp , at , bg , tau, q, deriv2_london ) par2 = par**2 ! #if defined(__INTEL_COMPILER) && (__INTEL_COMPILER < 1600) -!$omp parallel do private(nr,dist,exparg,expval,fac,add,eiqr,facF,addF,auxr,ipol,jpol) default(shared), reduction(+:aux,+:aux2) +!$omp parallel do private(nr,dist,exparg,expval,fac,add,eiqr,facF,addF,auxr,ipol,jpol) default(shared), reduction(+:aux), reduction(+:aux2) #endif DO nr = 1 , nrm ! diff --git a/PW/src/pw_restart.f90 b/PW/src/pw_restart.f90 index 0456281b1..31b2a75f9 100644 --- a/PW/src/pw_restart.f90 +++ b/PW/src/pw_restart.f90 @@ -2069,6 +2069,9 @@ MODULE pw_restart CALL mp_bcast( dft_name, ionode_id, intra_image_comm ) CALL mp_bcast( lda_plus_u, ionode_id, intra_image_comm ) CALL mp_bcast( inlc, ionode_id, intra_image_comm ) + CALL mp_bcast( llondon, ionode_id, intra_image_comm ) + CALL mp_bcast( lxdm, ionode_id, intra_image_comm ) + CALL mp_bcast( ts_vdw, ionode_id, intra_image_comm ) ! IF ( lda_plus_u ) THEN ! @@ -2087,7 +2090,16 @@ MODULE pw_restart IF ( inlc == 1 .OR. inlc == 2 ) THEN CALL mp_bcast( vdw_table_name, ionode_id, intra_image_comm ) END IF - + ! + IF ( llondon ) THEN + CALL mp_bcast( scal6, ionode_id, intra_image_comm ) + CALL mp_bcast( lon_rcut, ionode_id, intra_image_comm ) + END IF + ! + IF ( ts_vdw ) THEN + CALL mp_bcast( vdw_isolated, ionode_id, intra_image_comm ) + END IF + ! discard any further attempt to set a different dft CALL enforce_input_dft( dft_name, nomsg ) !