Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiprocessing Error #55

Open
aakashsur opened this issue Nov 19, 2021 · 1 comment
Open

Multiprocessing Error #55

aakashsur opened this issue Nov 19, 2021 · 1 comment

Comments

@aakashsur
Copy link

When I try to run hic2convert with more than one processor, I get the following error -

Traceback (most recent call last):
  File "/Users/aakashsur/.virtual/default/bin/hic2cool", line 8, in <module>
    sys.exit(main())
  File "/Users/aakashsur/.virtual/default/lib/python3.8/site-packages/hic2cool/__main__.py", line 86, in main
    hic2cool_convert(args.infile, args.outfile, args.resolution, args.nproc, args.warnings, args.silent)
  File "/Users/aakashsur/.virtual/default/lib/python3.8/site-packages/hic2cool/hic2cool_utils.py", line 936, in hic2cool_convert
    tmp_chunk = parse_hic(req, pool, nproc, chr_key, unit, binsize,
  File "/Users/aakashsur/.virtual/default/lib/python3.8/site-packages/hic2cool/hic2cool_utils.py", line 359, in parse_hic
    result_all.extend(mpi_result[mpi].get())
  File "/Users/aakashsur/.python/lib/python3.8/multiprocessing/pool.py", line 771, in get
    raise self._value
NameError: name 'reqarr' is not defined

It runs normally when I just have one processor.

@joachimwolff
Copy link

I can confirm this, but getting a different error:

hic2cool convert -r 5000 -p 10 matrix.hic matrix.cool
##########################
### hic2cool / convert ###
##########################
### Header info from hic
... Chromosomes:  ['ALL', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', 'M', 'X', 'Y']
... Resolutions:  [2500000, 1000000, 500000, 250000, 100000, 50000, 25000, 10000, 5000]
... Normalizations:  ['VC', 'VC_SQRT', 'KR']
... Genome:  mm10
### Converting
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
  File "/wolfjoac/miniconda3/envs/hicexplorer_dev/lib/python3.8/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/wolfjoac/miniconda3/envs/hicexplorer_dev/lib/python3.8/site-packages/hic2cool/hic2cool_utils.py", line 377, in build_counts_chunk
    records = read_block(req, block_record)
  File "/wolfjoac/miniconda3/envs/hicexplorer_dev/lib/python3.8/site-packages/hic2cool/hic2cool_utils.py", line 232, in read_block
    uncompressedBytes = zlib.decompress(compressedBytes)
zlib.error: Error -3 while decompressing data: invalid block type
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/wolfjoac/miniconda3/envs/hicexplorer_dev/bin/hic2cool", line 10, in <module>
    sys.exit(main())
  File "/wolfjoac/miniconda3/envs/hicexplorer_dev/lib/python3.8/site-packages/hic2cool/__main__.py", line 86, in main
    hic2cool_convert(args.infile, args.outfile, args.resolution, args.nproc, args.warnings, args.silent)
  File "/wolfjoac/miniconda3/envs/hicexplorer_dev/lib/python3.8/site-packages/hic2cool/hic2cool_utils.py", line 936, in hic2cool_convert
    tmp_chunk = parse_hic(req, pool, nproc, chr_key, unit, binsize,
  File "/wolfjoac/miniconda3/envs/hicexplorer_dev/lib/python3.8/site-packages/hic2cool/hic2cool_utils.py", line 359, in parse_hic
    result_all.extend(mpi_result[mpi].get())
  File "/wolfjoac/miniconda3/envs/hicexplorer_dev/lib/python3.8/multiprocessing/pool.py", line 771, in get
    raise self._value
zlib.error: Error -3 while decompressing data: invalid block type

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants