Consider an example:

$Assumptions = m > 0 && m \[Element] Integers;
ParallelDo[Print[{$Assumptions, Simplify[Sin[2*Pi*m]]}], {ik, 1, 2}, DistributedContexts -> All]

I expect it to produce:

{m > 0 && m \[Element] Integers,0}

But instead of it, Wolfram Mathematica gives:

{True,Sin[2 Notebook$$44$996424`m \[Pi]]}

$Assumptions cannot be distributed because it is in the System` context and because it is a symbol with special behaviour.

The correct way to handle this is to set it explicitly on all subkernels.

ParallelEvaluate[$Assumptions = m > 0 && m \[Element] Integers]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.