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. With best regards, Pilhwa