[deal.II] Re: possible memory leak using TrilinosWrappers direct solver?

2017-01-31 Thread femFluid
Hi, Jean-Paul, 

thanks very much, i am using trilinos 12.10,1. I will prepare a simple 
minimal test and mail it to you asap.

best,
lailai

On Tuesday, 31 January 2017 01:42:06 UTC-5, Jean-Paul Pelteret wrote:
>
> Dear Lailai,
>
> Internally we store the Amesos solver in a smart pointer 
> ,
>  
> so when the solver goes out of scope the solver is destroyed. At this time, 
> the Amesos solver should clean up after itself - in its class 
> documentation 
> 
>  
> I can find no mention of a "delete" or "destroy" function. So I don't think 
> its likely that this is causing a memory leak, but if you're able to 
> produce a minimal test case then we could investigate further. I suppose I 
> should ask, which version of Trilinos are you using?
>
> Regards,
> Jean-Paul
>
>
> On Tuesday, January 31, 2017 at 3:41:47 AM UTC+1, femFluid wrote:
>>
>> hi, dear all,
>>
>> i am using trilino's direct solver interface to solve a time-dependent 
>> problem. I realized that
>> when the number of iterations increases, the memory usage also increases. 
>> This increase
>> does not arise when turning the solver off, so just assembling the 
>> matrices.
>>
>> At the beginning, i used the following subroutine at every time step,
>>
>>{
>> deallog.push("DirectKLU");
>> TrilinosWrappers::SolverDirect::AdditionalData data;
>> data.solver_type = "Amesos_Klu";
>> SolverControl   solver_control (1000, 1e-10);
>> TrilinosWrappers::SolverDirect solver(solver_control, data);
>> solver.solve (matrix, solution, rhs);
>> thick_constraints.distribute (thick_solution);
>> }
>>
>> then i realized that the memory might be allocated every time when 
>> defining TrilinosWrappers::SolverDirect solver(.), which is not 
>> released.
>>  Then I predefine the solver in a namespace, which is the used by calling 
>> solver.solve (matrix, solution, rhs) at each step. Still, the memory 
>> leakage 
>> occurs.
>>
>> I also tried to use "Amesos_Mumps", the problem still exists. I tried to 
>> see the documentation of Amesos, i realized that when amesos solver
>> finished solving, there is a procedure 'delete solver' after. May I ask 
>> whether
>> such a member function exists in dealII wrappers? Thanks in advance,
>>
>> best,
>> lailai
>>
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[deal.II] Re: possible memory leak using TrilinosWrappers direct solver?

2017-01-30 Thread Michael Harmon
Is your matrix updating at every time step or just the right hand side 
vector?

If its just the right hand side vector is changing, the development version 
of dealii has the ability to factorize the matrix once
and then just do solve(x,b) at every time step. I'm not sure, but it Might 
help.

On Monday, January 30, 2017 at 9:41:47 PM UTC-5, femFluid wrote:
>
> hi, dear all,
>
> i am using trilino's direct solver interface to solve a time-dependent 
> problem. I realized that
> when the number of iterations increases, the memory usage also increases. 
> This increase
> does not arise when turning the solver off, so just assembling the 
> matrices.
>
> At the beginning, i used the following subroutine at every time step,
>
>{
> deallog.push("DirectKLU");
> TrilinosWrappers::SolverDirect::AdditionalData data;
> data.solver_type = "Amesos_Klu";
> SolverControl   solver_control (1000, 1e-10);
> TrilinosWrappers::SolverDirect solver(solver_control, data);
> solver.solve (matrix, solution, rhs);
> thick_constraints.distribute (thick_solution);
> }
>
> then i realized that the memory might be allocated every time when 
> defining TrilinosWrappers::SolverDirect solver(.), which is not 
> released.
>  Then I predefine the solver in a namespace, which is the used by calling 
> solver.solve (matrix, solution, rhs) at each step. Still, the memory 
> leakage 
> occurs.
>
> I also tried to use "Amesos_Mumps", the problem still exists. I tried to 
> see the documentation of Amesos, i realized that when amesos solver
> finished solving, there is a procedure 'delete solver' after. May I ask 
> whether
> such a member function exists in dealII wrappers? Thanks in advance,
>
> best,
> lailai
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.