Leland M Barnard | 1 Feb 22:40
Picon
Favicon

Requesting help with a problem installing PySparse

I'm trying to set up fipy to run on a 64 bit red hat linux machine 
(specifically Rocks v5.2).   We have gcc v4.1.2  We also have the 
Enthought python distribution with python 2.7.

I'm having trouble installing pysparse v1.1.1.  When I use the command

python setup.py install

I receive this error message:

running install
running build
running build_py
running build_ext
building 'pysparse.spmatrix' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -O2 -fPIC -DNUMPY=1 
-DLENFUNC_OK=1 -IInclude 
-I/share/apps/Python2.7/epd-7.1-2-rh5-x86/lib/python2.7/site-packages/numpy/core/include 
-I/share/apps/Python2.7/epd-7.1-2-rh5-x86/include/python2.7 -c 
Src/spmatrixmodule.c -o build/temp.linux-x86_64-2.7/Src/spmatrixmodule.o
In file included from 
/share/apps/Python2.7/epd-7.1-2-rh5-x86/include/python2.7/Python.h:58,
                  from Src/spmatrixmodule.c:1:
/share/apps/Python2.7/epd-7.1-2-rh5-x86/include/python2.7/pyport.h:849:2: error: 
#error "LONG_BIT definition appears wrong for platform (bad gcc/glibc 
config?)."
error: command 'gcc' failed with exit status 1

I also tried pysparse v1.2 with the same result (in addition to some 
library linking errors that I'll also probably have to fix).
(Continue reading)

Picon
Favicon

Re: Requesting help with a problem installing PySparse


Hi,

Ain't sure if this will be of help, but I installed pysparse on my 64-bit Ubuntu
machine without any glitches.  Yet, quite a bit of dependencies must be
satisfied so that one can successfully install pysparse.  A list of required
packages that a Ubuntu box must have installed prior to building pysparse
can be found here:


Incidentally, "Natty Narwhal" is the Ubuntu version (11.04) I'm currently
running on my machine.

Cheers,
Fausto


From: Leland M Barnard <lmbarnard-63mtpxcE9Cs@public.gmane.org>
To: fipy-R3+/ord2DXQ@public.gmane.org
Sent: Wednesday, February 1, 2012 7:40:22 PM
Subject: Requesting help with a problem installing PySparse

I'm trying to set up fipy to run on a 64 bit red hat linux machine
(specifically Rocks v5.2).  We have gcc v4.1.2  We also have the
Enthought python distribution with python 2.7.

I'm having trouble installing pysparse v1.1.1.  When I use the command

python setup.py install

I receive this error message:

running install
running build
running build_py
running build_ext
building 'pysparse.spmatrix' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -O2 -fPIC -DNUMPY=1
-DLENFUNC_OK=1 -IInclude
-I/share/apps/Python2.7/epd-7.1-2-rh5-x86/lib/python2.7/site-packages/numpy/core/include
-I/share/apps/Python2.7/epd-7.1-2-rh5-x86/include/python2.7 -c
Src/spmatrixmodule.c -o build/temp.linux-x86_64-2.7/Src/spmatrixmodule.o
In file included from
/share/apps/Python2.7/epd-7.1-2-rh5-x86/include/python2.7/Python.h:58,
                  from Src/spmatrixmodule.c:1:
/share/apps/Python2.7/epd-7.1-2-rh5-x86/include/python2.7/pyport.h:849:2: error:
#error "LONG_BIT definition appears wrong for platform (bad gcc/glibc
config?)."
error: command 'gcc' failed with exit status 1

I also tried pysparse v1.2 with the same result (in addition to some
library linking errors that I'll also probably have to fix).

I was hoping there might be someone else on the mailing list that
encountered this and might have a solution.  Please let me know if there
is any more information I can supply that might be helpful in diagnosing
the trouble.  Thanks!

VTY,
Leland Barnard

_______________________________________________
fipy mailing list
fipy-R3+/ord2DXQ@public.gmane.org
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]


_______________________________________________
fipy mailing list
fipy@...
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
Daniel Wheeler | 3 Feb 16:09
Picon

