Compiling Applications for Linux

Message boards : Number crunching : Compiling Applications for Linux
Message board moderation

To post messages, you must log in.

Previous · 1 · 2 · 3 · 4 · 5 · Next

AuthorMessage
Profile jason_gee
Volunteer developer
Volunteer tester
Avatar

Send message
Joined: 24 Nov 06
Posts: 7489
Credit: 91,093,184
RAC: 0
Australia
Message 1519758 - Posted: 22 May 2014, 14:18:53 UTC - in response to Message 1519745.  

Nearly there. Could be a broken #define in there, which will mess things up royally ;) we'll see.
"Living by the wisdom of computer science doesn't sound so bad after all. And unlike most advice, it's backed up by proofs." -- Algorithms to live by: The computer science of human decisions.
ID: 1519758 · Report as offensive
Profile jason_gee
Volunteer developer
Volunteer tester
Avatar

Send message
Joined: 24 Nov 06
Posts: 7489
Credit: 91,093,184
RAC: 0
Australia
Message 1519793 - Posted: 22 May 2014, 16:07:05 UTC
Last modified: 22 May 2014, 16:11:35 UTC

OK Progress, several things for XBranch.

- Yes Cuda 6 ( and maybe 5.5) moved the cuda error types to driver_types.h
- Newer Boinc moved several include files into different locations
- I need to check what's up with the USE_CUDA flag

for these you have a lot of options respectively I just for now:
- added a line near the top of cudaAcc_utilities.h: #include "driver_types.h"

- use an older boincapi tag, such as a checkout of trusty old 6.10.58 tag. OR, stick with newer and comment out the std_fixes.h and utils.h includes it complains are missing. (remember to specify BOINCDIR= when you configure)
- specify CFLAGS=-DUSE_CUDA as others noted.

in addition you will probably want to examine the resulting Makefile in client/, locate the list of NVCC "-gencode" options, and add the newer compute capabilites that didn't exist before (if needed)

My end I'll have to update the autotools stuff, the includes wrt boinc and cuda6, and check all the resulting compiler options, though the above fiddling should produce a functional executable.

Frankly I'm a bit surprised that 'my bits' don't appear to be broken, and it appears to be Boinc and NV moving stuff around... oh well. For those that don't want to jump through all the hoops, I should be able to simplify quite a bit over the weekend.
"Living by the wisdom of computer science doesn't sound so bad after all. And unlike most advice, it's backed up by proofs." -- Algorithms to live by: The computer science of human decisions.
ID: 1519793 · Report as offensive
Profile petri33
Volunteer tester

Send message
Joined: 6 Jun 02
Posts: 1668
Credit: 623,086,772
RAC: 156
Finland
Message 1519990 - Posted: 22 May 2014, 20:39:06 UTC - in response to Message 1519740.  

Thanks JAson!
To overcome Heisenbergs:
"You can't always get what you want / but if you try sometimes you just might find / you get what you need." -- Rolling Stones
ID: 1519990 · Report as offensive
Profile petri33
Volunteer tester

Send message
Joined: 6 Jun 02
Posts: 1668
Credit: 623,086,772
RAC: 156
Finland
Message 1519991 - Posted: 22 May 2014, 20:42:35 UTC - in response to Message 1519928.  



In what file do I comment out std_fixes.h and utils.h includes? I know how to do this, but I don't know what file they're in.


Find all files containing text std_fixes in your current directory:
"grep std_fixes *"

Someone might know the syntax for "find" command..
To overcome Heisenbergs:
"You can't always get what you want / but if you try sometimes you just might find / you get what you need." -- Rolling Stones
ID: 1519991 · Report as offensive
Profile petri33
Volunteer tester

Send message
Joined: 6 Jun 02
Posts: 1668
Credit: 623,086,772
RAC: 156
Finland
Message 1519994 - Posted: 22 May 2014, 20:48:19 UTC - in response to Message 1519793.  

...

in addition you will probably want to examine the resulting Makefile in client/, locate the list of NVCC "-gencode" options, and add the newer compute capabilites that didn't exist before (if needed)
...



1) loacte sm_20 in some file
2) use your imagination and add an appropriate sm_35 if you have sm_35 capability.

in file 'configure' like this ..
...
        # AS_IF([echo $build_cpu | grep -q "_64"],
        if test x_$target_cpu = x_x86_64 ; then
                NVCCFLAGS+=" -m64 "
        else
                NVCCFLAGS+=" -m32 "
        fi
        # Add architecture to flags
        ## PCHIRP INCOMPATIBLE NVCCFLAGS+=" -gencode arch=compute_10,code=sm_10 -gencode arch=compute_11,code=sm_11 -gencode arch=compute_12,code=sm_12 -gencode arch=compute_13,code=sm_13"
	## NVCCFLAGS+=" -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=sm_21 -gencode arch=compute_20,code=compute_20"
	NVCCFLAGS+=" -gencode arch=compute_35,code=sm_35 -gencode arch=compute_35,code=compute_35 --use_fast_math"
	##NVCCFLAGS+=" -arch sm_50 --use_fast_math "
	##NVCCFLAGS+=" -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=compute_50 --use_fast_math "
