[petsc-dev] pointing out raw pointer in CUSPARRAY

Pilhwa Lee leep at cims.nyu.edu
Tue Feb 12 19:06:29 CST 2013


Dear Matt,

Are they device pointers? Do I need to use host pointers? I'd like to write a vector in Silo file format. Thanks.

With best regards,
Pilhwa

On Feb 12, 2013, at 6:54 PM, Matthew Knepley wrote:

> On Tue, Feb 12, 2013 at 7:31 PM, Pilhwa Lee <leep at cims.nyu.edu> wrote:
> Dear folks,
> 
> I try to get PetscScalar array from CUSPARRAY as follows:
> 
> CUSPARRAY *cusparray;
> PetscScalar *abc;
> 
> abc = VecCUSPCastToRawPtr(*cusparray);
> 
> std::cout << abc[0];
> 
> However, there comes a segmentation violation error. Any opinions are welcome. Thanks.
> 
> Aren't these device pointers?
> 
>   Matt
>  
> With best regards,
> Pilhwa
> 
> 
> 
> -- 
> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
> -- Norbert Wiener

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130212/d0d1a17a/attachment.html>


More information about the petsc-dev mailing list