[petsc-users] petsc4py Build Problem

Lisandro Dalcin dalcinl at gmail.com
Mon Jun 8 07:11:47 CDT 2015


On 8 June 2015 at 02:50, Mikhail Khodak <mkhodak at princeton.edu> wrote:
> Hello, I am trying to build petsc4py-3.5.1 using Cygwin on 64-bit Windows 7.
> I have built PETSc 3.5.4 with shared and dynamic libraries using
> mpich2-1.2.1 and successfully ran the installation tests. I am using Python
> 2.7 and NumPy 1.9.2 and have installed mpi4py. However, when I attempt to
> install petsc4py (both with pip and distutils) I get a mpicc compiler error
> due to undefined references/symbols. I have attached the output of running
>
> pip install petsc petsc4py --allow-external petsc --allow-external petsc4py
>

I've never ever built or test petsc4py under Cygwin. The errors you
see are expected.
Perhaps you can manually workaround the issues following the following steps:

1) Download the petsc4py tarball and unpack it.
2) Open the file "src/libpetsc4py/libpetsc4py.h", add remove all
occurences of DL_IMPORT, i.e, replace DL_IMPORT(XYZ) for just XYZ
3) Use pip again:

pip install petsc
pip install .

The last line assumes your current working directory is the one having
petsc4py's setup.py

Finally, I do not guarantee this will work. I'm just guessing,
petsc4py never explicitly supported Windows and/or Cygwin.


-- 
Lisandro Dalcin
============
Research Scientist
Computer, Electrical and Mathematical Sciences & Engineering (CEMSE)
Numerical Porous Media Center (NumPor)
King Abdullah University of Science and Technology (KAUST)
http://numpor.kaust.edu.sa/

4700 King Abdullah University of Science and Technology
al-Khawarizmi Bldg (Bldg 1), Office # 4332
Thuwal 23955-6900, Kingdom of Saudi Arabia
http://www.kaust.edu.sa

Office Phone: +966 12 808-0459


More information about the petsc-users mailing list