Make sure not to call a%a%get_nrows() when not guaranteed

repack-ovrlp
sfilippone 9 months ago
parent 84cbca96da
commit 106b92687b

@ -2797,7 +2797,7 @@ function psb_c_rowsum(a,info) result(d)
call psb_errpush(info,name)
goto 9999
endif
allocate(d(max(1,a%a%get_nrows())), stat=info)
allocate(d(max(1,a%get_nrows())), stat=info)
if (info /= psb_success_) goto 9999
if (allocated(a%a)) then
call a%a%rowsum(d)
@ -2840,7 +2840,7 @@ function psb_c_arwsum(a,info) result(d)
call psb_errpush(info,name)
goto 9999
endif
allocate(d(max(1,a%a%get_nrows())), stat=info)
allocate(d(max(1,a%get_nrows())), stat=info)
if (info /= psb_success_) goto 9999
if (allocated(a%a)) then
@ -2884,7 +2884,7 @@ function psb_c_colsum(a,info) result(d)
call psb_errpush(info,name)
goto 9999
endif
allocate(d(max(1,a%a%get_ncols())), stat=info)
allocate(d(max(1,a%get_ncols())), stat=info)
if (info /= psb_success_) goto 9999
if (allocated(a%a)) then
@ -2928,7 +2928,7 @@ function psb_c_aclsum(a,info) result(d)
call psb_errpush(info,name)
goto 9999
endif
allocate(d(max(1,a%a%get_ncols())), stat=info)
allocate(d(max(1,a%get_ncols())), stat=info)
if (info /= psb_success_) goto 9999
if (allocated(a%a)) then
@ -2973,7 +2973,7 @@ function psb_c_get_diag(a,info) result(d)
call psb_errpush(info,name)
goto 9999
endif
allocate(d(max(1,min(a%a%get_nrows(),a%a%get_ncols()))), stat=info)
allocate(d(max(1,min(a%get_nrows(),a%get_ncols()))), stat=info)
if (info /= 0) then
info = psb_err_alloc_dealloc_
call psb_errpush(info,name)

@ -2797,7 +2797,7 @@ function psb_d_rowsum(a,info) result(d)
call psb_errpush(info,name)
goto 9999
endif
allocate(d(max(1,a%a%get_nrows())), stat=info)
allocate(d(max(1,a%get_nrows())), stat=info)
if (info /= psb_success_) goto 9999
if (allocated(a%a)) then
call a%a%rowsum(d)
@ -2840,7 +2840,7 @@ function psb_d_arwsum(a,info) result(d)
call psb_errpush(info,name)
goto 9999
endif
allocate(d(max(1,a%a%get_nrows())), stat=info)
allocate(d(max(1,a%get_nrows())), stat=info)
if (info /= psb_success_) goto 9999
if (allocated(a%a)) then
@ -2884,7 +2884,7 @@ function psb_d_colsum(a,info) result(d)
call psb_errpush(info,name)
goto 9999
endif
allocate(d(max(1,a%a%get_ncols())), stat=info)
allocate(d(max(1,a%get_ncols())), stat=info)
if (info /= psb_success_) goto 9999
if (allocated(a%a)) then
@ -2928,7 +2928,7 @@ function psb_d_aclsum(a,info) result(d)
call psb_errpush(info,name)
goto 9999
endif
allocate(d(max(1,a%a%get_ncols())), stat=info)
allocate(d(max(1,a%get_ncols())), stat=info)
if (info /= psb_success_) goto 9999
if (allocated(a%a)) then
@ -2973,7 +2973,7 @@ function psb_d_get_diag(a,info) result(d)
call psb_errpush(info,name)
goto 9999
endif
allocate(d(max(1,min(a%a%get_nrows(),a%a%get_ncols()))), stat=info)
allocate(d(max(1,min(a%get_nrows(),a%get_ncols()))), stat=info)
if (info /= 0) then
info = psb_err_alloc_dealloc_
call psb_errpush(info,name)

@ -2797,7 +2797,7 @@ function psb_s_rowsum(a,info) result(d)
call psb_errpush(info,name)
goto 9999
endif
allocate(d(max(1,a%a%get_nrows())), stat=info)
allocate(d(max(1,a%get_nrows())), stat=info)
if (info /= psb_success_) goto 9999
if (allocated(a%a)) then
call a%a%rowsum(d)
@ -2840,7 +2840,7 @@ function psb_s_arwsum(a,info) result(d)
call psb_errpush(info,name)
goto 9999
endif
allocate(d(max(1,a%a%get_nrows())), stat=info)
allocate(d(max(1,a%get_nrows())), stat=info)
if (info /= psb_success_) goto 9999
if (allocated(a%a)) then
@ -2884,7 +2884,7 @@ function psb_s_colsum(a,info) result(d)
call psb_errpush(info,name)
goto 9999
endif
allocate(d(max(1,a%a%get_ncols())), stat=info)
allocate(d(max(1,a%get_ncols())), stat=info)
if (info /= psb_success_) goto 9999
if (allocated(a%a)) then
@ -2928,7 +2928,7 @@ function psb_s_aclsum(a,info) result(d)
call psb_errpush(info,name)
goto 9999
endif
allocate(d(max(1,a%a%get_ncols())), stat=info)
allocate(d(max(1,a%get_ncols())), stat=info)
if (info /= psb_success_) goto 9999
if (allocated(a%a)) then
@ -2973,7 +2973,7 @@ function psb_s_get_diag(a,info) result(d)
call psb_errpush(info,name)
goto 9999
endif
allocate(d(max(1,min(a%a%get_nrows(),a%a%get_ncols()))), stat=info)
allocate(d(max(1,min(a%get_nrows(),a%get_ncols()))), stat=info)
if (info /= 0) then
info = psb_err_alloc_dealloc_
call psb_errpush(info,name)

@ -2797,7 +2797,7 @@ function psb_z_rowsum(a,info) result(d)
call psb_errpush(info,name)
goto 9999
endif
allocate(d(max(1,a%a%get_nrows())), stat=info)
allocate(d(max(1,a%get_nrows())), stat=info)
if (info /= psb_success_) goto 9999
if (allocated(a%a)) then
call a%a%rowsum(d)
@ -2840,7 +2840,7 @@ function psb_z_arwsum(a,info) result(d)
call psb_errpush(info,name)
goto 9999
endif
allocate(d(max(1,a%a%get_nrows())), stat=info)
allocate(d(max(1,a%get_nrows())), stat=info)
if (info /= psb_success_) goto 9999
if (allocated(a%a)) then
@ -2884,7 +2884,7 @@ function psb_z_colsum(a,info) result(d)
call psb_errpush(info,name)
goto 9999
endif
allocate(d(max(1,a%a%get_ncols())), stat=info)
allocate(d(max(1,a%get_ncols())), stat=info)
if (info /= psb_success_) goto 9999
if (allocated(a%a)) then
@ -2928,7 +2928,7 @@ function psb_z_aclsum(a,info) result(d)
call psb_errpush(info,name)
goto 9999
endif
allocate(d(max(1,a%a%get_ncols())), stat=info)
allocate(d(max(1,a%get_ncols())), stat=info)
if (info /= psb_success_) goto 9999
if (allocated(a%a)) then
@ -2973,7 +2973,7 @@ function psb_z_get_diag(a,info) result(d)
call psb_errpush(info,name)
goto 9999
endif
allocate(d(max(1,min(a%a%get_nrows(),a%a%get_ncols()))), stat=info)
allocate(d(max(1,min(a%get_nrows(),a%get_ncols()))), stat=info)
if (info /= 0) then
info = psb_err_alloc_dealloc_
call psb_errpush(info,name)

Loading…
Cancel
Save