I've recently started running long calculations in one Mathematica kernel while I continue to work in another kernel. I thought this was safe, but yesterday I was running THIS CODE in which a ListPlot is dynamically updated as new points are calculated and added to an array I (foolishly) named a.

Dynamic[ListPlot[a, DataRange -> {-delta, delta}], TrackedSymbols :> {a}]

Then I (foolishly) created a variable a in my OTHER kernel, and down the tubes everything went. The ListPlot displayed in my first kernel vanished, along with all the points I'd painstakingly calculated and stored in a.

It hadn't occurred to me that I couldn't have same-named variables in different kernels, but now I know better. Is this only a problem when there's a dynamic object in one kernel? Are there other pitfalls we should be aware of?

  • 2
    $\begingroup$ I don't get same issue. check this if it helps: support.wolfram.com/kb/12425 $\endgroup$ Feb 26, 2016 at 1:27
  • $\begingroup$ Use different contexts as well as different kernels in the two instances of Mathematica to reduce the chance of cross-talk. $\endgroup$
    – bbgodfrey
    Feb 27, 2016 at 5:25


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.