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?


On Mon, Nov 17, 2008 at 12:53 PM, Tim Prince
<TimothyPrince@sbcglobal.net> wrote:
> Tianwei wrote:
>> Hi, all,
>>   I built the latest Lapack package which latest gfortran, and use
>> profiling to see the hotspot, and found that the final binary spent a
>> lot of time on the libm-2.7.so, after binary searching, i found that
>> for the following source code(i attached the .f file):
>> (1) source code snippets: gfortran -O3 zlange.f -S
>
>>         call    cabs
>>
>
>> (5) i search the web, and found that gfortran should support this
>> intrinsic, anyone can give me some suggestions for this problem?
>>
> This is an rtfm, with explanations better suited to gcc-help or gfortran
> mail lists.
> If you mean you want fast in-line code with restricted range, which
> doesn't pass test suites, set -ffast-math.
> If you want in-line code with promotion to real(10) so as to protect
> range, without resorting to division, write it in yourself.
>
> If anyone has found satisfactory filters to sort legitimate mail from the
> usual gmail garbage in t-bird, please let me know.
>
Hi, Tim,
  Thanks, sorry for posting this to the wrong mail list. "-ffast-math"
works, I'm re-testing the whole lapack package.
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.
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

Tianwei


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