Dear Wolfram users,
I am currently using a python script which calls WolframScript for a given task. However, since my python script can work with different cores at the same time, each time the WolframScript starts it opens a new kernel. On the other hand, the number of available mathematica kernels is limited and therefore I would like to use subkernels to launch the WolframScript.
So far, the simplest possibility I can come up with is something like:
-
Launch a main.wls
-
Start n subkernels “sub1”, “sub2”, “sub3”… n being the number of cores
-
Launch the python script main.py (maybe with specific arguments)
-
-
Each time main.py calls “./script.wls” (which do some computation), pass as an argument the name of a specific subkernel “subN” to be run on.
I think this should do the job. However, I cannot find how to launch ./script.wls on a given subkernel.
Any ideas, hints or documentation would be very much appreciated !
Many thanks for your help,
Jordan