I have recently started using petsc and have little experience with parallel 
programming.

I am having problem with the following section of my code:

        KSPGetPC(ksp,&pc);
        PCSetType(pc,PCCHOLESKY);
        PCFactorSetMatSolverPackage(pc,MATSOLVERMUMPS);
        PCFactorSetUpMatSolverPackage(pc);
        PCFactorGetMatrix(pc,&L);
        MatMumpsSetIcntl(L,7,2);
        MatMumpsSetCntl(L,1,0.0);
        MatMumpsSetIcntl(L,33,1);
        KSPSetUp(ksp);
        KSPSolve(ksp, y, alpha);

        VecDot(y, alpha, &sigma);

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.

How can I solve this problem??

ZL


Reply via email to