Fwd: [Pysparse-users] Requesting help with PySparse installation



---------- Forwarded message ----------
From: Daniel Wheeler <daniel.wheeler2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date: Fri, Feb 3, 2012 at 10:04 AM
Subject: Re: [Pysparse-users] Requesting help with PySparse installation
To: Leland M Barnard <lmbarnard-63mtpxcE9Cs@public.gmane.org>
Cc: pysparse-users-5NWGOfrQmneRv+LV9MX5uuRhgaa4a2kL@public.gmane.orgnet


I am not sure what the issue is, but it might be better to build pysparse against a version of python and numpy that is distributed and installed by the package manager for your system. Is there a numpy rpm available?

If for some reason that doesn't work or isn't available, maybe try installing numpy by hand using the system python. You can try different options in a virtualenv if you use that rather than installing into your system directories. Certainly with enthought, it is better to install in a virtualenv rather than messing with the system directories while prototyping.

Googling the actual issue, this may be a 32 versus 64 bit issue.

   <http://stackoverflow.com/questions/648482/a-trivial-python-swig-error-question>

Maybe using a 32 bit distribution on a 64 bit platform is not the way to go (speculation). Is there not a 64 bit dist? Like it says in the link maybe try passing some of the 32 bit flags to gcc.

Hope this helps in some way.


On Thu, Feb 2, 2012 at 11:12 AM, Leland M Barnard <lmbarnard-63mtpxcE9Cs@public.gmane.org> wrote:
I'm trying to set up pysparse to run on a 64 bit red hat linux machine
(specifically Rocks v5.2).   We have gcc v4.1.2.  We also have the
Enthought python distribution v7.1-2 (32 bit). with python 2.7.

I'm having trouble installing pysparse v1.1.1.  When I use the command

python setup.py install

I receive this error message:

running install
running build
running build_py
running build_ext
building 'pysparse.spmatrix' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -O2 -fPIC -DNUMPY=1
-DLENFUNC_OK=1 -IInclude
-I/share/apps/Python2.7/epd-7.1-2-rh5-x86/lib/python2.7/site-packages/numpy/core/include
-I/share/apps/Python2.7/epd-7.1-2-rh5-x86/include/python2.7 -c
Src/spmatrixmodule.c -o build/temp.linux-x86_64-2.7/Src/spmatrixmodule.o
In file included from
/share/apps/Python2.7/epd-7.1-2-rh5-x86/include/python2.7/Python.h:58,
                 from Src/spmatrixmodule.c:1:
/share/apps/Python2.7/epd-7.1-2-rh5-x86/include/python2.7/pyport.h:849:2: error:
#error "LONG_BIT definition appears wrong for platform (bad gcc/glibc
config?)."
error: command 'gcc' failed with exit status 1

I was hoping there might be someone else on the mailing list that
encountered this and might have a solution.  Please let me know if there
is any more information I can supply that might be helpful in diagnosing
the trouble.  Thanks!

VTY,
Leland Barnard

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Pysparse-users mailing list
Pysparse-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/pysparse-users



--
Daniel Wheeler



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

Re: Requesting help with a problem installing PySparse


A question: do you have liblapack-dev and libblas-dev installed?  They seemingly are essential
to compiling pysparse (you may still have other unresolved dependencies, though).  You might
also try to compile the package as "root".  Also, run "python setup.py build" first, and then
"python setup.py install".  That worked on my 64-bit architecture.

F.


From: Leland M Barnard <lmbarnard-63mtpxcE9Cs@public.gmane.org>
To: fipy-R3+/ord2DXQ@public.gmane.org
Sent: Wednesday, February 1, 2012 7:40:22 PM
Subject: Requesting help with a problem installing PySparse

I'm trying to set up fipy to run on a 64 bit red hat linux machine
(specifically Rocks v5.2).  We have gcc v4.1.2  We also have the
Enthought python distribution with python 2.7.

I'm having trouble installing pysparse v1.1.1.  When I use the command

python setup.py install

I receive this error message:

