Re: [petsc-users] Segmentation violation issue when using MatSetVals in Fortran

2017-02-02 Thread Austin Herrema
Ah. Yes that definitely explains it. Weird that it seemed to work in some cases but I suppose the output would be total garbage. Anyways. Thank you both. Austin On Thu, Feb 2, 2017 at 1:32 PM, Matthew Knepley wrote: > On Thu, Feb 2, 2017 at 1:25 PM, Austin Herrema

Re: [petsc-users] Segmentation violation issue when using MatSetVals in Fortran

2017-02-02 Thread Matthew Knepley
On Thu, Feb 2, 2017 at 1:25 PM, Austin Herrema wrote: > Hello all, > > I'm having a strange issue when using the MatSetVals function in Fortran. > The code is quite large, but relevant snippets of what I'm trying to do are > below. > > ! PETSc variable declaration > Mat

Re: [petsc-users] Segmentation violation issue when using MatSetVals in Fortran

2017-02-02 Thread Stefano Zampini
> On Feb 2, 2017, at 10:25 PM, Austin Herrema wrote: > > Hello all, > > I'm having a strange issue when using the MatSetVals function in Fortran. The > code is quite large, but relevant snippets of what I'm trying to do are below. > > ! PETSc variable declaration >

[petsc-users] Segmentation violation issue when using MatSetVals in Fortran

2017-02-02 Thread Austin Herrema
Hello all, I'm having a strange issue when using the MatSetVals function in Fortran. The code is quite large, but relevant snippets of what I'm trying to do are below. ! PETSc variable declaration Mat LHS PetscErrorCode ier PetscInt idx1(nsd*nsd*nshl*nshl), idx2(nsd*nsd*nshl*nshl)

Re: [petsc-users] ASM with matrix-free method

2017-02-02 Thread Stefano Zampini
> On Feb 2, 2017, at 6:02 PM, Matthew Knepley wrote: > > On Thu, Feb 2, 2017 at 8:55 AM, Sonia Pozzi > wrote: > Dear Barry, > > At the moment I’m dealing with the following problem. > > Suppose I want to solve Sx=b, where

Re: [petsc-users] ASM with matrix-free method

2017-02-02 Thread Matthew Knepley
On Thu, Feb 2, 2017 at 8:55 AM, Sonia Pozzi wrote: > Dear Barry, > > At the moment I’m dealing with the following problem. > > Suppose I want to solve Sx=b, where is a product of matrices. In > particular inside it contains also an inverse of a matrix. > To compute the action

[petsc-users] ASM with matrix-free method

2017-02-02 Thread Sonia Pozzi
Dear Barry, At the moment I’m dealing with the following problem. Suppose I want to solve Sx=b, where is a product of matrices. In particular inside it contains also an inverse of a matrix. To compute the action of S I have created a shell matrix, but know I would like to apply the ASM as

Re: [petsc-users] Usage of VecCreateMPIWithArray in fortran

2017-02-02 Thread Matthew Knepley
On Wed, Feb 1, 2017 at 11:46 PM, Praveen C wrote: > Dear all > I am creating a vector in fortran like this > > PetscReal,allocatable :: res(:,:) > > Vec :: v_res > > allocate( res(nvar,nvl_nvg) ) > > call VecCreateMPIWithArray(PETSC_COMM_WORLD, nvar, nvar*nvl, & > >

[petsc-users] R: Best workflow for different systems with different block sizes

2017-02-02 Thread Paolo Lampitella
Barry, thank you very much. Hopefully, I will soon be able to come back with some real numbers on some real machine, to compare the two approaches. Paolo -Messaggio originale- Da: Barry Smith [mailto:bsm...@mcs.anl.gov] Inviato: mercoledì 1 febbraio 2017 17:53 A: Paolo Lampitella