I have a simple requirement to run evaluations in two notebooks simultaneously. My 11.3 Home Edition, with two notebooks open, and nothing (that I know of, unless it's the ff statement) being evaluated, shows this:

Print@ToString@StringForm["LPs=`1`/`3`,LSPs=`2`/`4`", $LicenseProcesses, \
$LicenseSubprocesses, $MaxLicenseProcesses, $MaxLicenseSubprocesses]


I've seen a lot of complicated questions and answers involving kernels, processes, and subprocesses, but let me reiterate that what I want to do is very simply put: run two possibly long-running evaluations in two separate notebooks. No parallelism, nothing fancy.

How can I do this?

  • $\begingroup$ why not create a second local kernel for the second notebook? evaluation->start kernel->new kernel etc... when you run 2 evaluation on same kernel, they get queued. $\endgroup$
    – Nasser
    Commented Apr 18, 2018 at 5:37
  • $\begingroup$ Thanks Nasser, but being a newbie, I'm wondering if you could flesh out that answer a bit -- I could spend quite a bit of time puzzling out what your pseudo-code works out to be in mma-land. $\endgroup$ Commented Apr 18, 2018 at 5:48
  • 1
    $\begingroup$ On my machine (Windows 7, 64 bits), I can perfectly well launch Mathematica 2 times and I have two totally independant sessions. $\endgroup$
    – andre314
    Commented Apr 18, 2018 at 6:42
  • $\begingroup$ Odd, I've always needed to do as @Nasser describes. I recall there is an option someplace to make each notebook default to a new kernel but I cant seem to find it. $\endgroup$
    – george2079
    Commented Apr 18, 2018 at 17:43

2 Answers 2

  1. Start mathematica.
  2. start new notebook. This is now running under Local kernel. Do Evaluation->start kernel->new kernel
  3. start second notebook. Do Evaluation->Default kernel->New Now the second notebook is running on the new kernel. Different from the first notebook's kernel.
  4. Now you can run one command on first notebook and the second command from the second notebook at same time, and each command will go to different kernel. So they will not be queued to same kernel. So the two commands will run at same time.

Mathematica graphics

If you want to do all the in code, I am sure it can be done, but I do not know how. I do these things manually like the above. For student version, there seem to be a limit of 2 kernels only. I do not know about home edition. May be the same. type $MaxLicenseProcesses to find out.

see also new-kernel-for-notebook and How do I run Wolfram Language evaluations side by side?

  • 1
    $\begingroup$ OK, so these are menu commands? When I look at these, I have two choices-- Local and LinkSnooper (?). I don't see an option for invoking/creating a "new kernel". $\endgroup$ Commented Apr 18, 2018 at 6:22
  • $\begingroup$ @M.Robinson Yes, they are menu commands. I added screen shot. I do not know why you do not see the "New Kernel". I have student version, not home edition. Is it possible home edition does not support this? I do not know. $\endgroup$
    – Nasser
    Commented Apr 18, 2018 at 6:26

The real source of the problem was that a kernel named "LinkSnooper" was running. I did not create this, and I don't know what did. Anyway, REMOVING THE LinkSnooper KERNEL allowed me to do what I want.

These are the steps I took:

1) Removed the LinkSnooper kernel with Evaluation->Kernel Configuration dialog.

2) Created a new kernel named 'Alternate' using the same dialog.

3) Selected Evaluation->Notebook's Kernel->Alternate

4) Opened another notebook, which defaults to the pre-existing 'Local' kernel.

and bingo, I'm in business.

Thanks to Nasser for putting me on the right track.


Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.