Prime representing constant program for calculation of the digits
Hello, not so long ago I have posted in the ycruncher subforum about a program for the Prime representing constant (PRC). Since then I have developed quite a fast program, thanks to the help of casevh, author of gmpy2 library, and successfully computed 1 billion (10^{9}) digits of PRC. I have also finally managed to figure out how to parallelize the algorithm, but that led me to another problem...
Next big milestone after 10^{9} digits is 10^{12}. That requires 1 TB of disk space to contain all digits in a text file (or less if any compression is used), computing through primes up to about 2,5 * 10^{12}, basically the same amount of RAM (that problem has a solution  writing the intermediary numbers to disk, and reading them from there, as ycruncher does, or at least how I understand it does it), but most importantly, it needs to be able to sieve out the primes themselves. Storing 2,5 * 10^{12} bits in RAM would require about 300 GB of RAM space, which is too much for what I seek. Sieving them in a file would bring up a lot of hassle with making a procedure that could do such thing and another that can read the actual values from there.
These might not be extremely hard problems, but there may be easier ways to do this. So I would like to ask, whether anyone can help with some idea on how to effectively handle such gigantic sized numbers and amounts of data.
BTW, I am also thinking about making it into a GPU program, it could play nicely with TF highperforming GPUs (basically INT32), as the primes are not that big, compared to the blob of prime jelly that is being computed. If somebody has some ideas about this too, I will be grateful for any advice.
BTW2: Are there any volunteers who would like to test the upcoming C version of the code? It will have the multicore computation implemented in it.
Last fiddled with by Viliam Furik on 20210129 at 12:49
