Skip to main content
40 votes
Accepted

Why doesn't Mathematica abort evaluation when I tell it to?

There are two processes running. The first process is the FrontEnd. The FrontEnd receives your keypresses and renders text and plots. The second process is the Kernel. The Kernel receives commands ...
Eric Towers's user avatar
  • 3,070
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
  • 236k
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
  • 69.2k
16 votes
Accepted

High Fibonacci numbers

The kernel crashes due to stack overflow. It is not safe to recurse too deeply. Increasing $RecursionLimit to values that are too great (and actually recursing ...
Szabolcs's user avatar
  • 236k
14 votes

Saving data inside a notebook so that I don't have to run it again?

In Mathematica 11.3 or later, use Iconize. It creates a short display form of a large expression that can be copied to elsewhere within the notebook, can be saved ...
Szabolcs's user avatar
  • 236k
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
  • 236k
14 votes
Accepted

VideoPlay crashes the Kernel with Mathematica 12.1

This bug has been fixed by a paclet update. This would be applied automatically whenever the functionality is used in a new kernel (as long as the paclet manager has updated its local site index, ...
ilian's user avatar
  • 25.5k
13 votes
Accepted

Why does args symbol exist in a fresh kernel?

It's a type of otherwise harmless bug that tends to come and go with versions. I would suggest to report it to Wolfram, but also not to worry about it. Notice that the symbols have no associated ...
Szabolcs's user avatar
  • 236k
13 votes
Accepted

Using Terminal` (ASCII plots) in Wolfram 12

Here's an approach to fix the code behind Terminal` - Execute the following code to restore the functionality of the package: ...
Lukas Lang's user avatar
  • 34.4k
12 votes

Saving data inside a notebook so that I don't have to run it again?

Update: I maintain the latest version of this function on my blog. SaveToCell is a convenience-minded implementation of Vitaliy's idea. The code is at the end. ...
Szabolcs's user avatar
  • 236k
11 votes

The most simple Manipulate freezes the notebook on v10.1

I had this problem and the solution was to turn off the Suggestions Bar in the preferences.
DamienWontContributeToAITheft's user avatar
11 votes
Accepted

What is the cheapest method to get cloud computing, remote kernels, HPC access, connection to clusters or GPUs?

The remote batch job submission functionality in version 12.2 of Mathematica makes it easy to run batch jobs on cloud services like AWS Batch. See this example illustrating a trivial job using multi-...
Jesse Friedman's user avatar
10 votes
Accepted

Any ergonomic tools for the command line kernel?

As I said in my comments, it is hard to implement this correctly if you aim for some advanced Dynamic features that work in the command line. However, you can ...
halirutan's user avatar
  • 113k
10 votes

Complete list of documented symbols that require a front-end?

I cannot give you an exhaustive list of symbols, and I think it is even debatable what it means that "a symbol requires the FE". But I think I can try to help with this: I think it is important to ...
Szabolcs's user avatar
  • 236k
10 votes

Using Terminal` (ASCII plots) in Wolfram 12

Note After looking through the referenced python code, it stands to reason that all of the tools are available from within Mathematica. I have yet to fully debug this sub-answer. You can take ...
bobthechemist's user avatar
9 votes

Global context seems to be shared between kernels when using Clear?

If you look at the definition of NotebookEvaluate, by means of Needs["GeneralUtilities`"]; GeneralUtilities`PrintDefinitions[NotebookEvaluate] you see that the ...
Rolf Mertig's user avatar
  • 17.3k
9 votes

Restarting Mathematica automatically

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

Clean package update for API/FormFunctions on Wolfram Cloud

Edit: For more on this Context trick see this: Importing an mx file into a context And just as full disclosure here's a note on it circumventing ...
b3m2a1's user avatar
  • 47k
9 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
9 votes
Accepted

How to clear up RAM without exiting kernel?

(This is a follow-up to the excellent answer by Nate.) You can tell Mathematica do not keep the output history: $HistoryLength = 0; This works for the current ...
Alexey Popkov's user avatar
8 votes

Why doesn't Mathematica abort evaluation when I tell it to?

The situation has already been explained by Eric Towers in more detail and clarity than I would have been capable of, but as far as a solution goes I think I have a slightly better one: How do I ...
Mr.Wizard's user avatar
  • 273k
8 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
  • 236k
7 votes

Saving data inside a notebook so that I don't have to run it again?

In Mathematica 11.2 or later can use PersistentValue to persist a value stored. It is very convenient to use, and it can be directly assigned. The data exists in the form of Hold, not in compressed ...
Aster's user avatar
  • 3,856
7 votes

Why doesn't Mathematica abort evaluation when I tell it to?

If you ever develop a library for LibraryLink, be sure to include calls to AbortQ to support aborting lengthy computations. Code that runs for a long time should ...
masterxilo's user avatar
  • 5,739
7 votes

Import JPEG Fails

The bug is in reading Exif metadata. A workaround is to use IncludeMetaInformation -> None option: ...
Piotr Wendykier's user avatar
7 votes

Simple desire to run two evaluations in two notebooks simultaneously

Start mathematica. start new notebook. This is now running under Local kernel. Do Evaluation->start kernel->new kernel ...
Nasser's user avatar
  • 149k
7 votes
Accepted

Why are stored variables with symbols featuring subscripts in blue after evaluation?

The reason is that Subscript does not work as you expect (a very good reason not to use it): For example Subscript[a,1] = 2 ...
Henrik Schumacher's user avatar
7 votes
Accepted

Strange behavior of Out[]

I am guessing that this has to do with the following note in the NotebookEvaluate documentation: The cells of the notebook are evaluated in a dialog subsession. ...
Szabolcs's user avatar
  • 236k
7 votes

How to clear up RAM without exiting kernel?

Unfortunately, Mathematica retains all output by default until the Kernel is quit. You can clear the output by Unprotecting Out ...
Nate's user avatar
  • 725
7 votes

Error message not reproduced at reevaluation, SetDelayed cache?

We can cause the message to appear every time by calling Update[] in the body of the definition: ...
WReach's user avatar
  • 69.2k

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