diff --git a/cdn/cdnovlp.F90 b/cdn/cdnovlp.F90 index 5681d266e9372d8b801ea29af04169d232ff22b6..9e449c3d5d3f33897ac8d3cafb18bfdd10b62e32 100644 --- a/cdn/cdnovlp.F90 +++ b/cdn/cdnovlp.F90 @@ -176,6 +176,7 @@ #ifdef CPP_MPI CALL MPI_BCAST(rh,atoms%msh*atoms%ntype,CPP_MPI_REAL,0,mpi%mpi_comm,ierr) #endif + mshc(:) = 0 ! This initialization is important because there may be atoms without core states. nloop: DO n = 1 , atoms%ntype IF ((atoms%econf(n)%num_core_states.GT.0).OR.l_st) THEN DO j = 1 , atoms%jri(n) diff --git a/mix/kerker.F90 b/mix/kerker.F90 index d3bef8e896465f6dc5011e964fe7fc2e6bd8682e..55c143f0375b15f0d5ceb9002eb174166dd63bf1 100644 --- a/mix/kerker.F90 +++ b/mix/kerker.F90 @@ -60,10 +60,13 @@ CONTAINS CALL vgen_coulomb( 1, mpi, oneD, input, field, vacuum, sym, stars, cell, & sphhar, atoms, .FALSE., resDen, vYukawa ) ELSE + call resDenMod%init( stars, atoms, sphhar, vacuum, noco, input%jspins, POTDEN_TYPE_DEN ) if( mpi%irank == 0 ) then - call resDenMod%init( stars, atoms, sphhar, vacuum, noco, input%jspins, POTDEN_TYPE_DEN ) call resDenMod%copyPotDen( resDen ) end if +#ifdef CPP_MPI + CALL mpi_bc_potden( mpi, stars, sphhar, atoms, input, vacuum, oneD, noco, resDenMod ) +#endif vYukawa%iter = resDen%iter CALL VYukawaFilm( stars, vacuum, cell, sym, input, mpi, atoms, sphhar, oneD, noco, resDenMod, & vYukawa )