alloc_sparse Subroutine

private subroutine alloc_sparse(this, size)

Allocate memory for the sparse storage of the 6-index integrals @param[in] size number of non-zero integrals

Type Bound

sparse_lMat_t

Arguments

Type IntentOptional Attributes Name
class(sparse_lMat_t), intent(inout) :: this
integer(kind=int64), intent(in) :: size

Contents

Source Code


Source Code

    subroutine alloc_sparse(this, size)
        class(sparse_lMat_t), intent(inout) :: this
        integer(int64), intent(in) :: size
        character(*), parameter :: t_r = "alloc_sparse"

        write(stdout, *) "Six-index integrals require", real(size) * real(HElement_t_SizeB) / (2.0**30), "GB"
        call this%nonzero_vals%shared_alloc(size, "LMat")
        ! For now, have the htable of the same size as the integrals
        call this%htable%alloc(size, size)
        write(stdout, *) "Sparse format overhead is", 2 * real(size) * real(sizeof_int64) / (2.0**30), "GB"
    end subroutine alloc_sparse