Skip to content

Add test for distributed run - #140

Draft
ways wants to merge 3 commits into
mainfrom
139-set-up-tox-test-with-multiple-cpusgpusnodes
Draft

Add test for distributed run#140
ways wants to merge 3 commits into
mainfrom
139-set-up-tox-test-with-multiple-cpusgpusnodes

Conversation

@ways

@ways ways commented May 19, 2025

Copy link
Copy Markdown
Contributor

Test fails. I think it's due to being on CPU(?). If so, the test should be marked clearly. Best solution would be to fix running on CPU.

[rank0]:   File "/home/larsfp/src/bris-inference/.tox/inference_CI_distributed/lib/python3.12/site-packages/anemoi/models/distributed/transformer.py", line 141, in forward
[rank0]:     return _headsalltoall(input_, shapes_, group=mgroup_)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/home/larsfp/src/bris-inference/.tox/inference_CI_distributed/lib/python3.12/site-packages/anemoi/models/distributed/transformer.py", line 53, in _headsalltoall
[rank0]:     dist.all_to_all(output_list, input_list, group=group)
[rank0]:   File "/home/larsfp/src/bris-inference/.tox/inference_CI_distributed/lib/python3.12/site-packages/torch/distributed/c10d_logger.py", line 83, in wrapper
[rank0]:     return func(*args, **kwargs)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^
[rank0]:   File "/home/larsfp/src/bris-inference/.tox/inference_CI_distributed/lib/python3.12/site-packages/torch/distributed/distributed_c10d.py", line 4114, in all_to_all
[rank0]:     work = group.alltoall(output_tensor_list, input_tensor_list, opts)
[rank0]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]: RuntimeError: Backend gloo does not support alltoall

@ways ways linked an issue May 19, 2025 that may be closed by this pull request
@ways
ways requested review from einrone and havardhhaugen May 19, 2025 12:43
@ways

ways commented May 19, 2025

Copy link
Copy Markdown
Contributor Author

https://docs.pytorch.org/docs/main/distributed.html#backends
Seems to be supported in torch 2.8, not earlier.

2.8 is not available in pip, dockerhub. Seems to still be under development.

@ways ways changed the title Add test, https://github.com/metno/bris-inference/issues/139 Add test for distributed run May 19, 2025
@ways
ways marked this pull request as draft May 19, 2025 12:57
@ways

ways commented May 27, 2025

Copy link
Copy Markdown
Contributor Author

https://docs.pytorch.org/docs/main/distributed.html#backends Seems to be supported in torch 2.8, not earlier.

2.8 is not available in pip, dockerhub. Seems to still be under development.

See #139 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set up tox test with multiple cpus/gpus/nodes

1 participant