Memory allocation error & sementation fault

Numerical methods and mathematical models of Elmer
raback
Site Admin
Posts: 4866
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Memory allocation error & sementation fault

Post by raback »

Hi Mark

If you study the linear system output carefully (and know what's built inside the code ;-) ) you see that there are three calls for BiCGstabl. The 1st one already solves the system requiring 375 iterations, the 2nd one just ensures that the system really has converged (and could be omitted by setting "Nonlinear System Max Iterations = 1"). Then there is a third call which is a result of the "Calculate Stresses = True" flag. This is a postprocessing step where components of the stress field are computed from the solution. It needs a separate matrix structure and preconditioning so best you see it in the line

Code: Select all

OptimizeBandwidth: Computing matrix structure for: calculate stresses...done.
For this equation one could basically have a different set of "Linear System" parameters. In the current implementation there is no such freedom and the same preconditioner + linear solver are used. Now what is fishy is that for this "simple" equation already after 1st linear system iteration there's divergence as seen in lines:

Code: Select all

CRS_IncompleteLU: ILU(3) (Real), Factorization ready at (s):     0.86
:        1        NaN        NaN
I fear there may be a bug somewhere that related to using the same linear system solver for solving different equation. Something in the initialization or size definitions, for example. Unfortunately a quick inspection to the code didn't reveal anything like that...

-Peter
mark smith
Posts: 215
Joined: 26 Aug 2009, 18:20
Location: Peterborough, England

Re: Memory allocation error & sementation fault

Post by mark smith »

Hi Peter
Thanks for the update, I take it there may be a bug fix sometime then if the cause is identified?
I have been experimenting some more using the BILUx preconditioner which seems to require less memory than ILUx which is good.
Attached is some more output from a failed run this time a memory allocation error, where I get the warning
WARNING:: IterSolver: BILU for one dofs is equal to ILU!
Is this something to worry about?

The steady state iteration 1 runs OK but you can see that iteration 2 produces a memory allocation error again, can the size of the BILUx or ILUx preconditioner change throughout the run?

Regards
mark
Attachments
elmer_output2.txt
elmer solver log
(4.67 KiB) Downloaded 351 times
raback
Site Admin
Posts: 4866
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Memory allocation error & sementation fault

Post by raback »

Code: Select all

WARNING:: IterSolver: BILU for one dofs is equal to ILU!
Is this something to worry about?
No. The stress computation has just one dof and would this be the only problem BILU would not be introduced in the 1st place because its exactly the same as ILU then.

I'll see if BILU has some memory leaks though.

-Peter
raback
Site Admin
Posts: 4866
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Memory allocation error & sementation fault

Post by raback »

Ok, rev. 4898 uses (~5 min ago) the existing BILU sructure on consecutive calls eliminating some suboptimal dealloc & alloc. The 1st problem still remains. -Peter
mika
Posts: 253
Joined: 15 Sep 2009, 07:44

Re: Memory allocation error & sementation fault

Post by mika »

Hi,

I observed that applying BiCGStab(L) to a simple equation in combination with a highly accurate preconditioner may lead to a breakdown. This is indeed the situation in the stress computation here, so I expect that the NaN behaviour relates to this issue. I just committed a revision of IterativeMethods.src so that the BiCGStab(L) method should now display more robust behavior in such cases.

Best regards,
Mika
mark smith
Posts: 215
Joined: 26 Aug 2009, 18:20
Location: Peterborough, England

Re: Memory allocation error & sementation fault

Post by mark smith »

Hi Elmer team
I've just rebuilt elmersolver on windows XP to Rev 4918 and my test using BiCGStabL now runs to completion without the NaN problem which happened with my previous version which displayed Rev 4575. Thanks very much ;-)

This new build does not display what Revision the software is ?
MAIN:
MAIN: ==========================================
MAIN: E L M E R S O L V E R S T A R T I N G
MAIN: Library version: 6.1 (Rev: )
MAIN: ==========================================

any news when the nightly updates will be up to date?

Best regards
mark
raback
Site Admin
Posts: 4866
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Memory allocation error & sementation fault

Post by raback »

Hi
mark smith wrote:any news when the nightly updates will be up to date?
I just updated the windows binary and documentation on sf and nic. -Peter
Post Reply