Group Abstract Group Abstract

Message Boards Message Boards

1
|
1.5K Views
|
2 Replies
|
4 Total Likes
View groups...
Share
Share this post:

What is the best way to combine ExternalEvaluate with RemoteRunProcess?

Posted 7 months ago
POSTED BY: Mma Usr
2 Replies
Posted 7 months ago
POSTED BY: Mma Usr

I would try it like this:

remote = LaunchKernels["ssh://arnoudb@192.168.1.236/usr/local/bin/wolfram"]
ParallelEvaluate[$ProcessID, remote]
ParallelEvaluate[$MachineName, remote]
ParallelEvaluate[session = StartExternalSession["Python"], remote]
ParallelEvaluate[ExternalEvaluate[session, "
import socket
socket.gethostname()
"], remote]

Note that RemoteEvaluate launches and quits the kernel every time (it's a one-shot kernel evaluation) so that's probably not what you want if you want to execute multiple commands

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