Thank you Dr. Guyer.
I tried with other solvers and the LinearGMRESSolver seems to work
better. I am not sure if I could use that, though I have a non-
symmetric matrix (I have a convection term in my formulation). With
this solver the memory error seems to be gone, but "invalid value
encountered in log" error comes up and the program stops running.
I am still struggling to find where the bug is. Just for
confirmation : Is this correct to combine a phase transformation term
and a counter diffusion term to make one convection coefficient ?
I have got the following terms:
counterDiffusion = -2[(La - Lb)*p(phi) + Lb] * c.getFaceGrad()
phaseTransformation = [G + (1 - 2c)*(La - Lb)] * p(phi).getFaceGrad()
+ (Wb - Wa) * g(phi).getFaceGrad()
convectionCoefficient = counterDiffusion + phaseTransformation
convectionCoefficient *= D*(1-c).getHarmonicFaceValue()/R*T
where, phi = phase field variable, c = composition
p(phi) and g(phi) are the interpolation function and double well
function respectively.
D is the diffusivity. D = MRT/c(1-c) (as described in fipy examples)
G, La, Lb, Wa and Wb are all constants for the time being.
PS: I was wondering if you got a chance to look at my paper. Your
review comments will be highly appreciated.
Thank you very much for your help.
Rashmi
On Jul 10, 2008, at July10,1:16 PM, Jonathan Guyer wrote:
On Jul 10, 2008, at 9:58 AM, Rashmi Ranjan Mohanty wrote:
I am running a Fipy code with a system size of 400x400 mesh points
on a Mac Pro 3GHz Dual-Intel Xeon processor with 2GB memory. After
running few steps it stops with the following error message:
python(1013) malloc: *** vm_allocate(size=7921664) failed (error
code=3)
python(1013) malloc: *** error: can't allocate region
python(1013) malloc: *** set a breakpoint in szone_error to debug
malloc fails for local dworkptr[].Traceback (most recent call last):
File "isothermal-new2D.py", line 355, in <module>
compRes = compEq.sweep(var = comp, boundaryConditions = BCsC,
dt=time, solver=solver)
File "/sw/lib/python2.5/site-packages/fipy/terms/term.py", line
153, in sweep
self._solveLinearSystem(var, solver, matrix, RHSvector)
File "/sw/lib/python2.5/site-packages/fipy/terms/term.py", line
102, in _solveLinearSystem
solver._solve(matrix, array, RHSvector)
File "/sw/lib/python2.5/site-packages/fipy/solvers/
linearLUSolver.py", line 92, in _solve
LU = superlu.factorize(L._getMatrix().to_csr())
MemoryError
I guess it has something to do with memory, but could not figure
out a solution.
I would appreciate your help.
My suspicion would lie on your use of the LU solver. The PySparse
LU solver is robust, and often faster than the iterative solvers,
but it does so by using a great deal of memory.
Have you tried other solvers?