Welcome to MilkyWay@home

What's needed to compile the app?


Advanced search

Message boards : Application Code Discussion : What's needed to compile the app?
Message board moderation

To post messages, you must log in.

1 · 2 · 3 · 4 . . . 5 · Next

AuthorMessage
Profilespeedimic
Avatar

Send message
Joined: 22 Feb 08
Posts: 260
Credit: 57,387,048
RAC: 0
50 million credit badge13 year member badge
Message 6727 - Posted: 25 Nov 2008, 20:19:17 UTC

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.


ID: 6727 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
jedirock
Avatar

Send message
Joined: 8 Nov 08
Posts: 178
Credit: 6,140,854
RAC: 0
5 million credit badge13 year member badge
Message 6733 - Posted: 25 Nov 2008, 21:31:13 UTC - in response to Message 6727.  

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?

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".
ID: 6733 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
Profilespeedimic
Avatar

Send message
Joined: 22 Feb 08
Posts: 260
Credit: 57,387,048
RAC: 0
50 million credit badge13 year member badge
Message 6788 - Posted: 26 Nov 2008, 18:01:16 UTC - in response to Message 6733.  

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.


ID: 6788 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
jedirock
Avatar

Send message
Joined: 8 Nov 08
Posts: 178
Credit: 6,140,854
RAC: 0
5 million credit badge13 year member badge
Message 6799 - Posted: 26 Nov 2008, 20:24:03 UTC - in response to Message 6788.  

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?

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)
ID: 6799 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
ProfileMichael Roberts
Avatar

Send message
Joined: 25 Dec 07
Posts: 10
Credit: 217,283
RAC: 0
100 thousand credit badge13 year member badge
Message 6807 - Posted: 26 Nov 2008, 20:58:56 UTC - in response to Message 6799.  

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
....

Looking for the files manually I find them in $(BOINC_DIR)/lib
What's wrong?

Looks like the Makefile still needs some more tweaking.
Try changing these lines: ...

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 .
ID: 6807 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
Profilespeedimic
Avatar

Send message
Joined: 22 Feb 08
Posts: 260
Credit: 57,387,048
RAC: 0
50 million credit badge13 year member badge
Message 6813 - Posted: 26 Nov 2008, 21:34:31 UTC - in response to Message 6807.  

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.


ID: 6813 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
ProfileMichael Roberts
Avatar

Send message
Joined: 25 Dec 07
Posts: 10
Credit: 217,283
RAC: 0
100 thousand credit badge13 year member badge
Message 6819 - Posted: 26 Nov 2008, 22:05:00 UTC - in response to Message 6813.  
Last modified: 26 Nov 2008, 22:48:37 UTC

ok, ... 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?

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)
ID: 6819 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
Profilespeedimic
Avatar

Send message
Joined: 22 Feb 08
Posts: 260
Credit: 57,387,048
RAC: 0
50 million credit badge13 year member badge
Message 6831 - Posted: 26 Nov 2008, 23:35:11 UTC - in response to Message 6819.  

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.


ID: 6831 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
ProfileDaniel

Send message
Joined: 25 Nov 07
Posts: 25
Credit: 54,443,893
RAC: 0
50 million credit badge14 year member badge
Message 7537 - Posted: 8 Dec 2008, 3:43:53 UTC

So if I go through all this work, can I just change msse2 to mssse3? Will the speedup be worth it?
ID: 7537 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
Profilespeedimic
Avatar

Send message
Joined: 22 Feb 08
Posts: 260
Credit: 57,387,048
RAC: 0
50 million credit badge13 year member badge
Message 7552 - Posted: 9 Dec 2008, 1:20:43 UTC - in response to Message 7537.  

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.


ID: 7552 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
Profilespeedimic
Avatar

Send message
Joined: 22 Feb 08
Posts: 260
Credit: 57,387,048
RAC: 0
50 million credit badge13 year member badge
Message 7680 - Posted: 12 Dec 2008, 21:52:09 UTC

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.


ID: 7680 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
Profilebanditwolf
Avatar

Send message
Joined: 12 Nov 07
Posts: 2425
Credit: 524,164
RAC: 0
500 thousand credit badge14 year member badge
Message 7701 - Posted: 13 Dec 2008, 2:53:56 UTC - in response to Message 7680.  

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!



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.
ID: 7701 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
Profilepetros
Avatar

Send message
Joined: 3 Aug 08
Posts: 89
Credit: 255,801
RAC: 0
100 thousand credit badge13 year member badge
Message 7751 - Posted: 15 Dec 2008, 0:11:46 UTC

Hi i need some help to optimize the client for Linux64 with my own flags.

I have downloaded and compiled the boinc source code and i have the code of the current MW application.

What steps i have to do now to optimize the client for my machine?
ID: 7751 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
Profilespeedimic
Avatar

Send message
Joined: 22 Feb 08
Posts: 260
Credit: 57,387,048
RAC: 0
50 million credit badge13 year member badge
Message 7772 - Posted: 15 Dec 2008, 18:35:33 UTC - in response to Message 7751.  

Hi i need some help to optimize the client for Linux64 with my own flags.

I have downloaded and compiled the boinc source code and i have the code of the current MW application.

What steps i have to do now to optimize the client for my machine?


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.


ID: 7772 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
Profilespeedimic
Avatar

Send message
Joined: 22 Feb 08
Posts: 260
Credit: 57,387,048
RAC: 0
50 million credit badge13 year member badge
Message 7773 - Posted: 15 Dec 2008, 18:52:36 UTC - in response to Message 7680.  

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!


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.


ID: 7773 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
Profilespeedimic
Avatar

Send message
Joined: 22 Feb 08
Posts: 260
Credit: 57,387,048
RAC: 0
50 million credit badge13 year member badge
Message 7775 - Posted: 15 Dec 2008, 20:40:36 UTC - in response to Message 7773.  

Anyone interested testing it?
(ATM I got Linux32 SSE3 and SSE4.1)
mic.


ID: 7775 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
Profilepetros
Avatar

Send message
Joined: 3 Aug 08
Posts: 89
Credit: 255,801
RAC: 0
100 thousand credit badge13 year member badge
Message 7781 - Posted: 16 Dec 2008, 1:08:17 UTC

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);

ID: 7781 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
Profilespeedimic
Avatar

Send message
Joined: 22 Feb 08
Posts: 260
Credit: 57,387,048
RAC: 0
50 million credit badge13 year member badge
Message 7786 - Posted: 16 Dec 2008, 6:48:05 UTC - in response to Message 7781.  

Type

make app_x86_64

to compile the 64bit version.
mic.


ID: 7786 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
GlennG

Send message
Joined: 17 Nov 08
Posts: 18
Credit: 130,650,263
RAC: 0
100 million credit badge13 year member badge
Message 7795 - Posted: 16 Dec 2008, 14:58:54 UTC - in response to Message 7775.  

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
ID: 7795 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
Profilespeedimic
Avatar

Send message
Joined: 22 Feb 08
Posts: 260
Credit: 57,387,048
RAC: 0
50 million credit badge13 year member badge
Message 7796 - Posted: 16 Dec 2008, 16:38:15 UTC - in response to Message 7795.  

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


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.


ID: 7796 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
1 · 2 · 3 · 4 . . . 5 · Next

Message boards : Application Code Discussion : What's needed to compile the app?

©2021 Astroinformatics Group