3
$\begingroup$

When launching several remote kernels manually on a cluster (as described in here under `Remote Kernels/Manual Launching') I see quite frequently the following error:

General::time: Operation LaunchKernels timed out after 10. seconds.

(and of course, these kernels do not start). My guess: if the remote kernel does not launch in a given time (10 seconds) then the controlling kernel interrupts and continues with the next kernel (if requested). Thus my question: is it possible to modify (in particular to increase) the timeout time? Given limited documentation (both LaunchRemote and LinkCreate do not give much information) I could not find any solution to this issue.

To be more specific here is the code I use to launch 8 remote kernels on a particular host "node642" (all machines are running Linux, with same version of Mathematica installed on each machine) using ssh connection:

Needs["SubKernels`RemoteKernels`"];
LaunchKernels[RemoteMachine["node642", "ssh -x -f -l `3` `1` /wolfram/mathematica/11.2.0/bin/math -mathlink -linkmode Connect `4` -linkname '`2`' -subkernel -noinit -nopaclet >& /dev/null &", 8]]

For obvious reasons, I am interested in a solution which does not requre using GUI.

$\endgroup$

1 Answer 1

4
$\begingroup$

You can use SetSystemOptions to increase the timeout used upon launching remote kernels:

SetSystemOptions["ParallelOptions" -> "MathLinkTimeout" -> 20.]
$\endgroup$
1
  • $\begingroup$ This worked for me. Many thanks! $\endgroup$
    – mmal
    Apr 23, 2019 at 19:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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