MPI needs error messages!
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 839
- Forks
- 220
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 14
Description
Description
If the functor you pass to map_rect throws an exception, you just get an extremely generic "MPI error on first evaluation." error message. I think it should be possible to collect the exception string from the worker nodes and report that back. Ideally, we also add in the ability the pass in the name of the function so that we can show that it was the map_rect functor that threw the exception, too.
You can see the code here: https://github.com/stan-dev/math/blob/develop/stan/math/prim/mat/functor/mpi_parallel_call.hpp#L320 Currently it just uses a boolean for "ok", but we could switch to a string I believe (modulo serialization of strings over boost mpi).
Current Version:
v2.18.1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in stan/math/prim/mat/functor/mpi_parallel_call.hpp around line 320, where the MPI call currently reports only a boolean status and a generic error. Review how Boost.MPI serializes values and how exceptions from worker nodes are handled. Done means reporting the worker exception string and identifying the map_rect functor in the resulting error message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- distributed-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100