Collatz

Gilthanis

[H]ard|DCer of the Year - 2014
Joined
Jan 29, 2006
Messages
8,754
http://boinc.thesonntags.com/collatz/forum_thread.php?id=1009#16503

Here is some info on how to optimize the Collatz GPU apps.

Each Collatz 4.07 application is distributed with an empty config file. The config file has the same name as the executable but with the extension ".config".

There are a number of parameters that can be altered to improve speed or video response or to aid in solving issues. They are:

verbose=[0|1]
A value of 1 causes more information about the GPU, OpenCL version, etc. to be written to the log file. If enabled, this should be the first line of the config file so that it will report the other settings in the log file.

items_per_kernel=[10..22]
The number is the power of two 256-bit numbers (e.g. 2^N) that will be calculated per kernel call. Setting this number higher places a larger load on the GPU. Setting the number too high WILL cause the driver to crash and the application to hang. The default is 14, or 2^14, or 16384 items.

kernels_per_reduction=[2..9]The number (2^N once again) of kernels to run before doing a reduction. The default is 8 or 2^8 = 256. A lower number can improve video response. A larger number may result in a higher GPU load. Too high a number will result in CPU as well as GPU utilization.

threads=[5..10]
This contains the number of work groups to run in parallel. Higher is not necessarily faster. This number is device dependent. If set too high, the application will automatically reduce it to a value compatible with the device.
Most AMD GPUs allow up to 256 (a setting of 8). NVidia GPUs may allow 512 or even 1024 (a setting of 9 or 10). OpenCL requires a minimum of 32 (a setting of 5) according to the Khronos specifications.

build_options=[string containing any optional OpenCL build options]
This was added strictly for debugging in order to be able to use "-cl-opt-disable -Werror". If the OpenCL application crashes within 1-2 seconds of starting, you may want to use "build_options=-cl-opt-disable -Werror" and see if that fixes the problem.

sleep=[1..1000]
This controls the number of milliseconds that the application goes into a sleep state while waiting for the asynchronous kernel calls to complete. The default is 1. Setting this higher (e.g. 2-5) will result in better video response but will slow down the application considerably.

The config file will be renamed to collatz.config when it is copied to the BOINC slot folder when an application starts running. Exiting BOINC and editing the version in the project folder will not change the settings of the applications in progress as their config is taken from the slot folder.

A sample collatz.config file looks like:

verbose=1
items_per_kernel=20
kernels_per_reduction=9
threads=8
sleep=1
build_options=-Werror


Since the workunits very somewhat in the number of total steps they produce, I would suggest that you run several and take the average runtime to determine whether one set of values in the config works better than another set.

Note: The values in the sample above work quite well on my HD 6970 and HD 7970 without making either too sluggish.

I am adding this app_config info in the first post so that any whom come here will have easy access. This allows for 2 tasks to run on your GPU at a time. You can change the numbers to run more, but it is up to you to decide what maximizes your points on your hardware.:

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

Edit: I created an account called HardOCPtest so that anyone whom wanted to test or contribute anonymously could do so.

to attach a computer to your account without using the BOINC Manager.
To do so, install BOINC, create a file named account_boinc.thesonntags.com_collatz.xml in the BOINC data directory, and set its contents to:
<account>
<master_ur>http://boinc.thesonntags.com/collatz/</master_url>
<authenticator>175116_5cae02680372557fcd36cc39cbd09217</authenticator>
</account>

teamdaily.php
 
Last edited:
I have been using these optimizations for several months now and can report that they made a big improvement in computing time per task on all of my GPU's (Intel 4600's, Nvidia GTX 770 & 780Ti, AMD 7870, 7950's, & 7970's). In my case, all GPU's benefited from these optimizations. YMMV, but I highly recommend following these steps and implementing these optimizations.

Here is what I use on the Intel GPU's, as well as my AMD 7870:

verbose=1
threads=8
items_per_kernel=21
kernels_per_reduction=9
sleep=1


I use these settings on the rest of my GPU's:

verbose=1
threads=8
items_per_kernel=22
kernels_per_reduction=9
sleep=1

With these settings, I finish Solo WU's anywhere from 18-35 minutes.
 
Last edited:
Any input on the best WU size to run? I plan to get this setup on my 7870/7790 in a little bit.
 
Any input on the best WU size to run? I plan to get this setup on my 7870/7790 in a little bit.

