Message Boards Message Boards

Avoid problem with Parallel Kernel Configuration in MMA 11.2?

GROUPS:

Hello, if I try anything in parallel with the latest 11.2-update of Mathematica, it tells me

LaunchKernels::unicore: The default parallel kernel configuration does not launch any kernels on a single-core machine. Use LaunchKernels[n] to launch n kernels anyway.

ParallelTable::nopar: No parallel kernels available; proceeding with sequential evaluation.ParallelTable::nopar: No parallel kernels available; proceeding with sequential evaluation.

But why? Never have read this before. Singlecore? Its a Pi 3...shouldn't it be 'quadcore'? Why do I no have to activate kernels manually now, what is wrong here?

How can I set 4 kerrnels as standard / permanent, so that I not have to do that manually every time again - as it was before the update?

Support online does not help me much:

to access the Parallel Kernel Configuration menu, select the menu item Evaluation ► Parallel Kernel Configuration

but there is no 'Parallel Kernel Config' here in my menu,

Edit: I also tried to add 3 more named Local1-3 in Evaluation -> Kernel Config -> add, but that does not work. I see in the taskmanager that theyre started on startup automatically, but wont be recognized. I still get the same errormessage and $KernelCount still says 0.

And even if I add them by hand with LaunchKernels permanent anyhow, wouldnt they be started all at once on startup then? When I am not completely wrong, they were started automatically in previous versions, only when they were needed.

I install an older version now on another sd-card to see the differences exactly...

POSTED BY: Michael Steffen
Answer
1 month ago

As assumed, 11.0.1 says "Kernel Configuration ( < 4 local kernels > )" and "Processor Count 4" (instead of 1 on 11.2).

But why? Is it possible to fix this anyhow for 'ourself'/to tell Mathematica that there are 4 cores permanent? Do I have to stay on the old version for parallel-evaluation? Waiting for an update?

Maybe with SetOptions possible anyhow? Many thanks already.

POSTED BY: Michael Steffen
Answer
1 month ago

Try this

Wolfram Language 11.2.0 Engine for Linux ARM (32-bit)
Copyright 1988-2018 Wolfram Research, Inc.

In[1]:= Unprotect[$ProcessorCount]; $ProcessorCount = 4;

In[2]:= LaunchKernels[]

Out[2]= {KernelObject[1, local], KernelObject[2, local], KernelObject[3, local], KernelObject[4, local]}
POSTED BY: Ilian Gachevski
Answer
1 month ago

This does not save the setting permanently and furthermore starting all kernels immediately. Its useful as a workaround, but not very good when you have to open many different projects or need to take care of Raspberrys very limited memory.

Best solution would be saving 'Processor Count = 4' permanent anyhow...or fixing its processor-detection. Is there a way to save the 'Processor Count'-setting maybe?

POSTED BY: Michael Steffen
Answer
1 month ago

Absolutely, this is a bug and it's actually being fixed in the development version today.

But until the next release, as a workaround, you can add the code I suggested

Unprotect[$ProcessorCount]; 
$ProcessorCount = 4;

to your kernel init.m file, so it will be evaluated whenever the kernel starts up. To find the location, try

In[1]:= FindFile["init.m"]

Out[1]= /home/pi/.WolframEngine/Kernel/init.m
POSTED BY: Ilian Gachevski
Answer
1 month ago

.

POSTED BY: Michael Steffen
Answer
1 month ago

I now have found the preferences (hidden in help -> about Wolfram -> System Information -> Front End -> Open Preferences).

When I set 4 kernel manually in the submenu 'Parallel' /Local Kernels it seems to work 'as it should' - cpu-count is still 1, but Mma starts with 1 kernel only and when I run something with parallel-evaluation, 4 kernels are starting and cpu-usage gets up to 100%. Thats fine. And this setting seems to be stored permanent.

But it would be great if this getting changed/fixed in a next release yet.

POSTED BY: Michael Steffen
Answer
1 month ago

Group Abstract Group Abstract