Seti@Home optimized science apps and information
 
Welcome, Guest. Please login or register.
Did you miss your activation email?
05 Sep 2008, 04:14:40 am

Login with username, password and session length
 
If you've registered already but never got your activation email, please click here.
 
 
Seti@Home optimized science apps and information  |  Optimized Seti@Home apps  |  Windows  |  Topic: BOINC as library 0 Members and 0 Guests are viewing this topic. « previous next »
Pages: [1] 2 3 Go Down Print
Author Topic: BOINC as library  (Read 3910 times)
Raistmer
Code Wizard
Knight who says 'Ni!'
*****
Offline Offline

Posts: 815



View Profile
BOINC as library
« on: 11 Oct 2007, 05:11:56 pm »

I wonder maybe it's worth to distribute boinc as set of libs to link with (for windows) and headers to include (just as usual API-library)?
Just to reduce initial compilation time (and time spent on efforts to make it compile Wink ).

For example gutil_text.C from BOINC 5.5 (sources taken from this site) failed to compile with Intel(R) C++ 10.0.027 [IA-32] used with MS VS 2005 .
Error message:
..\..\..\boinc\api\gutil_text.C(335): error: a value of type "const char *" cannot be used to initialize an entity of type "char *"
      char* q = strchr(p, '\n');
                ^
(this line from next function
void MOVING_TEXT_PANEL::set_text(int lineno, const char* p) {
    char* q = strchr(p, '\n');
    while (p) {
        if (q) *q = 0;
        strlcpy(text[lineno++], p, 256);
        if (!q) break;
        p = q+1;
        q = strchr(p, '\n');
    }
}
)
Logged
Jason G
Global Moderator
Knight who says 'Ni!'
*****
Offline Offline

Posts: 1684


View Profile
Re: BOINC as library
« Reply #1 on: 11 Oct 2007, 05:53:25 pm »

LOL, and the rest of the errors.  I think they should just clean up the source and we can build our own to our own optimisation settings.  which version of boinc api did you use?[I see now, 5.5 sources]  I had the same issues... (VS2005 w/ ICC&IPP)

-  so what did you do about the const char * one ?

-  what about-  position_history(0) on line 126 of seti_header.cpp ?

