Implementation of distributed Halo Operator#166
Conversation
|
@astroC86 I had a first spin at the I am going to summarize my experience so far here and tomorrow I will push an updated version of
|
Perfect,will have a look once you push!
The reason being is the Halo adjoint is not a true "adjoint" , it simply removes the halo from the
Ok so if I understand correctly you want to have the ability to have no halos long the edges, is that correct?
I will try to understand the |
|
For the adjoint, I think Take this example (it doesn't really matter that it is not distributed, this should not affect the linearity of the operator); I have an array of size 6 and I want to add halos every 3 Now I can write this as follows: this tells me that this operator is linear, so it has an adjoint 😄 I would be the same if you use Reflect as now you will have Now I can write this as follows: but you could not say, use a choosen value (eg 10) as has no fixed matrix that goes from Input to Output... so we don't want to add that scenario. Makes sense? |
…s since it is only for testing and should not be part of the implementation file
66d8286 to
b35dab1
Compare
mrava87
left a comment
There was a problem hiding this comment.
@astroC86 great work!
I reviewed the PR and I think we are very close for this to be ready to be merged 😄
I left a few small comments about doing some small improvements to type annotations/docstrings and a couple about changes in places that don't seem to match with what i see in the current main branch (probably you did work on those files as others PRs come in, so I just want to make sure we are not undoing any other concurrent work by mistake)
There was a problem hiding this comment.
I am a bit confused, the _unroll_allgather_recv seems very different from that of main (https://github.com/PyLops/pylops-mpi/blob/main/pylops_mpi/utils/_common.py#L8)
This seems more like what we have in v0.4.0 (https://github.com/PyLops/pylops-mpi/blob/v0.4.0/pylops_mpi/utils/_common.py) but not what we have in main... seems like you force overwrite some latest changes?
Please take a careful look.
There was a problem hiding this comment.
@astroC86 _unroll_allgather_recv still seems to be very different from the main (https://github.com/PyLops/pylops-mpi/blob/main/pylops_mpi/utils/_common.py#L8), why?
There was a problem hiding this comment.
There are not enough tests for the amount of features you implemented.
For example, we need to:
- test all 3 different combinations of
halo: scalar, tuple with ndim and tuple with 2*ndim elements; - 1d/2d/3d dims. I would ideally split that into 3 test functions
- test halo in isolation checking it produces an output with expected local shapes vs test halo combined with another operator (as you already do)
- test that a wrong grid_shape is catched (use the with pytest.raises.. type of test)
This PR adds the
HaloandMPINonStationaryConvolve1Doperators.