Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In emcee.EnsembleSampler threads command is not working #478

Open
enitree opened this issue Sep 1, 2023 · 0 comments
Open

In emcee.EnsembleSampler threads command is not working #478

enitree opened this issue Sep 1, 2023 · 0 comments

Comments

@enitree
Copy link

enitree commented Sep 1, 2023

General information:

  • emcee version: 3.1.4
  • platform: ubuntu 22.04.2
    linux fedora 5.19.8
  • installation method (pip/conda/source/other?):

Problem description:

Hi ! so i am trying to model surface spots of a star using starry process (Ensemble Analysis to be precise).For posterior analysis i am using plain vanilla emcee( as recommended in starry_process documentation). whenever i initiate the MCMC with required number of walkers (in my case 30) and steps(in my case 5000) the code runs across all the cores available in the cpu. I have tried to use the threads command of emcee.EnsembleSampler by assigning numerical values to them. Irrespective of me assigning thread value, the code keeps on running across all the available cores.

Surprisingly, when i ran the code for the first time on the system it occupied a single core. While trying to figure out if the speed of the code can be enhanced I ran 'threads' and even then for threads=10 the code ran over all the cores. Since then i am unable to control the number of cores across which we want the code to run

since the time consumption while running across all the cores and single cores is similar we plan on to run multiple ensemble across various single core to fasten our process.

Expected behavior:

it is expected that the code runs over specified no of cores

Actual behavior:

it is running across all the cores

What have you tried so far?:

i have tried

import multiprocessing
multiprocessing.set_start_method("thread")

i have tried switching systems of different cores

Minimal example:

import emcee

# sample code goes here...

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant