100 votes
Accepted

Mathematica 10.0.x freezes in Initializing kernels

Yes, there was a recently pushed incorrect paclet update that will cause this startup hang. All platforms can be affected, not just Windows. For a workaround, start a standalone kernel (...
ilian's user avatar
  • 25.4k
20 votes

Restarting Mathematica automatically

You could launch a different kernel and use that to run the computation. You will be controlling this "slave kernel" from another Mathematica session. This will allow you to script even quitting and ...
Szabolcs's user avatar
  • 231k
19 votes

Mathematica 10.0.x freezes in Initializing kernels

I'm adding an alternate solution for Mac, as the suggested answer did not work for me. It might be due to me force quitting it prior to looking for a solution. This method is a bit of a scorched ...
Simon O'Doherty's user avatar
18 votes
Accepted

Quit the Kernel and start new session automatically

This can be relatively easily done using extremely useful $FrontEnd option "ClearEvaluationQueueOnKernelQuit" introduced by ...
Kuba's user avatar
  • 135k
18 votes

What secrets are hidden away in your init.m and where do you place it? Please help me build the ideal init.m

I am an init.m ascetic. And I doubt after 30+ years of using Mathematica I will change. Everyone else, who wishes to, may proclaim how it is indispensable to their workflow, and I will accept their ...
17 votes

How to restart computation when kernels die?

One approach would be to run the evaluation in a second kernel which is controlled from a main kernel through MathLink/WSTP. Then your main kernel can detect if the MathLink connection dies. You can ...
Szabolcs's user avatar
  • 231k
16 votes
Accepted

Detecting kernel initialization

Apparently, Throw is deactivated during kernel initialization. The following function can determine if Throw is inoperative: <...
WReach's user avatar
  • 68.1k
14 votes

Detecting kernel initialization

After some spelunking, I found a file which contains a lot of initialization code, including reading the kernel init.m file, loading ...
Szabolcs's user avatar
  • 231k
13 votes
Accepted

Handling Kernel start. What is a full initialization stack and what place the Autoload has there?

Update Leaving my original answer below for historical purposes, however it only applies up until version 11.1.1. As of version 11.2.0, the kernel startup initialization has been overhauled and this ...
ilian's user avatar
  • 25.4k
13 votes
Accepted

How to restart computation when kernels die?

Assuming FrontEnd survives, prepare 3 cells: ...
Kuba's user avatar
  • 135k
13 votes

How to use the Autoload directory?

In order for a package in Autoload to load, it must have the file Kernel/init.m. Thus, ...
Szabolcs's user avatar
  • 231k
11 votes

What secrets are hidden away in your init.m and where do you place it? Please help me build the ideal init.m

I tend to put a lot of little functions in my init.m file, functions that take arguments and use module variables. I found that I would now have Global symbols like ...
10 votes

Different strategies to get a clean Kernel. Quit, Exit, ClearAll, Remove, CleanSlate?

PREVENTION This is a Community Wiki answer, experienced users are welcome to add to it and correct mistakes. Best practice is to avoid the need to clean the kernel at all, by avoiding the creation ...
9 votes

Restarting Mathematica automatically

On Windows you can run your cycles in a batch file like this: ...
Chris Degnen's user avatar
  • 30.5k
9 votes
Accepted

Parallel computing: cores vs threads

It seems I misunderstood the kind of threading you were addressing when writing my original reply (below). For internally multithreaded functions launched from a single kernel I you can limit the ...
Mr.Wizard's user avatar
  • 267k
8 votes
Accepted

Serious Startup Error: Error code 583

This error message has occurred before with a corrupted init.m file. Check your init.m files if you have edited them. Otherwise, the article @JHM linked to you should fix the problem.
Searke's user avatar
  • 4,374
8 votes

How to ensure that a package is always loaded on startup, even in parallel kernels?

The Autoload mechanism can be used for this. Place the package in $UserBaseDirectory/Autoload or ...
Szabolcs's user avatar
  • 231k
8 votes
Accepted

Cannot start multiple instances of Mathematica after upgrading to 10.4

WORKAROUND FROM THE TECHNICAL SUPPORT There are easier ways to perform simultaneous evaluations in Mathematica, with notebooks that remain in separate contexts, all within a single instance of the ...
Alexey Golyshev's user avatar
8 votes
Accepted

How to automatically do a computation, Quit[], restart and do a new computation

You can start a fresh extra kernel programmatically from your current notebook using MathLink. You can then load packages in that kernel, perform necessary calculations, get the result back to your ...
Ray Shadow's user avatar
  • 7,736
8 votes

Different strategies to get a clean Kernel. Quit, Exit, ClearAll, Remove, CleanSlate?

NEW KERNEL This is a Community Wiki answer, experienced users are welcome to add to it and correct mistakes. To get a fresh kernel for the current notebook, one can either kill the current kernel ...
8 votes

Choose the number of kernels used by ParallelTable

Another way from the menu (if accessible): Edit $ \rightarrow $ Preferences $ \rightarrow $ Parallel $ \rightarrow $ Local Kernels $ \rightarrow $ (Number of local kernels to use) Manual setting
Αλέξανδρος Ζεγγ's user avatar
7 votes
Accepted

Choose the number of kernels used by ParallelTable

You can launch as many or as few kernels as you like, see LaunchKernels and CloseKernels. Parallel functions will use as many as ...
Szabolcs's user avatar
  • 231k
7 votes

What secrets are hidden away in your init.m and where do you place it? Please help me build the ideal init.m

...
6 votes
Accepted

new kernel for notebook

Ok, so first of all you have to be aware that number of kernels you can use is limited by license. You can go now to Evaluation -> Kernel Configuration Options ...
Kuba's user avatar
  • 135k
6 votes
Accepted

How to avoid kernel shutdown when importing a file

The kernel crash is a bug which arises from deep recursion in string pattern matching. It has been fixed in version 10.1.0 and later, by updating to a more modern version of the PCRE library and ...
ilian's user avatar
  • 25.4k
6 votes
Accepted

Package loading in init.m

Not all packages can be loaded on startup. There are some operations that simply do not work during startup, the most prominent one being Throw/...
Szabolcs's user avatar
  • 231k
6 votes
Accepted

Kernel starts up very slowly on Linux

I don’t know if the problem you encountered is the same as the problem described in this post. If the same, you need to disable automatic updates. This failure is caused by the paclet update system. ...
A little mouse on the pampas's user avatar
6 votes

What secrets are hidden away in your init.m and where do you place it? Please help me build the ideal init.m

...
5 votes

Kernels permanently consume 100% CPU

OK, issue solved. The problem is apparently caused by a bug in the Linux kernel related to the insertion of a leap second and is only apparent when queried from Java. A solution is given here (...
RonH's user avatar
  • 281
5 votes

More Information About Solving Mathematica 10.0 Freezing Issue

These are the same steps as in (92931) with a little bit of added detail for Windows. Make sure any running (or hanging) copies of Mathematica are closed Navigate to the installation directory, this ...
ilian's user avatar
  • 25.4k

Only top scored, non community-wiki answers of a minimum length are eligible