Posts by fractal

1) Message boards : Number crunching : 64-bit ARM support (Message 307)
Posted 5 Mar 2017 by fractal
Post:
Your pi3 will throttle badly without a heat sink and some moving air. Mine won't run flat out for more than a day without eating its sd-card. I have a samsung to try that some suggest are better than the sandisc's I usually use when I get the chance.

You can monitor how much you are throttling by looking at "/sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state" I typically run the command "watch cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state" on my little boxes. My C2 is showing:

100000 53
250000 0
500000 11825610
1000000 60278736
1296000 49756520
1536000 266506476

It is spending most of its time at 1.5 GHz but dropping to 1.3 every so often. It was in the optional plastic case which was very warm to the touch. Taking it out of the case so it gets some airflow lets it stay at 1.5 GHz.

My pine64 is even worse. It too comes without a heat sink. I tried one of the little ones they sell for the pi3 and it helped a tiny bit. A fan blowing on it fixed me up. A huge heat sink on my second pine64 made little difference. It still needs airflow to avoid throttling. But, a 7 dollar USB fan from amazon is adequate.
2) Message boards : Number crunching : 64-bit ARM support (Message 302)
Posted 5 Mar 2017 by fractal
Post:
My C2 is not on this project but https://sech.me/boinc/Amicable/show_host_detail.php?hostid=742 is a pine64 with swap on a usb drive (ssd). Work units take just under 15 hours.

I'll switch it over to the official client and see if that makes any difference. I can't imagine it will since I did not do anything fancy, just compiled with -O2.
3) Message boards : Number crunching : Auto-ban faulty hosts (Message 237)
Posted 27 Feb 2017 by fractal
Post:
And only 2 hosts have been banned so far, and both wasn't mistakes. No false positives so far.

Both of them are mine, both are arm64 systems running an older client. I need to recompile the new source.

I only see one "invalid" on one of them and two on the other but the history is pretty short.
4) Message boards : Number crunching : GPU version (Message 196)
Posted 25 Feb 2017 by fractal
Post:
It may be worth noting:

--> Amicable Numbers 2/24/2017 5:16:02 PM A minimum of 920 MB (preferably 920 MB) of video RAM is needed to process tasks using your computer's NVIDIA GPU

Probably not an issue for most but the wimpy Quadro FX 1800 I have in one of my test boxes isn't good enough for this project.
5) Message boards : Random stuff : Credit system. (Message 94)
Posted 6 Feb 2017 by fractal
Post:
So it all depends on who you get paired with which does not seem to be fair or logical.

When everyone is running the same work unit on one thread the credit system works OK but not when one is running 12 cores and someone else 4 cores.

One issue may be that this project is memory intensive and thus will run out of memory bandwidth before you run out of cores on a 12 core machine.

I see it all the time with my collection of machines. I have an i5 with four cores at the same clock speed as my xeon with 12 cores. The i5 core finishes a work unit in half the time as the xeon, but the xeon does more of them at the same time. You can get good scaling if the main loop of your application fits in processor cache, but if it does not then all cores are competing for access to main memory.

So, yes, it DOES depend on who you get paired with. A couple of machines with lots of cores and slow memory will get more credit for doing the same work as a leaner, meaner machine. That is because credit is based on cpu seconds * cpu benchmark. And the cpu benchmark is computed with an algorithm that, you got it, fits in cache ;)

Many projects facing this issue pick a reference system and run work on it to get representative credit. They then assign fixed credit to the work units based on how their reference system performs. Some people hit the jackpot if their systems are more efficient than the reference system. Others are not as happy.

Oh, and it should make sense that it doesn't matter whether you are running a multi-threaded app which runs 4 or 12 cores or a single threaded app and you run 4 or 12 parallel work units. The end result is the same. The advantage of the multi-threaded app is the programmer is doing the work of identifying what can be shared between the threads instead of making the operating system. This can have a marked affect in projects like this one that want a lot of memory that can be shared between threads.
6) Message boards : News : More than 1000 new amicable pairs found! (Message 89)
Posted 6 Feb 2017 by fractal
Post:
But yes, a list of found pairs on a user profile page will be much better. It's in my TODO list.

This may belong in the other thread but you might consider badges based on the number of found pairs since those are more useful to this project than credits.
7) Message boards : Number crunching : arm64 linux client fun (Message 79)
Posted 5 Feb 2017 by fractal
Post:
I did not know about the test files. I downloaded them and re-ran the test.

ubuntu@pine64:~/am$ ls
amicable-aarch64-unknown-linux-gnu  c2_11.txt  c2_13.txt  c2_15.txt  c2_17.txt  c2_19.txt  c2_3.txt  c2_5.txt  c2_7.txt  c2_9.txt
c2_10.txt                           c2_12.txt  c2_14.txt  c2_16.txt  c2_18.txt  c2_20.txt  c2_4.txt  c2_6.txt  c2_8.txt
ubuntu@pine64:~/am$ time ./amicable-aarch64-unknown-linux-gnu /test
Testing CheckPair()...done
Testing amicable candidates...done
Testing MaximumSumOfDivisors3()...done
Testing primesieve...done
All tests passed

real    8m14.318s
user    7m34.900s
sys     0m4.410s
ubuntu@pine64:~/am$ cat stderr.txt
20:14:40 (32503): Can't open init data file - running in standalone mode

Just for fun I ran the test on my boinc build box as well since I have no idea what to expect. First, I run with your app

boinc@boinc-build-2:~/am$ wget https://sech.me/boinc/Amicable/download/amicable_v_1_03
2017-02-05 12:35:16 (2.39 MB/s) - ‘amicable_v_1_03’ saved [2746752/2746752]

