On Mar 3, 2006, at 9:14 AM, Buddy Damm wrote:
When running examples/phase/anisotropy/input.py renamed to dendrite.py
and with the inputs changed per the file instructions to get dendrites
to form, the program stops. It was running overnight, so I am not sure
when it stopped. below is the message I saw when I came in. line 195
reads:
from fipy.terms.transientTerm import TransientTerm
The other error is because I saved dendrite to my home dir. I resaved
it to the examples/phase/anisotropy directory and am running it again
now.
There's only one error here, I think. The line number is a bit
deceptive. In order for our example scripts to also serve as
documentation, they are written in a format called "doctest". That
documentation is then parsed and treated as a Python script. This is
happening on line 256:
exec(fipy.tests.doctestPlus._getScript())
The error
File "<string>", line 195, in ?
ImportError: No module named examples.phase.anisotropy
is occurring on line 195 *of the documentation string*, not of the
file. In my unedited version, the documentation string starts on line
43 with 'r"""' and 192 lines later, at line 235 of the file, I have
import examples.phase.anisotropy
which is the source of your error, and which you've already figured out
is because you had moved the script.
If you don't want to have to remember to do the addition, then you can
invoke 'copy_script' to strip away the documentation and produce a
plain Python file. This is explained on the first page of Part II:
Examples of the manual, and in the first example,
examples.diffusion.steadyState.mesh1D.input
Note, if you elected to install FiPy ('python setup.py install'), then
you may still get the same error even when you move the script into
examples/phase/anisotropy/. This is because examples/ will not be found
as a member of your PYTHONPATH; only the fipy/ directory gets
installed. This is not a problem when you do the tests because the
setup.py script sits alongside examples/ and fipy/, so examples/ is
found. Because we're doing development on different branches of the
code, Daniel and I always run in this configuration and simply point
our PYTHONPATH at the directory we happen to be using; I can't remember
the last time I actually installed FiPy. Anyway, you're not the first
person to have trouble with this, so we're almost certainly going to
arrange to have the examples/ directory "installed", too.
Finally, even if added examples/ to your PYTHONPATH, you'd still get a
failure because that line is simply doing a numeric comparison to a
result saved from Ryo Kobayashi's code. Since you've changed the
simulation conditions, the comparison data is invalid.
In short, your simulation has successfully run to completion. The
verification of the final data is just too fragile.
On a unrelated (I think) note, when I run fipy programs on my linux
machine, the plots don't refresh. So for example, when I came in, the
screen saver was on. when the screen saver is terminated, the graphs
are blank (nothing but white). Similarly, if I have a plot up, and
maximize another window, or drag a window over it, and then go back to
the plot the plot window is blank again. This does not appear to
happen
on my windows machine.
Viewer updating is a perennial problem. They all behave differently on
different platforms and differently under different circumstances. It's
a big frustration for us. gist is fast, but it seems the most prone to
this sort of behavior.
--
Jonathan E. Guyer, PhD
Metallurgy Division
National Institute of Standards and Technology
<http://www.metallurgy.nist.gov/>