(just curious to see if you did the same as I did Cheesy, I'd have to go back and look what I did and compare)

Jason
« Last Edit: 11 Oct 2007, 06:25:10 pm by j_groothu » Logged
Raistmer
Code Wizard
Knight who says 'Ni!'
*****
Offline Offline

Posts: 815



View Profile
Re: BOINC as library
« Reply #2 on: 11 Oct 2007, 06:31:04 pm »

For now I just downloaded 5.10.20 release sources Smiley
So libboincapi compiles w/o errors now but setiboincdb leads to error:
"
..\..\db\xml_util.cpp(641): error: identifier "strlcpy" is undefined
        strlcpy(tmp_tag,tag,BUFSIZ);
        ^
"
It seems some include line or define is missing.... strange, uncompilable release?  Shocked

About seti_header.cpp : got such error
"
seti_header.cpp
compilation aborted for ..\seti_header.cpp (code 4)
Command-line error: cannot open precompiled header input file Release32-NoGFX-xP\KWSN_2.3S9_MB_SSE.pchi
"
I use MS VS very occasionally so need some time to understand why compilation is bothered by lack of precompiled header at fresh build run... why it cant generate new precomp header?  Undecided

P.S. Ah, generate precomp headers  was just turned off Smiley So now it complains only about "ipp_t7.h" missing (i use eval version of IPP so probably need to edit all these includes ).
No mention of position_history in errors log so far.
« Last Edit: 11 Oct 2007, 06:40:45 pm by Raistmer » Logged
Jason G
Global Moderator
Knight who says 'Ni!'
*****
Offline Offline

Posts: 1684


View Profile
Re: BOINC as library
« Reply #3 on: 11 Oct 2007, 06:55:41 pm »

first have a look in Util.h line 31, and see if the #if !defined(HAVE_STRLCOPY)) , is active... if it is then implementation in util.c will be active too.  If those aren't active then HAVE_STRLCOPY is defined, you can 'find in files' to locate the definition if there is one.  If it is defined then maybe a wrong preprocessor definition is there (e.g _GCC or _MSCVER)

that bit was okay for me.

The precompiled headers need to be generated at least the first time,  In the master projects I just set them on the C++ section -> Precompiled Headers to 'Create Precompiled Headers' and left them there for now.  It'll save time to change it back later when you build pieces often, but don't need to alter the headers anymore.
[ I see you found this -- Good one Cheesy]

For now you probably do need to creat them(because they aren't there, and) because some of the includes and defines are messed up.

[The Intel Include will be processor specific, chosen by ICC,  just add the right directory in your 'additional include directories' to your ICC installation, and add IPP for good measure Cheesy]




« Last Edit: 11 Oct 2007, 06:59:20 pm by j_groothu » Logged
Raistmer
Code Wizard
Knight who says 'Ni!'
*****
Offline Offline

Posts: 815



View Profile
Re: BOINC as library
« Reply #4 on: 11 Oct 2007, 07:17:39 pm »

thanks  Smiley
I found that addition of
#include "str_util.h"
line to xml_util.cpp heals setiboincdb project.
tomorrow will continue with IPP.
Logged
Raistmer
Code Wizard
Knight who says 'Ni!'
*****
Offline Offline

Posts: 815



View Profile
Re: BOINC as library
« Reply #5 on: 18 Oct 2007, 01:41:52 pm »

It took some more to return %)
Well, after some edition of include statements I got all solution to compile but now have some errors on link stage.
"
Linking... (Intel C++ Environment)
ipo: error #11033: Fatal error cannot open Release32-NoGFX-xP/analyzeFuncs.obj
xilink: error error_during_IPO_compilation: problem during multi-file optimization compilation (code 1)
xilink: error error_during_IPO_compilation: problem during multi-file optimization compilation (code 1)
"
And there is no analyzeFuncs.obj indeed! I tried to compile it as single file, it compiles OK, but still no obj anywhere... Any ideas?
Logged
Jason G
Global Moderator
Knight who says 'Ni!'
*****
Offline Offline

Posts: 1684


View Profile
Re: BOINC as library
« Reply #6 on: 18 Oct 2007, 05:10:12 pm »

Maybe the IPP include directories for the static libs (intel), for the seti_boinc project ?:
Quote
C:\Program Files\Intel\IPP\5.1\ia32\tools\staticlib
C:\Program Files\Intel\IPP\5.1\ia32\include
C:\Program Files\Intel\Compiler\C++\9.1\IA32\Include
(On my machine, you'll be different location or IPP version)


A small thing that was broken in my first attempts (that might relate to analysefuncs)  was:
    - The cmath include was defined as nothing and there are duplicates in multiple places .  In the code I have the #define in one of the config.h' files was commented out and marked 'more work needed.'

The 'more work needed' is to realise that MATH_LIB is multiply included in some files (breaking comoilation if wanting intel MKL) . Commenting out a few #include 'math.h' (which should say MATH_LIB anyway,  is a once only per module deal, and  has already been included in one of the configs.).  Fixing CMATH include to point to cmath from microsoft (not mkl, it doesn't have one) fixes something too (if using MKL.)



« Last Edit: 18 Oct 2007, 05:18:45 pm by j_groothu » Logged
Jason G
Global Moderator
Knight who says 'Ni!'
*****
Offline Offline

Posts: 1684


View Profile
Re: BOINC as library
« Reply #7 on: 18 Oct 2007, 05:30:31 pm »

Hmm did a quick search on that error you mention.  If you check the buildlog.htm it might say something about 'could not open' a certain file.

Indications are this maybe occurs when either there is not proper access rights to the TEMP directory,  or that VS2005 was installed in a different login account
Logged
Raistmer
Code Wizard
Knight who says 'Ni!'
*****
Offline Offline

Posts: 815



View Profile
Re: BOINC as library
« Reply #8 on: 18 Oct 2007, 05:34:53 pm »

Well, think no static libs cause I use trial version of IPP that supports only dynamic linkage. And I doesnt use MKL at all.
What makes me curious is why compiler doesnt ganerate object file for source file that compiled OK (w/o any errors).
Logged
Raistmer
Code Wizard
Knight who says 'Ni!'
*****
Offline Offline

Posts: 815



View Profile
Re: BOINC as library
« Reply #9 on: 18 Oct 2007, 05:36:23 pm »

"Could not open" just means the file doesnt exists at all. And why it doesnt exists.... ?  Shocked

(I use admin account, the same that I used for VS installation, no special access rights was applied )

P.S.
Full output:

Output Window      Compiling with Intel(R) C++ 10.0.027 [IA-32]... (Intel C++ Environment)
gaussfit.cpp
seti_header.cpp
analyzeReport.cpp
pulsefind.cpp
timecvt.cpp
analyzePoT.cpp
schema_master.cpp
progress.cpp
chirpfft.cpp
sah_gfx_base.cpp
sah_gfx.cpp
worker.cpp
spike.cpp
s_util.cpp
malloc_a.cpp
analyzeFuncs.cpp
lcgamm.cpp
main.cpp
gdata.cpp
seti.cpp
version.cpp
Linking... (Intel C++ Environment)
ipo: error #11033: Fatal error cannot open Release32-NoGFX-xP/analyzeFuncs.obj
xilink: error error_during_IPO_compilation: problem during multi-file optimization compilation (code 1)
xilink: error error_during_IPO_compilation: problem during multi-file optimization compilation (code 1)
 
As one can see, analyzeFuncs.cpp was compiled w/o errors, but no analyzeFuncs.obj exist.
« Last Edit: 18 Oct 2007, 05:45:01 pm by Raistmer » Logged
Jason G
Global Moderator
Knight who says 'Ni!'
*****
Offline Offline

Posts: 1684


View Profile
Re: BOINC as library
« Reply #10 on: 18 Oct 2007, 05:53:27 pm »

Well just to see if it maybe is in the compiler stage not producing .obj,  or putting it in the wrong location,  maybe turn on assembly output .asm file for analyzefuncs.cpp  and see where that goes.... (with just a recompile of that file, not a link.)

 the output directories for asm and object files on mine [analyzefuns.cpp, C++ output files]  are set to '$(Intdir)' which I beleive is inherited, so they should be in the release directory (analyzefuncs.obj is sitting there in mine)

Jason
« Last Edit: 18 Oct 2007, 06:03:04 pm by j_groothu » Logged
Raistmer
Code Wizard
Knight who says 'Ni!'
*****
Offline Offline

Posts: 815



View Profile
Re: BOINC as library
« Reply #11 on: 18 Oct 2007, 06:12:02 pm »

Wow I just did what you suggest to do Smiley
I turned on asm output (as verbose as it could be - /FAcs option) , replaced $(Intdir) with '.' and compiled again... No obj, no asm....
Only these files was found :
analyzeFuncs.cpp
analyzeFuncs.h
analyzeFuncs.i
seti_boinc-analyzeFuncs.Po

And nothing more with analyzeFuncs in the file name ...
Logged
Jason G
Global Moderator
Knight who says 'Ni!'
*****
Offline Offline

Posts: 1684


View Profile
Re: BOINC as library
« Reply #12 on: 18 Oct 2007, 06:18:54 pm »

Well that IS wierd  Shocked.  The only thing I can think of is that somehow Analysefuncs is set to exclude from build.

What happens if you 'clean only' seti_boinc solution then only comple analyzefuncs? same thing ?
Logged
Raistmer
Code Wizard
Knight who says 'Ni!'
*****
Offline Offline

Posts: 815



View Profile
Re: BOINC as library
« Reply #13 on: 18 Oct 2007, 06:24:18 pm »

Yes, the same. It tried to build only one project, to compile only one analyzeFuncs.cpp file, even to switch back to VS-style project and compile analyzeFuncs.cpp via MS compiler.
Results the same (exept MS compiler complained about unknown options
------ Build started: Project: seti_boinc, Configuration: Release32-NoGFX-xP Win32 ------
Compiling...
cl : Command line warning D9002 : ignoring unknown option '/Qprec-div-'
cl : Command line warning D9002 : ignoring unknown option '/Qprec-sqrt-'
cl : Command line warning D9002 : ignoring unknown option '/QxW'
analyzeFuncs.cpp
) no analyzeFuncs.obj was generated.
Logged
Jason G
Global Moderator
Knight who says 'Ni!'
*****
Offline Offline

Posts: 1684


View Profile
Re: BOINC as library
« Reply #14 on: 18 Oct 2007, 06:33:12 pm »

one small difference there.... I am doing a release QxW , and mine goes to the xW Release directory,  Shouldn't yours be set to /QxP and be going to the Release xP ?... maybe that compiler command line.
Logged
Pages: [1] 2 3 Go Up Print 
Seti@Home optimized science apps and information  |  Optimized Seti@Home apps  |  Windows  |  Topic: BOINC as library « previous next »
Jump to:  


Quote!
There are three kinds of lies: lies, damned lies, and statistics.
- Benjamin Disraeli

 
Site Statistics
Total Members:1,021
Total Posts:9,117
Total Topics:425
Downloads
Apps
Windows R-1.x25,067
Windows R-2.020,291
Windows R-2.236,400
Linux 32bit 1.x6,527
Linux 32bit 2.24,305
Linux 64bit 2.21,714
Alpha/IA64187
FreeBSD581
HPUX323
Subtotal:94,304
Source packs:4,071
Tool/WU packs:7,680
Total:150,614
GBs dl'd:279.10
Pages served
Today:442
Total:3,093,851
(since 6/26/2006)
173 Donations to S@H
U.S. Dollars:3,196.59
Euros:863.90
Last 24h:$ 0.00
Avg./24h:$ 7.54
Estim. total:$ 4,319.66
Latest Member:
fos
 
 
Seti@Home optimized science apps and information | Powered by Enigma 2.0 (RC1).
© 2003-2008, LSP Dev Team. All Rights Reserved.
Seti@Home optimized science apps and information Forums | Powered by SMF.
© 2005, Simple Machines LLC. All Rights Reserved.
Powered by MySQL Powered by PHP Valid XHTML 1.0! Valid CSS!