mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-20 12:52:14 +00:00
Attempt at fixing CSRG in CUDA 10.2. Not complete yet.
This commit is contained in:
@@ -55,7 +55,7 @@ subroutine psb_c_cuda_csrg_to_gpu(a,info,nzrm)
|
||||
if (c_associated(a%deviceMat%Mat)) then
|
||||
info = CSRGDeviceFree(a%deviceMat)
|
||||
end if
|
||||
#if CUDA_SHORT_VERSION <= 10
|
||||
#if (CUDA_SHORT_VERSION <= 10 )
|
||||
if (a%is_unit()) then
|
||||
!
|
||||
! CUSPARSE has the habit of storing the diagonal and then ignoring,
|
||||
@@ -74,7 +74,7 @@ subroutine psb_c_cuda_csrg_to_gpu(a,info,nzrm)
|
||||
!!! We are explicitly adding the diagonal
|
||||
!! info = CSRGDeviceSetMatDiagType(a%deviceMat,cusparse_diag_type_non_unit)
|
||||
if ((info == 0) .and. a%is_triangle()) then
|
||||
info = CSRGDeviceSetMatType(a%deviceMat,cusparse_matrix_type_triangular)
|
||||
!info = CSRGDeviceSetMatType(a%deviceMat,cusparse_matrix_type_triangular)
|
||||
if ((info == 0).and.a%is_upper()) then
|
||||
info = CSRGDeviceSetMatFillMode(a%deviceMat,cusparse_fill_mode_upper)
|
||||
else
|
||||
@@ -114,15 +114,15 @@ subroutine psb_c_cuda_csrg_to_gpu(a,info,nzrm)
|
||||
|
||||
if (info == 0) info = CSRGDeviceAlloc(a%deviceMat,m,n,nz)
|
||||
if (info == 0) info = CSRGDeviceSetMatIndexBase(a%deviceMat,cusparse_index_base_one)
|
||||
if (info == 0) then
|
||||
if (a%is_unit()) then
|
||||
info = CSRGDeviceSetMatDiagType(a%deviceMat,cusparse_diag_type_unit)
|
||||
else
|
||||
info = CSRGDeviceSetMatDiagType(a%deviceMat,cusparse_diag_type_non_unit)
|
||||
end if
|
||||
end if
|
||||
!!$ if (info == 0) then
|
||||
!!$ if (a%is_unit()) then
|
||||
!!$ info = CSRGDeviceSetMatDiagType(a%deviceMat,cusparse_diag_type_unit)
|
||||
!!$ else
|
||||
!!$ info = CSRGDeviceSetMatDiagType(a%deviceMat,cusparse_diag_type_non_unit)
|
||||
!!$ end if
|
||||
!!$ end if
|
||||
if ((info == 0) .and. a%is_triangle()) then
|
||||
info = CSRGDeviceSetMatType(a%deviceMat,cusparse_matrix_type_triangular)
|
||||
!info = CSRGDeviceSetMatType(a%deviceMat,cusparse_matrix_type_triangular)
|
||||
if ((info == 0).and.a%is_upper()) then
|
||||
info = CSRGDeviceSetMatFillMode(a%deviceMat,cusparse_fill_mode_upper)
|
||||
else
|
||||
|
||||
@@ -55,7 +55,7 @@ subroutine psb_d_cuda_csrg_to_gpu(a,info,nzrm)
|
||||
if (c_associated(a%deviceMat%Mat)) then
|
||||
info = CSRGDeviceFree(a%deviceMat)
|
||||
end if
|
||||
#if CUDA_SHORT_VERSION <= 10
|
||||
#if (CUDA_SHORT_VERSION <= 10 )
|
||||
if (a%is_unit()) then
|
||||
!
|
||||
! CUSPARSE has the habit of storing the diagonal and then ignoring,
|
||||
@@ -74,7 +74,7 @@ subroutine psb_d_cuda_csrg_to_gpu(a,info,nzrm)
|
||||
!!! We are explicitly adding the diagonal
|
||||
!! info = CSRGDeviceSetMatDiagType(a%deviceMat,cusparse_diag_type_non_unit)
|
||||
if ((info == 0) .and. a%is_triangle()) then
|
||||
info = CSRGDeviceSetMatType(a%deviceMat,cusparse_matrix_type_triangular)
|
||||
!info = CSRGDeviceSetMatType(a%deviceMat,cusparse_matrix_type_triangular)
|
||||
if ((info == 0).and.a%is_upper()) then
|
||||
info = CSRGDeviceSetMatFillMode(a%deviceMat,cusparse_fill_mode_upper)
|
||||
else
|
||||
@@ -114,15 +114,15 @@ subroutine psb_d_cuda_csrg_to_gpu(a,info,nzrm)
|
||||
|
||||
if (info == 0) info = CSRGDeviceAlloc(a%deviceMat,m,n,nz)
|
||||
if (info == 0) info = CSRGDeviceSetMatIndexBase(a%deviceMat,cusparse_index_base_one)
|
||||
if (info == 0) then
|
||||
if (a%is_unit()) then
|
||||
info = CSRGDeviceSetMatDiagType(a%deviceMat,cusparse_diag_type_unit)
|
||||
else
|
||||
info = CSRGDeviceSetMatDiagType(a%deviceMat,cusparse_diag_type_non_unit)
|
||||
end if
|
||||
end if
|
||||
!!$ if (info == 0) then
|
||||
!!$ if (a%is_unit()) then
|
||||
!!$ info = CSRGDeviceSetMatDiagType(a%deviceMat,cusparse_diag_type_unit)
|
||||
!!$ else
|
||||
!!$ info = CSRGDeviceSetMatDiagType(a%deviceMat,cusparse_diag_type_non_unit)
|
||||
!!$ end if
|
||||
!!$ end if
|
||||
if ((info == 0) .and. a%is_triangle()) then
|
||||
info = CSRGDeviceSetMatType(a%deviceMat,cusparse_matrix_type_triangular)
|
||||
!info = CSRGDeviceSetMatType(a%deviceMat,cusparse_matrix_type_triangular)
|
||||
if ((info == 0).and.a%is_upper()) then
|
||||
info = CSRGDeviceSetMatFillMode(a%deviceMat,cusparse_fill_mode_upper)
|
||||
else
|
||||
|
||||
@@ -55,7 +55,7 @@ subroutine psb_s_cuda_csrg_to_gpu(a,info,nzrm)
|
||||
if (c_associated(a%deviceMat%Mat)) then
|
||||
info = CSRGDeviceFree(a%deviceMat)
|
||||
end if
|
||||
#if CUDA_SHORT_VERSION <= 10
|
||||
#if (CUDA_SHORT_VERSION <= 10 )
|
||||
if (a%is_unit()) then
|
||||
!
|
||||
! CUSPARSE has the habit of storing the diagonal and then ignoring,
|
||||
@@ -74,7 +74,7 @@ subroutine psb_s_cuda_csrg_to_gpu(a,info,nzrm)
|
||||
!!! We are explicitly adding the diagonal
|
||||
!! info = CSRGDeviceSetMatDiagType(a%deviceMat,cusparse_diag_type_non_unit)
|
||||
if ((info == 0) .and. a%is_triangle()) then
|
||||
info = CSRGDeviceSetMatType(a%deviceMat,cusparse_matrix_type_triangular)
|
||||
!info = CSRGDeviceSetMatType(a%deviceMat,cusparse_matrix_type_triangular)
|
||||
if ((info == 0).and.a%is_upper()) then
|
||||
info = CSRGDeviceSetMatFillMode(a%deviceMat,cusparse_fill_mode_upper)
|
||||
else
|
||||
@@ -114,15 +114,15 @@ subroutine psb_s_cuda_csrg_to_gpu(a,info,nzrm)
|
||||
|
||||
if (info == 0) info = CSRGDeviceAlloc(a%deviceMat,m,n,nz)
|
||||
if (info == 0) info = CSRGDeviceSetMatIndexBase(a%deviceMat,cusparse_index_base_one)
|
||||
if (info == 0) then
|
||||
if (a%is_unit()) then
|
||||
info = CSRGDeviceSetMatDiagType(a%deviceMat,cusparse_diag_type_unit)
|
||||
else
|
||||
info = CSRGDeviceSetMatDiagType(a%deviceMat,cusparse_diag_type_non_unit)
|
||||
end if
|
||||
end if
|
||||
!!$ if (info == 0) then
|
||||
!!$ if (a%is_unit()) then
|
||||
!!$ info = CSRGDeviceSetMatDiagType(a%deviceMat,cusparse_diag_type_unit)
|
||||
!!$ else
|
||||
!!$ info = CSRGDeviceSetMatDiagType(a%deviceMat,cusparse_diag_type_non_unit)
|
||||
!!$ end if
|
||||
!!$ end if
|
||||
if ((info == 0) .and. a%is_triangle()) then
|
||||
info = CSRGDeviceSetMatType(a%deviceMat,cusparse_matrix_type_triangular)
|
||||
!info = CSRGDeviceSetMatType(a%deviceMat,cusparse_matrix_type_triangular)
|
||||
if ((info == 0).and.a%is_upper()) then
|
||||
info = CSRGDeviceSetMatFillMode(a%deviceMat,cusparse_fill_mode_upper)
|
||||
else
|
||||
|
||||
@@ -55,7 +55,7 @@ subroutine psb_z_cuda_csrg_to_gpu(a,info,nzrm)
|
||||
if (c_associated(a%deviceMat%Mat)) then
|
||||
info = CSRGDeviceFree(a%deviceMat)
|
||||
end if
|
||||
#if CUDA_SHORT_VERSION <= 10
|
||||
#if (CUDA_SHORT_VERSION <= 10 )
|
||||
if (a%is_unit()) then
|
||||
!
|
||||
! CUSPARSE has the habit of storing the diagonal and then ignoring,
|
||||
@@ -74,7 +74,7 @@ subroutine psb_z_cuda_csrg_to_gpu(a,info,nzrm)
|
||||
!!! We are explicitly adding the diagonal
|
||||
!! info = CSRGDeviceSetMatDiagType(a%deviceMat,cusparse_diag_type_non_unit)
|
||||
if ((info == 0) .and. a%is_triangle()) then
|
||||
info = CSRGDeviceSetMatType(a%deviceMat,cusparse_matrix_type_triangular)
|
||||
!info = CSRGDeviceSetMatType(a%deviceMat,cusparse_matrix_type_triangular)
|
||||
if ((info == 0).and.a%is_upper()) then
|
||||
info = CSRGDeviceSetMatFillMode(a%deviceMat,cusparse_fill_mode_upper)
|
||||
else
|
||||
@@ -114,15 +114,15 @@ subroutine psb_z_cuda_csrg_to_gpu(a,info,nzrm)
|
||||
|
||||
if (info == 0) info = CSRGDeviceAlloc(a%deviceMat,m,n,nz)
|
||||
if (info == 0) info = CSRGDeviceSetMatIndexBase(a%deviceMat,cusparse_index_base_one)
|
||||
if (info == 0) then
|
||||
if (a%is_unit()) then
|
||||
info = CSRGDeviceSetMatDiagType(a%deviceMat,cusparse_diag_type_unit)
|
||||
else
|
||||
info = CSRGDeviceSetMatDiagType(a%deviceMat,cusparse_diag_type_non_unit)
|
||||
end if
|
||||
end if
|
||||
!!$ if (info == 0) then
|
||||
!!$ if (a%is_unit()) then
|
||||
!!$ info = CSRGDeviceSetMatDiagType(a%deviceMat,cusparse_diag_type_unit)
|
||||
!!$ else
|
||||
!!$ info = CSRGDeviceSetMatDiagType(a%deviceMat,cusparse_diag_type_non_unit)
|
||||
!!$ end if
|
||||
!!$ end if
|
||||
if ((info == 0) .and. a%is_triangle()) then
|
||||
info = CSRGDeviceSetMatType(a%deviceMat,cusparse_matrix_type_triangular)
|
||||
!info = CSRGDeviceSetMatType(a%deviceMat,cusparse_matrix_type_triangular)
|
||||
if ((info == 0).and.a%is_upper()) then
|
||||
info = CSRGDeviceSetMatFillMode(a%deviceMat,cusparse_fill_mode_upper)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user