I am interested in leveraging more number of physical cores when solving a MIP problem with mathopt.
Parallelization was easy with CP-SAT by setting the number of search workers
solver.parameters.num_workers = 8 # use 8 cores
I struggling to find the right parameter to enable the solver to use more than 1 core to solve with mathopt. I am using HiGHS solver with mathopt (like below snippet)
params = mathopt.SolveParameters(enable_output=True)
result = mathopt.solve(model, mathopt.SolverType.HIGHS, params=params)
-- EDIT --
params = mathopt.SolveParameters(enable_output=True, threads=8)
I get below error:
proto_result = solver.solve(
RuntimeError: INVALID_ARGUMENT: threads not supported for HiGHS solver, this must be set using globals, see HiGHS documentation
tried below:
params = mathopt.SolveParameters(enable_output=True, highs={"threads": 8})
result = mathopt.solve(model, mathopt.SolverType.HIGHS, params=params)
result = math_opt_parameters_pb2.SolveParametersProto(
ValueError: Protocol message HighsOptionsProto has no "threads" field.
Can anybody please help ?