Message boards :
Application Code Discussion :
Source Code and Optimized FreeBSD Binaries
Message board moderation
Author | Message |
---|---|
Send message Joined: 9 Oct 14 Posts: 14 Credit: 1,893,890 RAC: 0 |
Hi, I've been running the project on both Windows and FreeBSD and have noticed the FreeBSD binaries run substantially slower (~14x) than their Windows counterparts on the same hardware. The v1.00 FreeBSD binary appears to be using an SSE3 codepath whereas Windows is using SSE4.1: Windows: http://milkyway.cs.rpi.edu/milkyway/result.php?resultid=880295284 FreeBSD: http://milkyway.cs.rpi.edu/milkyway/result.php?resultid=882142548 I'd be happy to contribute optimized binaries for FreeBSD. Does anyone know if this is the latest source revision? http://milkyway.cs.rpi.edu/milkyway/download/src/ Thanks! -Brian |
Send message Joined: 16 Mar 11 Posts: 14 Credit: 824,527 RAC: 0 |
If you could do that that would be totally awesome! I was just about ready to attempt to compile from some source code, I believe from https://github.com/Milkyway-at-home/milkywayathome_client but honestly, I don't have much experience compiling from source code for FreeBSD. Using cmake makes it tremendously easier to figure out how to fix issues I have come across, but my lack of experience has made my endeavor substantially slower. I was actually about to give up and switch over to the linux binary, which I believe would also be much faster. I know when running the linux binary separation (modified fit) program through FreeBSD it does pick up the SSE4.1 intrinsics. Thanks Jeremy |
Send message Joined: 9 Oct 14 Posts: 14 Credit: 1,893,890 RAC: 0 |
Thanks! I had gotten that old code working, but this is much better! I now have optimized separation and nbody binaries: Download: https://aceshardware.files.wordpress.com/2014/11/milkyway_1-44_1-36_x86_64-pc-freebsd.zip CFLAGS (clang 3.4.1): -O3 -fvectorize -static milkyway_nbody: ~/dev/milkywayathome_client % make check Test project /home/brian/dev/milkywayathome_client/nbody/tests Start 1: checkpoint_test 1/4 Test #1: checkpoint_test .................. Passed 1.60 sec Start 2: custom_arg_test 2/4 Test #2: custom_arg_test .................. Passed 8.00 sec Start 3: emd_test 3/4 Test #3: emd_test ......................... Passed 0.80 sec Start 4: invalid_input_test 4/4 Test #4: invalid_input_test ............... Passed 19.99 sec 100% tests passed, 0 tests failed out of 4 Total Test time (real) = 30.40 sec milkyway_separation: ~/dev/milkywayathome_client/separation % make test Running tests... Test project /usr/home/brian/dev/milkywayathome_client/separation Start 1: tests 1/1 Test #1: tests ............................ Passed 145.80 sec 100% tests passed, 0 tests failed out of 1 Total Test time (real) = 145.80 sec The performance is much improved: Before: http://milkyway.cs.rpi.edu/milkyway/result.php?resultid=882142548 882142548 653711462 20 Nov 2014, 12:10:13 UTC 21 Nov 2014, 14:28:12 UTC Completed and validated 51,249.09 51,043.42 106.88 MilkyWay@Home v1.00 After: http://milkyway.cs.rpi.edu/milkyway/result.php?resultid=884981220 884981220 655662031 23 Nov 2014, 4:48:51 UTC 23 Nov 2014, 5:48:13 UTC Completed and validated 3,324.51 3,236.41 106.88 MilkyWay@Home Note that the SSE4.1 codepath is now utilized. I'm also now running NBody work units, which were previously unavailable on FreeBSD. |
Send message Joined: 16 Mar 11 Posts: 14 Credit: 824,527 RAC: 0 |
That's really great. I'm looking forward to using the new apps as soon as I restart my computer into FreeBSD. I was getting frustrated trying to understand all of the cmake errors and I got stuck when it reported the BOINC library files were too old. I'm glad to see you got them working. I was using the Linux 32 bit versions of nbody (1.44) and separation modified fit (1.36) and they ran fine. I know that separation found the sse4.1 code path with no issues. And I just put a copy of the libgomp library file in my milkyway project directory to get nbody working ok. But native FreeBSD is much better. I'm always happy to represent FreeBSD while crunching BOINC projects, and this will go even farther. Thanks a lot! Jeremy |
Send message Joined: 9 Oct 14 Posts: 14 Credit: 1,893,890 RAC: 0 |
Fantastic, let me know how it goes! |
Send message Joined: 16 Mar 11 Posts: 14 Credit: 824,527 RAC: 0 |
Hey quick question for you, what did you compile the NBody app with, clang or gcc? I haven't had a chance to test the new programs yet, I've been stuck doing work with Windows (bleck), but I wasn't sure if the NBody app is able to multithread with more than one core or thread. Just curious. |
Send message Joined: 9 Oct 14 Posts: 14 Credit: 1,893,890 RAC: 0 |
It's built with clang, using the flags in the above post. I didn't build it with OpenMP, so both apps are single-threaded. I haven't found this to be a problem for N-Body because BOINC just runs one process per core anyway. I'm testing some minor optimizations to the separation code that's currently saving ~15 seconds per unit/core, or about an hour of CPU time a day for my system. Once I finalize it, I'll post another build and I'll try to include OpenMP-enabled binaries as well. |
Send message Joined: 16 Mar 11 Posts: 14 Credit: 824,527 RAC: 0 |
Wow those binaries are much faster, possibly faster than running the linux ones. I'm still trying to tackle compiling the binaries myself, as a good learning tool, but have hit a brick wall with undefined references galore while trying to compile separation. What a headache. |
Send message Joined: 9 Oct 14 Posts: 14 Credit: 1,893,890 RAC: 0 |
Wow those binaries are much faster, possibly faster than running the linux ones. I'm still trying to tackle compiling the binaries myself, as a good learning tool, but have hit a brick wall with undefined references galore while trying to compile separation. What a headache. The code does not compile 100% cleanly on FreeBSD, so I had to make some minor patches. I'll try and reach out to the project admins to see if they'd like to integrate my changes into their mainline to permit easy FreeBSD builds going forward. I also have some slightly faster binaries I'll post soon! |
Send message Joined: 17 Aug 08 Posts: 8 Credit: 3,561,238 RAC: 0 |
FWIW, I am using the binaries from message 62728 on my BOINC machine, even if it is a bit outdated: root@kg-vm# uname -a FreeBSD kg-vm.kg4.no 8.3-PRERELEASE FreeBSD 8.3-PRERELEASE #5: Sun Jun 9 17:44:22 CEST 2013 root@kg-vm.kg4.no:/usr/obj/usr/src/sys/GENERIC amd64 and the programs appear to run just fine - thanks! However, in the workunit logs for nbody, I see this error message: <search_application> milkyway_nbody 1.44 FreeBSD x86_64 double , Crlibm </search_application> Application version too old. Workunit requires version 1.46, but this is 1.44 Failed to read input parameters file 12:13:21 (95209): called boinc_finish Just in case anybody knows where to find newer source code. |
Send message Joined: 17 Aug 08 Posts: 8 Credit: 3,561,238 RAC: 0 |
This message found source code on Github, but no one has confirmed that it is the official source - yet. |
Send message Joined: 9 Oct 14 Posts: 14 Credit: 1,893,890 RAC: 0 |
Looks like there was an update to NBody. I'll see about building an updated binary for it. |
Send message Joined: 17 Aug 08 Posts: 8 Credit: 3,561,238 RAC: 0 |
Thank you for doing this. |
Send message Joined: 17 Aug 08 Posts: 8 Credit: 3,561,238 RAC: 0 |
The source code on Github: https://github.com/Milkyway-at-home/milkywayathome_client is updated, nBody 1.48 is there. |
Send message Joined: 9 Oct 14 Posts: 14 Credit: 1,893,890 RAC: 0 |
The source code on Github: https://github.com/Milkyway-at-home/milkywayathome_client Thanks, I'll pull down the updated code and post a new build tonight. |
Send message Joined: 9 Oct 14 Posts: 14 Credit: 1,893,890 RAC: 0 |
NBODY 1.48 is now available: https://aceshardware.files.wordpress.com/2015/03/milkyway_1-48_1-36_x86_64-pc-freebsd.zip milkyway_nbody 1.44: % make check Test project milkywayathome_client/nbody/tests Start 1: checkpoint_test 1/4 Test #1: checkpoint_test .................. Passed 1.01 sec Start 2: custom_arg_test 2/4 Test #2: custom_arg_test .................. Passed 8.00 sec Start 3: emd_test 3/4 Test #3: emd_test ......................... Passed 0.97 sec Start 4: invalid_input_test 4/4 Test #4: invalid_input_test ............... Passed 19.99 sec 100% tests passed, 0 tests failed out of 4 milkyway_separation 1.36: % make test Running tests... Test project milkywayathome_client/separation Start 1: tests 1/1 Test #1: tests ............................ Passed 145.82 sec 100% tests passed, 0 tests failed out of 1 Total Test time (real) = 145.82 sec |
Send message Joined: 16 Mar 11 Posts: 14 Credit: 824,527 RAC: 0 |
Thanks so much for the binaries. It works like a charm. |
Send message Joined: 17 Aug 08 Posts: 8 Credit: 3,561,238 RAC: 0 |
Thanks for compiling the binaries! Been running them almost a day now, everything looks ok. Have a nice weekend, everyboday. |
Send message Joined: 16 Mar 11 Posts: 14 Credit: 824,527 RAC: 0 |
Has anyone else had any issues running the FreeBSD Nbody 1.48 binary? I've gotten 8 validate errors with them so far... they aren't invalids, but they aren't validating. I've switched back over to the linux 32 bit (mt) binary and the issue goes away. Perhaps there's some weird regression with LLVM or clang thats botching the workunits up? EDIT: I've noticed some of these same issues with Darwin hosts when the workunit is sent to another host to check my inconclusives. |
Send message Joined: 9 Oct 14 Posts: 14 Credit: 1,893,890 RAC: 0 |
Has anyone else had any issues running the FreeBSD Nbody 1.48 binary? I've gotten 8 validate errors with them so far... they aren't invalids, but they aren't validating. I've switched back over to the linux 32 bit (mt) binary and the issue goes away. Could be bad work units...I've noticed a few that are inconclusive: http://milkyway.cs.rpi.edu/milkyway/workunit.php?wuid=775468075 http://milkyway.cs.rpi.edu/milkyway/workunit.php?wuid=775464620 I've also had several that were successfully validated. |
©2024 Astroinformatics Group