7
$\begingroup$

Context

I get inconsistent delays (from a fraction of a second to 10 seconds or more) in launching

'echo "Print[1+1]; Quit[]" | math'  

on different nodes of a cluster (or at different times on the same node), which seems to be driven by the fact that these nodes do not have access to the internet. It seems that the kernels are sometimes trying to access wolfram servers, hence the delay. The delay disappears if I ask the system manager to temporarily open such access.

Question

How to tell Mathematica not to try and talk to wolfram?


As an artefact, it would also delay considerably the frontEnd, should one attempt to run it on such a compute node.

Notes

  1. This question does not necessarily apply to only subKernels. It can be the main kernel as well.
  2. It could also be a licensing issue, though it seems unlikely because eventually it works.
  3. This problem occurs with mathematica 8,9, 10.3, 11.3 and 12.
$\endgroup$
3
  • $\begingroup$ I could not originally understand the title. After reading the question, I edited the title in an attempt to make it clearer. Please review it. $\endgroup$
    – Szabolcs
    Commented Jan 16, 2020 at 10:46
  • 3
    $\begingroup$ This sounds like something that would be worth bringing up with Wolfram Support. It's not clear to me why subkernels should keep wanting to connect at all ... I did notice that sometimes subkernels print cloud-related messages on startup. $\endgroup$
    – Szabolcs
    Commented Jan 16, 2020 at 10:47
  • 3
    $\begingroup$ I do use clusters, but: 1. The nodes can access the internet 2. Subkernels do indeed take long to launch with occasional failures but I never managed to debug why :( Your finding is maybe a step towards understanding the reasons. $\endgroup$
    – Szabolcs
    Commented Jan 16, 2020 at 10:52

2 Answers 2

8
$\begingroup$

As an alternative it can also be done programatically following this link

 $AllowInternet = False 

Or to the frontend

You can use:

CurrentValue[$FrontEnd, "AllowDownloads"]=False;

to disable the "Allow the Wolfram System to access the internet" preference.


Update

Wolfram support presented yet another solution

Configure your machine to disable internet access to the Wolfram domains.

$\endgroup$
3
$\begingroup$

I post this answer as it provided a solution to us. Please adapt on a case by case basis to your own situation ?

One solution is to make sure that the file

 /etc/resolv.conf 

is either absent or empty. In that case the kernels don't attempt to access the wolfram server. Hence no delay.

I will update this answer when / if WRI support answers my request.

$\endgroup$

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.