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

Simulating individual blocks is prohibitively slow #117

Open
A-J-F-Mackintosh opened this issue Nov 7, 2023 · 2 comments
Open

Simulating individual blocks is prohibitively slow #117

A-J-F-Mackintosh opened this issue Nov 7, 2023 · 2 comments

Comments

@A-J-F-Mackintosh
Copy link

Hi,

I have found that simulating windows of a single block is very slow. The below command gets through 100 / 200_000_000 simulations in one hour.

gimble simulate -o sims -s DIV -p 50 -e 44 -a 1 -b 1 -r 100 -w 2_000_000 -n 1 -l 100 -u 2.9e-9 -k 10,10,10,10 -m DIV -A 100_000 -B 100_000 -C 100_000 -T 200_000 --rec_rate 0.6

If I instead simulate the same amount of blocks in only 10 windows per replicate (each with 200_000 blocks), then the simulation finishes in less than two hours.

gimble simulate -o sims -s DIV -p 50 -e 44 -a 1 -b 1 -r 100 -w 10 -n 200_000 -l 100 -u 2.9e-9 -k 10,10,10,10 -m DIV -A 100_000 -B 100_000 -C 100_000 -T 200_000 --rec_rate 0.6

I am using 50 parallel processes in the above sims, but it is just as slow if I use only one process.

Cheers,

Alex

@GertjanBisschop
Copy link
Member

Thanks @A-J-F-Mackintosh!
I will do some profiling to find out what is going on.

@KLohse
Copy link
Collaborator

KLohse commented Nov 8, 2023

Thanks @A-J-F-Mackintosh! My guess is that when simulating few blocks but very many windows most of the time is spent writing the window-wise summaries into the zar store where each window will have it's own bSFS tally.

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

3 participants