Skip to content

Check LCAO with spinors and parallelization in atoms

The following code in lcao.F90 calls for checking, as rho is 4 components for the spinors.

    if (ions%atoms_dist%parallel .and. parallelized_in_atoms) then
      ! NOTE: if random or user_defined are made parallelized in atoms, below should be st%d%nspin instead of spin_channels
      do is = 1, spin_channels
        call lalg_copy(gr%np, rho(:,is), atom_rho(:,1))
        call ions%atoms_dist%mpi_grp%allreduce(atom_rho(1, 1), rho(1, is), gr%np, MPI_FLOAT, MPI_SUM)
      end do
    end if

This should be wrong for solids with spinors and a guess density not along the quantization axis.