I am trying to design a paralelization analysis. With it, I wish to iterate a given function across X iterations (the order of thousands), and I want to repeat them again under S specific conditions (scenarios).
Lets say I have available an N number of nodes, each one with X processors.
With these constrains, would it be possible to design the best parallelization strategy/script? For example:
Thinking of the function as two nested loops:
for (s in 1:8) {print(paste("scenario",s))
for (i in 1:100) {print(paste("iteration",i))
}
}
I would wish to distribute each scenario across nodes and distribute iterations across cores. However, I do not see in paralelizing tutorials how to do that. Would this be possible?