PrimeGrid
Please visit donation page to help the project cover running costs for this month

Toggle Menu

Join PrimeGrid

Returning Participants

Community

Leader Boards

Results

Other

drummers-lowrise

Advanced search

Message boards : Sieving : Cygwin problems @GFN sieving OpenCL app for Windows

Author Message
walli
Send message
Joined: 12 Jun 16
Posts: 8
ID: 449456
Credit: 5,228,201,530
RAC: 660,541
Found 3 primes in the 2020 Tour de Primes321 LLR Turquoise: Earned 5,000,000 credits (5,334,168)Cullen LLR Turquoise: Earned 5,000,000 credits (5,002,299)ESP LLR Amethyst: Earned 1,000,000 credits (1,841,104)Generalized Cullen/Woodall LLR Silver: Earned 100,000 credits (123,484)PPS LLR Turquoise: Earned 5,000,000 credits (9,586,291)SoB LLR Jade: Earned 10,000,000 credits (10,540,541)SR5 LLR Amethyst: Earned 1,000,000 credits (1,735,467)SGS LLR Amethyst: Earned 1,000,000 credits (1,169,227)TRP LLR Amethyst: Earned 1,000,000 credits (1,322,057)Woodall LLR Ruby: Earned 2,000,000 credits (2,144,294)321 Sieve Jade: Earned 10,000,000 credits (13,542,496)Generalized Cullen/Woodall Sieve (suspended) Sapphire: Earned 20,000,000 credits (20,612,684)PPS Sieve Emerald: Earned 50,000,000 credits (53,507,883)Sierpinski (ESP/PSP/SoB) Sieve (suspended) Silver: Earned 100,000 credits (295,388)AP 26/27 Jade: Earned 10,000,000 credits (10,127,715)GFN Sapphire: Earned 20,000,000 credits (37,265,297)PSA Double Turquoise: Earned 5,000,000,000 credits (5,054,047,170)
Message 116480 - Posted: 27 Mar 2018 | 16:02:19 UTC

Hi,

I just noticed that when I use the latest "gfnsvocl_w64_2G.exe" app with the current Cygwin + bash on Windows 10 64 bit (1709), there is a problem with CTRL+C. If you restart the app, despite the checkpoint file, you will find some double entries in the result file:

mcw@dagobert /cygdrive/c/Users/mcw/Desktop/sieve $ ls -al insgesamt 144 drwx------+ 1 mcw Kein 0 18. Mrz 15:35 . drwxrwx---+ 1 mcw Kein 0 18. Mrz 16:09 .. -rwx------+ 1 mcw Kein 137216 15. Jan 20:48 ocl_w64_2G.exe mcw@dagobert /cygdrive/c/Users/mcw/Desktop/sieve $ ./ocl_w64_2G.exe 18 91483 91488 B12 GFNSvCUDA+ v0.7.1 (c) 2015 Anand Nair (anand.s.nair AT gmail) OpenCL port by Roman Trunov (stream AT proxyma ru) GFN Sieve for k^262144+1 [k == 2 to 2000000000] Using factor file 'f18_91483P_91488P.txt' Using checkpoint file 'c18_91483P_91488P.txt' Found OCL platform "AMD Accelerated Parallel Processing" by "Advanced Micro Devices, Inc." GPU devices on platform: 0 Found OCL platform "NVIDIA CUDA" by "NVIDIA Corporation" GPU devices on platform: 1 Found OCL platform "Intel(R) OpenCL" by "Intel(R) Corporation" GPU devices on platform: 1 D0: "GeForce GTX 970" D1: "Intel(R) HD Graphics 610" Using 79 bit core. 91483000763856715777 | 821639908^262144+1 91483012664942657537 | 1181562520^262144+1 91483017290328309761 | 1327778384^262144+1 91483017741184008193 | 1725107092^262144+1 91483016963236036609 87381.3/s (91.0P/day) Found 2 ETA 1h18m


