@@ -187,7 +187,8 @@ function _core_msolve(
187187 la_option:: Int = 2 , # linear algebra option
188188 get_param:: Int = 1 , # get rational parametrization
189189 info_level:: Int = 0 , # info level for print outs
190- precision:: Int = 32 # precision of the solution set
190+ precision:: Int = 32 , # precision of the solution set
191+ worker_pool:: Union{Nothing,AbstractWorkerPool} = nothing , # worker pool for parallel computation
191192 )
192193
193194 F = I. gens
@@ -207,9 +208,14 @@ function _core_msolve(
207208 # convert Singular ideal to flattened arrays of ints
208209 lens, cfs, exps, nr_gens = _convert_to_msolve (F)
209210
210- jl_len, jl_vnames, jl_cf_lf, jl_cf, jl_sols_num, jl_sols_den =
211- _core_msolve_array (lens, cfs, exps, variable_names, field_char;
212- initial_hts, nr_thrds, max_nr_pairs, la_option, get_param, info_level, precision)
211+ run_core_array = () -> _core_msolve_array (lens, cfs, exps, variable_names, field_char;
212+ initial_hts, nr_thrds, max_nr_pairs, la_option, get_param, info_level, precision)
213+
214+ jl_len, jl_vnames, jl_cf_lf, jl_cf, jl_sols_num, jl_sols_den = if isnothing (worker_pool)
215+ run_core_array ()
216+ else
217+ remotecall_fetch (run_core_array, worker_pool)
218+ end
213219
214220 # convert to julia array, also give memory management to julia
215221 jl_ld = Int32 (length (jl_len))
@@ -490,7 +496,8 @@ function real_solutions(
490496 la_option:: Int = 2 , # linear algebra option
491497 info_level:: Int = 0 , # info level for print outs
492498 precision:: Int = 32 , # precision of the solution set
493- interval:: Bool = false # return real solutions as intervals
499+ interval:: Bool = false , # return real solutions as intervals
500+ worker_pool:: Union{Nothing,AbstractWorkerPool} = nothing , # worker pool for parallel computation
494501 )
495502
496503 isdefined (I, :real_sols ) ||
@@ -500,7 +507,8 @@ function real_solutions(
500507 max_nr_pairs = max_nr_pairs,
501508 la_option = la_option,
502509 info_level = info_level,
503- precision = precision)
510+ precision = precision,
511+ worker_pool = worker_pool)
504512
505513 if interval
506514 return I. inter_sols
0 commit comments