Re: [petsc-users] MatSetValues error with ViennaCL types

2018-08-15 Thread Dave May
On Thu, 16 Aug 2018 at 04:44, Manuel Valera wrote: > Thanks Matthew and Barry, > > Now my code looks like: > > call DMSetMatrixPreallocateOnly(daDummy,PETSC_TRUE,ierr) > > call DMSetMatType(daDummy,MATMPIAIJVIENNACL,ierr) >> call DMSetVecType(daDummy,VECMPIVIENNACL,ierr) >> > call DMCreateMatrix(

Re: [petsc-users] MatSetValues error with ViennaCL types

2018-08-15 Thread Manuel Valera
Thanks Matthew and Barry, Now my code looks like: call DMSetMatrixPreallocateOnly(daDummy,PETSC_TRUE,ierr) call DMSetMatType(daDummy,MATMPIAIJVIENNACL,ierr) > call DMSetVecType(daDummy,VECMPIVIENNACL,ierr) > call DMCreateMatrix(daDummy,A,ierr) > call MatSetFromOptions(A,ierr) call MatSetUp(A,ie

Re: [petsc-users] FIELDSPLIT fields

2018-08-15 Thread Griffith, Boyce Eugene
> On Aug 15, 2018, at 10:07 PM, Smith, Barry F. wrote: > > > Yes you can have "overlapping fields" with FIELDSPLIT but I don't think you > can use FIELDSPLIT for your case. You seem to have a geometric decomposition > into regions. ASM and GASM are intended for such decompositions. Fieldsp

Re: [petsc-users] FIELDSPLIT fields

2018-08-15 Thread Smith, Barry F.
Yes you can have "overlapping fields" with FIELDSPLIT but I don't think you can use FIELDSPLIT for your case. You seem to have a geometric decomposition into regions. ASM and GASM are intended for such decompositions. Fieldsplit is for multiple fields that each live across the entire domain.

Re: [petsc-users] MatSetValues error with ViennaCL types

2018-08-15 Thread Smith, Barry F.
Should be call DMSetMatType(daDummy,MATMPIAIJVIENNACL,ierr) call DMSetVecType(daDummy,VECMPIVIENNACL,ierr) call DMCreateMatrix(daDummy,A,ierr) and remove the rest. You need to set the type of Mat you want the DM to return BEFORE you create the matrix. Barry > On Aug 15, 2018, at 4:45

Re: [petsc-users] FIELDSPLIT fields

2018-08-15 Thread Griffith, Boyce Eugene
On Aug 15, 2018, at 9:17 PM, Matthew Knepley mailto:knep...@gmail.com>> wrote: On Wed, Aug 15, 2018 at 8:42 PM Griffith, Boyce Eugene mailto:boy...@email.unc.edu>> wrote: Is it permissible to have overlapping fields in FIELDSPLIT? We are specifically thinking about how to handle DOFs living o

Re: [petsc-users] FIELDSPLIT fields

2018-08-15 Thread Matthew Knepley
On Wed, Aug 15, 2018 at 8:42 PM Griffith, Boyce Eugene wrote: > Is it permissible to have overlapping fields in FIELDSPLIT? We are > specifically thinking about how to handle DOFs living on the interface > between two regions. > There is only 1 IS, so no way to do RASM, or any other thing on the

[petsc-users] FIELDSPLIT fields

2018-08-15 Thread Griffith, Boyce Eugene
Is it permissible to have overlapping fields in FIELDSPLIT? We are specifically thinking about how to handle DOFs living on the interface between two regions. Thanks! — Boyce

Re: [petsc-users] MatSetValues error with ViennaCL types

2018-08-15 Thread Matthew Knepley
On Wed, Aug 15, 2018 at 5:45 PM Manuel Valera wrote: > Ok thanks for clarifying that, i wasn't sure if there were different types, > > Here is a stripped down version of my code, it seems like the > preallocation is working now since the matrix population part is working > without problem, but he

Re: [petsc-users] MatSetValues error with ViennaCL types

2018-08-15 Thread Manuel Valera
Ok thanks for clarifying that, i wasn't sure if there were different types, Here is a stripped down version of my code, it seems like the preallocation is working now since the matrix population part is working without problem, but here it is for illustration purposes: call DMSetMatrixPreallocate

Re: [petsc-users] MatSetValues error with ViennaCL types

2018-08-15 Thread Matthew Knepley
On Wed, Aug 15, 2018 at 5:20 PM Manuel Valera wrote: > It seems to be resumed on: I do not know how to preallocate a DM Matrix > correctly. > There is only one matrix type, Mat. There are no separate DM matrices. A DM can create a matrix for you using DMCreateMatrix(), but that is a Mat and it i

Re: [petsc-users] MatSetValues error with ViennaCL types

2018-08-15 Thread Manuel Valera
It seems to be resumed on: I do not know how to preallocate a DM Matrix correctly. The interesting part is that it only breaks when i need to populate a GPU matrix from MPI, so kudos on that, but it seems i need to do better on my code to get this setup working, Any help would be appreciated, Th

Re: [petsc-users] MatSetValues error with ViennaCL types

2018-08-15 Thread Matthew Knepley
On Wed, Aug 15, 2018 at 4:53 PM Manuel Valera wrote: > Thanks Matthew, > > I try to do that when calling: > > call MatMPIAIJSetPreallocation(A,19,PETSC_NULL_INTEGER,19, > PETSC_NULL_INTEGER,ierr) > > But i am not aware on how to do this for the DM if it needs something more > specific/different,

Re: [petsc-users] MatSetValues error with ViennaCL types

2018-08-15 Thread Manuel Valera
Ok, I removed the MatSetType call and added DMSetMatrixPreallocateOnly before creating the matrix and this worked out the error, but the same situation persist, when i try to run with more than one processor it says: [0]PETSC ERROR: - Error Message

Re: [petsc-users] MatSetValues error with ViennaCL types

2018-08-15 Thread Manuel Valera
Thanks Matthew, I try to do that when calling: call MatMPIAIJSetPreallocation(A,19,PETSC_NULL_INTEGER,19, PETSC_NULL_INTEGER,ierr) But i am not aware on how to do this for the DM if it needs something more specific/different, Thanks, On Wed, Aug 15, 2018 at 1:51 PM, Matthew Knepley wrote: >

Re: [petsc-users] MatSetValues error with ViennaCL types

2018-08-15 Thread Matthew Knepley
On Wed, Aug 15, 2018 at 4:39 PM Manuel Valera wrote: > Hello PETSc devs, > > I am running into an error when trying to use the MATMPIAIJVIENNACL Matrix > type in MPI calls, the same code runs for MATSEQAIJVIENNACL type in one > processor. The error happens when calling MatSetValues for this speci

[petsc-users] MatSetValues error with ViennaCL types

2018-08-15 Thread Manuel Valera
Hello PETSc devs, I am running into an error when trying to use the MATMPIAIJVIENNACL Matrix type in MPI calls, the same code runs for MATSEQAIJVIENNACL type in one processor. The error happens when calling MatSetValues for this specific configuration. It does not occur when using MPI DMMatrix typ