mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Conjectures 'R Us (https://www.mersenneforum.org/forumdisplay.php?f=81)
-   -   Testing new Ranges for Sierpinski/Riesel (https://www.mersenneforum.org/showthread.php?t=20357)

lalera 2015-07-20 22:49

i do use sl6.6 (a rhel clone)
gcc is installed
--
gcc *.cpp -lstdc++ -O2 -m64 -o srbsieve
main.cpp:9:21: error: windows.h: No such file or directory
main.cpp: In function ‘void removeTrivial()’:
main.cpp:264: error: expected ‘)’ before ‘PRId64’
main.cpp: In function ‘void removeGFN()’:
main.cpp:321: error: expected ‘)’ before ‘PRId64’
main.cpp: In function ‘void removeMOB()’:
main.cpp:414: error: expected ‘)’ before ‘PRId64’
main.cpp: In function ‘void processNewpgenFile(uint32_t)’:
main.cpp:472: error: expected ‘)’ before ‘PRId64’
main.cpp: In function ‘void doPhase(int)’:
main.cpp:510: error: expected ‘)’ before ‘PRId64’
main.cpp: In function ‘void prp_test_ABC_file()’:
main.cpp:592: warning: deprecated conversion from string constant to ‘char*’
main.cpp: In function ‘void output_remain(char*)’:
main.cpp:701: error: expected ‘)’ before ‘PRId64’
--
it is a windows source i think
i can not modify the code - i am not a programmer

rogue 2015-07-21 00:29

You can delete the #include <windows.h> line. Replace with this:

#define PRId64 "%lld"

lalera 2015-07-21 01:26

[QUOTE=rogue;406213]You can delete the #include <windows.h> line. Replace with this:

#define PRId64 "%lld"[/QUOTE]

i did the changes and i now have a binary but
--
gcc *.cpp -lstdc++ -O2 -m64 -o srbsieve
main.cpp: In function ‘void prp_test_ABC_file()’:
main.cpp:593: warning: deprecated conversion from string constant to ‘char*’
--
./srbsieve
Status (00:00:00): Started with 900001 terms
Status (00:00:00): Removed 450000 terms due to k being odd
Status (00:00:00): Removed 0 terms due to trivial factorization
Status (00:00:00): Removed 115541 terms due to MOB
ERROR: Unrecognised sequence or file `sieve.in'.
Segmentation fault
--

rogue 2015-07-21 12:27

[QUOTE=lalera;406216]i did the changes and i now have a binary but
--
gcc *.cpp -lstdc++ -O2 -m64 -o srbsieve
main.cpp: In function ‘void prp_test_ABC_file()’:
main.cpp:593: warning: deprecated conversion from string constant to ‘char*’
--
./srbsieve
Status (00:00:00): Started with 900001 terms
Status (00:00:00): Removed 450000 terms due to k being odd
Status (00:00:00): Removed 0 terms due to trivial factorization
Status (00:00:00): Removed 115541 terms due to MOB
ERROR: Unrecognised sequence or file `sieve.in'.
Segmentation fault
--[/QUOTE]

That makes no sense. Do you run newpgen first? I stated this in the first post of the thread: "I recommend running newpgen until mink*b^n > 1e20.". Since I don't see any output from that step in the program I suspect you didn't do that step. That being said, did it create a file called "sieve.in"? Can you post your srbsieve.ini file?

lalera 2015-07-21 13:10

[QUOTE=rogue;406231]That makes no sense. Do you run newpgen first? I stated this in the first post of the thread: "I recommend running newpgen until mink*b^n > 1e20.". Since I don't see any output from that step in the program I suspect you didn't do that step. That being said, did it create a file called "sieve.in"? Can you post your srbsieve.ini file?[/QUOTE]
first i did it without newpgen
and now with newpgen
with the srbsieve.ini file
--
base=3
mink=100000
maxk=1000000
c=-1
npgfile=1,1_b3n
npgfile=2,2_b3n
npgfile=3,3_b3n
npgfile=4,4_b3n
npgfile=5,5_b3n
npgfile=6,6_b3n
npgfile=7,7_b3n
npgfile=8,8_b3n
npgfile=9,9_b3n
npgfile=10,10_b3n
npgfile=11,11_b3n
npgfile=12,12_b3n
npgfile=13,13_b3n
npgfile=14,14_b3n
npgfile=15,15_b3n
npgfile=16,16_b3n
npgfile=17,17_b3n
npgfile=18,18_b3n
npgfile=19,19_b3n
npgfile=20,20_b3n
npgfile=21,21_b3n
npgfile=22,22_b3n
npgfile=23,23_b3n
npgfile=24,24_b3n
phase=80,50000,500000
phase=300,30000,3000000
phase=1000,20000,10000000
phase=3000,10000,30000000
phase=9000,5000,100000000
phase=25000,1000,300000000

