0

I am computational chemist and use python codes (through jupyter notebook) to make analysis of my system. Today, while doing Principal Component Analysis and trying plot some results, it returns MemoryError. I try to find cause by googling, the suggestions were to look if I am not using 34 bit version, but I am sure that this is not my problem (and in addition - I am using PC with Linux). Another suggestion - to delete something...so, I deleted some bigger files, which were not needed anymore - it doesnt help. Then I found some suggestins, which were made for the specific task the other people ask and those were not my topic.

In particular, MemoryError occurs using mdanalysis package for PCA and using matplotlib inline.

  • 3
    You're running of RAM which is why you get that error. Its likely the data you're trying to use is too large. – SitiSchu Nov 28 '19 at 08:22
  • It is possible, but then isnt it unable for me to resolve the problem? Because I need to use the data, exactly that one format (btw. I was using it before). – HungryMolecule Nov 28 '19 at 08:39
  • Well you can resolve it by getting a beefier (i.e. more RAM) machine. Alternatively you could check if the libraries support some way of "streaming" the data from the disk instead of loading it into the RAM all at once. – SitiSchu Nov 28 '19 at 08:53
  • Use function `time.sleep(1)` before you're adding new variables/functions and monitor RAM usage in task manager. This way you may find out, which part of the code is a problem. Edit: How big are loaded files? – Plajerity Nov 28 '19 at 08:53
  • I checked my free memory a it says - 3600Mbs are free (almost half of my 8GB RAM) - does it make sense? – HungryMolecule Nov 28 '19 at 09:01
  • I can't see neither your data nor your code, so it's hard to say anything. You can increase python memory limit if needed, but more often than not it's wrong written script. – Plajerity Nov 28 '19 at 09:34
  • I am not sure if S/O is the ideal venue to sort out such a problem, especially as there is a dedicated mailing list for MDAnalysis. I suggest you ask your question at https://groups.google.com/forum/#!forum/mdnalysis-discussion . We generally ask you to show us the code that you've been running and the exact error messages that you get. We can then start a dialogue to figure out what's going on. S/O comments are, in my opinion, not an efficient way to do this kind of debugging. Your comment does not contain enough information to know what is really going on and you need to provide more info. – orbeckst Dec 01 '19 at 17:08

0 Answers0