Questions tagged [kernel]

The Kernel is the back-end application thread that does the actual evaluation of all non-graphical expressions. It can be accessed directly through the console but is more commonly working behind the scenes to power the Notebook Interface. Multiple Kernels may be run for parallel computation.

Filter by
Sorted by
Tagged with
66 votes
7 answers
18k views

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

Piggybacking on this, I am somehow not fully convinced that I can't save data generated by a calculation in a mathematica file so that when I re-launch said file, I wouldn't have to run my ...
dearN's user avatar
  • 5,321
52 votes
5 answers
6k views

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

This frequently happens to me. I'll have some code, execute it, and realize it's taking a long time. My PC isn't frozen, and Mathematica itself isn't even frozen: I can select stuff in the notebook, ...
YungHummmma's user avatar
  • 3,002
43 votes
5 answers
4k views

Aborting evaluation when the memory exceeds a certain limit

Sometimes when generating a lot of data the memory usage shoots beyond its physical realm and my laptop freezes. There is no way to stop Mathematica when this happens. Task manager (or its equivalent ...
Lou's user avatar
  • 3,812
38 votes
2 answers
3k views

What information is sent to Wolfram Research when loading or working with Mathematica?

Recently I am told that information unknown to the user is sent to Wolfram Servers. Is there any truth behind it ? I was told that more than just an IP address of the user is sent to them and that ...
nathan's user avatar
  • 341
37 votes
3 answers
790 views

How can I evaluate untrusted Mathematica code in a sandbox?

Is there any way to build a sandbox to evaluate untrusted Mathematica expressions in order to prevent them from having (malicious or accidental) harmful side effects? Context: I'm developing a system ...
ibeatty's user avatar
  • 2,533
31 votes
1 answer
940 views

Is the renaming mechanism of `With` flawed?

I'm confused about the renaming mechanism of With: ...
luyuwuli's user avatar
  • 2,784
31 votes
1 answer
1k views

Why are there two separate MathKernel processes running when I start up Mathematica 9?

When I start the Mathematica 9 Front End, and check the list of running processes, I see two separate MathKernel processes. If I only start the kernel, without a front end, then there's only one ...
Szabolcs's user avatar
  • 233k
25 votes
4 answers
8k views

When running Mathematica from a Linux terminal, how can I prevent a script from terminating upon logout?

I am running Mathematica on a remote Linux cluster, by the terminal, using the math command. (I do not have access to a terminal GUI. For example, when I type the ...
Andrew's user avatar
  • 10.4k
24 votes
2 answers
1k views

Kernel crash after idle in version 10.0

Bug introduced in 10.0.0 and fixed in 10.0.2 In version 10.0, when I leave the Mathematica section idle for some time (of order an hour), the kernel quit automatically. The syntax highlighting is ...
Yi Wang's user avatar
  • 7,317
23 votes
3 answers
4k views

Unsaved notebook is crashing: is there any way I can save the state of the MathKernel before I kill it?

So I'm in the middle of generating some plots and all of the sudden the frontend goes dead and I haven't saved my work. I'm using Mathematica 8 in MacOS X. The MathKernel process is still running and ...
Saran Tunyasuvunakool's user avatar
22 votes
2 answers
635 views

MathKernel doesn't return all Messages

In Mathematica I run this command: Plot[Sin[x], {x, 1, 15}, GridLines -> error] It generates a Plot with this error message: A GridLines specification ...
WolframFan's user avatar
  • 1,412
22 votes
2 answers
1k views

Restarting Mathematica automatically

I run a large computation in a loop. At each cycle of the loop I produce large arrays that I save on a disk. At each cycle I would like to Quit Mathematica and ...
Vadim's user avatar
  • 221
22 votes
1 answer
777 views

How to clean up temporary files when the kernel exits?

There are Mathematica packages that must create temporary files to function. If we are implementing such a package ourselves, how can we ensure that the temporary files will get cleaned up when the ...
Szabolcs's user avatar
  • 233k
22 votes
2 answers
911 views

How to connect to EC2?

I have Mathematica 10.2 installed on an Ubuntu 14 machine in Amazon web services's elastic computer cloud. I have dido access and I'm connected to the instance though ssh on the terminal. I have an ...
M.R.'s user avatar
  • 31.2k
21 votes
1 answer
2k views

Kernel Management

I would like to run a computation in one NoteBook that will take 2 hours. Could I assign this Notebook a specific Kernel so I can run computation in other Notebooks ?
500's user avatar
  • 5,529
21 votes
1 answer
2k views

Quit the Kernel and start new session automatically

The question is how to quit the kernel, start a new session automatically, and to be able to run such procedure from e.g. Button. This is especially useful when ...
Kuba's user avatar
  • 136k
20 votes
2 answers
2k views

How to restart computation when kernels die?

When an important process needs to be kept alive, there are monitoring tools to restart them if they die (e.g. god tasks in ruby), in my case I have an overnight scraping task that I need to have done ...
M.R.'s user avatar
  • 31.2k
20 votes
0 answers
219 views

Status of all Evaluators?

Since I have 4 cores on my machine I typically have 4 notebooks open each with their own kernel evaluator. I'd like to construct a dynamic pane similar to the parallel kernels status window: But that ...
M.R.'s user avatar
  • 31.2k
18 votes
3 answers
5k views

The most simple Manipulate freezes the notebook on v10.1

I realize this won't be a particularly clear question. As I'm not able myself to find a pattern for the problem I'm talking about I won't be able to give enough informations to make it fully ...
glS's user avatar
  • 7,543
17 votes
2 answers
518 views

How can I access a variable in one evaluator from another evaluator?

I have two notebooks, each with a different kernel. Is there a way to grab the value of a variable in KernelA from KernelB?
M.R.'s user avatar
  • 31.2k
17 votes
0 answers
4k views

Threads vs Cores: How many kernels need to launch in parallel Mathematica?

I have a dual-core intel machine. I would like to test how many parallel local kernels should be launch to get the optimized performance. Knowing that the HyperThreading technology of Intel could run ...
Nam Nguyen's user avatar
  • 1,751
16 votes
2 answers
722 views

Detecting kernel initialization

Certain operations do not work during kernel initialization. Code from Kernel/init.m, the Autoload directory, or packages set ...
Szabolcs's user avatar
  • 233k
16 votes
1 answer
1k views

Space-efficient null space of sparse array

I have a roughly 100,000 × 3,000 matrix (as a SparseArray) that I'd like to find the kernel (null space) of. It has about 500,000 nonzero entries, all -1 or 1. ...
Abilinglortly's user avatar
16 votes
2 answers
3k views

Automatically load packages at startup

I'm a physics student and I try to simplify my day with Mathematica. Every time I use Mathematica I need Div[], Grad[], ...
Max Hacki's user avatar
  • 163
16 votes
2 answers
395 views

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

I am trying to understand the following behaviour, and determine if it's a bug in Mathematica 10. I am using Mathematica 10.3, and can't reproduce this behaviour under Mathematica 9. The test outlined ...
JonathanU's user avatar
  • 161
16 votes
1 answer
2k views

Scheduling Mathematica scripts to run from a command line [duplicate]

I want to run Mathematica "jobs" on a daily/weekly basis to do system maintenance and as part of daily processing operations. What is the best way to do this?
George Wolfe's user avatar
  • 5,422
16 votes
1 answer
582 views

How to prevent the kernel from exiting when a LibraryLink function segfaults?

I do realize that this might be controversial, but I believe I have a real need for it this time. If a process tries to access memory at a location it doesn't own, it will by default exit with a "...
Szabolcs's user avatar
  • 233k
15 votes
4 answers
572 views

Obtain input expression from history without evaluating

I typed and evaluated an expression, but deleted it from the notebook. For instance, suppose it was In[1]:= Round@SessionTime[] Out[1]= 2 I now want to retrieve ...
Mechanical snail's user avatar
15 votes
1 answer
273 views

All value types for a symbol?

Robby Villegas here shows a nice way to see all the types associated with a symbol. He sets a symbol, valueTypes, to an explicit list of the values types in ...
Reb.Cabin's user avatar
  • 8,651
14 votes
2 answers
569 views

ScheduledTask with scoped variables. Working with timed evaluation

I guess I have to try harder and focus more but timed evaluation always frustrates me. I will show the issue on simple example of delayed trigger. ...
Kuba's user avatar
  • 136k
14 votes
1 answer
290 views

Clean package update for API/FormFunctions on Wolfram Cloud

Cross posted on community.wolfram.com (new comments) TLDR There is a pool of kernels/sessions available for each user, you don't have control over the pool only over specific kernel you currently ...
Kuba's user avatar
  • 136k
13 votes
3 answers
413 views

Suspecting bug in Parallel Framework

I've reduced my actual problem to: ParallelEvaluate[ Module[{slot=1}, Slot[slot] ] ] gives error messages that I think shouldn't be there. It seems I can ...
Andreas Lauschke's user avatar
13 votes
2 answers
1k views

Difference between Evaluation ► Quit Kernel and Quit[]

What is the difference between Evaluation ► Quit Kernel and Quit[]? Both seem to quit the kernel (and clearing all definitions)...
Sashwat Tanay's user avatar
13 votes
1 answer
411 views

VideoPlay crashes the Kernel with Mathematica 12.1

I'm using Mathematica 12.1 on windows 10 (Microsoft Windows [Version 10.0.16299.1686]) When going to the Help file about VideoPlay I tried the standard example and it crashes the Kernel. For me it'...
Lou's user avatar
  • 3,812
13 votes
3 answers
936 views

Handling Kernel quit

One can use $Epilog to do something when the Kernel is quit or put an end.m file next to the ...
Kuba's user avatar
  • 136k
13 votes
1 answer
259 views

How to write crash-robust code?

When a notebook crashes all the work I was doing is lost - I'd like to ameliorate this situation! Is there a way to decorate a symbol so that it is saved to disk whenever it changes, or after a ...
M.R.'s user avatar
  • 31.2k
12 votes
3 answers
662 views

Seeking strategies to deploy a function securely without a front end

Background I have a fuction, which calculates an analytic solution to a multi-dimentional geometry problem. The function takes a list of real numbers (typically less than a dozen) and outputs a ...
Jagra's user avatar
  • 14.3k
12 votes
2 answers
271 views

Why does args symbol exist in a fresh kernel?

In fresh kernel Mathematica 11.3 (Linux) asking for args (similarly for dims) I obtain ??args Global`args As far as I ...
Acus's user avatar
  • 3,559
12 votes
1 answer
619 views

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

According to: tutorial/WolframSystemSessions Initialization On startup, the Wolfram Language kernel does the following: Performs license management operations. Runs Wolfram Language ...
Kuba's user avatar
  • 136k
12 votes
1 answer
542 views

Importing parts of Packages

Some programming languages offer the possibility of importing a single function from a library, as in from x import y I'm looking to import only one function (<...
CHM's user avatar
  • 3,385
12 votes
2 answers
1k views

Creating and editing new stylesheets

I'm trying to create a stylesheet, but the process has become painful. I'm sure that this has to do something with resetting something in Mathematica everytime I make changes to the stylesheet. To ...
jmlopez's user avatar
  • 6,450
11 votes
2 answers
869 views

Using Terminal` (ASCII plots) in Wolfram 12

I was interested in exploiting the Terminal` package, as demonstrated in this post, to show some ASCII plots straight through the terminal of my Raspberry Pi Model 3 B+. However, it doesn't seem that ...
aghostinthefigures's user avatar
11 votes
2 answers
267 views

Any ergonomic tools for the command line kernel?

Mathematica on the command-line (invoked by running 'wolfram' on bash shell) seems bereft of all modern usability features. I'd like a list of the best third-party packages available (if any exist) ...
M.R.'s user avatar
  • 31.2k
11 votes
3 answers
2k views

Generating figures over remote connection (using terminal)

Recently I've been making movies by having Mathematica create figures and then I combine all of them together using ffmpeg. The problem now is that my macbook is ...
jmlopez's user avatar
  • 6,450
11 votes
2 answers
471 views

Why LibraryLink function crashes at a second time?

Bug introduced in 9.0 or earlier and fixed in 10.3 Update As Todd Gayley commented under halirutan's answer, this is a bug. I'm trying link one of Lapack's function to Mathematica through ...
xslittlegrass's user avatar
11 votes
1 answer
565 views

Kernel crashes when plotting $z=\sqrt{(x^2 + y^2)}^0$

Bug introduced in 7.0.1 or earlier and fixed in 10.0.1 I'm plotting a 3D function, which makes Mathematica V9 (running on Windows 7) crash all the time. Does this only happen for me or for somebody ...
Mario Krenn's user avatar
  • 2,142
11 votes
2 answers
474 views

Return partial result when MemoryConstrained aborts NDSolve

I use NDSolve to solve a large set (~400) of coupled ODEs. Sometimes, the memory (~4GB) gets filled up, and my computer becomes impossible to work with, because it ...
yohbs's user avatar
  • 7,046
11 votes
2 answers
951 views

Evaluator option for Mathematica Scripts

I have mathematica with many additional kernels besides Local ( e.g., core1, core2, core3, core4 ... ) added through Kernel Configuration Options. I have been running multiple copies of a simulation (...
Hsn's user avatar
  • 413
10 votes
1 answer
14k views

Is there a system Reset? [duplicate]

Possible Duplicate: How do I clear all user defined symbols? The normal way I reset the Mathematica kernel to its initial state is through the notebook interface: ...
Reb.Cabin's user avatar
  • 8,651
10 votes
1 answer
2k views

How to stop the Kernel from running wild?

How to abort or stop this (accidently large defined) SparseArray production? s = N[SparseArray[Table[{2^i, 4} -> i, {i, 30}]]] Alt+. or Alt+, seem to give ...
Hp Radojewski Schäfer Von's user avatar

1
2 3 4 5
7