I have 2 computers, both of which have the pathos Python module. I have a Pathos multiprocessing pool and have been trying to get pathos to split the number of processes evenly between the two CPUs using the following code:
from pathos.multiprocessing import ProcessPool
ngramPool = ProcessPool()
ngramPool.ncpus = 8
ngramPool.servers = ('localhost:5653','ec2-18-223-23-82.us-east-2.compute.amazonaws.com:5653')
questionNgrams = []
i = 0
previousI = 0
previousTime = time.time()
#Test questions
#questions = ["To whom do I owe this great pleasure","Who do I owe this great pleasure which is a great pleasure to","Who do I owe this great pleasure to"]
questionNgrams = ngramPool.map(n_gram.stringToNgrams,questions)
However, instead of running 4 processes on my local CPU and 4 on the Amazon EC2 instance, all 8 processes are being run on my local processor. How do I set up pathos so that it spawns 4 processes on my CPU and another 4 on the Amazon instance?