I am using Mathematica 11.1. This morning I started some calculations in the hope that when I come back from work, they will be finished and I can get on with the rest of my project. Indeed, when I got home the computations were finished, and I could see the results.

However, as soon as I attempted to use those results, stored within a variable, my variable got "un-set", i.e., it turned blue and querying its value just returned an undefined new variable.

This happened many times before when the difference between one computation and the next was several hours.

Is there anything I can do to prevent this behaviour? For obvious reasons, it is very annoying.

  • 4
    $\begingroup$ This means your kernel crashed. What caused it to crash? We cannot say without a reproducible example. If the reproducible example takes all day to run it will be hard to diagnose. $\endgroup$ – ktm Dec 17 '18 at 19:42
  • $\begingroup$ Thank you for your comment. Indeed, I was performing a computation requiring a lot of CPU power and memory. How do I know it crashed? There is no error report, nothing at all, just a reset of all my variables... $\endgroup$ – Klangen Dec 17 '18 at 20:05
  • 2
    $\begingroup$ Hard to say how to avoid this. Of course, efficient programming can help a lot. Moreover, it may be a good strategy to write intermediate results to disk. For example with Export or DumpSave. $\endgroup$ – Henrik Schumacher Dec 17 '18 at 20:12
  • 2
    $\begingroup$ One possibility (among many) is that you are running out of memory. If this is the problem you can set the $HistoryLength variable to something reasonable (the default of Infinity sometimes seems less than reasonable). $\endgroup$ – bill s Dec 17 '18 at 20:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.