mirror of https://gitlab.com/QEF/q-e.git
Unneeded PAW initialization for non-PAW atoms could lead to crashes
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@10803 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
parent
c7603a34f9
commit
2c33624a94
|
@ -170,7 +170,7 @@ SUBROUTINE read_upf_v2(u, upf, grid, ierr) !
|
|||
CALL iotk_scan_attr(attr, 'total_psenergy', upf%etotps, default=0._dp)
|
||||
CALL iotk_scan_attr(attr, 'wfc_cutoff', upf%ecutwfc, default=0._dp)
|
||||
CALL iotk_scan_attr(attr, 'rho_cutoff', upf%ecutrho, default=0._dp)
|
||||
CALL iotk_scan_attr(attr, 'l_max', upf%lmax)
|
||||
CALL iotk_scan_attr(attr, 'l_max', upf%lmax, default=0)
|
||||
CALL iotk_scan_attr(attr, 'l_max_rho', upf%lmax_rho, default=2*upf%lmax)
|
||||
CALL iotk_scan_attr(attr, 'l_local', upf%lloc, default=0)
|
||||
CALL iotk_scan_attr(attr, 'mesh_size', upf%mesh)
|
||||
|
|
|
@ -286,10 +286,11 @@ SUBROUTINE PAW_init_onecenter()
|
|||
!
|
||||
types : &
|
||||
DO nt = 1,ntyp
|
||||
! only allocate radial grid integrator for atomic species
|
||||
! that are actually present on this parallel node:
|
||||
DO ia = ia_s, ia_e
|
||||
IF (ityp(ia) == nt ) THEN
|
||||
IF(.not.upf(nt)%tpawp) CYCLE types
|
||||
! only allocate radial grid integrator for atomic species
|
||||
! that are actually present on this parallel node:
|
||||
DO ia = ia_s, ia_e
|
||||
IF (ityp(ia) == nt ) THEN
|
||||
IF (upf(nt)%lmax_rho == 0) THEN
|
||||
! no need for more than one direction, when it is spherical!
|
||||
lmax_safe = 0
|
||||
|
@ -316,8 +317,8 @@ SUBROUTINE PAW_init_onecenter()
|
|||
max_nx = MAX( max_nx, rad(nt)%nx )
|
||||
!
|
||||
CYCLE types
|
||||
ENDIF
|
||||
ENDDO
|
||||
ENDIF
|
||||
ENDDO
|
||||
ENDDO types
|
||||
IF (noncolin.and.domag) ALLOCATE(vs_rad(max_mesh,max_nx,nat))
|
||||
|
||||
|
|
Loading…
Reference in New Issue