[petsc-users] petsc4py: PetSc is no longer initialised when calling C Function from Cython
Lisandro Dalcin
dalcinl at gmail.com
Thu Oct 20 18:51:53 CDT 2011
On 20 October 2011 19:34, Jeff Wiens <jeffrey.k.wiens at gmail.com> wrote:
> Lisandro, the shared library was the problem. I seem to have
> everything working by including the --with-shared and --with-dynamic
> options in my PetSc 3.1 configuration.
>
The --with-dynamic stuff should not be required, and I think it's
better if you remove it.
> Note, I had to make significant modifications to your setup.py file
> for your cython demo to work (on my installation).
>
Expected
> I have attached my
> setup.py file, which is based on code I found in PyClaw. The main
> differences is overloading:
> build_src.build_src.generate_a_pyrex_source = generate_a_cython_source
> and including the following directories:
> INCLUDE_DIRS +=["/PATH/To/openmpi/1.4.3/include"]
> INCLUDE_DIRS += ["/PATH/To/hdf5/1.8.5-patch1/include"]
>
> Thanks for your help. It saved me a LOT of time.
> Jeff
>
I'll take a look at your setup.py, thanks!
--
Lisandro Dalcin
---------------
CIMEC (INTEC/CONICET-UNL)
Predio CONICET-Santa Fe
Colectora RN 168 Km 472, Paraje El Pozo
3000 Santa Fe, Argentina
Tel: +54-342-4511594 (ext 1011)
Tel/Fax: +54-342-4511169
More information about the petsc-users
mailing list