running install
running build
running build_py
running build_ext
building 'pysparse.spmatrix' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -O2 -fPIC -DNUMPY=1
-DLENFUNC_OK=1 -IInclude
-I/share/apps/Python2.7/epd-7.1-2-rh5-x86/lib/python2.7/site-packages/numpy/core/include
-I/share/apps/Python2.7/epd-7.1-2-rh5-x86/include/python2.7 -c
Src/spmatrixmodule.c -o build/temp.linux-x86_64-2.7/Src/spmatrixmodule.o
In file included from
/share/apps/Python2.7/epd-7.1-2-rh5-x86/include/python2.7/Python.h:58,
                  from Src/spmatrixmodule.c:1:
/share/apps/Python2.7/epd-7.1-2-rh5-x86/include/python2.7/pyport.h:849:2: error:
#error "LONG_BIT definition appears wrong for platform (bad gcc/glibc
config?)."
error: command 'gcc' failed with exit status 1

I also tried pysparse v1.2 with the same result (in addition to some
library linking errors that I'll also probably have to fix).

I was hoping there might be someone else on the mailing list that
encountered this and might have a solution.  Please let me know if there
is any more information I can supply that might be helpful in diagnosing
the trouble.  Thanks!

VTY,
Leland Barnard

_______________________________________________
fipy mailing list
fipy-R3+/ord2DXQ@public.gmane.org
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]


_______________________________________________
fipy mailing list
fipy@...
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
wang yunbo | 6 Feb 18:41
Picon
Favicon

Re: Curvature calculation

Hi,

Followed up the previous question, now I  calculated the curvature everywhere for the mesh and found the accuracy was not that within second order. Is my mesh not stable?

Here is my mesh:

mesh = Grid2D(dx=1.0, dy=1.0, nx=100, ny=100)

var = DistanceVariable(name='Test',
                       mesh=mesh,
                       value=-1.0,
                       hasOld=1)

For initial value,

var.setValue(1.0, where = ((x-50.0)**2+(y-50.0)**2>625.0))  

var.calcDistanceFunction()


For this case, what is the best way to calculate the curvature?


Thanks,

Regards,

Yunbo





On Jan 20, 2012, at 10:47 AM, Daniel Wheeler wrote:

On Thu, Jan 19, 2012 at 6:34 PM, wang yunbo <wang1320-olO2ZdjDehc3uPMLIKxrzw@public.gmane.org> wrote:
I'm trying to calculate the curvature of a circle in 2D.

Sounds reasonable.
 
Firstly I set up a distance variable "var" to represent the circular shape.   To calculate the curvature, I took the gradient of "var" and then the divergence as shown below:
                                      (var.getFaceGrad()).getDivergence()

Should work with second order accuracy on a well structured mesh.
 
My trouble is :

My expectation is to obtain a matrix of curvature and
 at the boundary of circle (where var=0). However,  the obtained result from my program showed
 at the boundary.

The boundary of the domain assumes a zero gradient. It doesn't use any other information about the field. In version 2.1 there is nothing to be done other than ignore the cells close to the boundary. However, In FiPy 3.0 (not yet released) this will work:

  from fipy import *
  m = Grid2D(nx=4, ny=4)
  v = CellVariable(mesh=m, value=m.x**2 + m.y**2)
  X, Y = m.faceCenters
  v.faceGrad.constrain((2 * X, 2 * Y), where=m.exteriorFaces)
  print v.faceGrad.divergence
  [ 4.  4.  4.  4.  4.  4.  4.  4.  4.  4.  4.  4.  4.  4.  4.  4.]

Cheers.

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

_______________________________________________
fipy mailing list
fipy@...
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
Lucia AvOlocc | 6 Feb 19:11
Picon

fipy installation problems on ubuntu

Hi,
I am having problems when installing fipy in my notebook (ubuntu 11.10)

I got the following errors:

