[petsc-users] petsc4py: PetSc is no longer initialised when calling C Function from Cython

Jeff Wiens jeffrey.k.wiens at gmail.com
Fri Oct 21 11:02:23 CDT 2011


On Fri, Oct 21, 2011 at 6:53 AM, Lisandro Dalcin <dalcinl at gmail.com> wrote:
> BTW, have you ever used SWIG? If the functions you need to wrap are
> simple (let say, any PetscObject subtype and scalar paramenters) you
> can get your wrappers with less code to write on your side.

I have heard very little about SWIG. I will take a look at it. The
PETSc program that I'm trying to encapsulate is far from simple. If
SWIG can only handle simple functions, it probably won't be very
helpful.

BTW, I removed the dynamic flag --with-dynamic from my PETSc
installation. For some reason, my test program didn't work (the first
time) when I installed PETSc with only the --with-shared option.
However, I must have changed something else because it worked the
second time I tried re-installing PETSc.

Jeff


More information about the petsc-users mailing list