dfm / dfm/emcee

Error when using MPI

Open
#244 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Question
Dominant language
Python
Stars
1.6k
Forks
440
PR merge metrics
No merged PRs in 30d

Description

I'm only seeing this error at the end when using MPIPool in the emcee sampler, it works fine with a multiprocessing pool.

> Traceback (most recent call last):
>   File "mpiemcee.py", line 121, in <module>
>     pos, prob, state = sampler.run_mcmc(p0, 10)
>   File "/home/sash7676/anaconda2/lib/python2.7/site-packages/emcee/sampler.py", line 172, in run_mcmc
>     **kwargs):
>   File "/home/sash7676/anaconda2/lib/python2.7/site-packages/emcee/ensemble.py", line 198, in sample
>     lnprob, blobs = self._get_lnprob(p)
>   File "/home/sash7676/anaconda2/lib/python2.7/site-packages/emcee/ensemble.py", line 382, in _get_lnprob
>     results = list(M(self.lnprobfn, [p[i] for i in range(len(p))]))
> TypeError: 'NoneType' object is not iterable

Has anybody had this problem?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with mpiemcee.py at line 121 and compare the MPIPool path with the working multiprocessing-pool path. Trace the call through emcee/sampler.py line 172 and emcee/ensemble.py lines 198 and 382 to determine why the MPI mapping result is None rather than iterable; completion requires reproducing the traceback and confirming corrected MPI behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.