mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Hardware (https://www.mersenneforum.org/forumdisplay.php?f=9)
-   -   What is the most efficient way to run math programs (large numbers)? (https://www.mersenneforum.org/showthread.php?t=26416)

mersenne1588 2021-01-20 17:50

What is the most efficient way to run math programs (large numbers)?
 
Hi there,

If I want to calculate with large numbers and I am looking for the option where the arithmetic operations can be carried out the fastest, what is the best way to proceed? The situation for me is like this: I have an old computer (Intel Core 2 Duo).

Should I buy a new computer with a large RAM and a graphic board where I can run the math programs or should I use azure or aws with a possible GPU workstation or should I contact a university and ask them whether I can use their mainframe and book time slots or cores or both?

If I use cloud computing, I would be willing to invest 50 euros (60 USD) a month, it could also be that I book many cores so that it can be calculated faster and the 50 euros are used up after a few days. That would be ok too, my limit would simply be 50 euros per month. For a new computer, I could currently invest between 500-800 euros (600-1000 USD).

What is the best way to proceed? Does anyone have a tip for me?

paulunderwood 2021-01-20 18:06

"Calculate large numbers" could mean several things. What do you mean? In what time scale? If it is to do with large primes then you have several options in ascending magnitude: Pari/GP, Perl or GMP or GWNUM based softwares, even possibly Mlucas. If it was Mersenne Numbers and you have a GPU then gpuOwl might be an option.

As for which hardware to use, I'd recommend a many core AMD box over cloud computing. Cloud computing can be had for free if you are prepared to be patient and learn to use and nurse it.

VBCurtis 2021-01-20 18:59

Figure out what software does the calculations you want, then see how fast that software is on a desktop you can afford, or a free core like Google Colab, or a paid core like AWS.

Without knowing what software you want to run, we can't give a useful answer for what hardware is best for you. You were really vague about the math side, so there really isn't much to go on.

mersenne1588 2021-01-21 12:09

I see, it makes sense to describe what I mean exactly, when I write that I want to calculate with large numbers. I will gladly explain this in more detail.

I am interested in the following mathematical topics:

Search for Mersenne primes with 2 ^ p - 1> 2 ^ 82589933 -1

verification of the strong Goldbach conjencture for n> 4 x 10 ^ 18

verification of odd perfect numbers for n> 10 ^ 1500


Which [B]software[/B] and which [B]hardware[/B] should I use in the mentioned cases?


So far I only know which software I should most likely use to search for the Mersenne prime numbers.

xilman 2021-01-21 12:30

[QUOTE=mersenne1588;569766]I see, it makes sense to describe what I mean exactly, when I write that I want to calculate with large numbers. I will gladly explain this in more detail.

I am interested in the following mathematical topics:

Search for Mersenne primes with 2 ^ p - 1> 2 ^ 82589933 -1

verification of the strong Goldbach conjencture for n> 4 x 10 ^ 18

verification of odd perfect numbers for n> 10 ^ 1500


Which [B]software[/B] and which [B]hardware[/B] should I use in the mentioned cases?


So far I only know which software I should most likely use to search for the Mersenne prime numbers.[/QUOTE]How interested are you?

If you are particularly interested I could recommend writing your own software, using publicly available sources and algorithms as a starting point.

It might take you longer to get faster than the readily available stuff but, to compensate, you will learn a hell of a lot about the subject.

tServo 2021-01-21 13:37

[QUOTE=mersenne1588;569766]I see, it makes sense to describe what I mean exactly, when I write that I want to calculate with large numbers. I will gladly explain this in more detail.

I am interested in the following mathematical topics:

Search for Mersenne primes with 2 ^ p - 1> 2 ^ 82589933 -1

verification of the strong Goldbach conjencture for n> 4 x 10 ^ 18

verification of odd perfect numbers for n> 10 ^ 1500


Which [B]software[/B] and which [B]hardware[/B] should I use in the mentioned cases?


So far I only know which software I should most likely use to search for the Mersenne prime numbers.[/QUOTE]

I'm curious why you selected the exponent 82589933 to start your Mersenne search.
If you go to the web site mersenne.org, near the top it gives the latest search progress.
Today it says "All exponents below 101 066 557 have been tested at least once."
Also, if you look at "Current Progress -> Recent Results and Recent Cleared", you can see that most of the Mersenne testing is being done on exponents between the one mentioned above and about 106,xxx,xxx.
Studying that website may answer your questions about Mersenne searching.

VBCurtis 2021-01-21 15:33

[QUOTE=tServo;569769]I'm curious why you selected the exponent 82589933 to start your Mersenne search.[/QUOTE]

Because that's the largest known prime. He's just saying he's interested in world-record primes. While the stats you cite are true and accurate, there are quite a few searchers who prefer to only search larger than the largest-known prime. If that record is higher than the current wavefront, we get two wavefronts for some time as some people only search above the new record.

OP-
Searching for Mersennes can be done quickly on some GPUs. Have a look at the GPUowl threads for an idea of how fast certain video cards are. If you prefer using a CPU for such searching (reasonable, when your other searches aren't likely to make full use of a GPU), be aware that more cores isn't always better for Mersenne searching- Prime95/mprime is often memory bandwidth limited, especially on machines with just two memory channels. Lucky for you, there's a ton of benchmark data out there so you can avoid spending extra cash on a cpu that's not really faster for Mersenne hunting.

It's going to be hard to verify odd perfect numbers, since we don't know of any. If you mean you would like to contribute to raising the 'xxx' bound of "no odd perfect numbers below xxx", that's done by factoring numbers which is not GPU-enhanced at this time. Factorization jobs benefit from tons of cores, but are easily parallelizable for the longest phase of the job (sieving); so, two regular machines is often as good as one fancy machine.

mersenne1588 2021-01-21 20:01

[QUOTE=VBCurtis;569776]Because that's the largest known prime. He's just saying he's interested in world-record primes. While the stats you cite are true and accurate, there are quite a few searchers who prefer to only search larger than the largest-known prime.[/QUOTE]
Right, that's exactly how it was meant.

[QUOTE=VBCurtis;569776] If you mean you would like to contribute to raising the 'xxx' bound of "no odd perfect numbers below xxx".[/QUOTE]

This is exactly what I meant by that, of course I know that there are no known odd perfect numbers, so you can't check odd perfect numbers either. I just expressed myself wrongly, sorry, English is not my mother tongue, sometimes I don't express myself correctly.

mersenne1588 2021-01-22 11:50

[QUOTE=paulunderwood;569725]

As for which hardware to use, I'd recommend a many core AMD box over cloud computing. Cloud computing can be had for free if you are prepared to be patient and learn to use and nurse it.[/QUOTE]

[QUOTE=VBCurtis;569727]Figure out what software does the calculations you want, then see how fast that software is on a desktop you can afford, or a free core like Google Colab, or a paid core like AWS.
[/QUOTE]

The use of a GPU workstation at Microsoft (azure) or aws would make sense here because of the high processing speed due to the high number of cores, of course in the event that the use would be affordable for me. Am I right with that?

[QUOTE=VBCurtis;569727](...) that's done by factoring numbers which is not GPU-enhanced at this time. Factorization jobs benefit from tons of cores, but are easily parallelizable for the longest phase of the job (sieving); so, two regular machines is often as good as one fancy machine.[/QUOTE]

@VBCurtis: Hi, I hope you're doing well. Can you describe the meaning of it maybe in other words? At the moment, I have no advanced computer skills, so I don't fully understand the statement.Thank you.

Plutie 2021-01-22 15:21

From my understanding, this is referring to how GNFS/SNFS sieving jobs can be spread out over multiple instances running on different computers. EdH has a great guide about how to set up a distributed NFS job. [url]https://www.mersenneforum.org/showthread.php?t=23165[/url]

xilman 2021-01-22 15:54

[QUOTE=Plutie;569838]From my understanding, this is referring to how GNFS/SNFS sieving jobs can be spread out over multiple instances running on different computers. EdH has a great guide about how to set up a distributed NFS job. [url]https://www.mersenneforum.org/showthread.php?t=23165[/url][/QUOTE]Even that is a non-trivial undertaking when one takes into account the resources needed for the linear algebra stages before the factorization is complete.


All times are UTC. The time now is 03:38.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.