Skip to content

Introducing sparse atomic corrections to GPAW new

This MR does the following:

  1. The corrections have been moved out into a function.
  2. The dense atomic overlap corrections have been batched across atoms. For small systems (<~500 basis functions) where corrections can in principle be dense (sparse corrections lose maybe ~0.5 seconds in performance), the increase in cost due to the matmul over a block diagonal dense matrix is completely overshadowed by the savings due to not doing the repeated additions to S_MM (although both these numbers are tiny).
  3. The sparse corrections are also batched across atoms similar to the old GPAW. For systems with tens of thousands of basis functions/gamma point, the savings can exceed 30-50x.

So why is this a draft?

I don't yet know what would be an accepted way of exposing the sparse keyword. I also don't know how to deal with the mypy error.

I don't know if we have band/orbital parallelism in the new lcao yet, in that case we would need to also keep track of the basis Mstart Mstop indices again.

Edited by Anubhab Haldar

Merge request reports