Re: Re: The support of log double

Barry Smith bsmith at
Tue Dec 5 07:25:48 CST 2006

 Please see the message I posted yesterday.

Date: Mon, 4 Dec 2006 19:51:20 -0600 (CST)                                                                                         From: Barry Smith <bsmith at>                                                                                             To: petsc-users <petsc-users at>                                                                                          Subject: Re: [gb2312] The support of log double                                                                                                                                                                                                                                                                                                                                                            G.D.                                                                                                                                                                                                                                                                   You can compile PETSc to use long double with the additional                                                                    configure/ options --with-precision=longdouble                                                                         --download-c-blas-lapack                                                                                                                                                                                                                                                It compiles a special version of Blas/Lapack for long double.                                                                                                                                                                                                       

On Tue, 5 Dec 2006, Gong Ding wrote:

> I'd like to thank the developers of PETSC. 
> I had spent years to develop a semiconductor
> simulation code which based on PETSC. The code is
> carefully checked by valgrind and no memory
> problem should exist.
> In semiconductor, the magnitude of carrier density
> differs much. When the electron density is 10e18,
> the hole density is only 10e2. The sum/sub of two
> variables may have float precision problem and in
> my code, a lot of parameters must be computed with
> density arguments. In most of the situation, my
> code works fine with both gcc/icc except a
> heterojunction BJT example. The code generated by
> icc works but not work with gcc. I guess the float
> point precision in gcc is not enough. (I found a
> ¡°long double¡± description in the configure file of
> icc. Does icc use long double internally?) 
> Unfortunately, icc is not free. I have to make gcc
> work. I¡¯d like to try petsc with long double. 
> Another requirement, can PETSC functions support
> different ¡°scalar type¡±? For example, by adding a
> postfix letter as BLAS?  The semiconductor code
> needs ¡°real¡± value but I¡¯d like to add optical
> modular which needs ¡°complex¡± value. At present, I
> can only link real lib. As a result, I have to do
> a lot of work on complex->real.   
> Yous
> G.D.
> --
> USTC Alumni Email System 

More information about the petsc-users mailing list