Message Boards Message Boards

How to Launch sub kernels from cloud products?

Posted 9 years ago

Dear all, I faced the trouble that I could not launch the subkernels. Wolfram Desktop recognized multicore, but could not launch subkernels. Please suggest me the solution of this problem. Best regard.

KOBUNA Yukihiroenter image description here

POSTED BY: Yukihiro KOBUNA

You can try the following raw WSTP/MathLink command:

knl = LinkLaunch[ "C:\\Program Files\\Wolfram Research\\Mathematica\\9.0\\MathKernel" <> " -noprompt -subkernel -noinit -mathlink -noicon "];
safeRead[] := If[LinkReadyQ[knl], LinkRead[knl]]
LinkWrite[knl, 3]
safeRead[]

If you have everything right, you shall have a result like

ReturnPacket[3]

Using the windows resource monitor, you can verify the new kernel by looking at the process ID/PID

LinkWrite[knl, Unevaluated[$ProcessID]] (*evaluated directly with a sub-kernel*)
safeRead[]

and

$ProcessID (*evaluated directly with default kernel*)

Result:

enter image description here

Try the code above and lets see what do you have.

One thing you may have to modify is the exact location of the installation of the Wolfram Desktop product. In my case I do have the version 9 installed in

 C:\\Program Files\\Wolfram Research\\Mathematica\\9.0\\MathKernel

That is why it appears in my code. You will have to check the installation location by yourself.

POSTED BY: Shenghui Yang
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract