diff --git a/AMDiS/src/PardisoSolver.cc b/AMDiS/src/PardisoSolver.cc index 04d6d380753006c497cfe1667e2e01f8e478f49e..80e4ccaa829f03877b4bd2643d6a39c4dd85ab89 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 f23673fab70e060cf0a74cf662eb09740cb8b8c8..96593bcaaa0b11a3dc0e38092d24845b6d872e18 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 eb7438c8cd6e68a1c8720e255bc812410b72947f..684766876f1c5165834487d0bdcc46a30fda8da7 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));