Message Boards Message Boards


Use WSTPServer as a kernel of notebook front end in 12.2?

Posted 1 month ago
0 Replies
0 Total Likes

In the blog, I find the following idea.

It’s now possible to use WSTPServer to set up a centralized kernel pool to which you can connect the notebook front end, allowing you, for example, to keep running a particular session (or even a particular computation) in the kernel even as you switch to a different notebook front end, on a different computer.

In front end I can use the traditional method add a kernel to work by set MLOpen to "-LinkMode Listen ....".

The following codes also work. But I do not know how to set the WSTPServerKernels as default to run sequential codes. I want to use WSTPServerKernels as a kernel of the front end.

 LaunchKernels["wstp://", 2]
 Parallelize@Table[$MachineName, {i, 1, 10}]

The output is OK.

I have tried set MLOpen to "-linkmode connect -linkname 31415@ -linkprotocol TCPIP -linkoptions 4" and shell command as " ssh xix@ "wolfram" -wstp -LinkMode Connect -LinkProtocol TCPIP -LinkName "linkname" -LinkHost" .

I run "./wstpserver -l 3 -i" in the side of wstpserver.

In front end, I run the code "1+1"。 The output of wstpserver as following and the title of front end is always says "(Running...)"

WSTPServer: Logger (2, 2021-01-17 19:59:36): Debug: 
    An expression on the kernel link:
       * with an ID of "845a-9b23-0aac", 
       * and bridged with the connection with an ID of "2abd-5fd2-6122"
    - is ready

WSTPServer: Logger (2, 2021-01-17 19:59:36): WSTP: 
         ReturnPacket [
                 EnterExpressionPacket [
                        HoldComplete [
                              Plus [1 , 1 ]]]]

WSTPServer: Logger (2, 2021-01-17 19:59:36): Debug: 
    An expression was transferred from a kernel to a connection

The output of wstpserver is so ugly.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract