# How can I set global computation options ($MaxPiecewiseCases) for parallel kernels? [duplicate] I'm trying to do a calculation in parallel that requires setting$MaxPiecewiseCases. How can I do this? This small test case doesn't work for me:

$MaxPiecewiseCases = 1000; Print[$MaxPiecewiseCases];
ParallelEvaluate[$MaxPiecewiseCases = 500; Print[$MaxPiecewiseCases]];


During evaluation of In[118]:= 1000

• I get 500 from the parallel kernels in V9.0.1, V8.0.4 (Mac OSX). – Michael E2 Jun 16 '14 at 13:11
• Note that if any of the parallel kernels crashes and is (automatically or otherwise) restarted, this setting will be lost. Whether or not that is a problem for you depends on the application, obviously, but if it is--it's better to make the setting in $InitCode rather than explicitly. – Oleksandr R. Jun 16 '14 at 14:06 • @OleksandrR. ParallelDeveloper$InitCode is hard to find within Mathematica. – Michael E2 Jun 16 '14 at 16:28