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

Assorted errors #331

Closed
guyer opened this issue Sep 19, 2014 · 12 comments
Closed

Assorted errors #331

guyer opened this issue Sep 19, 2014 · 12 comments
Labels

Comments

@guyer
Copy link
Member

guyer commented Sep 19, 2014

[http://build.cmi.kent.edu:8010/builders/Mac_OS_X_Py3k%7Etrunk%7Equick/builds/42/steps/trial/logs/problems A few errors] have crept in that only affect Py3k

==================================================================h4. 
FAIL: __init__ (fipy.terms.abstractConvectionTerm._AbstractConvectionTerm)
Doctest: fipy.terms.abstractConvectionTerm._AbstractConvectionTerm.__init__
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/fipy/.homebrew/Cellar/python3/3.2.2/lib/python3.2/doctest.py", line 2118, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for fipy.terms.abstractConvectionTerm._AbstractConvectionTerm.__init__
  File "/Users/fipy/.virtualenvs/buildbot/build/fipy-buildbot/fipy-build/Mac_OS_X_Py3k~trunk~quick/build/fipy/terms/abstractConvectionTerm.py", line 51, in __init__

----------------------------------------------------------------------
File "/Users/fipy/.virtualenvs/buildbot/build/fipy-buildbot/fipy-build/Mac_OS_X_Py3k~trunk~quick/build/fipy/terms/abstractConvectionTerm.py", line 75, in fipy.terms.abstractConvectionTerm._AbstractConvectionTerm.__init__
Failed example:
ExplicitUpwindConvectionTerm(coeff = (0,)).solve(var=cv, solver=DummySolver())
Expected:
Traceback (most recent call last):
...
TransientTermError: The equation requires a TransientTerm with explicit convection.
Got:
Traceback (most recent call last):
File "/Users/fipy/.homebrew/Cellar/python3/3.2.2/lib/python3.2/doctest.py", line 1253, in __run
compileflags, 1), test.globs)
File "<doctest fipy.terms.abstractConvectionTerm._AbstractConvectionTerm.__init__[11]>", line 1, in <module>
ExplicitUpwindConvectionTerm(coeff = (0,)).solve(var=cv, solver=DummySolver())
File "/Users/fipy/.virtualenvs/buildbot/build/fipy-buildbot/fipy-build/Mac_OS_X_Py3k~trunk~quick/build/fipy/terms/term.py", line 209, in solve
solver = self._prepareLinearSystem(var, solver, boundaryConditions, dt)
File "/Users/fipy/.virtualenvs/buildbot/build/fipy-buildbot/fipy-build/Mac_OS_X_Py3k~trunk~quick/build/fipy/terms/term.py", line 171, in _prepareLinearSystem
buildExplicitIfOther=self._buildExplcitIfOther)
File "/Users/fipy/.virtualenvs/buildbot/build/fipy-buildbot/fipy-build/Mac_OS_X_Py3k~trunk~quick/build/fipy/terms/unaryTerm.py", line 97, in _buildAndAddMatrices
diffusionGeomCoeff=diffusionGeomCoeff)
File "/Users/fipy/.virtualenvs/buildbot/build/fipy-buildbot/fipy-build/Mac_OS_X_Py3k~trunk~quick/build/fipy/terms/abstractConvectionTerm.py", line 164, in _buildMatrix
var, L, b = FaceTerm._buildMatrix(self, var, SparseMatrix, boundaryConditions=boundaryConditions, dt=dt, transientGeomCoeff=transientGeomCoeff, diffusionGeomCoeff=diffusionGeomCoeff)
File "/Users/fipy/.virtualenvs/buildbot/build/fipy-buildbot/fipy-build/Mac_OS_X_Py3k~trunk~quick/build/fipy/terms/faceTerm.py", line 181, in _buildMatrix
self._explicitBuildMatrix_(SparseMatrix, var.old, id1, id2, b, weight['explicit'], var, boundaryConditions, interiorFaces, dt)
File "/Users/fipy/.virtualenvs/buildbot/build/fipy-buildbot/fipy-build/Mac_OS_X_Py3k~trunk~quick/build/fipy/terms/faceTerm.py", line 100, in _explicitBuildMatrix_
mesh=var.mesh, interiorFaces=interiorFaces, dt=dt, weight=weight)
File "/Users/fipy/.virtualenvs/buildbot/build/fipy-buildbot/fipy-build/Mac_OS_X_Py3k~trunk~quick/build/fipy/terms/faceTerm.py", line 151, in _explicitBuildMatrixInline_
oldArrayId1, oldArrayId2 = self._getOldAdjacentValues(oldArray, id1, id2, dt=dt)
File "/Users/fipy/.virtualenvs/buildbot/build/fipy-buildbot/fipy-build/Mac_OS_X_Py3k~trunk~quick/build/fipy/terms/explicitUpwindConvectionTerm.py", line 59, in _getOldAdjacentValues
raise TransientTermError
fipy.terms.TransientTermError: The equation requires a TransientTerm with explicit convection.


