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
Possible fits memmap bug: memmap just doesn't work. #1380
Comments
What OS? What does |
OS is some flavor of linux; don't know off the top of my head or the Also, was using anaconda install of python/astropy/numpy but upgraded $ ulimit -v On Tue, Aug 27, 2013 at 4:02 PM, Erik Bray notifications@github.com wrote:
Adam |
What does |
|
...that seems like a tiny amount of memory; 2 GB? Hrmph. |
@keflavich - are you still seeing this issue? |
Totally forgot about this. |
Ah! I think I see the issue here. By default PyFITS uses the The problem is, that means in principle the entire file can be overwritten, so mmap needs to be able to allocate enough memory ahead of time should that occur. That's why this is happening here. PyFITS/Astropy should definitely catch that scenario and provide a more helpful error. Currently there are two ways around this: You can open the file with Another possibility is to open with Looking at the man page, it looks like there's also a flag, at least on Linux, called |
Managed to reproduce this directly--indeed, both of the workarounds I offered ( |
Annoyance: It should be easy enough to just eschew use of |
Note that with #7597 we no more use |
This can now be closed, as a workaround has been merged in #7926. |
I'm trying to load some gigantic FITS record tables using
memmap=True
, and I'm gettingerror: [Errno 12] Cannot allocate memory
.An example session:
The error is at this line:
I don't really know what's going on, but I suspect memmap is improperly deciding on how much data to read. Any tips on how to further debug? Is this actually a FITS issue, or a numpy issue?
Details:
The text was updated successfully, but these errors were encountered: