Hello:
Attached is a suggested revision to the fipy/tools/inline/__init__.py file.
The change creates another way to invoke inline using an environment
variable called FIPY_INLINE, which can be set to "true" or "false". I use
fipy in a multi-core environment to run parallel jobs using ipython. I
don't know how to control sys.argv on the different engines, but they can
all see the environment variables, so this works.
Also, I have noted that the pysparse solvers can sometimes produce bad
results for diffusion problems with variable properties, but the trilinos
LinearGMRESSolver has been robust and about 2-4x as fast.
Finally, for anyone else using Trilinos 9.0.1 with Python 2.5 (or later) in
a 64-bit machine where dl.so is not built, the first try clause in the
__init__.py file for PyTrilinos needs to have the two exceptions grouped
with parenthesis, as the two exceptions are not implicitly tupled. (I sent
this to the Trilinos folks too).
Best Regards,
Angus Hendrick
import sys
if '--inline' in sys.argv[1:]:
inlineFlagOn = True
else:
import os
# Next, check for an environment variable telling us which solver to use
if os.environ.has_key('FIPY_INLINE'):
if os.environ['FIPY_INLINE'].lower() == 'true':
inlineFlagOn = True
elif os.environ['FIPY_INLINE'].lower() == 'false':
inlineFlagOn = False
else:
raise ImportError, 'Unknown setting for FIPY_INLINE: %s, should be true or false' % os.environ['FIPY_INLINE']
else:
inlineFlagOn = False