home:~/FiPy-2.1.2$ sudo python setup.py install
running install
Checking .pth file support in /usr/local/lib/python2.7/dist-packages/
/usr/bin/python -E -c pass
TEST PASSED: /usr/local/lib/python2.7/dist-packages/ appears to
support .pth files
running bdist_egg
running egg_info
writing FiPy.egg-info/PKG-INFO
writing top-level names to FiPy.egg-info/top_level.txt
writing dependency_links to FiPy.egg-info/dependency_links.txt
writing entry points to FiPy.egg-info/entry_points.txt
writing FiPy.egg-info/PKG-INFO
writing top-level names to FiPy.egg-info/top_level.txt
writing dependency_links to FiPy.egg-info/dependency_links.txt
writing entry points to FiPy.egg-info/entry_points.txt
reading manifest file 'FiPy.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.png' found under
directory 'examples'
warning: no previously-included files matching '*.pdf' found under
directory 'examples'
warning: no previously-included files matching '*.png' found under
directory 'fipy'
warning: no previously-included files matching '*.pdf' found under
directory 'fipy'
writing manifest file 'FiPy.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/fipy
creating build/bdist.linux-x86_64/egg/fipy/steppers
................
..................
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing FiPy-2.1.2-py2.7.egg
removing '/usr/local/lib/python2.7/dist-packages/FiPy-2.1.2-py2.7.egg'
(and everything under it)
creating /usr/local/lib/python2.7/dist-packages/FiPy-2.1.2-py2.7.egg
Extracting FiPy-2.1.2-py2.7.egg to /usr/local/lib/python2.7/dist-packages
FiPy 2.1.2 is already the active version in easy-install.pth

Installed /usr/local/lib/python2.7/dist-packages/FiPy-2.1.2-py2.7.egg
Processing dependencies for FiPy==2.1.2
Finished processing dependencies for FiPy==2.1.2
Traceback (most recent call last):
  File "setup.py", line 594, in <module>
    __import__(pkg)
  File "/usr/local/lib/python2.7/dist-packages/pysparse-1.2_dev224-py2.7-linux-x86_64.egg/pysparse/__init__.py",
line 6, in <module>
    from numpy._import_tools import PackageLoader
  File "/usr/local/lib/python2.7/dist-packages/numpy/__init__.py",
line 137, in <module>
    import add_newdocs
  File "/usr/local/lib/python2.7/dist-packages/numpy/add_newdocs.py",
line 9, in <module>
    from numpy.lib import add_newdoc
  File "/usr/local/lib/python2.7/dist-packages/numpy/lib/__init__.py",
line 13, in <module>
    from polynomial import *
  File "/usr/local/lib/python2.7/dist-packages/numpy/lib/polynomial.py",
line 11, in <module>
    import numpy.core.numeric as NX
AttributeError: 'module' object has no attribute 'core'

So, I try to run fipy from python:

home:~/FiPy-2.1.2$ python
Python 2.7.2+ (default, Oct  4 2011, 20:06:09)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.

>>> import fipy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "fipy/__init__.py", line 41, in <module>
    from solvers import *
  File "fipy/solvers/__init__.py", line 68, in <module>
    raise ImportError, "Could not import any solver package. If you
are using Trilinos, make sure you have all of the necessary Trilinos
packages installed - Epetra, EpetraExt, AztecOO, Amesos, ML, and
IFPACK."
ImportError: Could not import any solver package. If you are using
Trilinos, make sure you have all of the necessary Trilinos packages
installed - Epetra, EpetraExt, AztecOO, Amesos, ML, and IFPACK.
>>>

I don't know how to fix this problem. Thanks in advance for your help
Regards,
Lucia
_______________________________________________
fipy mailing list
fipy@...
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Leland M Barnard | 6 Feb 19:31
Picon
Favicon

Re: Requesting help with a problem installing PySparse

Thanks for your help.  It turned out I was working with a 32-bit installation of python, that was the source of my trouble.

-Leland

On 2/3/2012 7:51 PM, Fausto Arinos de A. Barbuto wrote:

A question: do you have liblapack-dev and libblas-dev installed?  They seemingly are essential
to compiling pysparse (you may still have other unresolved dependencies, though).  You might
also try to compile the package as "root".  Also, run "python setup.py build" first, and then
"python setup.py install".  That worked on my 64-bit architecture.

F.


