[petsc-dev] [petsc-maint #129715] __float128 complex

Jose E. Roman jroman at dsic.upv.es
Fri Aug 24 10:53:48 CDT 2012


El 24/08/2012, a las 13:57, Alexander Grayver escribió:

> Jose,
> 
> Thanks!
> 
> One issue. I saw there is special treatment for quad precision in PetscBinaryRead:
> 
> #if defined(PETSC_USE_REAL___FLOAT128)
>  double            *ppp;
> #endif
> ...
> #if defined(PETSC_USE_REAL___FLOAT128)
>  /* If using __float128 precision we still read in doubles from file */
>  if (type == PETSC_SCALAR) {
>    m    = m/2;
>    ierr = PetscMalloc(n*sizeof(double),&ppp);CHKERRQ(ierr);
>    pp   = (char*)ppp;
>  }
> #endif
> 
> As far as I can see it doesn't take into account complex numbers currently?

I guess PETSC_SCALAR should be correctly defined for the case complex+__float128 in petscsys.h. Maybe a new PetscDataType PETSC___COMPLEX128? This would require changing PetscMPIDataTypeToPetscDataType and then PetscBinaryRead...

It is better if someone else can be in charge of this change.

Jose




More information about the petsc-dev mailing list