I would run Solo WU's. They are big enough that you should finish them in just over 30 min. You should get about a 3K bonus per WU if they take more than 30 min to complete. That means about 15k points per WU. The closer you can get to each WU taking exactly 30 min, without going under, is the sweet spot. Using the settings shown on my 7870 (core clocked at 1050MHz), Solo WU's take about 33 min.
 
Great - thanks. Got it up and running. My 7870 does them in about 2000 seconds, and my 7790 in 3000 seconds. Points are quite ridiculous :)
 
Yeah, I think the only project that is better than Collatz for points is Bitcoin Utopia. If you think Collatz is ridiculous with the points, you should check out BU. I crunched there with several of my GPU's for just a few days and received almost 4 million points. Then all WU's started to fail for me, so I quit the project.

If it is points you seek, take a look at BU. Their project #3 is helping to raise money for Milkyway@Home, so if you can get your GPU's to work on BU, you could help out Milkyway, which is a great project imho.
 
I'd rather just donate money honestly. All but the best ASICs don't pull profit, and BU skims some off the top as well.
 
I'd rather just donate money honestly. All but the best ASICs don't pull profit, and BU skims some off the top as well.

To be fair....pretty much all non-profits that you donate money to "skims off the top". BU's 12% take isn't much different than even the top tier non-profits.
 
I'd rather just donate money honestly. All but the best ASICs don't pull profit, and BU skims some off the top as well.

I actually felt a little uneasy with BU for the short time I crunched there. Even if the WU's would have not started to fail for me, I would have quit the project anyway. I can't quite put my finger on exactly why, other than the points were just ridiculous and that made me feel like I was cheating somehow.

There is lots of debate in the BOINC community about BU and the points they grant and there are strong opinions on both sides of the argument. I think I just want to stay away from that mess. Besides, I am happy with the points I receive from Collatz and that project is at least attempting to prove/disprove a mathematical conjecture. Since I have lots of interest in mathematics, physics, space, and "science", Collatz is a better fit for me anyway.
 
To be fair....pretty much all non-profits that you donate money to "skims off the top". BU's 12% take isn't much different than even the top tier non-profits.

Excellent point! All charities require some money to actually operate, so some portion of every donation goes to running the daily operations. The key is finding and donating to those charities that take as little as possible off the top. I think 12% is reasonable, especially since the admins there do buy lots of hardware for each project they have active and they support many different platforms.
 
Yes this is true, however in this case I can donate directly to Milkyway so 100% (minus perhaps a small fee based on how the funds are transferred) goes to Milkyway. Many of those 'top tier' charities you speak of actually do work (such as buy, organize, ship goods for donation). (All BU does is write bad directions :D ).

Of course all DC projects have debatable worth. DC is a huge use of electricity (it is well over half of my power bill) and if there is another way to achieve the same result for less electricity, it should be done that way. However to me BU is the worst unless you have a top tier ASIC lying around that you no longer use. Because:

