Hi,I installed pysparse 1.1 from source, and installed scipy just for the testing purpose. All the 476 test cases passed. It is fantastic! Thank you all!
Regards, Qingshan
Daniel Wheeler wrote:
and uncomment the tests that you commented out. The tests that you cut and pasted are failing due to scipy not being installed. This isn't strictly necessary for fipy so don't worry about it at this stage. Cheers On Thu, Dec 3, 2009 at 3:20 PM, Daniel Wheeler <[email protected]> wrote:Try installing version 1.1 of pysparse from <http://sourceforge.net/projects/pysparse/files/>. On Thu, Dec 3, 2009 at 3:08 PM, Qingshan Chen <[email protected]> wrote:Hi, Thanks to all the people who have responded to my message. Here is a bit more information about my set-up: OS: Debian lenny CPU: Intel Pentium D duo core Python: 2.5.2 I have followed the instructions in the guide as closely as possible, and installed the following required packages: Numpy: 1.1.0 (pre-built Debian package) python-sparse: 1.0.1 (pre-built Debian package, pysparse in Debian, as far as I know) Python-matplotlib: 0.98.1 (pre-built Debian package) Following suggestions made by some of you, I commented out 'terms.test' in fipy/test.py, and 'phase.test', 'convection.test', 'diffusion.test', 'elphf.test', 'levelSet.test' and 'cahnHilliard.test' in examples/test.py, because each of them causes the mysterious segmentation fault. With all these commented out, the test run to the end, and give me the following error messages: ************************************************Error messages starts**************************************************************** ====================================================================== FAIL: Doctest: fipy.tools.dimensions.physicalField.PhysicalField.__array_wrap__ ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.5/doctest.py", line 2128, in runTest raise self.failureException(self.format_failure(new.getvalue())) AssertionError: Failed doctest test for fipy.tools.dimensions.physicalField.PhysicalField.__array_wrap__ File "/home/qchen/Documents/FiPy-2.0.2/fipy/tools/dimensions/physicalField.py", line 608, in __array_wrap__ ---------------------------------------------------------------------- File "/home/qchen/Documents/FiPy-2.0.2/fipy/tools/dimensions/physicalField.py", line 623, in fipy.tools.dimensions.physicalField.PhysicalField.__array_wrap__ Failed example: from scipy.special import gamma as Gamma Exception raised: Traceback (most recent call last): File "/usr/lib/python2.5/doctest.py", line 1228, in __run compileflags, 1) in test.globs File "<doctest fipy.tools.dimensions.physicalField.PhysicalField.__array_wrap__[2]>", line 1, in <module> from scipy.special import gamma as Gamma ImportError: No module named scipy.special ---------------------------------------------------------------------- File "/home/qchen/Documents/FiPy-2.0.2/fipy/tools/dimensions/physicalField.py", line 624, in fipy.tools.dimensions.physicalField.PhysicalField.__array_wrap__ Failed example: print type(Gamma(PhysicalField([1.0, 2.0]))) Exception raised: Traceback (most recent call last): File "/usr/lib/python2.5/doctest.py", line 1228, in __run compileflags, 1) in test.globs File "<doctest fipy.tools.dimensions.physicalField.PhysicalField.__array_wrap__[3]>", line 1, in <module> print type(Gamma(PhysicalField([1.0, 2.0]))) NameError: name 'Gamma' is not defined ====================================================================== FAIL: Doctest: fipy.variables.variable.Variable.__array_wrap__ ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.5/doctest.py", line 2128, in runTest raise self.failureException(self.format_failure(new.getvalue())) AssertionError: Failed doctest test for fipy.variables.variable.Variable.__array_wrap__ File "/home/qchen/Documents/FiPy-2.0.2/fipy/variables/variable.py", line 135, in __array_wrap__ ---------------------------------------------------------------------- File "/home/qchen/Documents/FiPy-2.0.2/fipy/variables/variable.py", line 143, in fipy.variables.variable.Variable.__array_wrap__ Failed example: from scipy.special import gamma as Gamma Exception raised: Traceback (most recent call last): File "/usr/lib/python2.5/doctest.py", line 1228, in __run compileflags, 1) in test.globs File "<doctest fipy.variables.variable.Variable.__array_wrap__[1]>", line 1, in <module> from scipy.special import gamma as Gamma ImportError: No module named scipy.special ---------------------------------------------------------------------- File "/home/qchen/Documents/FiPy-2.0.2/fipy/variables/variable.py", line 144, in fipy.variables.variable.Variable.__array_wrap__ Failed example: print type(Gamma(Variable([1.0, 2.0]))) Exception raised: Traceback (most recent call last): File "/usr/lib/python2.5/doctest.py", line 1228, in __run compileflags, 1) in test.globs File "<doctest fipy.variables.variable.Variable.__array_wrap__[2]>", line 1, in <module> print type(Gamma(Variable([1.0, 2.0]))) NameError: name 'Gamma' is not defined ====================================================================== FAIL: Doctest: fipy.variables.betaNoiseVariable.BetaNoiseVariable ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.5/doctest.py", line 2128, in runTest raise self.failureException(self.format_failure(new.getvalue())) AssertionError: Failed doctest test for fipy.variables.betaNoiseVariable.BetaNoiseVariable File "/home/qchen/Documents/FiPy-2.0.2/fipy/variables/betaNoiseVariable.py", line 43, in BetaNoiseVariable ---------------------------------------------------------------------- File "/home/qchen/Documents/FiPy-2.0.2/fipy/variables/betaNoiseVariable.py", line 82, in fipy.variables.betaNoiseVariable.BetaNoiseVariable Failed example: from scipy.special import gamma as Gamma Exception raised: Traceback (most recent call last): File "/usr/lib/python2.5/doctest.py", line 1228, in __run compileflags, 1) in test.globs File "<doctest fipy.variables.betaNoiseVariable.BetaNoiseVariable[12]>", line 1, in <module> from scipy.special import gamma as Gamma ImportError: No module named scipy.special ---------------------------------------------------------------------- File "/home/qchen/Documents/FiPy-2.0.2/fipy/variables/betaNoiseVariable.py", line 84, in fipy.variables.betaNoiseVariable.BetaNoiseVariable Failed example: for a in arange(0.5,5,0.5): alpha.setValue(a) for b in arange(0.5,5,0.5): beta.setValue(b) betadist.setValue((Gamma(alpha + beta) / (Gamma(alpha) * Gamma(beta))) * x**(alpha - 1) * (1 - x)**(beta - 1)) if __name__ == '__main__': import sys print >>sys.stderr, "alpha: %g, beta: %g" % (alpha, beta) viewer.plot() histoplot.plot() Exception raised: Traceback (most recent call last): File "/usr/lib/python2.5/doctest.py", line 1228, in __run compileflags, 1) in test.globs File "<doctest fipy.variables.betaNoiseVariable.BetaNoiseVariable[13]>", line 6, in <module> * x**(alpha - 1) * (1 - x)**(beta - 1)) NameError: name 'Gamma' is not defined ====================================================================== FAIL: Doctest: fipy.variables.gammaNoiseVariable.GammaNoiseVariable ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.5/doctest.py", line 2128, in runTest raise self.failureException(self.format_failure(new.getvalue())) AssertionError: Failed doctest test for fipy.variables.gammaNoiseVariable.GammaNoiseVariable File "/home/qchen/Documents/FiPy-2.0.2/fipy/variables/gammaNoiseVariable.py", line 41, in GammaNoiseVariable ---------------------------------------------------------------------- File "/home/qchen/Documents/FiPy-2.0.2/fipy/variables/gammaNoiseVariable.py", line 80, in fipy.variables.gammaNoiseVariable.GammaNoiseVariable Failed example: from scipy.special import gamma as Gamma Exception raised: Traceback (most recent call last): File "/usr/lib/python2.5/doctest.py", line 1228, in __run compileflags, 1) in test.globs File "<doctest fipy.variables.gammaNoiseVariable.GammaNoiseVariable[12]>", line 1, in <module> from scipy.special import gamma as Gamma ImportError: No module named scipy.special ---------------------------------------------------------------------- File "/home/qchen/Documents/FiPy-2.0.2/fipy/variables/gammaNoiseVariable.py", line 82, in fipy.variables.gammaNoiseVariable.GammaNoiseVariable Failed example: for shape in arange(1,8,1): alpha.setValue(shape) for rate in arange(0.5,2.5,0.5): beta.setValue(rate) gammadist.setValue(x**(alpha - 1) * (beta**alpha * exp(-beta * x)) / Gamma(alpha)) if __name__ == '__main__': import sys print >>sys.stderr, "alpha: %g, beta: %g" % (alpha, beta) viewer.plot() histoplot.plot() Exception raised: Traceback (most recent call last): File "/usr/lib/python2.5/doctest.py", line 1228, in __run compileflags, 1) in test.globs File "<doctest fipy.variables.gammaNoiseVariable.GammaNoiseVariable[13]>", line 5, in <module> gammadist.setValue(x**(alpha - 1) * (beta**alpha * exp(-beta * x)) / Gamma(alpha)) NameError: name 'Gamma' is not defined ---------------------------------------------------------------------- Ran 255 tests in 86.167s FAILED (failures=4) ************************************************Error messages ends**************************************************************** I know little about the python language (please don't kick me out because of this. I am excited about this great piece of work, and want to be able to use it). I would appreciate some hints about what might have caused the errors, or how to fix them. We may later go back to fix the segmentation faults. Thank you! Best regards, Qingshan Daniel Wheeler wrote:Hi Qingshan, As previously suggested commenting out some of the tests might shed some light on the issue. Try commenting out "'models.test'," in "fipy/test.py" and "'levelSet.test'," in "examples/test.py" and rerun, Some of the failures may be irrelevant for the problems you are interested in. Cheers On Wed, Dec 2, 2009 at 4:38 PM, Qingshan Chen <[email protected]> wrote:Hi, I am trying to install fipy on my desktop running debian lenny, but it failed at the testing stage. I have installed numpy, python-sparse (pysparse in debian) and python-matplotlib. Running the command python setup.py test gives me the following messages, with the error message at the end. ------------------------------------------------------Screen message starts------------------------------------------------------------------ running test 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 reading manifest file 'FiPy.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'FiPy.egg-info/SOURCES.txt' running build_ext import fipy.solvers.test ... ok import fipy.models.test ... ok import fipy.terms.test ... ok import fipy.tools.test ... ok import fipy.meshes.test ... ok import fipy.variables.test ... ok import fipy.viewers.test ... ok import fipy.boundaryConditions.test ... ok import fipy.models.levelSet.test ... ok import fipy.models.levelSet.electroChem.test ... ok import fipy.models.levelSet.advection.advectionTerm ... ok import fipy.models.levelSet.advection.higherOrderAdvectionTerm ... ok import fipy.models.levelSet.distanceFunction.distanceVariable ... ok import fipy.models.levelSet.surfactant.surfactantVariable ... ok import fipy.models.levelSet.distanceFunction.levelSetDiffusionVariable .. ok import fipy.models.levelSet.surfactant.adsorbingSurfactantEquation ... ok import fipy.models.levelSet.surfactant.convectionCoeff ... ok import fipy.models.levelSet.surfactant.lines ... ok import fipy.models.levelSet.electroChem.metalIonSourceVariable ... ok import fipy.models.levelSet.electroChem.metalIonDiffusionEquation ... ok import fipy.models.levelSet.electroChem.gapFillMesh ... ok Doctest: fipy.models.levelSet.electroChem.metalIonSourceVariable._MetalIonSourceVariable .. ok Doctest: fipy.models.levelSet.electroChem.metalIonDiffusionEquation.buildMetalIonDiffusionEquation .. ok Doctest: fipy.models.levelSet.electroChem.gapFillMesh.GapFillMesh ... sh: gmsh: command not found FAIL Doctest: fipy.models.levelSet.electroChem.gapFillMesh.TrenchMesh ... sh: gmsh: command not found FAIL Doctest: fipy.models.levelSet.advection.advectionTerm._AdvectionTerm ... ok Doctest: fipy.models.levelSet.advection.higherOrderAdvectionTerm._HigherOrderAdvectionTerm .. ok Doctest: fipy.models.levelSet.distanceFunction.distanceVariable.DistanceVariable .. ok Doctest: fipy.models.levelSet.distanceFunction.distanceVariable.DistanceVariable._getCellInterfaceFlag .. ok Doctest: fipy.models.levelSet.distanceFunction.distanceVariable.DistanceVariable._getCellInterfaceNormals .. ok Doctest: fipy.models.levelSet.distanceFunction.distanceVariable.DistanceVariable._getCellValueOverFaces .. ok Doctest: fipy.models.levelSet.distanceFunction.distanceVariable.DistanceVariable._getInterfaceFlag .. ok Doctest: fipy.models.levelSet.distanceFunction.distanceVariable.DistanceVariable._getInterfaceNormals .. ok Doctest: fipy.models.levelSet.distanceFunction.distanceVariable.DistanceVariable._getLevelSetNormals .. ok Doctest: fipy.models.levelSet.distanceFunction.distanceVariable.DistanceVariable.getCellInterfaceAreas .. ok Doctest: fipy.models.levelSet.surfactant.surfactantVariable.SurfactantVariable.__init__ .. ok Doctest: fipy.models.levelSet.distanceFunction.levelSetDiffusionVariable._LevelSetDiffusionVariable .. ok Doctest: fipy.models.levelSet.surfactant.adsorbingSurfactantEquation.AdsorbingSurfactantEquation .. Segmentation fault ------------------------------------------------------Screen message ends------------------------------------------------------------------ Any input will be appreciated! Qingshan-- Daniel Wheeler
<<attachment: qchen3.vcf>>
