![]() |
Blitz Support : |
From: Julian Cummings (cummings_at_[hidden])
Date: 2004-03-16 14:11:59
Hi Daniel,
Depending upon how complex the array expressions in your code are,
things can get pretty out of hand with the compiler trying to inline
everything in sight. You may want to try messing with some of the
compiler flags related to inlining in order to reduce compile times to
something more reasonable. For example, the flag -fno-default-inline
will prevent the compiler from automatically inlining a class method
just because it was defined within the class definition. There are also
flags that adjust limits on the size of function to inline. In general,
inlining is good for performance and is crucial, but you need to walk
the line between key optimizations and those that take lots of compile
time and don't buy you much.
Is it your optimized code that is crashing or the compiler itself? The
compiler can crash if it runs out of memory while working. Again,
excessive inlining is often the culprit. If your optimized code fails,
try dropping down to -O2. The -O3 level includes some items that are
potentially unsafe and can alter results. In my experience, moving from
-O2 to -O3 brings little benefits from gcc, but it depends heavily on
what your code is doing.
Regards, Julian C.
Daniel Brewer wrote:
> Hi there,
> Yeah I thought as much. The optimisations I am using are:
> -Wall -O3 -mcpu=7450 -mtune=7450 -ftemplate-depth-30
>
> I wonder what is going wrong.
>
> Daniel
>
> On 16 Mar 2004, at 1:33 pm, Xavier WARIN(Compte LOCAL) - I23 wrote:
>
>> Hi Daniel,
>>
>> Of course, it works with optimization.... on linux and windows.
>> I don't use Mac OS but what kind of compiler do you use ?
>> gcc, Code Warrior ?
>> What options did you try for optimization ?
>>
>> Sincerely
>>
>> Xavier Warin
>>
>> Daniel Brewer wrote:
>>
>>> Hi,
>>> First off congratulations on attempting to produce a fast array
>>> class for C++. I am trying to get this to work with on Mac OS X
>>> 10.3 with an equation/embedded RK framework.
>>> Does Blitz work well with optimisation? The reason I ask is that
>>> with out optimisations and -g it takes reasonably long to compile a
>>> minute or so but works fine (if very slow).
>>> With optimisations though:
>>> 1) It takes hours to compile (G5 with 1GB memory)
>>> 2) It crashes out with a segment fault (even though it did not do
>>> this without optimisation)
>>> I am new to this game so perhaps I am doing something terribly
>>> wrong. I am using inheritence so maybe it is that.
>>> Any opinions would be gratefully received.
>>> Thanks
>>> -- Dan Brewer
>>> http://www.brewer.me.uk
>>> LFS ID: 5309
>>> GPG fingerprint:
>>> D2B6 DE30 530B 6C5D C96B 9506 9A6F F054 299E 1B6C
>>> -- _______________________________________________
>>> Blitz-support mailing list
>>> Blitz-support_at_[hidden]
>>> http://www.oonumerics.org/mailman/listinfo.cgi/blitz-support
>>
>>
>> _______________________________________________
>> Blitz-support mailing list
>> Blitz-support_at_[hidden]
>> http://www.oonumerics.org/mailman/listinfo.cgi/blitz-support
>
>
>
> _______________________________________________
> Blitz-support mailing list
> Blitz-support_at_[hidden]
> http://www.oonumerics.org/mailman/listinfo.cgi/blitz-support
-- Dr. Julian C. Cummings E-mail: cummings_at_[hidden] California Institute of Technology Phone: 626-395-2543 1200 E. California Blvd., Mail Code 158-79 Fax: 626-584-5917 Pasadena, CA 91125