==============================================================h4. 
FAIL: _test (fipy.terms.vanLeerConvectionTerm.VanLeerConvectionTerm)
Doctest: fipy.terms.vanLeerConvectionTerm.VanLeerConvectionTerm._test
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/fipy/.homebrew/Cellar/python3/3.2.2/lib/python3.2/doctest.py", line 2118, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for fipy.terms.vanLeerConvectionTerm.VanLeerConvectionTerm._test
  File "/Users/fipy/.virtualenvs/buildbot/build/fipy-buildbot/fipy-build/Mac_OS_X_Py3k~trunk~quick/build/fipy/terms/vanLeerConvectionTerm.py", line 92, in _test

----------------------------------------------------------------------
File "/Users/fipy/.virtualenvs/buildbot/build/fipy-buildbot/fipy-build/Mac_OS_X_Py3k~trunk~quick/build/fipy/terms/vanLeerConvectionTerm.py", line 100, in fipy.terms.vanLeerConvectionTerm.VanLeerConvectionTerm._test
Failed example:
e.solve(c)
Expected:
Traceback (most recent call last):
...    
TransientTermError: The equation requires a TransientTerm with explicit convection.
Got:
Traceback (most recent call last):
File "/Users/fipy/.homebrew/Cellar/python3/3.2.2/lib/python3.2/doctest.py", line 1253, in __run
compileflags, 1), test.globs)
File "<doctest fipy.terms.vanLeerConvectionTerm.VanLeerConvectionTerm._test[4]>", line 1, in <module>
e.solve(c)
File "/Users/fipy/.virtualenvs/buildbot/build/fipy-buildbot/fipy-build/Mac_OS_X_Py3k~trunk~quick/build/fipy/terms/term.py", line 209, in solve
solver = self._prepareLinearSystem(var, solver, boundaryConditions, dt)
File "/Users/fipy/.virtualenvs/buildbot/build/fipy-buildbot/fipy-build/Mac_OS_X_Py3k~trunk~quick/build/fipy/terms/term.py", line 171, in _prepareLinearSystem
buildExplicitIfOther=self._buildExplcitIfOther)
File "/Users/fipy/.virtualenvs/buildbot/build/fipy-buildbot/fipy-build/Mac_OS_X_Py3k~trunk~quick/build/fipy/terms/unaryTerm.py",fipy version unknown, try running `python setup.py egg_info`
numpy version 1.6.1
pysparse is not installed
scipy version 0.10.0
matplotlib is not installed
gist is not installed
mpi4py is not installed
mpi4py is not installed
enthought.mayavi is not installed
gmsh version 2.5.0
 line 97, in _buildAndAddMatrices
