This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Gfortran didn't support ABS intrinsic?


Hi, Steve,
   thanks for your reply.

On Mon, Nov 17, 2008 at 2:06 PM, Steve Kargl
<sgk@troutmask.apl.washington.edu> wrote:
> On Mon, Nov 17, 2008 at 01:22:40PM +0800, Tianwei wrote:
>>   Thanks, sorry for posting this to the wrong mail list. "-ffast-math"
>> works, I'm re-testing the whole lapack package.
>
> Beware -ffast-math may be named incorrectly.  In many cases, it
> translates to -fwrong-math.
>
>> I'm not familiar with Fortran Language. I just found that Fortran
>> lapack perform better than C-lapack and Atlas lapack, but Gfortran
>> still has some performance gap compared with other fortran compiler.
>
> This assertation does not make sense.  Atlas is an optimized
> implementation of the BLAS routines with only a few LAPACK
> routines.   Combining a tuned ATLAS with the LAPACK code from
> netlib should give you very good performance.
>
I also suspect that. I just built ATLAS as the manual said, and mixed
the built library with the offical Lapack, then run the 78 testcase in
the offical Lapack package(under the TESTING directory), finally sum
up all the timing result. but i built the ATLAS with openf90 compiler,
i don't know if it's the problem, but as the Atlas's paper said, the
built compiler doesn't matter very much.
>> the test is "xlintstz" which is for double precison complex liner
>> equation. Other compiler all did this optimization by default, also
>> there is an intrinsic statement in the .f file:
>> zlange.f:
>>  83 *     .. Intrinsic Functions ..
>>  84       INTRINSIC          ABS, MAX, MIN, SQRT
>
> What's your point?  gfortran correctly recognizes ABS as
> an intrinsic procedure.  gfortran may call a library
> routine for CABS where it is expected that CABS correctly
> handles rounding/overflow issues.
>
My point is that why other compiler all set "-ffast-math" by default,
and the user don't have to specify "-ffast-math " to enable this
intrinsic.  Maybe it's an unsafe optimizaiton, if this is the case,
other compiler shouldn't enable them at -O3 level by default.

Thanks.

Tianwei
> --
> Steve
>



-- 
Sheng, Tianwei
Inst. of High Performance Computing
Dept. of Computer Sci. & Tech.
Tsinghua Univ.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]