mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   GPU Computing (https://www.mersenneforum.org/forumdisplay.php?f=92)
-   -   I have a few questions about getting my GPU working for GIMPS (https://www.mersenneforum.org/showthread.php?t=19666)

Red Raven 2014-09-05 15:33

I have a few questions about getting my GPU working for GIMPS
 
I just finished building a new rig. It runs an i5-4460 and an R9 280x. I have the i5 running first-time LL tests, and it's doing great. Seeing 4 cores crunch 4 exponents at 3.2 Gz over several days is very cool to watch, and I feel like that amount of computing power is a significant contribution. I even decided to set up my laptop, which runs a 2.2 Ghz single-core to run TF tests (I know that that clock speed warrents first-time LL tests, but I want to fix some stability issues with the machine before committing to long-term assignments). Anyways, my 280x isn't doing much while I'm away, and I'm using my colleges' electricity, so I figured I could put it to work. However, the GPU programs don't seem as straight forward as Prime95. I understand that results have to be manually sent in, but which program should I use? What kind of test is my GPU best suited for? Is the program as tolerant as Prime95 when it comes to throttling down when other things demand cycles and automatically picking up where it left off when the computer restarts? How efficient will the GPU be compared to the CPU? Will the GPU program demand enough CPU cycles to impact Prime95? Thanks.

Mini-Geek 2014-09-05 17:42

[QUOTE=Red Raven;382212]I just finished building a new rig. It runs an i5-4460 and an R9 280x. I have the i5 running first-time LL tests, and it's doing great. Seeing 4 cores crunch 4 exponents at 3.2 Gz over several days is very cool to watch, and I feel like that amount of computing power is a significant contribution. I even decided to set up my laptop, which runs a 2.2 Ghz single-core to run TF tests (I know that that clock speed warrents first-time LL tests, but I want to fix some stability issues with the machine before committing to long-term assignments). Anyways, my 280x isn't doing much while I'm away, and I'm using my colleges' electricity, so I figured I could put it to work.[/QUOTE]
Great!

[QUOTE=Red Raven;382212]However, the GPU programs don't seem as straight forward as Prime95.[/QUOTE]
True.

[QUOTE=Red Raven;382212]I understand that results have to be manually sent in, but which program should I use? What kind of test is my GPU best suited for?[/QUOTE]
There are three major programs for GPUs right now:[LIST][*]mfaktc - TF for CUDA (NVIDIA)[*]mfakto - TF for OpenCL (AMD)[*]CUDALucas - LL for CUDA (NVIDIA)[/LIST]So your only (easy) option is [URL="https://github.com/Bdot42/mfakto"]mfakto[/URL]. Relative to CPUs, GPUs are far better at TF, anyway, and even with an NVIDIA GPU, TF would be the standard preference.
[URL="http://mersenneforum.org/misfit/"]MISFIT[/URL] will automatically retrieve and submit your TF work, so you don't need to do it manually.
I'd recommend you use that in conjunction with the [URL="http://www.gpu72.com/"]"GPU to 72"[/URL] project to easily get optimal-depth TF assignments.

[QUOTE=Red Raven;382212]Is the program as tolerant as Prime95 when it comes to throttling down when other things demand cycles and automatically picking up where it left off when the computer restarts?[/QUOTE]
I have experience with mfaktc with my Nvidia, not with mfakto, but I'd assume the same applies:
No, it's not as good as Prime95 in this way. You can tweak the configuration file to adjust UI responsiveness vs TF speed. I wrote a [URL="https://github.com/Mini-Geek/mfaktx-controller"]controller[/URL] to handle this for you automatically, pausing or running at slow, medium, or fast speeds in response to what you're doing with your computer (idle, running games, etc.).
It does, however, have great checkpointing. You can set it to checkpoint every few seconds (smaller checkpoint files than LLs means that's reasonable), so that it can continue from there when you restart.

[QUOTE=Red Raven;382212]How efficient will the GPU be compared to the CPU?[/QUOTE]
Your CPU does [URL="http://www.mersenne.ca/throughput.php?cpu1=Intel%28R%29+Core%28TM%29+i5-4430+CPU+%40+3.00GHz%7C256%7C6144&mhz1=3000"]about 4*11 (44)[/URL] GHz-Days/day of LL or 4*5 (20) GHz-Days/day of TF. Your GPU will do [URL="http://www.mersenne.ca/mfaktc.php"]about 375[/URL] GHz-Days/day of TF. Since GPUs are only well-suited to TF (as far as current GPUs, programs, and GIMPS work is concerned), it's not really reasonable to directly compare these numbers, but GPUs are certainly a big contribution to GIMPS! Their use allows us to TF to much greater depths (e.g. 73 bits instead of 68), and release CPUs from needing to TF at all.

[QUOTE=Red Raven;382212]Will the GPU program demand enough CPU cycles to impact Prime95?[/QUOTE]
No. At one time this was the case, but since the sieving (eliminating some composite factors before seeing if they divide) can be done on the GPU, it will only use a trivial amount of CPU cycles.

Red Raven 2014-09-05 20:51

How do I run mfakto? I downloaded the .zip and ran the mfakto.exe file, but it just runs a quick self test in command prompt and closes.

MatWur-S530113 2014-09-05 22:54

put a new text-file in the directory of mfakto, write

mfakto.exe -st
mfakto.exe -st2
pause

save it and rename the text-file to something.bat
now run the batch file

Mini-Geek 2014-09-05 22:57

[QUOTE=Red Raven;382233]How do I run mfakto? I downloaded the .zip and ran the mfakto.exe file, but it just runs a quick self test in command prompt and closes.[/QUOTE]

If you run mfakto.exe from a command line or from MfaktX Controller, you will be able to see the output after it exits. (or use a batch file with "pause" at the end, as MatWur suggested - although that will only show the results if nothing crashes) Most likely, the problem is simply that you haven't gotten any work for it to do yet.

It tries to read a worktodo.txt file from its current directory, just like Prime95 (except that Prime95 will contact the server itself if there's no more work, and mfakto will not). Most likely, the problem is that you don't have any work here for it yet. Here's an example file (you won't find any factors; these are primes):
[QUOTE]Factor=N/A,43112609,70,73
Factor=N/A,57885161,70,73
[/QUOTE]
This is where MISFIT comes in: it will handle communicating with the server to get work, stick it in worktodo.txt, and then report the results when you're done.

Rodrigo 2014-09-06 04:35

You opened an accounts with GIMPS when you signed up your computer (nice rig, BTW) via the Prime95 software. You can make use of this to get TF work for your GPU by logging on to the PrimeNet page ([URL="http://www.mersenne.org/report_top_500_tf/"]example[/URL]; see top left of page), and then clicking on the spot down the left side where it says "Manual Testing."

Next, click on the "Assignments" choice that will appear below Manual Testing. At that point you'll get a new screen offering you several options. I've never entered anything but the default 1 for "Number of CPUs." The interesting choices for our purposes here have to do with the "Number of assignments" and "Preferred work type." Click on the little arrow next to this last one, and select "Trial factoring" since that's what you want for MAFAKTO and your GPU.

As for the number of assignments, you have a fast graphics card, so unless you select a ton of assignments you will find yourself constantly running out of work to do. Go by trial and error; I'd start with 64 or so and then see how long it takes your card to race through them; then you can judge how often you want to submit factoring reports and, from that, how many factors you need to grab in order to report at the intervals you prefer. Copy and paste the exponents into your worktodo.txt file, save it, and start up MFAKTO again. (No special settings or flags are generally required, as over time the program has gotten better and better at automatically determining the optimal settings for a variety of cards. But it might be fun to read around the forum here as to the settings people have tried, and then to experiment with your own tweaks to the default settings.)

When the GPU finishes factoring the exponents, MFAKTO will stop. You can then go back into PrimeNet to submit the results via the same Manual Testing route, except that this time you'll select the "Results" sub-option. A big box will appear where you can paste in the contents of the worktodo.txt file. But bear in mind that there may be a limit to the amount of information that your browser can handle at one time. If you exceed it, you'll get an error message and then you'll have to copy-and-paste a smaller chunk from worktodo.txt. (In my experience, Internet Explorer 9/10/11 can handle somewhere north of 105 lines at a time without hiccuping.)

At the end of it, don't forget to get yourself a new batch of assignments.

(An alternative strategy for getting assignments is to grab several hundred at a time, and then report as often as you decide on the ones that have been done up to that point.)

All that said, a lot of people prefer to automate the process by using GPU to 72 and MISFIT, as Mini-Geek suggested. But I'd recommend starting out the manual way so that you get a sense of the process and how it works; when you then move on to the automated methods, you'll have a better understanding of what's going on.

I do recommend keeping an eye on your GPU's temperatures. If they get too high, performance might be throttled, crippling your throughput. MFAKTO (as well as MFAKTC) will keep you constantly updated on its performance, so you will be able to see at once if the output fluctuates significantly, which in my experience is a sign of cooling issues.

Hope this helps. Good luck, and have fun following your name as it shoots up in the rankings.

Rodrigo

TheMawn 2014-09-06 16:11

[QUOTE=Rodrigo;382264] <SNIP>

But bear in mind that there may be a limit to the amount of information that your browser can handle at one time. If you exceed it, you'll get an error message and then you'll have to copy-and-paste a smaller chunk from worktodo.txt. (In my experience, Internet Explorer 9/10/11 can handle somewhere north of 105 lines at a time without hiccuping.)

<SNIP>[/QUOTE]

:goodposting:

The other day, I wasn't paying much attention and I submitted ~350 results (only three factors sadly, if I recall...) in the big box instead of uploading the .txt. This is with the latest version of chrome (and the new-and-improved server), and it worked perfectly fine.

I think the 4 KB limit is an artifact.

Red Raven 2014-09-06 23:55

[QUOTE=Rodrigo;382264]You opened an accounts with GIMPS when you signed up your computer (nice rig, BTW) via the Prime95 software. You can make use of this to get TF work for your GPU by logging on to the PrimeNet page ([URL="http://www.mersenne.org/report_top_500_tf/"]example[/URL]; see top left of page), and then clicking on the spot down the left side where it says "Manual Testing."

Next, click on the "Assignments" choice that will appear below Manual Testing. At that point you'll get a new screen offering you several options. I've never entered anything but the default 1 for "Number of CPUs." The interesting choices for our purposes here have to do with the "Number of assignments" and "Preferred work type." Click on the little arrow next to this last one, and select "Trial factoring" since that's what you want for MAFAKTO and your GPU.

As for the number of assignments, you have a fast graphics card, so unless you select a ton of assignments you will find yourself constantly running out of work to do. Go by trial and error; I'd start with 64 or so and then see how long it takes your card to race through them; then you can judge how often you want to submit factoring reports and, from that, how many factors you need to grab in order to report at the intervals you prefer. Copy and paste the exponents into your worktodo.txt file, save it, and start up MFAKTO again. (No special settings or flags are generally required, as over time the program has gotten better and better at automatically determining the optimal settings for a variety of cards. But it might be fun to read around the forum here as to the settings people have tried, and then to experiment with your own tweaks to the default settings.)

When the GPU finishes factoring the exponents, MFAKTO will stop. You can then go back into PrimeNet to submit the results via the same Manual Testing route, except that this time you'll select the "Results" sub-option. A big box will appear where you can paste in the contents of the worktodo.txt file. But bear in mind that there may be a limit to the amount of information that your browser can handle at one time. If you exceed it, you'll get an error message and then you'll have to copy-and-paste a smaller chunk from worktodo.txt. (In my experience, Internet Explorer 9/10/11 can handle somewhere north of 105 lines at a time without hiccuping.)

At the end of it, don't forget to get yourself a new batch of assignments.

(An alternative strategy for getting assignments is to grab several hundred at a time, and then report as often as you decide on the ones that have been done up to that point.)

All that said, a lot of people prefer to automate the process by using GPU to 72 and MISFIT, as Mini-Geek suggested. But I'd recommend starting out the manual way so that you get a sense of the process and how it works; when you then move on to the automated methods, you'll have a better understanding of what's going on.

I do recommend keeping an eye on your GPU's temperatures. If they get too high, performance might be throttled, crippling your throughput. MFAKTO (as well as MFAKTC) will keep you constantly updated on its performance, so you will be able to see at once if the output fluctuates significantly, which in my experience is a sign of cooling issues.

Hope this helps. Good luck, and have fun following your name as it shoots up in the rankings.

Rodrigo[/QUOTE]

Thanks. I was having trouble getting MISFIT to link up to GPU to 72, so I started a single exponent manually and it's working. Since GPUs have so many "cores" is there any way of multithreading mfakto to crunch multiple exponents at once? I've never understood the thing where GPUs have a lot of "cores" and are good at parallel stuff.

Red Raven 2014-09-07 00:58

Also, mfakto is taking up 25% of my cpu. How can I reduce this?

TheMawn 2014-09-07 01:03

[QUOTE=Red Raven;382334]Thanks. I was having trouble getting MISFIT to link up to GPU to 72, so I started a single exponent manually and it's working. Since GPUs have so many "cores" is there any way of multithreading mfakto to crunch multiple exponents at once? I've never understood the thing where GPUs have a lot of "cores" and are good at parallel stuff.[/QUOTE]

Well, there's not much to it. GPU's have lots of cores which are individually quite slow, but there are LOTS (The GTX Titan Black has 2880). Rendering 3D graphics is essentially the crunching of a stupid amount of 4x4 matrices so it's all a bunch of linear algebra; juicy targets for parallel computing.

However, mfakto and mfaktc already make full use of the available hardware. If you monitor your GPU usage, it should be at 100% unless you're throttling the speed.

Back when the sieving was done by the CPU, it was possible that the CPU was "too slow" for the GPU and you would actually need to run two instances of mfaktc/o (each one with a different CPU core) to fully saturate the GPU, but now they're already running at full.

TheMawn 2014-09-07 01:07

[QUOTE=Red Raven;382337]Also, mfakto is taking up 25% of my cpu. How can I reduce this?[/QUOTE]

Uhh... Does mfakto not do its own sieving?

That question isn't directed to you, really. There *might* be an option that isn't configured properly which is causing the program to do CPU sieving instead of GPU sieving. If you have the time or inclination, you could look around for that option. It might be in a file named mfakto.ini? I use the NVidia version so I couldn't say for sure.

Look for a .ini file and open it with notepad. Do a search for sieving and see if you can find what you're looking for, while we wait for someone who knows a bit better. That's the best I can do for you, I'm afraid.


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

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