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

Alexander Grayver agrayver at gfz-potsdam.de
Fri Aug 24 06:57:36 CDT 2012


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?

On 23.08.2012 18:02, Jose E. Roman wrote:
> I have pushed a change to petsc-dev that allows to configure --with-precision=__float128 --with-scalar-type=complex
>
> I have tested this with src/ksp/ksp/examples/tutorials/ex12.c with 1 and 2 processes. It seems to work.
>
> Please review the change, since I had to modify pinit.c
>
> A couple of comments:
>
> 1) The f2cblaslapack interface to quad precision subroutines (q* and w*) is defined only in the case of "uscore" mangling. Maybe a test in configure should assure this.
>
> 2) I could not make it work --with-clanguage=c++ - I get compilation errors like this. Any idea?

-- 
Regards,
Alexander




More information about the petsc-dev mailing list