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. Read [1] for the details. More... | |
subroutine, public | constructfrombinary (this, file_name) |
Construct a distributed sparse matrix from a binary file in parallel. Faster than text, so this is good for check pointing. More... | |
subroutine, public | writetobinary (this, file_name) |
Save a distributed sparse matrix to a binary file. Faster than text, so this is good for check pointing. More... | |
subroutine, public | writetomatrixmarket (this, file_name) |
Write a distributed sparse matrix to a matrix market file. Read [1] for the details. More... | |
subroutine, public | fillfromtripletlist (this, triplet_list, preduplicated_in) |
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... | |
subroutine, public | getmatrixblock (this, triplet_list, start_row, end_row, start_column, end_column) |
Extract an arbitrary block of a matrix into a triplet list. Block is defined by the row/column start/end values. This is slower than GetTripletList, because communication is required. 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. Includes padding. More... | |
subroutine, public | printmatrixinformation (this) |
Print out information about a distributed sparse matrix. Sparsity, and load balancing information. More... | |
subroutine, public | printdistributedsparsematrix (this, file_name_in) |
Print out a distributed sparse matrix. This is a serial print routine, and should probably only be used for debug purposes. More... | |
subroutine, public | filterdistributedsparsematrix (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... | |
subroutine, public | transposedistributedsparsematrix (AMat, TransMat) |
Transpose a sparse matrix. More... | |
pure subroutine, public | mergelocalblocks (this, merged_matrix) |
Merge together the local matrix blocks into one big matrix. More... | |
A Module For Performing Distributed Sparse Matrix Operations.
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), intent(inout) | this, |
character(len=*), intent(in) | file_name | ||
) |
Construct a distributed sparse matrix from a binary file in parallel. Faster than text, so this is good for check pointing.
[out] | this | the file being constructed. |
[in] | file_name | name of the file to read. |
subroutine, public distributedsparsematrixmodule::constructfrommatrixmarket | ( | type(distributedsparsematrix_t), intent(inout) | this, |
character(len=*), intent(in) | file_name | ||
) |
Construct distributed sparse matrix from a matrix market file in parallel. Read [1] for the details.
[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. |
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, | ||
logical, intent(in), optional | preduplicated_in | ||
) |
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. |
[in] | preduplicated_in | if lists are preduplicated across slices set this to true (optional, default=False). |
subroutine, public distributedsparsematrixmodule::filterdistributedsparsematrix | ( | 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. Includes padding.
[in] | this | the matrix. |
subroutine, public distributedsparsematrixmodule::getmatrixblock | ( | type(distributedsparsematrix_t), intent(in) | this, |
type(tripletlist_t), intent(inout) | triplet_list, | ||
integer | start_row, | ||
integer | end_row, | ||
integer | start_column, | ||
integer | end_column | ||
) |
Extract an arbitrary block of a matrix into a triplet list. Block is defined by the row/column start/end values. This is slower than GetTripletList, because communication is required. Data is returned with absolute coordinates.
[in] | this | the distributed sparse matrix. |
[in,out] | triplet_list | the list to fill. |
[in] | start_row | the starting row for data to store on this process. |
[in] | end_row | the ending row for data to store on this process. |
[in] | start_column | the starting col for data to store on this process |
[in] | end_column | the ending col for data to store on this process |
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. |
pure subroutine, public distributedsparsematrixmodule::mergelocalblocks | ( | type(distributedsparsematrix_t), intent(in) | this, |
type(sparsematrix_t), intent(inout) | merged_matrix | ||
) |
Merge together the local matrix blocks into one big matrix.
[in,out] | this | the distributed sparse matrix. |
[in,out] | merged_matrix | the merged matrix. |
subroutine, public distributedsparsematrixmodule::printdistributedsparsematrix | ( | type(distributedsparsematrix_t) | this, |
character(len=*), intent(in), optional | file_name_in | ||
) |
Print out a distributed sparse matrix. This is a serial print routine, and should probably only be used for debug purposes.
[in] | this | the matrix to print. |
[in] | file_name_in | optionally, you can pass a file to print to. |
subroutine, public distributedsparsematrixmodule::printmatrixinformation | ( | type(distributedsparsematrix_t), intent(in) | this | ) |
Print out information about a distributed sparse matrix. Sparsity, and load balancing information.
[in] | this | the matrix to print information about. |
subroutine, public distributedsparsematrixmodule::transposedistributedsparsematrix | ( | type(distributedsparsematrix_t), intent(in) | AMat, |
type(distributedsparsematrix_t), intent(out) | TransMat | ||
) |
Transpose a sparse matrix.
[in] | AMat | The matrix to transpose. |
[out] | TransMat | A^T |
subroutine, public distributedsparsematrixmodule::writetobinary | ( | type(distributedsparsematrix_t), intent(in) | this, |
character(len=*), intent(in) | file_name | ||
) |
Save a distributed sparse matrix to a binary file. Faster than text, so this is good for check pointing.
[in] | this | the Matrix to write. |
[in] | file_name | name of the file to write to. |
subroutine, public distributedsparsematrixmodule::writetomatrixmarket | ( | type(distributedsparsematrix_t), intent(in) | this, |
character(len=*), intent(in) | file_name | ||
) |
Write a distributed sparse matrix to a matrix market file. Read [1] for the details.
[in] | this | the Matrix to write. |
[in] | file_name | name of the file to write to. |