llnl / llnl/libROM

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

Open
#28 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
236
Forks
47
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the CAROM::Vector and CAROM::Matrix class definitions and their constructors, then inspect any existing communicator or distributed-index utilities. Add the requested communicator members, accessors, and free functions, with completion shown by satisfying the listed row-span, dimension, and process-ownership postconditions.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
distributed-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.