On Sat, Jan 18, 2014 at 5:03 PM, Phillip Feldman
<phillip.m.feld...@gmail.com> wrote:
>
> I installed FiPy 3.1 on my Windows
> 7 computer using Enthought Canopy's Package Manager. When I try to run any
> of the examples, they fail with errors (see below). Has anyone had success
> running FiPy 3.1 on a Windows 7 machine? Any suggestions will be
> appreciated.

Sorry for the slow response. I don't have a Windows 7 machine readily
to hand, but I think the issues you are having are fairly generic.

> \FiPy-3.1\examples\cahnHilliard>python mesh2D.py
> Traceback (most recent call last):
> File "mesh2D.py", line 147, in <module>
> exec(fipy.tests.doctestPlus._getScript())
> File "<string>", line 94, in <module>
> File
> "c:\users\phillip\appdata\local\enthought\canopy\user\lib\site-packages\fipy-3.1-py2.7.egg\fipy\terms\term.py",
> line 211, in solve
> "c:\users\phillip\appdata\local\enthought\canopy\user\lib\site-packages\fipy-3.1-py2.7.egg\fipy\matrices\pysparseMatrix.py",
> line 246, in addAt
> self.matrix.update_add_at(vector, id1, id2)
> TypeError: Cannot cast array data from dtype('int64') to dtype('int32')
> according to the rule 'safe'

It seems like an inconsistency between PySparse and Numpy. You may be
using a 64 bit Numpy with FiPy, but a version of PySparse that was
built with a 32 bit Numpy. A gruesome hack to fix this requires
changing the line above from

    self.matrix.update_add_at(vector, id1, id2)

to

   self.matrix.update_add_at(vector, id1.astype('int32'), id2.astype('int64'))

You may have to do this in more than one place, which could get ugly.
An alternative is to just use the Scipy solvers, so at the command
line use "python mesh2D.py --scipy" to stipulate the Scipy solvers.
That should work. Also decrease the size of the mesh for this problem
while you are diagnosing. The default is "1000", decrease it to "100".

> \FiPy-3.1\examples\cahnHilliard>python sphere.py
> Traceback (most recent call last):
> File "sphere.py", line 148, in <module>
> raise EnvironmentError("Gmsh version must be >= 2.0.")
> EnvironmentError: Gmsh version must be >= 2.0.
>

What version of Gmsh are you using? Try "gmsh --version" at the
command line or fire up the Gmsh GUI and click "about".

Thanks for reporting your issues.

-- 
Daniel Wheeler
_______________________________________________
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Reply via email to