From: Leland M Barnard <lmbarnard-63mtpxcE9Cs@public.gmane.org>
To: fipy-R3+/ord2DXQ@public.gmane.org
Sent: Wednesday, February 1, 2012 7:40:22 PM
Subject: Requesting help with a problem installing PySparse

I'm trying to set up fipy to run on a 64 bit red hat linux machine
(specifically Rocks v5.2).  We have gcc v4.1.2  We also have the
Enthought python distribution with python 2.7.

I'm having trouble installing pysparse v1.1.1.  When I use the command

python setup.py install

I receive this error message:

running install
running build
running build_py
running build_ext
building 'pysparse.spmatrix' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -O2 -fPIC -DNUMPY=1
-DLENFUNC_OK=1 -IInclude
-I/share/apps/Python2.7/epd-7.1-2-rh5-x86/lib/python2.7/site-packages/numpy/core/include
-I/share/apps/Python2.7/epd-7.1-2-rh5-x86/include/python2.7 -c
Src/spmatrixmodule.c -o build/temp.linux-x86_64-2.7/Src/spmatrixmodule.o
In file included from
/share/apps/Python2.7/epd-7.1-2-rh5-x86/include/python2.7/Python.h:58,
                  from Src/spmatrixmodule.c:1:
/share/apps/Python2.7/epd-7.1-2-rh5-x86/include/python2.7/pyport.h:849:2: error:
#error "LONG_BIT definition appears wrong for platform (bad gcc/glibc
config?)."
error: command 'gcc' failed with exit status 1

I also tried pysparse v1.2 with the same result (in addition to some
library linking errors that I'll also probably have to fix).

I was hoping there might be someone else on the mailing list that
encountered this and might have a solution.  Please let me know if there
is any more information I can supply that might be helpful in diagnosing
the trouble.  Thanks!

VTY,
Leland Barnard

_______________________________________________
fipy mailing list
fipy-R3+/ord2DXQ@public.gmane.org
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]




_______________________________________________ fipy mailing list fipy-R3+/ord2DXQ@public.gmane.org http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

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

Re: fipy installation problems on ubuntu


Hi, 

I'm confused about your problem, but the "import" command immediately below:

import numpy.core.numeric as NX
AttributeError: 'module' object has no attribute 'core'

should have worked.  I assume you have numpy installed on your Ubuntu box.
How did you install it?  From Synaptic or building from the tarball (or any other
source)?  I too run a Ubuntu 11.04 home.

I had the same "Could not import any solver package" message in the past, but
as far as I can remember the error history you got and mine were different.

32- versus 64- bit packages have given trouble to some people (and not only with
regard to FiPy).  Is your system a 64-bit one?

Good luck,

Fausto


From: Lucia AvOlocc <avallelucia-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: fipy <fipy-R3+/ord2DXQ@public.gmane.org>
Sent: Monday, February 6, 2012 4:11:51 PM
Subject: fipy installation problems on ubuntu

Hi,
I am having problems when installing fipy in my notebook (ubuntu 11.10)

I got the following errors:

home:~/FiPy-2.1.2$ sudo python setup.py install
running install
Checking .pth file support in /usr/local/lib/python2.7/dist-packages/
/usr/bin/python -E -c pass
TEST PASSED: /usr/local/lib/python2.7/dist-packages/ appears to
support .pth files
running bdist_egg
running egg_info
writing FiPy.egg-info/PKG-INFO
writing top-level names to FiPy.egg-info/top_level.txt
writing dependency_links to FiPy.egg-info/dependency_links.txt
writing entry points to FiPy.egg-info/entry_points.txt
writing FiPy.egg-info/PKG-INFO
writing top-level names to FiPy.egg-info/top_level.txt
writing dependency_links to FiPy.egg-info/dependency_links.txt
writing entry points to FiPy.egg-info/entry_points.txt
reading manifest file 'FiPy.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.png' found under
directory 'examples'
warning: no previously-included files matching '*.pdf' found under
directory 'examples'
warning: no previously-included files matching '*.png' found under
directory 'fipy'
warning: no previously-included files matching '*.pdf' found under
directory 'fipy'
writing manifest file 'FiPy.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/fipy
creating build/bdist.linux-x86_64/egg/fipy/steppers
................
..................
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing FiPy-2.1.2-py2.7.egg
removing '/usr/local/lib/python2.7/dist-packages/FiPy-2.1.2-py2.7.egg'
(and everything under it)
creating /usr/local/lib/python2.7/dist-packages/FiPy-2.1.2-py2.7.egg
Extracting FiPy-2.1.2-py2.7.egg to /usr/local/lib/python2.7/dist-packages
FiPy 2.1.2 is already the active version in easy-install.pth