<- CTRL+C pressed

mcw@dagobert /cygdrive/c/Users/mcw/Desktop/sieve $ ls -al insgesamt 146 drwx------+ 1 mcw Kein 0 27. Mrz 16:46 . drwxrwx---+ 1 mcw Kein 0 18. Mrz 16:09 .. -rwx------+ 1 mcw Kein 15 27. Mrz 16:46 c18_91483P_91488P.txt -rwx------+ 1 mcw Kein 226 27. Mrz 16:46 f18_91483P_91488P.txt -rwx------+ 1 mcw Kein 137216 15. Jan 20:48 ocl_w64_2G.exe mcw@dagobert /cygdrive/c/Users/mcw/Desktop/sieve $ cat c18_91483P_91488P.txt 174489975727905 mcw@dagobert /cygdrive/c/Users/mcw/Desktop/sieve $ ./ocl_w64_2G.exe 18 91483 91488 B12 GFNSvCUDA+ v0.7.1 (c) 2015 Anand Nair (anand.s.nair AT gmail) OpenCL port by Roman Trunov (stream AT proxyma ru) GFN Sieve for k^262144+1 [k == 2 to 2000000000] Using factor file 'f18_91483P_91488P.txt' Using checkpoint file 'c18_91483P_91488P.txt' Resuming from checkpoint value 91483000394431856641 Found OCL platform "AMD Accelerated Parallel Processing" by "Advanced Micro Devices, Inc." GPU devices on platform: 0 Found OCL platform "NVIDIA CUDA" by "NVIDIA Corporation" GPU devices on platform: 1 Found OCL platform "Intel(R) OpenCL" by "Intel(R) Corporation" GPU devices on platform: 1 D0: "GeForce GTX 970" D1: "Intel(R) HD Graphics 610" Using 79 bit core. 91483000763856715777 | 821639908^262144+1 91483012664942657537 | 1181562520^262144+1 91483017290328309761 | 1327778384^262144+1 91483017741184008193 | 1725107092^262144+1 91483017359941697537 87797.6/s (91.4P/day) Found 3 ETA 1h18m


<- CTRL+C pressed

mcw@dagobert /cygdrive/c/Users/mcw/Desktop/sieve $ ls -al insgesamt 146 drwx------+ 1 mcw Kein 0 27. Mrz 16:46 . drwxrwx---+ 1 mcw Kein 0 18. Mrz 16:09 .. -rwx------+ 1 mcw Kein 15 27. Mrz 16:47 c18_91483P_91488P.txt -rwx------+ 1 mcw Kein 401 27. Mrz 16:47 f18_91483P_91488P.txt -rwx------+ 1 mcw Kein 137216 15. Jan 20:48 ocl_w64_2G.exe


And now you see the double entries:

mcw@dagobert /cygdrive/c/Users/mcw/Desktop/sieve $ cat f18_91483P_91488P.txt GFN Sieve for k^262144+1 [k == 2 to 2000000000] 91483000763856715777 | 821639908^262144+1 91483012664942657537 | 1181562520^262144+1 91483017290328309761 | 1327778384^262144+1 91483017741184008193 | 1725107092^262144+1 91483000763856715777 | 821639908^262144+1 91483012664942657537 | 1181562520^262144+1 91483017290328309761 | 1327778384^262144+1 91483017741184008193 | 1725107092^262144+1 mcw@dagobert /cygdrive/c/Users/mcw/Desktop/sieve $


This behaviour does not occur when I use CMD.EXE:

