How to optimise Collatz on a gpu

Using your nVidia or AMD Graphics card for BOINC computation.
User avatar
Alez
[ TSBT's Pirate ]
[ TSBT's Pirate ]
Posts: 10363
Joined: Thu Oct 04, 2012 1:22 pm
Location: roaming the planet

#1 How to optimise Collatz on a gpu

Post by Alez »

This is a copy of a post I made buried away in a challenge comp post so though I should stick it out here for reference.

remember mileage will vary, the higher spec card you have the more you can optimize and the more benifits you will see.

got solo_collatz on the ATI 7970 down to 11 mins now . Thats a 300% increase on average from where I started. Very Happy Very Happy

This is my optimization procedure for collatz

go to the project directory, in my case
c:/programData/boinc/projects/boinc.thesonntag.com_collatz

it's a hidden system folder
for windows 7
select windows explorer
organize
folder and search options
view
enable show hidden files folders and drives

this will show the directory

open notepad and copy the following exactly

<app_config>
<app>
<name>solo_collatz</name>
<gpu_versions>
<gpu_usage>1</gpu_usage>
<cpu_usage>1</cpu_usage>
</gpu_versions>
</app>
</app_config>

save this file as app_config.xml
do not save as a txt file or it wont work.

this will reserve an entire cpu core to run one instance of collatz on the gpu. The gpu usage part is important. collatz works far better 1 unit per gpu as it highly loads the card from the start. If you wish to run more than one then change the 1 to 0.5 which will run 2 units per card. 0.33 will run 3 etc. not worth it on collatz. The next part is the optimization that make collatz fly. My 660ti's will run items_per_kernal=18 all day so your 650ti's will probabily be the same or maybe 17. simply watch the gpu load and temp on the cards to ensure they are stable. If they are running too hot or too much load then change items_per_kernal to something less. Leave all the other stuff as is.

scroll down and find a file called solo_collatz_4.07_windows_x86_64_opencl_ati_100 config file ( THIS IS FOR AMD CARDS )
solo_collatz_4.07_windows_x86_64_cuda50.config ( THIS IS FOR nVIDIA CARDS )

right click on this file and open with notepad

copy the below into it exactly

verbose=0
items_per_kernel=20
kernels_per_reduction=9
threads=8
sleep=1

you need to change the items_per_kernel=14 to something more ( try 16 first) as this massively increases the loading on the gpu.

this is for solo collatz. if you are running collatz and mini collatz then you need to do the same for their config files.
collatz_4.07_windows_x86_64_cuda50.config ( or _opencl_ati_100 )
mini_collatz_4.07_windows_x86_64_cuda50.config ( or _opencl_ati_100 )

solo collatz is the best as no wingmen, credit straight off, but this works for all. I am also presuming that you are running windows 64 bit. if not then the file names will be the same i think but will not have the _64 in them.

save file ( not save as), the next solo unit will start using these settings. this is for my 7970, for slower cards start off at items_per_kernel=15 (14 is the default) and work your way up .

more info here http://67.163.87.64/collatz/forum_thread.php?id=1009

Running cards in SLI has no benefit in boinc but if you use them for gaming there is no need to remove the SLI for boinc. Boinc simple ignores the fact the cards are in SLI.
Image
The best form of help from above is a sniper on the rooftop....
CycloneRanger
Boinc Sergeant
Boinc Sergeant
Posts: 121
Joined: Tue May 30, 2006 12:59 am
Location: Just outside Terlingua

#2

Post by CycloneRanger »

Many many thanks! I'll try this and report.
Image
User avatar
Alez
[ TSBT's Pirate ]
[ TSBT's Pirate ]
Posts: 10363
Joined: Thu Oct 04, 2012 1:22 pm
Location: roaming the planet

#3

Post by Alez »

You're welcome. Any problems give me a shout.
Image
The best form of help from above is a sniper on the rooftop....
CycloneRanger
Boinc Sergeant
Boinc Sergeant
Posts: 121
Joined: Tue May 30, 2006 12:59 am
Location: Just outside Terlingua

#4 Re: How to optimise Collatz on a gpu

Post by CycloneRanger »

FYI: my 650Ti will run at 22 items per kernel, though it gets a little squirrely. It runs fine at 20.
Image
User avatar
Silver
Boinc Brigadier
Boinc Brigadier
Posts: 2210
Joined: Sun Apr 14, 2013 7:09 pm
Location: Aberdeen/Anguilla

#5 Re: How to optimise Collatz on a gpu

Post by Silver »

Alez, what was the gpu load on your 7970 before and after you optimised it?
I'm going to try your method above but my load seems fairly high already
Image
User avatar
Janos (retired)
Still a Newbie
Posts: 1919
Joined: Thu Feb 23, 2012 8:58 am
Location: Aberdeenshire, Scotland

#6 Re: How to optimise Collatz on a gpu

Post by Janos (retired) »

It isn't really (too much) about load but about tuning for the 7970's capabilities.
"Happiness can be defined as: a geek with non-work related code to write, no distractions and no deadline." - Janos
User avatar
Silver
Boinc Brigadier
Boinc Brigadier
Posts: 2210
Joined: Sun Apr 14, 2013 7:09 pm
Location: Aberdeen/Anguilla

#7 Re: How to optimise Collatz on a gpu

Post by Silver »

Thanks Janos. Just didn't want to blow up my new card!
I'll hopefully have time to tinker with it tonight.
If Alez can get through a unit in 11 minutes and I'm currently around 17 I should surely be able to squeeze a bit more out :)
Image
User avatar
Janos (retired)
Still a Newbie
Posts: 1919
Joined: Thu Feb 23, 2012 8:58 am
Location: Aberdeenshire, Scotland

#8 Re: How to optimise Collatz on a gpu

Post by Janos (retired) »

With these settings, I am on 11 mins also. Slightly less but don't tell Alez. ;)
"Happiness can be defined as: a geek with non-work related code to write, no distractions and no deadline." - Janos
User avatar
Silver
Boinc Brigadier
Boinc Brigadier
Posts: 2210
Joined: Sun Apr 14, 2013 7:09 pm
Location: Aberdeen/Anguilla

#9 Re: How to optimise Collatz on a gpu

Post by Silver »

Hmm, it's like your suggesting a 7970 collatz runtime challenge ;)
Image
User avatar
Alez
[ TSBT's Pirate ]
[ TSBT's Pirate ]
Posts: 10363
Joined: Thu Oct 04, 2012 1:22 pm
Location: roaming the planet

#10 Re: How to optimise Collatz on a gpu

Post by Alez »

Janos wrote:With these settings, I am on 11 mins also. Slightly less but don't tell Alez. ;)
Hmmm, I actually managed well under sub 10 mins with over voltage and over clocking plus more tweaking, but the fans at 98 % and the smell of warm plastic caused me to back off. just saying. The settings I posted will run 24/7, push it and the room heater is devoid of a guarantee :D
Image
The best form of help from above is a sniper on the rooftop....
User avatar
scole of TSBT
Boinc Major General
Boinc Major General
Posts: 5980
Joined: Mon Feb 03, 2014 2:38 pm
Location: Goldsboro, (Eastern) North Carolina, USA

#11 Re: How to optimise Collatz on a gpu

Post by scole of TSBT »

Is there any way to set the gpu_usage separately for 2 different GPU's? I want to set it to .5 for an ATI GPU, but leave it at 1 for the Intel IGPU. Or would even a low end IGPU benefit by setting gpu_usage to .5?
Image
User avatar
Alez
[ TSBT's Pirate ]
[ TSBT's Pirate ]
Posts: 10363
Joined: Thu Oct 04, 2012 1:22 pm
Location: roaming the planet

#12 Re: How to optimise Collatz on a gpu

Post by Alez »

No there is not and I very much doubt the IGPU would cope anyway. Why do you want to try and crunch 2 units ? If you follow the optimisation through then trust me there is no point in trying for 2 units per gpu. It will simply be slower. Some projects benefit from this approach ( milkyway for example ) Collatz, (like gpugrid and primegrid ) is not one of them.
Image
The best form of help from above is a sniper on the rooftop....
User avatar
scole of TSBT
Boinc Major General
Boinc Major General
Posts: 5980
Joined: Mon Feb 03, 2014 2:38 pm
Location: Goldsboro, (Eastern) North Carolina, USA

#13 Re: How to optimise Collatz on a gpu

Post by scole of TSBT »

I guess I didn't study the GPU activity level long enough with gpu_usage set to 1. I gave it a look and saw it at 60% so I figured it was skating. Just changed it back to 1 and gave it a longer look. It sat at 60% for just a little then jumped to to the high 90s. Oh well, just trying to keep the thing working. No free rides at my house.
Image
User avatar
Alez
[ TSBT's Pirate ]
[ TSBT's Pirate ]
Posts: 10363
Joined: Thu Oct 04, 2012 1:22 pm
Location: roaming the planet

#14 Re: How to optimise Collatz on a gpu

Post by Alez »

did you do the optimisation ?
ie
verbose=0
items_per_kernel=20
kernels_per_reduction=9
threads=8
sleep=1

That should have made a huge difference in the time required to complete a unit. With Collatz ( because of the calculations it does ) it's all about how fast you can get through it,not the GPU load.
If the overhead is still there and the temperatures good then go for items_per_kernel=22 and see what happens. The R9 is a powerful card after all.

Having though about it, I think a config file could be written to force 2 units on ATI and 1 on Intel because they are different gpu's but it would be complicated and I stand by it is not the way to get more from your Gpu on collatz. That said, if you really want to try it , I will try and knock you a config file together tomorrow, but no guarantee it will work as I only have my laptop so can't test anything.
Image
The best form of help from above is a sniper on the rooftop....
User avatar
scole of TSBT
Boinc Major General
Boinc Major General
Posts: 5980
Joined: Mon Feb 03, 2014 2:38 pm
Location: Goldsboro, (Eastern) North Carolina, USA

#15 Re: How to optimise Collatz on a gpu

Post by scole of TSBT »

What should the .config filename be? The application is solo_collatz 6.04 (opencl_amd_gpu). I have files...
solo_collatz_6.04_windows_x86_64__opencl_ati_gpu.config
solo_collatz_6.04_windows_x86_64__opencl_amd_gpu.config
but I can't remember if I create those files or they were there.

And how do you know you have the items_per_kernel too high? What happens?
Image
User avatar
scole of TSBT
Boinc Major General
Boinc Major General
Posts: 5980
Joined: Mon Feb 03, 2014 2:38 pm
Location: Goldsboro, (Eastern) North Carolina, USA

#16 Re: How to optimise Collatz on a gpu

Post by scole of TSBT »

Well, the tasks are down to a little over 16 min, so I figure I've got the config set correctly.
Image
User avatar
Alez
[ TSBT's Pirate ]
[ TSBT's Pirate ]
Posts: 10363
Joined: Thu Oct 04, 2012 1:22 pm
Location: roaming the planet

#17 Re: How to optimise Collatz on a gpu

Post by Alez »

scole250 wrote:What should the .config filename be? The application is solo_collatz 6.04 (opencl_amd_gpu). I have files...
solo_collatz_6.04_windows_x86_64__opencl_ati_gpu.config
solo_collatz_6.04_windows_x86_64__opencl_amd_gpu.config
but I can't remember if I create those files or they were there.

And how do you know you have the items_per_kernel too high? What happens?
I do need to update the post to reflect the new names of the collatz applications. Will do when I get home and have access to my computers to get the current app names. In your case I would edit both. These files are provided by the project. The reason you have two is because AMD / ATI do not follow a conventional naming policy for your card.
An nVidia is always a nVidia, an Intel is always an Intel but an AMD / ATI can be either depending on the day of the week or something :shock:
Generally you will know when you have gone too far when either the app errors or windows throws a fit and resets the video drivers. Generally as you approach the limit of what the card will do you will see the temperature go up and the screen will start getting unresponsive of laggy. If that's the case you know you are close and simply back off.
The 7970 will do 11 mins, the r9 270 has about 2/3rds the SP performance so 16 mins sounds about right. The main thing is to check the temp on the card to ensure it is stable to run this 24/7
Image
The best form of help from above is a sniper on the rooftop....
User avatar
scole of TSBT
Boinc Major General
Boinc Major General
Posts: 5980
Joined: Mon Feb 03, 2014 2:38 pm
Location: Goldsboro, (Eastern) North Carolina, USA

#18 Re: How to optimise Collatz on a gpu

Post by scole of TSBT »

Well, I've had to back down the load on the R9 270X. Had items_per_kernel set to 20 and didn't crash right away so I thought it was ok, but after a couple hours OS crashes. Ran on the default .config (no .config file) for 5 hours which was longer than it stayed up till then. Then used a .config file with...
verbose=0
items_per_kernel=14
kernels_per_reduction=9
threads=8
sleep=1

Got in a hurry, up'd items_per_kernel to 15 and OS crashed after a couple hours. Set it back to 14 and waiting to see what happens. Is this a hardware limitation, driver problem (was using the latest stable 13.12, then after problems tried the 14.3 beta. Does the hardware stink, driver stink or other? Suggestions?
Image
User avatar
Alez
[ TSBT's Pirate ]
[ TSBT's Pirate ]
Posts: 10363
Joined: Thu Oct 04, 2012 1:22 pm
Location: roaming the planet

#19 Re: How to optimise Collatz on a gpu

Post by Alez »

Off the top of my head I am using 14.3 beta too. On boinc projects, computers on this project it reports as driver: 1.4.1848. I'm running items per kernel 20 and also running a slight overclock at 1000 I think.
What size of PSU do you have and what sort of temperatures are you running as they would be my first two suspects. Has it run stable before or have you just done the optimisation and it has started crashing ?
After 5 hours you should have completed multiple units before it crashes. If the Kernel items was too high it would crash on every or nearly every unit. So I think it is something else.
My main suspect would be GPU temp or PSU temp.
Image
The best form of help from above is a sniper on the rooftop....
User avatar
scole of TSBT
Boinc Major General
Boinc Major General
Posts: 5980
Joined: Mon Feb 03, 2014 2:38 pm
Location: Goldsboro, (Eastern) North Carolina, USA

#20 Re: How to optimise Collatz on a gpu

Post by scole of TSBT »

I just did the optimization. It actually wasn't running correctly at 14. Got computation errors on everything. Had to remove the .config file altogether and run the default. Getting different size work units, but all result in avg of around 4 credits per run second. GPU temps never went above 63c. I suspect the PSU is the problem. Its only 550w and I have a ton of stuff in it.

Well, its actually a 650w PSU. The R9 270X is only supposed to draw 255w max, I think. I have an i3 that draws 55w, 3 WDC hard drives (2 green and 1 blue), an optical drive that wife is using a lot to rip CDs, half dozen USB devices could be conencted (iPhone, WD Mybook, CD card reader, scanner, printer) and 22" LCD monitor. That's not drawing more than 200w is it? That plus the card should be more than 500w max. It's new but maybe lemon PSU?
Image
User avatar
Alez
[ TSBT's Pirate ]
[ TSBT's Pirate ]
Posts: 10363
Joined: Thu Oct 04, 2012 1:22 pm
Location: roaming the planet

#21 Re: How to optimise Collatz on a gpu

Post by Alez »

Not enough power on the psu 12 v rail I'll bet.

Edit, ooops just seen your post in the R9, R7 thread so double post :oops: however as I said not enough power :)
Image
The best form of help from above is a sniper on the rooftop....
User avatar
scole of TSBT
Boinc Major General
Boinc Major General
Posts: 5980
Joined: Mon Feb 03, 2014 2:38 pm
Location: Goldsboro, (Eastern) North Carolina, USA

#22 Re: How to optimise Collatz on a gpu

Post by scole of TSBT »

New PSU installed, set optimization and after a few WUs, throughput 6-7 times what it is under the default config. What are acceptable temps to keep the GPU at?
Image
User avatar
Alez
[ TSBT's Pirate ]
[ TSBT's Pirate ]
Posts: 10363
Joined: Thu Oct 04, 2012 1:22 pm
Location: roaming the planet

#23 Re: How to optimise Collatz on a gpu

Post by Alez »

What are they now ? Probably in the 60's to low 70's deg Celsius is where mine normally are
Image
The best form of help from above is a sniper on the rooftop....
User avatar
scole of TSBT
Boinc Major General
Boinc Major General
Posts: 5980
Joined: Mon Feb 03, 2014 2:38 pm
Location: Goldsboro, (Eastern) North Carolina, USA

#24 Re: How to optimise Collatz on a gpu

Post by scole of TSBT »

65C with fan at 100%

Its Cadillac'n now. (that's southern speak for "it's running very well")
Image
User avatar
scole of TSBT
Boinc Major General
Boinc Major General
Posts: 5980
Joined: Mon Feb 03, 2014 2:38 pm
Location: Goldsboro, (Eastern) North Carolina, USA

#25 Re: How to optimise Collatz on a gpu

Post by scole of TSBT »

It stopped Cadillac'n last night. See the R7 R9 thread.

See the news that Collatz was going to start using CreditNew today? It will reduce credit granted to values in line with other projects that use CreditNew. They're also going to reduce all the existing credit to values proportional to the CreditNew values.

Did they post that for April Fools or is it real?
Image
User avatar
Alez
[ TSBT's Pirate ]
[ TSBT's Pirate ]
Posts: 10363
Joined: Thu Oct 04, 2012 1:22 pm
Location: roaming the planet

#26 Re: How to optimise Collatz on a gpu

Post by Alez »

Jon having an april fools joke :D
Image
The best form of help from above is a sniper on the rooftop....
User avatar
Megacruncher
G.L.S.B.
G.L.S.B.
Posts: 4699
Joined: Mon May 29, 2006 11:33 pm
Location: Edinburgh, Scotland
Contact:

#27 Re: How to optimise Collatz on a gpu

Post by Megacruncher »

In order to assure that the oldest software will be used, all applications will be migrated to COBOL and entered via punch cards.

Was the final give away that this was a leg pull. :D
Willie the Megacruncher
Image
User avatar
scole of TSBT
Boinc Major General
Boinc Major General
Posts: 5980
Joined: Mon Feb 03, 2014 2:38 pm
Location: Goldsboro, (Eastern) North Carolina, USA

#28 Re: How to optimise Collatz on a gpu

Post by scole of TSBT »

I obviously didn't read much past the first few lines
Image
User avatar
robmacagain
Boinc Warrant Officer Class 2
Boinc Warrant Officer Class 2
Posts: 322
Joined: Tue Apr 12, 2011 3:53 pm
Location: Sassenachshire

#29 Re: How to optimise Collatz on a gpu

Post by robmacagain »

Dummy's guide anyone???

There taking 3+ hours :cry:.

This bit > scroll down and find a file called solo_collatz_4.07_windows_x86_64_opencl_ati_100 config file ( THIS IS FOR AMD CARDS ) i dont have, i do have > solo_collatz_4.07_windows_x86_64_opencl_amd_gpu but it wont open, it says open and i click it but nothing.
Image
User avatar
scole of TSBT
Boinc Major General
Boinc Major General
Posts: 5980
Joined: Mon Feb 03, 2014 2:38 pm
Location: Goldsboro, (Eastern) North Carolina, USA

#30 Re: How to optimise Collatz on a gpu

Post by scole of TSBT »

Does the filename end with .config or is the Type CONFIG file? If not, it's not the correct file. Once you locate the correct file, right click on the filename. If you have the option to Open With, select that. If Notepad is an option, select that app, else select choose and find Notepad. Then add the contents to the file. Don't forget about the app_config.xml file.
Image
User avatar
Alez
[ TSBT's Pirate ]
[ TSBT's Pirate ]
Posts: 10363
Joined: Thu Oct 04, 2012 1:22 pm
Location: roaming the planet

#31 Re: How to optimise Collatz on a gpu

Post by Alez »

I thought I did write a dummy's guide :D Though it could be done with an update. Added to to do list.... Boinc has finally changed over to calling ATI AMD years after the change. At least a few project developers have :D
With the four new units choices available for collatz you now have many config files , micro, mini, solo, and large depending on your choices on your account page at collatz . Simply paste the changes into each one as each is originally empty. When I said open , as Scole said, find the config file, right click on it and open with notepad. If you are having problems then pm me and I can walk you through it step by step. With your 7990 you should be flying through these at a ferocious rate.
Image
The best form of help from above is a sniper on the rooftop....
User avatar
robmacagain
Boinc Warrant Officer Class 2
Boinc Warrant Officer Class 2
Posts: 322
Joined: Tue Apr 12, 2011 3:53 pm
Location: Sassenachshire

#32 Re: How to optimise Collatz on a gpu

Post by robmacagain »

Arr matey, i have just gone and sussed it out :D.

As i type it has completed 50% in 11:00 and 11:07 respectively.

What it was were > solo_collatz_4.07_windows_x86_64_opencl_amd_gpu was opening in Microsoft Visual Studio and it brought the window up but wouldn't let me read the file, so i changed it to open with notepad then it opened and it let me do the.....
verbose=0
items_per_kernel=20
kernels_per_reduction=9
threads=8
sleep=1

Abandoned the 2 it was doing rebooted and voila, cheers.

EDIT: gpu usage has shot up from 34% to now 96% and the 1st 2 units have completed in 21:57 and 22:46 solo units that is :bounce:.

Temperature's up from 62c to 82c, that's ok the card can run at 85c max continually according to Msi.

EDIT 2 : just checked the last 3 hours worth on Temujin Stats and its banging 60,000+ an hour out, ferocious indeed!!!

Am only running the cache i got last night down and that's me till next weekend.
Image
Post Reply Previous topicNext topic

Return to “Graphics Processing Unit (GPU)”