mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   YAFU (https://www.mersenneforum.org/forumdisplay.php?f=96)
-   -   Yafu (https://www.mersenneforum.org/showthread.php?t=10871)

Mini-Geek 2009-09-19 23:22

In a quick test (a single c60 run once for each of 1.10, 1.11 with 1 thread, and 1.11 with 2 threads) of 1.10 vs 1.11 with two threads on my AMD 64 X2, 1.11 on two threads is about 50% faster than 1.10. CPU usage was just under 90% (as measured by Task Manager).

bsquared 2009-09-20 02:16

[quote=Batalov;190380]Ben, are you going to do the c149 2,1103+ by parallelized SIQS, then?
:whistle:[/quote]

:redface: I was wondering when someone was going to poke me on this, since it was supposed to be a quick job. I was hoping it could wait till I get 3LP implemented, and then maybe give SIQS a chance at a new record.

bsquared 2009-09-20 02:20

[quote=Mini-Geek;190382]In a quick test (a single c60 run once for each of 1.10, 1.11 with 1 thread, and 1.11 with 2 threads) of 1.10 vs 1.11 with two threads on my AMD 64 X2, 1.11 on two threads is about 50% faster than 1.10. CPU usage was just under 90% (as measured by Task Manager).[/quote]

Thanks for the test! That's even slightly better than I was seeing on a core2, where 2 threads produced about a 1.85x speedup.

Mini-Geek 2009-09-20 11:54

[quote=bsquared;190392]Thanks for the test! That's even slightly better than I was seeing on a core2, where 2 threads produced about a 1.85x speedup.[/quote]
Sorry if I was unclear, but you misunderstood me. There was a 50% speedup (1.5x original speed). And, as a separate statement, it used just under 90% of my CPU.
I'm also running a test on a c80. I'll let you know the results of that. :smile:
Edit: The time went from 639.6870 secs to 352.2344. 639.6870/352.2344=1.8160... So about 1.82x speedup. About the same as Core 2. Here are the timings:
[code]07/17/09 00:14:13 v1.10 @ TIMOTHY, sieve time = 187.0970, relation time = 76.4820, poly_time = 367.4490
07/17/09 00:14:20 v1.10 @ TIMOTHY, Lanczos elapsed time = 7.0160 seconds.
07/17/09 00:14:20 v1.10 @ TIMOTHY, Sqrt elapsed time = 0.6090 seconds.
07/17/09 00:14:20 v1.10 @ TIMOTHY, SIQS elapsed time = 639.6870 seconds.

09/20/09 07:03:40 v1.11 @ TIMOTHY, sieve time = 96.7813, relation time = 48.3438, poly_time = 149.8750
09/20/09 07:03:54 v1.11 @ TIMOTHY, Lanczos elapsed time = 12.9220 seconds.
09/20/09 07:03:54 v1.11 @ TIMOTHY, Sqrt elapsed time = 0.8590 seconds.
09/20/09 07:03:54 v1.11 @ TIMOTHY, SIQS elapsed time = 352.2344 seconds.[/code]I wonder why the Lanczos took so much longer than before...could the fact that I'm also sieving for a GNFS be throwing it off? (YAFU's priority was above the priority of the two sieving .exe's) If so, might it be making the other data unreliable as well? If you think it could be affecting it, I'll try this c80 again when I finish the GNFS.

One odd thing, though: I previously mentioned that it only used about 90% of the CPU. Now that I was able to watch the CPU usage over more than a couple seconds, I can see that: (in Task Manager)
If I set the update speed to Low, it's steady at 80% CPU usage,
if I set the update speed to Normal, it oscillates between about 70% and 95%, and
if I set the update speed to High, it oscillates between about 45% and 97%.

So, clearly, it does not use all of the CPU, and the portion it does use is not consistent. As you can see from the results at Low update speed, it averages about 80% CPU usage, which is, surprisingly, not really in line with the 1.82x speedup. 80/50=1.6, so the new multithreaded code is getting significantly more (about 1.8/1.6=1.125, so 12.5% more) done per CPU second.
If you need a graph of YAFU's CPU usage over time, (e.g. the one you'd get from Task Manager while YAFU and nothing else is running) I can get that.

bsquared 2009-09-20 12:46

[quote=Mini-Geek;190427]I wonder why the Lanczos took so much longer than before...could the fact that I'm also sieving for a GNFS be throwing it off? (YAFU's priority was above the sieving exe's) If so, might it be making the other data unreliable as well? If you think it could be affecting it, I'll try this c80 again when I finish the GNFS.
[/quote]

It could be effecting the results... hard to say. You don't need to redo anything; I'm getting other data too and have a better picture now.

[quote=Mini-Geek;190427]

If you need a graph of YAFU's CPU usage over time, (e.g. the one you'd get from Task Manager while YAFU and nothing else is running) I can get that.[/quote]

