Skip to content

Multicores processing #251

Answered by MilesCranmer
AKHCE asked this question in Q&A
Jan 16, 2023 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

The procs argument controls how many cores it uses. So for using 4 cores you would set procs=4.

If it still doesn't use all the cores, then it could be that the main thread is doing too much work. In that case, try increasing ncyclesperiteration until all cores are being used. Also, having populations >= 2 * procs is a good idea, so that all threads can be occupied.

You could also try using multiprocessing instead of multithreading. To do that, use multithreading=False, procs=4.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@MilesCranmer
Comment options

@AKHCE
Comment options

@MilesCranmer
Comment options

Answer selected by AKHCE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
PySR PySR-related discussion
2 participants