[petsc-users] petsc4py Build Problem
Mikhail Khodak
mkhodak at princeton.edu
Thu Jun 11 14:13:15 CDT 2015
I have attached the log files.
I tried using Open MPI before but received the same result. I will try a
static build later and otherwise will get a VM.
Thanks for looking at this,
Mikhail
On Thu, Jun 11, 2015 at 10:48 AM, Satish Balay <balay at mcs.anl.gov> wrote:
> Also - should mention:
>
> - cygwin has OpenMPI pacakged - so you could also try that.
> - most of my builds are static [so never tried dll builds]
>
> Satish
>
> On Thu, 11 Jun 2015, Satish Balay wrote:
>
> > 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 <knepley at gmail.com>
> wrote:
> > >
> > > > On Thu, Jun 11, 2015 at 5:07 AM, Mikhail Khodak <
> mkhodak at princeton.edu>
> > > > 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 <dalcinl at gmail.com>
> > > >> wrote:
> > > >>
> > > >>> 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
> > > >>>
> > > >>
> > > >>
> > > >
> > > >
> > > > --
> > > > 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
> > > >
> > >
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150611/5323ab85/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: configure.log
Type: application/octet-stream
Size: 6995253 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150611/5323ab85/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: make.log
Type: application/octet-stream
Size: 100169 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150611/5323ab85/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.log
Type: application/octet-stream
Size: 886 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150611/5323ab85/attachment-0005.obj>
More information about the petsc-users
mailing list