mersenneforum.org  

Go Back   mersenneforum.org > Prime Search Projects > Conjectures 'R Us

Reply
 
Thread Tools
Old 2015-07-20, 22:49   #56
lalera
 
lalera's Avatar
 
Jul 2003

10011000112 Posts
Default

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
lalera is offline   Reply With Quote
Old 2015-07-21, 00:29   #57
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

635210 Posts
Default

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

#define PRId64 "%lld"
rogue is offline   Reply With Quote
Old 2015-07-21, 01:26   #58
lalera
 
lalera's Avatar
 
Jul 2003

11438 Posts
Default

Quote:
Originally Posted by rogue View Post
You can delete the #include <windows.h> line. Replace with this:

#define PRId64 "%lld"
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
--
lalera is offline   Reply With Quote
Old 2015-07-21, 12:27   #59
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

24×397 Posts
Default

Quote:
Originally Posted by lalera View Post
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
--
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?
rogue is offline   Reply With Quote
Old 2015-07-21, 13:10   #60
lalera
 
lalera's Avatar
 
Jul 2003

10011000112 Posts
Default

Quote:
Originally Posted by rogue View Post
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?
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

Last fiddled with by lalera on 2015-07-21 at 13:18
lalera is offline   Reply With Quote
Old 2015-07-21, 15:39   #61
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

143208 Posts
Default

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.

Last fiddled with by rogue on 2015-07-21 at 15:50
rogue is offline   Reply With Quote
Old 2015-07-21, 16:09   #62
lalera
 
lalera's Avatar
 
Jul 2003

13·47 Posts
Default

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 is offline   Reply With Quote
Old 2015-07-21, 16:30   #63
lalera
 
lalera's Avatar
 
Jul 2003

13·47 Posts
Default

Quote:
Originally Posted by rogue View Post
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.
please do the codechanges by yourself
i am not able to do
lalera is offline   Reply With Quote
Old 2015-07-21, 17:32   #64
VBCurtis
 
VBCurtis's Avatar
 
"Curtis"
Feb 2005
Riverside, CA

28×19 Posts
Default

Quote:
Originally Posted by lalera View Post
please do the codechanges by yourself
i am not able to do
Why not? Did you try copy/paste?
VBCurtis is offline   Reply With Quote
Old 2015-07-21, 17:43   #65
lalera
 
lalera's Avatar
 
Jul 2003

13×47 Posts
Default

Quote:
Originally Posted by VBCurtis View Post
Why not? Did you try copy/paste?
i have not enough know-how
can you do?
lalera is offline   Reply With Quote
Old 2015-07-21, 17:55   #66
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

24·397 Posts
Default

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.
Attached Files
File Type: 7z src.7z (7.8 KB, 96 views)
rogue is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Very Prime Riesel and Sierpinski k robert44444uk Open Projects 587 2016-11-13 15:26
Sierpinski/ Riesel bases 6 to 18 robert44444uk Conjectures 'R Us 139 2007-12-17 05:17
Sierpinski/Riesel Base 10 rogue Conjectures 'R Us 11 2007-12-17 05:08
Sierpinski / Riesel - Base 23 michaf Conjectures 'R Us 2 2007-12-17 05:04
Sierpinski / Riesel - Base 22 michaf Conjectures 'R Us 49 2007-12-17 05:03

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


Tue Jul 27 09:16:02 UTC 2021 up 4 days, 3:45, 0 users, load averages: 1.42, 1.66, 1.61

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, 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.