mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Software

Reply
 
Thread Tools
Old 2023-04-07, 08:30   #12
madderhatter
 
Apr 2023

1610 Posts
Default

Quote:
Originally Posted by paulunderwood View Post
I strongly recommend you start with the Pari/GP interpreter for prototyping your mathematical ideas. Then move onto learning to program C with the GMP library. 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!
Will PARI/GP, handle large numbers? It doesn't sound capable enough to test what I'm looking to.
madderhatter is offline   Reply With Quote
Old 2023-04-07, 10:31   #13
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

17·487 Posts
Default

For a 64-bit build:
In the gwnum directory, "make -f make64".
In the linux directory, simply "make".
Prime95 is offline   Reply With Quote
Old 2023-04-07, 12:54   #14
charybdis
 
charybdis's Avatar
 
Apr 2020

3×353 Posts
Default

Quote:
Originally Posted by madderhatter View Post
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?
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?
charybdis is offline   Reply With Quote
Old 2023-04-07, 13:55   #15
madderhatter
 
Apr 2023

24 Posts
Default

Quote:
Originally Posted by Prime95 View Post
For a 64-bit build:
In the gwnum directory, "make -f make64".
In the linux directory, simply "make".
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

Last fiddled with by madderhatter on 2023-04-07 at 14:08
madderhatter is offline   Reply With Quote
Old 2023-04-07, 14:58   #16
kriesel
 
kriesel's Avatar
 
"TF79LL86GIMPS96gpu17"
Mar 2017
US midwest

7,823 Posts
Default

For a change of pace try Mlucas on linux. Build directions and more at http://www.mersenneforum.org/mayer/README.html Many have succeeded in building from this. On Ubuntu, Centos, Canonical Ubuntu/WSL, etc.

Back to mprime: linux64 makefile includes the following:
Code:
#  Ugh, different linux variants require different makefiles.
#  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
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.

Last fiddled with by kriesel on 2023-04-07 at 15:37
kriesel is offline   Reply With Quote
Old 2023-04-07, 15:13   #17
madderhatter
 
Apr 2023

24 Posts
Default

Quote:
Originally Posted by kriesel View Post
For a change of pace try Mlucas on linux. Build directions and more at http://www.mersenneforum.org/mayer/README.html Many have succeeded in building from this.
Oh interesting it uses the same libraries. I'll look at that thanks!
madderhatter is offline   Reply With Quote
Old 2023-04-07, 16:54   #18
madderhatter
 
Apr 2023

24 Posts
Default

Quote:
Originally Posted by kriesel View Post
For a change of pace try Mlucas on linux. Build directions and more at http://www.mersenneforum.org/mayer/README.html Many have succeeded in building from this. On Ubuntu, Centos, Canonical Ubuntu/WSL, etc.

Back to mprime: linux64 makefile includes the following:
Code:
#  Ugh, different linux variants require different makefiles.
#  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
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.

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?
madderhatter is offline   Reply With Quote
Old 2023-04-07, 17:06   #19
kriesel
 
kriesel's Avatar
 
"TF79LL86GIMPS96gpu17"
Mar 2017
US midwest

11110100011112 Posts
Default

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.

Last fiddled with by kriesel on 2023-04-07 at 17:06
kriesel is offline   Reply With Quote
Old 2023-04-07, 17:21   #20
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

5×937 Posts
Default

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?

Last fiddled with by paulunderwood on 2023-04-07 at 17:22
paulunderwood is offline   Reply With Quote
Old 2023-04-08, 10:29   #21
madderhatter
 
Apr 2023

208 Posts
Default

Quote:
Originally Posted by madderhatter View Post
Oh interesting it uses the same libraries. I'll look at that thanks!
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?

Last fiddled with by madderhatter on 2023-04-08 at 10:29
madderhatter is offline   Reply With Quote
Old 2023-04-08, 10:33   #22
madderhatter
 
Apr 2023

1016 Posts
Default

Quote:
Originally Posted by paulunderwood View Post
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?
You won't believe me if I tell you, I don't believe it myself, hence the test.
madderhatter is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
I can no longer compile with GMP EdH Programming 23 2023-02-04 01:04
GGNFS won't compile? pakaran Factoring 14 2015-09-05 23:36
Compile v26 on Windows Brain Software 1 2010-11-24 00:34
Anyone want to compile an OS X ecm for yoyo? jasong GMP-ECM 1 2009-03-14 11:22
help to compile.... em99010pepe Programming 8 2006-12-06 17:11

All times are UTC. The time now is 14:06.


Fri Jul 7 14:06:09 UTC 2023 up 323 days, 11:34, 0 users, load averages: 1.35, 1.20, 1.16

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

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