Thanks for the offer, but I don't think I need that detail.

Now that multi-threading is here, do you or does anyone else plan to actually use it? Or are other machine cores typically full with other tasks? Noone will hurt my feeling by saying they won't use it (in which case sticking with 1.10 may be faster) because I was going to do it anyway to learn about thread coding :smile:.

- ben.

henryzz 2009-09-20 12:57

[quote=bsquared;190430]It could be effecting the results... hard to say. You don't need to redo anything; I'm getting other data too and have a better picture now.



Thanks for the offer, but I don't think I need that detail.

Now that multi-threading is here, do you or does anyone else plan to actually use it? Or are other machine cores typically full with other tasks? Noone will hurt my feeling by saying they won't use it (in which case sticking with 1.10 may be faster) because I was going to do it anyway to learn about thread coding :smile:.

- ben.[/quote]
i might start using it instead of msieve in aliqueit as i like as much as possible to be parallelized as i want it as faster as possible
msieve was slightly faster from memory(not sure whether i tested linux64 i think that might have been on win32).

Mini-Geek 2009-09-20 13:10

[quote=bsquared;190430]Now that multi-threading is here, do you or does anyone else plan to actually use it? Or are other machine cores typically full with other tasks? Noone will hurt my feeling by saying they won't use it (in which case sticking with 1.10 may be faster) because I was going to do it anyway to learn about thread coding :smile:.

- ben.[/quote]
For me, that mainly depends on what, if anything, is added to aliqueit to support this. My cores are always full, but I don't mind using both cores for the bigger tasks (I have GGNFS set to use both cores).
If it at least let me set the number of threads, (it should exclude the "-threads x" entirely when the number of threads is set to 1 to allow for backwards compatibility with 1.10) I'd probably use it.
If it allowed me to use 1.11 with two threads on anything over, say, a c90, and otherwise use 1.10, I'd do that. :smile: (of course, there'd be several settings in the aliqueit.ini file instead of just a YAFU path: the 1.10 path, the 1.11 path, the cutoff for using 1.11 and extra threads, and the number of threads to use when over the cutoff)

Regardless, sometimes I use YAFU manually, and in these cases I think I'll use multithreading.

Andi47 2009-09-20 13:23

[QUOTE=Mini-Geek;190432]
If it allowed me to use 1.11 with two threads on anything over, say, a c90, and otherwise use 1.10, I'd do that.[/QUOTE]

above c90 GNFS should be faster (use msieve for poly selection, it will automatically generate a quartic in the range of ~c85 - c105)

kar_bon 2009-09-20 13:49

i've just done a C99 with yafu with 4 threads (Q6600, w/o OC):

1h 44min to find the P47*P53, about 104000 relations needed

mataje 2009-09-20 15:21

How can I use the -threads option with yafu?.
Can someone post an example?.
Thanks.

kar_bon 2009-09-20 15:24

call

[code]
yafu -threads 4
[/code]

for 4 threads and call

[code]
siqs(Cxx)
[/code]

in yafu to perform siqs for a Cxx.


All times are UTC. The time now is 22:03.

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