PolyChord / PolyChordLite

Public version of PolyChord: See polychord.co.uk for PolyChordPro
https://polychord.io/
Other
83 stars 26 forks source link

Limit number of cores/threads used #114

Open mherkhachatryan opened 5 months ago

mherkhachatryan commented 5 months ago

How can one limit of number of cores or threads used by polychord. I have tried to to set with OMP_NUM_THREADS environmental variable inside docker, but it does not seem to help.

Any help would be appreciated.

mherkhachatryan commented 5 months ago

I deployed polychord inside docker container, limit container usage with this docker-compose command

    deploy:
      resources:
        limits:
          cpus: '3.0'

it's running 2nd day, but on multinest inside same environment sampling would take on same number of data points and parameters like 40 minutes.

williamjameshandley commented 4 months ago

Hi @mherkhachatryan, PolyChord is MPI parallelised, so OMP_NUM_THREADS wouldn't change runtime unless your likelihood has parallelisation.

A good rule of thumb for nested sampling is to start with a very low number of live points (say 5), and see how long that takes to run.

You can then work out how long a full run will take with the scaling

T_run ~ T_0 * (nlive/nlive0) / n_mpi_threads

mherkhachatryan commented 3 months ago

Thank you

On Wed, Feb 28, 2024, 21:16 Will Handley @.***> wrote:

Hi @mherkhachatryan https://github.com/mherkhachatryan, PolyChord is MPI parallelised, so OMP_NUM_THREADS wouldn't change runtime unless your likelihood has parallelisation.

A good rule of thumb for nested sampling is to start with a very low number of live points (say 5), and see how long that takes to run.

You can then work out how long a full run will take with the scaling

T_run ~ T_0 * (nlive/nlive0) / n_mpi_threads

— Reply to this email directly, view it on GitHub https://github.com/PolyChord/PolyChordLite/issues/114#issuecomment-1969467669, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJQQEKXLFLQEP525X7DXED3YV5Q5TAVCNFSM6AAAAABCRORF5SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRZGQ3DONRWHE . You are receiving this because you were mentioned.Message ID: @.***>