Re: [firedrake] upgrading firedrake
Hello again Francis, You definitely should not be setting PETSC_DIR to run or upgrade Firedrake. We hadn't previously noticed that cleaning PyOP2 hit the PETSc dependency. Can you try running firedrake-install with the virtualenv active? That should ensure that PETSc is found. Regards, David On Tue, 2 Feb 2016 at 21:04 Francis Poulin <fpoulin@uwaterloo.ca> wrote:
Hello,
I am very new to firedrake and trying to install it on two machines: ubuntu and mac. I am having problems with each and thought I would start asking about the ubuntu.
running firedrake-install seemed to work. At least I didn’t notice any errors.
However, when I do an upgrade, I get that there is a problem with PETSC_DIR not being defined. Is this something that we should specify ourselves?
Thank you in advance.
Francis
firedrake/bin/pip install --no-deps --ignore-installed ffc/ Processing ./ffc Installing collected packages: FFC Running setup.py install for FFC ... done Successfully installed FFC-1.7.0.dev0 Cleaning PyOP2 Error: Could not find PETSc library.
Set the environment variable PETSC_DIR to your local PETSc base directory or install PETSc from PyPI: pip install petsc Traceback (most recent call last): File "firedrake/bin/firedrake-update", line 777, in <module> clean(p) File "firedrake/bin/firedrake-update", line 438, in clean check_call(["python", "setup.py", "clean"]) File "firedrake/bin/firedrake-update", line 182, in check_call subprocess.check_call(arguments) File "/usr/lib/python2.7/subprocess.py", line 540, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['python', 'setup.py', 'clean']' returned non-zero exit status 1
------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo
email: fpoulin@uwaterloo.ca Web: http://www.math.uwaterloo.ca/~fpoulin/ Telephone: +1 519 888 4567 x32637
On 03/02/16 08:36, David Ham wrote:
Hello again Francis,
You definitely should not be setting PETSC_DIR to run or upgrade Firedrake. We hadn't previously noticed that cleaning PyOP2 hit the PETSc dependency. Can you try running firedrake-install
David means "firedrake-update" here.
with the virtualenv active? That should ensure that PETSc is found.
Thanks, Lawrence
Hello, Thanks for the help. Yes, it works inside the virtualenv. On another note, I noticed that some of the demos say that you need to have mumps and hypre installed with petsc. Is there a way of configuring this using the firedrake-install command? Cheers, Francis ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637
On 03/02/16 12:20, Francis Poulin wrote:
Hello,
Thanks for the help. Yes, it works inside the virtualenv.
On another note, I noticed that some of the demos say that you need to have mumps and hypre installed with petsc. Is there a way of configuring this using the firedrake-install command?
Yes, you can pass extra values to the PETSc configure process by setting the environment variable "PETSC_CONFIGURE_OPTIONS" before running firedrake-install. We should document this better on the download page! I think firedrake-install --help mentions it, but it's not super-clear. Note that if you do this, you will also have to supply the same options later (via the environment variable) during firedrake-update. Thanks, Lawrence
Hello Lawrence, Thanks. I presume that if I do this, PETSC_CONFIGURE_OPTIONS="--download-mumps --download-hypre" then do python firedrake-install outside the firedrake directory in the regular unix environment that should do the trick? Any other options that might be necessary that you would recommend? On a different note, I read through the demos (very helpful, thank you everyone who made them) and found a few typos. To correct them do you typically want people to do it through github branches or is there another preferred means? Francis ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 ________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Lawrence Mitchell [lawrence.mitchell@imperial.ac.uk] Sent: Wednesday, February 03, 2016 7:29 AM To: firedrake@imperial.ac.uk Subject: Re: [firedrake] upgrading firedrake On 03/02/16 12:20, Francis Poulin wrote:
Hello,
Thanks for the help. Yes, it works inside the virtualenv.
On another note, I noticed that some of the demos say that you need to have mumps and hypre installed with petsc. Is there a way of configuring this using the firedrake-install command?
Yes, you can pass extra values to the PETSc configure process by setting the environment variable "PETSC_CONFIGURE_OPTIONS" before running firedrake-install. We should document this better on the download page! I think firedrake-install --help mentions it, but it's not super-clear. Note that if you do this, you will also have to supply the same options later (via the environment variable) during firedrake-update. Thanks, Lawrence
On 03/02/16 13:32, Francis Poulin wrote:
Hello Lawrence,
Thanks. I presume that if I do this,
PETSC_CONFIGURE_OPTIONS="--download-mumps --download-hypre"
then do python firedrake-install outside the firedrake directory in the regular unix environment that should do the trick?
Yes, I think so.
Any other options that might be necessary that you would recommend?
I don't know if just download-mumps is enough to get mumps, you may need other bits. If you do not pass "--minimal-petsc" to firedrake-install, then you get mumps and others. Particularly, in that case we end up setting: """--download-ctetgen --download-triangle --download-chaco --download-metis --download-parmetis --download-scalapack --download-hypre --download-mumps --download-netcdf --download-hdf5 --download-exodusii""" Which is probably good enough
On a different note, I read through the demos (very helpful, thank you everyone who made them) and found a few typos. To correct them do you typically want people to do it through github branches or is there another preferred means?
I'm glad they're useful! Pull requests are preferable, however, you can also raise github issues pointing them out. Thanks, Lawrence
Hello, Thanks. I tried this and it seemed to finish on both my Mac and Ubuntu machines. Have not tested them but hopefully something good happened. PETSC_CONFIGURE_OPTIONS="--download-ctetgen --download-triangle --download-chaco --download-metis --download-parmetis --download-scalapack --download-hypre --download-mumps --download-netcdf --download-hdf5 --download-exodusii" I did the tests on both machines and both seemed to do about the same thing, as far as I can tell. However, on my mac, when I try opening python and doing the first line I get an error. As a result all the demos that I try running fail, but the make alltests did seem to run. I am a bit perplexed. (firedrake)am-laptop24:software fpoulin$ python Python 2.7.11 (default, Jan 22 2016, 08:28:37) [GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information.
from firedrake import * Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named firedrake
Also, on a not very important note, after I install firedrake and do the first update it asks me to do firedrake-install another time. When I do it ways gives me an error, see below. Maybe not necessary? I then do an update and that seems to work, as far as I can tell. Francis Homepage: http://www.python.org/ Original-Maintainer: Matthias Klose <doko@debian.org> Checking for presence of package python-dev...installed. Package: python-pip Status: install ok installed Priority: optional Section: python Installed-Size: 466 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> Architecture: all Version: 1.5.4-1ubuntu3 Depends: ca-certificates, python-colorama, python-distlib, python-html5lib, python-pip-whl (= 1.5.4-1ubuntu3), python-pkg-resources, python-requests, python-setuptools (>= 0.6c1), python-six, python, python:any (<< 2.8), python:any (>= 2.7.5-5~) Recommends: build-essential, python-dev-all (>= 2.6), python-wheel Description: alternative Python package installer pip is a replacement for easy_install, and is intended to be an improved Python package installer. It integrates with virtualenv, doesn't do partial installs, can save package state for replaying, can install from non-egg sources, and can install from version control repositories. Homepage: http://www.pip-installer.org/ Original-Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org> Checking for presence of package python-pip...installed. Creating firedrake virtualenv. Please use the *system* python to run this script Traceback (most recent call last): File "/home/fpoulin/software/firedrake/bin/firedrake-install", line 669, in <module> virtualenv.create_environment("firedrake", site_packages=False) File "/home/fpoulin/software/firedrake/local/lib/python2.7/site-packages/virtualenv.py", line 884, in create_environment site_packages=site_packages, clear=clear, symlink=symlink)) File "/home/fpoulin/software/firedrake/lib/python2.7/posixpath.py", line 367, in abspath if not isabs(path): File "/home/fpoulin/software/firedrake/lib/python2.7/posixpath.py", line 61, in isabs return s.startswith('/') AttributeError: 'NoneType' object has no attribute 'startswith' (firedrake)fpoulin@vortex:~/software$ firedrake/bin/firedrake-update ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637
On 03/02/16 18:53, Francis Poulin wrote:
Hello,
Thanks. I tried this and it seemed to finish on both my Mac and Ubuntu machines. Have not tested them but hopefully something good happened.
PETSC_CONFIGURE_OPTIONS="--download-ctetgen --download-triangle --download-chaco --download-metis --download-parmetis --download-scalapack --download-hypre --download-mumps --download-netcdf --download-hdf5 --download-exodusii"
I did the tests on both machines and both seemed to do about the same thing, as far as I can tell. However, on my mac, when I try opening python and doing the first line I get an error. As a result all the demos that I try running fail, but the make alltests did seem to run. I am a bit perplexed.
The test suite does some slightly ugly hackery to insert something into the PYTHONPATH which is why this may work.
(firedrake)am-laptop24:software fpoulin$ python Python 2.7.11 (default, Jan 22 2016, 08:28:37) [GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information.
from firedrake import * Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named firedrake
Hmm, this looks odd, the prompt suggests that the virtualenv is activated. What do the following things at the python prompt produce: import sys print sys.executable print sys.path
Also, on a not very important note, after I install firedrake and do the first update it asks me to do firedrake-install another time. When I do it ways gives me an error, see below. Maybe not necessary? I then do an update and that seems to work, as far as I can tell.
Francis
Homepage: http://www.python.org/ Original-Maintainer: Matthias Klose <doko@debian.org> Checking for presence of package python-dev...installed. Package: python-pip Status: install ok installed Priority: optional Section: python Installed-Size: 466 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> Architecture: all Version: 1.5.4-1ubuntu3 Depends: ca-certificates, python-colorama, python-distlib, python-html5lib, python-pip-whl (= 1.5.4-1ubuntu3), python-pkg-resources, python-requests, python-setuptools (>= 0.6c1), python-six, python, python:any (<< 2.8), python:any (>= 2.7.5-5~) Recommends: build-essential, python-dev-all (>= 2.6), python-wheel Description: alternative Python package installer pip is a replacement for easy_install, and is intended to be an improved Python package installer. It integrates with virtualenv, doesn't do partial installs, can save package state for replaying, can install from non-egg sources, and can install from version control repositories. Homepage: http://www.pip-installer.org/ Original-Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org> Checking for presence of package python-pip...installed. Creating firedrake virtualenv. Please use the *system* python to run this script Traceback (most recent call last): File "/home/fpoulin/software/firedrake/bin/firedrake-install", line 669, in <module> virtualenv.create_environment("firedrake", site_packages=False) File "/home/fpoulin/software/firedrake/local/lib/python2.7/site-packages/virtualenv.py", line 884, in create_environment site_packages=site_packages, clear=clear, symlink=symlink)) File "/home/fpoulin/software/firedrake/lib/python2.7/posixpath.py", line 367, in abspath if not isabs(path): File "/home/fpoulin/software/firedrake/lib/python2.7/posixpath.py", line 61, in isabs return s.startswith('/') AttributeError: 'NoneType' object has no attribute 'startswith' (firedrake)fpoulin@vortex:~/software$ firedrake/bin/firedrake-update
Hmmm, this is a new one on me. Can you provide the precise sequence of commands you used to produce this error and we'll see if we can replicate and debug here. Thanks, Lawrence
Hello, I did it both on my ubuntu and macs. For ubuntu I have
import sys print sys.executable /home/fpoulin/software/firedrake/bin/python print sys.path ['', '/home/fpoulin/software/firedrake/local/lib/python2.7/site-packages/h5py-2.5.0-py2.7-linux-x86_64.egg', '/home/fpoulin/software/firedrake/lib/python2.7/site-packages/h5py-2.5.0-py2.7-linux-x86_64.egg', '/home/fpoulin/software/pyro2', '/home/fpoulin/Code/spins/src/SPINSpy', '/home/fpoulin/software/clawpack-5.2.2', '/home/fpoulin/software/firedrake/src/firedrake', '/home/fpoulin/software/firedrake/lib/python2.7', '/home/fpoulin/software/firedrake/lib/python2.7/plat-x86_64-linux-gnu', '/home/fpoulin/software/firedrake/lib/python2.7/lib-tk', '/home/fpoulin/software/firedrake/lib/python2.7/lib-old', '/home/fpoulin/software/firedrake/lib/python2.7/lib-dynload', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/home/fpoulin/software/firedrake/local/lib/python2.7/site-packages', '/home/fpoulin/software/firedrake/lib/python2.7/site-packages']
I see that sys.executable is pointing to bin/python in my firedrake installation. On the mac, which doesn't work, it's pointing to /user/local/opt. There is also a lot of other junk in my path that I should probably clean up. I use homebrew but clearly I'm not very able at doing things efficiently.
print sys.executable /usr/local/opt/python/bin/python2.7 print sys.path ['', '/usr/local/lib/python2.7/site-packages/cbcdns-1.0.0-py2.7.egg', '/Users/fpoulin/software/pyqg', '/Users/fpoulin/software/pyro2', '/Users/fpoulin/software/SPINSpy', '/Users/fpoulin/software/firedrake/src/firedrake', '/Library/Python/2.7/lib/python/site-packages', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/Users/fpoulin/Library/Python/2.7/lib/python/site-packages', '/usr/local/lib/python2.7/site-packages', '/Library/Python/2.7/site-packages/distarray-0.6.0_dev-py2.7.egg', '/Library/Python/2.7/site-packages/numpy-1.9.2-py2.7-macosx-10.9-intel.egg', '/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg', '/Library/Python/2.7/site-packages']
As for the problem that I had, I used the following: PETSC_CONFIGURE_OPTIONS="--download-ctetgen --download-triangle --download-chaco --download-metis --download-parmetis --download-scalapack --download-hypre --download-mumps --download-netcdf --download-hdf5 --download-exodusii" 517 python firedrake-install 518 . firedrake/bin/activate 519 firedrake/bin/firedrake-update 520 firedrake-install 521 firedrake/bin/firedrake-update It seemed strange to do firedrake-install after updating but that's what I understand the instructions to say. Maybe I misread it. If yes, I'm sorry about my confusion. Francis ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637
On 03/02/16 19:18, Francis Poulin wrote:
Hello,
I did it both on my ubuntu and macs. For ubuntu I have
import sys print sys.executable /home/fpoulin/software/firedrake/bin/python print sys.path ['', '/home/fpoulin/software/firedrake/local/lib/python2.7/site-packages/h5py-2.5.0-py2.7-linux-x86_64.egg', '/home/fpoulin/software/firedrake/lib/python2.7/site-packages/h5py-2.5.0-py2.7-linux-x86_64.egg', '/home/fpoulin/software/pyro2', '/home/fpoulin/Code/spins/src/SPINSpy', '/home/fpoulin/software/clawpack-5.2.2', '/home/fpoulin/software/firedrake/src/firedrake', '/home/fpoulin/software/firedrake/lib/python2.7', '/home/fpoulin/software/firedrake/lib/python2.7/plat-x86_64-linux-gnu', '/home/fpoulin/software/firedrake/lib/python2.7/lib-tk', '/home/fpoulin/software/firedrake/lib/python2.7/lib-old', '/home/fpoulin/software/firedrake/lib/python2.7/lib-dynload', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/home/fpoulin/software/firedrake/local/lib/python2.7/site-packages', '/home/fpoulin/software/firedrake/lib/python2.7/site-packages']
I see that sys.executable is pointing to bin/python in my firedrake installation.
On the mac, which doesn't work, it's pointing to /user/local/opt. There is also a lot of other junk in my path that I should probably clean up. I use homebrew but clearly I'm not very able at doing things efficiently.
print sys.executable /usr/local/opt/python/bin/python2.7
Yes, I suspect this is the problem. Activating the virtualenv ought to put the virtualenv python at the beginning of PATH, but it looks like something has gone wrong here.
As for the problem that I had, I used the following:
PETSC_CONFIGURE_OPTIONS="--download-ctetgen --download-triangle --download-chaco --download-metis --download-parmetis --download-scalapack --download-hypre --download-mumps --download-netcdf --download-hdf5 --download-exodusii" 517 python firedrake-install 518 . firedrake/bin/activate 519 firedrake/bin/firedrake-update 520 firedrake-install 521 firedrake/bin/firedrake-update
It seemed strange to do firedrake-install after updating but that's what I understand the instructions to say. Maybe I misread it. If yes, I'm sorry about my confusion.
No, I agree that's what we say. I think, however, that this is a bug in our update script. This problem goes away if you run firedrake-update after *deactivating* the virtualenv. But that is very non-intuitive. I've reported this as a bug here https://github.com/firedrakeproject/firedrake/issues/690 where you can follow along. Thanks, Lawrence
Hello, Since yesterday I have reinstalled firedrake on my mac and still get the same issues. What I don't understand is that when I do make alltest it seems to run most of the tests ok. But when I try running python tests/test_0init.py it fails. Any idea what make alltest does differently that would work? Francis ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637
python tests/test_0init.py
Please try py.test instead of python. If you have no py.test (in your virtualenv), install it with: pip install pytest ________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Francis Poulin <fpoulin@uwaterloo.ca> Sent: 04 February 2016 17:58 To: firedrake Subject: Re: [firedrake] upgrading firedrake Hello, Since yesterday I have reinstalled firedrake on my mac and still get the same issues. What I don't understand is that when I do make alltest it seems to run most of the tests ok. But when I try running python tests/test_0init.py it fails. Any idea what make alltest does differently that would work? Francis ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
Thanks for the reply. First I tried to install pytest and it seemed to already be there. I then tried py.test and it added a couple of new tests at the beginning. It's still running but they seem to be passing. In particular, tests/test_0init.py passes, but when I try python tests/test_0init.py it fails because it can't import firedrake. There seems to be a problem with how the libraries are set up, as suggested by previous emails. (firedrake)am-laptop24:firedrake fpoulin$ pip install pytest Requirement already satisfied (use --upgrade to upgrade): pytest in /usr/local/lib/python2.7/site-packages Requirement already satisfied (use --upgrade to upgrade): py>=1.4.29 in /usr/local/lib/python2.7/site-packages (from pytest) (firedrake)am-laptop24:firedrake fpoulin$ py.test ========================================================== test session starts ========================================================== platform darwin -- Python 2.7.11, pytest-2.8.7, py-1.4.31, pluggy-0.3.1 rootdir: /Users/fpoulin/software/firedrake/src/firedrake, inifile: collecting 2 items collected 3589 items / 4 errors pylit/doc/examples/testfile_literate.py.txt F pylit/doc/examples/testmod_literate.py.txt F tests/test_0init.py F. tests/test_ffc_interface.py .......... tests/benchmarks/test_assembly_overheads.py ssssssssssssssssssssssssss ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 ________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Homolya, Miklós [m.homolya14@imperial.ac.uk] Sent: Thursday, February 04, 2016 1:00 PM To: firedrake Subject: Re: [firedrake] upgrading firedrake
python tests/test_0init.py
Please try py.test instead of python. If you have no py.test (in your virtualenv), install it with: pip install pytest ________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Francis Poulin <fpoulin@uwaterloo.ca> Sent: 04 February 2016 17:58 To: firedrake Subject: Re: [firedrake] upgrading firedrake Hello, Since yesterday I have reinstalled firedrake on my mac and still get the same issues. What I don't understand is that when I do make alltest it seems to run most of the tests ok. But when I try running python tests/test_0init.py it fails. Any idea what make alltest does differently that would work? Francis ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
Seems like you already have a pytest outside your virtualenv which gets picked up. You can force the installation of pytest inside the virtualenv by pip install --ignore-installed pytest Using pip install --upgrade pytest might also work. ________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Francis Poulin <fpoulin@uwaterloo.ca> Sent: 04 February 2016 18:20 To: firedrake Subject: Re: [firedrake] upgrading firedrake Thanks for the reply. First I tried to install pytest and it seemed to already be there. I then tried py.test and it added a couple of new tests at the beginning. It's still running but they seem to be passing. In particular, tests/test_0init.py passes, but when I try python tests/test_0init.py it fails because it can't import firedrake. There seems to be a problem with how the libraries are set up, as suggested by previous emails. (firedrake)am-laptop24:firedrake fpoulin$ pip install pytest Requirement already satisfied (use --upgrade to upgrade): pytest in /usr/local/lib/python2.7/site-packages Requirement already satisfied (use --upgrade to upgrade): py>=1.4.29 in /usr/local/lib/python2.7/site-packages (from pytest) (firedrake)am-laptop24:firedrake fpoulin$ py.test ========================================================== test session starts ========================================================== platform darwin -- Python 2.7.11, pytest-2.8.7, py-1.4.31, pluggy-0.3.1 rootdir: /Users/fpoulin/software/firedrake/src/firedrake, inifile: collecting 2 items collected 3589 items / 4 errors pylit/doc/examples/testfile_literate.py.txt F pylit/doc/examples/testmod_literate.py.txt F tests/test_0init.py F. tests/test_ffc_interface.py .......... tests/benchmarks/test_assembly_overheads.py ssssssssssssssssssssssssss ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 ________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Homolya, Miklós [m.homolya14@imperial.ac.uk] Sent: Thursday, February 04, 2016 1:00 PM To: firedrake Subject: Re: [firedrake] upgrading firedrake
python tests/test_0init.py
Please try py.test instead of python. If you have no py.test (in your virtualenv), install it with: pip install pytest ________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Francis Poulin <fpoulin@uwaterloo.ca> Sent: 04 February 2016 17:58 To: firedrake Subject: Re: [firedrake] upgrading firedrake Hello, Since yesterday I have reinstalled firedrake on my mac and still get the same issues. What I don't understand is that when I do make alltest it seems to run most of the tests ok. But when I try running python tests/test_0init.py it fails. Any idea what make alltest does differently that would work? Francis ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
Ah, thanks. I properly installed pytest. I ran the following with some success py.test tests/test_0init.py Does this mean I should replace my python with py.test or something else? =============================================================================================== test session starts ================================================================================================ platform darwin -- Python 2.7.11, pytest-2.8.7, py-1.4.31, pluggy-0.3.1 rootdir: /Users/fpoulin/software/firedrake/src/firedrake, inifile: collected 2 items tests/test_0init.py .. ============================================================================================= 2 passed in 0.71 seconds ============================================================================================= ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 ________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Homolya, Miklós [m.homolya14@imperial.ac.uk] Sent: Thursday, February 04, 2016 1:24 PM To: firedrake Subject: Re: [firedrake] upgrading firedrake Seems like you already have a pytest outside your virtualenv which gets picked up. You can force the installation of pytest inside the virtualenv by pip install --ignore-installed pytest Using pip install --upgrade pytest might also work. ________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Francis Poulin <fpoulin@uwaterloo.ca> Sent: 04 February 2016 18:20 To: firedrake Subject: Re: [firedrake] upgrading firedrake Thanks for the reply. First I tried to install pytest and it seemed to already be there. I then tried py.test and it added a couple of new tests at the beginning. It's still running but they seem to be passing. In particular, tests/test_0init.py passes, but when I try python tests/test_0init.py it fails because it can't import firedrake. There seems to be a problem with how the libraries are set up, as suggested by previous emails. (firedrake)am-laptop24:firedrake fpoulin$ pip install pytest Requirement already satisfied (use --upgrade to upgrade): pytest in /usr/local/lib/python2.7/site-packages Requirement already satisfied (use --upgrade to upgrade): py>=1.4.29 in /usr/local/lib/python2.7/site-packages (from pytest) (firedrake)am-laptop24:firedrake fpoulin$ py.test ========================================================== test session starts ========================================================== platform darwin -- Python 2.7.11, pytest-2.8.7, py-1.4.31, pluggy-0.3.1 rootdir: /Users/fpoulin/software/firedrake/src/firedrake, inifile: collecting 2 items collected 3589 items / 4 errors pylit/doc/examples/testfile_literate.py.txt F pylit/doc/examples/testmod_literate.py.txt F tests/test_0init.py F. tests/test_ffc_interface.py .......... tests/benchmarks/test_assembly_overheads.py ssssssssssssssssssssssssss ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 ________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Homolya, Miklós [m.homolya14@imperial.ac.uk] Sent: Thursday, February 04, 2016 1:00 PM To: firedrake Subject: Re: [firedrake] upgrading firedrake
python tests/test_0init.py
Please try py.test instead of python. If you have no py.test (in your virtualenv), install it with: pip install pytest ________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Francis Poulin <fpoulin@uwaterloo.ca> Sent: 04 February 2016 17:58 To: firedrake Subject: Re: [firedrake] upgrading firedrake Hello, Since yesterday I have reinstalled firedrake on my mac and still get the same issues. What I don't understand is that when I do make alltest it seems to run most of the tests ok. But when I try running python tests/test_0init.py it fails. Any idea what make alltest does differently that would work? Francis ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
You should use py.test to run the tests. 'make alltest' uses py.test as well. The output shows that all the tests in tests/test_0init.py has passed, which is definitely a success. ________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Francis Poulin <fpoulin@uwaterloo.ca> Sent: 04 February 2016 18:28 To: firedrake Subject: Re: [firedrake] upgrading firedrake Ah, thanks. I properly installed pytest. I ran the following with some success py.test tests/test_0init.py Does this mean I should replace my python with py.test or something else? =============================================================================================== test session starts ================================================================================================ platform darwin -- Python 2.7.11, pytest-2.8.7, py-1.4.31, pluggy-0.3.1 rootdir: /Users/fpoulin/software/firedrake/src/firedrake, inifile: collected 2 items tests/test_0init.py .. ============================================================================================= 2 passed in 0.71 seconds ============================================================================================= ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 ________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Homolya, Miklós [m.homolya14@imperial.ac.uk] Sent: Thursday, February 04, 2016 1:24 PM To: firedrake Subject: Re: [firedrake] upgrading firedrake Seems like you already have a pytest outside your virtualenv which gets picked up. You can force the installation of pytest inside the virtualenv by pip install --ignore-installed pytest Using pip install --upgrade pytest might also work. ________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Francis Poulin <fpoulin@uwaterloo.ca> Sent: 04 February 2016 18:20 To: firedrake Subject: Re: [firedrake] upgrading firedrake Thanks for the reply. First I tried to install pytest and it seemed to already be there. I then tried py.test and it added a couple of new tests at the beginning. It's still running but they seem to be passing. In particular, tests/test_0init.py passes, but when I try python tests/test_0init.py it fails because it can't import firedrake. There seems to be a problem with how the libraries are set up, as suggested by previous emails. (firedrake)am-laptop24:firedrake fpoulin$ pip install pytest Requirement already satisfied (use --upgrade to upgrade): pytest in /usr/local/lib/python2.7/site-packages Requirement already satisfied (use --upgrade to upgrade): py>=1.4.29 in /usr/local/lib/python2.7/site-packages (from pytest) (firedrake)am-laptop24:firedrake fpoulin$ py.test ========================================================== test session starts ========================================================== platform darwin -- Python 2.7.11, pytest-2.8.7, py-1.4.31, pluggy-0.3.1 rootdir: /Users/fpoulin/software/firedrake/src/firedrake, inifile: collecting 2 items collected 3589 items / 4 errors pylit/doc/examples/testfile_literate.py.txt F pylit/doc/examples/testmod_literate.py.txt F tests/test_0init.py F. tests/test_ffc_interface.py .......... tests/benchmarks/test_assembly_overheads.py ssssssssssssssssssssssssss ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 ________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Homolya, Miklós [m.homolya14@imperial.ac.uk] Sent: Thursday, February 04, 2016 1:00 PM To: firedrake Subject: Re: [firedrake] upgrading firedrake
python tests/test_0init.py
Please try py.test instead of python. If you have no py.test (in your virtualenv), install it with: pip install pytest ________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Francis Poulin <fpoulin@uwaterloo.ca> Sent: 04 February 2016 17:58 To: firedrake Subject: Re: [firedrake] upgrading firedrake Hello, Since yesterday I have reinstalled firedrake on my mac and still get the same issues. What I don't understand is that when I do make alltest it seems to run most of the tests ok. But when I try running python tests/test_0init.py it fails. Any idea what make alltest does differently that would work? Francis ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
I agree that is good news for the tests. Unfortunately, I can't use py.test to open up a python session. Any ideas what I should do? Francis ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 ________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Homolya, Miklós [m.homolya14@imperial.ac.uk] Sent: Thursday, February 04, 2016 1:32 PM To: firedrake Subject: Re: [firedrake] upgrading firedrake You should use py.test to run the tests. 'make alltest' uses py.test as well. The output shows that all the tests in tests/test_0init.py has passed, which is definitely a success. ________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Francis Poulin <fpoulin@uwaterloo.ca> Sent: 04 February 2016 18:28 To: firedrake Subject: Re: [firedrake] upgrading firedrake Ah, thanks. I properly installed pytest. I ran the following with some success py.test tests/test_0init.py Does this mean I should replace my python with py.test or something else? =============================================================================================== test session starts ================================================================================================ platform darwin -- Python 2.7.11, pytest-2.8.7, py-1.4.31, pluggy-0.3.1 rootdir: /Users/fpoulin/software/firedrake/src/firedrake, inifile: collected 2 items tests/test_0init.py .. ============================================================================================= 2 passed in 0.71 seconds ============================================================================================= ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 ________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Homolya, Miklós [m.homolya14@imperial.ac.uk] Sent: Thursday, February 04, 2016 1:24 PM To: firedrake Subject: Re: [firedrake] upgrading firedrake Seems like you already have a pytest outside your virtualenv which gets picked up. You can force the installation of pytest inside the virtualenv by pip install --ignore-installed pytest Using pip install --upgrade pytest might also work. ________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Francis Poulin <fpoulin@uwaterloo.ca> Sent: 04 February 2016 18:20 To: firedrake Subject: Re: [firedrake] upgrading firedrake Thanks for the reply. First I tried to install pytest and it seemed to already be there. I then tried py.test and it added a couple of new tests at the beginning. It's still running but they seem to be passing. In particular, tests/test_0init.py passes, but when I try python tests/test_0init.py it fails because it can't import firedrake. There seems to be a problem with how the libraries are set up, as suggested by previous emails. (firedrake)am-laptop24:firedrake fpoulin$ pip install pytest Requirement already satisfied (use --upgrade to upgrade): pytest in /usr/local/lib/python2.7/site-packages Requirement already satisfied (use --upgrade to upgrade): py>=1.4.29 in /usr/local/lib/python2.7/site-packages (from pytest) (firedrake)am-laptop24:firedrake fpoulin$ py.test ========================================================== test session starts ========================================================== platform darwin -- Python 2.7.11, pytest-2.8.7, py-1.4.31, pluggy-0.3.1 rootdir: /Users/fpoulin/software/firedrake/src/firedrake, inifile: collecting 2 items collected 3589 items / 4 errors pylit/doc/examples/testfile_literate.py.txt F pylit/doc/examples/testmod_literate.py.txt F tests/test_0init.py F. tests/test_ffc_interface.py .......... tests/benchmarks/test_assembly_overheads.py ssssssssssssssssssssssssss ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 ________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Homolya, Miklós [m.homolya14@imperial.ac.uk] Sent: Thursday, February 04, 2016 1:00 PM To: firedrake Subject: Re: [firedrake] upgrading firedrake
python tests/test_0init.py
Please try py.test instead of python. If you have no py.test (in your virtualenv), install it with: pip install pytest ________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Francis Poulin <fpoulin@uwaterloo.ca> Sent: 04 February 2016 17:58 To: firedrake Subject: Re: [firedrake] upgrading firedrake Hello, Since yesterday I have reinstalled firedrake on my mac and still get the same issues. What I don't understand is that when I do make alltest it seems to run most of the tests ok. But when I try running python tests/test_0init.py it fails. Any idea what make alltest does differently that would work? Francis ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
py.test is only for running tests (which were written for py.test). Otherwise you can just use python to run firedrake scripts. For interactive sessions, ipython provides a better experience (you can pip install ipython). Once you are in python (or ipython), just: from firedrake import * and go ahead using Firedrake. ________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Francis Poulin <fpoulin@uwaterloo.ca> Sent: 04 February 2016 18:33 To: firedrake Subject: Re: [firedrake] upgrading firedrake I agree that is good news for the tests. Unfortunately, I can't use py.test to open up a python session. Any ideas what I should do? Francis ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 ________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Homolya, Miklós [m.homolya14@imperial.ac.uk] Sent: Thursday, February 04, 2016 1:32 PM To: firedrake Subject: Re: [firedrake] upgrading firedrake You should use py.test to run the tests. 'make alltest' uses py.test as well. The output shows that all the tests in tests/test_0init.py has passed, which is definitely a success. ________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Francis Poulin <fpoulin@uwaterloo.ca> Sent: 04 February 2016 18:28 To: firedrake Subject: Re: [firedrake] upgrading firedrake Ah, thanks. I properly installed pytest. I ran the following with some success py.test tests/test_0init.py Does this mean I should replace my python with py.test or something else? =============================================================================================== test session starts ================================================================================================ platform darwin -- Python 2.7.11, pytest-2.8.7, py-1.4.31, pluggy-0.3.1 rootdir: /Users/fpoulin/software/firedrake/src/firedrake, inifile: collected 2 items tests/test_0init.py .. ============================================================================================= 2 passed in 0.71 seconds ============================================================================================= ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 ________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Homolya, Miklós [m.homolya14@imperial.ac.uk] Sent: Thursday, February 04, 2016 1:24 PM To: firedrake Subject: Re: [firedrake] upgrading firedrake Seems like you already have a pytest outside your virtualenv which gets picked up. You can force the installation of pytest inside the virtualenv by pip install --ignore-installed pytest Using pip install --upgrade pytest might also work. ________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Francis Poulin <fpoulin@uwaterloo.ca> Sent: 04 February 2016 18:20 To: firedrake Subject: Re: [firedrake] upgrading firedrake Thanks for the reply. First I tried to install pytest and it seemed to already be there. I then tried py.test and it added a couple of new tests at the beginning. It's still running but they seem to be passing. In particular, tests/test_0init.py passes, but when I try python tests/test_0init.py it fails because it can't import firedrake. There seems to be a problem with how the libraries are set up, as suggested by previous emails. (firedrake)am-laptop24:firedrake fpoulin$ pip install pytest Requirement already satisfied (use --upgrade to upgrade): pytest in /usr/local/lib/python2.7/site-packages Requirement already satisfied (use --upgrade to upgrade): py>=1.4.29 in /usr/local/lib/python2.7/site-packages (from pytest) (firedrake)am-laptop24:firedrake fpoulin$ py.test ========================================================== test session starts ========================================================== platform darwin -- Python 2.7.11, pytest-2.8.7, py-1.4.31, pluggy-0.3.1 rootdir: /Users/fpoulin/software/firedrake/src/firedrake, inifile: collecting 2 items collected 3589 items / 4 errors pylit/doc/examples/testfile_literate.py.txt F pylit/doc/examples/testmod_literate.py.txt F tests/test_0init.py F. tests/test_ffc_interface.py .......... tests/benchmarks/test_assembly_overheads.py ssssssssssssssssssssssssss ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 ________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Homolya, Miklós [m.homolya14@imperial.ac.uk] Sent: Thursday, February 04, 2016 1:00 PM To: firedrake Subject: Re: [firedrake] upgrading firedrake
python tests/test_0init.py
Please try py.test instead of python. If you have no py.test (in your virtualenv), install it with: pip install pytest ________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Francis Poulin <fpoulin@uwaterloo.ca> Sent: 04 February 2016 17:58 To: firedrake Subject: Re: [firedrake] upgrading firedrake Hello, Since yesterday I have reinstalled firedrake on my mac and still get the same issues. What I don't understand is that when I do make alltest it seems to run most of the tests ok. But when I try running python tests/test_0init.py it fails. Any idea what make alltest does differently that would work? Francis ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
I upgraded ipython and when I try importing firedrake it doesn't give an error, presumably that worked? but when I try it in python I get the following error. It now seems to be complaining that it has problems with petsc4py, which is something I installed in my other version of python. Should I try removing petsc4py from all my versions of python and then reinstall?
from firedrake import * Traceback (most recent call last): File "<stdin>", line 1, in <module> File "firedrake/__init__.py", line 3, in <module> import firedrake.petsc as petsc File "firedrake/petsc.py", line 5, in <module> petsc4py.init(sys.argv) File "/Users/fpoulin/Library/Python/2.7/lib/python/site-packages/petsc4py/__init__.py", line 42, in init PETSc = petsc4py.lib.ImportPETSc(arch) File "/Users/fpoulin/Library/Python/2.7/lib/python/site-packages/petsc4py/lib/__init__.py", line 29, in ImportPETSc return Import('petsc4py', 'PETSc', path, arch) File "/Users/fpoulin/Library/Python/2.7/lib/python/site-packages/petsc4py/lib/__init__.py", line 64, in Import module = imp.load_module(fullname, fo, fn, stuff) ImportError: dlopen(/Users/fpoulin/Library/Python/2.7/lib/python/site-packages/petsc4py/lib/darwin10.6.0-c-debug/PETSc.so, 2): Library not loaded: /sw/lib/openmpi/libmpi.1.dylib Referenced from: /Users/fpoulin/Library/Python/2.7/lib/python/site-packages/petsc4py/lib/darwin10.6.0-c-debug/PETSc.so Reason: image not found
------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 ________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Homolya, Miklós [m.homolya14@imperial.ac.uk] Sent: Thursday, February 04, 2016 1:39 PM To: firedrake Subject: Re: [firedrake] upgrading firedrake py.test is only for running tests (which were written for py.test). Otherwise you can just use python to run firedrake scripts. For interactive sessions, ipython provides a better experience (you can pip install ipython). Once you are in python (or ipython), just: from firedrake import * and go ahead using Firedrake. ________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Francis Poulin <fpoulin@uwaterloo.ca> Sent: 04 February 2016 18:33 To: firedrake Subject: Re: [firedrake] upgrading firedrake I agree that is good news for the tests. Unfortunately, I can't use py.test to open up a python session. Any ideas what I should do? Francis ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 ________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Homolya, Miklós [m.homolya14@imperial.ac.uk] Sent: Thursday, February 04, 2016 1:32 PM To: firedrake Subject: Re: [firedrake] upgrading firedrake You should use py.test to run the tests. 'make alltest' uses py.test as well. The output shows that all the tests in tests/test_0init.py has passed, which is definitely a success. ________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Francis Poulin <fpoulin@uwaterloo.ca> Sent: 04 February 2016 18:28 To: firedrake Subject: Re: [firedrake] upgrading firedrake Ah, thanks. I properly installed pytest. I ran the following with some success py.test tests/test_0init.py Does this mean I should replace my python with py.test or something else? =============================================================================================== test session starts ================================================================================================ platform darwin -- Python 2.7.11, pytest-2.8.7, py-1.4.31, pluggy-0.3.1 rootdir: /Users/fpoulin/software/firedrake/src/firedrake, inifile: collected 2 items tests/test_0init.py .. ============================================================================================= 2 passed in 0.71 seconds ============================================================================================= ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 ________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Homolya, Miklós [m.homolya14@imperial.ac.uk] Sent: Thursday, February 04, 2016 1:24 PM To: firedrake Subject: Re: [firedrake] upgrading firedrake Seems like you already have a pytest outside your virtualenv which gets picked up. You can force the installation of pytest inside the virtualenv by pip install --ignore-installed pytest Using pip install --upgrade pytest might also work. ________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Francis Poulin <fpoulin@uwaterloo.ca> Sent: 04 February 2016 18:20 To: firedrake Subject: Re: [firedrake] upgrading firedrake Thanks for the reply. First I tried to install pytest and it seemed to already be there. I then tried py.test and it added a couple of new tests at the beginning. It's still running but they seem to be passing. In particular, tests/test_0init.py passes, but when I try python tests/test_0init.py it fails because it can't import firedrake. There seems to be a problem with how the libraries are set up, as suggested by previous emails. (firedrake)am-laptop24:firedrake fpoulin$ pip install pytest Requirement already satisfied (use --upgrade to upgrade): pytest in /usr/local/lib/python2.7/site-packages Requirement already satisfied (use --upgrade to upgrade): py>=1.4.29 in /usr/local/lib/python2.7/site-packages (from pytest) (firedrake)am-laptop24:firedrake fpoulin$ py.test ========================================================== test session starts ========================================================== platform darwin -- Python 2.7.11, pytest-2.8.7, py-1.4.31, pluggy-0.3.1 rootdir: /Users/fpoulin/software/firedrake/src/firedrake, inifile: collecting 2 items collected 3589 items / 4 errors pylit/doc/examples/testfile_literate.py.txt F pylit/doc/examples/testmod_literate.py.txt F tests/test_0init.py F. tests/test_ffc_interface.py .......... tests/benchmarks/test_assembly_overheads.py ssssssssssssssssssssssssss ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 ________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Homolya, Miklós [m.homolya14@imperial.ac.uk] Sent: Thursday, February 04, 2016 1:00 PM To: firedrake Subject: Re: [firedrake] upgrading firedrake
python tests/test_0init.py
Please try py.test instead of python. If you have no py.test (in your virtualenv), install it with: pip install pytest ________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Francis Poulin <fpoulin@uwaterloo.ca> Sent: 04 February 2016 17:58 To: firedrake Subject: Re: [firedrake] upgrading firedrake Hello, Since yesterday I have reinstalled firedrake on my mac and still get the same issues. What I don't understand is that when I do make alltest it seems to run most of the tests ok. But when I try running python tests/test_0init.py it fails. Any idea what make alltest does differently that would work? Francis ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
I upgraded ipython and when I try importing firedrake it doesn't give an error, presumably that worked?
Yes.
but when I try it in python I get the following error. It now seems to be complaining that it has problems with petsc4py, which is something I installed in my other version of python.
Seems like your python picks up the wrong petsc4py for some reason. What is the value of the following environment variables? PYTHONPATH PETSC_DIR PETSC_ARCH What does "import sys; sys.path" print if you type it in python and in ipython?
Should I try removing petsc4py from all my versions of python and then reinstall?
That may help, yes. ________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Francis Poulin <fpoulin@uwaterloo.ca> Sent: 04 February 2016 19:24 To: firedrake Subject: Re: [firedrake] upgrading firedrake I upgraded ipython and when I try importing firedrake it doesn't give an error, presumably that worked? but when I try it in python I get the following error. It now seems to be complaining that it has problems with petsc4py, which is something I installed in my other version of python. Should I try removing petsc4py from all my versions of python and then reinstall?
from firedrake import * Traceback (most recent call last): File "<stdin>", line 1, in <module> File "firedrake/__init__.py", line 3, in <module> import firedrake.petsc as petsc File "firedrake/petsc.py", line 5, in <module> petsc4py.init(sys.argv) File "/Users/fpoulin/Library/Python/2.7/lib/python/site-packages/petsc4py/__init__.py", line 42, in init PETSc = petsc4py.lib.ImportPETSc(arch) File "/Users/fpoulin/Library/Python/2.7/lib/python/site-packages/petsc4py/lib/__init__.py", line 29, in ImportPETSc return Import('petsc4py', 'PETSc', path, arch) File "/Users/fpoulin/Library/Python/2.7/lib/python/site-packages/petsc4py/lib/__init__.py", line 64, in Import module = imp.load_module(fullname, fo, fn, stuff) ImportError: dlopen(/Users/fpoulin/Library/Python/2.7/lib/python/site-packages/petsc4py/lib/darwin10.6.0-c-debug/PETSc.so, 2): Library not loaded: /sw/lib/openmpi/libmpi.1.dylib Referenced from: /Users/fpoulin/Library/Python/2.7/lib/python/site-packages/petsc4py/lib/darwin10.6.0-c-debug/PETSc.so Reason: image not found
------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 ________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Homolya, Miklós [m.homolya14@imperial.ac.uk] Sent: Thursday, February 04, 2016 1:39 PM To: firedrake Subject: Re: [firedrake] upgrading firedrake py.test is only for running tests (which were written for py.test). Otherwise you can just use python to run firedrake scripts. For interactive sessions, ipython provides a better experience (you can pip install ipython). Once you are in python (or ipython), just: from firedrake import * and go ahead using Firedrake. ________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Francis Poulin <fpoulin@uwaterloo.ca> Sent: 04 February 2016 18:33 To: firedrake Subject: Re: [firedrake] upgrading firedrake I agree that is good news for the tests. Unfortunately, I can't use py.test to open up a python session. Any ideas what I should do? Francis ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 ________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Homolya, Miklós [m.homolya14@imperial.ac.uk] Sent: Thursday, February 04, 2016 1:32 PM To: firedrake Subject: Re: [firedrake] upgrading firedrake You should use py.test to run the tests. 'make alltest' uses py.test as well. The output shows that all the tests in tests/test_0init.py has passed, which is definitely a success. ________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Francis Poulin <fpoulin@uwaterloo.ca> Sent: 04 February 2016 18:28 To: firedrake Subject: Re: [firedrake] upgrading firedrake Ah, thanks. I properly installed pytest. I ran the following with some success py.test tests/test_0init.py Does this mean I should replace my python with py.test or something else? =============================================================================================== test session starts ================================================================================================ platform darwin -- Python 2.7.11, pytest-2.8.7, py-1.4.31, pluggy-0.3.1 rootdir: /Users/fpoulin/software/firedrake/src/firedrake, inifile: collected 2 items tests/test_0init.py .. ============================================================================================= 2 passed in 0.71 seconds ============================================================================================= ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 ________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Homolya, Miklós [m.homolya14@imperial.ac.uk] Sent: Thursday, February 04, 2016 1:24 PM To: firedrake Subject: Re: [firedrake] upgrading firedrake Seems like you already have a pytest outside your virtualenv which gets picked up. You can force the installation of pytest inside the virtualenv by pip install --ignore-installed pytest Using pip install --upgrade pytest might also work. ________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Francis Poulin <fpoulin@uwaterloo.ca> Sent: 04 February 2016 18:20 To: firedrake Subject: Re: [firedrake] upgrading firedrake Thanks for the reply. First I tried to install pytest and it seemed to already be there. I then tried py.test and it added a couple of new tests at the beginning. It's still running but they seem to be passing. In particular, tests/test_0init.py passes, but when I try python tests/test_0init.py it fails because it can't import firedrake. There seems to be a problem with how the libraries are set up, as suggested by previous emails. (firedrake)am-laptop24:firedrake fpoulin$ pip install pytest Requirement already satisfied (use --upgrade to upgrade): pytest in /usr/local/lib/python2.7/site-packages Requirement already satisfied (use --upgrade to upgrade): py>=1.4.29 in /usr/local/lib/python2.7/site-packages (from pytest) (firedrake)am-laptop24:firedrake fpoulin$ py.test ========================================================== test session starts ========================================================== platform darwin -- Python 2.7.11, pytest-2.8.7, py-1.4.31, pluggy-0.3.1 rootdir: /Users/fpoulin/software/firedrake/src/firedrake, inifile: collecting 2 items collected 3589 items / 4 errors pylit/doc/examples/testfile_literate.py.txt F pylit/doc/examples/testmod_literate.py.txt F tests/test_0init.py F. tests/test_ffc_interface.py .......... tests/benchmarks/test_assembly_overheads.py ssssssssssssssssssssssssss ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 ________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Homolya, Miklós [m.homolya14@imperial.ac.uk] Sent: Thursday, February 04, 2016 1:00 PM To: firedrake Subject: Re: [firedrake] upgrading firedrake
python tests/test_0init.py
Please try py.test instead of python. If you have no py.test (in your virtualenv), install it with: pip install pytest ________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Francis Poulin <fpoulin@uwaterloo.ca> Sent: 04 February 2016 17:58 To: firedrake Subject: Re: [firedrake] upgrading firedrake Hello, Since yesterday I have reinstalled firedrake on my mac and still get the same issues. What I don't understand is that when I do make alltest it seems to run most of the tests ok. But when I try running python tests/test_0init.py it fails. Any idea what make alltest does differently that would work? Francis ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
I noticed that my PYTHONPATH was pointing to Library so I removed that from my bashrc and then reinstall firedrake from scratch. Now neither py.test not python work in terms of being able to import firedrake (firedrake)am-laptop24:firedrake fpoulin$ py.test tests/test_0init.py =============================================================================== test session starts ================================================================================ platform darwin -- Python 2.7.11, pytest-2.8.7, py-1.4.31, pluggy-0.3.1 rootdir: /Users/fpoulin/software/firedrake/src/firedrake, inifile: collected 0 items / 1 errors ====================================================================================== ERRORS ====================================================================================== _______________________________________________________________________ ERROR collecting tests/test_0init.py _______________________________________________________________________ tests/test_0init.py:3: in <module> from firedrake import * firedrake/__init__.py:31: in <module> from firedrake.assemble import * firedrake/assemble.py:9: in <module> from firedrake import assemble_expressions firedrake/assemble_expressions.py:17: in <module> from firedrake import function firedrake/function.py:14: in <module> from firedrake import functionspace firedrake/functionspace.py:16: in <module> from firedrake import dmplex E ImportError: cannot import name dmplex ============================================================================= 1 error in 0.78 seconds ============================================================================== When I look at the sys.path in python I get this mess. At the bottom you will see that it is pointing to LIbrary, which is no t in my python path. Not sure why that was added.
import sys sys.path ['', '/usr/local/lib/python2.7/site-packages/cbcdns-1.0.0-py2.7.egg', '/Users/fpoulin/software/pyqg', '/Users/fpoulin/software/pyro2', '/Users/fpoulin/software/SPINSpy', '/Users/fpoulin/software/firedrake/src/firedrake', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/Users/fpoulin/Library/Python/2.7/lib/python/site-packages', '/usr/local/lib/python2.7/site-packages', '/Library/Python/2.7/site-packages/distarray-0.6.0_dev-py2.7.egg', '/Library/Python/2.7/site-packages/numpy-1.9.2-py2.7-macosx-10.9-intel.egg', '/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg', '/Library/Python/2.7/site-packages']
Below is what happens when I try importing firedrake. It seems to have problems with petsc4py. (firedrake)am-laptop24:firedrake fpoulin$ python Python 2.7.11 (default, Jan 22 2016, 08:28:37) [GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import firedrake Traceback (most recent call last): File "<stdin>", line 1, in <module> File "firedrake/__init__.py", line 3, in <module> import firedrake.petsc as petsc File "firedrake/petsc.py", line 3, in <module> import petsc4py ImportError: No module named petsc4py
Note that I did specify the following before I installed. PETSC_CONFIGURE_OPTIONS="--download-ctetgen --download-triangle --download-chaco --download-metis --download-parmetis --download-scalapack --download-hypre --download-mumps --download-netcdf --download-hdf5 --download-exodusii" On ubuntu I see that petsc4py is in the following /home/fpoulin/software/firedrake/local/lib/python2.7/site-packages/petsc4py/__init__.pyc For my mac, there are site-packages but not for firedrake, but for the Library. Presumably it should be doing this in my firedrake directory? When I used ipython, which does import correctly, I get the following. No /LIbrary that I can see. However, it does add my anaconda, but I wanted to install this using my homebrew version of python. So not sure why those are there but at least they are not causing problems. In [4]: sys.path Out[4]: ['/Users/fpoulin/software/firedrake/lib/python2.7/site-packages', '', '/Users/fpoulin/software/firedrake/lib/python2.7/site-packages/h5py-2.5.0-py2.7-macosx-10.10-x86_64.egg', '/Users/fpoulin/software/anaconda/bin', '/Users/fpoulin/software/pyqg', '/Users/fpoulin/software/anaconda/lib/python2.7/site-packages/TwoDimBoussinesq-0.1.dev1-py2.7.egg', '/Users/fpoulin/software/pyro2', '/Users/fpoulin/software/SPINSpy', '/Users/fpoulin/software/firedrake/src/firedrake', '/Users/fpoulin/software/anaconda/lib/python27.zip', '/Users/fpoulin/software/anaconda/lib/python2.7', '/Users/fpoulin/software/anaconda/lib/python2.7/plat-darwin', '/Users/fpoulin/software/anaconda/lib/python2.7/plat-mac', '/Users/fpoulin/software/anaconda/lib/python2.7/plat-mac/lib-scriptpackages', '/Users/fpoulin/software/anaconda/lib/python2.7/lib-tk', '/Users/fpoulin/software/anaconda/lib/python2.7/lib-old', '/Users/fpoulin/software/anaconda/lib/python2.7/lib-dynload', '/Users/fpoulin/.local/lib/python2.7/site-packages', '/Users/fpoulin/software/anaconda/lib/python2.7/site-packages/Sphinx-1.3.1-py2.7.egg', '/Users/fpoulin/software/anaconda/lib/python2.7/site-packages/setuptools-17.1.1-py2.7.egg', '/Users/fpoulin/software/anaconda/lib/python2.7/site-packages', '/Users/fpoulin/software/anaconda/lib/python2.7/site-packages/aeosa', '/Users/fpoulin/software/anaconda/lib/python2.7/site-packages/IPython/extensions', '/Users/fpoulin/.ipython'] I then decided to force an upgrade for ipython, thinking that was a *good* idea and then I broke it. Running the test breaks, (firedrake)am-laptop24:firedrake fpoulin$ ipython tests/test_0init.py WARNING: Attempting to work in a virtualenv. If you encounter problems, please install IPython inside the virtualenv. --------------------------------------------------------------------------- ValueError Traceback (most recent call last) /Users/fpoulin/software/firedrake/src/firedrake/tests/test_0init.py in <module>() 20 if __name__ == '__main__': 21 import os ---> 22 pytest.main(os.path.abspath(__file__)) /Users/fpoulin/software/firedrake/lib/python2.7/site-packages/_pytest/config.pyc in main(args, plugins) 36 try: 37 try: ---> 38 config = _prepareconfig(args, plugins) 39 except ConftestImportFailure as e: 40 tw = py.io.TerminalWriter(sys.stderr) /Users/fpoulin/software/firedrake/lib/python2.7/site-packages/_pytest/config.pyc in _prepareconfig(args, plugins) 103 elif not isinstance(args, (tuple, list)): 104 if not isinstance(args, str): --> 105 raise ValueError("not a string or argument list: %r" % (args,)) 106 args = shlex.split(args) 107 config = get_config() ValueError: not a string or argument list: u'/Users/fpoulin/software/firedrake/src/firedrake/tests/test_0init.py' (firedrake)am-laptop24:firedrake fpoulin$ which pip /Users/fpoulin/software/firedrake/bin/pip ( It also complains about not finding petsc4py. For my new broken version of ipython I get the following path, In [4]: sys.path Out[4]: ['/Users/fpoulin/software/firedrake/lib/python2.7/site-packages', '', '/Users/fpoulin/software/firedrake/lib/python2.7/site-packages/h5py-2.5.0-py2.7-macosx-10.10-x86_64.egg', '/Users/fpoulin/software/anaconda/bin', '/Users/fpoulin/software/pyqg', '/Users/fpoulin/software/anaconda/lib/python2.7/site-packages/TwoDimBoussinesq-0.1.dev1-py2.7.egg', '/Users/fpoulin/software/pyro2', '/Users/fpoulin/software/SPINSpy', '/Users/fpoulin/software/firedrake/src/firedrake', '/Users/fpoulin/software/anaconda/lib/python27.zip', '/Users/fpoulin/software/anaconda/lib/python2.7', '/Users/fpoulin/software/anaconda/lib/python2.7/plat-darwin', '/Users/fpoulin/software/anaconda/lib/python2.7/plat-mac', '/Users/fpoulin/software/anaconda/lib/python2.7/plat-mac/lib-scriptpackages', '/Users/fpoulin/software/anaconda/lib/python2.7/lib-tk', '/Users/fpoulin/software/anaconda/lib/python2.7/lib-old', '/Users/fpoulin/software/anaconda/lib/python2.7/lib-dynload', '/Users/fpoulin/.local/lib/python2.7/site-packages', '/Users/fpoulin/software/anaconda/lib/python2.7/site-packages/Sphinx-1.3.1-py2.7.egg', '/Users/fpoulin/software/anaconda/lib/python2.7/site-packages/setuptools-17.1.1-py2.7.egg', '/Users/fpoulin/software/anaconda/lib/python2.7/site-packages', '/Users/fpoulin/software/anaconda/lib/python2.7/site-packages/aeosa', '/Users/fpoulin/software/anaconda/lib/python2.7/site-packages/IPython/extensions', '/Users/fpoulin/.ipython'] Sorry for all the mess but if someone had some advance I would be happy to test it out. Also, I presume I should rebuild it since I broke ipython ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 ________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Homolya, Miklós [m.homolya14@imperial.ac.uk] Sent: Thursday, February 04, 2016 3:47 PM To: firedrake Subject: Re: [firedrake] upgrading firedrake
I upgraded ipython and when I try importing firedrake it doesn't give an error, presumably that worked?
Yes.
but when I try it in python I get the following error. It now seems to be complaining that it has problems with petsc4py, which is something I installed in my other version of python.
Seems like your python picks up the wrong petsc4py for some reason. What is the value of the following environment variables? PYTHONPATH PETSC_DIR PETSC_ARCH What does "import sys; sys.path" print if you type it in python and in ipython?
Should I try removing petsc4py from all my versions of python and then reinstall?
That may help, yes. ________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Francis Poulin <fpoulin@uwaterloo.ca> Sent: 04 February 2016 19:24 To: firedrake Subject: Re: [firedrake] upgrading firedrake I upgraded ipython and when I try importing firedrake it doesn't give an error, presumably that worked? but when I try it in python I get the following error. It now seems to be complaining that it has problems with petsc4py, which is something I installed in my other version of python. Should I try removing petsc4py from all my versions of python and then reinstall?
from firedrake import * Traceback (most recent call last): File "<stdin>", line 1, in <module> File "firedrake/__init__.py", line 3, in <module> import firedrake.petsc as petsc File "firedrake/petsc.py", line 5, in <module> petsc4py.init(sys.argv) File "/Users/fpoulin/Library/Python/2.7/lib/python/site-packages/petsc4py/__init__.py", line 42, in init PETSc = petsc4py.lib.ImportPETSc(arch) File "/Users/fpoulin/Library/Python/2.7/lib/python/site-packages/petsc4py/lib/__init__.py", line 29, in ImportPETSc return Import('petsc4py', 'PETSc', path, arch) File "/Users/fpoulin/Library/Python/2.7/lib/python/site-packages/petsc4py/lib/__init__.py", line 64, in Import module = imp.load_module(fullname, fo, fn, stuff) ImportError: dlopen(/Users/fpoulin/Library/Python/2.7/lib/python/site-packages/petsc4py/lib/darwin10.6.0-c-debug/PETSc.so, 2): Library not loaded: /sw/lib/openmpi/libmpi.1.dylib Referenced from: /Users/fpoulin/Library/Python/2.7/lib/python/site-packages/petsc4py/lib/darwin10.6.0-c-debug/PETSc.so Reason: image not found
------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 ________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Homolya, Miklós [m.homolya14@imperial.ac.uk] Sent: Thursday, February 04, 2016 1:39 PM To: firedrake Subject: Re: [firedrake] upgrading firedrake py.test is only for running tests (which were written for py.test). Otherwise you can just use python to run firedrake scripts. For interactive sessions, ipython provides a better experience (you can pip install ipython). Once you are in python (or ipython), just: from firedrake import * and go ahead using Firedrake. ________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Francis Poulin <fpoulin@uwaterloo.ca> Sent: 04 February 2016 18:33 To: firedrake Subject: Re: [firedrake] upgrading firedrake I agree that is good news for the tests. Unfortunately, I can't use py.test to open up a python session. Any ideas what I should do? Francis ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 ________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Homolya, Miklós [m.homolya14@imperial.ac.uk] Sent: Thursday, February 04, 2016 1:32 PM To: firedrake Subject: Re: [firedrake] upgrading firedrake You should use py.test to run the tests. 'make alltest' uses py.test as well. The output shows that all the tests in tests/test_0init.py has passed, which is definitely a success. ________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Francis Poulin <fpoulin@uwaterloo.ca> Sent: 04 February 2016 18:28 To: firedrake Subject: Re: [firedrake] upgrading firedrake Ah, thanks. I properly installed pytest. I ran the following with some success py.test tests/test_0init.py Does this mean I should replace my python with py.test or something else? =============================================================================================== test session starts ================================================================================================ platform darwin -- Python 2.7.11, pytest-2.8.7, py-1.4.31, pluggy-0.3.1 rootdir: /Users/fpoulin/software/firedrake/src/firedrake, inifile: collected 2 items tests/test_0init.py .. ============================================================================================= 2 passed in 0.71 seconds ============================================================================================= ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 ________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Homolya, Miklós [m.homolya14@imperial.ac.uk] Sent: Thursday, February 04, 2016 1:24 PM To: firedrake Subject: Re: [firedrake] upgrading firedrake Seems like you already have a pytest outside your virtualenv which gets picked up. You can force the installation of pytest inside the virtualenv by pip install --ignore-installed pytest Using pip install --upgrade pytest might also work. ________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Francis Poulin <fpoulin@uwaterloo.ca> Sent: 04 February 2016 18:20 To: firedrake Subject: Re: [firedrake] upgrading firedrake Thanks for the reply. First I tried to install pytest and it seemed to already be there. I then tried py.test and it added a couple of new tests at the beginning. It's still running but they seem to be passing. In particular, tests/test_0init.py passes, but when I try python tests/test_0init.py it fails because it can't import firedrake. There seems to be a problem with how the libraries are set up, as suggested by previous emails. (firedrake)am-laptop24:firedrake fpoulin$ pip install pytest Requirement already satisfied (use --upgrade to upgrade): pytest in /usr/local/lib/python2.7/site-packages Requirement already satisfied (use --upgrade to upgrade): py>=1.4.29 in /usr/local/lib/python2.7/site-packages (from pytest) (firedrake)am-laptop24:firedrake fpoulin$ py.test ========================================================== test session starts ========================================================== platform darwin -- Python 2.7.11, pytest-2.8.7, py-1.4.31, pluggy-0.3.1 rootdir: /Users/fpoulin/software/firedrake/src/firedrake, inifile: collecting 2 items collected 3589 items / 4 errors pylit/doc/examples/testfile_literate.py.txt F pylit/doc/examples/testmod_literate.py.txt F tests/test_0init.py F. tests/test_ffc_interface.py .......... tests/benchmarks/test_assembly_overheads.py ssssssssssssssssssssssssss ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 ________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Homolya, Miklós [m.homolya14@imperial.ac.uk] Sent: Thursday, February 04, 2016 1:00 PM To: firedrake Subject: Re: [firedrake] upgrading firedrake
python tests/test_0init.py
Please try py.test instead of python. If you have no py.test (in your virtualenv), install it with: pip install pytest ________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Francis Poulin <fpoulin@uwaterloo.ca> Sent: 04 February 2016 17:58 To: firedrake Subject: Re: [firedrake] upgrading firedrake Hello, Since yesterday I have reinstalled firedrake on my mac and still get the same issues. What I don't understand is that when I do make alltest it seems to run most of the tests ok. But when I try running python tests/test_0init.py it fails. Any idea what make alltest does differently that would work? Francis ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637 _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
Where is your python from? What does $ which python say? Please note that on Mac you need homebrew installed Python. Python from anaconda is not supported on any platform, as anaconda doesn’t support virtualenv, which we do need.
On 4 Feb 2016, at 22:29, Francis Poulin <fpoulin@uwaterloo.ca> wrote:
I noticed that my PYTHONPATH was pointing to Library so I removed that from my bashrc and then reinstall firedrake from scratch. Now neither py.test not python work in terms of being able to import firedrake
(firedrake)am-laptop24:firedrake fpoulin$ py.test tests/test_0init.py =============================================================================== test session starts ================================================================================ platform darwin -- Python 2.7.11, pytest-2.8.7, py-1.4.31, pluggy-0.3.1 rootdir: /Users/fpoulin/software/firedrake/src/firedrake, inifile: collected 0 items / 1 errors
====================================================================================== ERRORS ====================================================================================== _______________________________________________________________________ ERROR collecting tests/test_0init.py _______________________________________________________________________ tests/test_0init.py:3: in <module> from firedrake import * firedrake/__init__.py:31: in <module> from firedrake.assemble import * firedrake/assemble.py:9: in <module> from firedrake import assemble_expressions firedrake/assemble_expressions.py:17: in <module> from firedrake import function firedrake/function.py:14: in <module> from firedrake import functionspace firedrake/functionspace.py:16: in <module> from firedrake import dmplex E ImportError: cannot import name dmplex ============================================================================= 1 error in 0.78 seconds ==============================================================================
When I look at the sys.path in python I get this mess. At the bottom you will see that it is pointing to LIbrary, which is no t in my python path. Not sure why that was added.
import sys sys.path ['', '/usr/local/lib/python2.7/site-packages/cbcdns-1.0.0-py2.7.egg', '/Users/fpoulin/software/pyqg', '/Users/fpoulin/software/pyro2', '/Users/fpoulin/software/SPINSpy', '/Users/fpoulin/software/firedrake/src/firedrake', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/Users/fpoulin/Library/Python/2.7/lib/python/site-packages', '/usr/local/lib/python2.7/site-packages', '/Library/Python/2.7/site-packages/distarray-0.6.0_dev-py2.7.egg', '/Library/Python/2.7/site-packages/numpy-1.9.2-py2.7-macosx-10.9-intel.egg', '/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg', '/Library/Python/2.7/site-packages']
Below is what happens when I try importing firedrake. It seems to have problems with petsc4py.
(firedrake)am-laptop24:firedrake fpoulin$ python Python 2.7.11 (default, Jan 22 2016, 08:28:37) [GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import firedrake Traceback (most recent call last): File "<stdin>", line 1, in <module> File "firedrake/__init__.py", line 3, in <module> import firedrake.petsc as petsc File "firedrake/petsc.py", line 3, in <module> import petsc4py ImportError: No module named petsc4py
Note that I did specify the following before I installed.
PETSC_CONFIGURE_OPTIONS="--download-ctetgen --download-triangle --download-chaco --download-metis --download-parmetis --download-scalapack --download-hypre --download-mumps --download-netcdf --download-hdf5 --download-exodusii"
On ubuntu I see that petsc4py is in the following
/home/fpoulin/software/firedrake/local/lib/python2.7/site-packages/petsc4py/__init__.pyc
For my mac, there are site-packages but not for firedrake, but for the Library. Presumably it should be doing this in my firedrake directory?
When I used ipython, which does import correctly, I get the following. No /LIbrary that I can see. However, it does add my anaconda, but I wanted to install this using my homebrew version of python. So not sure why those are there but at least they are not causing problems.
In [4]: sys.path Out[4]: ['/Users/fpoulin/software/firedrake/lib/python2.7/site-packages', '', '/Users/fpoulin/software/firedrake/lib/python2.7/site-packages/h5py-2.5.0-py2.7-macosx-10.10-x86_64.egg', '/Users/fpoulin/software/anaconda/bin', '/Users/fpoulin/software/pyqg', '/Users/fpoulin/software/anaconda/lib/python2.7/site-packages/TwoDimBoussinesq-0.1.dev1-py2.7.egg', '/Users/fpoulin/software/pyro2', '/Users/fpoulin/software/SPINSpy', '/Users/fpoulin/software/firedrake/src/firedrake', '/Users/fpoulin/software/anaconda/lib/python27.zip', '/Users/fpoulin/software/anaconda/lib/python2.7', '/Users/fpoulin/software/anaconda/lib/python2.7/plat-darwin', '/Users/fpoulin/software/anaconda/lib/python2.7/plat-mac', '/Users/fpoulin/software/anaconda/lib/python2.7/plat-mac/lib-scriptpackages', '/Users/fpoulin/software/anaconda/lib/python2.7/lib-tk', '/Users/fpoulin/software/anaconda/lib/python2.7/lib-old', '/Users/fpoulin/software/anaconda/lib/python2.7/lib-dynload', '/Users/fpoulin/.local/lib/python2.7/site-packages', '/Users/fpoulin/software/anaconda/lib/python2.7/site-packages/Sphinx-1.3.1-py2.7.egg', '/Users/fpoulin/software/anaconda/lib/python2.7/site-packages/setuptools-17.1.1-py2.7.egg', '/Users/fpoulin/software/anaconda/lib/python2.7/site-packages', '/Users/fpoulin/software/anaconda/lib/python2.7/site-packages/aeosa', '/Users/fpoulin/software/anaconda/lib/python2.7/site-packages/IPython/extensions', '/Users/fpoulin/.ipython']
I then decided to force an upgrade for ipython, thinking that was a *good* idea and then I broke it. Running the test breaks,
(firedrake)am-laptop24:firedrake fpoulin$ ipython tests/test_0init.py WARNING: Attempting to work in a virtualenv. If you encounter problems, please install IPython inside the virtualenv. --------------------------------------------------------------------------- ValueError Traceback (most recent call last) /Users/fpoulin/software/firedrake/src/firedrake/tests/test_0init.py in <module>() 20 if __name__ == '__main__': 21 import os ---> 22 pytest.main(os.path.abspath(__file__))
/Users/fpoulin/software/firedrake/lib/python2.7/site-packages/_pytest/config.pyc in main(args, plugins) 36 try: 37 try: ---> 38 config = _prepareconfig(args, plugins) 39 except ConftestImportFailure as e: 40 tw = py.io.TerminalWriter(sys.stderr)
/Users/fpoulin/software/firedrake/lib/python2.7/site-packages/_pytest/config.pyc in _prepareconfig(args, plugins) 103 elif not isinstance(args, (tuple, list)): 104 if not isinstance(args, str): --> 105 raise ValueError("not a string or argument list: %r" % (args,)) 106 args = shlex.split(args) 107 config = get_config()
ValueError: not a string or argument list: u'/Users/fpoulin/software/firedrake/src/firedrake/tests/test_0init.py' (firedrake)am-laptop24:firedrake fpoulin$ which pip /Users/fpoulin/software/firedrake/bin/pip (
It also complains about not finding petsc4py.
For my new broken version of ipython I get the following path,
In [4]: sys.path Out[4]: ['/Users/fpoulin/software/firedrake/lib/python2.7/site-packages', '', '/Users/fpoulin/software/firedrake/lib/python2.7/site-packages/h5py-2.5.0-py2.7-macosx-10.10-x86_64.egg', '/Users/fpoulin/software/anaconda/bin', '/Users/fpoulin/software/pyqg', '/Users/fpoulin/software/anaconda/lib/python2.7/site-packages/TwoDimBoussinesq-0.1.dev1-py2.7.egg', '/Users/fpoulin/software/pyro2', '/Users/fpoulin/software/SPINSpy', '/Users/fpoulin/software/firedrake/src/firedrake', '/Users/fpoulin/software/anaconda/lib/python27.zip', '/Users/fpoulin/software/anaconda/lib/python2.7', '/Users/fpoulin/software/anaconda/lib/python2.7/plat-darwin', '/Users/fpoulin/software/anaconda/lib/python2.7/plat-mac', '/Users/fpoulin/software/anaconda/lib/python2.7/plat-mac/lib-scriptpackages', '/Users/fpoulin/software/anaconda/lib/python2.7/lib-tk', '/Users/fpoulin/software/anaconda/lib/python2.7/lib-old', '/Users/fpoulin/software/anaconda/lib/python2.7/lib-dynload', '/Users/fpoulin/.local/lib/python2.7/site-packages', '/Users/fpoulin/software/anaconda/lib/python2.7/site-packages/Sphinx-1.3.1-py2.7.egg', '/Users/fpoulin/software/anaconda/lib/python2.7/site-packages/setuptools-17.1.1-py2.7.egg', '/Users/fpoulin/software/anaconda/lib/python2.7/site-packages', '/Users/fpoulin/software/anaconda/lib/python2.7/site-packages/aeosa', '/Users/fpoulin/software/anaconda/lib/python2.7/site-packages/IPython/extensions', '/Users/fpoulin/.ipython']
Sorry for all the mess but if someone had some advance I would be happy to test it out. Also, I presume I should rebuild it since I broke ipython
------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo
email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637
________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Homolya, Miklós [m.homolya14@imperial.ac.uk] Sent: Thursday, February 04, 2016 3:47 PM To: firedrake Subject: Re: [firedrake] upgrading firedrake
I upgraded ipython and when I try importing firedrake it doesn't give an error, presumably that worked?
Yes.
but when I try it in python I get the following error. It now seems to be complaining that it has problems with petsc4py, which is something I installed in my other version of python.
Seems like your python picks up the wrong petsc4py for some reason. What is the value of the following environment variables?
PYTHONPATH PETSC_DIR PETSC_ARCH
What does "import sys; sys.path" print if you type it in python and in ipython?
Should I try removing petsc4py from all my versions of python and then reinstall?
That may help, yes.
________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Francis Poulin <fpoulin@uwaterloo.ca> Sent: 04 February 2016 19:24 To: firedrake Subject: Re: [firedrake] upgrading firedrake
I upgraded ipython and when I try importing firedrake it doesn't give an error, presumably that worked?
but when I try it in python I get the following error. It now seems to be complaining that it has problems with petsc4py, which is something I installed in my other version of python.
Should I try removing petsc4py from all my versions of python and then reinstall?
from firedrake import * Traceback (most recent call last): File "<stdin>", line 1, in <module> File "firedrake/__init__.py", line 3, in <module> import firedrake.petsc as petsc File "firedrake/petsc.py", line 5, in <module> petsc4py.init(sys.argv) File "/Users/fpoulin/Library/Python/2.7/lib/python/site-packages/petsc4py/__init__.py", line 42, in init PETSc = petsc4py.lib.ImportPETSc(arch) File "/Users/fpoulin/Library/Python/2.7/lib/python/site-packages/petsc4py/lib/__init__.py", line 29, in ImportPETSc return Import('petsc4py', 'PETSc', path, arch) File "/Users/fpoulin/Library/Python/2.7/lib/python/site-packages/petsc4py/lib/__init__.py", line 64, in Import module = imp.load_module(fullname, fo, fn, stuff) ImportError: dlopen(/Users/fpoulin/Library/Python/2.7/lib/python/site-packages/petsc4py/lib/darwin10.6.0-c-debug/PETSc.so, 2): Library not loaded: /sw/lib/openmpi/libmpi.1.dylib Referenced from: /Users/fpoulin/Library/Python/2.7/lib/python/site-packages/petsc4py/lib/darwin10.6.0-c-debug/PETSc.so Reason: image not found
------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo
email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637
________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Homolya, Miklós [m.homolya14@imperial.ac.uk] Sent: Thursday, February 04, 2016 1:39 PM To: firedrake Subject: Re: [firedrake] upgrading firedrake
py.test is only for running tests (which were written for py.test).
Otherwise you can just use python to run firedrake scripts. For interactive sessions, ipython provides a better experience (you can pip install ipython).
Once you are in python (or ipython), just:
from firedrake import *
and go ahead using Firedrake.
________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Francis Poulin <fpoulin@uwaterloo.ca> Sent: 04 February 2016 18:33 To: firedrake Subject: Re: [firedrake] upgrading firedrake
I agree that is good news for the tests.
Unfortunately, I can't use py.test to open up a python session. Any ideas what I should do?
Francis
------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo
email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637
________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Homolya, Miklós [m.homolya14@imperial.ac.uk] Sent: Thursday, February 04, 2016 1:32 PM To: firedrake Subject: Re: [firedrake] upgrading firedrake
You should use py.test to run the tests. 'make alltest' uses py.test as well.
The output shows that all the tests in tests/test_0init.py has passed, which is definitely a success.
________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Francis Poulin <fpoulin@uwaterloo.ca> Sent: 04 February 2016 18:28 To: firedrake Subject: Re: [firedrake] upgrading firedrake
Ah, thanks.
I properly installed pytest.
I ran the following with some success
py.test tests/test_0init.py
Does this mean I should replace my python with py.test or something else?
=============================================================================================== test session starts ================================================================================================ platform darwin -- Python 2.7.11, pytest-2.8.7, py-1.4.31, pluggy-0.3.1 rootdir: /Users/fpoulin/software/firedrake/src/firedrake, inifile: collected 2 items
tests/test_0init.py ..
============================================================================================= 2 passed in 0.71 seconds =============================================================================================
------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo
email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637
________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Homolya, Miklós [m.homolya14@imperial.ac.uk] Sent: Thursday, February 04, 2016 1:24 PM To: firedrake Subject: Re: [firedrake] upgrading firedrake
Seems like you already have a pytest outside your virtualenv which gets picked up. You can force the installation of pytest inside the virtualenv by
pip install --ignore-installed pytest
Using
pip install --upgrade pytest
might also work.
________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Francis Poulin <fpoulin@uwaterloo.ca> Sent: 04 February 2016 18:20 To: firedrake Subject: Re: [firedrake] upgrading firedrake
Thanks for the reply.
First I tried to install pytest and it seemed to already be there.
I then tried py.test and it added a couple of new tests at the beginning. It's still running but they seem to be passing. In particular, tests/test_0init.py passes, but when I try
python tests/test_0init.py
it fails because it can't import firedrake. There seems to be a problem with how the libraries are set up, as suggested by previous emails.
(firedrake)am-laptop24:firedrake fpoulin$ pip install pytest Requirement already satisfied (use --upgrade to upgrade): pytest in /usr/local/lib/python2.7/site-packages Requirement already satisfied (use --upgrade to upgrade): py>=1.4.29 in /usr/local/lib/python2.7/site-packages (from pytest) (firedrake)am-laptop24:firedrake fpoulin$ py.test ========================================================== test session starts ========================================================== platform darwin -- Python 2.7.11, pytest-2.8.7, py-1.4.31, pluggy-0.3.1 rootdir: /Users/fpoulin/software/firedrake/src/firedrake, inifile: collecting 2 items collected 3589 items / 4 errors
pylit/doc/examples/testfile_literate.py.txt F pylit/doc/examples/testmod_literate.py.txt F tests/test_0init.py F. tests/test_ffc_interface.py .......... tests/benchmarks/test_assembly_overheads.py ssssssssssssssssssssssssss
------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo
email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637
________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Homolya, Miklós [m.homolya14@imperial.ac.uk] Sent: Thursday, February 04, 2016 1:00 PM To: firedrake Subject: Re: [firedrake] upgrading firedrake
python tests/test_0init.py
Please try py.test instead of python.
If you have no py.test (in your virtualenv), install it with:
pip install pytest
________________________________________ From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Francis Poulin <fpoulin@uwaterloo.ca> Sent: 04 February 2016 17:58 To: firedrake Subject: Re: [firedrake] upgrading firedrake
Hello,
Since yesterday I have reinstalled firedrake on my mac and still get the same issues.
What I don't understand is that when I do make alltest it seems to run most of the tests ok. But when I try running
python tests/test_0init.py
it fails.
Any idea what make alltest does differently that would work?
Francis
------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo
email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
In my bashrc I set my python and ipython to point to my anaconda installation. When I run firedrake-install I use my homebrew installation. There is also the default python on a mac that I don't touch. ------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637
participants (5)
- 
                
                David Ham
- 
                
                Francis Poulin
- 
                
                Homolya, Miklós
- 
                
                Lawrence Mitchell
- 
                
                Miklós Homolya