This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Gfortran didn't support ABS intrinsic?
- From: Tianwei <tianwei dot sheng at gmail dot com>
- To: tprince at computer dot org
- Cc: "GCC Fortran mailing list" <fortran at gcc dot gnu dot org>
- Date: Mon, 17 Nov 2008 13:22:40 +0800
- Subject: Re: Gfortran didn't support ABS intrinsic?
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=8QRwUhMLihm67IfTkTxEVnzv+w3hKMfafrW4FnjDJTY=; b=osqqi92I7MrVXFnhnf3fJefaCcHcc2X4iKrm8/wFloRstvZAzjWZCrAKM9BmPRV50x 30FxUfeSSNv1nFhr6VQG6VOCRcAZNoJE+YFjy63gGg1BrPQHpLtk5ch5l2qJxgMmpAlf czx5jlEGEDteCh0wAsz05rGo9zRCAEu0lRsD8=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=c5h5rSIY8E7nRm3WR7+SkGSx5DH55n5qwf0vXKwFZu6wzifd8oNl31WMz+DPh8cG0M sPvZBg0NGhlH6Q4Wua9mh5EjwF6QM8jfiUNermj9vEO71XbFoHvFDFqqX+TRtErkTM1w Hz/r/SgYARLM/fBwgQIFATJvVY/YPbD2XIQNo=
- References: <7618fe50811161945q14e35958w9a5c08301a5f3bff@mail.gmail.com> <4920F8BE.8080103@sbcglobal.net>
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.