Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Pardiso on Mac OS Leopard

cindygr
Beginner
654 Views
Hello,
I'm in the process of porting something from Visual Studio to XCode on the Mac. I have a piece of Pardiso code (below) that works fine on Windows but is crashing (EXC_BAD_ACCESS) on the _second_ time through the solve code (the second call to pardiso in the second round). The results from the first call are fine. As per a previous post, I changed the reporting (iMsgLvl) to zero; that didn't help. I've checked that the first round gives a valid answer. I don't re-initialize the PT data and I don't do any memory frees (problems I fixed to get it working under Windows).

Any help would be appreciated... :)

XCode: version 3
Compiler: gcc 4.0.1
Intel libraries: 10.1.014, 32 bit

WINbool
FITTools_LS::Solve_sparse(const WINbool in_bPrintProgress)
{
static WINbool s_bInit = FALSE;
static void *s_aPt[64];
static int s_aiParams[64];
int iMaxFct = 1, iMNum = 1, iMType = 11, iPhase = 11, iMsgLvl = 0, iErr = 0, iDummy = 0;
double dDummy = 0.0;

if ( s_bInit == FALSE ) {
for ( int i = 0; i s_aPt = 0;
s_aiParams = 0;
}
s_bInit = TRUE;
s_aiParams[0] = 0;
s_aiParams[2] = omp_get_max_threads();
}

iPhase = 11;
pardiso_( s_aPt, &iMaxFct, &iMNum, &iMType, &iPhase,
&m_iNDesired, &m_adDesiredData[0], &m_aiRowIndex[0], &m_aiColIndex[0], &iDummy, &m_iNDimension,
s_aiParams, &iMsgLvl, &dDummy, &dDummy, &iErr );

if ( iErr != 0 ) {
TRACE("Error in Symbolic Factorization %d %d ", iErr, s_aiParams[20]);
return FALSE;
}
if ( in_bPrintProgress ) {
TRACE("Reordering complete ");
TRACE("Number of non-zero factors %d ", s_aiParams[17] );
TRACE("Number of factorizations %d ", s_aiParams[18] );
}

// Dies here second time through
iPhase = 22;
pardiso_( s_aPt, &iMaxFct, &iMNum, &iMType, &iPhase,
&m_iNDesired, &m_adDesiredData[0], &m_aiRowIndex[0], &m_aiColIndex[0], &iDummy, &m_iNDimension,
s_aiParams, &iMsgLvl, &dDummy, &dDummy, &iErr );

if ( iErr != 0 ) {
TRACE("Error in Numerical Factorization %d ", iErr);
return FALSE;
}

if ( in_bPrintProgress ) {
TRACE("Factorization complete ");
}

iPhase = 33;
pardiso_( s_aPt, &iMaxFct, &iMNum, &iMType, &iPhase,
&m_iNDesired, &m_adDesiredData[0], &m_aiRowIndex[0], &m_aiColIndex[0], NULL, &m_iNDimension,
s_aiParams, &iMsgLvl, &m_adRhsData[0], &m_adSolutionData[0], &iErr );

if ( in_bPrintProgress ) {
if ( iErr == 0 ) {
TRACE("Time %f Iterations %d ", dDiff, s_aiParams[20]);
}
}


if ( iErr == 0 ) {
return TRUE;
}

TRACE("Failed: time %f iterations %d Error", dDiff, iErr );
switch ( -iErr ) {
case 1 : TRACE("Large fluctuations in residual "); break;
case 2 : TRACE("Slow convergence "); break;
case 3 : TRACE("Stopping criteria not reached "); break;
case 4 : TRACE("Perturbed pivots caused iterative refinement "); break;
case 5 : TRACE("Try again with iparam[3] = 0 "); break;
}

return FALSE;
}

0 Kudos
2 Replies
Todd_R_Intel
Employee
654 Views
Do you mean you're using MKL 10.0(.014)? (Check mklsupport.txt in the doc directory). Your problem may have to do with some problems with 10.0 on 32-bit systems with Leopard. If that is your problem, you could try Update 3 which fixed that problem.
-Todd
0 Kudos
cindygr
Beginner
654 Views
Looks like I am running the latest version: Package ID: m_mkl_p_10.0.3.020 Package Contents: Intel Math Kernel Library 10.0 Update 3 for Mac OS* X according to mklsupport.txt. Sigh. --Cindy
0 Kudos
Reply