-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feature: stacked #86
Feature: stacked #86
Conversation
@rohanbabbar04 I finally managed to get some time to look into one of the two things which we didn't manage to implement, the StackedDistributedArray. This basically follows from the need to stack multiple distributed arrays to be able to solve an augmented system of equations without having to resort to the explicit normal equations. Would you be interested to take a look and see what you think? |
My bad, I didn't get much time to implement it... Thanks, it looks good. I will review it during the weekend |
Thanks @mrava87, It looks great.... We can perhaps add If you haven't worked in it I will work on it and push changes by the end of this week... |
@rohanbabbar04 that would be great! I was running out of time but indeed having those two was my goal before merging this PR. Please go ahead and I can review it once you push these new bits :D |
Ok so I saw the requirements of what we need to/could do... Some things we will include in this PR(this PR could lead to a new release as it is a major change)
|
@rohanbabbar04 great! I will try to look into your changes during the week. If in the meantime you are able to work on the A few comments to your points (which I also lifted up in the list of task in the first message)
This is already done. What I tried to do is to modify the solvers such that they are agnostic to whether one is working with
However in a few places I have been forced to do
which I think may add a little extra cost as a brand new self.c will be made at each iteration, whilst before this was not the case.... any smarter idea is welcome :) |
Sure, I will get the |
…StackedOperators now extend MPIStackedLinearOperator
I have added some changes:
|
@rohanbabbar04 let me know if/when I should go ahead with the review :) |
@mrava87, most the things discussed are done...
while applying in adjoint mode, After this we will need to modify the |
Hi Rohan, For So, in short, I think we need:
Makes sense? |
Make sense... |
@mrava87 , I have made all the changes You can review all the changes we have done till then... |
@mrava87 , You can review this PR, We can then merge it and open a new PR for handling StackedDistributedArray in |
@rohanbabbar04 sure let me review your changes. Note that I already modified cg and cgls to work interchangeably with both DistributedArray and StackedDistributedArray (my bad for not adding a point in the list at the top of the PR). In fact, a tutorial already uses this. However I think we should look a bit more into it as a couple of changes that I made require re-initializing arrays whilst before they were working in place with .localarray… there may be a way to do it whilst still keeping interchangeability but I couldn’t find one yet, so let’s leave this for the new PR :) |
Sounds Great!! We can do this in a new PR :) |
@rohanbabbar04 I did modify the docstrings of the solvers and did a final clean up of all the new codes... I merge now :) Note that I created two new issues for the solvers, so we don't forget to add tests and look into any better way to avoid re-initializing arrays if not strictly needed :) |
This PR provides a first implementation of
StackedDistributedArray
as discussed in #76.It contains the following new features:
StackedDistributedArray
MPIStackedLinearOperator
that allows operating on multipleDistributedOperator
performing usual operators (_matvec, _rmatvec, addition, chaining, ...)MPIStackedBlockDiag
andMPIStackedVStack
cg
andcgls
able to interact with bothDistributedArray
andStackedDistributedArray