Is it possible to call gnu parallel from within multiple runs of a script that are in-turn spawned by gnu parallel?
I have a python script that runs for 100s of sequential iterations, and somewhere within each iteration, 4 values are being computed in parallel (using gnu parallel). Now I want to spawn multiple such scripts at the same time, again, using gnu parallel. Is this possible? Will gnu parallel take care of good utilization of available cores?
For example, if in the inner loop, out of 4 values, 2 have been completed and 2 are running, so that a single script cannot proceed to the next iteration until all 4 values are computed. Will the two free cores be used for computing results for a different run of the script automatically? How can I specify the total number of cores available? In the inner call to parallel or outer call?
This questions shows it is possible to nest calls to parallel, but I'm not sure if this changes when I'm calling the nested parallel from inside a script.
PS: Thrashing is not a concern, I can use a LOT of cores from a large cluster.
PS2: gnu-parallel is an AWESOME tool... thanks! : )