[petsc-dev] [petsc-maint #129715] __float128 complex
Jose E. Roman
jroman at dsic.upv.es
Wed Aug 22 11:52:50 CDT 2012
f2cblaslapack is more or less prepared for this case already (it is not much tested though, we will make some tests for the w* subroutines tomorrow).
What is not ready is PETSc itself. Some definitions are missing. For instance, PetscScalar is undefined, so one should add the following to petscmath.h:106:
#elif defined(PETSC_USE_REAL___FLOAT128)
typedef __complex128 PetscScalar;
#define PetscRealPart(a) crealq(a)
#define PetscImaginaryPart(a) cimagq(a)
#define PetscAbsScalar(a) cabsq(a)
#define PetscConj(a) conjq(a)
#define PetscSqrtScalar(a) csqrtq(a)
#define PetscPowScalar(a,b) cpowq(a,b)
#define PetscExpScalar(a) cexpq(a)
#define PetscLogScalar(a) clogq(a)
#define PetscSinScalar(a) csinq(a)
#define PetscCosScalar(a) ccosq(a)
Similarly, MPIU_SCALAR should be defined. Maybe other as well.
Jose
El 22/08/2012, a las 15:04, Barry Smith escribió:
>
> The f2cblaslapack is generated by the script bin/maint/toclapack.sh from BLAS/LAPACK source code.
>
> Jose and his students fixed up the support for __float128; presumably it could be extended to __complex128 also with some tweaking.
>
>
> Barry
>
>
>
> On Aug 22, 2012, at 6:52 AM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
>
>> GNU __float128 does not work with complex. There is __complex128 (why they
>> chose to implement this way, I do not understand), but we have not written
>> that support yet. You can "watch" this issue to get notified when it's done
>>
>> https://bitbucket.org/petsc/petsc-dev/issue/6/support-for-complex-with-128-bit-precision
>>
>> Barry, is just doing text substitution to f2cblaslapack the right approach
>> there?
>>
>> On Wed, Aug 22, 2012 at 3:38 AM, Alexander Grayver
>> <agrayver at gfz-potsdam.de>wrote:
>>
>>> Hello petsc team,
>>>
>>> I've tried to compile petsc-3.3-p2 with __float128 precision and complex
>>> scalar type. The configure stage went through, but during make there are
>>> errors.
>>> See attached make.log
>>>
>>> Any ideas?
>>>
>>> --
>>> Regards,
>>> Alexander
>>>
>>>
>>>
>>
>
More information about the petsc-dev
mailing list