Hardware: PC with 256GB RAM
OS: Windows 10
Mathematica: Version 13.0.1
One of my projects has led to the creation of a SparseArray whose ByteCount is ~ 35GB in RAM. At the time of creation the SparseArray is functional and returns information when appropriately queried.
When I Export the SparseArray using the .mx format, the data stores on my hard drive with a memory footprint of ~ 17GB. No errors are generated.
When I attempt to Import the same SparseArray using a fresh kernel, the computer spins for about 2 minutes - during this time I see RAM spike to roughly 90GB, and then slowly the RAM usages drops and the kernel just quits. I hear a beep - no error messages are generated, and I can't retrieve my data.
I wish I could say this behavior has not been seen before, but while working in Mathematica v12, I attempted to use BinarySerialize to store a large Association - only to discover I couldn't retrieve it either. Attempts to get help from Wolfram tech support were fruitless as they claimed they didn't have access to a machine with enough RAM to explore the problem. Sigh.
Questions I can't help but ponder:
Has anyone else noticed such erratic behavior trying to retrieve serialized data from Mathematica? (I seem to notice the behavior when the ByteCount of the object reaches a few tens of gigabytes in size.)
Any advice for resolving this? Avoiding BinarySerialize and mx formats and sticking with Put/Get does seem to work, but then my read/write times are glacially slow. Almost a deal breaker kind of slow.
Finally, if there are any adventurous souls with sufficient hardware, here is a link to my SparseArray object. (Will it load on your computer without quitting the kernel?)
https://www.dropbox.com/s/2hk2e6ubbi8ivuq/InformativeKmersSparseArray-A.mx?dl=0
If by some miracle you get it to load, the following should be a successful query: (assuming you store the SparseArray in a variable called "data".)
data[[2322312231212121]]
Thanks for reading.
SparseArray
during serialization. $\endgroup$DumpSave
instead ofExport
. $\endgroup$