|
|
|
@ -77,9 +77,9 @@ function psb_camax(x,desc_a, info, jx) result(res)
|
|
|
|
|
|
|
|
|
|
|
|
ix = 1
|
|
|
|
ix = 1
|
|
|
|
if (present(jx)) then
|
|
|
|
if (present(jx)) then
|
|
|
|
ijx = jx
|
|
|
|
ijx = jx
|
|
|
|
else
|
|
|
|
else
|
|
|
|
ijx = 1
|
|
|
|
ijx = 1
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
m = desc_a%get_global_rows()
|
|
|
|
m = desc_a%get_global_rows()
|
|
|
|
@ -87,16 +87,16 @@ function psb_camax(x,desc_a, info, jx) result(res)
|
|
|
|
|
|
|
|
|
|
|
|
call psb_chkvect(m,ione,ldx,ix,ijx,desc_a,info,iix,jjx)
|
|
|
|
call psb_chkvect(m,ione,ldx,ix,ijx,desc_a,info,iix,jjx)
|
|
|
|
if(info /= psb_success_) then
|
|
|
|
if(info /= psb_success_) then
|
|
|
|
info=psb_err_from_subroutine_
|
|
|
|
info=psb_err_from_subroutine_
|
|
|
|
ch_err='psb_chkvect'
|
|
|
|
ch_err='psb_chkvect'
|
|
|
|
call psb_errpush(info,name,a_err=ch_err)
|
|
|
|
call psb_errpush(info,name,a_err=ch_err)
|
|
|
|
goto 9999
|
|
|
|
goto 9999
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
if (iix /= 1) then
|
|
|
|
if (iix /= 1) then
|
|
|
|
info=psb_err_ix_n1_iy_n1_unsupported_
|
|
|
|
info=psb_err_ix_n1_iy_n1_unsupported_
|
|
|
|
call psb_errpush(info,name)
|
|
|
|
call psb_errpush(info,name)
|
|
|
|
goto 9999
|
|
|
|
goto 9999
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
! compute local max
|
|
|
|
! compute local max
|
|
|
|
@ -112,13 +112,8 @@ function psb_camax(x,desc_a, info, jx) result(res)
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
return
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
9999 continue
|
|
|
|
9999 call psb_error_handler(ictxt,err_act)
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (err_act == psb_act_abort_) then
|
|
|
|
|
|
|
|
call psb_error(ictxt)
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
return
|
|
|
|
return
|
|
|
|
end function psb_camax
|
|
|
|
end function psb_camax
|
|
|
|
|
|
|
|
|
|
|
|
@ -206,16 +201,16 @@ function psb_camaxv (x,desc_a, info) result(res)
|
|
|
|
|
|
|
|
|
|
|
|
call psb_chkvect(m,ione,ldx,ix,jx,desc_a,info,iix,jjx)
|
|
|
|
call psb_chkvect(m,ione,ldx,ix,jx,desc_a,info,iix,jjx)
|
|
|
|
if(info /= psb_success_) then
|
|
|
|
if(info /= psb_success_) then
|
|
|
|
info=psb_err_from_subroutine_
|
|
|
|
info=psb_err_from_subroutine_
|
|
|
|
ch_err='psb_chkvect'
|
|
|
|
ch_err='psb_chkvect'
|
|
|
|
call psb_errpush(info,name,a_err=ch_err)
|
|
|
|
call psb_errpush(info,name,a_err=ch_err)
|
|
|
|
goto 9999
|
|
|
|
goto 9999
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
if (iix /= 1) then
|
|
|
|
if (iix /= 1) then
|
|
|
|
info=psb_err_ix_n1_iy_n1_unsupported_
|
|
|
|
info=psb_err_ix_n1_iy_n1_unsupported_
|
|
|
|
call psb_errpush(info,name)
|
|
|
|
call psb_errpush(info,name)
|
|
|
|
goto 9999
|
|
|
|
goto 9999
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
! compute local max
|
|
|
|
! compute local max
|
|
|
|
@ -231,13 +226,8 @@ function psb_camaxv (x,desc_a, info) result(res)
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
return
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
9999 continue
|
|
|
|
9999 call psb_error_handler(ictxt,err_act)
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (err_act == psb_act_abort_) then
|
|
|
|
|
|
|
|
call psb_error(ictxt)
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
return
|
|
|
|
return
|
|
|
|
end function psb_camaxv
|
|
|
|
end function psb_camaxv
|
|
|
|
|
|
|
|
|
|
|
|
@ -312,13 +302,8 @@ function psb_camax_vect(x, desc_a, info) result(res)
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
return
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
9999 continue
|
|
|
|
9999 call psb_error_handler(ictxt,err_act)
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (err_act == psb_act_abort_) then
|
|
|
|
|
|
|
|
call psb_error(ictxt)
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
return
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
end function psb_camax_vect
|
|
|
|
end function psb_camax_vect
|
|
|
|
@ -407,16 +392,16 @@ subroutine psb_camaxvs(res,x,desc_a, info)
|
|
|
|
ldx=size(x,1)
|
|
|
|
ldx=size(x,1)
|
|
|
|
call psb_chkvect(m,ione,ldx,ix,ijx,desc_a,info,iix,jjx)
|
|
|
|
call psb_chkvect(m,ione,ldx,ix,ijx,desc_a,info,iix,jjx)
|
|
|
|
if(info /= psb_success_) then
|
|
|
|
if(info /= psb_success_) then
|
|
|
|
info=psb_err_from_subroutine_
|
|
|
|
info=psb_err_from_subroutine_
|
|
|
|
ch_err='psb_chkvect'
|
|
|
|
ch_err='psb_chkvect'
|
|
|
|
call psb_errpush(info,name,a_err=ch_err)
|
|
|
|
call psb_errpush(info,name,a_err=ch_err)
|
|
|
|
goto 9999
|
|
|
|
goto 9999
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
if (iix /= 1) then
|
|
|
|
if (iix /= 1) then
|
|
|
|
info=psb_err_ix_n1_iy_n1_unsupported_
|
|
|
|
info=psb_err_ix_n1_iy_n1_unsupported_
|
|
|
|
call psb_errpush(info,name)
|
|
|
|
call psb_errpush(info,name)
|
|
|
|
goto 9999
|
|
|
|
goto 9999
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
! compute local max
|
|
|
|
! compute local max
|
|
|
|
@ -432,13 +417,8 @@ subroutine psb_camaxvs(res,x,desc_a, info)
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
return
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
9999 continue
|
|
|
|
9999 call psb_error_handler(ictxt,err_act)
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (err_act == psb_act_abort_) then
|
|
|
|
|
|
|
|
call psb_error(ictxt)
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
return
|
|
|
|
return
|
|
|
|
end subroutine psb_camaxvs
|
|
|
|
end subroutine psb_camaxvs
|
|
|
|
|
|
|
|
|
|
|
|
@ -518,9 +498,9 @@ subroutine psb_cmamaxs(res,x,desc_a, info,jx)
|
|
|
|
|
|
|
|
|
|
|
|
ix = 1
|
|
|
|
ix = 1
|
|
|
|
if (present(jx)) then
|
|
|
|
if (present(jx)) then
|
|
|
|
ijx = jx
|
|
|
|
ijx = jx
|
|
|
|
else
|
|
|
|
else
|
|
|
|
ijx = 1
|
|
|
|
ijx = 1
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
m = desc_a%get_global_rows()
|
|
|
|
m = desc_a%get_global_rows()
|
|
|
|
@ -528,16 +508,16 @@ subroutine psb_cmamaxs(res,x,desc_a, info,jx)
|
|
|
|
ldx = size(x,1)
|
|
|
|
ldx = size(x,1)
|
|
|
|
call psb_chkvect(m,ione,ldx,ix,ijx,desc_a,info,iix,jjx)
|
|
|
|
call psb_chkvect(m,ione,ldx,ix,ijx,desc_a,info,iix,jjx)
|
|
|
|
if(info /= psb_success_) then
|
|
|
|
if(info /= psb_success_) then
|
|
|
|
info=psb_err_from_subroutine_
|
|
|
|
info=psb_err_from_subroutine_
|
|
|
|
ch_err='psb_chkvect'
|
|
|
|
ch_err='psb_chkvect'
|
|
|
|
call psb_errpush(info,name,a_err=ch_err)
|
|
|
|
call psb_errpush(info,name,a_err=ch_err)
|
|
|
|
goto 9999
|
|
|
|
goto 9999
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
if (iix /= 1) then
|
|
|
|
if (iix /= 1) then
|
|
|
|
info=psb_err_ix_n1_iy_n1_unsupported_
|
|
|
|
info=psb_err_ix_n1_iy_n1_unsupported_
|
|
|
|
call psb_errpush(info,name)
|
|
|
|
call psb_errpush(info,name)
|
|
|
|
goto 9999
|
|
|
|
goto 9999
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
res(1:k) = szero
|
|
|
|
res(1:k) = szero
|
|
|
|
@ -554,12 +534,7 @@ subroutine psb_cmamaxs(res,x,desc_a, info,jx)
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
return
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
9999 continue
|
|
|
|
9999 call psb_error_handler(ictxt,err_act)
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (err_act == psb_act_abort_) then
|
|
|
|
|
|
|
|
call psb_error(ictxt)
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
return
|
|
|
|
return
|
|
|
|
end subroutine psb_cmamaxs
|
|
|
|
end subroutine psb_cmamaxs
|
|
|
|
|