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 ...
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 ...
16
votes
Accepted
Detecting kernel initialization
Apparently, Throw is deactivated during kernel initialization. The following function can determine if Throw is inoperative:
<...
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 ...
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 ...
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 ...
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, ...
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 ...
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:
...
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.
...
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.
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-...
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 ...
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 ...
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 ...
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 ...
9
votes
Restarting Mathematica automatically
On Windows you can run your cycles in a batch file like this:
...
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 ...
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
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 ...
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 ...
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 ...
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 ...
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 ...
7
votes
Import JPEG Fails
The bug is in reading Exif metadata. A workaround is to use IncludeMetaInformation -> None option:
...
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
...
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 ...
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.
...
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 ...
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:
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
kernel × 359parallelization × 59
kernel-startup × 46
front-end × 43
crash × 36
evaluation × 34
remote-access × 30
notebooks × 24
bugs × 21
memory × 17
scripting × 14
packages × 12
mathlink-or-wstp × 11
system × 11
plotting × 10
performance-tuning × 10
linux × 10
warning-messages × 9
command-line × 9
functions × 8
windows × 8
export × 7
dynamic × 7
differential-equations × 6
programming × 6