I was wondering if it is somehow possible to start a parallel calculation (where each part that is run in parallel takes about an hour) on remote subkernels, then disconnect the Internet connection, and still get the results from the remote subkernels after reconnecting?

The usual behaviour that I witnessed was that Mathematica just notices that the remote subkernels are gone and requeues their calculations to local subkernels.

I guess the remote subkernels would have to be started with nohup or something like that, and I have to find a way to tell Mathematica to wait for longer before requeueing, but I have no idea how to do that or if it is even possible.

After some more searching I found the following relevant questions, so I link them here for anyone who wants to solve a similar problem:

Is there a way to detach/reattach the Frontend from a running Mathematica Kernel?

Reconnecting to remote kernels through SSH tunnelling

How can I connect to a remote machine? (the title sounds very generic, but the answer is kind of what I want... if it still works in Mathematica 11)


1 Answer 1


I do not believe this to be possible.

I suggest you do not use remote subkernels if your network connection is not stable. Instead, run everything remotely, including the master kernel. It would be best to run Mathematica in terminal mode (without a front end), using the screen utility.

  • $\begingroup$ ah, well, I guess it's time to learn how mathematica works in terminal mode then... I'll keep this open a little longer to see if someone else has another idea $\endgroup$
    – fifaltra
    May 31, 2017 at 14:06
  • $\begingroup$ It's possible. Use Mosh instead of ssh. mosh.org $\endgroup$
    – webcpu
    Jun 1, 2017 at 17:06

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.