Skip to content
Snippets Groups Projects
Commit fe9d0386 authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

* PardisoSolver bugfix

parent 59fe3dc3
No related branches found
No related tags found
No related merge requests found
...@@ -151,7 +151,7 @@ namespace AMDiS { ...@@ -151,7 +151,7 @@ namespace AMDiS {
PARDISO(pt, &maxfct, &mnum, &mtype, &phase, &n, a, ia, ja, &idum, &nRhs, PARDISO(pt, &maxfct, &mnum, &mtype, &phase, &n, a, ia, ja, &idum, &nRhs,
iparm, &msglvl, &ddum, &ddum, &error); iparm, &msglvl, &ddum, &ddum, &error);
TEST_EXIT(error == 0)("Intel MKL Pardiso error during symbolic factorization: %d\n", error); TEST_EXIT(error == 0)("Intel MKL Pardiso error during symbolic factorization: %d\n", error);
// Numerical factorization // Numerical factorization
...@@ -171,13 +171,6 @@ namespace AMDiS { ...@@ -171,13 +171,6 @@ namespace AMDiS {
TEST_EXIT(error == 0)("Intel MKL Pardiso error during solution: %d\n", error); TEST_EXIT(error == 0)("Intel MKL Pardiso error during solution: %d\n", error);
// Termination and release of memory
phase = -1;
PARDISO(pt, &maxfct, &mnum, &mtype, &phase, &n, a, ia, ja, &idum, &nRhs,
iparm, &msglvl, &ddum, &ddum, &error);
// Copy and resort solution. // Copy and resort solution.
for (int i = 0; i < x->getSize(); i++) { for (int i = 0; i < x->getSize(); i++) {
DOFVector<double>::Iterator it(x->getDOFVector(i), USED_DOFS); DOFVector<double>::Iterator it(x->getDOFVector(i), USED_DOFS);
...@@ -198,12 +191,17 @@ namespace AMDiS { ...@@ -198,12 +191,17 @@ namespace AMDiS {
MSG("Residual: %e\n", this->residual); MSG("Residual: %e\n", this->residual);
// Termination and release of memory
phase = -1;
PARDISO(pt, &maxfct, &mnum, &mtype, &phase, &n, a, ia, ja, &idum, &nRhs,
iparm, &msglvl, &ddum, &ddum, &error);
free(a); free(a);
free(ja); free(ja);
free(ia); free(ia);
free(b); free(bvec);
free(x); free(xvec);
return(1); return(1);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment