MatCreateMPIAIJWithSplitArrays

Barry Smith bsmith at mcs.anl.gov
Wed Jan 14 08:30:10 CST 2009


    You should be able to use MatCreateMPIAIJWithSplitArrays(),  
MatCreateMPIAIJWithArrays() or MatMPIAIJSetPreallocationCSR()
from Fortran. Are you using PETSc 3.0.0?

    The arguments for MatCreateMPIAIJWithArrays() or  
MatMPIAIJSetPreallocationCSR() have the same meaning
(in fact MatCreateMPIAIJWithArrays() essentially calls  
MatCreateMPIAIJWithArrays()).

    Barry

On Jan 14, 2009, at 7:38 AM, Panyasantisuk Jarunan wrote:

> Oh, I could not use MatCreateMPIAIJWithArrays either but the  
> mechanism below works.
>
>     call MatCreate(PETSC_COMM_WORLD,D,ierr)
>     call MatSetSizes(D,N,N,PETSC_DETERMINE,PETSC_DETERMINE,
>    $     ierr)
>     call MatSetType(D,MATMPIAIJ,ierr) ! to set type a parallel matrix
>     call MatSetFromOptions(D,ierr)
>     call MatMPIAIJSetPreallocationCSR(D,pointer,Column,v,ierr)
>
> Where pointer is start-row indices a
>     Column is local column indices
>     v is value
>
> Is there the different beteween the start-row indices in  
> MatMPIAIJSetPreallocationCSR and row indices in  
> MatCreateMPIAIJWithArrays ?
>
>
>
> Regards,
> Jarunan
>
>
>
>
> Hello,
>
> To define a matrix with arrays, I cannot use  
> MatCreateMPIAIJWithSplitArrays in my program which is written in  
> Fortran:
>
>     call MatCreateMPIAIJWithSplitArrays(PETSC_COMM_WORLD,N,N,
>    $     PETSC_DETERMINE,PETSC_DETERMINE,pointer,column,v,opointer,
>    $     oColumn,ov,D,ierr)
>
> The error is
> F:246: undefined reference to `matcreatempiaijwithsplitarrays_'
>
> I could use MatCreateMPIAIJWithArrays but the off diagonal values  
> are missing with this command.
>
> I would be appreciate for any advice. Thank you before hand.
>
> Regards,
> 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