I am using pyevolve to run a GA using multi processing. The code runs fine but uses more memory with every new generation of GA. The code is creating new jobs for each generation while the previous ones are idle while reserving RAM.It finally crashes after around 10 generations. How do I correct this?[Ram Usage][1][1]: https://i.stack.imgur.com/knCC0.jpg
def main_run():
flowargs, rhoargs, zindex=get_params()
genome = G1DList.G1DList(18)
genome.initializator.set(myGA.myInitializator)
genome.crossover.set(myGA.mycrossover)
genome.mutator.set(pl.Mutators.G1DListMutatorSwap)
genome.setParams(z=zindex,f=flowargs,r=rhoargs)
genome.evaluator.set(get_rho)
ga = GSimpleGA.GSimpleGA(genome)
ga.minimax = Consts.minimaxType["minimize"]
ga.setGenerations(100)
ga.selector.set(Selectors.GRouletteWheel)
ga.setInteractiveMode(False)
ga.setMultiProcessing(True)
ga.evolve(freq_stats=1)
best = ga.bestIndividual()
print(best)
if __name__ == "__main__":
main_run()