mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Software (https://www.mersenneforum.org/forumdisplay.php?f=10)
-   -   Sieving programs (https://www.mersenneforum.org/showthread.php?t=20677)

calimero22 2015-11-19 20:30

Sieving programs
 
Hi All
I'm Giovanni Di Maria

[url]http://primes.utm.edu/bios/page.php?id=852[/url]

I'am new here.
I study prime numbers, i don't know if this is the correct forum for my question, excuse me in advance.

What's last version of sieving program? I use the old newpgen 2.82. Are there newest versions?

Thank you .
Giovanni Di Maria

Mini-Geek 2015-11-19 20:42

What sort of numbers and ranges do you want to sieve? There are [URL="http://www.mersennewiki.org/index.php/Sieving_program"]many sieving programs[/URL], depending on what you want to sieve. 2.82 is still the newest version of NewPGen, but for most types of numbers, there's something else that's more efficient.

calimero22 2015-11-19 20:45

Thank you Mini Geek.
I'm sieving the numbers in the form:

k*2^n+1

with k fixed.

K is about 40,000,000
n is from 1,000,000 to 30,000,000

Thank you very much
Giovanni

pepi37 2015-11-19 21:16

[QUOTE=calimero22;416638]Thank you Mini Geek.
I'm sieving the numbers in the form:

k*2^n+1

with k fixed.

K is about 40,000,000
n is from 1,000,000 to 30,000,000

Thank you very much
Giovanni[/QUOTE]
If I may ask , what is so specific on those ranges?
Can you do prime candidate with exponent 30.000.000 in reasonable processing time?

VBCurtis 2015-11-20 00:31

[QUOTE=calimero22;416638]Thank you Mini Geek.
I'm sieving the numbers in the form:

k*2^n+1

with k fixed.

K is about 40,000,000
n is from 1,000,000 to 30,000,000

Thank you very much
Giovanni[/QUOTE]

sr1sieve is the fastest sieve-program I know of for that form. sr2sieve is for sieving multiple k at once, sr1sieve is for a single k-value.

calimero22 2015-11-20 07:15

Hi

@ Peii37:
obviously the exponent 30,000,000 is extremely slow. I will work mainly with exponents smaller. I have so many computers.

@ VBCurtis
Thank you very much.
I have already used this program.
La versione 1.4.1 del 2009 è la più recente? Non hanno aggiornato nulla in 6 anni?

Giovanni

pepi37 2015-11-20 07:18

[QUOTE=calimero22;416673]Hi

@ Peii37:
obviously the exponent 30,000,000 is extremely slow. I will work mainly with exponents smaller. I have so many computers.

@ VBCurtis
Thank you very much.
I have already used this program.
La versione 1.4.1 del 2009 è la più recente? Non hanno aggiornato nulla in 6 anni?

Giovanni[/QUOTE]
There is newer one
[URL]http://www.bc-team.org/downloads.php?cat=7[/URL]

calimero22 2015-11-20 07:54

Thank you
Giovanni

calimero22 2015-11-21 08:38

Hi..
I have compiled sr1sieve with Linux: OK !!! It works very very fine.
I have tried to compile it in Windows, with Cygwin, i get errors and it does not create the EXE.
This the output of compilation.
Any help?
Thank you very much.
Giovanni


[CODE]$ make
gcc -O2 -fomit-frame-pointer -ffast-math -march=i686 -m32 -Wall -DUSE_INLINE_MULMOD -DDEFAULT_L1_CACHE_SIZE=16 -DDEFAULT_L2_CACHE_SIZE=256 -DUSE_ASM -DNDEBUG -c -o sr1sieve.o sr1sieve.c
gcc -O2 -fomit-frame-pointer -ffast-math -march=i686 -m32 -Wall -DUSE_INLINE_MULMOD -DDEFAULT_L1_CACHE_SIZE=16 -DDEFAULT_L2_CACHE_SIZE=256 -DUSE_ASM -DNDEBUG -c -o arithmetic.o arithmetic.c
gcc -O2 -fomit-frame-pointer -ffast-math -march=i686 -m32 -Wall -DUSE_INLINE_MULMOD -DDEFAULT_L1_CACHE_SIZE=16 -DDEFAULT_L2_CACHE_SIZE=256 -DUSE_ASM -DNDEBUG -c -o bitmap.o bitmap.c
gcc -O2 -fomit-frame-pointer -ffast-math -march=i686 -m32 -Wall -DUSE_INLINE_MULMOD -DDEFAULT_L1_CACHE_SIZE=16 -DDEFAULT_L2_CACHE_SIZE=256 -DUSE_ASM -DNDEBUG -c -o bsgs.o bsgs.c
bsgs.c: In function ‘baby_steps’:
bsgs.c:53:25: warning: implicit declaration of function ‘_build_hashtable_i386’ [-Wimplicit-function-declaration]
#define build_hashtable _build_hashtable_i386
^
bsgs.c:110:10: note: in expansion of macro ‘build_hashtable’
return build_hashtable(m);
^
gcc -O2 -fomit-frame-pointer -ffast-math -march=i686 -m32 -Wall -DUSE_INLINE_MULMOD -DDEFAULT_L1_CACHE_SIZE=16 -DDEFAULT_L2_CACHE_SIZE=256 -DUSE_ASM -DNDEBUG -c -o choose.o choose.c
gcc -O2 -fomit-frame-pointer -ffast-math -march=i686 -m32 -Wall -DUSE_INLINE_MULMOD -DDEFAULT_L1_CACHE_SIZE=16 -DDEFAULT_L2_CACHE_SIZE=256 -DUSE_ASM -DNDEBUG -c -o clock.o clock.c
clock.c: In function ‘cpu_seconds’:
clock.c:21:7: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
int ret;
^
gcc -O2 -fomit-frame-pointer -ffast-math -march=i686 -m32 -Wall -DUSE_INLINE_MULMOD -DDEFAULT_L1_CACHE_SIZE=16 -DDEFAULT_L2_CACHE_SIZE=256 -DUSE_ASM -DNDEBUG -c -o cpu.o cpu.c
gcc -O2 -fomit-frame-pointer -ffast-math -march=i686 -m32 -Wall -DUSE_INLINE_MULMOD -DDEFAULT_L1_CACHE_SIZE=16 -DDEFAULT_L2_CACHE_SIZE=256 -DUSE_ASM -DNDEBUG -c -o events.o events.c
gcc -O2 -fomit-frame-pointer -ffast-math -march=i686 -m32 -Wall -DUSE_INLINE_MULMOD -DDEFAULT_L1_CACHE_SIZE=16 -DDEFAULT_L2_CACHE_SIZE=256 -DUSE_ASM -DNDEBUG -c -o factors.o factors.c
gcc -O2 -fomit-frame-pointer -ffast-math -march=i686 -m32 -Wall -DUSE_INLINE_MULMOD -DDEFAULT_L1_CACHE_SIZE=16 -DDEFAULT_L2_CACHE_SIZE=256 -DUSE_ASM -DNDEBUG -c -o files.o files.c
gcc -O2 -fomit-frame-pointer -ffast-math -march=i686 -m32 -Wall -DUSE_INLINE_MULMOD -DDEFAULT_L1_CACHE_SIZE=16 -DDEFAULT_L2_CACHE_SIZE=256 -DUSE_ASM -DNDEBUG -c -o hashtable.o hashtable.c
gcc -O2 -fomit-frame-pointer -ffast-math -march=i686 -m32 -Wall -DUSE_INLINE_MULMOD -DDEFAULT_L1_CACHE_SIZE=16 -DDEFAULT_L2_CACHE_SIZE=256 -DUSE_ASM -DNDEBUG -c -o legendre.o legendre.c
gcc -O2 -fomit-frame-pointer -ffast-math -march=i686 -m32 -Wall -DUSE_INLINE_MULMOD -DDEFAULT_L1_CACHE_SIZE=16 -DDEFAULT_L2_CACHE_SIZE=256 -DUSE_ASM -DNDEBUG -c -o primes.o primes.c
gcc -O2 -fomit-frame-pointer -ffast-math -march=i686 -m32 -Wall -DUSE_INLINE_MULMOD -DDEFAULT_L1_CACHE_SIZE=16 -DDEFAULT_L2_CACHE_SIZE=256 -DUSE_ASM -DNDEBUG -c -o priority.o priority.c
priority.c: In function ‘set_cpu_affinity’:
priority.c:92:20: error: ‘CPU_SETSIZE’ undeclared (first use in this function)
if (cpu_number < CPU_SETSIZE)
^
priority.c:92:20: note: each undeclared identifier is reported only once for each function it appears in
priority.c:94:5: error: unknown type name ‘cpu_set_t’
cpu_set_t set;
^
priority.c:96:5: warning: implicit declaration of function ‘CPU_ZERO’ [-Wimplicit-function-declaration]
CPU_ZERO(&set);
^
priority.c:97:5: warning: implicit declaration of function ‘CPU_SET’ [-Wimplicit-function-declaration]
CPU_SET(cpu_number,&set);
^
priority.c:99:5: warning: implicit declaration of function ‘sched_setaffinity’ [-Wimplicit-function-declaration]
sched_setaffinity(getpid(),sizeof(cpu_set_t),&set);
^
priority.c:99:39: error: ‘cpu_set_t’ undeclared (first use in this function)
sched_setaffinity(getpid(),sizeof(cpu_set_t),&set);
^
<incorporato>: set di istruzioni per l'obiettivo "priority.o" non riuscito
make: *** [priority.o] Errore 1[/CODE]

rogue 2015-11-21 14:26

For Windows use mingw instead of cygwin.

ATH 2015-11-21 16:32

Try MSYS2 with Mingw64, it is easier to get started with than the old MSYS: [URL="http://sourceforge.net/projects/msys2/"]http://sourceforge.net/projects/msys2/[/URL]

After installation here is the instructions I use to get started and download make, mingw64, automake, libtool etc:

Start MSYS2 with "msys2_shell.bat" and run these commands to update the packages:
pacman -Sy
pacman -S pacman-mirrors
pacman --needed -S bash pacman msys2-runtime

Restart MSYS2 again using "msys2_shell.bat" and run these:
pacman -Su
pacman -S make
pacman -S autoconf automake libtool
pacman -S mingw-w64-x86_64-gcc

Restart MSYS2 and from now on always start it with: "mingw64_shell.bat"


All times are UTC. The time now is 08:01.

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