mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-16 10:52:08 +00:00
psblas3:
initializing the rsb library in the rsb module. initializing a string used uninitialized in ppde.f90.
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
! * should test and fix all the problems that for sure will occur
|
||||
! * duplicate handling is not defined
|
||||
! * the printing function is not complete
|
||||
! * should substitute -1 with another valid PSBLAS error code
|
||||
! * ..
|
||||
!
|
||||
module psb_d_rsb_mat_mod
|
||||
@@ -86,7 +87,7 @@ module psb_d_rsb_mat_mod
|
||||
#ifdef HAVE_LIBRSB
|
||||
contains
|
||||
|
||||
function psv_rsb_mat_init() result(res)
|
||||
function psb_rsb_matmod_init() result(res)
|
||||
implicit none
|
||||
integer :: res
|
||||
!PSBRSB_DEBUG('')
|
||||
@@ -94,13 +95,28 @@ module psb_d_rsb_mat_mod
|
||||
#ifdef HAVE_LIBRSB
|
||||
res=d_rsb_to_psb_info(rsb_init(c_null_ptr))
|
||||
#endif
|
||||
end function psv_rsb_mat_init
|
||||
end function psb_rsb_matmod_init
|
||||
|
||||
function psb_rsb_matmod_exit() result(res)
|
||||
implicit none
|
||||
integer :: res
|
||||
!PSBRSB_DEBUG('')
|
||||
res=-1 ! FIXME
|
||||
#ifdef HAVE_LIBRSB
|
||||
res=d_rsb_to_psb_info(rsb_exit())
|
||||
#endif
|
||||
end function psb_rsb_matmod_exit
|
||||
|
||||
function d_rsb_to_psb_info(info) result(res)
|
||||
implicit none
|
||||
integer :: res,info
|
||||
integer , intent(in) :: info
|
||||
integer :: res
|
||||
!PSBRSB_DEBUG('')
|
||||
res=info
|
||||
if(info.ne.0)then
|
||||
res=-1
|
||||
else
|
||||
res=psb_success_
|
||||
end if
|
||||
end function d_rsb_to_psb_info
|
||||
|
||||
function d_rsb_get_flags(a) result(flags)
|
||||
|
||||
@@ -104,6 +104,12 @@ program ppde
|
||||
|
||||
call psb_init(ictxt)
|
||||
call psb_info(ictxt,iam,np)
|
||||
info=psb_rsb_matmod_init()
|
||||
if(info.ne.psb_success_)then
|
||||
info=psb_err_from_subroutine_
|
||||
ch_err='create_matrix: rsb module initialization failed'
|
||||
call psb_errpush(info,name,a_err=ch_err)
|
||||
endif
|
||||
|
||||
if (iam < 0) then
|
||||
! This should not happen, but just in case
|
||||
@@ -133,6 +139,7 @@ program ppde
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
fname=''! added by martone
|
||||
call a%cscnv(bm,info,type='CSR')
|
||||
write(fname,'(a,i2.2,a,i2.2,a)') 'mat',iam,'-',np,'.mtx'
|
||||
call bm%print(fname,head='%Test sparse gen RSB')
|
||||
@@ -219,6 +226,14 @@ program ppde
|
||||
if(info /= psb_success_) then
|
||||
call psb_error(ictxt)
|
||||
end if
|
||||
|
||||
info=psb_rsb_matmod_exit()
|
||||
if(info.ne.psb_success_)then
|
||||
info=psb_err_from_subroutine_
|
||||
ch_err='create_matrix: rsb module finalization failed'
|
||||
call psb_errpush(info,name,a_err=ch_err)
|
||||
endif
|
||||
|
||||
call psb_exit(ictxt)
|
||||
stop
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
BICGSTAB Iterative method BICGSTAB CGS BICG BICGSTABL RGMRES
|
||||
BJAC Preconditioner NONE DIAG BJAC
|
||||
CSR Storage format for matrix A: CSR COO JAD
|
||||
004 Domain size (acutal system is this**3)
|
||||
040 Domain size (acutal system is this**3)
|
||||
2 Stopping criterion
|
||||
0100 MAXIT
|
||||
-1 ITRACE
|
||||
|
||||
Reference in New Issue
Block a user