(a) With a GPU, you are expending far more money in electricity than BU is getting in Bitcoins. And then there is a fee on top of that.
(b) With an inefficient asic you probably still aren't breaking even with electricity, but throw in the fee and it gets worse.
(c) With a top tier asic you are profitable with electricity, but then they take a fee (which isn't as bad as they are handling the selling of the bitcoins and the donating for you).

So to me BU could be fun to get ridiculous points. But for GPUs you would be better off turning off all of your rigs for a month and taking the $ electricity savings and donating it to the project of your choice.

With all that said, DC is also about having fun. It could also be argued that if we donated all of the thousands we spend on hardware and electricity, BOINC/PG could fund time on a nice supercomputer (though I don't think it would be as fast as all of us combined). So run whatever piques your interest :)
 
Last edited:
I posted the following over in the Collatz forum, but I wanted to share it here in case it helps anyone:

... if you don't reserve a CPU core for the AMD OpenCL apps, they will run very slowly because the GPU is starved for work from the CPU.

I use an app_config.xml to allocate one full CPU core to each AMD OpenCL GPU task. It isn't necessary for the CUDA apps, as they run just fine with <25% of a core allocated, usually only using <2% of a core on both my GTX770's and my GTX780Ti. However, to get the best completion times out of the AMD OpenCL apps, a full core is absolutely essential. I find these apps will use ~95% of a core when they run. This includes all of my AMD GPU's - HD7870, HD7950, HD7970, R9 280 (same as an HD7950), and an R9 280X (same as an HD7970). All of them are CPU hogs. Additionally, on all my systems the Nvidia CUDA apps run faster than the Nvidia OpenCL apps.

When choosing which sized WU's you want to run, remember this: 30 minutes of processing time is key. You want to pick a size that requires >30 minutes to complete, that way you get bonus points for each WU. Also, keep in mind that each size up from the Micro WU's is a 16X increase in WU size (and processing time, of course). So, Mini = 16X Micro, Solo = 16X Mini, and Large = 16X Solo.

Personally, I run the Large WU's on my GTX780Ti, HD7950, R9 280, HD7970, and R9 280X. I run the Solo WU's on my GTX770's, and my HD7870. I run the Mini WU's on my Intel 4600 GPU's. I have found these give me the most points per day on my systems.

I hope this helps! Happy crunching!
 
RFGuy_KCCO, thank you for that reminder because many new BOINC'ers may not already be aware of these tips.

In general, reserving a CPU core/thread per GPU is common for maximizing output. It is still good practice at many projects to do this. Even GPUGrid where it doesn't use OpenCL. However, some projects nVidia uses more CPU time than AMD. In general though, AMD will outperform nVidia when it comes to running only OpenCL. But, if you compare nVidia running CUDA vs nVidia running OpenCL, then CUDA will outperform hands down. Comparing nVidia CUDA to AMD OpenCl all comes down to the coding and science behind it. Typically, you will find that whatever the project starts with tends to have the better coding as the other apps tend to be based off of that.

I will also mention that starving the GPU of CPU time is more critical with high end cards than the slower low end cards. Entry level cards aren't really effected much by this.
 
Out of curiosity, I have been running Collatz on my ancient 8800GTS (the original with 640MB RAM and only 96 CUDA cores - later versions had 112). It runs it without issue, however it is very slow. Here is a run time comparison:

Solo WU

8800GTS: ~8hrs 55min
GTX770: ~33min

Obviously, GPU technology has come a long way in eight years... :D
 
Yeah...you should run some Collatz on the CPU and compare it to that too. ;)
 
I don't know when it happened, but Collatz has an x86 Android app now. That makes 2 projects that supports it now.
 
I beat my goal of reaching 500mil points in Collatz before Thanksgiving with a couple hours to spare on Wednesday night. I am now going to spread around my GPU time to other projects. I still plan to contribute ~2-3mil ppd to Collatz, but now other GPU projects will get more of my GPU time.
 
Awesome. For Vault potential, we could use a strong push in Asteroids@home if you are looking for suggestions.
 
I cranked up my work share for Asteroids. Now the project just needs to make work available to crunch. Seems to be a chronic problem with Asteroids.
 
Collatz has been offline since some time on 12/27. I am not sure what is going on. I tried checking the SETI.USA forums, since Slicker is a member of that team, but I didn't see any news. My hope is that Slicker has just gone out of town for the holidays and the project will be back up soon.
 
It is back down again since yesterday. I had a goal of 1 Billion points in Collatz, but I am beginning to think I may leave this project instead. Too many outages recently and I have limited tolerance for unreliability.
 
I'm taking a little break from Collatz for now (shock!), while I work on some point goals at PrimeGrid (Genefer - 50 mil, PPS Sieve - 100 mil), Milkyway (50 mil), Poem (10 mil), and Moo! (100 mil). I am going on vacation for the first two weeks in May and want to reach all of these goals before I leave.

There have been quite a few outages at Collatz since last December and I have been getting weird WU times since about the same time. I'll concentrate on a few other projects for a little while, in the hopes these issues get straightened out. I'll definitely be back crunching there sometime soon - I still have a 1 billion point goal there and I have about 175 million to go!

Plus, it was obvious I wouldn't be able to single-handedly get [H] into the top 10 at FB, and the points at DC-V for Collatz will also be tough to attain without several other team members crunching some GPU work.
 
Microsoft recently added a check for the Win32/Bulta!rfn trojan virus to Microsoft Security Essentials. Unfortunately, the footprint they use to check for the virus matches that of the mini amd gpu app. The app is NOT infected though. They are just using too short a foot print. It is no different than trying to find this web site by searching Google but only entering "Collatz" as the search criteria. You would get a lot of links as matches but only one is the real thing. The anti-virus software searches executable applications looking for viruses but if the search string is too short, they get a false positive.

Until Microsoft fixes it (if ever) you may
a) ignore it (but you won't be able to run mini WUs)
b) choose another app such as the solo_collatz app in your preferences instead
c) exclude the c:\program data\boinc folder from being checked.

