dbcsr_io Module

DBCSR input/output



Contents


Variables

TypeVisibilityAttributesNameInitial
character(len=*), private, parameter:: moduleN ='dbcsr_io'
logical, private, parameter:: bcsr_debug =.TRUE.
logical, private, parameter:: bcsr_info =.FALSE.
logical, private, parameter:: bcsr_verbose =.FALSE.

Interfaces

private interface dbcsr_printmat

  • private subroutine printmat_s(matrix, rows, cols, iunit, title, tr)

    Prints the elements of a matrix.

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=real_4), intent(in), DIMENSION(:):: matrix
    integer, intent(in) :: rows

    the logical (possibly detransposed) matrix size, not the stored size the logical (possibly detransposed) matrix size, not the stored size

    integer, intent(in) :: cols

    the logical (possibly detransposed) matrix size, not the stored size the logical (possibly detransposed) matrix size, not the stored size

    integer, intent(in) :: iunit

    the logical (possibly detransposed) matrix size, not the stored size the logical (possibly detransposed) matrix size, not the stored size

    character, intent(in), optional :: title
    logical, intent(in), optional :: tr

    specifies whether the elements are stored transposed

  • private subroutine printmat_d(matrix, rows, cols, iunit, title, tr)

    Arguments

    TypeIntentOptionalAttributesName
    real(kind=real_8), intent(in), DIMENSION(:):: matrix
    integer, intent(in) :: rows
    integer, intent(in) :: cols
    integer, intent(in) :: iunit
    character, intent(in), optional :: title
    logical, intent(in), optional :: tr
  • private subroutine printmat_c(matrix, rows, cols, iunit, title, tr)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=real_4), intent(in), DIMENSION(:):: matrix
    integer, intent(in) :: rows
    integer, intent(in) :: cols
    integer, intent(in) :: iunit
    character, intent(in), optional :: title
    logical, intent(in), optional :: tr
  • private subroutine printmat_z(matrix, rows, cols, iunit, title, tr)

    Arguments

    TypeIntentOptionalAttributesName
    complex(kind=real_8), intent(in), DIMENSION(:):: matrix
    integer, intent(in) :: rows
    integer, intent(in) :: cols
    integer, intent(in) :: iunit
    character, intent(in), optional :: title
    logical, intent(in), optional :: tr

Subroutines

public subroutine dbcsr_print(matrix, nodata, matlab_format, variable_name, unit_nr)

Prints a BCSR matrix (block-style, not full)

Arguments

TypeIntentOptionalAttributesName
type(dbcsr_type), intent(in) :: matrix

matrix

logical, intent(in), optional :: nodata

don't print actual data

logical, intent(in), optional :: matlab_format

don't print actual data

character(len=*), intent(in), optional :: variable_name
integer, intent(in), optional :: unit_nr

private subroutine dbcsr_printmat_matlab_d(matrix, rows, cols, r_offset, c_offset, iunit, tr, variable_name)

Prints the elements of a matrix.

Arguments

TypeIntentOptionalAttributesName
real(kind=real_8), intent(in), DIMENSION(:):: matrix
integer, intent(in) :: rows

the logical (possibly detransposed) matrix size, not the stored size the logical (possibly detransposed) matrix size, not the stored size

integer, intent(in) :: cols

the logical (possibly detransposed) matrix size, not the stored size the logical (possibly detransposed) matrix size, not the stored size

integer, intent(in) :: r_offset

the logical (possibly detransposed) matrix size, not the stored size the logical (possibly detransposed) matrix size, not the stored size

integer, intent(in) :: c_offset

the logical (possibly detransposed) matrix size, not the stored size the logical (possibly detransposed) matrix size, not the stored size

integer, intent(in) :: iunit

the logical (possibly detransposed) matrix size, not the stored size the logical (possibly detransposed) matrix size, not the stored size

logical, intent(in), optional :: tr

specifies whether the elements are stored transposed

character(len=*), intent(in), optional :: variable_name

private subroutine dbcsr_printmat_matlab_s(matrix, rows, cols, r_offset, c_offset, iunit, tr, variable_name)

Arguments

TypeIntentOptionalAttributesName
real(kind=real_4), intent(in), DIMENSION(:):: matrix
integer, intent(in) :: rows
integer, intent(in) :: cols
integer, intent(in) :: r_offset
integer, intent(in) :: c_offset
integer, intent(in) :: iunit
logical, intent(in), optional :: tr
character(len=*), intent(in), optional :: variable_name