diffusionGeomCoeff=diffusionGeomCoeff)
File "/Users/fipy/.virtualenvs/buildbot/build/fipy-buildbot/fipy-build/Mac_OS_X_Py3k~trunk~quick/build/fipy/terms/abstractConvectionTerm.py", line 164, in _buildMatrix
var, L, b = FaceTerm._buildMatrix(self, var, SparseMatrix, boundaryConditions=boundaryConditions, dt=dt, transientGeomCoeff=transientGeomCoeff, diffusionGeomCoeff=diffusionGeomCoeff)
File "/Users/fipy/.virtualenvs/buildbot/build/fipy-buildbot/fipy-build/Mac_OS_X_Py3k~trunk~quick/build/fipy/terms/faceTerm.py", line 181, in _buildMatrix
self._explicitBuildMatrix_(SparseMatrix, var.old, id1, id2, b, weight['explicit'], var, boundaryConditions, interiorFaces, dt)
File "/Users/fipy/.virtualenvs/buildbot/build/fipy-buildbot/fipy-build/Mac_OS_X_Py3k~trunk~quick/build/fipy/terms/faceTerm.py", line 100, in _explicitBuildMatrix_
mesh=var.mesh, interiorFaces=interiorFaces, dt=dt, weight=weight)
File "/Users/fipy/.virtualenvs/buildbot/build/fipy-buildbot/fipy-build/Mac_OS_X_Py3k~trunk~quick/build/fipy/terms/faceTerm.py", line 151, in _explicitBuildMatrixInline_
oldArrayId1, oldArrayId2 = self._getOldAdjacentValues(oldArray, id1, id2, dt=dt)
File "/Users/fipy/.virtualenvs/buildbot/build/fipy-buildbot/fipy-build/Mac_OS_X_Py3k~trunk~quick/build/fipy/terms/vanLeerConvectionTerm.py", line 64, in _getOldAdjacentValues
oldArray1, oldArray2 = ExplicitUpwindConvectionTerm._getOldAdjacentValues(self, oldArray, id1, id2, dt)
File "/Users/fipy/.virtualenvs/buildbot/build/fipy-buildbot/fipy-build/Mac_OS_X_Py3k~trunk~quick/build/fipy/terms/explicitUpwindConvectionTerm.py", line 59, in _getOldAdjacentValues
raise TransientTermError
fipy.terms.TransientTermError: The equation requires a TransientTerm with explicit convection.


==================================================================
FAIL: _test (fipy.meshes.gmshImport.Gmsh3D)
Doctest: fipy.meshes.gmshImport.Gmsh3D._test
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/fipy/.homebrew/Cellar/python3/3.2.2/lib/python3.2/doctest.py", line 2118, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for fipy.meshes.gmshImport.Gmsh3D._test
  File "/Users/fipy/.virtualenvs/buildbot/build/fipy-buildbot/fipy-build/Mac_OS_X_Py3k~trunk~quick/build/fipy/meshes/gmshImport.py", line 2005, in _test

----------------------------------------------------------------------
File "/Users/fipy/.virtualenvs/buildbot/build/fipy-buildbot/fipy-build/Mac_OS_X_Py3k~trunk~quick/build/fipy/meshes/gmshImport.py", line 2127, in fipy.meshes.gmshImport.Gmsh3D._test
Failed example:
print("".join(f.readlines()))
Expected:
$PostFormat
1.4 0 8
$EndPostFormat
$View
volume 1
0 0 0
0 0 0
0 0 0
0 0 0
1 0 0
0 0 0
1 0 0
1 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0 0
0
0.0 1.0 1.0 1.0
0.0 1.0 0.0 0.0
0.0 0.0 1.0 0.0
0.166666666667 0.166666666667 0.166666666667 0.166666666667
1.0 1.0 1.0 3.0 3.0 3.0
0.0 1.0 0.0 0.0 1.0 0.0
0.0 0.0 1.0 0.0 0.0 1.0
1.0 1.0 1.0 1.0 1.0 1.0
1.0 1.0 3.0 3.0 2.0
0.0 1.0 1.0 0.0 0.5
0.0 0.0 0.0 0.0 -1.0
0.666666666667 0.666666666667 0.666666666667 0.666666666667 0.666666666667
$EndView
<BLANKLINE>
Got:
$PostFormat
1.4 0 8
$EndPostFormat
$View
volume 1
0 0 0
0 0 0
0 0 0
0 0 0
1 0 0
0 0 0
1 0 0
1 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0 0
0
0.0 1.0 1.0 1.0
0.0 1.0 0.0 0.0
0.0 0.0 1.0 0.0
0.16666666666666663 0.16666666666666663 0.16666666666666663 0.16666666666666663
1.0 1.0 1.0 3.0 3.0 3.0
0.0 1.0 0.0 0.0 1.0 0.0
0.0 0.0 1.0 0.0 0.0 1.0
1.0 1.0 1.0 1.0 1.0 1.0
1.0 1.0 3.0 3.0 2.0
0.0 1.0 1.0 0.0 0.5
0.0 0.0 0.0 0.0 -1.0
0.6666666666666666 0.6666666666666666 0.6666666666666666 0.6666666666666666 0.6666666666666666
$EndView
<BLANKLINE>