--
./srbsieve
Status (00:00:00): Started with 900001 terms
Status (00:00:00): Removed 450000 terms due to k being odd
Status (00:00:00): Removed 0 terms due to trivial factorization
Status (00:00:00): Removed 115541 terms due to MOB
Status (00:00:00): Removed 70076 terms from newpgen for n = 1: 264384 remaining
Status (00:00:00): Removed 53017 terms from newpgen for n = 2: 211367 remaining
Status (00:00:00): Removed 41184 terms from newpgen for n = 3: 170183 remaining
Status (00:00:00): Removed 31430 terms from newpgen for n = 4: 138753 remaining
Status (00:00:00): Removed 22932 terms from newpgen for n = 5: 115821 remaining
Status (00:00:00): Removed 18238 terms from newpgen for n = 6: 97583 remaining
Status (00:00:00): Removed 13734 terms from newpgen for n = 7: 83849 remaining
Status (00:00:00): Removed 11894 terms from newpgen for n = 8: 71955 remaining
Status (00:00:00): Removed 9211 terms from newpgen for n = 9: 62744 remaining
Status (00:00:01): Removed 7597 terms from newpgen for n = 10: 55147 remaining
Status (00:00:01): Removed 6469 terms from newpgen for n = 11: 48678 remaining
Status (00:00:01): Removed 5862 terms from newpgen for n = 12: 42816 remaining
Status (00:00:01): Removed 3948 terms from newpgen for n = 13: 38868 remaining
Status (00:00:01): Removed 3621 terms from newpgen for n = 14: 35247 remaining
Status (00:00:01): Removed 3391 terms from newpgen for n = 15: 31856 remaining
Status (00:00:01): Removed 2953 terms from newpgen for n = 16: 28903 remaining
Status (00:00:01): Removed 2328 terms from newpgen for n = 17: 26575 remaining
Status (00:00:01): Removed 2228 terms from newpgen for n = 18: 24347 remaining
Status (00:00:01): Removed 1826 terms from newpgen for n = 19: 22521 remaining
Status (00:00:01): Removed 1712 terms from newpgen for n = 20: 20809 remaining
Status (00:00:01): Removed 1442 terms from newpgen for n = 21: 19367 remaining
Status (00:00:01): Removed 1211 terms from newpgen for n = 22: 18156 remaining
Status (00:00:01): Removed 1204 terms from newpgen for n = 23: 16952 remaining
Status (00:00:01): Removed 1216 terms from newpgen for n = 24: 15736 remaining
ERROR: Unrecognised sequence or file `sieve.in'.
Segmentation fault
--
it did not created a file called sieve.in

rogue 2015-07-21 15:39

Were any other files created in that directory? I don't see how it could have make it that far into the code without having created that file.

Actually there is one possibility, that the ini file wasn't read properly. Try changing the code in getInputs() to this:

if (sscanf(buffer+6, "%d,%d,%d", &phases[phaseCount].maxN, &phases[phaseCount].ksPerFile, &phases[phaseCount].maxP) != 3)
error("Could not process line %s", buffer);

and recompile. Maybe it had problems parsing those lines in the file.

lalera 2015-07-21 16:09

without newpgen it produces 2 files
an empty file called "sr_b.pfgw" and the file "pl_MOB.txt" with the following content
%lld
%lld
%lld
%lld
%lld
... and so on
--
with newpgen it produces the same 2 files as above

and "pl_prime.txt" with the following content
%lld*100006^3+1
%lld*100030^3+1
%lld*100040^3+1
%lld*100046^3+1
%lld*100050^3+1
..
%lld*700786^3+5
%lld*700874^3+5
%lld*701024^3+5
%lld*701030^3+5
%lld*701084^3+5
..
%lld*240368^3+17
%lld*241000^3+17
%lld*241068^3+17
%lld*241124^3+17
%lld*241694^3+17
... and so on

and "pl_remain.txt" with the following content
%lld*100044^n+3
%lld*100246^n+3
%lld*100292^n+3
%lld*100384^n+3
%lld*100408^n+3
... and so on
--
i will try to do the changes of the code

lalera 2015-07-21 16:30

[QUOTE=rogue;406237]Were any other files created in that directory? I don't see how it could have make it that far into the code without having created that file.

Actually there is one possibility, that the ini file wasn't read properly. Try changing the code in getInputs() to this:

if (sscanf(buffer+6, "%d,%d,%d", &phases[phaseCount].maxN, &phases[phaseCount].ksPerFile, &phases[phaseCount].maxP) != 3)
error("Could not process line %s", buffer);

and recompile. Maybe it had problems parsing those lines in the file.[/QUOTE]
please do the codechanges by yourself
i am not able to do

VBCurtis 2015-07-21 17:32

[QUOTE=lalera;406244]please do the codechanges by yourself
i am not able to do[/QUOTE]

Why not? Did you try copy/paste?

lalera 2015-07-21 17:43

[QUOTE=VBCurtis;406246]Why not? Did you try copy/paste?[/QUOTE]

i have not enough know-how
can you do?

rogue 2015-07-21 17:55

1 Attachment(s)
I have attached updated source. I think it should compile on *nix without changes, but if changes are needed let me know.

BTW, which version of gcc do you have? Run "gcc -version" on your command line and paste the output.


All times are UTC. The time now is 09:04.

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