# Operators without built-in meaning are incompatible with parallel evaluation

Mathematica has a useful set of Operators Without Built-In Meanings. For example: CenterDot, CircleDot, CirclePlus, Star, etc. According to the linked documentation, a user is allowed to define evaluation rules for these symbols. Unfortunately, these symbols are not compatible with parallel evaluation. The following example shows how parallel evaluation leads to an incorrect result when user-defined evaluation rule for CenterDot is used:

CenterDot = Times;
DistributeDefinitions[CenterDot];
f[n_] := Coefficient[CenterDot[n, x], x];

Table[f[n],{n,1,5}]


{1,2,3,4,5} (* correct *)

ParallelTable[f[n],{n,1,5}]


{0,0,0,0,0} (* wrong *)

I think that the root cause of this bug is that parallel evaluation routines are not allowed to distribute definitions of any symbols from System context while all Operators Without Built-In Meanings are defined in this very context.

Is there a practical way to use Operators Without Built-In Meanings in parallel calculations?

This question is based on observations made here, where accepted workaround was just to abandon such operators altogether.

• Some comments to one of your linked questions suggest using ParallelEvaluate: (1), (2) – Michael E2 Aug 6 at 10:31

CenterDot = Times

A better solution is to put the definitions in a package and load that package using ParallelNeeds. This is more robust because ParallelNeeds affects not only currently running subkernels, but also subkernels that will be started in the future. I'd recommend this second approach.