I am using python 2.7.10. I read a lot of files, saved them in a large list, and then tried to call multiprocessing and pass a large list to these multiprocesses, so that each process can access this large list and do some calculations.
I use Pool as follows:
def read_match_wrapper(args): args2 = args[0] + (args[1],) read_match(*args2) pool = multiprocessing.Pool(processes=10) result=pool.map(read_match_wrapper,itertools.izip(itertools.repeat((ped_list,chr_map,combined_id_to_id,chr)),range(10))) pool.close() pool.join()
Basically, I pass a few variables to the read_match function. To use pool.map, I write the read_match_wrapper function. I do not need any results from these processes. I just want them to run and finish.
I can get this whole process to work when the ped_list data list is pretty small. When I download all the data, for example 10G, then all the multiprocesses that it generates show "S" and do not seem to work at all.
I do not know if there is a limit to how much data you can get through the pool? I really need help with this! Thanks!
odeya source share