Zafer Leylek <[email protected]> writes: > 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.
View y and alpha. I suspect you are solving a different problem in these cases. VecDot computes the parallel dot product.
pgpVza_qIkhTq.pgp
Description: PGP signature
