|
|
|
@ -247,14 +247,14 @@ int gpuInit(int dev)
|
|
|
|
void gpuClose()
|
|
|
|
void gpuClose()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
cudaStream_t st1, st2;
|
|
|
|
cudaStream_t st1, st2;
|
|
|
|
if (! psb_cuda_handle)
|
|
|
|
if ((! psb_cuda_handle)&&(! psb_cublas_handle)) {
|
|
|
|
st1=spgpuGetStream(psb_cuda_handle);
|
|
|
|
st1=spgpuGetStream(psb_cuda_handle);
|
|
|
|
if (! psb_cublas_handle)
|
|
|
|
|
|
|
|
cublasGetStream(psb_cublas_handle,&st2);
|
|
|
|
cublasGetStream(psb_cublas_handle,&st2);
|
|
|
|
|
|
|
|
if (st1 != st2)
|
|
|
|
|
|
|
|
psb_cudaDestroyCublasHandle();
|
|
|
|
|
|
|
|
}
|
|
|
|
FcusparseDestroy();
|
|
|
|
FcusparseDestroy();
|
|
|
|
psb_cudaDestroyHandle();
|
|
|
|
psb_cudaDestroyHandle();
|
|
|
|
if (st1 != st2)
|
|
|
|
|
|
|
|
psb_cudaDestroyCublasHandle();
|
|
|
|
|
|
|
|
free(prop);
|
|
|
|
free(prop);
|
|
|
|
prop=NULL;
|
|
|
|
prop=NULL;
|
|
|
|
hasUVA=-1;
|
|
|
|
hasUVA=-1;
|
|
|
|
|