- Thank you received: 6
how to free memory for direct solver
- Guosheng Fu
- Topic Author
- Offline
- Elite Member
Less
More
5 years 1 month ago #1912
by Guosheng Fu
how to free memory for direct solver was created by Guosheng Fu
Hello,
I have limited ram in my computer and encountered a memory problem for time dependent simulation.
Basically, I am reassembling a time dependent linear system and apply direct solver in each time step.
Now, for a particular size problem, a single matrix factorization eat up most of my memory (80%).
As I am reassembling the matrix and recomputing the matrix factorization, the old one still occupies that 80% memory, and the direct solver fails to proceed.
Is there a simple trick to clear the memory of the old matrix factorization?
In matlab, I can simply do clear(inva).... I was wondering about the analog in python...
Best,
Guosheng
I have limited ram in my computer and encountered a memory problem for time dependent simulation.
Basically, I am reassembling a time dependent linear system and apply direct solver in each time step.
Now, for a particular size problem, a single matrix factorization eat up most of my memory (80%).
As I am reassembling the matrix and recomputing the matrix factorization, the old one still occupies that 80% memory, and the direct solver fails to proceed.
Is there a simple trick to clear the memory of the old matrix factorization?
In matlab, I can simply do clear(inva).... I was wondering about the analog in python...
Best,
Guosheng
5 years 1 month ago #1913
by hvwahl
Replied by hvwahl on topic how to free memory for direct solver
Hi Guosheng,
I think that pythons "del" command should work, i.e., if inv = a.mat.Inverse(X.FreeDofs()) call "del inv" and whatever else you want to get rid of at then end of each time step.
Best wishes,
Henry
I think that pythons "del" command should work, i.e., if inv = a.mat.Inverse(X.FreeDofs()) call "del inv" and whatever else you want to get rid of at then end of each time step.
Best wishes,
Henry
- Guosheng Fu
- Topic Author
- Offline
- Elite Member
Less
More
- Thank you received: 6
5 years 1 month ago #1916
by Guosheng Fu
Replied by Guosheng Fu on topic how to free memory for direct solver
Thanks, Henry. It works.
Time to create page: 0.120 seconds