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-21 18:09

gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

rogue 2015-07-21 18:21

[QUOTE=lalera;406251]gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.[/QUOTE]

I might need to make a change to the code. Once you build and run, show the first few lines of pl_MOB.txt so that I know if it output the k correctly.

lalera 2015-07-21 18:41

and now with the new source

gcc *.cpp -lstdc++ -O2 -m64 -o srbsieve
main.cpp: In function ‘void removeTrivial()’:
main.cpp:271: error: expected ‘)’ before ‘PRId64’
main.cpp: In function ‘void removeGFN()’:
main.cpp:328: error: expected ‘)’ before ‘PRId64’
main.cpp: In function ‘void removeMOB()’:
main.cpp:421: error: expected ‘)’ before ‘PRId64’
main.cpp: In function ‘void processNewpgenFile(uint32_t)’:
main.cpp:479: error: expected ‘)’ before ‘PRId64’
main.cpp: In function ‘void doPhase(int)’:
main.cpp:517: error: expected ‘)’ before ‘PRId64’
main.cpp: In function ‘void prp_test_ABC_file()’:
main.cpp:599: warning: deprecated conversion from string constant to ‘char*’
main.cpp: In function ‘void output_remain(char*)’:
main.cpp:708: error: expected ‘)’ before ‘PRId64’

this produced no binary
--
and with the modification
#define PRId64 "%lld"
as a test

gcc *.cpp -lstdc++ -O2 -m64 -o srbsieve
main.cpp: In function ‘void prp_test_ABC_file()’:
main.cpp:599: warning: deprecated conversion from string constant to ‘char*’

srbsieve produced the same output-files as before

rogue 2015-07-21 19:51

Solving your problem would require someone to use a debugger.

lalera 2015-07-21 20:07

[QUOTE=rogue;406263]Solving your problem would require someone to use a debugger.[/QUOTE]

i can not do this - unfortunately

rogue 2015-07-22 01:16

Runs on my Mac without a problem.

Batalov 2015-07-22 02:36

I found a problem for trivial removals for Sierp (c=+1) conjectures.
I debugged on S256 (maxk = 1220), for which I know that four k should survive, of which now only one is standing (k=831).

minK, maxK and k and uint64, so if minK = 1, then k will be computed as 0, then k -=1 will make it INT_MAX and no removals will happen. Suggested patch:
[CODE]***************
*** 252,263 ****
--- 253,268 ----

if (c == -1)
k += 1;
[COLOR="Blue"]+ else if (k == 0)
+ k = factors[f] - 1;[/COLOR]
else
k -= 1;

while (k < minK)
k += factors[f];

// Remove all odd k because k*b^n+c will always be even
for ( ; k <= maxK; k += factors[f])
{
[/CODE]
Result: [CODE]Status (00:00:00): Started with 1221 terms
Status (00:00:00): Removed 608 terms due to trivial factorization[/CODE]

Batalov 2015-07-22 02:44

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

#define PRId64 "[COLOR="DarkRed"]%[/COLOR]lld"[/QUOTE]
[COLOR="Blue"]#define PRId64 "lld"[/COLOR]

"%" is already provided in every printf statement.

That solves the compilation problem on linux.

pepi37 2015-07-22 07:40

It looks like new srbsieve V5 is coming soon :)
And will remove composite from pl.remain :)

rogue 2015-07-22 11:22

1 Attachment(s)
Thanks Serge! Updated source and exe attached. The change for the PRId64 was removed because I can include inttypes.h on non-Windows environments.

pepi37 2015-07-22 14:38

:tu: for great tool Rogue!


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

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