I do not have multiple Raspberry Pis to test, but based on my experience with the desktop version of Mathematica I am fairly confident that this is possible. I typed up half an answer here, but after a browser crash and a malfunction of this forum's save draft feature I lost it. So here's a shortened version:
1. Decide which machines are going to be the slaves and which is the master. Use the same username on all of them for convenience (not a necessity). Set up passwordless authentication on all the slaves. Now it must be possible to execute any command on a machine named slave1 by typing
ssh slave1 command
on the master.
2. On the master start Mathematica and do:
Code: Select all
Block[{$ContextPath}, Needs["SubKernels`RemoteKernels`"]]
math = FileNameJoin[{$InstallationDirectory, "bin", "wolfram"}]
piKernel[host_String]:=
SubKernels`RemoteKernels`RemoteMachine[
host,
"ssh -f `1` \"" <> math <> " -mathlink -linkmode Connect `4` -linkname '`2`' -subkernel -noinit > /dev/null 2>&1 &\"",
1]
hosts = {"slave1", "slave2", ...}; (* hostnames of all slaves *)
$ConfiguredKernels = Join[$ConfiguredKernels, piKernel @@@ hosts]
Keep in mind that this is untested and I may have missed some details. If it works, it should be possible to simply LaunchKernels[], then use e.g. ParallelTable.
Hope this helps.