Message boards :
Number crunching :
Optimized Linux Client Howto
Message board moderation
Author | Message |
---|---|
guidoprost Send message Joined: 3 Apr 99 Posts: 7 Credit: 19,732 RAC: 0 |
I have just spent a lot of time reading the forums and experimenting with the makefiles trying to get a self-compiled BOINC and Seti@home to work, so I might as well share what I found out and maybe save some people some time. I do not claim to be an expert so don't laugh if I did something stupid, but at least I got it to work. The reason for compiling it myself was that one WU took about an hour longer than it would have taken when run under Windows on the same machine. The reason being that the CC and Seti@home were compiled without any optimazitions at all. If I remember correctly this is what I did (I used 07-11 boinc and 07-12 seti) and it's been running fine for some time now. But if anybody has any corrections please post them, also a list of "ideal" compiler flags for different processor types would be nice. 1.) Download the latest sources at http://boinc.berkeley.edu/source/nightly/ and http://boinc.berkeley.edu/seti_source/nightly/ into the same directory 2.) Extract both files, rename the directory boinc_public to boinc. You should now have 2 subdirectories named boinc and seti_boinc. 3.) Change into the boinc directory, run the configure script. 3b) If the compiling process should abort with an error about MySQL missing, search the forums about how to solve that or simply install it. 4.) Find out the best compiler flags for your machine. 5.) cd client (Export CFLAGS as suggested in the forums did not work for me, so this is what I did:) [Edit: removed "-ffast-math" because it might lead to invalid results] 6.) Edit the Makefile, add your options to the "CPPFLAGS =" line, for mit it now looks like "CPPFLAGS = -mcpu=athlon-xp -march=athlon-xp -O3 -pipe -mfpmath=sse -m3dnow -msse -mmmx -funroll-loops -fomit-frame-pointer -s -static" I have no idea if this is the best possible for an AthlonXP since I just copied it from the forums and don't exactly know what it all means, but it works for me. ATTENTION: Do not copy this line if you don't have an AthlonXP. 7.) cd .. , make 8.) Strip the debug code if you want to. 9.) Configure the Seti client 10.) In the client directory edit the Makefile, changing the "CFLAGS =" line to something like "CFLAGS = -g -DHAVE_CONFIG_H -DTEXT_UI -DNDEBUG -DCLIENT -mcpu=athlon-xp -march=athlon-xp -O3 -pipe -mfpmath=sse -m3dnow -msse -mmmx -funroll-loops -fomit-frame-pointer -s -static" 11.) cd .. , make 12.) Copy the boinc client to whatever directory you are going to use, run it with the -attach_project option, benchmarks should run, you should see significant improvement, mine went up from 708/1485 to 1029/1861. Abort when it starts downloading stuff (if you use a proxy you have to edit the client_state.xml file). 13.) Copy the Seti client to the newly created projects/setiathome.berkeley.edu directory. 14.) Create a file called app_info.xml in the projects/setiathome.berkeley.edu directory containing the following (be sure to change the name/filename if necessary): [Edit] I just noticed the forums don't display the xml file correctly, so please have a look at http://boinc.berkeley.edu/anonymous_platform.php and change the version/name/filename to the right values. 15.) Run boinc again, it should now work and be a lot faster. |
WerK Send message Joined: 30 Jun 02 Posts: 26 Credit: 221,390 RAC: 0 |
Nice howto ! If you are getting problems compiling seti_boinc complaining about assert function just open your favourite text editor and in files : client/analyzeReport.cpp and client/lcgamm.cpp add the line : #include {assert.h} on beggining of the file ( replace the {,} with the correct less-than and more-than parenthesis ) |
CXI Send message Joined: 23 Apr 99 Posts: 30 Credit: 270,498 RAC: 0 |
duplicate post. Why does the database say error when the post succeeds??? |
CXI Send message Joined: 23 Apr 99 Posts: 30 Credit: 270,498 RAC: 0 |
"-ffast-math" So, have you noticed any issues with your work units being rejected? The above flag is dangerous for math specific applications. It causes the compiler to make certain assumptions in favor of speed, and these assumptions can cause the results generated to be incorrect. From the documentation for fast-math: "it can result in incorrect output for programs which depend on an exact implementation of IEEE or ANSI rules/specifications for math functions." Now, perhaps it doesn't affect the SETI client, but it's hard to tell unless you really know the code. |
guidoprost Send message Joined: 3 Apr 99 Posts: 7 Credit: 19,732 RAC: 0 |
That's a good point. Unfortunately with the pending credits/results pages down and no new host ID I can't really check. But it makes sense and if I had thought about it a little more I wouldn't have included it in the first place. I'll take it out and recompile. And I'll edit my post and remove it there, too. Does anybody know how "-ffast-math" affects Seti and BOINC? Shouldn't computation errors be caught by benchmark/self-test? I remember some projects I took part in did some kind of self-test to verify they were working correctly. [Edit] Just finished compiling without "-ffast-math" and my benchmarks actually got better. I am now at 2608 integer MIPS (Dhrystone) compared to 1861 with "-ffast-math". Can someone explain that to me please? |
WerK Send message Joined: 30 Jun 02 Posts: 26 Credit: 221,390 RAC: 0 |
well, I did some testing with the reference WU included with the client and have bad news. When i browsed the result.sah files and compared then the -ffast-math version had some numbers a little different(on position of 7-8 digit) than the no -ffast-math version. But when i rerun it again to test if the results dont change each run both versions had same results as before. Sooo it would be very nice if Berkeley or users together make a reference result from reference WU to self-test their systems. Right now i switched to non -ffast-math version |
railfan Send message Joined: 15 Dec 00 Posts: 4 Credit: 396,198 RAC: 0 |
I have completed the recompiles and experimented a little using the newer 3.10 setiathome client. I found that I needed to rename the new binary to 3.08 in order for it to perform work. Are other people seeing this? From what I can tell if no work is available for 3.10 then it will not get any units. |
©2024 University of California
SETI@home and Astropulse are funded by grants from the National Science Foundation, NASA, and donations from SETI@home volunteers. AstroPulse is funded in part by the NSF through grant AST-0307956.