forum@abinit.org
Subject: The ABINIT Users Mailing List ( CLOSED )
List archive
- From: Anglade Pierre-Matthieu <anglade@gmail.com>
- To: forum@abinit.org
- Subject: Re: [abinit-forum] real*16 for double precision
- Date: Fri, 20 Nov 2009 10:27:23 +0100
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=a0G1bFszh0KVW/cgBT8/UgHH9T71aMkl/PyCBoSqx1fniMhIcJX9sYkcXHFgPJ2dX2 7ar/bVlkjPqwIcLBNY0sUU8JlfHyg/PsGJAYkuuQ1RlhZjZctd+JP30V8AmGgrSuefjZ GqoxnM047f7WAFjKzcYX/1RA5NfQwZz48zmS8=
Hi,
Two years ago, I have worked on enabling the compilation of abinit
with 128 bit precision for dp numbers. This option was supposedly
easily enabled in Abinit by changing the line
" integer, parameter :: dp=kind(1.0d0)"
to
" integer, parameter :: dp=kind(1.0q0)"
int 10_defs/defs_basis.F90
Unfortunately since this choice has never been used and tested things
are not that easy.
At that time my work to enable compilation in such a case was
commited to the Abinit source. So it was possible to compile
completely abinit with 128 bit floating point numbers. Yet, at the
time I have not find time to provide 128 bit enabled versions of the
BLAS and other libraries used by Abinit... So, it was impossible to
run any calculation with 128 bit enabled Abinit. Moreover, after that
Abinit has undergone large changes from numerous contributors and it
is likely that some of the practice that where threat to 128 bit
compilation have reappeared.
All in all, you'll have a lot of work and testing awaiting you if you
want to make a 128 bit enabled version of Abinit.
regards
PMA
On Thu, Nov 19, 2009 at 5:15 PM, Tobias Burnus <burnus@net-b.de> wrote:
> On 11/19/2009 10:34 AM, nathan@lstc.com wrote:
>> Intel FORTRAN has an option causing doubles to be real*16.
>
> I want to remark that on x86/x86-64 (contrary to e.g. PowerPC) the
> hardware does not support 128bit floating point numbers ("real(16)")
> (while thanks to the x87 legacy 80bit ("real(10)") are supported). Thus
> the Intel Fortran compiler emulates real-16 in software (which is better
> than it sounds as some operations work relatively fast). [By contrast
> gfortran offers "real(10)" for 80bit floating point numbers.]
>
> Regarding "causing doubles to be real*16": It sounds as if you use
> "-real-size 128". Note that then only "double precision" and "1.0d0"
> will be promoted to 128 bit while "1.0_dp" and "real(dp)" will remain at
> the "dp" kind. Depending on how "dp" is set, it may or may not be
> affected (e.g. dp = selected_real_kind(14) keeps it at double precision
> while "dp = kind(0.0d0)" promotes it to quadruple precision).
>
> Admittedly, I have not studied the Abinit source code in detail, but I
> wouldn't be surprised if there were assumptions that kind(0.0d0) and
> selected_real_kind(14) and C's "double" are _all_ the same. Thus it
> might break due to violating such an assumption. You may also need to
> re-compile all libraries which are invoked, such as BLAS/LAPACK - and if
> there is a library written in C, you need to convert real(16) into
> real(8) before calling it. (In principle, real(10)/real(c_long_double) =
> "long double" would work for some C functions, though I do not know
> whether ifort supports this by now)
>
> Tobias
>
--
Pierre-Matthieu Anglade
- [abinit-forum] real*16 for double precision, nathan, 11/19/2009
- Re: [abinit-forum] real*16 for double precision, Tobias Burnus, 11/19/2009
- Re: [abinit-forum] real*16 for double precision, Anglade Pierre-Matthieu, 11/20/2009
- Re: [abinit-forum] real*16 for double precision, Tobias Burnus, 11/19/2009
Archive powered by MHonArc 2.6.16.