<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">I have recently started using petsc and have little experience with parallel programming.<br>
<br>
I am having problem with the following section of my code:<br>
<br>
        KSPGetPC(ksp,&pc);<br>
        PCSetType(pc,PCCHOLESKY);<br>
        PCFactorSetMatSolverPackage(pc,MATSOLVERMUMPS);<br>
        PCFactorSetUpMatSolverPackage(pc);<br>
        PCFactorGetMatrix(pc,&L);<br>
        MatMumpsSetIcntl(L,7,2);<br>
        MatMumpsSetCntl(L,1,0.0);<br>
        MatMumpsSetIcntl(L,33,1);<br>
        KSPSetUp(ksp);<br>
        KSPSolve(ksp, y, alpha);<br>
<br>
        VecDot(y, alpha, &sigma);<br>
<br>
when I run it using a single processor (mpiexec -np 1 ....) I get the correct answer, when I run using 2 processors I get sigma = 4*sigma and so on.
<br>
<br>
How can I solve this problem??<br>
<br>
ZL<br>
<br>
<br>
</div>
</body>
</html>