mirror of https://gitlab.com/QEF/q-e.git
two bugs triggered by setting initial values different from zero to integer:
1) read_upf_v2 returns an unset error code, 2) variables meta_ionode, meta_ionode_id are set in an absurd way git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@6554 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
parent
1b72de374e
commit
cbc0b94c86
|
@ -11,8 +11,7 @@ MODULE mp_global
|
|||
!
|
||||
USE mp, ONLY : mp_comm_free, mp_size, mp_rank, mp_sum, mp_barrier, &
|
||||
mp_bcast, mp_start, mp_end, mp_env
|
||||
USE io_global, ONLY : stdout, io_global_start, meta_ionode, &
|
||||
meta_ionode_id, io_global_getmeta
|
||||
USE io_global, ONLY : stdout, io_global_start, io_global_getmeta
|
||||
USE parallel_include
|
||||
!
|
||||
IMPLICIT NONE
|
||||
|
@ -99,8 +98,9 @@ CONTAINS
|
|||
! ... NPOOL must be a whole divisor of NPROC
|
||||
!
|
||||
IMPLICIT NONE
|
||||
INTEGER :: world, ntask_groups, nproc_ortho
|
||||
INTEGER, parameter :: root = 0
|
||||
INTEGER :: world, ntask_groups, nproc_ortho, meta_ionode_id
|
||||
INTEGER :: root = 0
|
||||
LOGICAL :: meta_ionode
|
||||
!
|
||||
!
|
||||
CALL mp_start()
|
||||
|
@ -110,13 +110,13 @@ CONTAINS
|
|||
! ... mpime = processor number, starting from 0
|
||||
! ... nproc = number of processors
|
||||
! ... world = group index of all processors
|
||||
! ... root = index of the root processor
|
||||
!
|
||||
CALL mp_env( nproc, mpime, world )
|
||||
!
|
||||
!
|
||||
! ... now initialize processors and groups variables
|
||||
! ... set global coordinate for this processor
|
||||
! ... root = index of the root processor
|
||||
!
|
||||
CALL mp_global_start( root, mpime, world, nproc )
|
||||
!
|
||||
|
|
|
@ -27,7 +27,7 @@ subroutine read_ncpp (iunps, np, upf)
|
|||
real(DP), parameter :: rcut = 10.d0, e2 = 2.d0
|
||||
real(DP), external :: qe_erf
|
||||
integer :: nlc, nnl, lmax, lloc
|
||||
integer :: nb, ios, i, l, ir
|
||||
integer :: nb, i, l, ir, ios=0
|
||||
logical :: bhstype, numeric
|
||||
!
|
||||
!====================================================================
|
||||
|
@ -74,7 +74,7 @@ subroutine read_ncpp (iunps, np, upf)
|
|||
read (iunps, *, err=300, iostat=ios) upf%zmesh, upf%xmin, upf%dx, &
|
||||
upf%mesh, upf%nwfc
|
||||
if ( upf%mesh <= 0) &
|
||||
call errore ('read_ncpp', 'wrong nuymber of mesh points', np)
|
||||
call errore ('read_ncpp', 'wrong number of mesh points', np)
|
||||
if ( upf%nwfc < 0 .or. &
|
||||
(upf%nwfc < lmax .and. lloc == lmax) .or. &
|
||||
(upf%nwfc < lmax+1 .and. lloc /= lmax) ) &
|
||||
|
|
|
@ -53,7 +53,7 @@ SUBROUTINE read_upf_v2(u, upf, grid, ierr) !
|
|||
!
|
||||
IF((abs(ierr_)>0) .or. .not. matches('UPF',root) ) THEN
|
||||
!
|
||||
CALL iotk_close_read(u,ierr=ierr)
|
||||
CALL iotk_close_read(u,ierr=ierr_)
|
||||
IF(.not. present(ierr)) &
|
||||
CALL errore('read_upf_v2','Cannot open UPF file.',1)
|
||||
ierr = 1
|
||||
|
@ -117,6 +117,8 @@ SUBROUTINE read_upf_v2(u, upf, grid, ierr) !
|
|||
!
|
||||
! Close the file (not the unit!)
|
||||
CALL iotk_close_read(u)
|
||||
!
|
||||
IF( present(ierr) ) ierr=0
|
||||
|
||||
RETURN
|
||||
|
||||
|
|
Loading…
Reference in New Issue