MatCreateMPIAIJWithSplitArrays()

Barry Smith bsmith at mcs.anl.gov
Thu Jan 29 19:09:47 CST 2009


On Jan 29, 2009, at 9:39 AM, Panyasantisuk Jarunan wrote:

> Hi,
>
> Is anybody using MatCreateMPIAIJWithSplitArrays()?
> I got the error below, eventhough, the matrix is built but not  
> completed.
>
> [0]PETSC ERROR: --------------- Error Message ---------------
> [0]PETSC ERROR: Argument out of range!
> [0]PETSC ERROR: Column entry number 1 (actual colum 0) in row 1 is  
> not sorted!
>
> I think there is a problem with column indices but I thought that it
> has been sorted, please see below.
>
> I am using this command
>
>    call MatCreateMPIAIJWithSplitArrays(PETSC_COMM_WORLD,2,2,
>    $     PETSC_DETERMINE,PETSC_DETERMINE,pointer,column,v,opointer,
>    $     ocolumn,ov,D,ierr)
>
> for processor 0:
> pointer = [0 2 4]  ! row pointer into column             column = [0 1
> 0 1]  ! local column index
> v = [5.49 -2.74 -2.74 5.49] ! diagonal value
>
> off-diagonal processor 0: opointer = [0 1 3] ocolumn = [2 3]
> ov = [-2.74 -2.74]
>

     This is wrong. The first row has one entry (1-0) but the second  
row has two entries (3-1) for a total
of three entries. Yet it has only 2 column pointers and two numerical  
values.

    Barry

> The matrix:
> row 0: (0, 5.49395)  (1, -2.74697)  (2, -2.74697)
> row 1: (0, 0)  (1, 5.49395)  (3, -2.74697)
>
> I am using fortran with petsc-3.0.0.
>
>
> Thank you,
> Jarunan
>
>
>
> --
> Jarunan PANYASANTISUK
> MSc. in Computational Mechanics
> Erasmus Mundus Master Program
> Ecole Centrale de Nantes
> 1, rue de la noë, 44321 NANTES, FRANCE
>
>
>
>
>
>



More information about the petsc-users mailing list