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
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
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
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
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
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
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
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
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
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
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
16 votes
2 answers
396 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
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
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
9 votes
2 answers
1k views

Keep MathKernel Running In Background - Speed Up Execution Time

Background: I'm running Debian on a remote server with Mathematica installed. I have several dozen small mathematica files that are run in cron jobs at unpredictable intervals and updated based on a ...
William's user avatar
  • 7,575
7 votes
1 answer
249 views

How does the Kernel know the $Context in a localized notebook

SetOptions[EvaluationNotebook[], CellContext -> Notebook] $Context "Notebook$$70$398424`" And from different ...
Kuba's user avatar
  • 136k
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
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
16 votes
2 answers
723 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
14 votes
1 answer
291 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
7 votes
3 answers
641 views

Can one launch a Player Pro kernel independently of the front end

This question follows on from my earlier one, Seeking strategies to deploy a function securely without a front end. As it pursues a different track to solve the same problem it seemed distinct enough ...
Jagra's user avatar
  • 14.3k
7 votes
1 answer
1k views

Remote Kernel configuration works in v9 but not in v10

I have both v9 and v10 currently installed on my computer (Windows 7). For reasons that are not entirely clear, if I create a new remote kernel in one version, it is accessible to the other; however, ...
bobthechemist's user avatar
7 votes
1 answer
376 views

CompilationTarget->"C" crashes the kernel

Major deviation from my original post I realize that the long code I originally had was very discouraging to debug and did not attract any answers. So I have decided to revamp this question ...
brama's user avatar
  • 888
5 votes
1 answer
1k views

How to connect the front end of one raspberry pi with the kernel of another

I followed the instructions in this howto from wolfram, but I keep getting the error: ...
yippy_yay's user avatar
  • 243
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
37 votes
3 answers
792 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
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
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
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,432
15 votes
4 answers
573 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
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
11 votes
2 answers
475 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
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
9 votes
1 answer
380 views

Launch Front End from .NET MathKernel and return result to .NET

Is it possible to launch a front end and open a notebook from a .NETLink kernel and return a result from the notebook to .NET? In the code below "x" appears in the .NET textbox after 10 seconds but ...
Chris Degnen's user avatar
  • 30.8k
8 votes
3 answers
733 views

Keep kernel running for execution of scheduled task

How can I keep a kernel running until all scheduled tasks have completed? For example upon running the following script bazinga.m: ...
sakra's user avatar
  • 5,100
7 votes
1 answer
3k views

Improving NDSolve speed for heavily stiff problems

Having looked around the intergoogles and Mathematica.SE, I thought I'd pose a question with a minimum working example. Here is the situation I am trying to improve: I am solving a 4th order non ...
dearN's user avatar
  • 5,321
6 votes
1 answer
935 views

Mathematica versions 10 and 11 fonts are broken on Linux

Any clues on how to fix the fonts? It seems the font kerning is wrong. It happens both in graphics and in all sorts of text styles... This happens with Mathematica system fonts but also with certain ...
Ramiro Magno's user avatar
5 votes
1 answer
332 views

Mma11 on Windows: Forgetful kernel?

I am seeing the following issue on Windows 7 x64, with the new Mma 11: I define the simple function below, and evaluate it. The first time is fine, but after that the kernel seems to have forgotten ...
Pirx's user avatar
  • 4,129
4 votes
1 answer
240 views

ListVectorPlot crashes kernel after two evaluations

I am currently trying to produce many plots by using ListVectorPlot, but every time I re-evaluate my code, the kernel crashes. I have set $HistoryLength=0 and ...
Phys Mate's user avatar
2 votes
0 answers
359 views

Kernel crash after repeated use of NDSolve

I am trying to solve the Einstein-Klein-Gordon system (equations below) for different piecewise potentials but the kernel keeps crashing after repeated use of NDSolve. Apparently, everything works ...
Golan's user avatar
  • 21
2 votes
1 answer
545 views

Render dynamic Graphics objects static

As was discussed in the comments of another question (MathLink Graphical Output (Plots) to File), Graphcis objects produced by commands such as ...
highsciguy's user avatar
  • 1,660
1 vote
2 answers
287 views

Strange evaluation of an sum involving binomial coefficients

I stumbled upon this problem while playing with Mathematica 10. Can anyone help me explain the following behaviour? I define a sum ...
Cai Thinh's user avatar
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
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
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
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
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
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
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
3 answers
937 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