...

To overcome Heisenbergs:
"You can't always get what you want / but if you try sometimes you just might find / you get what you need." -- Rolling Stones
ID: 1519994 · Report as offensive
Profile ML1
Volunteer moderator
Volunteer tester

Send message
Joined: 25 Nov 01
Posts: 20265
Credit: 7,508,002
RAC: 20
United Kingdom
Message 1520010 - Posted: 22 May 2014, 22:06:56 UTC - in response to Message 1519991.  



In what file do I comment out std_fixes.h and utils.h includes? I know how to do this, but I don't know what file they're in.


Find all files containing text std_fixes in your current directory:
"grep std_fixes *"

Someone might know the syntax for "find" command..

No need. Just use grep recursion:

"grep -r std_fixes *"


Another useful flag is "-i" to make the search case insensitive:

"grep -ri std_fixes *"


More details given by using:

"man grep"


Happy crunchin',
Martin
See new freedom: Mageia Linux
Take a look for yourself: Linux Format
The Future is what We all make IT (GPLv3)
ID: 1520010 · Report as offensive
Profile jason_gee
Volunteer developer
Volunteer tester
Avatar

Send message
Joined: 24 Nov 06
Posts: 7489
Credit: 91,093,184
RAC: 0
Australia
Message 1520019 - Posted: 22 May 2014, 22:32:08 UTC - in response to Message 1519928.  
Last modified: 22 May 2014, 22:35:18 UTC

...I don't know what a tag is in this case...


I suppose for an easy way to summarise what a tag is, it's like a snapshot, preferably of something that works.

Under the SVN source code repository mechanism, Boinc used to be developed in the main branch, then tags made of major releases (e.g. 6.10.58) that was quite a common way to do things under SVN.

Since Switching things to git, I don't think Boinc devs have yet adopted the more logical/flexible and less branch-phobic approaches that are possible under git, and they still develop in the master, 'tagging' occasionally.

There are many possible git workflows, but basically in most successful ones I've seen the master should represent stable/final releases only, and seperate specific branches made for new features, hotfixes, release rollouts in progress etc, subsequently merged back to the master branch when ready, in some cases cross-merged. old habits die hard I guess.

If Boinc had migrated to git by doing some reading and planning first, their approach might look more like the one in this blog post at http://nvie.com/posts/a-successful-git-branching-model/
"Living by the wisdom of computer science doesn't sound so bad after all. And unlike most advice, it's backed up by proofs." -- Algorithms to live by: The computer science of human decisions.
ID: 1520019 · Report as offensive
Profile jason_gee
Volunteer developer
Volunteer tester
Avatar

Send message
Joined: 24 Nov 06
Posts: 7489
Credit: 91,093,184
RAC: 0
Australia
Message 1520967 - Posted: 25 May 2014, 16:15:00 UTC - in response to Message 1520922.  
Last modified: 25 May 2014, 16:17:23 UTC

with the sleep thing, according to http://linux.die.net/man/3/sleep , sleep() is defined in unistd.h , so

#include <unistd.h> somewhere near the top of the file it's complaining about, ( analyzefuncs.cpp )

If you have that include file missing, you may not have all the generic headers installed. You'd need to look up how to get those, as mine would very likely be different.

So how do I get this

# git clone git://boinc.berkeley.edu/boinc-v2.git boinc

to

- use an older boincapi tag, such as a checkout of trusty old 6.10.58 tag.

?


Section titled "Check out a specific tag for compilation" here:
http://boinc.berkeley.edu/trac/wiki/SourceCodeGit

first list the tags available while in your boinc repo directory
#cd /your/boinc/repo
#git tag

look for 6.10.58, or similar and replace path in this with the chosen one
#git checkout client_release/7.2/7.2.9; git status

That switches your clone to the chosen snapshot (tag)

6.10.58 works fine with this build, though I'm likely to update some of the Linux build features in line with newer BoincApi once I can get some fixes into the tree myself.
"Living by the wisdom of computer science doesn't sound so bad after all. And unlike most advice, it's backed up by proofs." -- Algorithms to live by: The computer science of human decisions.
ID: 1520967 · Report as offensive
Profile ivan
Volunteer tester
Avatar

Send message
Joined: 5 Mar 01
Posts: 783
Credit: 348,560,338
RAC: 223
United Kingdom
Message 1520969 - Posted: 25 May 2014, 16:23:13 UTC - in response to Message 1520967.  

