From 59fe3dc3ec658a02240c22fcd70bd31cfc938e7a Mon Sep 17 00:00:00 2001 From: Thomas Witkowski <thomas.witkowski@gmx.de> Date: Wed, 11 Jun 2008 13:40:51 +0000 Subject: [PATCH] * PardisoSolver extended --- AMDiS/src/PardisoSolver.cc | 24 ++++++++++++------------ AMDiS/src/PardisoSolver.h | 8 ++++++++ AMDiS/src/ProblemVec.cc | 1 + 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/AMDiS/src/PardisoSolver.cc b/AMDiS/src/PardisoSolver.cc index 04d6d380..80e4ccaa 100644 --- a/AMDiS/src/PardisoSolver.cc +++ b/AMDiS/src/PardisoSolver.cc @@ -62,8 +62,8 @@ namespace AMDiS { } double *a = (double*)malloc(sizeof(double) * nElements); - int *ja = (int*)malloc(sizeof(int) * nElements); - int *ia = (int*)malloc(sizeof(int) * (newMatrixSize + 1)); + MKL_INT *ja = (int*)malloc(sizeof(MKL_INT) * nElements); + MKL_INT *ia = (int*)malloc(sizeof(MKL_INT) * (newMatrixSize + 1)); double *bvec = (double*)malloc(sizeof(double) * newMatrixSize); double *xvec = (double*)malloc(sizeof(double) * newMatrixSize); @@ -102,10 +102,10 @@ namespace AMDiS { } // real unsymmetric matrix - int mtype = 11; + MKL_INT mtype = 11; // number of right hand sides - int nRhs = 1; + MKL_INT nRhs = 1; // Pardiso internal memory void *pt[64]; @@ -114,7 +114,7 @@ namespace AMDiS { } // Pardiso control parameters - int iparm[64]; + MKL_INT iparm[64]; for (int i = 0; i < 64; i++) { iparm[i] = 0; } @@ -129,25 +129,25 @@ namespace AMDiS { iparm[18] = -1; // Output: Mflops for LU factorization // Maximum number of numerical factorizations - int maxfct = 1; + MKL_INT maxfct = 1; // Which factorization to use - int mnum = 1; + MKL_INT mnum = 1; // Print statistical information in file - int msglvl = 1; + MKL_INT msglvl = 1; // Error flag - int error = 0; + MKL_INT error = 0; - int n = newMatrixSize; + MKL_INT n = newMatrixSize; // Reordering and symbolic factorization - int phase = 11; + MKL_INT phase = 11; double ddum; - int idum; + MKL_INT idum; PARDISO(pt, &maxfct, &mnum, &mtype, &phase, &n, a, ia, ja, &idum, &nRhs, iparm, &msglvl, &ddum, &ddum, &error); diff --git a/AMDiS/src/PardisoSolver.h b/AMDiS/src/PardisoSolver.h index f23673fa..96593bca 100644 --- a/AMDiS/src/PardisoSolver.h +++ b/AMDiS/src/PardisoSolver.h @@ -24,9 +24,17 @@ #ifdef HAVE_MKL +#include <mkl.h> + #include "OEMSolver.h" #include "MemoryManager.h" +#if defined(MKL_ILP64) +#define MKL_INT long long +#else +#define MKL_INT int +#endif + namespace AMDiS { // ============================================================================ diff --git a/AMDiS/src/ProblemVec.cc b/AMDiS/src/ProblemVec.cc index eb7438c8..68476687 100644 --- a/AMDiS/src/ProblemVec.cc +++ b/AMDiS/src/ProblemVec.cc @@ -743,6 +743,7 @@ namespace AMDiS { assembledMatrix_[i][j] = true; } + // fill boundary conditions if (rhs_->getDOFVector(i)->getBoundaryManager()) rhs_->getDOFVector(i)->getBoundaryManager()->initVector(rhs_->getDOFVector(i)); -- GitLab