Deallocate output if needed in indxmap%clone.

merge-paraggr
Salvatore Filippone 6 years ago
parent 3bafaa242a
commit 08063d4f48

@ -1029,8 +1029,8 @@ contains
call psb_erractionsave(err_act)
name = 'psb_cdcpy'
if (desc%is_valid()) then
call desc_out%free(info)
if ((info == psb_success_).and.desc%is_valid()) then
ictxt = desc%get_context()
! check on blacs grid
@ -1061,14 +1061,8 @@ contains
& call psb_safe_ab_cpy(desc%lprm,desc_out%lprm,info)
if (info == psb_success_)&
& call psb_safe_ab_cpy(desc%idx_space,desc_out%idx_space,info)
!!$ if ((info == psb_success_).and.(allocated(desc%indxmap))) &
!!$ & call desc%indxmap%clone(desc_out%indxmap,info)
!!$ associate(indxin => desc%indxmap)
!!$ if ((info == psb_success_).and.(allocated(desc%indxmap))) &
!!$ & call indxin%clone(desc_out%indxmap,info)
!!$ end associate
if ((info == psb_success_).and.(allocated(desc%indxmap))) &
& allocate(desc_out%indxmap,source=desc%indxmap,stat=info)
& call desc%indxmap%clone(desc_out%indxmap,info)
if (info == psb_success_) &
& call desc%v_halo_index%clone(desc_out%v_halo_index,info)
if (info == psb_success_) &
@ -1078,9 +1072,6 @@ contains
if (info == psb_success_) &
& call desc%v_ovr_mst_idx%clone(desc_out%v_ovr_mst_idx,info)
else
call desc_out%free(info)
end if
if (info /= psb_success_) then
info = psb_err_from_subroutine_

@ -2076,7 +2076,11 @@ contains
info = psb_success_
call psb_get_erraction(err_act)
if (allocated(outmap)) then
write(0,*) 'Error: should not be allocated on input'
call outmap%free()
deallocate(outmap,stat=info)
end if
if (info /= 0) then
write(0,*) 'Error: could not cleanup output'
info = -87
goto 9999
end if

@ -204,11 +204,16 @@ contains
info = psb_success_
call psb_get_erraction(err_act)
if (allocated(outmap)) then
write(0,*) 'Error: should not be allocated on input'
call outmap%free()
deallocate(outmap,stat=info)
end if
if (info /= 0) then
write(0,*) 'Error: could not cleanup output'
info = -87
goto 9999
end if
allocate(psb_glist_map :: outmap, stat=info)
if (info /= psb_success_) then
info = psb_err_alloc_dealloc_

@ -1446,11 +1446,16 @@ contains
info = psb_success_
call psb_get_erraction(err_act)
if (allocated(outmap)) then
write(0,*) 'Error: should not be allocated on input'
call outmap%free()
deallocate(outmap,stat=info)
end if
if (info /= 0) then
write(0,*) 'Error: could not cleanup output'
info = -87
goto 9999
end if
allocate(psb_hash_map :: outmap, stat=info )
if (info /= psb_success_) then
info = psb_err_alloc_dealloc_

@ -1182,7 +1182,11 @@ contains
info = psb_success_
call psb_get_erraction(err_act)
if (allocated(outmap)) then
write(0,*) 'Error: should not be allocated on input'
call outmap%free()
deallocate(outmap,stat=info)
end if
if (info /= 0) then
write(0,*) 'Error: could not cleanup output'
info = -87
goto 9999
end if

@ -800,7 +800,11 @@ contains
info = psb_success_
call psb_get_erraction(err_act)
if (allocated(outmap)) then
write(0,*) 'Error: should not be allocated on input'
call outmap%free()
deallocate(outmap,stat=info)
end if
if (info /= 0) then
write(0,*) 'Error: could not cleanup output'
info = -87
goto 9999
end if

Loading…
Cancel
Save