indx_map%clone: if output is allocated, deallocate.

new-parstruct
Salvatore Filippone 6 years ago
parent cd0c11e0e7
commit 99be85699d

@ -1038,14 +1038,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_) &
@ -1054,8 +1048,6 @@ contains
& call desc%v_ovrlap_index%clone(desc_out%v_ovrlap_index,info)
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

@ -1144,7 +1144,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

@ -203,7 +203,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

@ -1382,7 +1382,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

@ -663,7 +663,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

@ -770,7 +770,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