Skip to content
Snippets Groups Projects

LCAO buffer

Merged Nicolas Tancogne-Dejean requested to merge lcao_change_precision_buff into main
Files
26
+ 18
2
@@ -96,8 +96,11 @@ module lcao_oct_m
logical :: derivative
integer, allocatable :: cst(:, :)
integer, allocatable :: ck(:, :)
real(4), allocatable :: dbuff(:, :, :, :) !< single-precision buffer
complex(4), allocatable :: zbuff(:, :, :, :) !< single-precision buffer
real(4), allocatable :: dbuff_single(:, :, :, :) !< single-precision buffer
complex(4), allocatable :: zbuff_single(:, :, :, :) !< single-precision buffer
FLOAT, allocatable :: dbuff(:, :, :, :)
CMPLX, allocatable :: zbuff(:, :, :, :)
logical :: save_memory
logical :: initialized_orbitals
FLOAT :: orbital_scale_factor
@@ -257,6 +260,17 @@ contains
this%complex_ylms = .false.
end if
!%Variable LCAOSaveMemory
!%Type logical
!%Default false
!%Section SCF::LCAO
!%Description
!% If set to true, the LCAO will allocate extra memory needed in single precision instead of
!% double precision.
!%End
call parse_variable(namespace, 'LCAOSaveMemory', .false., this%save_memory)
if (debug%info .and. mpi_grp_is_root(mpi_world)) then
call io_mkdir('debug/lcao', namespace)
iunit_o = io_open('debug/lcao/orbitals', namespace, action='write')
@@ -858,6 +872,8 @@ contains
SAFE_DEALLOCATE_A(this%ddim)
SAFE_DEALLOCATE_A(this%cst)
SAFE_DEALLOCATE_A(this%ck)
SAFE_DEALLOCATE_A(this%dbuff_single)
SAFE_DEALLOCATE_A(this%zbuff_single)
SAFE_DEALLOCATE_A(this%dbuff)
SAFE_DEALLOCATE_A(this%zbuff)
Loading