We changed our privacy policy. Read more.
101

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 (WolframKernel.exe on Windows, WolframKernel in a terminal on Linux; on Mac you will need the full path to the kernel binary, typically a location like /Applications/...


20

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 restarting the slave kernel. Using parallel tools This is simpler and I recommend trying this approach first. Launch a single kernel: kernel = ...


19

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 earth process though. In Finder go to ~/Library/Mathematica. Once there delete the Paclets folder. Next start up Mathematica again. Create a blank worksheet. ...


17

This can be relatively easily done using extremely useful $FrontEnd option "ClearEvaluationQueueOnKernelQuit" introduced by Chris Degnen. Usage Print @ $SessionID quitAndEvaluate[ Print @ $SessionID ] 25183094379509806957 25183094575602627552 quitAndEvaluate[] will restart kernel without aby additional tasks. It may be useful if you want to ...


17

Here are three progressively more intrusive steps to troubleshoot Mathematica. Hold down Shift-Control (Shift-Command on Mac) while starting Mathematica, as described here. If this didn't fix the problem, move to the next step. Evaluate SystemOpen[$UserBaseDirectory]. This will reveal the directory where Mathematica keeps all its settings, packages, ...


16

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 implement this manually (a lot of work), or you can try to do it using the parallel computing tools, where much of the groundwork is already laid down. In ...


16

Apparently, Throw is deactivated during kernel initialization. The following function can determine if Throw is inoperative: throwInoperativeQ[] := CheckAll[Catch[Throw[False]], # /. Null -> True &] The undocumented function CheckAll is used here because Check also appears to be unreliable when Throw is inoperative. If we make the assumption that ...


15

There is a setting in Mathematica that controls whether it can access the internet. Go to Preferences -> Internet Connectivity and uncheck "Allow the Wolfram System to access the Internet". Disabling this will disable some features that depend on internet access, such as Wolfram|Alpha queries. This setting can also be controlled by the $AllowInternet ...


14

You can download the Remote Development Kit here (scroll down a bit). It's a CDF file that shows this when opened: Click "INSTALL" to finish the installation. Now go to Palettes -> Remote Development Control Panel. Click Configure Pi Connection and enter the IP address of your Pi, as well as the default username. Click New Pi Notebook, enter an ...


14

After some spelunking, I found a file which contains a lot of initialization code, including reading the kernel init.m file, loading Autoload packages, loading anything set with the -initfile option, starting the paclet manager (which may autoload packages), and many other things. It is SystemFiles/Kernel/SystemResources/$SystemID/sysinit.m Towards the ...


13

Version: Mathematica Version 9.0.1.0, Microsoft Windows 64-bit OS: Windows 7 My mathematica crashed the same way. But only when it was not connected to the internet. I changed my default printer , and it fixed the problem. Follow these steps: Start menu>>Devices and printers There will be one/many printers listed there. The one with a green check mark on ...


13

Assuming FrontEnd survives, prepare 3 cells: (*init cell, won't be needed later*) state = CurrentValue[EvaluationNotebook[], {"TaggingRules", "state"}] = 0; SetOptions[ #, {CellTags -> {"Procedure"}, ShowCellTags -> True} ]& /@ {NextCell[], NextCell @ NextCell[]}; CurrentValue[$FrontEndSession, "...


13

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 example (as well as others) now works correctly: placing the URLFetch call in init.m does result in an output like <!doctype html> <html lang="en" ...


13

In order for a package in Autoload to load, it must have the file Kernel/init.m. Thus, Autoload/MyPack.m will not load. Autoload/MyPack/MyPack.m will also not load. Instead, we need to have the following structure: A package file at Autoload/MyPack/Mypack.m and an initialization file for the package at Autoload/MyPack/Kernel/init.m, containing the usual ...


9

On Windows you can run your cycles in a batch file like this: @echo off setlocal PATH = C:\Program Files\Wolfram Research\Mathematica\7.0\;%PATH% echo Launching MathKernel %TIME% break > "C:\Temp\Incomplete" start MathKernel -noprompt -initfile "C:\Temp\Cycle1.m" :Label1 ping localhost -n 5 > nul if exist "C:\Temp\Incomplete" goto Label1 ping ...


9

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 cores used with this setting: (* e.g. two cores *) SetSystemOptions[ "ParallelOptions" -> {"MKLThreadNumber" -> 2, "ParallelThreadNumber" -> 2}] Have ...


8

The Autoload mechanism can be used for this. Place the package in $UserBaseDirectory/Autoload or $BaseDirectory/Autoload. However, the package must follow the standard structure, and must have a Kernel/init.m file, otherwise it won't get loaded. Also keep in mind that auto-loading of packages happens only after $UserBaseDirectory/Kernel/init.m was loaded (...


8

PREVENTION This is a Community Wiki answer that has not reached maturity yet. 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 of lingering definitions that may later obscures the behavior of Mathematica. Mathematica advises : When you write a ...


7

Some services provided by Mathematica require Mathematica to access our servers through the internet. The privacy policy on this topic can be found here: http://www.wolfram.com/legal/privacy/wolfram-mathematica.html


7

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.


7

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 Front End. First, we will explore how you can access more kernels from your current session, allowing simultaneous evaluation in separate notebooks: In a ...


7

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 main notebook, and close the extra kernel. Here is a function which automates this process (based on freshKernelEvaluate from this answer by @jkuczm) ClearAll[...


7

Another way from the menu (if accessible): Edit $ \rightarrow $ Preferences $ \rightarrow $ Parallel $ \rightarrow $ Local Kernels $ \rightarrow $ (Number of local kernels to use) Manual setting


6

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 and create a new one, let's say "Kuba". It will stay on the list for future too. Now you just need to evaluate in your notebook: SetOptions[EvaluationNotebook[], Evaluator -> "Kuba"] and ...


6

It is possible to connect to the RPi through a PC running v9 using the remote kernel options From "Kernel Configuration Options..." Add a new kernel Choose the Advanced options and ensure that Arguments to MLOpen has the following -LinkMode Listen -LinkProtocol TCPIP -LinkOptions MLDontInteract and the Shell command to launch kernel is "`java`" -jar "...


6

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 switching to a non-recursive approach in certain cases. I am not aware of a workaround applicable to older versions, but it doesn't crash with 10.1 and 10.2: ...


6

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/Catch. For this reason, it is generally not a good idea to load packages on startup. See my questions about this here: Detecting kernel initialization These came up while I was trying to make my own packages "...


6

You can launch as many or as few kernels as you like, see LaunchKernels and CloseKernels. Parallel functions will use as many as are currently running. E.g., LaunchKernels[3] would launch 3 additional kernels. Before you run any parallel commands, simply launch precisely as many as you need. Then automatic launching won't be triggered anymore. If you already ...


6

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. Just turn off this automatic update. The easiest way to close the update is to delete the "PacletSiteData_10.pmd2" file.


5

I just had the same problem - I copy and pasted the line from your link but it produced the error. The reason is that you need to exchange the quotation marks to the usual vertical ones. Hopefully this will solve the problem and Thank you for directing me to the solution! To remove this issue, open as root the file: "/usr/local/Wolfram/Mathematica/7.0/...


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