[petsc-dev] Not able to compile with VecViennaCLGetArrayRead/Write
Karl Rupp
rupp at mcs.anl.gov
Mon Jan 20 05:51:14 CST 2014
Hi Mani,
VecViennaCLGetArray* is now provided through include/petscviennacl.h
similar to how it is done for CUSP. Please use either branch 'next' or
'karlrupp/viennacl-getarray' for this to work. Note that it uses the
ViennaCL 1.4.2 release, I'll push updates to 1.5.0 later this week.
Please let me know if there are any problems.
Best regards,
Karli
On 01/20/2014 10:14 AM, Mani Chandra wrote:
> Yes, I did. The code compiles if I include
> petsc/src/vec/vec/impls/seq/seqviennacl/viennaclvecimpl.h
> but I'm not sure if one is supposed to do that.
>
> Thanks,
> Mani
>
>
> On Mon, Jan 20, 2014 at 3:07 AM, Karl Rupp <rupp at mcs.anl.gov
> <mailto:rupp at mcs.anl.gov>> wrote:
>
> Hi Mani,
>
>
> > I can't seem to get petsc to play nice when I have something like
>
>
> Vec X;
> viennacl::vector<PetscScalar> *x;
>
> VecViennaCLGetArrayWrite(X, &x);
> //Launch some opencl kernels
> VecViennaCLRestoreArrayWrite(__X, &x);
>
> I get the following compilation error:
> error: ‘VecSeqViennaCLGetArrayWrite’ was not declared in this scope
> error: ‘__VecSeqViennaCLRestoreArrayWrit__e’ was not declared in
> this scope
>
> I tried adding a header like "#include <petscviennacl.h>" (like
> petsccusp.h) but it didn't work. Is there a fix to this or are those
> functions not supposed to be called from user code?
>
>
> Did you enable ViennaCL in the configure stage through e.g.
> --download-viennacl?
> I also plan to push an update of the bindings to the latest ViennaCL
> release this week.
>
> Best regards,
> Karli
>
>
More information about the petsc-dev
mailing list