beast icon indicating copy to clipboard operation
beast copied to clipboard

create_physicsmodel() multiprocessing failure

Open benjamin-gibson opened this issue 3 months ago • 1 comments

I ran into an error when trying to use multiple cores with beast.tools.run.create_physicsmodel.create_physicsmodel(beast_settings_info=settings_path, nprocs=10, nsubs=2)

AttributeError: Can't get local object 'create_physicsmodel..gen_subgrid'

I think what's happening is that the gen_subgrid function is not pickle-able as it is defined within the create_physicsmodel function.

Note that everything runs properly when not multiprocessing (nprocs=1).

Thanks!

benjamin-gibson avatar Sep 23 '25 18:09 benjamin-gibson

Not sure anyone has attempted to run the BEAST using multiple cores before. I could be wrong and look forward to info if someone else has.

Yes, the physicsmodel not being pickle-able would be an issue. Not sure how easy it would be to modify the physics model to be pickle-able.

karllark avatar Sep 23 '25 18:09 karllark