Re: [petsc-dev] MatMPIAIJGetLocalMat problem with GPUs

2022-06-24 Thread Barry Smith
> On Jun 24, 2022, at 1:38 PM, Mark Adams wrote: > > I am rearranging the code for clarity from the repo but I have: > > PetscBool is_dev_ptrs; > PetscCall(MatMPIAIJGetLocalMat(Pmat, MAT_INITIAL_MATRIX, &amgx->localA)); > PetscCall(PetscObjectTypeCompareAny((PetscObject)amgx->localA, >

Re: [petsc-dev] MatMPIAIJGetLocalMat problem with GPUs

2022-06-24 Thread Mark Adams
I am rearranging the code for clarity from the repo but I have: PetscBool is_dev_ptrs; PetscCall(MatMPIAIJGetLocalMat(Pmat, MAT_INITIAL_MATRIX, &amgx->localA)); PetscCall(PetscObjectTypeCompareAny((PetscObject)amgx->localA, &is_dev_ptrs, MATAIJCUSPARSE, MATSEQAIJCUSPARSE, MATMPIAIJCUSPARSE,

Re: [petsc-dev] MatMPIAIJGetLocalMat problem with GPUs

2022-06-24 Thread Barry Smith
> On Jun 24, 2022, at 8:58 AM, Mark Adams wrote: > > And before we move to the MR, I think Matt found a clear problem: > > * PetscCall(MatMPIAIJGetLocalMat(Pmat, MAT_REUSE_MATRIX, &amgx->localA)); > returns "localA seqaij" > > * And, oddly, PetscCall(MatSeqAIJGetArrayRead(amgx->localA, &amgx-

Re: [petsc-dev] MatMPIAIJGetLocalMat problem with GPUs

2022-06-24 Thread Mark Adams
And before we move to the MR, I think Matt found a clear problem: * PetscCall(MatMPIAIJGetLocalMat(Pmat, MAT_REUSE_MATRIX, &amgx->localA)); returns "localA seqaij" * And, oddly, PetscCall(MatSeqAIJGetArrayRead(amgx->localA, &amgx->values)); returns: "it seems to detect that the pointer is a devic

Re: [petsc-dev] MatMPIAIJGetLocalMat problem with GPUs

2022-06-24 Thread Mark Adams
I am not seeing this response, I see my "hstack" comment last. https://gitlab.com/petsc/petsc/-/merge_requests/4323 On Thu, Jun 23, 2022 at 4:37 PM Barry Smith wrote: > > I have responded in the MR, which has all the context and the code. > Please move this conversation from petsc-dev to the MR