Max Alekseyev on Tue, 28 Feb 2023 20:32:03 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

unable to load a large vector from a file


I have a vector v of size 10^9 with moderately-sized integers, which I saved to a file with
write("myvector.txt",v);
However, I'm unable to read it back. PARI/GP either runs out of memory (even with 96GB memory allocation!) or just killed by the system.
I tried both 
v = read("myvector.txt");
and 
\r myvector.txt

Is there a way around?

PS. The resulting file size is just 10GB and so it should not be an issue to read it as a whole into memory and then parse it, but PARI/GP somehow fails to do that.

Regards,
Max