C:\Users\mcw\Desktop\sieve>dir Volume in Laufwerk C: hat keine Bezeichnung. Volumeseriennummer: 645D-122D Verzeichnis von C:\Users\mcw\Desktop\sieve 27.03.2018 17:01 <DIR> . 27.03.2018 17:01 <DIR> .. 15.01.2018 21:48 137.216 ocl_w64_2G.exe 1 Datei(en), 137.216 Bytes 2 Verzeichnis(se), 145.678.970.880 Bytes frei C:\Users\mcw\Desktop\sieve>ocl_w64_2G.exe 18 91483 91488 B12 GFNSvCUDA+ v0.7.1 (c) 2015 Anand Nair (anand.s.nair AT gmail) OpenCL port by Roman Trunov (stream AT proxyma ru) GFN Sieve for k^262144+1 [k == 2 to 2000000000] Using factor file 'f18_91483P_91488P.txt' Using checkpoint file 'c18_91483P_91488P.txt' Found OCL platform "AMD Accelerated Parallel Processing" by "Advanced Micro Devices, Inc." GPU devices on platform: 0 Found OCL platform "NVIDIA CUDA" by "NVIDIA Corporation" GPU devices on platform: 1 Found OCL platform "Intel(R) OpenCL" by "Intel(R) Corporation" GPU devices on platform: 1 D0: "GeForce GTX 970" D1: "Intel(R) HD Graphics 610" Using 79 bit core. 91483000763856715777 | 821639908^262144+1 91483012664942657537 | 1181562520^262144+1 91483017290328309761 | 1327778384^262144+1 91483017741184008193 | 1725107092^262144+1 91483034910712135681 | 35354860^262144+1 91483038856307015681 | 1656806252^262144+1 91483039862987161601 87381.3/s (91.0P/day) Found 6 ETA 1h18m Termination requested 91483043018746888193 87381.3/s (91.0P/day) Found 6 ETA 1h18m


<- CTRL+C pressed

C:\Users\mcw\Desktop\sieve>dir Volume in Laufwerk C: hat keine Bezeichnung. Volumeseriennummer: 645D-122D Verzeichnis von C:\Users\mcw\Desktop\sieve 27.03.2018 17:02 <DIR> . 27.03.2018 17:02 <DIR> .. 27.03.2018 17:03 15 c18_91483P_91488P.txt 27.03.2018 17:02 312 f18_91483P_91488P.txt 15.01.2018 21:48 137.216 ocl_w64_2G.exe 3 Datei(en), 137.543 Bytes 2 Verzeichnis(se), 145.679.269.888 Bytes frei C:\Users\mcw\Desktop\sieve>type c18_91483P_91488P.txt 174490057027335 C:\Users\mcw\Desktop\sieve>type f18_91483P_91488P.txt GFN Sieve for k^262144+1 [k == 2 to 2000000000] 91483000763856715777 | 821639908^262144+1 91483012664942657537 | 1181562520^262144+1 91483017290328309761 | 1327778384^262144+1 91483017741184008193 | 1725107092^262144+1 91483034910712135681 | 35354860^262144+1 91483038856307015681 | 1656806252^262144+1 C:\Users\mcw\Desktop\sieve>ocl_w64_2G.exe 18 91483 91488 B12 GFNSvCUDA+ v0.7.1 (c) 2015 Anand Nair (anand.s.nair AT gmail) OpenCL port by Roman Trunov (stream AT proxyma ru) GFN Sieve for k^262144+1 [k == 2 to 2000000000] Using factor file 'f18_91483P_91488P.txt' Using checkpoint file 'c18_91483P_91488P.txt' Resuming from checkpoint value 91483043018747412481 Found OCL platform "AMD Accelerated Parallel Processing" by "Advanced Micro Devices, Inc." GPU devices on platform: 0 Found OCL platform "NVIDIA CUDA" by "NVIDIA Corporation" GPU devices on platform: 1 Found OCL platform "Intel(R) OpenCL" by "Intel(R) Corporation" GPU devices on platform: 1 D0: "GeForce GTX 970" D1: "Intel(R) HD Graphics 610" Using 79 bit core. 91483046085517639681 | 1101324452^262144+1 91483048858065829889 | 1230460700^262144+1 91483050224393912321 | 1493028414^262144+1 91483055143844315137 | 1769064358^262144+1 91483058338980167681 | 477873178^262144+1 91483056042833084417 86946.6/s (90.5P/day) Found 4 ETA 1h18m Termination requested


