Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OS X (MacBook Pro; Intel) FiPy installation problems #113

Closed
fipymigrate opened this issue Sep 19, 2014 · 1 comment
Closed

OS X (MacBook Pro; Intel) FiPy installation problems #113

fipymigrate opened this issue Sep 19, 2014 · 1 comment

Comments

@fipymigrate
Copy link

Hi guys,

I installed (apparently) FiPy in my PowerBook Pro. However, when I try running one of the examples, I get the message:

adamantium:~/Installs/FiPy-1.2 edwin$ python examples/diffusion/mesh1D.py
Traceback (most recent call last):
File "examples/diffusion/mesh1D.py", line 779, in ?
exec(fipy.tests.doctestPlus._getScript())
File "", line 191, in ?
File "/Users/edwin/Installs/FiPy-1.2/fipy/terms/term.py", line 121, in solve
matrix, RHSvector = self.__buildMatrix(var, boundaryConditions, dt)
File "/Users/edwin/Installs/FiPy-1.2/fipy/terms/term.py", line 88, in __buildMatrix
return self._buildMatrix(var, boundaryConditions, dt)
File "/Users/edwin/Installs/FiPy-1.2/fipy/terms/binaryTerm.py", line 66, in _buildMatrix
termMatrix, termRHSvector = self.term2._buildMatrix(var, boundaryConditions, dt = dt)
File "/Users/edwin/Installs/FiPy-1.2/fipy/terms/explicitDiffusionTerm.py", line 62, in _buildMatrix
L, b = DiffusionTerm._buildMatrix(self, var.getOld(), boundaryConditions = boundaryConditions, dt = dt)
File "/Users/edwin/Installs/FiPy-1.2/fipy/terms/diffusionTerm.py", line 272, in _buildMatrix
self._getCoefficientMatrix(mesh, self.coeffDict1 diag'), numerix.zeros(N,'d'))
File "/Users/edwin/Installs/FiPy-1.2/fipy/terms/diffusionTerm.py", line 178, in _getCoefficientMatrix
coefficientMatrix.addAt(interiorCoeff, interiorFaceCellIDs[...,0], interiorFaceCellIDs[...,1])
File "fipy/tools/sparseMatrix.py", line 322, in addAt
self.matrix.update_add_at(vector, id1, id2)
TypeError: No array interface and array method not returning Numeric array.

I installed PySparse from the tar ball. In the process, I edited setup.py and set use_numpy to False because it was NOT compiling. Does this have to do anything with the behavior that I am experiencing? I am using python 2.4. When I installed FiPy I did NOT get any complaints.

I ran then all the tests, and I got 64 failures (too many to post here).

I would appreciate any help.

Thanks!,

Edwin

Imported from trac ticket #128, created by redwing@purdue.edu on 03-24-2007 at 11:49, last modified: 06-26-2008 at 16:26

@wd15
Copy link
Contributor

wd15 commented Sep 19, 2014

The problem is that you are using the old Numeric with pysparse, but the new numpy
with fipy (doesn't work). The reason that pysparse didn't compile with numpy is that at the moment numpy is not putting the header files in the correct place. I put out a mail to the pysparse list, but, because technology sucks, I can't access it on sourceforge. Anyway, to fix your problem copy the header files from:

/pythonBasePath/site-packages/python/numpy/core/include/

to

Include/Lib/numpy

in your working copy of pysparse and switch use_numpy to True.

Trac comment by wd15 on 03-25-2007 at 11:13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants