I am learning how to use Mathematica on a cluster, and a lot of this stuff is still way over my head. Please let me know if I am missing any crucial details.

The cluster uses Linux and uses Lmod to manage software modules. When I log into my account I then load Mathematica using the command ml Mathematica/12.0.0, and then I start a Mathematica kernel using math. Once the kernel is up, I put in the command $MaxLicenseProcesses or $MaxLicenseSubprocesses and I get back "Infinity".

What does "Infinity" mean here? If I run this on a notebook on my own computer it tells me 8 for $MaxLicenseProcesses and 16 $MaxLicenseSubprocesses. I am assuming this corresponds to the largest number I can use in LaunchKernels[n], since on my own computer if I try LaunchKernels[17] I get an error.

Does this mean I can use any number with the LaunchKernels[] function? At what point does this become pointless in speeding things up? When I try parallel computations on my own computer, specifying LaunchKernels[16] vs the automatic LaunchKernels[] which launches 2 kernels doesn't seem to create much improvement (as opposed to getting 16 kernels on the cluster which speeds up my calculations by a factor of 12).

  • $\begingroup$ It's not $MaxLicenseProcessors. It is $MaxLicenseProcesses. I corrected it in the title. It means that you have a license that does not put a limit on the number of Mathematica instances you can run at the same time. $\endgroup$
    – Szabolcs
    Sep 18, 2020 at 6:40
  • $\begingroup$ @Szabolcs Ugh thanks. I honestly do that so many times when typing it out haha. $\endgroup$ Sep 18, 2020 at 11:22


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.