NTPoly
|
A Module For Performing Distributed Sparse Matrix Operations. More...
Data Types | |
type | distributedsparsematrix_t |
A datatype for a distributed blocked CSR matrix. More... | |
Functions/Subroutines | |
pure subroutine, public | constructemptydistributedsparsematrix (this, matrix_dim_) |
Construct an empty sparse, distributed, matrix. More... | |
pure subroutine, public | destructdistributedsparsematrix (this) |
Destruct a distributed sparse matrix. More... | |
pure subroutine, public | copydistributedsparsematrix (matA, matB) |
Copy a distributed sparse matrix in a safe way. More... | |
subroutine, public | constructfrommatrixmarket (this, file_name) |
Construct distributed sparse matrix from a matrix market file in parallel. More... | |
subroutine, public | constructfrombinary (this, file_name) |
Construct a distributed sparse matrix from a binary file in parallel. More... | |
subroutine, public | writetobinary (this, file_name) |
Save a distributed sparse matrix to a file. More... | |
subroutine, public | writetomatrixmarket (this, file_name) |
Write a distributed sparse matrix to a matrix market file. More... | |
subroutine, public | fillfromtripletlist (this, triplet_list) |
This routine fills in a matrix based on local triplet lists. Each process should pass in triplet lists with global coordinates. It doesn't matter where each triplet is stored, as long as global coordinates are given. More... | |
pure subroutine, public | filldistributedidentity (this) |
Fill in the values of a distributed matrix with the identity matrix. More... | |
pure subroutine, public | filldistributedpermutation (this, permutation_vector, permuterows) |
Fill in the values of a distributed matrix with a permutation. If you don't specify permuterows, will default to permuting rows. More... | |
pure subroutine, public | gettripletlist (this, triplet_list) |
Extracts a triplet list of the data that is stored on this process. Data is returned with absolute coordinates. More... | |
pure integer function, public | getactualdimension (this) |
Get the actual dimension of the matrix. More... | |
pure integer function, public | getlogicaldimension (this) |
Get the logical dimension of the matrix. More... | |
subroutine, public | incrementdistributedsparsematrix (matA, matB, alpha_in, threshold_in) |
Matrix B = alpha*Matrix A + Matrix B (AXPY) This will utilize the sparse vector increment routine. More... | |
real(ntreal) function, public | dotdistributedsparsematrix (matA, matB) |
product = dot(Matrix A,Matrix B) More... | |
real(ntreal) function, public | distributedgrandsum (matA) |
Sum up the elements in a matrix. More... | |
subroutine, public | distributedpairwisemultiply (matA, matB, matC) |
Elementwise multiplication. C_ij = A_ij * B_ij. More... | |
subroutine, public | distributedgemm (matA, matB, matC, alpha_in, beta_in, threshold_in, memory_pool_in) |
Multiply two matrices together, and add to the third. C := alpha*matA*matB+ beta*matC. More... | |
pure subroutine, public | scaledistributedsparsematrix (this, constant) |
Will scale a distributed sparse matrix by a constant. More... | |
real(ntreal) function, public | distributedsparsenorm (this) |
Compute the norm of a distributed sparse matrix along the rows. More... | |
real(ntreal) function, public | trace (this) |
Compute the trace of the matrix. More... | |
subroutine, public | computesigma (this, sigma_value) |
Compute sigma for the inversion method. More... | |
subroutine, public | printdistributedsparsematrix (this, file_name_in) |
Print ouf a distributed sparse matrix. More... | |
subroutine, public | filtersparsematrix (this, threshold) |
A utility routine that filters a sparse matrix. All (absolute) values below the threshold are set to zero. More... | |
integer(c_long) function, public | getsize (this) |
Get the total number of non zero entries in the distributed sparse matrix. More... | |
subroutine, public | getloadbalance (this, min_size, max_size) |
Get a measure of how load balanced this matrix is. For each process, the number of non-zero entries is calculated. Then, this function returns the max and min of those values. More... | |
A Module For Performing Distributed Sparse Matrix Operations.
subroutine, public distributedsparsematrixmodule::computesigma | ( | type(distributedsparsematrix_t), intent(in) | this, |
real(ntreal), intent(out) | sigma_value | ||
) |
Compute sigma for the inversion method.
[in] | this | the matrix to compute the sigma value of. |
[out] | sigma_value | sigma. |
pure subroutine, public distributedsparsematrixmodule::constructemptydistributedsparsematrix | ( | type(distributedsparsematrix_t), intent(inout) | this, |
integer, intent(in) | matrix_dim_ | ||
) |
Construct an empty sparse, distributed, matrix.
[out] | this | the matrix to be constructed. |
[in] | matrix_dim_ | the dimension of the full matrix. |
subroutine, public distributedsparsematrixmodule::constructfrombinary | ( | type(distributedsparsematrix_t) | this, |
character(len=*), intent(in) | file_name | ||
) |
Construct a distributed sparse matrix from a binary file in parallel.
[out] | this | the file being constructed. |
[in] | file_name | name of the file to read. |
subroutine, public distributedsparsematrixmodule::constructfrommatrixmarket | ( | type(distributedsparsematrix_t) | this, |
character(len=*), intent(in) | file_name | ||
) |
Construct distributed sparse matrix from a matrix market file in parallel.
[out] | this | the file being constructed. |
[in] | file_name | name of the file to read. |
pure subroutine, public distributedsparsematrixmodule::copydistributedsparsematrix | ( | type(distributedsparsematrix_t), intent(in) | matA, |
type(distributedsparsematrix_t), intent(inout) | matB | ||
) |
Copy a distributed sparse matrix in a safe way.
[in] | matA | matrix to copy |
[in,out] | matB | = matA |
pure subroutine, public distributedsparsematrixmodule::destructdistributedsparsematrix | ( | type(distributedsparsematrix_t), intent(inout) | this | ) |
Destruct a distributed sparse matrix.
[in,out] | this | the matrix to destruct |
subroutine, public distributedsparsematrixmodule::distributedgemm | ( | type(distributedsparsematrix_t), intent(in) | matA, |
type(distributedsparsematrix_t), intent(in) | matB, | ||
type(distributedsparsematrix_t), intent(inout) | matC, | ||
real(ntreal), intent(in), optional | alpha_in, | ||
real(ntreal), intent(in), optional | beta_in, | ||
real(ntreal), intent(in), optional | threshold_in, | ||
type(distributedmatrixmemorypool_t), intent(inout), optional | memory_pool_in | ||
) |
Multiply two matrices together, and add to the third. C := alpha*matA*matB+ beta*matC.
[in] | matA | Matrix A |
[in] | matB | Matrix B |
[out] | matC | = alpha*matA*matB + beta*matC |
[in] | alpha_in | scales the multiplication |
[in] | beta_in | scales matrix we sum on to |
[in] | threshold_in | for flushing values to zero. Default value is 0.0. |
[in,out] | memory_pool_in | a memory pool that can be used for the calculation. |
real(ntreal) function, public distributedsparsematrixmodule::distributedgrandsum | ( | type(distributedsparsematrix_t), intent(in) | matA | ) |
Sum up the elements in a matrix.
[in] | matA | Matrix A. |
subroutine, public distributedsparsematrixmodule::distributedpairwisemultiply | ( | type(distributedsparsematrix_t), intent(in) | matA, |
type(distributedsparsematrix_t), intent(in) | matB, | ||
type(distributedsparsematrix_t), intent(inout) | matC | ||
) |
Elementwise multiplication. C_ij = A_ij * B_ij.
[in] | matA | Matrix A. |
[in] | matB | Matrix B. |
[in,out] | matC | = MatA mult MatB. |
real(ntreal) function, public distributedsparsematrixmodule::distributedsparsenorm | ( | type(distributedsparsematrix_t), intent(in) | this | ) |
Compute the norm of a distributed sparse matrix along the rows.
[in] | this | the matrix to compute the norm of. |
real(ntreal) function, public distributedsparsematrixmodule::dotdistributedsparsematrix | ( | type(distributedsparsematrix_t), intent(in) | matA, |
type(distributedsparsematrix_t), intent(in) | matB | ||
) |
product = dot(Matrix A,Matrix B)
[in] | matA | Matrix A. |
[in,out] | matB | Matrix B. |
pure subroutine, public distributedsparsematrixmodule::filldistributedidentity | ( | type(distributedsparsematrix_t), intent(inout) | this | ) |
Fill in the values of a distributed matrix with the identity matrix.
[in,out] | this | the matrix being filled. |
pure subroutine, public distributedsparsematrixmodule::filldistributedpermutation | ( | type(distributedsparsematrix_t), intent(inout) | this, |
integer, dimension(:), intent(in) | permutation_vector, | ||
logical, intent(in), optional | permuterows | ||
) |
Fill in the values of a distributed matrix with a permutation. If you don't specify permuterows, will default to permuting rows.
[in,out] | this | the matrix being filled. |
[in] | permutation_vector | describes for each row/column, where it goes. |
[in] | permuterows | if true permute rows, false permute columns. |
subroutine, public distributedsparsematrixmodule::fillfromtripletlist | ( | type(distributedsparsematrix_t) | this, |
type(tripletlist_t) | triplet_list | ||
) |
This routine fills in a matrix based on local triplet lists. Each process should pass in triplet lists with global coordinates. It doesn't matter where each triplet is stored, as long as global coordinates are given.
[in,out] | this | the matrix to fill. |
[in] | triplet_list | the triplet list of values. |
subroutine, public distributedsparsematrixmodule::filtersparsematrix | ( | type(distributedsparsematrix_t), intent(inout) | this, |
real(ntreal), intent(in) | threshold | ||
) |
A utility routine that filters a sparse matrix. All (absolute) values below the threshold are set to zero.
[in,out] | this | matrix to filter |
[in] | threshold | (absolute) values below this are filtered |
pure integer function, public distributedsparsematrixmodule::getactualdimension | ( | type(distributedsparsematrix_t), intent(in) | this | ) |
Get the actual dimension of the matrix.
[in] | this | the matrix. |
subroutine, public distributedsparsematrixmodule::getloadbalance | ( | type(distributedsparsematrix_t), intent(in) | this, |
integer, intent(out) | min_size, | ||
integer, intent(out) | max_size | ||
) |
Get a measure of how load balanced this matrix is. For each process, the number of non-zero entries is calculated. Then, this function returns the max and min of those values.
[in] | this | The matrix to compute the measure on. |
[out] | min_size | the minimum entries contained on a single process. |
[out] | max_size | the maximum entries contained on a single process. |
pure integer function, public distributedsparsematrixmodule::getlogicaldimension | ( | type(distributedsparsematrix_t), intent(in) | this | ) |
Get the logical dimension of the matrix.
[in] | this | the matrix. |
integer(c_long) function, public distributedsparsematrixmodule::getsize | ( | type(distributedsparsematrix_t), intent(in) | this | ) |
Get the total number of non zero entries in the distributed sparse matrix.
[in] | this | the distributed sparse matrix to calculate the non-zero entries of. |
pure subroutine, public distributedsparsematrixmodule::gettripletlist | ( | type(distributedsparsematrix_t), intent(in) | this, |
type(tripletlist_t), intent(inout) | triplet_list | ||
) |
Extracts a triplet list of the data that is stored on this process. Data is returned with absolute coordinates.
[in] | this | the distributed sparse matrix. |
[in,out] | triplet_list | the list to fill. |
subroutine, public distributedsparsematrixmodule::incrementdistributedsparsematrix | ( | type(distributedsparsematrix_t), intent(in) | matA, |
type(distributedsparsematrix_t), intent(inout) | matB, | ||
real(ntreal), intent(in), optional | alpha_in, | ||
real(ntreal), intent(in), optional | threshold_in | ||
) |
Matrix B = alpha*Matrix A + Matrix B (AXPY) This will utilize the sparse vector increment routine.
[in] | matA | Matrix A. |
[in,out] | matB | Matrix B. |
[in] | alpha_in | multiplier. Default value is 1.0 |
[in] | threshold_in | for flushing values to zero. Default value is 0.0 |
subroutine, public distributedsparsematrixmodule::printdistributedsparsematrix | ( | type(distributedsparsematrix_t) | this, |
character(len=*), intent(in), optional | file_name_in | ||
) |
Print ouf a distributed sparse matrix.
[in] | this | the matrix to print. |
[in] | file_name_in | optionally, you can pass a file to print to. |
pure subroutine, public distributedsparsematrixmodule::scaledistributedsparsematrix | ( | type(distributedsparsematrix_t), intent(inout) | this, |
real(ntreal), intent(in) | constant | ||
) |
Will scale a distributed sparse matrix by a constant.
[in,out] | this | Matrix to scale. |
[in] | constant | scale factor. |
real(ntreal) function, public distributedsparsematrixmodule::trace | ( | type(distributedsparsematrix_t), intent(in) | this | ) |
Compute the trace of the matrix.
[in] | this | the matrix to compute the norm of. |
subroutine, public distributedsparsematrixmodule::writetobinary | ( | type(distributedsparsematrix_t) | this, |
character(len=*), intent(in) | file_name | ||
) |
Save a distributed sparse matrix to a file.
[in] | this | the Matrix to write. |
[in] | file_name | name of the file to write to. |
subroutine, public distributedsparsematrixmodule::writetomatrixmarket | ( | type(distributedsparsematrix_t) | this, |
character(len=*), intent(in) | file_name | ||
) |
Write a distributed sparse matrix to a matrix market file.
[in] | this | the Matrix to write. |
[in] | file_name | name of the file to write to. |