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

'MemoryError' for pb.invert #129

Closed
Coastal0 opened this issue Jan 22, 2018 · 5 comments
Closed

'MemoryError' for pb.invert #129

Coastal0 opened this issue Jan 22, 2018 · 5 comments

Comments

@Coastal0
Copy link

Coastal0 commented Jan 22, 2018

Problem description

When attempting to invert a dataset, a 'MemoryError' exception is thrown.

Your environment

Windows
Python 3.6
pyGIMLI latest wheel
Wheel-based Winpython install

Steps to reproduce

import pybert as pb
ert = pb.ERTManager()
data = ert.loadData('Stable_015mday_fwdModel_wa_5pcNoise.txt')
model = ert.invert(data = data, lam=30)

Stable_015mday_fwdModel_wa_5pcNoise.txt

Expected behavior

A perfect replication of the model (or something similar).

Actual behavior

I run out of memory.

model = ert.invert(data = data, lam=30)
Traceback (most recent call last):

  File "<ipython-input-16-381264132134>", line 1, in <module>
    model = ert.invert(data = data, lam=30)

  File "F:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\pybert\manager\ertmanager.py", line 392, in invert
    model = self.inv.run()

MemoryError

Additional Notes

I have 64 Gb of RAM on this workstation, and the implementation of BERT outside python appears to work fine.

(I wasn't sure whether to post here or on BERT, sorry!)

@halbmy
Copy link
Contributor

halbmy commented Jan 22, 2018

Well this seems to be a clear BERT issue as the code is entirely from there.

@halbmy
Copy link
Contributor

halbmy commented Jan 22, 2018

As said before there is a default mechanism for using (2d) topography but it is not foolproof or tested. In rather recommend using the command line to prepare mesh and primary potentials.

@Coastal0
Copy link
Author

Good point. I can test with meshes I've already generated from earlier in the script using pyGIMLi.

Is it worth posting in the BERT tracker instead?

@florian-wagner
Copy link
Member

florian-wagner commented Jan 22, 2018

64 GB of RAM should be more than enough, especially as you are working in 2D. I cannot reproduce the problem. Your code snippet works with the attached data set and produces the following result (rrms = 100%, chi^2 = 0.77).

figure_1

It's definitely not a memory problem (I have 16 GB).

@Coastal0
Copy link
Author

Thanks guys. This looks like it's specific to my install of Spyder. I'll close the issue (can we delete it?)

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

3 participants