----------------------------------------------------------------------
Ran 352 tests in 103.202s

FAILED (failures=4)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Skipped 83 doctest examples because the `tvtk` package cannot be imported
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Imported from trac ticket #454, created by guyer on 08-09-2012 at 14:21, last modified: 09-30-2013 at 21:44

@guyer
Copy link
Member Author

guyer commented Sep 19, 2014

There are also [http://build.cmi.kent.edu:8010/builders/Windows_XP%7Etrunk%7Equick/builds/47/steps/trial/logs/problems some errors] that only affect Windows.

(view as text)
==================================================================h4. 
FAIL: _test (fipy.meshes.gmshImport.Gmsh2D)
Doctest: fipy.meshes.gmshImport.Gmsh2D._test
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Python27\lib\doctest.py", line 2166, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for fipy.meshes.gmshImport.Gmsh2D._test
  File "c:\Documents and Settings\wd15\build\Windows_XP~trunk~quick\build\fipy\meshes\gmshImport.py", line 1678, in _test

----------------------------------------------------------------------
File "c:\Documents and Settings\wd15\build\Windows_XP~trunk~quick\build\fipy\meshes\gmshImport.py", line 1871, in fipy.meshes.gmshImport.Gmsh2D._test
Failed example:
if sys.platform h2. 'win32':
os.close(ftmp)
Exception raised:
Traceback (most recent call last):
File "C:\Python27\lib\doctest.py", line 1254, in __run
compileflags, 1) in test.globs
File "<doctest fipy.meshes.gmshImport.Gmsh2D._test[43]>", line 2, in <module>
os.close(ftmp)
OSError: [9](Errno) Bad file descriptor

==============================================================h2. 
FAIL: _test (fipy.meshes.gmshImport.Gmsh3D)
Doctest: fipy.meshes.gmshImport.Gmsh3D._test
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Python27\lib\doctest.py", line 2166, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for fipy.meshes.gmshImport.Gmsh3D._test
  File "c:\Documents and Settings\wd15\build\Windows_XP~trunk~quick\build\fipy\meshes\gmshImport.py", line 2005, in _test

----------------------------------------------------------------------
File "c:\Documents and Settings\wd15\build\Windows_XP~trunk~quick\build\fipy\meshes\gmshImport.py", line 2166, in fipy.meshes.gmshImport.Gmsh3D._test
Failed example:
if sys.platform 'win32':
os.close(ftmp)
Exception raised:
Traceback (most recent call last):
File "C:\Python27\lib\doctest.py", line 1254, in __run
compileflags, 1) in test.globs
File "<doctest fipy.meshes.gmshImport.Gmsh3D._test[28]>", line 2, in <module>
os.close(ftmp)
OSError: [9](Errno) Bad file descriptor


----------------------------------------------------------------------
Ran 538 tests in 229.502s

FAILED (failures=2)

Trac comment by guyer on 08-09-2012 at 14:31

@guyer
Copy link
Member Author

guyer commented Sep 19, 2014

The the TransientTermError errors are because Py3k reports the module of private Exceptions. Fixed with r5276.

Trac comment by guyer on 08-09-2012 at 14:32

@guyer
Copy link
Member Author

guyer commented Sep 19, 2014

The Windows errors are because the tempfile was erroneously closed twice. Fixed with r5277.

Trac comment by guyer on 08-09-2012 at 14:34

@guyer
Copy link
Member Author

guyer commented Sep 19, 2014

The final is because Python 2.x and Py3k write out the POS file at different precisions. Not sure how to resolve that.

Trac comment by guyer on 08-09-2012 at 14:36

@guyer
Copy link
Member Author

guyer commented Sep 19, 2014

Replying to guyer:

The final is because Python 2.x and Py3k write out the POS file at different precisions. Not sure how to resolve that.

r5278 introduces a somewhat clumsy parsing of the POS file to work around the precision issues.

Trac comment by guyer on 08-09-2012 at 16:10

@guyer
Copy link
Member Author

guyer commented Sep 19, 2014

There's also [http://build.cmi.kent.edu:8010/builders/Windows_XP%7Etrunk%7Efull/builds/43/steps/trial_1/logs/problems an error], introduced in r5216, that arises for non-PySparse solvers:

