-
Notifications
You must be signed in to change notification settings - Fork 105
Open
Description
Hi, I'm using SuperLU with MFEM to solve Stokes equations. The solver works very well. But I noticed that if I made a for loop of the part of the solver and call the solver over and over again, it starts using more and more memory. Even though I'm deleting the solver's pointer.
HypreParMatrix *H = HypreParMatrixFromBlocks(hBlocks, &blockCoeff);
SuperLUSolver *superlu = new SuperLUSolver(MPI_COMM_WORLD);
Operator *SLU_A = new SuperLURowLocMatrix(*H);
superlu->SetOperator(*SLU_A);
superlu->SetPrintStatistics(true);
superlu->SetSymmetricPattern(true);
superlu->SetColumnPermutation(superlu::PARMETIS);
superlu->SetIterativeRefine(superlu::SLU_DOUBLE);
//Solve the linear system Ax=B
X.Randomize();
superlu->Mult(B, X);
//Delete used memory
delete H;
delete superlu;
delete SLU_A;
I tried to use delete[] superlu and other ways of freeing the memory but nothing works. It's important to make that work because I want to use the solver in conjunction with a time-dependent problem and I have to call it multiple times. What should I do to fix the problem?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels