![]() |
[QUOTE=paulunderwood;627959]I strongly recommend you start with the [URL="https://pari.math.u-bordeaux.fr/"]Pari/GP interpreter[/URL] for prototyping your mathematical ideas. Then move onto learning to program C with the [URL="https://gmplib.org/"]GMP library[/URL]. Finally have a look at gwnum/gwnum.h and gwnum/giants.h with prime95 for FFT use. you might also like to look at OpenPFGW (sourceforge) which can test very large numbers for (probable) primality.
I have just given up with trying to compile mprime![/QUOTE] Will PARI/GP, handle large numbers? It doesn't sound capable enough to test what I'm looking to. |
For a 64-bit build:
In the gwnum directory, "make -f make64". In the linux directory, simply "make". |
[QUOTE=madderhatter;627957]Well I want to play with the algorithms. I've done some math I want to try to study to maybe improve it to prove if my math is correct as well, as well as just study how the program works and allows for working with massive numbers and such. Also I like that it automatically reports if a new large prime is found right? If I'm able to adjust the algorithms to my math and my math is more efficient it will at once prove my math and prove my understanding. But stuck on this relatively simple stuff...because apparently there's no documentation I can find? [/QUOTE]
Which part of the algorithms do you think you can improve? Do you think you have a (deterministic or probable) primality test faster than LL or Fermat? Do you think you can improve the FFT implementation or have a faster multiplication algorithm? |
[QUOTE=Prime95;627966]For a 64-bit build:
In the gwnum directory, "make -f make64". In the linux directory, simply "make".[/QUOTE] Yes that's what I was doing, but obviously had a lot more difficulty it wasn't that simple for me. I'll try again with -f ...I'm not sure I did that...but can you confirm for me which libraries I need? Is it possible to build it in visualstudio on windows? Ok when I go to the linux directory, I think i was in the linux64 directory before...same thing though issues with the processor/instruction set of some sort? "[ ! -e ../security.h ] && touch ../security.h || true [ ! -e ../security.c ] && touch ../security.c || true [ ! -e ../secure5.c ] && touch ../secure5.c || true gcc -I.. -I../gwnum -I/usr/local/include -std=gnu99 -Wno-unused-result -march=i486 -malign-double -O2 -DPORT=2 -c prime.c cc1: error: CPU you selected does not support x86-64 instruction set cc1: error: ‘-fcf-protection=full’ is not supported for this target make: *** [makefile:66: prime.o] Error 1 " in the linux64 directory appears to be fine until I get: _GWDATA 0x0000000001f57300 0x8800 ../gwnum/gwnum.a(mult.o) collect2: error: ld returned 1 exit status make: *** [makefile:38: mprime] Error 1 |
For a change of pace try Mlucas on linux. Build directions and more at [url]http://www.mersenneforum.org/mayer/README.html[/url] Many have succeeded in building from this. On Ubuntu, Centos, Canonical Ubuntu/WSL, etc.
Back to mprime: linux64 makefile includes the following:[CODE]# [B]Ugh, different linux variants require different makefiles.[/B] # The current makefile is for CentOS 7. We prefer to link against older Linux versions because linking on the latest, greatest version # creates an mprime executable that will not run on older Linux versions because of glibc incompatibilites. # # Some linux versions require some of the variations below: # "export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig" # CFLAGS = -I.. -I../gwnum -DX86_64 -O2 -Wno-unused-result # LFLAGS = -Wl,-M # LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -Wl,-Bstatic $(shell pkg-config --static --libs libhwloc) -Wl,-Bstatic $(shell pkg-config --static --libs libcurl) -lstdc++ -Wl,-Bdynamic -ldl [/CODE]I don't recall you telling us which flavor of Linux you're trying to build mprime on/for yet. As to -march=i486, is that old instruction set still supported in prime95? It would be very limiting, probably 4M max fft in mprime so ~79M max exponent; 2GB ram user virtual space. |
[QUOTE=kriesel;627979]For a change of pace try Mlucas on linux. Build directions and more at [url]http://www.mersenneforum.org/mayer/README.html[/url] Many have succeeded in building from this.[/QUOTE]
Oh interesting it uses the same libraries. I'll look at that thanks! |
[QUOTE=kriesel;627979]For a change of pace try Mlucas on linux. Build directions and more at [url]http://www.mersenneforum.org/mayer/README.html[/url] Many have succeeded in building from this. On Ubuntu, Centos, Canonical Ubuntu/WSL, etc.
Back to mprime: linux64 makefile includes the following:[CODE]# [B]Ugh, different linux variants require different makefiles.[/B] # The current makefile is for CentOS 7. We prefer to link against older Linux versions because linking on the latest, greatest version # creates an mprime executable that will not run on older Linux versions because of glibc incompatibilites. # # Some linux versions require some of the variations below: # "export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig" # CFLAGS = -I.. -I../gwnum -DX86_64 -O2 -Wno-unused-result # LFLAGS = -Wl,-M # LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -Wl,-Bstatic $(shell pkg-config --static --libs libhwloc) -Wl,-Bstatic $(shell pkg-config --static --libs libcurl) -lstdc++ -Wl,-Bdynamic -ldl [/CODE]I don't recall you telling us which flavor of Linux you're trying to build mprime on/for yet. As to -march=i486, is that old instruction set still supported in prime95? It would be very limiting, probably 4M max fft in mprime so ~79M max exponent; 2GB ram user virtual space.[/QUOTE] Oh ok I wasn't aware of that I was just trying ubuntu since I've used it a lot in the past. You think it would build with no problems in centOS7? |
I think installing CentOS 7 would be difficult at this point. When I tried it a year ago, because of a great deal of content having been retired from required repositories, I ended up at CentOS 8 stream instead. Linux is not my forte, but help from assorted Linux fans in the forum did not enable successful install of CentOS 7.9 that I was aiming for.
|
madderhatter, why are you trying to compile mprime? If it is to test your ideas and the numbers involved are far to high for Pari/GP to address in a reasonable amount of time, then I suggest you learn to use the GMP and GWNUM libraries.
If you could be a little more specific about your goals it might make helping you out a little easier. Are your ideas Mersenne related, Fermat PRP related or FFT related? |
[QUOTE=madderhatter;627982]Oh interesting it uses the same libraries. I'll look at that thanks![/QUOTE]
Ok I got done with the current project that was taking a lot of my time up, going to try to focus on this some more now. Yeah interesting reading on that site, I guess this is the problem I've been facing, basically prime95 wants to see a 32 bit operating system am I reading that right? " George Woltman's Prime95 program (a.k.a. mprime for the linux version), but that program is not 100% open-source. Prime95 is also only available for platforms based on the x86 processor architecture." Ok I'll switch to trying to build that then. Are there disadvantages to it vs prime95 though? Like if you discover a prime in prime95 it like automatically reports it or something, I'm not sure how exactly that works but that's what I was given to understand, does that program have the same functionality? |
[QUOTE=paulunderwood;627993]madderhatter, why are you trying to compile mprime? If it is to test your ideas and the numbers involved are far to high for Pari/GP to address in a reasonable amount of time, then I suggest you learn to use the GMP and GWNUM libraries.
If you could be a little more specific about your goals it might make helping you out a little easier. Are your ideas Mersenne related, Fermat PRP related or FFT related?[/QUOTE] You won't believe me if I tell you, I don't believe it myself, hence the test. |
| All times are UTC. The time now is 13:57. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.