Installed /usr/local/lib/python2.7/dist-packages/FiPy-2.1.2-py2.7.egg
Processing dependencies for FiPy==2.1.2
Finished processing dependencies for FiPy==2.1.2
Traceback (most recent call last):
  File "setup.py", line 594, in <module>
    __import__(pkg)
  File "/usr/local/lib/python2.7/dist-packages/pysparse-1.2_dev224-py2.7-linux-x86_64.egg/pysparse/__init__.py",
line 6, in <module>
    from numpy._import_tools import PackageLoader
  File "/usr/local/lib/python2.7/dist-packages/numpy/__init__.py",
line 137, in <module>
    import add_newdocs
  File "/usr/local/lib/python2.7/dist-packages/numpy/add_newdocs.py",
line 9, in <module>
    from numpy.lib import add_newdoc
  File "/usr/local/lib/python2.7/dist-packages/numpy/lib/__init__.py",
line 13, in <module>
    from polynomial import *
  File "/usr/local/lib/python2.7/dist-packages/numpy/lib/polynomial.py",
line 11, in <module>
    import numpy.core.numeric as NX
AttributeError: 'module' object has no attribute 'core'

So, I try to run fipy from python:

home:~/FiPy-2.1.2$ python
Python 2.7.2+ (default, Oct  4 2011, 20:06:09)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.

>>> import fipy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "fipy/__init__.py", line 41, in <module>
    from solvers import *
  File "fipy/solvers/__init__.py", line 68, in <module>
    raise ImportError, "Could not import any solver package. If you
are using Trilinos, make sure you have all of the necessary Trilinos
packages installed - Epetra, EpetraExt, AztecOO, Amesos, ML, and
IFPACK."
ImportError: Could not import any solver package. If you are using
Trilinos, make sure you have all of the necessary Trilinos packages
installed - Epetra, EpetraExt, AztecOO, Amesos, ML, and IFPACK.
>>>


I don't know how to fix this problem. Thanks in advance for your help
Regards,
Lucia
_______________________________________________
fipy mailing list
fipy <at> nist.gov
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]


_______________________________________________
fipy mailing list
fipy@...
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
Daniel Wheeler | 7 Feb 15:54
Picon

Re: Curvature calculation

On Mon, Feb 6, 2012 at 12:41 PM, wang yunbo <wang1320-olO2ZdjDehc3uPMLIKxrzw@public.gmane.org> wrote:

Hi,

Followed up the previous question, now I  calculated the curvature everywhere for the mesh and found the accuracy was not that within second order.

How do you know? How did you check the order of accuracy? Is the curvature calculation not second order accurate or the calculation of the distance function?

Is my mesh not stable?

I don't think stability is an issue here.

Here is my mesh:

mesh = Grid2D(dx=1.0, dy=1.0, nx=100, ny=100)

var = DistanceVariable(name='Test',
                       mesh=mesh,
                       value=-1.0,
                       hasOld=1)

For initial value,

var.setValue(1.0, where = ((x-50.0)**2+(y-50.0)**2>625.0))  

var.calcDistanceFunction()


For this case, what is the best way to calculate the curvature?

var.getFaceGrad().getDivergence()

should be second order accurate.
 
--
Daniel Wheeler
_______________________________________________
fipy mailing list
fipy@...
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
Daniel Wheeler | 7 Feb 16:02
Picon

Re: fipy installation problems on ubuntu

Hi Lucia,

What happens when you do each of

  $ python -c "import numpy; print numpy.__version__"
  $ python -c "import pysparse; print pysparse.__version__"
  $ python -c "import PyTrilinos; print PyTrilinos.version()"

