If you get errors when running basic petsc examples - send us the relavant petsc logs [configure.log, make.log, test.log etc..]
Also - note that mpich is not supported on cygwin/windows [it generally works for us - when we try the --download-mpich build]. Unless you really need a cywin build/use of petsc4py - it might be easier to install a linux VM - and use PETSc/petsc4py on it. Satish On Thu, 11 Jun 2015, Mikhail Khodak wrote: > I added these lines to the petsc4py test files (specifically test_comm.py) > but the error remains the same. However, I have done the standard 'which > mpiexec', 'which mpicc', 'which mpirun' and they are all in the same > folder. In fact it is the only MPI installed. > The reason I thought it might be a PETSc build problem is because one of > the PETSc 'make test' tests (ex5f) fails with the same error, even though > the 'make streams' test works fine with MPI processes. > Thanks, > Mikhail > > On Thu, Jun 11, 2015 at 4:21 AM, Matthew Knepley <[email protected]> wrote: > > > On Thu, Jun 11, 2015 at 5:07 AM, Mikhail Khodak <[email protected]> > > wrote: > > > >> Thank you for your help - the install seems to work, apart from routines > >> requiring MPI, which fail due to the "Attempting to use an MPI routine > >> before initializing MPI" error. This seems to be an error in the PETSc > >> build itself. > >> > > > > The MPI routines will not work until after > > > > import petsc4py, sys > > petsc4py.init(sys.argv) > > from petsc4py import PETSc > > > > If they fail after this, it is usually a mismatch between the mpiexec > > being used and the MPI > > libraries being linked. > > > > Thanks, > > > > Matt > > > > Thanks again, > >> Mikhail Khodak > >> > >> On Mon, Jun 8, 2015 at 5:11 AM, Lisandro Dalcin <[email protected]> > >> wrote: > >> > >>> On 8 June 2015 at 02:50, Mikhail Khodak <[email protected]> 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 > >>> > >> > >> > > > > > > -- > > What most experimenters take for granted before they begin their > > experiments is infinitely more interesting than any results to which their > > experiments lead. > > -- Norbert Wiener > > >
