marmaduke 10 months ago

That’s what I was wondering. Iiuc openmp uses work stealing and the spice readme talks about the inefficiency of that:

https://github.com/judofyr/spice?tab=readme-ov-file#work-ste...

so I’d be interested in seeing a benchmark.

nestorD 10 months ago

Rayon is known to have a higher overhead for the simple, and arguably most common case in numerical codes, static block size scheduling. Things get better, and you start to benefit from rayon, as work gets less balanced.

thayne 10 months ago

Well, for one thing OpenMP is a c/c++ library, and chili and rayon are rust libraries.

It's probably possible to use openmp from rust, but the interface probably isn't as nice, you would need some kind of translation layer from rust closures and iterators to the OpenMP API

  • bee_rider 10 months ago

    Plus Fortran!

    There’d definitely be some work translating Rust concepts over. It might be impossible/not worth it. But maybe it would be nice to have Rust, C, and Fortran all talking to the same runtime?