MPI-SCATCI  2.0
An MPI version of SCATCI
scalapackmatrix_module Module Reference

ScaLAPACK matrix module. More...

Data Types

type  scalapackmatrix
 

Functions/Subroutines

logical function am_i_involved (this)
 Is this process part of the BLACS grid. More...
 
subroutine initialize_struct_scalapack (this, matrix_size, matrix_type, block_size)
 Initialize the type. More...
 
logical function is_this_me (this, proc_row, proc_col)
 Check workitem association with current process. More...
 
subroutine get_matelem_scalapack (this, idx, i, j, coeff)
 Retrieve matrix element. More...
 
logical function insert_into_local_matrix (this, row, column, coefficient)
 Insert new element. More...
 
subroutine print_scalapack (this)
 Print matrix. More...
 
subroutine clear_scalapack (this)
 Clear matrix. More...
 
subroutine destroy_scalapack (this)
 Destroy matrix. More...
 

Detailed Description

ScaLAPACK matrix module.

Authors
A Al-Refaie, J Benda
Date
2017 - 2019

Only compiled in when ScaLAPACK library is available during configuration step. Uses a compile-time macro for the BLAS/LAPACK integer, which is long integer by default, or controllable by the compiler flags -Dblas64int/-Dblas32int.

Note
16/01/2019 - Jakub Benda: Unifom coding style and expanded documentation.
24/02/2019 - Jakub Benda: Enable multiple concurrent diagonalizations.

Function/Subroutine Documentation

◆ am_i_involved()

logical function scalapackmatrix_module::am_i_involved ( class(scalapackmatrix this)
private

Is this process part of the BLACS grid.

Authors
A Al-Refaie
Date
2017

This function returns "true" when part of the matrix is allocated to this process. It returns false if this process is not part of the BLACS grid at all.

Definition at line 77 of file SCALAPACKMatrix_module.f90.

◆ clear_scalapack()

subroutine scalapackmatrix_module::clear_scalapack ( class(scalapackmatrix this)
private

Clear matrix.

Authors
A Al-Refaie
Date
2017

Definition at line 263 of file SCALAPACKMatrix_module.f90.

◆ destroy_scalapack()

subroutine scalapackmatrix_module::destroy_scalapack ( class(scalapackmatrix this)
private

Destroy matrix.

Authors
A Al-Refaie
Date
2017

Definition at line 275 of file SCALAPACKMatrix_module.f90.

◆ get_matelem_scalapack()

subroutine scalapackmatrix_module::get_matelem_scalapack ( class(scalapackmatrix this,
integer, intent(in)  idx,
integer, intent(out)  i,
integer, intent(out)  j,
real(wp), intent(out)  coeff 
)
private

Retrieve matrix element.

Authors
A Al-Refaie
Date
2017

Definition at line 186 of file SCALAPACKMatrix_module.f90.

◆ initialize_struct_scalapack()

subroutine scalapackmatrix_module::initialize_struct_scalapack ( class(scalapackmatrix this,
integer, intent(in)  matrix_size,
integer, intent(in)  matrix_type,
integer, intent(in)  block_size 
)
private

Initialize the type.

Authors
A Al-Refaie, J Benda
Date
2017 - 2019

This subroutine also prepares the context for BLACS (ie. the MPI communicator layout). The number of processes is split into a grid of nprow times npcol processes, where both nprow and npcol are as close as possible to the square root of the number of processes.

Definition at line 95 of file SCALAPACKMatrix_module.f90.

◆ insert_into_local_matrix()

logical function scalapackmatrix_module::insert_into_local_matrix ( class(scalapackmatrix this,
integer, intent(in)  row,
integer, intent(in)  column,
real(wp), intent(in)  coefficient 
)
private

Insert new element.

Authors
A Al-Refaie
Date
2017

This inserts an element into the hard storage which is considered the final location before diagonalization. It also checks wherther the element exists within the aloowed range and tells us if it was successfully inserted.

Definition at line 214 of file SCALAPACKMatrix_module.f90.

◆ is_this_me()

logical function scalapackmatrix_module::is_this_me ( class(scalapackmatrix this,
integer(blasint), intent(in)  proc_row,
integer(blasint), intent(in)  proc_col 
)
private

Check workitem association with current process.

Authors
A Al-Refaie
Date
2017

Definition at line 171 of file SCALAPACKMatrix_module.f90.

◆ print_scalapack()

subroutine scalapackmatrix_module::print_scalapack ( class(scalapackmatrix this)
private

Print matrix.

Authors
A Al-Refaie
Date
2017

Definition at line 248 of file SCALAPACKMatrix_module.f90.