Package: petsc
Version: 2.2.0

I followed the instructions in the file README.Debian.gz found in the
package below:

---
[/var/cache/apt/archives] >  dpkg -c petsc2.2.0-doc_2.2.0-3_all.deb |
grep README.Debian.gz
-rw-r--r-- root/root      3200 2004-08-12 01:49:06
./usr/share/doc/petsc2.2.0-doc/README.Debian.gz
---

to compile the petsc library for the complex case. In particular, I did:

apt-get source petsc
cd petsc-2.2.0
fakeroot debian/rules PETSC_BOPT_EXTRA=_complex binary

I got an error like this:

---
libfast in: /home/lollo/tmp/petsc/install/petsc-2.2.0/src/vec/impls/seq
dvec2.c: In function `int VecMAXPY_Seq(int, const PetscScalar*, 
_p_Vec*,_p_Vec**)':
dvec2.c:613: error: cannot convert `PetscScalar' to `double' in assignment
dvec2.c:613: error: cannot convert `PetscScalar' to `double' in assignment
dvec2.c:613: error: cannot convert `double*' to `PetscScalar*' for argument `4' 
      to `void zgemv_(const char*, int*, int*, PetscScalar*,
      PetscScalar*, int*, PetscScalar*, int*, PetscScalar*, PetscScalar*, int*)'
dvec2.c:613: error: `daxpy_' undeclared (first use this function)
dvec2.c:613: error: (Each undeclared identifier is reported only once for each 
            function it appears in.)
dvec2.c:625: error: cannot convert `PetscScalar' to `double' in assignment
dvec2.c:625: error: cannot convert `PetscScalar' to `double' in assignment
dvec2.c:625: error: cannot convert `double*' to
    `PetscScalar*' for argument `4' 
      to `void zgemv_(const char*, int*, int*, PetscScalar*, PetscScalar*, 
int*, 
          PetscScalar*, int*, PetscScalar*, PetscScalar*, int*)'
dvec2.c:648: error: cannot convert `PetscScalar' to `double' in assignment
dvec2.c:648: error: cannot convert `PetscScalar' to
          `double' in assignment
dvec2.c:648: error: cannot convert `double*' to
                  `PetscScalar*' for argument `4' 
                     to `void zgemv_(const char*, int*, int*,
                     PetscScalar*, PetscScalar*, int*, 
                        PetscScalar*, int*, PetscScalar*, PetscScalar*,
                        int*)'
dvec2.c:648: error: cannot convert `PetscScalar' to `double' in assignment
dvec2.c:648: error: cannot convert `PetscScalar' to `double' in assignment
dvec2.c:648: error: cannot convert `double*' to `PetscScalar*' for argument `4' 
 to `void zgemv_(const char*, int*, int*,
                           PetscScalar*, PetscScalar*, int*, 
                              PetscScalar*, int*, PetscScalar*,
                              PetscScalar*, int*)'
ar: dvec2.o: No such file or directory
libfast in: /home/lollo/tmp/petsc/install/petsc-2.2.0/src/vec/impls/mpi
---

The problem, in my opinion, is due to the lines 137 and 139 in the file
axpy.h, where functions and variable declarations for "double"s are used
instead of the ones for "complex"s. See the following diff.

---
$> diff axpy_broken.h axpy.h

137c137
< daxpy_(&n,&a1,p1,&one,U,&one);}
---
>   BLaxpy_(&n,&a1,p1,&one,U,&one);}
139c139
<   double fone=1.0,aa[2];\
---
>   PetscScalar fone=1.0,aa[2];\
---

Applying this patch fixed the problem.
No errors were found compiling the PETSC_BOPT_EXTRA=_single and
PETSC_BOPT_EXTRA=_matsingle cases.

Regards,
Lorenzo Bolla

-- 
Lorenzo Bolla
PhD Student
University of Udine

Tel. +390432558292
Tel. +390498277719
e-mail: [EMAIL PROTECTED]
http://photonics.dei.unipd.it/~bolla/index.html
ICQ# 102838476

---
éç:ãéäçåéææååã
äè:éååïïïïïïïïïïï

            åä

æèäæéææïçåçåæïæéïåã
æåæååäçïåéæäåååã

            åä

æåééçåæïççæååäéã
åæäåææéïéååéçéåã
---

Reply via email to