Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add members and methods denoting comm ownership for Matrix and Vector methods #28

Open
6 tasks
goxberry opened this issue Jul 29, 2019 · 0 comments
Open
6 tasks

Comments

@goxberry
Copy link
Member

Specifically, add the following to each class T, where T is a CAROM::Vector or CAROM::Matrix, a CAROM::Vector is treated as a single column matrix, and none of the functions below should be templated:

  • a private MPI_Comm d_comm member
  • initialize that member in the constructor of each object
  • include a MPI_Comm getComm() const getter method
  • a free function of the form std::vector<int> GetDimensionOnEachProcess(T &input), that returns the number of rows of the object on each process
  • a free function of the form std::vector<int> GetRowSpanOnEachProcess(T &input), where T is a CAROM::Matrix or CAROM::Vector that returns the range of row indices of the object on each process. Let std::vector<int> result be the value returned by this function. The following postconditions should be satisfied: (1) result.size() should be one plus the number of processes on d_comm, and (2) if a disjoint contiguous index span of input resides on each process such that index 0 is owned by process 0, and the lowest index owned by each process is an increasing sequence when ordered by increasing process number, then process p contains rows result[p] through result[p + 1] - 1
  • a free function of the form int GetProcessContainingRow(T &input, int row) such that if int result is returned by this function, then row row is on process number result

These utility functions come up frequently in implementing linear algebraic operations. I suspect that if data objects are associated with communicators, the operations like matrix decompositions will not need to have communicators associated with them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant