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

Advanced search

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

Author Message
walliProject donor
Volunteer moderator
Project administrator
Send message
Joined: 12 Jun 16
Posts: 11
ID: 449456
Credit: 6,991,525,126
RAC: 1,535,489
Discovered 6 mega primesFound 3 primes in the 2020 Tour de PrimesFound 2 primes in the 2022 Tour de PrimesFound 6 primes in the 2023 Tour de PrimesFound 4 mega primes in the 2023 Tour de PrimesFound 1 prime in the 2023 Tour de Primes Mountain StageFound 1 mega prime  in the 2023 Tour de Primes Mountain Stage321 LLR Turquoise: Earned 5,000,000 credits (5,334,168)Cullen LLR Turquoise: Earned 5,000,000 credits (5,002,299)ESP LLR Turquoise: Earned 5,000,000 credits (6,178,672)Generalized Cullen/Woodall LLR Turquoise: Earned 5,000,000 credits (5,178,836)PPS LLR Emerald: Earned 50,000,000 credits (54,698,107)PSP LLR Jade: Earned 10,000,000 credits (10,615,852)SoB LLR Jade: Earned 10,000,000 credits (10,672,612)SR5 LLR Turquoise: Earned 5,000,000 credits (5,212,812)SGS LLR Turquoise: Earned 5,000,000 credits (6,067,101)TRP LLR Jade: Earned 10,000,000 credits (10,645,389)Woodall LLR Ruby: Earned 2,000,000 credits (2,144,294)321 Sieve (suspended) Emerald: Earned 50,000,000 credits (60,861,644)Cullen/Woodall Sieve Jade: Earned 10,000,000 credits (10,664,838)Generalized Cullen/Woodall Sieve (suspended) Sapphire: Earned 20,000,000 credits (20,612,684)PPS Sieve Double Gold: Earned 500,000,000 credits (511,535,766)Sierpinski (ESP/PSP/SoB) Sieve (suspended) Silver: Earned 100,000 credits (295,388)AP 26/27 Double Bronze: Earned 100,000,000 credits (148,576,207)GFN Double Gold: Earned 500,000,000 credits (559,416,624)WW (retired) Double Gold: Earned 500,000,000 credits (503,776,000)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: 920
ID: 107307
Credit: 989,244,239
RAC: 221,347
Discovered 1 mega prime321 LLR Turquoise: Earned 5,000,000 credits (5,009,915)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,461)PSP LLR Turquoise: Earned 5,000,000 credits (7,674,374)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,848,858)TRP LLR Ruby: Earned 2,000,000 credits (4,376,859)Woodall LLR Turquoise: Earned 5,000,000 credits (5,046,412)321 Sieve (suspended) Jade: Earned 10,000,000 credits (10,057,614)Cullen/Woodall Sieve Jade: Earned 10,000,000 credits (11,209,718)Generalized Cullen/Woodall Sieve (suspended) Sapphire: Earned 20,000,000 credits (20,005,451)PPS Sieve Emerald: Earned 50,000,000 credits (52,049,707)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,005,964)WW (retired) Ruby: Earned 2,000,000 credits (2,688,000)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: 1033
ID: 301928
Credit: 543,608,970
RAC: 7,830
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 PrimesFound 1 prime in the 2021 Tour de Primes321 LLR Jade: Earned 10,000,000 credits (10,011,570)Cullen LLR Jade: Earned 10,000,000 credits (10,009,374)ESP LLR Jade: Earned 10,000,000 credits (10,009,221)Generalized Cullen/Woodall LLR Jade: Earned 10,000,000 credits (10,012,217)PPS LLR Jade: Earned 10,000,000 credits (16,337,846)PSP LLR Jade: Earned 10,000,000 credits (10,044,081)SoB LLR Jade: Earned 10,000,000 credits (10,064,750)SR5 LLR Jade: Earned 10,000,000 credits (10,002,051)SGS LLR Jade: Earned 10,000,000 credits (10,001,295)TRP LLR Jade: Earned 10,000,000 credits (10,002,411)Woodall LLR Jade: Earned 10,000,000 credits (10,013,921)321 Sieve (suspended) Sapphire: Earned 20,000,000 credits (20,004,228)Cullen/Woodall Sieve Silver: Earned 100,000 credits (405,478)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 (55,355,287)WW (retired) Emerald: Earned 50,000,000 credits (50,016,000)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 - 2023 Rytis Slatkevičius (contact) and PrimeGrid community. Server load 1.66, 1.52, 1.35
Generated 1 Jun 2023 | 14:53:51 UTC