boinc@boinc-build-2:~/am$ chmod +x amicable_v_1_03
boinc@boinc-build-2:~/am$ ls -l
total 222452
-rwxrwxr-x 1 boinc boinc  2521392 Feb  5 12:25 amicable
-rwxrwxr-x 1 boinc boinc  2746752 Jan 31 22:18 amicable_v_1_03
-rwxr--r-- 1 boinc boinc    63868 Feb  5 12:25 c2_10.txt
-rwxr--r-- 1 boinc boinc   160088 Feb  5 12:25 c2_11.txt
-rwxr--r-- 1 boinc boinc   388690 Feb  5 12:25 c2_12.txt
-rwxr--r-- 1 boinc boinc   907870 Feb  5 12:25 c2_13.txt
-rwxr--r-- 1 boinc boinc  2232700 Feb  5 12:25 c2_14.txt
-rwxr--r-- 1 boinc boinc  5132773 Feb  5 12:25 c2_15.txt
-rwxr--r-- 1 boinc boinc 11255557 Feb  5 12:25 c2_16.txt
-rwxr--r-- 1 boinc boinc 24901405 Feb  5 12:25 c2_17.txt
-rwxr--r-- 1 boinc boinc 56121351 Feb  5 12:25 c2_18.txt
-rwxr--r-- 1 boinc boinc 82565941 Feb  5 12:25 c2_19.txt
-rwxrwxr-- 1 boinc boinc 38705046 Feb  5 12:25 c2_20.txt
-rwxr--r-- 1 boinc boinc       44 Feb  5 12:25 c2_3.txt
-rwxr--r-- 1 boinc boinc      180 Feb  5 12:25 c2_4.txt
-rwxr--r-- 1 boinc boinc      411 Feb  5 12:25 c2_5.txt
-rwxr--r-- 1 boinc boinc     1695 Feb  5 12:25 c2_6.txt
-rwxr--r-- 1 boinc boinc     4062 Feb  5 12:25 c2_7.txt
-rwxrwxr-- 1 boinc boinc     8230 Feb  5 12:25 c2_8.txt
-rwxr--r-- 1 boinc boinc    24703 Feb  5 12:25 c2_9.txt
boinc@boinc-build-2:~/am$ time ./amicable_v_1_03 /test
Testing CheckPair()...done
Testing amicable candidates...done
Testing MaximumSumOfDivisors3()...done
Testing primesieve...done
All tests passed

real    1m52.500s
user    1m52.064s
sys     0m0.560s

Then I run with the app I compiled from source on the x86_64 host to see if there are any differences

boinc@boinc-build-2:~/am$ time ./amicable /test
Testing CheckPair()...done
Testing amicable candidates...done
Testing MaximumSumOfDivisors3()...done
Testing primesieve...done
All tests passed

real    1m56.417s
user    1m56.048s
sys     0m0.504s
boinc@boinc-build-2:~/am$ cat stderr.txt
12:35:29 (23195): Can't open init data file - running in standalone mode
12:38:08 (23197): Can't open init data file - running in standalone mode

This test machine is a VM in an Intel(R) Xeon(R) CPU E5645 @ 2.40GHz host if you want to compare times. It looks like the xeon is 4-5 times faster in the test.

Yes, the pine64 is slowing down to stay within the heat limits. It did not come with a heat sink unlike many of the arm development boards. It will probably run half again faster with a good heat sink.
8) Message boards : Number crunching : arm64 linux client fun (Message 77)
Posted 5 Feb 2017 by fractal
Post:
So, I have this 20 dollar pine64 board sitting here and I found myself wondering ... can it do anything for this project?

There are a limited number of projects that support arm linux and even fewer that take advantage of the arm 64 architecture so I decided to give this one a go.

First, I downloaded the source from the link in the other thread and compiled it on the pine64 board. I had to fix a few header file issues but other than that it was a clean compile.

Then I ran it in test mode.. ./release/amicable /test ... and it crashed. It did not take long to see that it was running out of memory with only 1GB RAM on the board. So I connect a USB hard drive and create a swap file and try again. The test program finishes without errors.

I copy "release/amicable" to "/var/lib/boinc-client/projects/sech.me_boinc_Amicable/amicable-aarch64-unknown-linux-gnu" and join the machine to the project and iterate a few times until I get a working app_info. Work issued by Boinc does not need swap yet so I removed the hard drive.

<app_info>
        <app>
                <name>amicable_2_64</name>
                <max_concurrent>1</max_concurrent>
                <user_friendly_name>Amicable Numbers up to 2^64</user_friendly_name>
        </app>

        <file>
                <name>amicable-aarch64-unknown-linux-gnu</name>
                <executable/>
        </file>
        <app_version>
                <app_name>amicable_2_64</app_name>
                <plan_class>mt</plan_class>
                <avg_ncpus>4</avg_ncpus>
                <cmdline>--nthreads 4</cmdline>
                <version_num>103</version_num>
                <file_ref>
                        <file_name>amicable-aarch64-unknown-linux-gnu</file_name>
                        <main_program/>
                </file_ref>
        </app_version>
</app_info>

The result? https://sech.me/boinc/Amicable/result.php?resultid=42244

Even with thermal throttling, it is not the slowest machine on https://sech.me/boinc/Amicable/cpu_list.php.

I will test some other arm development boards but it looks like 1GB RAM boards will be an issue for this project, and most of the Raspberry Pi class of boards have 1GB or less. I will play around a bit more when I get a decent heat sink for the pine64.



©2024 Sergei Chernykh