Just want to check that they import properly independent of fipy.

Cheers

On Mon, Feb 6, 2012 at 1:11 PM, Lucia AvOlocc <avallelucia-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hi,
I am having problems when installing fipy in my notebook (ubuntu 11.10)

I got the following errors:

home:~/FiPy-2.1.2$ sudo python setup.py install
running install
Checking .pth file support in /usr/local/lib/python2.7/dist-packages/
/usr/bin/python -E -c pass
TEST PASSED: /usr/local/lib/python2.7/dist-packages/ appears to
support .pth files
running bdist_egg
running egg_info
writing FiPy.egg-info/PKG-INFO
writing top-level names to FiPy.egg-info/top_level.txt
writing dependency_links to FiPy.egg-info/dependency_links.txt
writing entry points to FiPy.egg-info/entry_points.txt
writing FiPy.egg-info/PKG-INFO
writing top-level names to FiPy.egg-info/top_level.txt
writing dependency_links to FiPy.egg-info/dependency_links.txt
writing entry points to FiPy.egg-info/entry_points.txt
reading manifest file 'FiPy.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.png' found under
directory 'examples'
warning: no previously-included files matching '*.pdf' found under
directory 'examples'
warning: no previously-included files matching '*.png' found under
directory 'fipy'
warning: no previously-included files matching '*.pdf' found under
directory 'fipy'
writing manifest file 'FiPy.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/fipy
creating build/bdist.linux-x86_64/egg/fipy/steppers
................
..................
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing FiPy-2.1.2-py2.7.egg
removing '/usr/local/lib/python2.7/dist-packages/FiPy-2.1.2-py2.7.egg'
(and everything under it)
creating /usr/local/lib/python2.7/dist-packages/FiPy-2.1.2-py2.7.egg
Extracting FiPy-2.1.2-py2.7.egg to /usr/local/lib/python2.7/dist-packages
FiPy 2.1.2 is already the active version in easy-install.pth

Installed /usr/local/lib/python2.7/dist-packages/FiPy-2.1.2-py2.7.egg
Processing dependencies for FiPy==2.1.2
Finished processing dependencies for FiPy==2.1.2
Traceback (most recent call last):
 File "setup.py", line 594, in <module>
   __import__(pkg)
 File "/usr/local/lib/python2.7/dist-packages/pysparse-1.2_dev224-py2.7-linux-x86_64.egg/pysparse/__init__.py",
line 6, in <module>
   from numpy._import_tools import PackageLoader
 File "/usr/local/lib/python2.7/dist-packages/numpy/__init__.py",
line 137, in <module>
   import add_newdocs
 File "/usr/local/lib/python2.7/dist-packages/numpy/add_newdocs.py",
line 9, in <module>
   from numpy.lib import add_newdoc
 File "/usr/local/lib/python2.7/dist-packages/numpy/lib/__init__.py",
line 13, in <module>
   from polynomial import *
 File "/usr/local/lib/python2.7/dist-packages/numpy/lib/polynomial.py",
line 11, in <module>
   import numpy.core.numeric as NX
AttributeError: 'module' object has no attribute 'core'

So, I try to run fipy from python:

home:~/FiPy-2.1.2$ python
Python 2.7.2+ (default, Oct  4 2011, 20:06:09)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.

>>> import fipy
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "fipy/__init__.py", line 41, in <module>
   from solvers import *
 File "fipy/solvers/__init__.py", line 68, in <module>
   raise ImportError, "Could not import any solver package. If you
are using Trilinos, make sure you have all of the necessary Trilinos
packages installed - Epetra, EpetraExt, AztecOO, Amesos, ML, and
IFPACK."
ImportError: Could not import any solver package. If you are using
Trilinos, make sure you have all of the necessary Trilinos packages
installed - Epetra, EpetraExt, AztecOO, Amesos, ML, and IFPACK.
>>>


I don't know how to fix this problem. Thanks in advance for your help
Regards,
Lucia
_______________________________________________
fipy mailing list
fipy-R3+/ord2DXQ@public.gmane.org
http://www.ctcms.nist.gov/fipy
 [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]



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

Gmane