private subroutine dbcsr_printmat_matlab_z(matrix, rows, cols, r_offset, c_offset, iunit, tr, variable_name)

Arguments

TypeIntentOptionalAttributesName
complex(kind=real_8), intent(in), DIMENSION(:):: matrix
integer, intent(in) :: rows
integer, intent(in) :: cols
integer, intent(in) :: r_offset
integer, intent(in) :: c_offset
integer, intent(in) :: iunit
logical, intent(in), optional :: tr
character(len=*), intent(in), optional :: variable_name

private subroutine dbcsr_printmat_matlab_c(matrix, rows, cols, r_offset, c_offset, iunit, tr, variable_name)

Arguments

TypeIntentOptionalAttributesName
complex(kind=real_4), intent(in), DIMENSION(:):: matrix
integer, intent(in) :: rows
integer, intent(in) :: cols
integer, intent(in) :: r_offset
integer, intent(in) :: c_offset
integer, intent(in) :: iunit
logical, intent(in), optional :: tr
character(len=*), intent(in), optional :: variable_name

private subroutine printmat_s(matrix, rows, cols, iunit, title, tr)

Prints the elements of a matrix.

Arguments

TypeIntentOptionalAttributesName
real(kind=real_4), intent(in), DIMENSION(:):: matrix
integer, intent(in) :: rows

the logical (possibly detransposed) matrix size, not the stored size the logical (possibly detransposed) matrix size, not the stored size

integer, intent(in) :: cols

the logical (possibly detransposed) matrix size, not the stored size the logical (possibly detransposed) matrix size, not the stored size

integer, intent(in) :: iunit

the logical (possibly detransposed) matrix size, not the stored size the logical (possibly detransposed) matrix size, not the stored size

character, intent(in), optional :: title
logical, intent(in), optional :: tr

specifies whether the elements are stored transposed

private subroutine printmat_d(matrix, rows, cols, iunit, title, tr)

Arguments

TypeIntentOptionalAttributesName
real(kind=real_8), intent(in), DIMENSION(:):: matrix
integer, intent(in) :: rows
integer, intent(in) :: cols
integer, intent(in) :: iunit
character, intent(in), optional :: title
logical, intent(in), optional :: tr

private subroutine printmat_c(matrix, rows, cols, iunit, title, tr)

Arguments

TypeIntentOptionalAttributesName
complex(kind=real_4), intent(in), DIMENSION(:):: matrix
integer, intent(in) :: rows
integer, intent(in) :: cols
integer, intent(in) :: iunit
character, intent(in), optional :: title
logical, intent(in), optional :: tr

private subroutine printmat_z(matrix, rows, cols, iunit, title, tr)

Arguments

TypeIntentOptionalAttributesName
complex(kind=real_8), intent(in), DIMENSION(:):: matrix
integer, intent(in) :: rows
integer, intent(in) :: cols
integer, intent(in) :: iunit
character, intent(in), optional :: title
logical, intent(in), optional :: tr

public subroutine dbcsr_binary_write(matrix, filepath)

Writes a DBCSR matrix in a file file's header consists of 3 sub-headers: sub-header1 contains: 1 string: (of length version_len) the current version of this routine, 1 string: (of length default_string_length) matrix_name, 1 character: matrix_type, 4 integers: numnodes, data_type, nblkrows_total, nblkcols_total, 2 vectors: row_blk_size (length = nblkrows_total), col_blk_size (length = nblkcols_total), sub-header2 contains: 2 integers: nblks, data_area_size, sub-header3 contains: 3 vectors: row_p (length = nblkrows_total+1), col_i (length = nblks), blk_p (length = nblks); and the file's body contains the block data

Arguments

TypeIntentOptionalAttributesName
type(dbcsr_type), intent(in) :: matrix

DBCSR matrix

character(len=*), intent(in) :: filepath

path to the file

public subroutine dbcsr_binary_read(filepath, distribution, groupid, matrix_new)

Reads a DBCSR matrix from a file

Arguments

TypeIntentOptionalAttributesName
character(len=*), intent(in) :: filepath

path to the file

type(dbcsr_distribution_obj), intent(in) :: distribution

row and column distribution

integer, intent(in), optional :: groupid

message passing environment identifier

type(dbcsr_type), intent(inout) :: matrix_new

DBCSR matrix

public subroutine dbcsr_print_block_sum(matrix, unit_nr)

Prints the sum of the elements for each block

Arguments

TypeIntentOptionalAttributesName
type(dbcsr_type), intent(in) :: matrix

matrix

integer, intent(in), optional :: unit_nr