@ -995,7 +995,11 @@ subroutine psb_d_cscnv(a,b,info,type,mold,upd,dupl)
if ( present ( mold ) ) then
if ( present ( mold ) ) then
# if defined ( HAVE_MOLD )
allocate ( altmp , mold = mold , stat = info )
# else
allocate ( altmp , source = mold , stat = info )
allocate ( altmp , source = mold , stat = info )
# endif
else if ( present ( type ) ) then
else if ( present ( type ) ) then
@ -1091,7 +1095,11 @@ subroutine psb_d_cscnv_ip(a,info,type,mold,dupl)
if ( present ( mold ) ) then
if ( present ( mold ) ) then
# if defined ( HAVE_MOLD )
allocate ( altmp , mold = mold , stat = info )
# else
allocate ( altmp , source = mold , stat = info )
allocate ( altmp , source = mold , stat = info )
# endif
else if ( present ( type ) ) then
else if ( present ( type ) ) then
@ -1119,13 +1127,8 @@ subroutine psb_d_cscnv_ip(a,info,type,mold,dupl)
if ( debug ) write ( psb_err_unit , * ) 'Converting in-place from ' , &
if ( debug ) write ( psb_err_unit , * ) 'Converting in-place from ' , &
& a % get_fmt ( ) , ' to ' , altmp % get_fmt ( )
& a % get_fmt ( ) , ' to ' , altmp % get_fmt ( )
! ! $ select type ( aa = > altmp )
! ! $ type is ( psb_d_csr_sparse_mat )
call altmp % mv_from_fmt ( a % a , info )
! ! $ write ( psb_err_unit , * ) 'From ALTMP allocation: aa%irp ' , allocated ( aa % irp ) , &
! ! $ & ' aa%ja ' , allocated ( aa % ja ) , &
! ! $ & ' aa%val ' , allocated ( aa % val )
! ! $ end select
call altmp % cp_from_fmt ( a % a , info )
if ( info / = psb_success_ ) then
if ( info / = psb_success_ ) then
info = psb_err_from_subroutine_
info = psb_err_from_subroutine_
@ -1339,8 +1342,13 @@ subroutine psb_d_mv_from(a,b)
class ( psb_d_base_sparse_mat ) , intent ( inout ) :: b
class ( psb_d_base_sparse_mat ) , intent ( inout ) :: b
integer :: info
integer :: info
# if defined ( HAVE_MOLD )
allocate ( a % a , mold = b , stat = info )
# else
allocate ( a % a , source = b , stat = info )
allocate ( a % a , source = b , stat = info )
# endif
call a % a % mv_from_fmt ( b , info )
call a % a % mv_from_fmt ( b , info )
call b % free ( )
return
return
end subroutine psb_d_mv_from
end subroutine psb_d_mv_from
@ -1360,7 +1368,11 @@ subroutine psb_d_cp_from(a,b)
call psb_erractionsave ( err_act )
call psb_erractionsave ( err_act )
info = psb_success_
info = psb_success_
# if defined ( HAVE_MOLD )
allocate ( a % a , mold = b , stat = info )
# else
allocate ( a % a , source = b , stat = info )
allocate ( a % a , source = b , stat = info )
# endif
if ( info / = psb_success_ ) info = psb_err_alloc_dealloc_
if ( info / = psb_success_ ) info = psb_err_alloc_dealloc_
if ( info == psb_success_ ) call a % a % cp_from_fmt ( b , info )
if ( info == psb_success_ ) call a % a % cp_from_fmt ( b , info )
if ( info / = psb_success_ ) go to 9999
if ( info / = psb_success_ ) go to 9999
@ -1445,7 +1457,11 @@ subroutine psb_d_sparse_mat_clone(a,b,info)
call psb_erractionsave ( err_act )
call psb_erractionsave ( err_act )
info = psb_success_
info = psb_success_
# if defined ( HAVE_MOLD )
allocate ( b % a , mold = a % a , stat = info )
# else
allocate ( b % a , source = a % a , stat = info )
allocate ( b % a , source = a % a , stat = info )
# endif
if ( info / = psb_success_ ) info = psb_err_alloc_dealloc_
if ( info / = psb_success_ ) info = psb_err_alloc_dealloc_
if ( info == psb_success_ ) call b % a % cp_from_fmt ( a % a , info )
if ( info == psb_success_ ) call b % a % cp_from_fmt ( a % a , info )
if ( info / = psb_success_ ) go to 9999
if ( info / = psb_success_ ) go to 9999
@ -1521,7 +1537,11 @@ subroutine psb_d_transp_2mat(a,b)
go to 9999
go to 9999
endif
endif
# if defined ( HAVE_MOLD )
allocate ( a % a , mold = b % a , stat = info )
# else
allocate ( a % a , source = b % a , stat = info )
allocate ( a % a , source = b % a , stat = info )
# endif
if ( info / = psb_success_ ) then
if ( info / = psb_success_ ) then
info = psb_err_alloc_dealloc_
info = psb_err_alloc_dealloc_
go to 9999
go to 9999
@ -1598,7 +1618,11 @@ subroutine psb_d_transc_2mat(a,b)
go to 9999
go to 9999
endif
endif
# if defined ( HAVE_MOLD )
allocate ( a % a , mold = b % a , stat = info )
# else
allocate ( a % a , source = b % a , stat = info )
allocate ( a % a , source = b % a , stat = info )
# endif
if ( info / = psb_success_ ) then
if ( info / = psb_success_ ) then
info = psb_err_alloc_dealloc_
info = psb_err_alloc_dealloc_
go to 9999
go to 9999