Commit 85cc11fa authored by Gregor Michalicek's avatar Gregor Michalicek

Fix segmentation fault in types/types_lapw.F90 if optional mpi argument is not present

parent c85f5ec4
......@@ -254,9 +254,7 @@
carr1 = 0; carr2 = 0; carr3 = 0
! calculate k1,k2,k3
CALL lapw%init(input,noco,&
& kpts,atoms,sym,ikpt,cell,&
& sym%zrfs)
CALL lapw%init(input,noco,kpts,atoms,sym,ikpt,cell,sym%zrfs)
! PW part
DO igpt = 1,lapw%nv(jsp)
......
......@@ -346,10 +346,14 @@ CONTAINS
!Count No of lapw distributed to this PE
lapw%num_local_cols=0
DO ispin=1,input%jspins
DO k=mpi%n_rank+1,lapw%nv(ispin),mpi%n_size
lapw%num_local_cols(ispin)=lapw%num_local_cols(ispin)+1
ENDDO
ENDDO
IF (PRESENT(mpi)) THEN
DO k=mpi%n_rank+1,lapw%nv(ispin),mpi%n_size
lapw%num_local_cols(ispin)=lapw%num_local_cols(ispin)+1
END DO
ELSE
lapw%num_local_cols(ispin) = lapw%nv(ispin)
END IF
END DO
IF (ANY(atoms%nlo>0)) CALL priv_lo_basis_setup(lapw,atoms,sym,noco,cell)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment