Dear firedrakers, I get a strange error message when I run ./scripts/firedrake-clean (branch multigrid-parallel, just pulled from remote): eikemueller@138-38-169-12 $ ./scripts/firedrake-clean Traceback (most recent call last): File "./scripts/firedrake-clean", line 3, in <module> from firedrake.ffc_interface import clear_cache, FFCKernel File "/Users/eikemueller/PostDocBath/EllipticSolvers/firedrake/firedrake/__init__.py", line 2, in <module> import petsc File "/Users/eikemueller/PostDocBath/EllipticSolvers/firedrake/firedrake/petsc.py", line 4, in <module> petsc4py.init(sys.argv) File "/Users/eikemueller/PostDocBath/EllipticSolvers/petsc4py/arch-darwin-c-opt/lib/python2.7/site-packages/petsc4py/__init__.py", line 42, in init PETSc = petsc4py.lib.ImportPETSc(arch) File "/Users/eikemueller/PostDocBath/EllipticSolvers/petsc4py/arch-darwin-c-opt/lib/python2.7/site-packages/petsc4py/lib/__init__.py", line 29, in ImportPETSc return Import('petsc4py', 'PETSc', path, arch) File "/Users/eikemueller/PostDocBath/EllipticSolvers/petsc4py/arch-darwin-c-opt/lib/python2.7/site-packages/petsc4py/lib/__init__.py", line 64, in Import module = imp.load_module(fullname, fo, fn, stuff) File "PETSc.pyx", line 100, in init petsc4py.PETSc (src/petsc4py.PETSc.c:221273) RuntimeError: module compiled against API version 9 but this version of numpy is 7 This is odd, because I just recompiled petsc4py (git pull; make clean; python setup.py install --prefix=`pwd`/$PETSC_ARCH). I did, however, get the following during petsc4py building: In file included from /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1760:0, from /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17, from /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4, from src/include/petsc4py/numpy.h:11, from src/petsc4py.PETSc.c:347, from src/PETSc.c:3: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp] #warning "Using deprecated NumPy API, disable it by " \ Also, I can build and use firedrake without any problems. Thanks, Eike -- Dr Eike Hermann Mueller Research Associate (PostDoc) Department of Mathematical Sciences University of Bath Bath BA2 7AY, United Kingdom +44 1225 38 5803 e.mueller@bath.ac.uk http://people.bath.ac.uk/em459/
On 13/11/14 15:47, Eike Mueller wrote:
Dear firedrakers,
I get a strange error message when I run ./scripts/firedrake-clean (branch multigrid-parallel, just pulled from remote):
eikemueller@138-38-169-12 $ ./scripts/firedrake-clean Traceback (most recent call last): File "./scripts/firedrake-clean", line 3, in <module> from firedrake.ffc_interface import clear_cache, FFCKernel File "/Users/eikemueller/PostDocBath/EllipticSolvers/firedrake/firedrake/__init__.py", line 2, in <module> import petsc File "/Users/eikemueller/PostDocBath/EllipticSolvers/firedrake/firedrake/petsc.py", line 4, in <module> petsc4py.init(sys.argv) File "/Users/eikemueller/PostDocBath/EllipticSolvers/petsc4py/arch-darwin-c-opt/lib/python2.7/site-packages/petsc4py/__init__.py", line 42, in init PETSc = petsc4py.lib.ImportPETSc(arch) File "/Users/eikemueller/PostDocBath/EllipticSolvers/petsc4py/arch-darwin-c-opt/lib/python2.7/site-packages/petsc4py/lib/__init__.py", line 29, in ImportPETSc return Import('petsc4py', 'PETSc', path, arch) File "/Users/eikemueller/PostDocBath/EllipticSolvers/petsc4py/arch-darwin-c-opt/lib/python2.7/site-packages/petsc4py/lib/__init__.py", line 64, in Import module = imp.load_module(fullname, fo, fn, stuff) File "PETSc.pyx", line 100, in init petsc4py.PETSc (src/petsc4py.PETSc.c:221273) RuntimeError: module compiled against API version 9 but this version of numpy is 7
This means that at some point you have built NumPy 1.9 as a dependency for either PyOP2, Firedrake or petsc4py and the built petsc4py against NumPy 1.9. However now you seem to be using the system NumPy 1.7. Remove NumPy 1.9 and rebuild petsc4py.
This is odd, because I just recompiled petsc4py (git pull; make clean; python setup.py install --prefix=`pwd`/$PETSC_ARCH). I did, however, get the following during petsc4py building:
In file included from /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1760:0, from /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17, from /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4, from src/include/petsc4py/numpy.h:11, from src/petsc4py.PETSc.c:347, from src/PETSc.c:3: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp] #warning "Using deprecated NumPy API, disable it by " \
Also, I can build and use firedrake without any problems.
You can safely ignore that warning, it's only a deprecation warning. Florian
Thanks,
Eike
Hi Florian,
This means that at some point you have built NumPy 1.9 as a dependency for either PyOP2, Firedrake or petsc4py and the built petsc4py against NumPy 1.9. However now you seem to be using the system NumPy 1.7.
Remove NumPy 1.9 and rebuild petsc4py.
how can I delete numpy 1.9, or even find out where it is installed? Strangely, I seem to have 1.8.0 installed: eikemueller@138-38-188-207 $ python Python 2.7.8 (default, Jul 13 2014, 17:11:32) [GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import numpy print numpy.__version__ 1.8.0
Also, why does it only crash in the firedrake-clean script, but works without any problems when I load firedrake or petsc4py? Thanks, Eike
On 14/11/14 08:40, Eike Mueller wrote:
Hi Florian,
This means that at some point you have built NumPy 1.9 as a dependency for either PyOP2, Firedrake or petsc4py and the built petsc4py against NumPy 1.9. However now you seem to be using the system NumPy 1.7.
Remove NumPy 1.9 and rebuild petsc4py.
how can I delete numpy 1.9, or even find out where it is installed?
It'll be installed in the same prefix location as whatever package it was installed as a dependency for. I usually type `pydoc numpy` to find out which NumPy is picked up and from where.
Strangely, I seem to have 1.8.0 installed:
eikemueller@138-38-188-207 $ python Python 2.7.8 (default, Jul 13 2014, 17:11:32) [GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import numpy print numpy.__version__ 1.8.0
Hmm, that's odd. Where is this coming from? Is this the system installed one? It *might* also be your version of Cython that plays a role because I *think* numpy.pxd comes with Cython.
Also, why does it only crash in the firedrake-clean script, but works without any problems when I load firedrake or petsc4py?
I suspect there must be a difference in PYTHONPATH for the environment you run firedrake in and execute the firedrake-clean script? Florian
Thanks,
Eike
Hi Florian, I think I now know what is going on: if I run the script with eikemueller@138-38-188-207 $ ./scripts/firedrake-clean it picks up a different python version than if I use eikemueller@138-38-188-207 $ python ./scripts/firedrake-clean I get 2.7.3 in the first case but 2.7.8 in the latter. 2.7.3 is an old Canopy python installation, and the link in my /usr/local/bin points to this. However, ‘python’ is aliased to the (correct) version 2.7.8 which I get when I explicitly invoke python: eikemueller@138-38-188-207 $ python Python 2.7.8 (default, Jul 13 2014, 17:11:32) [GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] on darwin Type "help", "copyright", "credits" or "license" for more information. The confusing thing is that ‘which’ tells me that he version in /usr/local/bin seems to be the version which is used, but it is not due the alias: eikemueller@138-38-188-207 $ which python /usr/local/bin/python eikemueller@138-38-188-207 $ type -a python python is aliased to `/opt/local/bin/python2.7' python is /usr/local/bin/python python is /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python python is /usr/local/bin/python python is /usr/bin/python Apparently env (which is used in the firedrake-clean script to invoke python via "#!/usr/bin/env python") uses the first version it finds in PATH, which is set to: /usr/local/openmpi-.8.1/bin/:/usr/local/bin:/Applications/LyX.app/Contents/MacOS/:/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/:/Users/eikemueller/PostDocBath/EllipticSolvers/petsc/arch-darwin-c-opt/bin:/Users/eikemueller/Tools/fcm-2014.06.0/bin/:/Users/eikemueller/Tools/fcm-2014.06.0/lib/FCM/:/usr/local/Dune2.2.1/bin/:/opt/pkgconfig/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin:/Users/eikemueller/Library/bin so it picks up the (wrong) version in /usr/local/bin. Anyway, I now simply deleted the symlink in /usr/local/bin and then it all works again. All this confusion must have come from my recent upgrade to Yosemite (which I still regret…). Thanks again for your help, Eike -- Dr Eike Hermann Mueller Research Associate (PostDoc) Department of Mathematical Sciences University of Bath Bath BA2 7AY, United Kingdom +44 1225 38 5803 e.mueller@bath.ac.uk http://people.bath.ac.uk/em459/
On 14 Nov 2014, at 08:46, Florian Rathgeber <florian.rathgeber@imperial.ac.uk> wrote:
On 14/11/14 08:40, Eike Mueller wrote:
Hi Florian,
This means that at some point you have built NumPy 1.9 as a dependency for either PyOP2, Firedrake or petsc4py and the built petsc4py against NumPy 1.9. However now you seem to be using the system NumPy 1.7.
Remove NumPy 1.9 and rebuild petsc4py.
how can I delete numpy 1.9, or even find out where it is installed?
It'll be installed in the same prefix location as whatever package it was installed as a dependency for. I usually type `pydoc numpy` to find out which NumPy is picked up and from where.
Strangely, I seem to have 1.8.0 installed:
eikemueller@138-38-188-207 $ python Python 2.7.8 (default, Jul 13 2014, 17:11:32) [GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import numpy print numpy.__version__ 1.8.0
Hmm, that's odd. Where is this coming from? Is this the system installed one? It *might* also be your version of Cython that plays a role because I *think* numpy.pxd comes with Cython.
Also, why does it only crash in the firedrake-clean script, but works without any problems when I load firedrake or petsc4py?
I suspect there must be a difference in PYTHONPATH for the environment you run firedrake in and execute the firedrake-clean script?
Florian
Thanks,
Eike
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
participants (2)
- 
                
                Eike Mueller
- 
                
                Florian Rathgeber