[petsc-users] MatMatMult size error
Jim Fonseca
jefonseca at gmail.com
Wed Jan 16 12:59:40 CST 2013
Hi,
Thanks for the suggestion about PETSc-dev regarding the MatMatMult issue.
I was able to build PETSc-dev, but slepc-dev gives me errors I haven't seen
before. Logs are attached. Any ideas?
BEGINNING TO COMPILE LIBRARIES IN ALL DIRECTORIES
=========================================
libfast in: /home/jfonseca/NEMOdevcarter/libs/slepc/build-real/src
libfast in: /home/jfonseca/NEMOdevcarter/libs/slepc/build-real/src/eps
libfast in:
/home/jfonseca/NEMOdevcarter/libs/slepc/build-real/src/eps/interface
basic.c(560): error: argument of type "PetscFList" is incompatible with
parameter of type "MPI_Comm={int}"
ierr =
PetscFListFind(EPSList,((PetscObject)eps)->comm,type,PETSC_TRUE,(void
(**)(void)) &r);CHKERRQ(ierr);
Thanks,
Jim
On Tue, Jan 15, 2013 at 4:43 PM, Hong Zhang <hzhang at mcs.anl.gov> wrote:
> Jim :
> Can you switch to petsc-dev? MatMatMult()
> has been updated significantly in petsc-dev
> If you still see problem in petsc-dev, send us a short code that
> produce the error. We'll check it.
>
> Hong
>
> > Hi,
> > We are in the process of upgrading from Petsc 3.2 to 3.3p5.
> >
> > We are creating matrices A and B in this way.
> > petsc_matrix = new Mat;
> > ierr = MatCreateDense(comm, m, num_cols ,num_rows,num_cols,data,A);
> >
> > Elsewhere, we have this. It gets called a few times, and on the 4th time,
> > the size of matrix is C is wrong. Please see the output below. What
> could be
> > the problem?
> > C = new Mat;
> > double fill = PETSC_DEFAULT;
> > MatMatMult(A,B,MAT_INITIAL_MATRIX, fill, C);
> > {
> > int m,n;
> > MatGetOwnershipRange(A, &m, &n);
> > cerr << "A.m = " << m << "\n";
> > cerr << "A.n = " << n << "\n";
> > MatGetSize(A,&m,&n);
> > cerr << "A global rows = " << m << "\n";
> > cerr << "A global cols = " << n << "\n";
> >
> > MatGetOwnershipRange(B, &m, &n);
> > cerr << "B.m = " << m << "\n";
> > cerr << "B.n = " << n << "\n";
> > MatGetSize(B,&m,&n);
> > cerr << "B global rows = " << m << "\n";
> > cerr << "B global cols = " << n << "\n";
> >
> > MatGetOwnershipRange(*C, &m, &n);
> > cerr << "C.m = " << m << "\n";
> > cerr << "C.n = " << n << "\n";
> >
> > MatGetSize(*C,&m,&n);
> > cerr << "C global rows = " << m << "\n";
> > cerr << "C global cols = " << n << "\n";
> >
> > }
> >
> > A.m = 0
> > A.n = 59
> > A global rows = 59
> > A global cols = 320
> > B.m = 0
> > B.n = 320
> > B global rows = 320
> > B global cols = 320
> > C.m = 0
> > C.n = 59
> > C global rows = 59
> > C global cols = 320
> > A.m = 0
> > A.n = 59
> > A global rows = 59
> > A global cols = 320
> > B.m = 0
> > B.n = 320
> > B global rows = 320
> > B global cols = 59
> > C.m = 10922
> > C.n = -1389327096
> > C global rows = -1389327112
> > C global cols = -1389327112
> >
> >
> > Thanks,
> > Jim
> > --
> > Jim Fonseca, PhD
> > Research Scientist
> > Network for Computational Nanotechnology
> > Purdue University
> > 765-496-6495
> > www.jimfonseca.com
> >
> >
>
--
Jim Fonseca, PhD
Research Scientist
Network for Computational Nanotechnology
Purdue University
765-496-6495
www.jimfonseca.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130116/8f8f9a17/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: make.log
Type: application/octet-stream
Size: 31307 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130116/8f8f9a17/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: error.log
Type: application/octet-stream
Size: 4601 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130116/8f8f9a17/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: configure.log
Type: application/octet-stream
Size: 25674 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130116/8f8f9a17/attachment-0005.obj>
More information about the petsc-users
mailing list