[petsc-dev] Fix for mataijcusp.cu

Barry Smith bsmith at mcs.anl.gov
Wed Feb 13 08:17:03 CST 2013


   Thanks for noting this. Is the problem the (*right)->map operation in?

ierr = PetscLayoutReference(mat->cmap,&(*right)->map);CHKERRQ(ierr);

   This can be corrected easily by replacing the PetscLayoutReference() here with VecSetLayout(). Does that resolve the problem?

   General note:   We should really move the PetscLayout operations out of Vec mpi impl location.

   Barry

On Feb 13, 2013, at 3:51 AM, "Jose E. Roman" <jroman at dsic.upv.es> wrote:

> mataijcusp.cu does not currently compile (MatGetVecs_MPIAIJCUSP accesses private Vec members).
> Here is a fix. I did not push because maybe you prefer to use VecGetLayout here.
> Jose
> 
> 
> --- a/src/mat/impls/aij/mpi/mpicusp/mpiaijcusp.cu	Tue Feb 12 23:21:30 2013 -0600
> +++ b/src/mat/impls/aij/mpi/mpicusp/mpiaijcusp.cu	Wed Feb 13 10:42:59 2013 +0100
> @@ -3,6 +3,7 @@
> #include <../src/mat/impls/aij/mpi/mpiaij.h>   /*I "petscmat.h" I*/
> PETSC_CUDA_EXTERN_C_END
> #include "mpicuspmatimpl.h"
> +#include <petsc-private/vecimpl.h>
> 
> #undef __FUNCT__
> #define __FUNCT__ "MatMPIAIJSetPreallocation_MPIAIJCUSP"
> 




More information about the petsc-dev mailing list