<- CTRL+C pressed

C:\Users\mcw\Desktop\sieve>type f18_91483P_91488P.txt GFN Sieve for k^262144+1 [k == 2 to 2000000000] 91483000763856715777 | 821639908^262144+1 91483012664942657537 | 1181562520^262144+1 91483017290328309761 | 1327778384^262144+1 91483017741184008193 | 1725107092^262144+1 91483034910712135681 | 35354860^262144+1 91483038856307015681 | 1656806252^262144+1 91483046085517639681 | 1101324452^262144+1 91483048858065829889 | 1230460700^262144+1 91483050224393912321 | 1493028414^262144+1 91483055143844315137 | 1769064358^262144+1 91483058338980167681 | 477873178^262144+1 C:\Users\mcw\Desktop\sieve>ocl_w64_2G.exe 18 91483 91488 B12 GFNSvCUDA+ v0.7.1 (c) 2015 Anand Nair (anand.s.nair AT gmail) OpenCL port by Roman Trunov (stream AT proxyma ru) GFN Sieve for k^262144+1 [k == 2 to 2000000000] Using factor file 'f18_91483P_91488P.txt' Using checkpoint file 'c18_91483P_91488P.txt' Resuming from checkpoint value 91483058805401452545 Found OCL platform "AMD Accelerated Parallel Processing" by "Advanced Micro Devices, Inc." GPU devices on platform: 0 Found OCL platform "NVIDIA CUDA" by "NVIDIA Corporation" GPU devices on platform: 1 Found OCL platform "Intel(R) OpenCL" by "Intel(R) Corporation" GPU devices on platform: 1 D0: "GeForce GTX 970" D1: "Intel(R) HD Graphics 610" Using 79 bit core. 91483064750573617153 | 1356201550^262144+1 91483082985882255361 | 1498244334^262144+1 91483084423112949761 | 479758486^262144+1 91483084930536701953 | 1780915770^262144+1 91483084871849476097 86487.6/s (90.0P/day) Found 3 ETA 1h18m Termination requested


<- CTRL+C pressed

C:\Users\mcw\Desktop\sieve>ocl_w64_2G.exe 18 91483 91488 B12 GFNSvCUDA+ v0.7.1 (c) 2015 Anand Nair (anand.s.nair AT gmail) OpenCL port by Roman Trunov (stream AT proxyma ru) GFN Sieve for k^262144+1 [k == 2 to 2000000000] Using factor file 'f18_91483P_91488P.txt' Using checkpoint file 'c18_91483P_91488P.txt' Resuming from checkpoint value 91483087626457579521 Found OCL platform "AMD Accelerated Parallel Processing" by "Advanced Micro Devices, Inc." GPU devices on platform: 0 Found OCL platform "NVIDIA CUDA" by "NVIDIA Corporation" GPU devices on platform: 1 Found OCL platform "Intel(R) OpenCL" by "Intel(R) Corporation" GPU devices on platform: 1 D0: "GeForce GTX 970" D1: "Intel(R) HD Graphics 610" Using 79 bit core. 91483088936013660161 | 1326652510^262144+1 91483089472017399809 | 1277599416^262144+1 91483091176579399681 86917.8/s (90.5P/day) Found 2 ETA 1h18m Termination requested


<- CTRL+C pressed

