Running HTSeq in parallel
Hello,
I am trying to process mapped reads in parallel. However, when using pool of workers (multiprocessing package), I get following error:
Traceback (most recent call last):
File "testmp.py", line 15, in <module>
out = pool.map(repr, iter(sa), chunksize=1)
File "/usr/lib/python2.7/multiprocessing/pool.py", line 228, in map
return self.map_async(func, iterable, chunksize).get()
File "/usr/lib/python2.7/multiprocessing/pool.py", line 531, in get
raise self._value
AttributeError: 'NoneType' object has no attribute 'name'
Running in serial fashion (using just built-in 'map' function) works fine.
Do you know what can be wrong here?
Thank you.
---
Here is a simple script to reproduce the error. I am using HTSeq ver 0.6.1, Python 2.7.3, 64bit ubuntu 12.04
import HTSeq
from multiprocessing import Pool
# this works for me
map(repr, sa)
# this does not work
pool = Pool(processes=1)
sa = HTSeq.SAM_Reader('test.sam')
out = pool.map(repr, sa, chunksize=1)
print list(out)
Hello,
I am trying to process mapped reads in parallel. However, when using pool of workers (multiprocessing package), I get following error:
Traceback (most recent call last):
File "testmp.py", line 15, in <module>
out = pool.map(repr, iter(sa), chunksize=1)
File "/usr/lib/python2.7/multiprocessing/pool.py", line 228, in map
return self.map_async(func, iterable, chunksize).get()
File "/usr/lib/python2.7/multiprocessing/pool.py", line 531, in get
raise self._value
AttributeError: 'NoneType' object has no attribute 'name'
Running in serial fashion (using just built-in 'map' function) works fine.
Do you know what can be wrong here?
Thank you.
---
Here is a simple script to reproduce the error. I am using HTSeq ver 0.6.1, Python 2.7.3, 64bit ubuntu 12.04
import HTSeq
from multiprocessing import Pool
# this works for me
map(repr, sa)
# this does not work
pool = Pool(processes=1)
sa = HTSeq.SAM_Reader('test.sam')
out = pool.map(repr, sa, chunksize=1)
print list(out)
Comment