[petsc-users] Could you add MatRealPart() and MatImaginaryPart( ) with SEQ- and MPI-Dense for me?

Yujie recrusader at gmail.com
Thu Feb 25 13:59:02 CST 2010


Dear Jed,

According to the codes you added, I added them in PETSc 3.0.0p8 I am using.
However, when I compile it, I get the following errors
"libfast in:
/home/yujie/codes/petsc-3.0.0-p8_complex/src/mat/impls/dense/seq/ftn-custom
libfast in: /home/yujie/codes/petsc-3.0.0-p8_complex/src/mat/impls/dense/mpi
mpidense.c:1583: error: invalid conversion from 'PetscErrorCode
(*)(_p_Mat*)' to 'PetscErrorCode (*)(_p_Mat*, _p_Mat*, _p_Mat*)'
mpidense.c:1583: error: invalid conversion from 'PetscErrorCode
(*)(_p_Mat*)' to 'PetscErrorCode (*)(_p_Mat*, PetscInt, const PetscScalar*)'
/usr/bin/ar: mpidense.o: No such file or directory
"
I use "C++" mode for compilation. In PETsc I am using , the codes are around
Line 1583:

"
/*100*/0,
       0,
       0,
       MatConjugate_MPIDense, //by Yujie
       0,
/*105*/0,
       MatRealPart_MPIDense,
       MatImaginaryPart_MPIDense,
       0,
       0
};  //here is 1583

EXTERN_C_BEGIN
#undef __FUNCT__
#define __FUNCT__ "MatMPIDenseSetPreallocation_MPIDense"
"
Thanks a lot.

Regards,
Yujie

On Thu, Feb 25, 2010 at 10:53 AM, Jed Brown <jed at 59a2.org> wrote:

> On Thu, 25 Feb 2010 12:43:35 -0600, Yujie <recrusader at gmail.com> wrote:
> > Dear Jed,
> >
> > Should You add the judgemnet to the complex number?
>
> It should be fine.  PetscConj, PetscRealPart, PetscImaginaryPart are
> defined without PETSC_USE_COMPLEX, and the loop is completely compiled
> out at high optimization levels.
>
> Jed
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20100225/361ff427/attachment.htm>


More information about the petsc-users mailing list