with the sleep thing, according to http://linux.die.net/man/3/sleep , sleep() is defined in unistd.h , so

#include <unistd.h> somewhere near the top of the file it's complaining about, ( analyzefuncs.cpp )

Yeah, that's the change I had to make to compile on this Mint system.
Linux HomePC01 3.8.0-35-generic #50-Ubuntu SMP Tue Dec 3 01:24:59 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

ID: 1520969 · Report as offensive
Profile jason_gee
Volunteer developer
Volunteer tester
Avatar

Send message
Joined: 24 Nov 06
Posts: 7489
Credit: 91,093,184
RAC: 0
Australia
Message 1520970 - Posted: 25 May 2014, 16:32:42 UTC - in response to Message 1520969.  

with the sleep thing, according to http://linux.die.net/man/3/sleep , sleep() is defined in unistd.h , so

#include <unistd.h> somewhere near the top of the file it's complaining about, ( analyzefuncs.cpp )

Yeah, that's the change I had to make to compile on this Mint system.
Linux HomePC01 3.8.0-35-generic #50-Ubuntu SMP Tue Dec 3 01:24:59 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux


My guess is autosetup/configure isn't finding that include on some systems (for whatever reasons), and so it disables the include elsewhere in another include file.
"Living by the wisdom of computer science doesn't sound so bad after all. And unlike most advice, it's backed up by proofs." -- Algorithms to live by: The computer science of human decisions.
ID: 1520970 · Report as offensive
Profile petri33
Volunteer tester

Send message
Joined: 6 Jun 02
Posts: 1668
Credit: 623,086,772
RAC: 156
Finland
Message 1521301 - Posted: 26 May 2014, 16:54:27 UTC - in response to Message 1521269.  
Last modified: 26 May 2014, 16:58:28 UTC

There is a test suite available from either Lunatics or Crunchers Anonymous. I have not checked if You are a member of either of those, but it would be easiest to download from those places. I'm not sure if it is available without a login.

It is a bunch of testWu's and a shell script that runs a reference/standard app and multiple your own apps one after another and displays the execution times and the validity of the results.

I'll check where to find the needed files (unless someone with more knowledge can answer immediately.) EDIT: Found it, please check if You can open it.

Can you open this link http://www.arkayn.us/forum/index.php?board=9.0 ?
To overcome Heisenbergs:
"You can't always get what you want / but if you try sometimes you just might find / you get what you need." -- Rolling Stones
ID: 1521301 · Report as offensive
Profile arkayn
Volunteer tester
Avatar

Send message
Joined: 14 May 99
Posts: 4438
Credit: 55,006,323
RAC: 0
United States
Message 1521469 - Posted: 27 May 2014, 2:34:55 UTC - in response to Message 1521301.  

There is a test suite available from either Lunatics or Crunchers Anonymous. I have not checked if You are a member of either of those, but it would be easiest to download from those places. I'm not sure if it is available without a login.

It is a bunch of testWu's and a shell script that runs a reference/standard app and multiple your own apps one after another and displays the execution times and the validity of the results.

I'll check where to find the needed files (unless someone with more knowledge can answer immediately.) EDIT: Found it, please check if You can open it.

Can you open this link http://www.arkayn.us/forum/index.php?board=9.0 ?


Yes, you can download without an account.

ID: 1521469 · Report as offensive
Profile HAL9000
Volunteer tester
Avatar

Send message
Joined: 11 Sep 99
Posts: 6534
Credit: 196,805,888
RAC: 57
United States
Message 1521615 - Posted: 27 May 2014, 20:02:02 UTC - in response to Message 1521611.  

Can you give me a hint where the test suite is located? I looked all around your site and can't find anything other than apps to download.

The link Petri provided (board=9.0) returns

The topic or board you are looking for appears to be either missing or off limits to you.

back to me.

Do I need to create an account?

Have you tried the Test and Benchmark Tools section on the lunatics site?
SETI@home classic workunits: 93,865 CPU time: 863,447 hours
Join the [url=http://tinyurl.com/8y46zvu]BP6/VP6 User Group[
ID: 1521615 · Report as offensive
Claggy
Volunteer tester

Send message
Joined: 5 Jul 99
Posts: 4654
Credit: 47,537,079
RAC: 4
United Kingdom
Message 1521616 - Posted: 27 May 2014, 20:04:06 UTC - in response to Message 1521611.  

You can get the Bench Suite from Test and Benchmark Tools at Lunatics, you need the KWSN Linux MB Bench v2.01.08, and the V7 MB test WUs 1 and V7 MB test WU 2 packages too,

Claggy
ID: 1521616 · Report as offensive
Previous · 1 · 2 · 3 · 4 · 5 · Next

Message boards : Number crunching : Compiling Applications for Linux


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