You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Question for @filippi / @antonio-leblanc: should one process be able to run several simulations (for ensembles, #172, or free-threaded Python)? If not, we merge the small fixes below and stop there.
ForeFire keeps simulation state in statics and a singleton: SimulationParameters::instance, FireDomain::propModelsTable/fluxModelsTable, the FireNode numerical settings, ForeFireAtom::instanceNRCount and StringRepresentation::outputstr. The GIL hides this today. Without it, 8 concurrent simulations segfault in 4 out of 5 runs, and the fifth gives wrong node counts (27–209 instead of 62).
Steps 1–4 are correctness fixes. They are not enough for thread safety on their own.
Move state into each domain. This changes FireDomain, DataBroker, Command and CLibForeFire, so the coupling ABI that Meso-NH uses must be agreed first.
Question for @filippi / @antonio-leblanc: should one process be able to run several simulations (for ensembles, #172, or free-threaded Python)? If not, we merge the small fixes below and stop there.
ForeFire keeps simulation state in statics and a singleton:
SimulationParameters::instance,FireDomain::propModelsTable/fluxModelsTable, theFireNodenumerical settings,ForeFireAtom::instanceNRCountandStringRepresentation::outputstr. The GIL hides this today. Without it, 8 concurrent simulations segfault in 4 out of 5 runs, and the fifth gives wrong node counts (27–209 instead of 62).Plan:
Stress test(Add the concurrency stress test that reproduces #175 #176, merged)Atomic id counter and thread-safe singleton(Make the atom id counter atomic and the parameters singleton safe #177, merged)One output buffer per(Give each string representation its own buffer #178, merged)StringRepresentationSteps 1–4 are correctness fixes. They are not enough for thread safety on their own.
FireDomain,DataBroker,CommandandCLibForeFire, so the coupling ABI that Meso-NH uses must be agreed first.cp314twheels again (reverses part of Stop shipping free-threaded (cp314t) wheels #155), only after step 5.Drafted with Claude Opus 5, reviewed by a maintainer.