• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Superconducting Toolkit


コミットメタ情報

リビジョンe4be32914c7d23b7d13105100e309f5c6a7e884b (tree)
日時2020-11-05 15:16:08
作者Mitsuaki Kawamura <kawamitsuaki@gmai...>
コミッターMitsuaki Kawamura

ログメッセージ

Merge remote-tracking branch 'remotes/qe-gitlab/develop' into develop

変更サマリ

差分

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,7 +19,7 @@ if(${qe_BINARY_DIR} STREQUAL ${qe_SOURCE_DIR})
1919 endif()
2020
2121 # CMake < v3.18 cannot discover the ARM Performance Library
22-if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
22+if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*|arm64.*|ARM64.*)")
2323 if(CMAKE_VERSION VERSION_LESS 3.18.0)
2424 message("-- CMake versions less then 3.18 cannot automatically discover the ARM Performance Library!")
2525 endif()
@@ -197,7 +197,36 @@ add_library(QE::LAPACK ALIAS qe_lapack)
197197 qe_install_targets(qe_lapack)
198198 #######################################################################
199199 if(NOT QE_LAPACK_INTERNAL)
200- find_package(LAPACK)
200+ if(NOT BLA_VENDOR)
201+ if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64.*")
202+ message(STATUS "Trying to find LAPACK from Intel MKL")
203+ if(QE_ENABLE_OPENMP)
204+ SET(BLA_VENDOR Intel10_64lp)
205+ else()
206+ SET(BLA_VENDOR Intel10_64lp_seq)
207+ endif()
208+ find_package(LAPACK)
209+ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i686.*|i386.*|x86.*")
210+ message(STATUS "Trying to find LAPACK from Intel MKL - 32bit")
211+ SET(BLA_VENDOR Intel10_32)
212+ find_package(LAPACK)
213+ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*|arm64.*|ARM64.*)")
214+ message(STATUS "Trying to find LAPACK from ARM Performance Library")
215+ if(QE_ENABLE_OPENMP)
216+ SET(BLA_VENDOR Arm_mp)
217+ else()
218+ SET(BLA_VENDOR Arm)
219+ endif()
220+ find_package(LAPACK)
221+ endif()
222+ if(NOT LAPACK_FOUND)
223+ message(STATUS "Trying to find alternative LAPACK libraries")
224+ SET(BLA_VENDOR All)
225+ find_package(LAPACK)
226+ endif()
227+ else()
228+ find_package(LAPACK)
229+ endif()
201230 if(LAPACK_FOUND)
202231 list(APPEND _lapack_libs
203232 ${BLAS_LIBRARIES}
--- a/Doc/user_guide.tex
+++ b/Doc/user_guide.tex
@@ -1099,7 +1099,9 @@ that runs on different machines, compile it on the oldest machine you have
10991099
11001100 \paragraph{Linux PCs with gfortran}
11011101
1102-You need at least gfortran v.4.4 or later to properly compile \qe.
1102+Gfortran v.4.8.5, still often found on CentOS machines, no longer compiles
1103+\qe\ v.6.6 or later, due to a gfortran bug. You need at least gfortran v.4.9.X.
1104+
11031105
11041106 "There is a known incompatibility problem between different calling
11051107 convention for Fortran functions that return complex values [...]
--- a/HP/Doc/INPUT_HP.def
+++ b/HP/Doc/INPUT_HP.def
@@ -85,7 +85,8 @@ input_description -distribution {Quantum Espresso} -package PWscf -program hp.x
8585 info {
8686 If .true. determines the number of perturbations
8787 (i.e. which atoms will be perturbed) and exits smoothly
88- without performing any calculation.
88+ without performing any calculation. For DFT+U+V, it also
89+ determines the indices of inter-site couples.
8990 }
9091 }
9192
--- a/HP/src/hp_main.f90
+++ b/HP/src/hp_main.f90
@@ -214,10 +214,10 @@ PROGRAM hp_main
214214 !
215215 ! Calculation of Hubbard U (serial post-processing)
216216 !
217- IF (ionode) CALL hp_postproc()
218- !
219217 103 CONTINUE
220218 !
219+ IF (ionode) CALL hp_postproc()
220+ !
221221 ! Deallocate some arrays
222222 !
223223 CALL hp_dealloc_2()
--- a/HP/src/hp_postproc.f90
+++ b/HP/src/hp_postproc.f90
@@ -26,7 +26,8 @@ SUBROUTINE hp_postproc
2626 skip_type, equiv_type, skip_atom, &
2727 tmp_dir_save, find_atpert, magn, &
2828 nath_pert, ityp_new, ntyp_new, atm_new, &
29- num_neigh, lmin, rmax, nq1, nq2, nq3
29+ num_neigh, lmin, rmax, nq1, nq2, nq3, &
30+ determine_num_pert_only
3031 !
3132 IMPLICIT NONE
3233 !
@@ -60,16 +61,26 @@ SUBROUTINE hp_postproc
6061 !
6162 CHARACTER(len=256) :: filenameU
6263 INTEGER, EXTERNAL :: find_free_unit
64+ LOGICAL :: determine_indices_only
6365 !
6466 CALL start_clock('hp_postproc')
6567 !
66- WRITE( stdout, '(/5x,"Post-processing calculation of Hubbard parameters ...",/)')
68+ IF (lda_plus_u_kind==2 .AND. determine_num_pert_only) THEN
69+ ! DFT+U+V: determine indices of couples for Hubbard V, without computing U and V.
70+ ! This is useful when DFT+U+V is used for large supercells. So one can determine
71+ ! indices for a supercell and use V computed for a primitive cell.
72+ determine_indices_only = .true.
73+ WRITE( stdout, '(/5x,"Determination of the indices of inter-site couples ...",/)')
74+ ELSE
75+ determine_indices_only = .false.
76+ WRITE( stdout, '(/5x,"Post-processing calculation of Hubbard parameters ...",/)')
77+ ENDIF
6778 !
6879 ! Allocate various arrays
6980 CALL alloc_pp()
7081 !
7182 ! Read chi0 and chi from file
72- CALL read_chi()
83+ If (.NOT.determine_indices_only) CALL read_chi()
7384 !
7485 ! If we merge types of atoms (e.g. Ni_up and Ni_down)
7586 ! then we have to keep track of their total magnetization
@@ -85,6 +96,11 @@ SUBROUTINE hp_postproc
8596 ! between virtual atoms
8697 CALL atomic_dist()
8798 !
99+ IF (determine_indices_only) THEN
100+ CALL write_intersite(.false.)
101+ GO TO 15
102+ ENDIF
103+ !
88104 ! Average similar elements in chi0 and chi
89105 CALL average_similar_elements(chi0)
90106 CALL average_similar_elements(chi)
@@ -104,6 +120,8 @@ SUBROUTINE hp_postproc
104120 ! Calculate Hubbard parameters and write them to file
105121 CALL calculate_Hubbard_parameters()
106122 !
123+15 CONTINUE
124+ !
107125 ! Deallocate various arrays
108126 CALL dealloc_pp()
109127 !
@@ -145,6 +163,11 @@ SUBROUTINE alloc_pp
145163 ALLOCATE ( inv_chi0bg(nath_scbg, nath_scbg) )
146164 ALLOCATE ( Hubbard_matrix(nath_scbg, nath_scbg) )
147165 !
166+ ! Find and open unit to write info
167+ iunitU = find_free_unit()
168+ filenameU = trim(prefix) // ".Hubbard_parameters.dat"
169+ OPEN(iunitU, file = filenameU, form = 'formatted', status = 'unknown')
170+ !
148171 RETURN
149172 !
150173 END SUBROUTINE alloc_pp
@@ -172,6 +195,8 @@ SUBROUTINE dealloc_pp
172195 DEALLOCATE (inv_chi0bg)
173196 DEALLOCATE (Hubbard_matrix)
174197 !
198+ CLOSE(iunitU)
199+ !
175200 RETURN
176201 !
177202 END SUBROUTINE dealloc_pp
@@ -670,11 +695,6 @@ SUBROUTINE calculate_Hubbard_parameters()
670695 IMPLICIT NONE
671696 INTEGER :: nt1, nt2
672697 !
673- ! Find and open unit to write info
674- iunitU = find_free_unit()
675- filenameU = trim(prefix) // ".Hubbard_parameters.dat"
676- OPEN(iunitU, file = filenameU, form = 'formatted', status = 'unknown')
677- !
678698 ! Calculate the matrix of Hubbard parametres: CHI0^{-1} - CHI^{-1}
679699 !
680700 DO na = 1, nath_scbg
@@ -708,7 +728,7 @@ SUBROUTINE calculate_Hubbard_parameters()
708728 !
709729 ! Write Hubbard V (i.e. off-diagonal elements of the Hubbard matrix)
710730 !
711- IF ( lda_plus_u_kind.EQ.2 ) CALL write_Hubbard_V()
731+ IF ( lda_plus_u_kind.EQ.2 ) CALL write_intersite(.true.)
712732 !
713733 ! Write the information about the response matrices chi0 and chi,
714734 ! about their inverse matrices, and about the entire matrix of
@@ -764,13 +784,13 @@ SUBROUTINE calculate_Hubbard_parameters()
764784 !
765785 ENDIF
766786 !
767- CLOSE(iunitU)
787+ !CLOSE(iunitU)
768788 !
769789 RETURN
770790 !
771791 END SUBROUTINE calculate_Hubbard_parameters
772792
773-SUBROUTINE write_Hubbard_V()
793+SUBROUTINE write_intersite (lflag)
774794 !
775795 USE parameters, ONLY : sc_size
776796 !
@@ -783,18 +803,30 @@ SUBROUTINE write_Hubbard_V()
783803 INTEGER :: ne, nc_min, ipol, tempunit, counter
784804 CHARACTER(len=80) :: tempfile
785805 REAL(DP) :: auxdist
806+ LOGICAL :: lflag ! if .true. then write V to file
807+ ! if .false. then do not write V to file
786808 !
787809 ! Find and open unit to write Hubbard_V parameters
788810 tempunit = find_free_unit()
789811 tempfile = TRIM("parameters.out")
790812 OPEN(tempunit, file = tempfile, form = 'formatted', status = 'unknown')
791813 !
792- WRITE(iunitU,'(/27x,"Hubbard V parameters:")')
793- WRITE(iunitU,'(22x,"(adapted for a supercell",1x,i1,"x",i1,"x",i1,")",/)') 2*sc_size+1, 2*sc_size+1, 2*sc_size+1
794- WRITE(iunitU,*) ' Atom 1 ', ' Atom 2 ', ' Distance (Bohr) ', ' Hubbard V (eV)'
795- WRITE(iunitU,*)
796- !
797- WRITE(tempunit,*) '# Atom 1 ', ' Atom 2 ', ' Hubbard V (eV)'
814+ IF (lflag) THEN
815+ WRITE(iunitU,'(/27x,"Hubbard V parameters:")')
816+ ELSE
817+ WRITE(iunitU,'(/17x,"Indices and distances for inter-site couples:")')
818+ ENDIF
819+ WRITE(iunitU,'(22x,"(adapted for a supercell",1x,i1,"x",i1,"x",i1,")",/)') &
820+ 2*sc_size+1, 2*sc_size+1, 2*sc_size+1
821+ IF (lflag) THEN
822+ WRITE(iunitU,*) ' Atom 1 ', ' Atom 2 ', ' Distance (Bohr) ', ' Hubbard V (eV)'
823+ WRITE(iunitU,*)
824+ WRITE(tempunit,*) '# Atom 1 ', ' Atom 2 ', ' Hubbard V (eV)'
825+ ELSE
826+ WRITE(iunitU,*) ' Atom 1 ', ' Atom 2 ', ' Distance (Bohr) '
827+ WRITE(iunitU,*)
828+ WRITE(tempunit,*) '# Atom 1 ', ' Atom 2 '
829+ ENDIF
798830 !
799831 ALLOCATE(dist(nath_sc))
800832 ALLOCATE(distord(nath_sc))
@@ -890,14 +922,28 @@ SUBROUTINE write_Hubbard_V()
890922 DO nb = 1, nath_sc
891923 IF ( auxindex(na,indexord(nb)) > 0 ) THEN
892924 counter = counter + 1
893- WRITE(iunitU,'(11x,i3,x,a4,x,i5,x,a4,2x,f12.6,4x,f10.4)') &
894- na, atm_new(ityp_sc(na)), auxindex(na,indexord(nb)), atm_new(typeord(nb)), &
895- dist_sc(na,indexord(nb)), Hubbard_matrix(na,indexord(nb))
896- IF ( nb.LE.(num_neigh+1) .AND. &
897- dist_sc(na,indexord(nb)).LE.rmax .AND. &
898- Hubbard_l(ityp(na)).GE.lmin ) THEN
899- WRITE(tempunit,'(3x,i3,4x,i5,3x,f10.4)') &
900- na, auxindex(na,indexord(nb)), Hubbard_matrix(na,indexord(nb))
925+ IF (lflag) THEN
926+ ! Print couples and Hubbard V
927+ WRITE(iunitU,'(11x,i3,x,a4,x,i5,x,a4,2x,f12.6,4x,f10.4)') &
928+ na, atm_new(ityp_sc(na)), auxindex(na,indexord(nb)), atm_new(typeord(nb)), &
929+ dist_sc(na,indexord(nb)), Hubbard_matrix(na,indexord(nb))
930+ IF ( nb.LE.(num_neigh+1) .AND. &
931+ dist_sc(na,indexord(nb)).LE.rmax .AND. &
932+ Hubbard_l(ityp(na)).GE.lmin ) THEN
933+ WRITE(tempunit,'(3x,i3,4x,i5,3x,f10.4)') &
934+ na, auxindex(na,indexord(nb)), Hubbard_matrix(na,indexord(nb))
935+ ENDIF
936+ ELSE
937+ ! Print couples only
938+ WRITE(iunitU,'(11x,i3,x,a4,x,i5,x,a4,2x,f12.6)') &
939+ na, atm_new(ityp_sc(na)), auxindex(na,indexord(nb)), atm_new(typeord(nb)), &
940+ dist_sc(na,indexord(nb))
941+ IF ( nb.LE.(num_neigh+1) .AND. &
942+ dist_sc(na,indexord(nb)).LE.rmax .AND. &
943+ Hubbard_l(ityp(na)).GE.lmin ) THEN
944+ WRITE(tempunit,'(3x,i3,4x,i5)') &
945+ na, auxindex(na,indexord(nb))
946+ ENDIF
901947 ENDIF
902948 ENDIF
903949 ENDDO
@@ -919,6 +965,6 @@ SUBROUTINE write_Hubbard_V()
919965 !
920966 RETURN
921967 !
922-END SUBROUTINE write_Hubbard_V
968+END SUBROUTINE write_intersite
923969
924970 END SUBROUTINE hp_postproc
--- a/LAXlib/rdiaghg.f90
+++ b/LAXlib/rdiaghg.f90
@@ -85,16 +85,7 @@ SUBROUTINE laxlib_rdiaghg( n, m, h, s, ldh, e, v, me_bgrp, root_bgrp, intra_bgrp
8585 end do
8686 !$omp end parallel do
8787 !
88-#if defined (__ESSL)
89- !
90- ! ... there is a name conflict between essl and lapack ...
91- !
92- CALL DSYGV( 1, v, ldh, s, ldh, e, v, ldh, n, work, lwork )
93- !
94- info = 0
95-#else
9688 CALL DSYGV( 1, 'V', 'U', n, v, ldh, s, ldh, e, work, lwork, info )
97-#endif
9889 !
9990 ELSE
10091 !
--- a/PP/src/pw2wannier90.f90
+++ b/PP/src/pw2wannier90.f90
@@ -425,7 +425,7 @@ PROGRAM pw2wannier90
425425 IF(write_mmn ) CALL print_clock( 'compute_mmn' )
426426 IF(write_unk ) CALL print_clock( 'write_unk' )
427427 IF(write_unkg ) CALL print_clock( 'write_parity' )
428- !! not sure if this should be called also in 'library' mode or not !!
428+ ! not sure if this should be called also in 'library' mode or not !!
429429 CALL environment_end ( 'PW2WANNIER' )
430430 IF ( ionode ) WRITE( stdout, * )
431431 CALL stop_pp
@@ -2148,72 +2148,7 @@ SUBROUTINE compute_mmn
21482148 !
21492149 Mkb(:,:) = (0.0d0,0.0d0)
21502150 !
2151- IF (any_uspp) THEN
2152- ijkb0 = 0
2153- DO nt = 1, ntyp
2154- IF ( upf(nt)%tvanp ) THEN
2155- DO na = 1, nat
2156- !
2157- arg = dot_product( dxk(:,ind), tau(:,na) ) * tpi
2158- phase1 = cmplx( cos(arg), -sin(arg) ,kind=DP)
2159- !
2160- IF ( ityp(na) == nt ) THEN
2161- DO jh = 1, nh(nt)
2162- jkb = ijkb0 + jh
2163- DO ih = 1, nh(nt)
2164- ikb = ijkb0 + ih
2165- !
2166- DO m = 1,nbnd
2167- IF (excluded_band(m)) CYCLE
2168- IF (gamma_only) THEN
2169- DO n=1,m ! Mkb(m,n) is symmetric in m and n for gamma_only case
2170- IF (excluded_band(n)) CYCLE
2171- Mkb(m,n) = Mkb(m,n) + &
2172- phase1 * qb(ih,jh,nt,ind) * &
2173- becp%r(ikb,m) * rbecp2(jkb,n)
2174- ENDDO
2175- else if (noncolin) then
2176- DO n=1,nbnd
2177- IF (excluded_band(n)) CYCLE
2178- if (lspinorb) then
2179- Mkb(m,n) = Mkb(m,n) + &
2180- phase1 * ( &
2181- qq_so(ih,jh,1,nt) * conjg( becp%nc(ikb, 1, m) ) * becp2_nc(jkb, 1, n) &
2182- + qq_so(ih,jh,2,nt) * conjg( becp%nc(ikb, 1, m) ) * becp2_nc(jkb, 2, n) &
2183- + qq_so(ih,jh,3,nt) * conjg( becp%nc(ikb, 2, m) ) * becp2_nc(jkb, 1, n) &
2184- + qq_so(ih,jh,4,nt) * conjg( becp%nc(ikb, 2, m) ) * becp2_nc(jkb, 2, n) &
2185- )
2186- else
2187- Mkb(m,n) = Mkb(m,n) + &
2188- phase1 * qb(ih,jh,nt,ind) * &
2189- (conjg( becp%nc(ikb, 1, m) ) * becp2_nc(jkb, 1, n) &
2190- + conjg( becp%nc(ikb, 2, m) ) * becp2_nc(jkb, 2, n) )
2191- endif
2192- ENDDO
2193- ELSE
2194- DO n=1,nbnd
2195- IF (excluded_band(n)) CYCLE
2196- Mkb(m,n) = Mkb(m,n) + &
2197- phase1 * qb(ih,jh,nt,ind) * &
2198- conjg( becp%k(ikb,m) ) * becp2(jkb,n)
2199- ENDDO
2200- ENDIF
2201- ENDDO ! m
2202- ENDDO !ih
2203- ENDDO !jh
2204- ijkb0 = ijkb0 + nh(nt)
2205- ENDIF !ityp
2206- ENDDO !nat
2207- ELSE !tvanp
2208- DO na = 1, nat
2209- IF ( ityp(na) == nt ) ijkb0 = ijkb0 + nh(nt)
2210- ENDDO
2211- ENDIF !tvanp
2212- ENDDO !ntyp
2213- ENDIF ! any_uspp
2214- !
2215- !
2216-! loops on bands
2151+ ! loops on bands
22172152 !
22182153 IF (wan_mode=='standalone') THEN
22192154 IF (ionode) WRITE (iun_mmn,'(7i5)') ik, ikp, (g_kpb(ipol,ik,ib), ipol=1,3)
@@ -2228,7 +2163,7 @@ SUBROUTINE compute_mmn
22282163 istart=(ipol-1)*npwx+1
22292164 iend=istart+npw-1
22302165 psic_nc(dffts%nl (igk_k(1:npw,ik) ),ipol ) = evc(istart:iend, m)
2231- IF (.not.zerophase(ik,ib)) THEN
2166+ IF (.not.zerophase(ik,ib)) THEN
22322167 CALL invfft ('Wave', psic_nc(:,ipol), dffts)
22332168 psic_nc(1:dffts%nnr,ipol) = psic_nc(1:dffts%nnr,ipol) * &
22342169 phase(1:dffts%nnr)
@@ -2260,7 +2195,6 @@ SUBROUTINE compute_mmn
22602195 IF (excluded_band(n)) CYCLE
22612196 mmn = zdotc (npwq, aux,1,evcq(1,n),1) &
22622197 + conjg(zdotc(npwq,aux2,1,evcq(1,n),1))
2263- CALL mp_sum(mmn, intra_pool_comm)
22642198 Mkb(m,n) = mmn + Mkb(m,n)
22652199 IF (m/=n) Mkb(n,m) = Mkb(m,n) ! fill other half of matrix by symmetry
22662200 ENDDO
@@ -2273,19 +2207,88 @@ SUBROUTINE compute_mmn
22732207 mmn = mmn + zdotc (npwq, aux_nc(1,1),1,evcq(1,n),1) &
22742208 + zdotc (npwq, aux_nc(1,2),1,evcq(npwx+1,n),1)
22752209 ! end do
2276- CALL mp_sum(mmn, intra_pool_comm)
22772210 Mkb(m,n) = mmn + Mkb(m,n)
22782211 ENDDO
22792212 ELSE
22802213 DO n=1,nbnd
22812214 IF (excluded_band(n)) CYCLE
22822215 mmn = zdotc (npwq, aux,1,evcq(1,n),1)
2283- CALL mp_sum(mmn, intra_pool_comm)
22842216 Mkb(m,n) = mmn + Mkb(m,n)
22852217 ENDDO
22862218 ENDIF
22872219 ENDDO ! m
2288-
2220+ !
2221+ ! updating of the elements of the matrix Mkb
2222+ !
2223+ DO n=1,nbnd
2224+ IF (excluded_band(n)) CYCLE
2225+ CALL mp_sum(Mkb(:,n), intra_pool_comm)
2226+ ENDDO
2227+ !
2228+ IF (any_uspp) THEN
2229+ ijkb0 = 0
2230+ DO nt = 1, ntyp
2231+ IF ( upf(nt)%tvanp ) THEN
2232+ DO na = 1, nat
2233+ !
2234+ arg = dot_product( dxk(:,ind), tau(:,na) ) * tpi
2235+ phase1 = cmplx( cos(arg), -sin(arg) ,kind=DP)
2236+ !
2237+ IF ( ityp(na) == nt ) THEN
2238+ DO jh = 1, nh(nt)
2239+ jkb = ijkb0 + jh
2240+ DO ih = 1, nh(nt)
2241+ ikb = ijkb0 + ih
2242+ !
2243+ DO m = 1,nbnd
2244+ IF (excluded_band(m)) CYCLE
2245+ IF (gamma_only) THEN
2246+ DO n=1,m ! Mkb(m,n) is symmetric in m and n for gamma_only case
2247+ IF (excluded_band(n)) CYCLE
2248+ Mkb(m,n) = Mkb(m,n) + &
2249+ phase1 * qb(ih,jh,nt,ind) * &
2250+ becp%r(ikb,m) * rbecp2(jkb,n)
2251+ ENDDO
2252+ else if (noncolin) then
2253+ DO n=1,nbnd
2254+ IF (excluded_band(n)) CYCLE
2255+ if (lspinorb) then
2256+ Mkb(m,n) = Mkb(m,n) + &
2257+ phase1 * ( &
2258+ qq_so(ih,jh,1,nt) * conjg( becp%nc(ikb, 1, m) ) * becp2_nc(jkb, 1, n) &
2259+ + qq_so(ih,jh,2,nt) * conjg( becp%nc(ikb, 1, m) ) * becp2_nc(jkb, 2, n) &
2260+ + qq_so(ih,jh,3,nt) * conjg( becp%nc(ikb, 2, m) ) * becp2_nc(jkb, 1, n) &
2261+ + qq_so(ih,jh,4,nt) * conjg( becp%nc(ikb, 2, m) ) * becp2_nc(jkb, 2, n) &
2262+ )
2263+ else
2264+ Mkb(m,n) = Mkb(m,n) + &
2265+ phase1 * qb(ih,jh,nt,ind) * &
2266+ (conjg( becp%nc(ikb, 1, m) ) * becp2_nc(jkb, 1, n) &
2267+ + conjg( becp%nc(ikb, 2, m) ) * becp2_nc(jkb, 2, n) )
2268+ endif
2269+ ENDDO
2270+ ELSE
2271+ DO n=1,nbnd
2272+ IF (excluded_band(n)) CYCLE
2273+ Mkb(m,n) = Mkb(m,n) + &
2274+ phase1 * qb(ih,jh,nt,ind) * &
2275+ conjg( becp%k(ikb,m) ) * becp2(jkb,n)
2276+ ENDDO
2277+ ENDIF
2278+ ENDDO ! m
2279+ ENDDO !ih
2280+ ENDDO !jh
2281+ ijkb0 = ijkb0 + nh(nt)
2282+ ENDIF !ityp
2283+ ENDDO !nat
2284+ ELSE !tvanp
2285+ DO na = 1, nat
2286+ IF ( ityp(na) == nt ) ijkb0 = ijkb0 + nh(nt)
2287+ ENDDO
2288+ ENDIF !tvanp
2289+ ENDDO !ntyp
2290+ ENDIF ! any_uspp
2291+ !
22892292 ibnd_n = 0
22902293 DO n=1,nbnd
22912294 IF (excluded_band(n)) CYCLE
@@ -2303,7 +2306,7 @@ SUBROUTINE compute_mmn
23032306 ENDIF
23042307 ENDDO
23052308 ENDDO
2306-
2309+ !
23072310 ENDDO !ib
23082311 ENDDO !ik
23092312
--- a/PW/src/memory_report.f90
+++ b/PW/src/memory_report.f90
@@ -415,6 +415,10 @@ SUBROUTINE memory_report()
415415 IF ( totram .ge. GB ) WRITE( stdout, 1012 ) totram/GB, ' GB'
416416 END IF
417417 !
418+ ! check: more bands than plane waves? not good
419+ !
420+ IF ( npwx_g < nbndx ) CALL errore('memory_report','more bands than PWs!',1)
421+ !
418422 1010 format (/5x,'Estimated static dynamical RAM per process > ', F10.2, A3)
419423 1011 format (/5x,'Estimated max dynamical RAM per process > ', F10.2, A3)
420424 1012 format (/5x,'Estimated total dynamical RAM > ', F10.2, A3)
--- a/install/configure
+++ b/install/configure
@@ -2365,8 +2365,8 @@ $as_echo "${arch}" >&6; }
23652365 # Add all needed -D options to try_dflags
23662366 try_dflags=""
23672367
2368-# "-I../include" is required by IOTK ...
2369-try_iflags="-I\$(TOPDIR)/include -I\$(TOPDIR)/FoX/finclude -I\$(TOPDIR)/S3DE/iotk/include/"
2368+# Add needed include directories
2369+try_iflags="-I\$(TOPDIR)/include -I\$(TOPDIR)/FoX/finclude"
23702370
23712371 # Checking archiver...
23722372
--- a/install/configure.ac
+++ b/install/configure.ac
@@ -26,8 +26,8 @@ X_AC_QE_ARCH()
2626 # Add all needed -D options to try_dflags
2727 try_dflags=""
2828
29-# "-I../include" is required by IOTK ...
30-try_iflags="-I\$(TOPDIR)/include -I\$(TOPDIR)/FoX/finclude -I\$(TOPDIR)/S3DE/iotk/include/"
29+# Add needed include directories
30+try_iflags="-I\$(TOPDIR)/include -I\$(TOPDIR)/FoX/finclude "
3131
3232 # Checking archiver...
3333 X_AC_QE_AR()
--- a/install/make.inc.in
+++ b/install/make.inc.in
@@ -133,8 +133,6 @@ BLAS_LIBS = @blas_libs@
133133 # If you have nothing better, use the local copy
134134 # LAPACK_LIBS_SWITCH = internal
135135 # LAPACK_LIBS = $(TOPDIR)/LAPACK/liblapack.a
136-# For IBM machines with essl (-D__ESSL): load essl BEFORE lapack !
137-# remember that LAPACK_LIBS precedes BLAS_LIBS in loading order
138136
139137 LAPACK_LIBS = @lapack_libs@
140138 LAPACK_LIBS_SWITCH = @lapack_libs_switch@
--- a/install/make_lapack.inc.in
+++ b/install/make_lapack.inc.in
@@ -26,8 +26,8 @@ LOADOPTS = @ldflags@
2626 # Comment out the following line to include deprecated routines to the
2727 # LAPACK library.
2828 #
29-MAKEDEPRECATED = Yes
30-BUILD_DEPRECATED = Yes
29+# MAKEDEPRECATED = Yes
30+# BUILD_DEPRECATED = Yes
3131 #
3232 # Timer for the SECOND and DSECND routines
3333 #