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

bootsnaq parallelization error #191

Open
crsl4 opened this issue Dec 15, 2022 · 0 comments
Open

bootsnaq parallelization error #191

crsl4 opened this issue Dec 15, 2022 · 0 comments
Assignees
Labels

Comments

@crsl4
Copy link
Member

crsl4 commented Dec 15, 2022

Error with bootsnaq (from Cecile). I want 100 bootstrap replicates. I started 1 julia session and gave it 30 workers.
Each snaq search will then parallelize all the runs across the available workers. All goes well for the first bootstrap replicate. Then I get this below.
Did you ever run into this issue?

I had the same issue when doing serial bootsnaq, asking for 1 bootstrap replicate only from each bootsnaq call.
The first one went well. The second bootsnaq threw an error.
It looks like snaq! is not "finishing" each run on each worker properly. Then each worker can't take a new job later.

I would like to try and parallelize the bootstrap replicates instead of parallelizing the runs within a bootstrap replicate. That would be to by-pass the parallelization of runs within snaq.
But I can't do this within 1 session: each snaq will use all workers. There's no option in snaq! for the user to ask for less than all workers to be used.
So I have to open a ton of separate julia sessions...

begin replicate 1
[... all good...]

begin replicate 2
bootstrap data simulation: seed 11603
[...]
BEGIN: 30 runs on starting tree ...
2022-08-26 10:32:6.467

main seed 14822
From worker 28: seed: 14822 for run 1, 2022-08-26 10:32:6.473
From worker 8: seed: 69827 for run 2, 2022-08-26 10:32:6.475
From worker 24: seed: 32747 for run 3, 2022-08-26 10:32:6.476
From worker 17: seed: 23172 for run 4, 2022-08-26 10:32:6.478
ERROR: cannot serialize a running Task
Stacktrace:
[...]
[10] pmap
[inlined]
[11] optTopRuns!(currT0::HybridNetwork, liktolAbs::Float64,...)
@ PhyloNetworks ~/.julia/packages/PhyloNetworks/DlPdx/src/snaq_optimization.jl:1562
[12] optTopRunsBoot(currT0::HybridNetwork, data::DataFrame,...)
@ PhyloNetworks ~/.julia/packages/PhyloNetworks/DlPdx/src/bootstrap.jl:252
[13] bootsnaq(startnet::HybridNetwork, data::DataFrame; ...)
@ PhyloNetworks ~/.julia/packages/PhyloNetworks/DlPdx/src/bootstrap.jl:401
@crsl4 crsl4 added the bug label Dec 15, 2022
@crsl4 crsl4 self-assigned this Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant