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) & call psb_safe_ab_cpy(desc%lprm,desc_out%lprm,info)
if (info == psb_success_)& if (info == psb_success_)&
& call psb_safe_ab_cpy(desc%idx_space,desc_out%idx_space,info) & 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))) & 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_) & if (info == psb_success_) &
& call desc%v_halo_index%clone(desc_out%v_halo_index,info) & call desc%v_halo_index%clone(desc_out%v_halo_index,info)
if (info == psb_success_) & if (info == psb_success_) &
@ -1054,8 +1048,6 @@ contains
& call desc%v_ovrlap_index%clone(desc_out%v_ovrlap_index,info) & call desc%v_ovrlap_index%clone(desc_out%v_ovrlap_index,info)
if (info == psb_success_) & if (info == psb_success_) &
& call desc%v_ovr_mst_idx%clone(desc_out%v_ovr_mst_idx,info) & call desc%v_ovr_mst_idx%clone(desc_out%v_ovr_mst_idx,info)
else else
call desc_out%free(info) call desc_out%free(info)
end if end if

@ -1143,8 +1143,12 @@ contains
info = psb_success_ info = psb_success_
call psb_get_erraction(err_act) call psb_get_erraction(err_act)
if (allocated(outmap)) then 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 info = -87
goto 9999 goto 9999
end if end if

@ -202,8 +202,12 @@ contains
info = psb_success_ info = psb_success_
call psb_get_erraction(err_act) call psb_get_erraction(err_act)
if (allocated(outmap)) then 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 info = -87
goto 9999 goto 9999
end if end if

@ -1381,8 +1381,12 @@ contains
info = psb_success_ info = psb_success_
call psb_get_erraction(err_act) call psb_get_erraction(err_act)
if (allocated(outmap)) then 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 info = -87
goto 9999 goto 9999
end if end if

@ -662,8 +662,12 @@ contains
info = psb_success_ info = psb_success_
call psb_get_erraction(err_act) call psb_get_erraction(err_act)
if (allocated(outmap)) then 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 info = -87
goto 9999 goto 9999
end if end if

@ -769,8 +769,12 @@ contains
info = psb_success_ info = psb_success_
call psb_get_erraction(err_act) call psb_get_erraction(err_act)
if (allocated(outmap)) then 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 info = -87
goto 9999 goto 9999
end if end if

Loading…
Cancel
Save