C:\Users\mcw\Desktop\sieve>ocl_w64_2G.exe 18 91483 91488 B12 GFNSvCUDA+ v0.7.1 (c) 2015 Anand Nair (anand.s.nair AT gmail) OpenCL port by Roman Trunov (stream AT proxyma ru) GFN Sieve for k^262144+1 [k == 2 to 2000000000] Using factor file 'f18_91483P_91488P.txt' Using checkpoint file 'c18_91483P_91488P.txt' Resuming from checkpoint value 91483091569822138369 Found OCL platform "AMD Accelerated Parallel Processing" by "Advanced Micro Devices, Inc." GPU devices on platform: 0 Found OCL platform "NVIDIA CUDA" by "NVIDIA Corporation" GPU devices on platform: 1 Found OCL platform "Intel(R) OpenCL" by "Intel(R) Corporation" GPU devices on platform: 1 D0: "GeForce GTX 970" D1: "Intel(R) HD Graphics 610" Using 79 bit core. 91483094216605696001 | 1263954208^262144+1 91483097949873897473 | 1676786212^262144+1 91483097973808168961 | 141132714^262144+1 91483098276698259457 86487.6/s (90.0P/day) Found 3 ETA 1h18m Termination requested


<- CTRL+C pressed

C:\Users\mcw\Desktop\sieve>type f18_91483P_91488P.txt GFN Sieve for k^262144+1 [k == 2 to 2000000000] 91483000763856715777 | 821639908^262144+1 91483012664942657537 | 1181562520^262144+1 91483017290328309761 | 1327778384^262144+1 91483017741184008193 | 1725107092^262144+1 91483034910712135681 | 35354860^262144+1 91483038856307015681 | 1656806252^262144+1 91483046085517639681 | 1101324452^262144+1 91483048858065829889 | 1230460700^262144+1 91483050224393912321 | 1493028414^262144+1 91483055143844315137 | 1769064358^262144+1 91483058338980167681 | 477873178^262144+1 91483064750573617153 | 1356201550^262144+1 91483082985882255361 | 1498244334^262144+1 91483084423112949761 | 479758486^262144+1 91483084930536701953 | 1780915770^262144+1 91483088936013660161 | 1326652510^262144+1 91483089472017399809 | 1277599416^262144+1 91483094216605696001 | 1263954208^262144+1 91483097949873897473 | 1676786212^262144+1 91483097973808168961 | 141132714^262144+1 C:\Users\mcw\Desktop\sieve>


As you can see, there are no multiple occurrences of any found factor.

Maybe a cache problem or a different signal handling... I didn't investigate this.

I hope that JimB sorts out the entries with some kind of UNIQUE statement/mechanism before or when pushing the results into the database... just wanted to let you know :-).

//walli

JimBProject donor
Honorary cruncher
Send message
Joined: 4 Aug 11
Posts: 912
ID: 107307
Credit: 974,074,244
RAC: 85,572
Discovered 1 mega prime321 LLR Ruby: Earned 2,000,000 credits (2,671,514)Cullen LLR Turquoise: Earned 5,000,000 credits (5,031,868)ESP LLR Turquoise: Earned 5,000,000 credits (5,064,082)Generalized Cullen/Woodall LLR Turquoise: Earned 5,000,000 credits (5,038,750)PPS LLR Turquoise: Earned 5,000,000 credits (5,000,220)PSP LLR Turquoise: Earned 5,000,000 credits (7,639,762)SoB LLR Sapphire: Earned 20,000,000 credits (42,604,648)SR5 LLR Jade: Earned 10,000,000 credits (11,829,173)SGS LLR Ruby: Earned 2,000,000 credits (2,070,105)TRP LLR Ruby: Earned 2,000,000 credits (2,291,092)Woodall LLR Turquoise: Earned 5,000,000 credits (5,046,412)321 Sieve Jade: Earned 10,000,000 credits (10,032,608)Cullen/Woodall Sieve (suspended) Ruby: Earned 2,000,000 credits (4,002,919)Generalized Cullen/Woodall Sieve (suspended) Sapphire: Earned 20,000,000 credits (20,005,451)PPS Sieve Emerald: Earned 50,000,000 credits (52,042,965)Sierpinski (ESP/PSP/SoB) Sieve (suspended) Ruby: Earned 2,000,000 credits (2,341,676)TRP Sieve (suspended) Ruby: Earned 2,000,000 credits (2,070,804)AP 26/27 Jade: Earned 10,000,000 credits (10,742,251)GFN Emerald: Earned 50,000,000 credits (50,000,251)PSA Double Gold: Earned 500,000,000 credits (728,547,693)
Message 116494 - Posted: 27 Mar 2018 | 20:41:36 UTC

