6
$\begingroup$

Since I found that when I using notebook interface, I need to assign different kernels to different notebooks (if I want to run them at the same time), I wonder if I run those *.m files from terminal by calling MathKernel -script XXX.m, are they using the same kernel or different ones?

Thanks.

$\endgroup$
  • 2
    $\begingroup$ Different instances of the same kernel. $\endgroup$ – ilian Jul 21 '15 at 14:58
  • $\begingroup$ @ilian Thanks, so they are not actually in the same one, right? If I just run several XXX.m files, they will not interfere each other right? $\endgroup$ – LifeWorks Jul 21 '15 at 15:01
  • 2
    $\begingroup$ They will be different processes, variables or definitions won't be shared between them. They will not interfere with each other. $\endgroup$ – Szabolcs Jul 21 '15 at 15:01
  • $\begingroup$ @Szabolcs Thanks, now it's clear to me. $\endgroup$ – LifeWorks Jul 21 '15 at 15:01
1
$\begingroup$

To summarize the comments by me and Szabolcs into an answer, these will be running in different instances (separate processes) of the same kernel executable.

There is a related note in the documentation of the WolframScript interpreter,

Each of the Wolfram Language scripts running concurrently starts its own kernel, with no shared variables or definitions. The number of the Wolfram Language scripts running in parallel may be subject to licensing limitation.

and the same applies when using the -script command line option of WolframKernel/MathKernel.

$\endgroup$

Your Answer

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

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