Hi Daniel,
I removed some redundant terms in my equations and run the 80*80*80 mesh
again. This time I got a different set of errors, shown below. The errors
end in a line from a script named "fixedBCFaceGradVariable.py", which you
and (or) Jon gave me for solving the source term boundary condition problem.
I used that script to solve a lot of problems. It is still a great script
despite of this error I got, which may not be its fault.
The numerix.shape for V1, V2 and dAP are all (1555200,). I don't know if
this number makes sense.
I also put "raw_input" before and after line 21, but I don't see any huge
memory consumption across it. This line is encountered when defining
equations and when sweeping. The program crashes at the first sweeping.
>From "top", the memory usage for this program is around 2-3GB and the node I
am running this program on has a total RAM of 32GB, most of which is
available. In principle, I should be able to use the rest of the resources
and run even much bigger simulations. So, I am very confused. I wonder what
is the next step.
Thank you very much for your time. Have a nice day!
Regards,
Zhiwen
Traceback (most recent call last):
File "run_pyramid.py", line 93, in <module>
u,v,w=run(u=u,v=v,w=w,BC_u=BC_u,BC_v=BC_v,BC_w=BC_w)
File "run_pyramid.py", line 79, in run
solver=solver)
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/terms/term.py", line 177, in sweep
solver, matrix, RHSvector = self._prepareLinearSystem(var, solver,
boundaryC
onditions, dt)
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/terms/term.py", line 138, in _prepareLinearSystem
matrix, RHSvector = self.__buildMatrix(var, solver._getMatrixClass(),
bounda
ryConditions, dt)
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/terms/term.py", line 114, in __buildMatrix
matrix, RHSvector = self._buildMatrix(var, SparseMatrix,
boundaryConditions,
dt)
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/terms/equation.py", line 93, in _buildMatrix
dt, self)
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/terms/cellTerm.py", line 141, in _buildMatrix
coeffVectors = self._getCoeffVectors(var=var)
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/terms/cellTerm.py", line 91, in _getCoeffVectors
self._calcCoeffVectors(var=var)
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/terms/cellTerm.py", line 73, in _calcCoeffVectors
coeff = self._getGeomCoeff(mesh)
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/terms/term.py", line 420, in _getGeomCoeff
self.geomCoeff = self._calcGeomCoeff(mesh)
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/terms/sourceTerm.py", line 55, in _calcGeomCoeff
return self.coeff * mesh.getCellVolumes()
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/variables/variable.py", line 903, in __mul__
return self._BinaryOperatorVariable(lambda a,b: a*b, other)
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/variables/variable.py", line 873, in _BinaryOperatorVariable
if not v.getUnit().isDimensionless():
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/variables/binaryOperatorVariable.py", line 87, in getUnit
return self._extractUnit(self._calcValuePy())
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/variables/binaryOperatorVariable.py", line 80, in _calcValuePy
return self.op(self.var[0].getValue(), val1)
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/variables/variable.py", line 453, in getValue
value = self._calcValue()
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/variables/operatorVariable.py", line 61, in _calcValue
return inline._optionalInline(self._calcValueIn, self._calcValuePy)
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/tools/inline/inline.py", line 9, in _optionalInline
return pythonFn(*args)
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/variables/binaryOperatorVariable.py", line 80, in _calcValuePy
return self.op(self.var[0].getValue(), val1)
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/variables/variable.py", line 453, in getValue
value = self._calcValue()
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/variables/operatorVariable.py", line 61, in _calcValue
return inline._optionalInline(self._calcValueIn, self._calcValuePy)
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/tools/inline/inline.py", line 9, in _optionalInline
return pythonFn(*args)
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/variables/binaryOperatorVariable.py", line 80, in _calcValuePy
return self.op(self.var[0].getValue(), val1)
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/variables/variable.py", line 453, in getValue
value = self._calcValue()
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/variables/operatorVariable.py", line 61, in _calcValue
return inline._optionalInline(self._calcValueIn, self._calcValuePy)
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/tools/inline/inline.py", line 9, in _optionalInline
return pythonFn(*args)
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/variables/binaryOperatorVariable.py", line 74, in _calcValuePy
val1 = self.var[1].getValue()
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/variables/variable.py", line 453, in getValue
value = self._calcValue()
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/variables/addOverFacesVariable.py", line 99, in _calcValue
return inline._optionalInline(self._calcValueIn, self._calcValuePy)
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/tools/inline/inline.py", line 9, in _optionalInline
return pythonFn(*args)
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/variables/addOverFacesVariable.py", line 61, in _calcValuePy
contributions = numerix.take(self.faceVariable, ids)
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/tools/numerix.py", line 1083, in take
taken = a.take(indices, axis=axis)
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/variables/variable.py", line 1291, in take
return numerix.take(self.getValue(), ids, axis)
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/variables/variable.py", line 453, in getValue
value = self._calcValue()
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/variables/operatorVariable.py", line 58, in _calcValue
return self._calcValuePy()
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/variables/binaryOperatorVariable.py", line 80, in _calcValuePy
return self.op(self.var[0].getValue(), val1)
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/variables/variable.py", line 453, in getValue
value = self._calcValue()
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/variables/operatorVariable.py", line 61, in _calcValue
return inline._optionalInline(self._calcValueIn, self._calcValuePy)
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/tools/inline/inline.py", line 9, in _optionalInline
return pythonFn(*args)
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/variables/binaryOperatorVariable.py", line 80, in _calcValuePy
return self.op(self.var[0].getValue(), val1)
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/variables/variable.py", line 453, in getValue
value = self._calcValue()
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/variables/operatorVariable.py", line 61, in _calcValue
return inline._optionalInline(self._calcValueIn, self._calcValuePy)
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/tools/inline/inline.py", line 9, in _optionalInline
return pythonFn(*args)
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/variables/binaryOperatorVariable.py", line 80, in _calcValuePy
return self.op(self.var[0].getValue(), val1)
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/variables/variable.py", line 453, in getValue
value = self._calcValue()
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/variables/operatorVariable.py", line 58, in _calcValue
return self._calcValuePy()
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/variables/binaryOperatorVariable.py", line 80, in _calcValuePy
return self.op(self.var[0].getValue(), val1)
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/variables/variable.py", line 453, in getValue
value = self._calcValue()
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/variables/faceGradVariable.py", line 48, in _calcValue
return inline._optionalInline(self._calcValueInline, self._calcValuePy)
File
"/Volumes/RAID2/usr/local/stow/fipy-trunk/lib/python2.5/site-packages/fip
y/tools/inline/inline.py", line 9, in _optionalInline
return pythonFn(*args)
File
"/Volumes/RAID2/Users/liangz/DEV/Elastic/Solve/fixedBCFaceGradVariable.py
", line 20, in _calcValuePy
N = (v2 - v1) / dAP
MemoryError
On Fri, Nov 14, 2008 at 5:36 PM, Daniel Wheeler
<[EMAIL PROTECTED]>wrote:
>
> On Fri, Nov 14, 2008 at 2:52 PM, Zhiwen Liang <[EMAIL PROTECTED]> wrote:
> >
> > From the "top", the program takes a vsize of around 2G while the
> available
> > physical RAM is >20G for the server. So I think I have enough resource.
>
> Okay. How much memory is the machine slated to have in the specs? The
> machine has a 64 bit OS, I assume. The question is whether you are
> running out of memory. The error statement certainly seems to be
> suggesting that. It's possible, 80 * 80 * 80 is a fairly large
> problem.
>
> > I got the memory error when defining one of the source terms for the
> > equation. I have a second order diffusion term and several coupled source
> > terms (You probably might have seen those long long equations I sent you
> > before). I don't know if the source terms cause the trouble.
>
> It could be that you have an array multiplication that is leading to
> an (Ncells, Ncells) array which is huge, although you would probably
> notice that in top. Go to where the thing is failing "line 80 in
> variables/gaussCellGradVariable.py" and print
> numerix.shape(orientations) and numerix.shape(contributions) just to
> check that "orientations * contributions" is not somehow making a
> weird shaped massive array. Also, put a raw_input() statement right
> before this line and check how much memory is used right before that
> statement.
>
> > Yes I am using the uniform grid. All the meshes I use so far are created
> by
> > Grid3D. I am thinking to use GMSH though.
>
> Won't be as memory efficient at the moment.
>
> > I am now using the GMRES solver from pysparse. What do you recommend?
>
> That's fine.
>
> > When I look at the top, the memory usage for the program doesn't change
> much
> > throughout the definition of the equations, and it crashes somehow in
>
> It won't change much. The equations are mostly empty objects.
>
> > between. And I am solving for an equilibrium state without any time
> > evolution (just one time step). But I will check the variables.
>
> yeah, but you are doing some sort of sweeping to convergence, which is
> the same in this context.
>
>
> --
> Daniel Wheeler
>
>