In real life, duplicate factors are fine. Lots of factors found try to remove candidates that were already removed by earlier sieving. But so that my stats are accurate, all duplicates are eliminated as the first step. The first script I run sorts the file from smallest to largest factor, removes duplicates and then checks that every factor really does divide the candidate on the same line. It takes about ten seconds for a 400P GFN22 sieve - quite fast.

A later script checks the start and end line and then looks for gaps between lines of sieving - it obviously needs a sorted file. I took over handling GFN sieving several years ago when I had no problem spending days on getting my scripts just right.

stream
Volunteer moderator
Project administrator
Volunteer developer
Volunteer tester
Send message
Joined: 1 Mar 14
Posts: 629
ID: 301928
Credit: 462,241,536
RAC: 176,420
Discovered 1 mega primeFound 1 prime in the 2018 Tour de PrimesFound 1 prime in the 2019 Tour de PrimesFound 1 prime in the 2020 Tour de Primes321 LLR Turquoise: Earned 5,000,000 credits (9,919,609)Cullen LLR Turquoise: Earned 5,000,000 credits (9,934,320)ESP LLR Turquoise: Earned 5,000,000 credits (9,909,084)Generalized Cullen/Woodall LLR Turquoise: Earned 5,000,000 credits (6,741,830)PPS LLR Jade: Earned 10,000,000 credits (11,055,307)PSP LLR Turquoise: Earned 5,000,000 credits (5,089,560)SoB LLR Turquoise: Earned 5,000,000 credits (5,824,522)SR5 LLR Turquoise: Earned 5,000,000 credits (9,899,569)SGS LLR Turquoise: Earned 5,000,000 credits (5,450,591)TRP LLR Turquoise: Earned 5,000,000 credits (9,911,706)Woodall LLR Turquoise: Earned 5,000,000 credits (5,011,851)321 Sieve Sapphire: Earned 20,000,000 credits (20,004,228)Generalized Cullen/Woodall Sieve (suspended) Sapphire: Earned 20,000,000 credits (20,047,667)PPS Sieve Sapphire: Earned 20,000,000 credits (20,866,490)Sierpinski (ESP/PSP/SoB) Sieve (suspended) Sapphire: Earned 20,000,000 credits (20,043,271)TRP Sieve (suspended) Sapphire: Earned 20,000,000 credits (20,015,177)AP 26/27 Sapphire: Earned 20,000,000 credits (20,045,194)GFN Emerald: Earned 50,000,000 credits (52,170,119)PSA Double Silver: Earned 200,000,000 credits (200,301,443)
Message 116507 - Posted: 28 Mar 2018 | 6:02:51 UTC

I've seen different oddities with Ctrl-C and other signal handling in Cygwin for years. Finally, I came to conclusion that thou shalt not run native WinAPI programs under Cygwin. It's only for CygWin programs which use same CygWin runtime DLL and could communicate with each other using CygWin's proprietary methods.

I see no "Termination requested" line under Cygwin output - look like app was silently killed by CygWin without any chance to execute Ctrl-C handler. App was restarted from an old checkpoint file which is automatically written every minute. And, as Jim already replied, small number of dupes between restarts is not a problem at all, they're removed automatically on server side. Users could "terminate process", checkpoint file could be corrupted after occasional crash or reboot, etc. All these real life events could lead to small amount of dupes.

Message boards : Sieving : Cygwin problems @GFN sieving OpenCL app for Windows

[Return to PrimeGrid main page]
DNS Powered by DNSEXIT.COM
Copyright © 2005 - 2020 Rytis Slatkevičius (contact) and PrimeGrid community. Server load 1.88, 3.22, 3.82
Generated 7 Apr 2020 | 16:59:51 UTC