pub fn spawn_ranks<F, R>(size: usize, body: F) -> Vec<R>Expand description
Build a size-rank simulated communicator and run body on each
simulated rank in its own thread, returning each rank’s result in rank
order. body receives a ready-to-use ThreadRankMpi handle; construct
a DistributedOptimizationContext from it to drive a real algorithm.
§Panics
Propagates a panic from body on any rank (via JoinHandle::join’s
Result::expect) rather than silently losing a rank’s failure.