http://boinc.thesonntags.com/collatz/forum_thread.php?id=1265
 
I am again hitting Collatz hard, as I want to reach my 1 billion point goal and then shut down my GPU's for the rest of the summer. I'll turn them back up when the weather gets cooler. The electricity bills in the summer months are just too high these days.
 
How do you open these config files and edit them? Pretend like you are explaining it to your mother and not a fellow forum member :)
 
I just right click on the file and choose "Edit." That opens the file for editing in Notepad.

Since you're running a 7970/280X, use the following tweaks for most points per day at Collatz:

1) Go into the Collatz Preferences (Collatz project page --> Your Account --> Collatz Conjecture Preferences), edit your preferences, and select only the Large WU's under "Run only the selected applications." Uncheck all the other types (Micro, Mini, etc.). Under "Run only the selected plan classes", choose only OpenCL for AMD GPUs." Uncheck all the other plan classes.

2) Make a new file called "app_config.xml" in your Collatz project data directory (C:\ProgramData\BOINC\projects\boinc.thesonntags.com_collatz) with the following entries (just copy/paste from here into that file you created):
<app_config>
<app>
<name>large_collatz</name>
<gpu_versions>
<gpu_usage>1.0</gpu_usage>
<cpu_usage>1.0</cpu_usage>
</gpu_versions>
</app>
</app_config>

3) Once you have downloaded some Large WU's and one has started processing, close down BOINC completely and then go back to the same directory where you created that app_config.xml file. There you will find a file named "large_collatz_windows_x86_64_cuda.config" Right click on it and "Edit" Then paste the following into that file, save the file, and then close it:
verbose=1
threads=9
items_per_kernel=22
kernels_per_reduction=9
sleep=1
4) Start BOINC back up again and Abort that first WU that had started crunching. You should only be a few minutes into it at most, so no real loss of time there.

That's it! Your card should now finish those Large WU's in about 6 hours each. Each Large WU is worth ~240K points. Enjoy and good luck!
 
Last edited:
Haha, it worked! Thanks RF guy! I will probably switch between this and mw@h since I really like the science in the later. Can't wait to get my arctic accelero tommorow on this screaming puppy.
 
Server is down again. Make sure you have a backup project setup.
 
Any alternative for an HD 7970 for Collatz? First Milkyway, now Collatz?! Hmm... may go back to F@H if ths keeps up
 
Collatz has had a bad year for ups and downs. Milkyway is a relatively new issue. PrimeGrid scores decent and has a pretty rock solid project. The GFN world record work units are double precision. The PSP Sieve tasks are single precision. I would recommend the GFN to utilize that card better. But the work units are monsters.

POEM runs out of work often and is a BIO project. GPUGrid only has test work units every once in a while for AMD cards. SETI (or SETI BETA) has work but sucks on points and many don't believe in the science at all. Einstein (or Albert which is the alpha project) is a good solid project, but points aren't that great. Moo! would run ok, but you may have to double check if they got things figured out for that card. Otherwise there is a work around that I think I got posted in the Moo! thread.

BitcoinUtopia is just mining for causes and typically isn't efficient as donating cash direct would be more beneficial than paying for the electricity used. However, the points are crazy stupid high.

Edit: and of course if you want to try a different client out, there is also GIMPS and RC5-72 that could both use that card. (we have guides in the guide section for installing)
 
Last edited:
The Genefer Short WU's at PrimeGrid take ~5 hours to complete on a 7970 and are worth ~30K points each. That's what I would recommend. For comparison, the Genefer World Record WU's take just over 3 days on a 7970 and are worth ~500K points.

However, since you were first interested in Milkyway, you might also consider both SETI and Einstein. Both projects can utilize that 7970. These projects won't get you lots of points, but they are space-oriented and are quality projects.
 
Ok, I know this is off topic (RFGuy started it!) but I am confused by Genefer Short. I thought that is what I am running, but the work is taking 5 min not 5 hours. I've never done Primegrid on AMD so I am still figuring it out. Exactly what sub project are you running? My brother is running MW on my other 7970, so I will have to see if it is still getting work (I'm still getting points so I assume it is).
 
Back
Top