Thank you for reviewing this. The errors for the command 'pip2 install .' inside the petsc4py directory are attached, along with the configure/make logs for the PETSc build. Best, Mikhail Khodak
On Mon, Jun 22, 2015 at 12:25 PM, Lisandro Dalcin <[email protected]> wrote: > Dear Mikhail, Satish helped me and we managed to get petsc4py working > with static builds and Cygwin's Open MPI. Please git pull and try > again. > > On 11 June 2015 at 14:13, Mikhail Khodak <[email protected]> wrote: > > 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 <[email protected]> > 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 <[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 > >> > > > > >> > > > >> > > >> > > > > > -- > 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 >
Processing /cygdrive/c/cygwin64/lib/python2.7/site-packages/petsc4py-3.5.1
Requirement already satisfied (use --upgrade to upgrade): numpy in
/usr/lib/python2.7/site-packages (from petsc4py==3.6.0)
Building wheels for collected packages: petsc4py
Running setup.py bdist_wheel for petsc4py
Complete output from command /usr/bin/python -c "import
setuptools;__file__='/tmp/pip-yBfOJT-build/setup.py';exec(compile(open(__file__).read().replace('\r\n',
'\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpXdUvO2pip-wheel-:
running bdist_wheel
running build
running build_src
cythonizing 'petsc4py.PETSc.pyx' -> 'petsc4py.PETSc.c'
cythonizing 'libpetsc4py/libpetsc4py.pyx' -> 'libpetsc4py/libpetsc4py.c'
running build_py
creating build
creating build/lib.cygwin-2.0.4-i686-2.7
creating build/lib.cygwin-2.0.4-i686-2.7/petsc4py
copying src/PETSc.py -> build/lib.cygwin-2.0.4-i686-2.7/petsc4py
copying src/__init__.py -> build/lib.cygwin-2.0.4-i686-2.7/petsc4py
copying src/__main__.py -> build/lib.cygwin-2.0.4-i686-2.7/petsc4py
creating build/lib.cygwin-2.0.4-i686-2.7/petsc4py/lib
copying src/lib/__init__.py -> build/lib.cygwin-2.0.4-i686-2.7/petsc4py/lib
creating build/lib.cygwin-2.0.4-i686-2.7/petsc4py/include
creating build/lib.cygwin-2.0.4-i686-2.7/petsc4py/include/petsc4py
copying src/include/petsc4py/numpy.h ->
build/lib.cygwin-2.0.4-i686-2.7/petsc4py/include/petsc4py
copying src/include/petsc4py/petsc4py.h ->
build/lib.cygwin-2.0.4-i686-2.7/petsc4py/include/petsc4py
copying src/include/petsc4py/petsc4py.PETSc.h ->
build/lib.cygwin-2.0.4-i686-2.7/petsc4py/include/petsc4py
copying src/include/petsc4py/petsc4py.PETSc_api.h ->
build/lib.cygwin-2.0.4-i686-2.7/petsc4py/include/petsc4py
copying src/include/petsc4py/petsc4py.i ->
build/lib.cygwin-2.0.4-i686-2.7/petsc4py/include/petsc4py
copying src/include/petsc4py/PETSc.pxd ->
build/lib.cygwin-2.0.4-i686-2.7/petsc4py/include/petsc4py
copying src/include/petsc4py/__init__.pxd ->
build/lib.cygwin-2.0.4-i686-2.7/petsc4py/include/petsc4py
copying src/include/petsc4py/__init__.pyx ->
build/lib.cygwin-2.0.4-i686-2.7/petsc4py/include/petsc4py
copying src/lib/petsc.cfg -> build/lib.cygwin-2.0.4-i686-2.7/petsc4py/lib
running build_ext
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-yBfOJT-build/setup.py", line 266, in <module>
main()
File "/tmp/pip-yBfOJT-build/setup.py", line 263, in main
run_setup()
File "/tmp/pip-yBfOJT-build/setup.py", line 136, in run_setup
**setup_args)
File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/site-packages/wheel/bdist_wheel.py", line 175, in
run
self.run_command('build')
File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/distutils/command/build.py", line 127, in run
self.run_command(cmd_name)
File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/site-packages/setuptools/command/build_ext.py",
line 50, in run
_build_ext.run(self)
File "/usr/lib/python2.7/distutils/command/build_ext.py", line 337, in run
self.build_extensions()
File "conf/baseconf.py", line 510, in build_extensions
_build_ext.build_extensions(self, *args,**kargs)
File "/usr/lib/python2.7/distutils/command/build_ext.py", line 446, in
build_extensions
self.build_extension(ext)
File "conf/baseconf.py", line 495, in build_extension
config = self.get_config_arch(arch)
File "conf/baseconf.py", line 486, in get_config_arch
return config.Configure(self.petsc_dir, arch)
File "conf/baseconf.py", line 108, in __init__
self.language = language_map[self['PETSC_LANGUAGE']]
File "conf/baseconf.py", line 111, in __getitem__
return self.configdict[item]
KeyError: 'PETSC_LANGUAGE'
----------------------------------------
Failed to build petsc4py
Installing collected packages: petsc4py
Running setup.py install for petsc4py
Complete output from command /usr/bin/python -c "import setuptools,
tokenize;__file__='/tmp/pip-yBfOJT-build/setup.py';exec(compile(getattr(tokenize,
'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))"
install --record /tmp/pip-0cQfDb-record/install-record.txt
--single-version-externally-managed --compile:
running install
running build
running build_src
running build_py
running build_ext
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-yBfOJT-build/setup.py", line 266, in <module>
main()
File "/tmp/pip-yBfOJT-build/setup.py", line 263, in main
run_setup()
File "/tmp/pip-yBfOJT-build/setup.py", line 136, in run_setup
**setup_args)
File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "conf/baseconf.py", line 561, in run
_install.run(self)
File "/usr/lib/python2.7/site-packages/setuptools/command/install.py",
line 61, in run
return orig.install.run(self)
File "/usr/lib/python2.7/distutils/command/install.py", line 563, in run
self.run_command('build')
File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/distutils/command/build.py", line 127, in run
self.run_command(cmd_name)
File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/site-packages/setuptools/command/build_ext.py",
line 50, in run
_build_ext.run(self)
File "/usr/lib/python2.7/distutils/command/build_ext.py", line 337, in run
self.build_extensions()
File "conf/baseconf.py", line 510, in build_extensions
_build_ext.build_extensions(self, *args,**kargs)
File "/usr/lib/python2.7/distutils/command/build_ext.py", line 446, in
build_extensions
self.build_extension(ext)
File "conf/baseconf.py", line 495, in build_extension
config = self.get_config_arch(arch)
File "conf/baseconf.py", line 486, in get_config_arch
return config.Configure(self.petsc_dir, arch)
File "conf/baseconf.py", line 108, in __init__
self.language = language_map[self['PETSC_LANGUAGE']]
File "conf/baseconf.py", line 111, in __getitem__
return self.configdict[item]
KeyError: 'PETSC_LANGUAGE'
----------------------------------------
configure.log
Description: Binary data
make.log
Description: Binary data