====================================================================h2. 
FAIL: justErrorVector (fipy.terms.term.Term)
Doctest: fipy.terms.term.Term.justErrorVector
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Python27\lib\doctest.py", line 2166, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for fipy.terms.term.Term.justErrorVector
  File "c:\Documents and Settings\wd15\build\Windows_XP~trunk~full\build\fipy\terms\term.py", line 308, in justErrorVector

----------------------------------------------------------------------
File "c:\Documents and Settings\wd15\build\Windows_XP~trunk~full\build\fipy\terms\term.py", line 328, in fipy.terms.term.Term.justErrorVector
Failed example:
len(DiffusionTerm().justErrorVector(v)) m.numberOfCells
Exception raised:
Traceback (most recent call last):
File "C:\Python27\lib\doctest.py", line 1254, in __run
compileflags, 1) in test.globs
File "<doctest fipy.terms.term.Term.justErrorVector[3]>", line 1, in <module>
len(DiffusionTerm().justErrorVector(v)) == m.numberOfCells
File "c:\Documents and Settings\wd15\build\Windows_XP~trunk~full\build\fipy\terms\term.py", line 338, in justErrorVector
solver._solve()
File "c:\Documents and Settings\wd15\build\Windows_XP~trunk~full\build\fipy\solvers\scipy\scipySolver.py", line 61, in _solve
self.var[:] = numerix.reshape(self._solve_(self.matrix, self.var.ravel(), numerix.array(self.RHSvector)), self.var.shape)
File "c:\Documents and Settings\wd15\build\Windows_XP~trunk~full\build\fipy\solvers\scipy\linearLUSolver.py", line 64, in _solve_
permc_spec=3)
File "C:\Python27\lib\site-packages\scipy\sparse\linalg\dsolve\linsolve.py", line 173, in splu
ilu=False, options=_options)
RuntimeError: Factor is exactly singular

Trac comment by guyer on 08-09-2012 at 16:11

@guyer
Copy link
Member Author

guyer commented Sep 19, 2014

Factor is exactly singular fixed with a DummySolver() in r5280.

Trac comment by guyer on 08-09-2012 at 16:17

@fipymigrate
Copy link

In c45e062:

#CommitTicketReference repository="fipy" revision="c45e062a19f749447535762a6034253240691d14"
don't test module info in exceptions (Py3k). Addresses issue #331


git-svn-id: svn+ssh://code.matforge.org/fipy/branches/ticket454@5276 d80e17d7-ff13-0410-a124-85740d801063

Trac comment by Jonathan E. Guyer guyer@nist.gov on 06-12-2013 at 14:14

@fipymigrate
Copy link

In d771651:

#CommitTicketReference repository="fipy" revision="d771651075ad50fccec0dee6404a0dbae00f286b"
Workaround for Py3k writing POS file at different precision from Python 2.x. Addresses issue #331


git-svn-id: svn+ssh://code.matforge.org/fipy/branches/ticket454@5278 d80e17d7-ff13-0410-a124-85740d801063

Trac comment by Jonathan E. Guyer guyer@nist.gov on 06-12-2013 at 14:14

@fipymigrate
Copy link

In f59b221:

#CommitTicketReference repository="fipy" revision="f59b221c81f3cd2d1295024e1eb161ec8353add7"
Add `DummySolver` for singular matrices. Addresses issue #331


git-svn-id: svn+ssh://code.matforge.org/fipy/branches/ticket454@5280 d80e17d7-ff13-0410-a124-85740d801063

Trac comment by Jonathan E. Guyer guyer@nist.gov on 06-12-2013 at 14:14

@fipymigrate
Copy link

In e6f0d21:

#CommitTicketReference repository="fipy" revision="e6f0d213e619b23b64ea8118b299905966f02d38"
merged [ticket454](../tree/ticket454)@5280 to [trunk](../tree/master/trunk)@5280. Fixes issue #331

git-svn-id: svn+ssh://code.matforge.org/fipy/trunk@5281 d80e17d7-ff13-0410-a124-85740d801063

Trac comment by Jonathan E. Guyer guyer@nist.gov on 06-12-2013 at 14:14

@guyer
Copy link
Member Author

guyer commented Sep 19, 2014

Marking milestone

Trac comment by guyer on 09-30-2013 at 21:44

@guyer guyer closed this as completed Sep 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants