Skip to content
Snippets Groups Projects

Fix OEP full - spin polarized case

Merged Nicolas Tancogne-Dejean requested to merge fix_oep_polarized into hotfix-12.2
2 files
+ 11
5
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -342,9 +342,13 @@ subroutine X(orbitalbasis_build)(this, namespace, ions, mesh, kpt, ndim, skip_s_
os%ldorbs = max(pad_pow2(np), 1)
call accel_create_buffer(os%X(buff_orb), ACCEL_MEM_READ_ONLY, R_TYPE_VAL, os%ldorbs*os%norbs)
do iorb = 1, os%norbs
call accel_write_buffer(os%X(buff_orb), np, os%X(orb)(:, 1, iorb), offset = (iorb - 1)*os%ldorbs)
end do
! In case we force the use of the submesh for X(orb) (for periodic systems), we do not want
! to write to X(buff_orb), as it has not the same size as X(orb) and will not be used anyway
if(.not. this%use_submesh .eqv. use_mesh) then
do iorb = 1, os%norbs
call accel_write_buffer(os%X(buff_orb), np, os%X(orb)(:, 1, iorb), offset = (iorb - 1)*os%ldorbs)
end do
end if
if(this%use_submesh) then
call accel_create_buffer(os%sphere%buff_map, ACCEL_MEM_READ_ONLY, TYPE_INTEGER, max(os%sphere%np, 1))
Loading