Struct mpi_spmv_mult

Struct Documentation

struct mpi_spmv_mult

Sparse matrix -> vector multiplier.

Public Members

struct csmatrix *matrix
struct darray *vector_in

The sparse matrix.

struct darray *vector_out

The vector to multiply with.

int *rank_alloc_elts

The resulting vector.

An array containing the # of elements allocated to each rank (at the root) in terms of matrix entries, and NULL at all other ranks.

int *rank_alloc_rows

An array containing the # rows assigned to each rank (at the root), and NULL at all other ranks.

int *row_owners

Array of what mpi ranks are responsible for the entries in a particular row of the matrix. All ranks have a copy.

int *rank_alloc_row_prefix_sums

Prefix sums for # of elements allocated to each rank over the rows, used for collecting the results of the multiplication at the root.

int *rank_alloc_col_prefix_sums

Prefix sums for # of elements allocated to each rank over the columns, used for correct sending/receiving of matrix data during execution.

int *row_sizes

Sizes of each row in the matrix, used for collecting the results of the multiplication at the root.

int mpi_rank
int mpi_world_size
int n_rows_init

The total # of rows in the matrix broadcast during initialization. Needed so that the row membership array can be initialized to the proper size.

int n_cols_init

The total # of rows in the matrix broadcast during initialization.

int n_rows_alloc

The # of rows allocated to a particular MPI rank

int n_elts_alloc

The # of elements allocated to a particular MPI rank

int row_alloc_start
int n_elts_alloc_init_transpose

Starting row allocated to a rank.

The # of elements allocated to a particular MPI rank, but taken over the columns of the ORIGINAL matrix, rather than the submatrix currently assigned to the rank.

MPI_Datatype spmv_comm_type

A custom datatype for sending/receiving non-zero parts of the vector to multiply with. It was much easier to creating a mapping datatype than to try to finagle it with arrays.