Conversation
|
Hi there, this is jenkins continuous integration... |
1 similar comment
|
Hi there, this is jenkins continuous integration... |
…NodeExchange.exchange Remove the standalone dummy_exchange_with_bound_dim function and replace it with noop_exchange = functools.partial(single_node_default.exchange, dims.CellDim), which relies on the exchange objects directly as suggested in the issue. SingleNodeExchange.exchange is inherently a noop, making this a proper replacement. Updated all 9 test files that referenced the old function. Agent-Logs-Url: https://github.com/C2SM/icon4py/sessions/4b7a4e7b-4b0b-474f-b345-1d9cae17543d Co-authored-by: jcanton <5622559+jcanton@users.noreply.github.com>
dummy_exchange_with_bound_dim with noop derived from SingleNodeExchange
|
This change doesn't make sense... |
|
But probably because I already did the deduplication in a previous PR and it didn't understand that there is nothing to do... Now it's more or less a rename but not for the better. |
Agree on the current changes not being an improvement. What I'd like to see is the dummy exchange removed, and all places where an exchange callable with a bound Probably even better: do #1136 first. If and only if there are still numpy functions that need to do the exchange internally, do the change I suggest above. |
dummy_exchange_with_bound_dim with noop derived from SingleNodeExchange…ummy-exchange-definition # Conflicts: # model/common/tests/common/grid/unit_tests/test_topography.py # model/common/tests/common/grid/unit_tests/test_vertical.py # model/common/tests/common/interpolation/unit_tests/test_interpolation_fields.py # model/common/tests/common/interpolation/unit_tests/test_rbf_interpolation.py # model/common/tests/common/metrics/unit_tests/test_compute_coeff_gradekin.py # model/common/tests/common/metrics/unit_tests/test_compute_weight_factors.py # model/common/tests/common/metrics/unit_tests/test_compute_zdiff_gradp.py # model/common/tests/common/metrics/unit_tests/test_metric_fields.py
|
Mandatory Tests Please make sure you run these tests via comment before you merge!
Optional Tests To run benchmarks you can use:
To run tests and benchmarks with the DaCe backend you can use:
To run test levels ignored by the default test suite (mostly simple datatest for static fields computations) you can use:
For more detailed information please look at CI in the EXCLAIM universe. |
|
cscs-ci run default |
|
cscs-ci run distributed |
| n_edges: int, | ||
| nlev: int, | ||
| exchange: Callable[[data_alloc.NDArray], None], | ||
| exchange: decomposition.ExchangeRuntime, |
There was a problem hiding this comment.
Can I know why only this one does not need the default single node exchange?
There was a problem hiding this comment.
I don't know the original reason, I just didn't want to change it.
But now that you bring this up, I'd probably remove the default in all the other cases as well?
There was a problem hiding this comment.
I commented above for another function which does nto have teh single exchange as default. Probably we didn't set it here because we missed it, but I do prefer that we set up the single node as default everywhere
There was a problem hiding this comment.
Hmm. I think that I will also vote for removing the default, because users should specify the exchange that they want to avoid unexpected results.
There was a problem hiding this comment.
I'd propose to not make that decision in this PR since that's orthogonal to the main purpose of this PR which is to remove the dummy_exchange helper. I'm happy to follow up with another PR based on what we discuss here.
I agree with @OngChia. Using the current "default" is almost always a mistake in user code. There the decision should be explicit. Additionally, having single node exchange as the default for convenience in tests is I think adding convenience for the wrong target audience. If one has to choose between a good API for users and a good API for testing/development, the good API for users should always have precedence. (If one can satisfy both that's even better, but I think in this case helping users avoid making the mistake of not specifying the type of exchange has precedence).
It should possibly not even be a choice which type of exchange to do. The SingleNodeExchange is IMO an implementation detail that exists to avoid loading mpi4py. GHEX will happily not do an exchange if there's only one rank. So I think we could do a better job abstracting this away. Additionally, I'm toying with the idea of passing a ProcessProps in places like this instead, which is in the end used to decide whether an exchange should be done. But these two last points are definitely not for now, let's focus on default/no default.
There was a problem hiding this comment.
@OngChia @nfarabullini are you ok with me resolving this comment? I'll open a separate PR for removing the default exchange and for the rest we need a bit more thinking...
There was a problem hiding this comment.
Yes, I agree. Let's do it in another PR.
| horizontal_start: gtx.int32, | ||
| horizontal_start_1: gtx.int32, | ||
| exchange: Callable[[data_alloc.NDArray], None], | ||
| exchange: decomposition.ExchangeRuntime, |
nfarabullini
left a comment
There was a problem hiding this comment.
I agree with the changes. I just left some comments here and there.
| n_edges: int, | ||
| nlev: int, | ||
| exchange: Callable[[data_alloc.NDArray], None], | ||
| exchange: decomposition.ExchangeRuntime, |
There was a problem hiding this comment.
I commented above for another function which does nto have teh single exchange as default. Probably we didn't set it here because we missed it, but I do prefer that we set up the single node as default everywhere
| horizontal_start: gtx.int32, | ||
| horizontal_start_1: gtx.int32, | ||
| exchange: Callable[[data_alloc.NDArray], None], | ||
| exchange: decomposition.ExchangeRuntime, |
dummy_exchange_with_bound_dim
Instead just use the already existing
SingleNodeExchangewhich is a noop. This also fixes the mismatch in function parameters whereexchange: Callable[...] = single_node_exchangeis wrong, withsingle_node_exchangenot being the correct type of callable.