Fixed a memory leak: HYPRE_ConvertParCSRMatrixToDistributedMatrix
already calls HYPRE_DistributedMatrixCreate
This commit is contained in:
parent
9ea4575e20
commit
9233e32cc6
@ -113,8 +113,7 @@ HYPRE_ParCSRParaSailsSetup( HYPRE_Solver solver,
|
||||
HYPRE_DistributedMatrix mat;
|
||||
Secret *secret = (Secret *) solver;
|
||||
|
||||
ierr = HYPRE_DistributedMatrixCreate(secret->comm, &mat);
|
||||
if (ierr) return ierr;
|
||||
/* The following call will also create the distributed matrix */
|
||||
|
||||
ierr = HYPRE_ConvertParCSRMatrixToDistributedMatrix( A, &mat );
|
||||
if (ierr) return ierr;
|
||||
|
||||
@ -113,8 +113,7 @@ HYPRE_ParCSRParaSailsSetup( HYPRE_Solver solver,
|
||||
HYPRE_DistributedMatrix mat;
|
||||
Secret *secret = (Secret *) solver;
|
||||
|
||||
ierr = HYPRE_DistributedMatrixCreate(secret->comm, &mat);
|
||||
if (ierr) return ierr;
|
||||
/* The following call will also create the distributed matrix */
|
||||
|
||||
ierr = HYPRE_ConvertParCSRMatrixToDistributedMatrix( A, &mat );
|
||||
if (ierr) return ierr;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user