diff --git a/Modules/mp_global.f90 b/Modules/mp_global.f90 index 50d8bee38..6ba83e520 100644 --- a/Modules/mp_global.f90 +++ b/Modules/mp_global.f90 @@ -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 ) ! diff --git a/Modules/read_ncpp.f90 b/Modules/read_ncpp.f90 index 678999fc8..8fac516b9 100644 --- a/Modules/read_ncpp.f90 +++ b/Modules/read_ncpp.f90 @@ -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) ) & diff --git a/Modules/read_upf_v2.f90 b/Modules/read_upf_v2.f90 index 183933e2e..d7bd4a486 100644 --- a/Modules/read_upf_v2.f90 +++ b/Modules/read_upf_v2.f90 @@ -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