# Properly parallelising FindRoot for multiple starting values

I have a problem I want to find numerical solutions for with different starting variables. Let F be a vector supposed to vanish, which in its definition includes the free symbols a, b, c. Then I run

output={alpha,beta,gamma, F};
initialconditions={{gamma, 1}};
Export["numerical.csv",
N[
ParallelTable[
output /. FindRoot[F==0, initialconditions],
{alpha, 0 Degree, 100 Degree, 20 Degree},
{beta, 0 Degree, -100 Degree, -20 Degree}
]],
"TSV"
]


Which causes Launching kernels... to appear on the screen. When I check in htop what the Kernels do, I notice that all are sleeping except for the main one; so nothing seems to be run in parallel. The same happens with the following alternative I tried:

tasks = Table[
ParallelSubmit[
{F, initialconditions, output, alpha, beta},
output /. FindRoot[F==0, initialconditions]
],
{alpha, 0 Degree, 100 Degree, 20 Degree},
{beta, 0 Degree, -100 Degree, -20 Degree}
];
Export["numeric.csv", result, "TSV"]


What am I doing wrong about parallelisation?

Edit: The problem does not seem to be about FindRoot; at least, when I run it ouside of any parallel context:

Do[
Print[DecimalForm[N[output]] /. FindRoot[F==0, initialconditions]],
{alpha, 0 Degree, 100 Degree, 20 Degree},
{beta, 0 Degree, -100 Degree, -20 Degree},
]


it finds solutions; though very slowly, which is why I want to run this problem in parallel.

• I don't know about the parallelization aspect, but does the FindRoot work outside the ParallelTable? Could you include a sample problem? – Chris K Nov 15 '18 at 15:51
• @ChrisK See my edit. I will be looking for a complete example that shows the problem. – Bubaya Nov 15 '18 at 16:02
• Thanks! From your question, it seems more about finding roots across a range of parameter values, rather than a range of starting values (initialconditions is always {gamma,1}). Is that right? – Chris K Nov 15 '18 at 16:05