![]() |
|
|
#56 |
|
Jul 2003
26316 Posts |
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 |
|
|
|
|
|
#57 |
|
"Mark"
Apr 2003
Between here and the
24×397 Posts |
You can delete the #include <windows.h> line. Replace with this:
#define PRId64 "%lld" |
|
|
|
|
|
#58 | |
|
Jul 2003
13×47 Posts |
Quote:
-- 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 -- |
|
|
|
|
|
|
#59 | |
|
"Mark"
Apr 2003
Between here and the
24×397 Posts |
Quote:
|
|
|
|
|
|
|
#60 | |
|
Jul 2003
13·47 Posts |
Quote:
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 |
|
|
|
|
|
|
#61 |
|
"Mark"
Apr 2003
Between here and the
24×397 Posts |
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 |
|
|
|
|
|
#62 |
|
Jul 2003
13×47 Posts |
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 |
|
|
|
|
|
#63 | |
|
Jul 2003
13·47 Posts |
Quote:
i am not able to do |
|
|
|
|
|
|
#64 |
|
"Curtis"
Feb 2005
Riverside, CA
28·19 Posts |
|
|
|
|
|
|
#65 |
|
Jul 2003
13×47 Posts |
|
|
|
|
|
|
#66 |
|
"Mark"
Apr 2003
Between here and the
24×397 Posts |
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. |
|
|
|
![]() |
| 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 |