Hi,<br><br>I am trying to solve a linear system where Ay=x and A is a 5x5 matrix stored in a binary file called &#39;square&#39; and x=[1;1;1;1;1]<br><br>I am trying to display the matrix A, and the vectors x(rhs)  and y(soln) in that order to standard output.  <br>
<br>On running my code on a single processor the answer returned is accurate. But on using 2 processors I get weird error messages PART of which says  <br>
<br>[0]PETSC ERROR: [1]PETSC ERROR: --------------------- Error Message ------------------------------------<br>
[1]PETSC ERROR: Nonconforming object sizes!<br>
[1]PETSC ERROR: Mat mat,Vec x: global dim 5 10!<br><br>Also somehow the vector x gets displayed TWICE when run on two processes.  A however gets displayed ONCE (as it should!!)<br><br><br>I am attaching the output I get when I run on 1 process and the when I run the same code on 2 processes.<br>
please let me know where I could be going wrong. <br><br>(1)<br><br>This is what I get on running on ONE process:  (Here system is solved successfully)<br><br>gaurish108@gaurish108-laptop:~/Desktop$ $PETSC_DIR/$PETSC_ARCH/bin/mpiexec -n 1 ./ex4 -f square<br>
<br>1.5761308167754828e-01 1.4188633862721534e-01 6.5574069915658684e-01 7.5774013057833345e-01 7.0604608801960878e-01 <br>9.7059278176061570e-01 4.2176128262627499e-01 3.5711678574189554e-02 7.4313246812491618e-01 3.1832846377420676e-02 <br>
9.5716694824294557e-01 9.1573552518906709e-01 8.4912930586877711e-01 3.9222701953416816e-01 2.7692298496088996e-01 <br>4.8537564872284122e-01 7.9220732955955442e-01 9.3399324775755055e-01 6.5547789017755664e-01 4.6171390631153941e-02 <br>
8.0028046888880011e-01 9.5949242639290300e-01 6.7873515485777347e-01 1.7118668781156177e-01 9.7131781235847536e-02 <br>Process [0]<br>1<br>1<br>1<br>1<br>1<br>KSPGetIterationNumber 5 <br> KSPGetResidualNorm 0.000000 <br>Process [0]<br>
-0.810214<br>2.33178<br>-1.31131<br>1.09323<br>1.17322<br>gaurish108@gaurish108-laptop:~/Desktop$ <br><br>%--------------------------------------------------------------------<br>This is what I get on running on TWO processes:<br>
<br>(2)<br><br>gaurish108@gaurish108-laptop:~/Desktop$ $PETSC_DIR/$PETSC_ARCH/bin/mpiexec -n 2 ./ex4 -f square<br>1.5761308167754828e-01 1.4188633862721534e-01 6.5574069915658684e-01 7.5774013057833345e-01 7.0604608801960878e-01 <br>
9.7059278176061570e-01 4.2176128262627499e-01 3.5711678574189554e-02 7.4313246812491618e-01 3.1832846377420676e-02 <br>9.5716694824294557e-01 9.1573552518906709e-01 8.4912930586877711e-01 3.9222701953416816e-01 2.7692298496088996e-01 <br>
4.8537564872284122e-01 7.9220732955955442e-01 9.3399324775755055e-01 6.5547789017755664e-01 4.6171390631153941e-02 <br>8.0028046888880011e-01 9.5949242639290300e-01 6.7873515485777347e-01 1.7118668781156177e-01 9.7131781235847536e-02 <br>
Process [0]<br>1<br>1<br>1<br>1<br>1<br>Process [1]<br>1<br>1<br>1<br>1<br>1<br>[0]PETSC ERROR: [1]PETSC ERROR: --------------------- Error Message ------------------------------------<br>[1]PETSC ERROR: Nonconforming object sizes!<br>
[1]PETSC ERROR: Mat mat,Vec x: global dim 5 10!<br>[1]PETSC ERROR: ------------------------------------------------------------------------<br>[1]PETSC ERROR: Petsc Release Version 3.1.0, Patch 5, Mon Sep 27 11:51:54 CDT 2010<br>
[1]PETSC ERROR: See docs/changes/index.html for recent updates.<br>[1]PETSC ERROR: See docs/faq.html for hints about trouble shooting.<br>[1]PETSC ERROR: --------------------- Error Message ------------------------------------<br>
[0]PETSC ERROR: Nonconforming object sizes!<br>[0]PETSC ERROR: Mat mat,Vec x: global dim 5 10!<br>[0]PETSC ERROR: See docs/index.html for manual pages.<br>[1]PETSC ERROR: ------------------------------------------------------------------------<br>
[1]PETSC ERROR: ./ex4 on a linux-gnu named gaurish108-laptop by gaurish108 Mon Jan 17 23:49:18 2011<br>[1]PETSC ERROR: Libraries linked from /home/gaurish108/Desktop/ResearchMeetings/SUPERPETS/petsc-3.1-p5/linux-gnu-c-debug/lib<br>
[1]PETSC ERROR: Configure run at Sat Nov 13 20:34:38 2010<br>[1]PETSC ERROR: Configure options --with-cc=gcc --with-fc=gfortran --download-f-blas-lapack=1 --download-mpich=1 --download-superlu_dist=1 --download-parmetis=1 --with-superlu_dist=1 --with-parmetis=1<br>
[1]PETSC ERROR: ------------------------------------------------------------------------<br>[1]PETSC ERROR: MatMultTranspose() line 1947 in src/mat/interface/matrix.c<br>[1]PETSC ERROR: KSPSolve_CGNE() line 103 in src/ksp/ksp/impls/cg/cgne/cgne.c<br>
[1]PETSC ERROR: KSPSolve() line 396 in src/ksp/ksp/interface/itfunc.c<br>[1]PETSC ERROR: main() line 78 in src/mat/examples/tutorials/ex4.c<br>application called MPI_Abort(MPI_COMM_WORLD, 60) - process 1[cli_1]: aborting job:<br>
application called MPI_Abort(MPI_COMM_WORLD, 60) - process 1<br>[0]0:Return code = 0, signaled with Interrupt<br>[0]1:Return code = 60<br>gaurish108@gaurish108-laptop:~/Desktop$ <br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br>