preda / gpuowl

GPU Mersenne primality test.
GNU General Public License v3.0
127 stars 35 forks source link

Trial Factoring with gpuOwl #230

Closed valeriob01 closed 3 years ago

valeriob01 commented 3 years ago

For everybody to know: the old TF branch of gpuOwl currently works under the following conditions:

However the results can't be submitted to Primenet:

Found 2 lines to process.
Done processing:
* Parsed 1 lines.
* Found 0 datestamps.
    GHz-days
Qty     Work    Submitted   Accepted    Average
0   - all -     0.000       

    Did not understand 1 lines.
    Recognized, but ignored 0/0 of the remaining lines.
    Skipped 0 lines already in the database.
    Accepted 0 lines.

These lines were unknown:

{"exponent":"333730849", "worktype":"TF", "status":"NF", "program":{"name":"gpuowl", "version":"4.7-5b01b65-mod"}, "timestamp":"2021-06-05 08:14:07 UTC", "aid":"715A1D17BA9C63A6CCC66D09A3D3790B""bitlo":76, "bithi":77, "begink":"113201797068360", "endk":"226403807589960", "rangecomplete":true}

Problems in the result line:

  1. Lacks username;
  2. Lacks a comma before bitlo;
  3. Datestamp not found;
  4. GHz-days not found.
preda commented 3 years ago

Two questions:

  1. does it find factors?
  2. with a competitive speed, to be worth it?
valeriob01 commented 3 years ago

Two questions:

1. does it find factors?

I would need an already factored exponent that is known to have factors to test...

2. with a competitive speed, to be worth it?

absolutely, it is very fast, faster than my RX Vega 64.

and I have tested running both PRP and TF on the same GPU at the same time and there was very little performance dropdown !

valeriob01 commented 3 years ago

I found an exponent to test which is known to have factors because I have already computed it:

will post the result here.

valeriob01 commented 3 years ago

I found an exponent to test which is known to have factors because I have already computed it:

* Exponent: 199999673

* Bitlevel: 74-75

* Factor: Factor: 20677946129698001050849

will post the result here.

2021-06-05 18:29:46 {"exponent":"199999673", "worktype":"TF", "status":"F", "program":{"name":"gpuowl", "version":"4.7-5b01b65-mod"}, "timestamp":"2021-06-05 16:29:46 UTC", "aid":"715A1D17BA9C63A6CCC66D09A3D3790B""bitlo":74, "bithi":75, "begink":"47223742025460", "endk":"94456847945460", "rangecomplete":false, "factors":["51694949845488"]}
2021-06-05 18:29:46 Bye
valeriob01 commented 3 years ago

I found an exponent to test which is known to have factors because I have already computed it:

* Exponent: 199999673

* Bitlevel: 74-75

* Factor: Factor: 20677946129698001050849

will post the result here.

2021-06-05 18:29:46 {"exponent":"199999673", "worktype":"TF", "status":"F", "program":{"name":"gpuowl", "version":"4.7-5b01b65-mod"}, "timestamp":"2021-06-05 16:29:46 UTC", "aid":"715A1D17BA9C63A6CCC66D09A3D3790B""bitlo":74, "bithi":75, "begink":"47223742025460", "endk":"94456847945460", "rangecomplete":false, "factors":["51694949845488"]}
2021-06-05 18:29:46 Bye

That is another factor, what it means?

preda commented 3 years ago

Have a look here: https://www.mersenne.ca/exponent/199999673 the factors are of the form 2 k \exponent -1, and what is reported above is the "k" for the factor. Can easily be changed between the two.

valeriob01 commented 3 years ago

Have a look here: https://www.mersenne.ca/exponent/199999673 the factors are of the form 2 k exponent -1, and what is reported above is the "k" for the factor. Can easily be changed between the two.

So the program is working, it only needs adapting the result line so that Primenet accepts it...

valeriob01 commented 3 years ago

Have a look here: https://www.mersenne.ca/exponent/199999673 the factors are of the form 2 k exponent -1, and what is reported above is the "k" for the factor. Can easily be changed between the two.

So the program is working, it only needs adapting the result line so that Primenet accepts it...

Ok, and also primenet.py needs the TF (2) worktype to fetch trial factoring work.

valeriob01 commented 3 years ago

Here's some benchmark for trial factoring exponent 218812621, bitlevel 73-74:

Radeon VII:

Radeon Pro VII:

valeriob01 commented 3 years ago

Here's some benchmark for trial factoring exponent 218812621, bitlevel 73-74:

Radeon VII:

* GHz: 710-790

* ETA: 17 minutes

Radeon Pro VII:

* GHz: 780-890

* ETA: 16 minutes

For comparison: benchmark for mfakto on RX Vega 64, same exponent, same bitlevel:

valeriob01 commented 3 years ago

@preda Can you tell me just where is the code for the output line so that I can try to fix it?

valeriob01 commented 3 years ago

@preda Can you tell me just where is the code for the output line so that I can try to fix it?

Tired of waiting for your reply, I went ahead and found it. For contribution I share the command I used to find the code for output line:

find . -type f -exec grep -H 'bitlo' {} \;

which produces:

./Results.cpp:   snprintf(buf, sizeof(buf), "\"bitlo\":%u, \"bithi\":%u, \"begink\":\"%llu\", \"endk\":\"%llu\", \"rangecomplete\":%s%s",
Binary file ./openowl matches

This allowed me to add the comma before bitlo. Now I only need to understand why the timestamp is not accepted by Primenet.

valeriob01 commented 3 years ago

I will open a discussion for this topic.