[petsc-users] error while allocating dense distributed matrix

Barry Smith bsmith at mcs.anl.gov
Thu Jun 6 18:30:36 CDT 2013


  The first "num_cols" argument refers to the number of "local" columns on that process the second one the total number of columns. With size > 1 they cannot be equal. The sum of all the "local" columns across all processes must equal the total number of columns.

This is not explained well in the MatCreateDense manual page, sorry. Look at the manual page http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatCreateAIJ.html and see the definition of m and n which explains it much better. The "local" row and column sizes are define by the "left" and "right" parallel vector layouts for vectors compatible with the matrix.

   Barry

On Jun 6, 2013, at 4:55 PM, Michael Povolotskyi <mpovolot at purdue.edu> wrote:

> Dear Petsc developers,
> petsc gives error with the error code equal to 60 when I'm doing the following:
> 
> ierr = MatCreateMPIDense(comm, m, num_cols ,num_rows,num_cols,data,petsc_matrix)
> 
> on rank = 0 the gebugger gives:
> (gdb) print m
> $1 = 240
> (gdb) print num_cols
> $2 = 18
> (gdb) print num_rows
> $3 = 360
> 
> on rank = 1 the gebugger gives:
> ierr = MatCreateMPIDense(comm, m, num_cols ,num_rows,num_cols,data,petsc_matrix);
> (gdb) print m
> $1 = 120
> (gdb) print num_cols
> $2 = 18
> (gdb) print num_rows
> $3 = 360
> (gdb)
> 
> Could you, please, tell me what is wrong here?
> Thank you,
> Michael.



More information about the petsc-users mailing list