[petsc-users] Reshaping a vector into a matrix
S V N Vishwanathan
vishy at stat.purdue.edu
Thu Jan 6 21:46:12 CST 2011
> >
> > Is there any place to read up about MAIJ matrices. I read the manual
> > pages but they were rather cryptic. Perhaps some example code?
>
> http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/src/snes/examples/tutorials/ex48.c.html is the only example that uses.
I wrote a little example (attached) to test my understanding of the MAIJ
matrices. When I run it on a single processor I have no trouble but when
I use mpiexec -n 2 I get the following errors. Any pointers on how to
overcome this problem are appreciated. The code loads a matrix from a
file, which can be downloaded from
http://www.stat.purdue.edu/~vishy/adult9.train.x
Before someone has ideas ;-), I should clarify that this is a standard
machine learning dataset.
[0]PETSC ERROR: --------------------- Error Message
------------------------------------
[0]PETSC ERROR: Nonconforming object sizes!
[0]PETSC ERROR: Mat mat,Vec y: local dim 48843 48842!
[0]PETSC ERROR:
------------------------------------------------------------------------
[0]PETSC ERROR: Petsc Release Version 3.1.0, Patch 7, Mon Dec 20
14:26:37 CST 2010
[0]PETSC ERROR: See docs/changes/index.html for recent updates.
[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.
[0]PETSC ERROR: See docs/index.html for manual pages.
[0]PETSC ERROR:
------------------------------------------------------------------------
[0]PETSC ERROR: ./chumma on a linux-gnu named vishy-laptop by vishy Thu
Jan 6 22:28:26 2011
[0]PETSC ERROR: Libraries linked
from /home/vishy/Repositories/GenEntropy/Code/hpc/petsc-3.1-p7/linux-gnu-cxx-debug/lib
[0]PETSC ERROR: Configure run at Thu Dec 30 23:48:41 2010
[0]PETSC ERROR: Configure options --with-debugging=yes
--with-clanguage=C++ --with-shared --download-mpich=ifneeded
[0]PETSC ERROR:
------------------------------------------------------------------------
[0]PETSC ERROR: MatMult() line 1889 in src/mat/interface/matrix.c
[0]PETSC ERROR: main() line 61 in chumma.cpp
application called MPI_Abort(MPI_COMM_WORLD, 60) - process 0[cli_0]:
aborting job:
application called MPI_Abort(MPI_COMM_WORLD, 60) - process 0
[0]0:Return code = 60
[0]1:Return code = 0, signaled with Interrupt
vishy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: chumma.cpp
Type: text/x-c++src
Size: 2464 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110106/0763e6a6/attachment.cpp>
More information about the petsc-users
mailing list