This is essentially a cross-post of
this Mma.StackExchange post.
I have a number of computers which all might need to use the same (client) configuration for the Wolfram Lightweight Grid at some point.
I know that there are ways to programmatically set certain front-end options with commands akin to
SetOptions[$FrontEnd, RenderingOptions -> {"HardwareAntialiasingQuality" -> 1}]
My question is: are there similar commands which, when I evaluate them on a given computer will set preferences in the Local->Lightweight Grid preference pane? That is, I would love to have a notebook that I could distribute to my colleagues that contained code like
SetOptions[Something, LookForKernelsAt->IPAddress(es)OfTheComputer(s)RunningLightweightGrid]
that would configure their computers correctly and through Mathematica restarts (ie. so that they only have to evaluate the code one time).
Is this possible? Do such commands exist? I have been trying to understand what is provided in the LightweightGridClient and Parallel`Developer contexts but nothing seems to fit the bill.
Alternatively, are there commands that would correctly and permanently setup access to additional cores via SSH, as in Parallel->Remote Kernels ?
**Refinement of question below**
Thank you both for your responses, I think they have helped me learn enough to almost solve, but then need to refine my question.
Suppose I go to the Mma preferences and click "Reset to Defaults" in the Parallel tab.
Then, when I evaluate
$ConfiguredKernels
I get, for example
{<<2 local kernels>>}
and if I LaunchKernels[] two kernels launch, as expected, since that is the default on my machine alone.
If I CloseKernels[] I can then execute
Needs["LightweightGridClient`"]
AppendTo[$ConfiguredKernels,
LightweightGrid[{
"Agent" -> "http://THE.IP.ADD.RESS:3737/WolframLightweightGrid/Manager",
"KernelCount" -> SomeNumber,
"LocalLinkMode" -> "Connect",
"Service" -> "",
"Timeout" -> 30}] ]
If I go to the Parallel preference pane, it shows "Total number of configured kernels: 2+SomeNumber", which is promising. Something curious is that if I go to the Lightweight Grid sub-pane, it doesn't show the machine I just added to $ConfiguredKernels at all (even though it does show that 2+SomeNumber are set up). It simply shows what it shows after clicking Reset to Defaults: "Ready to connect to computers running the Lightweight grid Manager". I think this might just be that the interface is not refreshing.
If I run LaunchKernels[] now, 2+SomeNumber kernels launch, as expected. If I close and re-open the preferences and go to the Lightweight Grid subpane, now it shows a computer at THE.IP.ADD.RESS as expected, with the "Enable" box checked, but unexpectedly the Kernels box is 0, not SomeNumber as expected.
Finally, if I CloseKernels[], $ConfiguredKernels evaluates to {<<2 local kernels>>} again, instead of a list of the two local kernels + the lightweight grid kernels. If I return to the Lightweight Grid preference pane, all knowledge of kernels at THE.IP.ADD.RESS is gone.
If I go through the same rigamaroll but now manually increase the kernel count next to THE.IP.ADD.RESS to any number by clicking the + sign in the preference pane, I can CloseKernels[], Quit[], quit Mma, etc., and knowledge of that lightweight grid survives.
My questions are:
(1) Am I having a typical experience? If it matters, my $Version is "9.0 for Mac OS X x86 (64-bit) (November 20, 2012)" (9.0.0.0, I think).
(2) What can I do to get the Lightweight Grid stuff to stick around through CloseKernels[]s, Quit[]s, and full quits of Mma that isn't clicking around with my mouse in the preference pane?