I need help please. I'm looking for suggestions on shared and distributed memory parallelisation in Rust. In the classical scientific computing language (C/C++/Fortran) these would be OpenMP and MPI. What is out there in the Rust world? What would be the most popular and obvious choices that I should start with?
A quick google for "MPI Rust" shows that people are doing such things GitHub - rsmpi/rsmpi: MPI bindings for Rust
I only have very limited experience of OpenMP but my feeling is that one may not needed it in Rust. We can split loops to operate on junks of data in parallel with parallel iterators ParallelIterator in rayon::iter - Rust We have mutual excision (Critical regions) with Arc<Mutex, we can communicate between threads with channels: Using Message Passing to Transfer Data Between Threads - The Rust Programming Language crossbeam::channel - Rust Which seems to cover a lot of what OpenMP does.
Rust uses iterators, and then the rayon library to make them parallel. This is the equivalent of basic OpenMP for loops.
You also have tasks and scoped threads for tree-like problems.