No crashes observed on Linux
No crashes observed with HiGHS.jl 1.19.0 (only observed with HiGHS.jl 1.20.1)
No crashes observed for sequential/successive JuMP solve calls.
No crashes observed if we specify a single threaded execution of HiGHS:
model = direct_model(HiGHS.Optimizer())
Highs_resetGlobalScheduler(1)
set_attribute(model, MOI.NumberOfThreads(), 1)
I do not have a MWE at the moment and only report this for information. We now do specify a single threaded execution of the HiGHS solver.
I do not really think that it is possible without a proper MWE.
Nevertheless, I though that it could be interesting to report this if some other user encounters the same kind of problem : the explicit single execution of HiGHS did solve our problem.
It may also ring a bell for the HiGHS or HiGHS.jl developper because it seems that it could be related to nested parallelism issues on Windows.
I use the OhMyThread.jl tmap function and the JuMP model are created for each TransitionProblems instances
function parallel_solve_one_pdt(ep::EtudeParameters, pdt::Int, future_bf::BellmanFunction1D,)::Vector{BellmanFunction1D}
n_scenario = scenario_number(ep)
scenario_chunks = chunks(1:n_scenario; n=Threads.nthreads())
function process_chunk(scenario_chunk)
tps = TransitionProblems(ep, pdt, future_bf) #contains a JuMP model
return [solve_one_pdt_one_scenario!(tps, ep, pdt, scenario) for scenario ∈ scenario_chunk]
end
scenario_chunks_bfs::Vector{Vector{BellmanFunction1D}} = OhMyThreads.tmap(process_chunk, scenario_chunks, scheduler=:static) #(one Vector{BellmanFunction1D} per task)
scenario_bfs::Vector{BellmanFunction1D} = vcat(scenario_chunks_bfs...) # -> gather to a single Vector{BellmanFunction1D}
return scenario_bfs
end
Nothing fancy:
model = direct_model(HiGHS.Optimizer())
JuMP.set_silent(model)
JuMP.set_string_names_on_creation(model, true)