[petsc-users] PetscFEIntegrateResidual_OpenCL w/ viennacl

Karl Rupp rupp at iue.tuwien.ac.at
Mon Oct 13 14:16:37 CDT 2014


Hi David,

 > when using the snes/ex12 example
> https://bitbucket.org/petsc/petsc/src/f5476a2b443e0eedb22d31cb1b2d85b9b918f73f/src/snes/examples/tutorials/ex12.c?at=master
> with
>
> -variable_coefficient field  -petscfe_type opencl -mat_petscfe_type opencl
>
> and
>
> -dm_vec_type  viennacl -dm_mat_type seqaijviennacl -mat_type seqaijviennacl
>
> will PetscFEIntegrateResidual_OpenCL transfer the residual vector
> directly to the
> viennacl datastructures on the GPU for the solve ?


No, unfortunately this doesn't work yet. The residual implementation is 
'matrix free', so there is no matrix set up and *mat_type without 
effect. Setting
  -dm_vec_type viennacl
will be supported in the future, but currently the OpenCL buffer is only 
set up to compute the residual.


> is the output residual of PetscFEIntegrateResidual_OpenCL a vector on
> the CPU ?

yes, it is read back to elemVec[], which is passed to 
PetscFEIntegrateResidual_OpenCL()

Best regards,
Karli



More information about the petsc-users mailing list