On Aug 16, 2007, at 7:34 PM, Elizabeth Tseng wrote:
OK. Here's a reduced form of the code that still produces errors
from time to time. Sometimes it finishes without problems,
sometimes the variable values become 1.#QNAN (when I print out
C_1b), and sometimes I get an error at line:
Res.append(eq_Ab.sweep(var=Ab, boundaryConditions=Ab_BCs, dt=dt))
and the error is: IndexError: id1 is not the same size as b (line
322, sparseMatrix.py)
I've run your script several times on both a PPC Mac OS X machine
(10.4.10) with Python 2.4.4., NumPy 1.0.2, and PySparse 1.0 and on a
i686 Debian Linux machine (3.1) with Python 2.3.5, NumPy 1.0.1, and
PySparse 1.0. I'm running FiPy 1.2 on both because I assume that's
what you're running, but I wouldn't expect it to matter for this
particular issue. I don't get any NaNs or errors for either one.
What is your configuration?
For the record, I don't see any obvious issues in your code. From the
way you were describing it before, I thought that you might be
building a matrix that amounted to 0 == 0, which might cause a
problem, but I don't believe you are. I have no idea why you'd get
errors sometimes and not others; your code should do exactly the same
thing every time you run it; in my case, the numbers are even
identical to at least 10 significant figures between the two fairly
disparate architectures I described above. It almost makes me suspect
bad memory or a loose chip or something.