Commit a967314
Scheduled Halo Exchange (#980)
This PR introduces the [scheduled exchange
feature](ghex-org/GHEX#190) from GHEX into
ICON4Py.
These exchange allows to call the exchange function before all work has
been completed, i.e. the exchange will wait until the previous work is
done. A similar feature is the "scheduled wait", that allows to initiate
the receive without the need to wait on its completion.
In addition to this the function also renamed the functions related to
halo exchange:
- `exchange()` was renamed to `start()`.
- `wait()` was renamed to `finish()` (that might now return before the
transfer has fully concluded).
- `exchange_and_wait()` was renamed to `exchange()`.
All of these functions now accepts the an argument called `stream`,
which defaults to `DEFAULT_STREAM`. It is indicate how synchronization
with the stream should be performed.
In case of `start()` it means that the actual exchange should not start
until all work previously submitted to `stream` has finished. For
`finish()` it means that further work, submitted to `stream`, should not
start until the exchange has ended. For `finish()` it is also possible
to specify `BLOCK`, which means that `finish()` waits until the transfer
has fully finished.
The orchestrator was not updated, but the change were made in such a way
that it continues to work in diffusion, although using the original,
blocking behaviour.
---------
Co-authored-by: Philip Mueller <philip.paul.mueller@bluemain.ch>
Co-authored-by: Hannes Vogt <vogt@hey.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Mikael Simberg <mikael.simberg@iki.fi>
Co-authored-by: Hannes Vogt <hannes@havogt.de>1 parent d5778fb commit a967314
File tree
15 files changed
+2459
-2148
lines changed- model
- atmosphere
- advection/src/icon4py/model/atmosphere/advection
- diffusion/src/icon4py/model/atmosphere/diffusion
- dycore/src/icon4py/model/atmosphere/dycore
- common
- src/icon4py/model/common
- decomposition
- interpolation
- metrics
- orchestration
- states
- tests/common
- decomposition/mpi_tests
15 files changed
+2459
-2148
lines changedLines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
210 | | - | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
211 | 213 | | |
212 | 214 | | |
213 | 215 | | |
| |||
313 | 315 | | |
314 | 316 | | |
315 | 317 | | |
316 | | - | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
317 | 323 | | |
318 | 324 | | |
319 | 325 | | |
| |||
396 | 402 | | |
397 | 403 | | |
398 | 404 | | |
399 | | - | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
400 | 410 | | |
401 | 411 | | |
402 | 412 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
| 177 | + | |
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
| |||
Lines changed: 20 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
417 | 417 | | |
418 | 418 | | |
419 | 419 | | |
420 | | - | |
| 420 | + | |
421 | 421 | | |
422 | 422 | | |
423 | 423 | | |
| |||
761 | 761 | | |
762 | 762 | | |
763 | 763 | | |
764 | | - | |
| 764 | + | |
765 | 765 | | |
766 | 766 | | |
767 | 767 | | |
768 | 768 | | |
| 769 | + | |
769 | 770 | | |
770 | 771 | | |
771 | 772 | | |
| |||
802 | 803 | | |
803 | 804 | | |
804 | 805 | | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
805 | 810 | | |
806 | 811 | | |
807 | 812 | | |
808 | 813 | | |
809 | 814 | | |
810 | | - | |
| 815 | + | |
| 816 | + | |
811 | 817 | | |
812 | 818 | | |
813 | 819 | | |
| |||
850 | 856 | | |
851 | 857 | | |
852 | 858 | | |
| 859 | + | |
853 | 860 | | |
854 | 861 | | |
855 | 862 | | |
856 | 863 | | |
857 | 864 | | |
858 | | - | |
| 865 | + | |
| 866 | + | |
859 | 867 | | |
860 | 868 | | |
861 | 869 | | |
| |||
871 | 879 | | |
872 | 880 | | |
873 | 881 | | |
874 | | - | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
875 | 888 | | |
876 | 889 | | |
877 | 890 | | |
| |||
917 | 930 | | |
918 | 931 | | |
919 | 932 | | |
920 | | - | |
| 933 | + | |
| 934 | + | |
921 | 935 | | |
922 | 936 | | |
923 | 937 | | |
| |||
Lines changed: 22 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1151 | 1151 | | |
1152 | 1152 | | |
1153 | 1153 | | |
1154 | | - | |
1155 | | - | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
1156 | 1159 | | |
1157 | 1160 | | |
1158 | 1161 | | |
| |||
1223 | 1226 | | |
1224 | 1227 | | |
1225 | 1228 | | |
1226 | | - | |
1227 | | - | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
1228 | 1234 | | |
1229 | 1235 | | |
1230 | 1236 | | |
1231 | | - | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
1232 | 1242 | | |
1233 | 1243 | | |
1234 | 1244 | | |
| |||
1319 | 1329 | | |
1320 | 1330 | | |
1321 | 1331 | | |
1322 | | - | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
1323 | 1337 | | |
1324 | 1338 | | |
1325 | 1339 | | |
| |||
1389 | 1403 | | |
1390 | 1404 | | |
1391 | 1405 | | |
1392 | | - | |
| 1406 | + | |
1393 | 1407 | | |
1394 | 1408 | | |
1395 | 1409 | | |
1396 | 1410 | | |
| 1411 | + | |
1397 | 1412 | | |
0 commit comments