GeoscienceAustralia / GeoscienceAustralia/anuga_core

sequential_distribute_dump fails

Open
#147 24 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
229
Forks
110
Avg merge
1h 38m
Merged PRs (30d)
1

Description

sequential_distribute_dump fails for large domains in cPickle with

File "/usr/local/lib/python2.7/dist-packages/anuga/parallel/sequential_distribute.py", line 246, in sequential_distribute_dump
    cPickle.dump( tostore, f, protocol=cPickle.HIGHEST_PROTOCOL)
SystemError: error return without exception set

Probably related:
https://github.com/numpy/numpy/issues/2396
https://bugs.python.org/issue11564
https://stackoverflow.com/questions/34091717/avoid-cpickle-error-alternatives-to-cpickle-on-python-2-7

As using python3 isn't easily done it seems, i am unable to save large domains. (roughly >100,000,000 tris) - which is rather annoying when trying multiple variants on same large mesh.

My only advice to other users at this moment would be to not use sequential_distribute_dump to save the combined domain and the parts, but only the partial (per-proc) domains. these might just be small enough to work.

As to how to circumvent the error without upgrading anuga to python3, using numpy.save()/numpy.savez() is the most often suggested solution. (not sure if anuga uses numpy arrays for fields internally)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with anuga/parallel/sequential_distribute.py around line 246 and reproduce the cPickle failure using a large domain. Review the linked Python and NumPy reports for relevant constraints. Done means sequential_distribute_dump can save domains larger than roughly 100,000,000 triangles without this error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.