Message boards :
Application Code Discussion :
What's needed to compile the app?
Message board moderation
Author | Message |
---|---|
Send message Joined: 22 Feb 08 Posts: 260 Credit: 57,387,048 RAC: 0 |
I never comiled an app myself, but as there is no linux32 I might need to :) I got gcc and the milkyway source, what else do I need? mic. |
Send message Joined: 8 Nov 08 Posts: 178 Credit: 6,140,854 RAC: 0 |
I never comiled an app myself, but as there is no linux32 I might need to :) You'll need to compile the libraries from BOINC to link to the application. Something like this should work: svn co http://boinc.berkeley.edu/svn/trunk/boinc boinc-source cd boinc-source ./_autosetup ./configure --disable-server --disable-client <other flags> make Any other flags you want can be discovered by ./configure --help After that, edit the make.linux file in the milkyway application source and change both BOINC_DIR and BOINC_LINK_DIR to the paths where the source was. So, if you downloaded boinc-source to your home directory, you'd change it to "/home/<username>/boinc-source". |
Send message Joined: 22 Feb 08 Posts: 260 Credit: 57,387,048 RAC: 0 |
Thanks jedirock! All you described worked out fine. Then I go "make app_i686" and get this: myhost:/home/mic/compile/milkyway/bin# make app_i686 g++ -m32 -O2 -ftree-vectorize -funroll-loops -DGMLE_BOINC -g -O -I/home/mic/compile/boinc -Wall -x c++ -c ../astronomy/boinc_astronomy.C -o ../astronomy/boinc_astronomy.o ../astronomy/boinc_astronomy.C:28:25: error: diagnostics.h: No such file or directory ../astronomy/boinc_astronomy.C:29:18: error: util.h: No such file or directory ../astronomy/boinc_astronomy.C:30:21: error: filesys.h: No such file or directory ../astronomy/boinc_astronomy.C:31:23: error: boinc_api.h: No such file or directory ../astronomy/boinc_astronomy.C:32:19: error: mfile.h: No such file or directory .... Looking for the files manually I find them in $(BOINC_DIR)/lib What's wrong? mic. |
Send message Joined: 8 Nov 08 Posts: 178 Credit: 6,140,854 RAC: 0 |
Thanks jedirock! Looks like the Makefile still needs some more tweaking. Try changing these lines: CXXFLAGS_ALL = $(VARIANTFLAGS) \ -g \ -O \ -I$(BOINC_DIR) to these lines: CXXFLAGS_ALL = $(VARIANTFLAGS) \ -g \ -O \ -I$(BOINC_DIR) \ -I$(BOINC_LIB_DIR) |
Send message Joined: 25 Dec 07 Posts: 10 Credit: 217,283 RAC: 0 |
Thanks jedirock! You will also need -I$(BOINC_DIR)/api . I pointed out yesterday that the definition of INC was missing from the makefile. I have now checked one directory at a time and am using these definitions: CXXFLAGS_ALL = $(VARIANTFLAGS) \ -g \ -O INC = -I$(BOINC_DIR) -I$(BOINC_DIR)/lib -I$(BOINC_DIR)/api I would prefer the VARIANTFLAGS and INC definitions to remain in separate variables so they can also be used for other commands (such as splint . |
Send message Joined: 22 Feb 08 Posts: 260 Credit: 57,387,048 RAC: 0 |
ok, this one: CXXFLAGS_ALL = $(VARIANTFLAGS) \ -g \ -O \ -I$(BOINC_DIR) \ -I$(BOINC_LIB_DIR) stopped at once without doing anything. This one CXXFLAGS_ALL = $(VARIANTFLAGS) \ -g \ -O INC = -I$(BOINC_DIR) -I$(BOINC_DIR)/lib -I$(BOINC_DIR)/api stopped after quite a lot of fast scrolling lines with make: *** no rule to make target »/home/mic/compile/boinc/api/libboinc_api.a« I fact the file isn't there. Should have been created by the BOINC make-ing, right? mic. |
Send message Joined: 25 Dec 07 Posts: 10 Credit: 217,283 RAC: 0 |
ok, ... This one Yes that should have been made with boinc. Is it really not there? Have you updated make.linux to take the libraries from boinc? (edit) that was a silly question because the error message would have referred to a different path if you had not done that! I have just checked a fresh boinc build with both server and client disabled as suggested and confirmed that the library is created. I suggest you do the following in the boinc directory: make distclean svn update (and then the configure and make commands again) and check for any build errors. Sometimes the svn is in an inconsistent state and it does not build correctly. (That's assuming you are taking trunk or an active branch - it shoud'nt be a problem if you take an explicit release.) I'll leave the quoted section as it shows how I am currently managing the changes to make.linux - I have a 'little script' which adds lines or uncomments them as necessary -- the comments are added so it is easy to see what has been changed automatically. See the three lines after the ## comments below: BOINC_LINK_DIR = /projects/wcl/software/boinc ##zap-cmt BOINC_LINK_DIR = $(BOINC_DIR) BOINC_LIB_LINK_DIR = $(BOINC_LINK_DIR)/lib BOINC_API_LINK_DIR = $(BOINC_LINK_DIR)/api VARIANTFLAGS = -DGMLE_BOINC CXXFLAGS_ALL = $(VARIANTFLAGS) \ -g \ -O INC = -I$(BOINC_DIR) -I$(BOINC_DIR)/lib -I$(BOINC_DIR)/api CXX_i686 = g++ CXXFLAGS_i686 = -m32 -O2 -ftree-vectorize -funroll-loops $(CXXFLAGS_ALL) LDFLAGS_i686 = -L/usr/X11R6/lib -L../../linux32_libboinc ##zap-cmt LDFLAGS_i686 = -L$(BOINC_LIB_LINK_DIR) -L$(BOINC_API_LINK_DIR) CXX_x86_64 = g++ CXXFLAGS_x86_64 = -O2 -msse2 -ftree-vectorize -funroll-loops $(CXXFLAGS_ALL) LDFLAGS_x86_64 = -L/usr/local/lib #LDFLAGS_x86_64 = -L/usr/local/lib -L/usr/X11R6/lib ##zap-cmt LDFLAGS_x86_64 = -L$(BOINC_LIB_LINK_DIR) -L$(BOINC_API_LINK_DIR) |
Send message Joined: 22 Feb 08 Posts: 260 Credit: 57,387,048 RAC: 0 |
jahoooo!!! The 'svn update' (and the INC) did the job! Thanks! Compiled right away. Got no WUs ATM, so I go to bed and try it out tomorrow... mic. |
Send message Joined: 25 Nov 07 Posts: 25 Credit: 54,443,893 RAC: 0 |
So if I go through all this work, can I just change msse2 to mssse3? Will the speedup be worth it? |
Send message Joined: 22 Feb 08 Posts: 260 Credit: 57,387,048 RAC: 0 |
So if I go through all this work, can I just change msse2 to mssse3? Will the speedup be worth it? I used the flags Thierry mentioned in his post. I did it mainly to see if I can do it... but well, the Wus come out faster now. :) mic. |
Send message Joined: 22 Feb 08 Posts: 260 Credit: 57,387,048 RAC: 0 |
After the recent incidents with bad apps I think I got to test mine with the test-WUs (I didn't do anything to the code and was sure the validator was gonna tell me if something's wrong...). Now I need a little HowTo for that, too... Thanks in advance! mic. |
Send message Joined: 12 Nov 07 Posts: 2425 Credit: 524,164 RAC: 0 |
After the recent incidents with bad apps I think I got to test mine with the test-WUs (I didn't do anything to the code and was sure the validator was gonna tell me if something's wrong...). Atlest you have some idea, I wouldn't mind trying to tweak it a bit but I haven't got a clue where to start. Doesn't expecting the unexpected make the unexpected the expected? If it makes sense, DON'T do it. |
Send message Joined: 3 Aug 08 Posts: 89 Credit: 255,801 RAC: 0 |
|
Send message Joined: 22 Feb 08 Posts: 260 Credit: 57,387,048 RAC: 0 |
Hi i need some help to optimize the client for Linux64 with my own flags. Open the makefile and edit this line: CXXFLAGS_x86_64 = -O2 -msse2 -ftree-vectorize -funroll-loops $(CXXFLAGS_ALL) to whatever your machine is capable of. Then compile. mic. |
Send message Joined: 22 Feb 08 Posts: 260 Credit: 57,387,048 RAC: 0 |
After the recent incidents with bad apps I think I got to test mine with the test-WUs (I didn't do anything to the code and was sure the validator was gonna tell me if something's wrong...). Answer from Travis: It's pretty easy, just run (an unmodified) version of the code with any of the test files that come in the zip file, and if your own modifications come out the same as that it should be fine. Ok, done that. Same out for both apps. :) On my Q9550 it's about 15% faster than stock. mic. |
Send message Joined: 22 Feb 08 Posts: 260 Credit: 57,387,048 RAC: 0 |
Anyone interested testing it? (ATM I got Linux32 SSE3 and SSE4.1) mic. |
Send message Joined: 3 Aug 08 Posts: 89 Credit: 255,801 RAC: 0 |
speedimic thank you for your tipps! I opened the make.linux file and then i've added the correct path where boinc is located on my pc,after this i made some changes to the flags for my OS as you pointed earlier and finally i#ve renamed the make.linux to ---> makefile. On the console i gived make ,but i got error that << all >> needed to complete the operation. Here i have a copy of my makefile, i hope you or someone else can help me,thx. APP_VERSION = Unix64 BOINC_DIR = /home/unix/boinc-source BOINC_API_DIR = $(BOINC_DIR)/api BOINC_LIB_DIR = $(BOINC_DIR)/lib BOINC_LINK_DIR = /home/unix/boinc-source BOINC_LIB_LINK_DIR = $(BOINC_LINK_DIR)/lib BOINC_API_LINK_DIR = $(BOINC_LINK_DIR)/api VARIANTFLAGS = -DGMLE_BOINC CXXFLAGS_ALL = $(VARIANTFLAGS) \ -g \ -O \ -I$(BOINC_DIR) \ -I$(BOINC_DIR)/lib -I$(BOINC_DIR)/api CXX_i686 = g++ CXXFLAGS_i686 = -m32 -O2 -ftree-vectorize -funroll-loops $(CXXFLAGS_ALL) LDFLAGS_i686 = -L/usr/X11R6/lib -L../../linux32_libboinc #LDFLAGS_i686 = -L$(BOINC_LIB_LINK_DIR) -L$(BOINC_API_LINK_DIR) CXX_x86_64 = g++ CXXFLAGS_x86_64 = -O3 -msse3 -pipe -fomit-frame-pointer -ftree-vectorize -funroll-loops $(CXXFLAGS_ALL) LDFLAGS_x86_64 = -L/usr/local/lib #LDFLAGS_x86_64 = -L/usr/local/lib -L/usr/X11R6/lib #LDFLAGS_x86_64 = -L$(BOINC_LIB_LINK_DIR) -L$(BOINC_API_LINK_DIR) APP_DIR = ../astronomy FGDO_DIR = .. SCHED_DIR = $(FGDO_DIR)/evaluation SEARCH_DIR = $(FGDO_DIR)/searches UTIL_DIR = $(FGDO_DIR)/util APP_OBJS = \ $(APP_DIR)/boinc_astronomy.o \ $(APP_DIR)/atSurveyGeometry.o \ $(APP_DIR)/numericalIntegration.o \ $(APP_DIR)/parameters.o \ $(APP_DIR)/probability.o \ $(APP_DIR)/stCoords.o \ $(APP_DIR)/stCnum.o \ $(APP_DIR)/stMath.o \ $(APP_DIR)/stVector.o \ $(APP_DIR)/star_points.o \ $(APP_DIR)/evaluation_optimized.o \ $(APP_DIR)/evaluation_state.o SEARCH_OBJS = \ $(SEARCH_DIR)/search_parameters.o UTIL_OBJS = \ $(UTIL_DIR)/io_util.o \ $(UTIL_DIR)/settings.o PROGS = milkyway_$(APP_VERSION)_i686-pc-linux-gnu milkyway_$(APP_VERSION)_x86_64-pc-linux-gnu all: $(PROGS) app_i686: OBJ_CXX = $(CXX_i686) app_i686: OBJ_CXXFLAGS = $(CXXFLAGS_i686) app_i686: $(APP_OBJS) $(SEARCH_OBJS) $(UTIL_OBJS) $(BOINC_API_LINK_DIR)/libboinc_api.a $(BOINC_LIB_LINK_DIR)/libboinc.a $(CXX_i686) $(LDFLAGS_i686) $(CXXFLAGS_i686) -Wl --export-dyanmic -static-libgcc -Wl,-Bstatic `gcc -print-file-name=libstdc++.a` -Wl,-Bdynamic \ -o milkyway_$(APP_VERSION)_i686-pc-linux-gnu $(APP_OBJS) $(SEARCH_OBJS) $(UTIL_OBJS) -lm -lboinc_api -lboinc -pthread app_x86_64: OBJ_CXX = $(CXX_x86_64) app_x86_64: OBJ_CXXFLAGS = $(CXXFLAGS_x86_64) app_x86_64: $(APP_OBJS) $(SEARCH_OBJS) $(UTIL_OBJS) $(BOINC_API_LINK_DIR)/libboinc_api.a $(BOINC_LIB_LINK_DIR)/libboinc.a $(CXX_x86_64) $(LDFLAGS_x86_64) $(CXXFLAGS_x86_64) -Wl --export-dynamic -static-libgcc -Wl,-Bstatic `gcc -print-file-name=libstdc++.a` -Wl,-Bdynamic \ -o milkyway_$(APP_VERSION)_x86_64-pc-linux-gnu $(APP_OBJS) $(SEARCH_OBJS) $(UTIL_OBJS) -lm -lboinc_api -lboinc -pthread .C.o: $(OBJ_CXX) $(OBJ_CXXFLAGS) $(INC) -Wall -x c++ -c $< -o $@ .c.o: $(OBJ_CXX) $(OBJ_CXXFLAGS) $(INC) -Wall -x c++ -c $< -o $@ clean: rm -f $(APP_OBJS) $(UTIL_OBJS) $(SEARCH_OBJS); clean_all: rm -f $(PROGS) $(APP_OBJS) $(UTIL_OBJS) $(SEARCH_OBJS); |
Send message Joined: 22 Feb 08 Posts: 260 Credit: 57,387,048 RAC: 0 |
Type make app_x86_64 to compile the 64bit version. mic. |
Send message Joined: 17 Nov 08 Posts: 18 Credit: 130,650,263 RAC: 0 |
Sure. Post them up somewhere, and I will give them a whirl. Processor Features: 64bit simd [x86] cmov mmx sse sse2 sse3 ssse3 sse4.1 vmx lm lahf_lm tm tm2 eist Glenn |
Send message Joined: 22 Feb 08 Posts: 260 Credit: 57,387,048 RAC: 0 |
Sure. Post them up somewhere, and I will give them a whirl. Sorry, I only got 32bit. If you can run 32bit, here it is: SSE4.1 Pack I put in a test-wu, so you can run it without trashing you all your wu's in case something goes wrong. Please do test it before putting it into your boinc-directory! ./milkyway_0.7ax_i686-pc-linux-gnu astronomy_parameters-cut-large.txt mic. |
©2024 Astroinformatics Group