mirror of
https://github.com/sfilippone/amg4psblas.git
synced 2026-10-07 07:04:59 +00:00
Fixed version recognition of MUMPS to be portable, and added further set interfaces
This commit is contained in:
@@ -26,6 +26,15 @@ extern "C" {
|
||||
psb_i_t amg_c_dpreccseti_idx(amg_c_dprec *ph, const char *what, psb_i_t val, psb_i_t idx);
|
||||
psb_i_t amg_c_dpreccsetr_idx(amg_c_dprec *ph, const char *what, double val, psb_i_t idx);
|
||||
psb_i_t amg_c_dpreccsetc_idx(amg_c_dprec *ph, const char *what, const char *val, psb_i_t idx);
|
||||
psb_i_t amg_c_dpreccseti_pos(amg_c_dprec *ph, const char *what, psb_i_t val, const char *pos);
|
||||
psb_i_t amg_c_dpreccsetr_pos(amg_c_dprec *ph, const char *what, double val, const char *pos);
|
||||
psb_i_t amg_c_dpreccsetc_pos(amg_c_dprec *ph, const char *what, const char *val, const char *pos);
|
||||
psb_i_t amg_c_dpreccseti_lev(amg_c_dprec *ph, const char *what, psb_i_t val, psb_i_t ilev, psb_i_t ilmax);
|
||||
psb_i_t amg_c_dpreccsetr_lev(amg_c_dprec *ph, const char *what, double val, psb_i_t ilev, psb_i_t ilmax);
|
||||
psb_i_t amg_c_dpreccsetc_lev(amg_c_dprec *ph, const char *what, const char *val, psb_i_t ilev, psb_i_t ilmax);
|
||||
psb_i_t amg_c_dpreccseti_opt(amg_c_dprec *ph, const char *what, psb_i_t val, psb_i_t ilev, psb_i_t ilmax, const char *pos, psb_i_t idx);
|
||||
psb_i_t amg_c_dpreccsetr_opt(amg_c_dprec *ph, const char *what, double val, psb_i_t ilev, psb_i_t ilmax, const char *pos, psb_i_t idx);
|
||||
psb_i_t amg_c_dpreccsetc_opt(amg_c_dprec *ph, const char *what, const char *val, psb_i_t ilev, psb_i_t ilmax, const char *pos, psb_i_t idx);
|
||||
psb_i_t amg_c_dprecbld(psb_c_dspmat *ah, psb_c_descriptor *cdh, amg_c_dprec *ph);
|
||||
psb_i_t amg_c_dhierarchy_build(psb_c_dspmat *ah, psb_c_descriptor *cdh, amg_c_dprec *ph);
|
||||
psb_i_t amg_c_dsmoothers_build(psb_c_dspmat *ah, psb_c_descriptor *cdh, amg_c_dprec *ph);
|
||||
|
||||
@@ -27,7 +27,16 @@ extern "C"
|
||||
psb_i_t amg_c_zprecsetr(amg_c_zprec *ph, const char *what, double val);
|
||||
psb_i_t amg_c_zpreccseti_idx(amg_c_zprec *ph, const char *what, psb_i_t val, psb_i_t idx);
|
||||
psb_i_t amg_c_zpreccsetr_idx(amg_c_zprec *ph, const char *what, double val, psb_i_t idx);
|
||||
psb_i_t amg_c_zpreccsetc_idx(amg_c_zprec *ph, const char *what, const char *val, psb_i_t idx);
|
||||
psb_i_t amg_c_zpreccsetc_idx(amg_c_zprec *ph, const char *what, const char *val, psb_i_t idx);
|
||||
psb_i_t amg_c_zpreccseti_pos(amg_c_zprec *ph, const char *what, psb_i_t val, const char *pos);
|
||||
psb_i_t amg_c_zpreccsetr_pos(amg_c_zprec *ph, const char *what, double val, const char *pos);
|
||||
psb_i_t amg_c_zpreccsetc_pos(amg_c_zprec *ph, const char *what, const char *val, const char *pos);
|
||||
psb_i_t amg_c_zpreccseti_lev(amg_c_zprec *ph, const char *what, psb_i_t val, psb_i_t ilev, psb_i_t ilmax);
|
||||
psb_i_t amg_c_zpreccsetr_lev(amg_c_zprec *ph, const char *what, double val, psb_i_t ilev, psb_i_t ilmax);
|
||||
psb_i_t amg_c_zpreccsetc_lev(amg_c_zprec *ph, const char *what, const char *val, psb_i_t ilev, psb_i_t ilmax);
|
||||
psb_i_t amg_c_zpreccseti_opt(amg_c_zprec *ph, const char *what, psb_i_t val, psb_i_t ilev, psb_i_t ilmax, const char *pos, psb_i_t idx);
|
||||
psb_i_t amg_c_zpreccsetr_opt(amg_c_zprec *ph, const char *what, double val, psb_i_t ilev, psb_i_t ilmax, const char *pos, psb_i_t idx);
|
||||
psb_i_t amg_c_zpreccsetc_opt(amg_c_zprec *ph, const char *what, const char *val, psb_i_t ilev, psb_i_t ilmax, const char *pos, psb_i_t idx);
|
||||
psb_i_t amg_c_zprecbld(psb_c_zspmat *ah, psb_c_descriptor *cdh, amg_c_zprec *ph);
|
||||
psb_i_t amg_c_zhierarchy_build(psb_c_zspmat *ah, psb_c_descriptor *cdh, amg_c_zprec *ph);
|
||||
psb_i_t amg_c_zsmoothers_build(psb_c_zspmat *ah, psb_c_descriptor *cdh, amg_c_zprec *ph);
|
||||
|
||||
@@ -220,6 +220,265 @@ function amg_c_dpreccseti_idx(ph,what,val,idx) bind(c) result(res)
|
||||
return
|
||||
end function amg_c_dpreccsetc_idx
|
||||
|
||||
function amg_c_dpreccseti_pos(ph,what,val,pos) bind(c) result(res)
|
||||
implicit none
|
||||
|
||||
integer(psb_c_ipk_) :: res
|
||||
type(psb_c_object_type) :: ph
|
||||
character(c_char) :: what(*), pos(*)
|
||||
integer(psb_c_ipk_), value :: val
|
||||
integer(psb_ipk_) :: iret
|
||||
character(len=80) :: fwhat, fpos
|
||||
type(amg_dprec_type), pointer :: precp
|
||||
|
||||
res = -1
|
||||
if (c_associated(ph%item)) then
|
||||
call c_f_pointer(ph%item,precp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
|
||||
call psb_stringc2f(what,fwhat)
|
||||
call psb_stringc2f(pos,fpos)
|
||||
|
||||
call precp%cseti(fwhat,val,iret,pos=trim(fpos))
|
||||
|
||||
res = AMGC_ERR_FILTER(iret)
|
||||
AMGC_ERR_HANDLE(res)
|
||||
return
|
||||
end function amg_c_dpreccseti_pos
|
||||
|
||||
|
||||
function amg_c_dpreccsetr_pos(ph,what,val,pos) bind(c) result(res)
|
||||
implicit none
|
||||
|
||||
integer(psb_c_ipk_) :: res
|
||||
type(psb_c_object_type) :: ph
|
||||
character(c_char) :: what(*), pos(*)
|
||||
real(c_double), value :: val
|
||||
integer(psb_ipk_) :: iret
|
||||
character(len=80) :: fwhat, fpos
|
||||
type(amg_dprec_type), pointer :: precp
|
||||
|
||||
res = -1
|
||||
if (c_associated(ph%item)) then
|
||||
call c_f_pointer(ph%item,precp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
|
||||
call psb_stringc2f(what,fwhat)
|
||||
call psb_stringc2f(pos,fpos)
|
||||
|
||||
call precp%csetr(fwhat,val,iret,pos=trim(fpos))
|
||||
|
||||
res = AMGC_ERR_FILTER(iret)
|
||||
AMGC_ERR_HANDLE(res)
|
||||
return
|
||||
end function amg_c_dpreccsetr_pos
|
||||
|
||||
|
||||
function amg_c_dpreccsetc_pos(ph,what,val,pos) bind(c) result(res)
|
||||
implicit none
|
||||
|
||||
integer(psb_c_ipk_) :: res
|
||||
type(psb_c_object_type) :: ph
|
||||
character(c_char) :: what(*), val(*), pos(*)
|
||||
integer(psb_ipk_) :: iret
|
||||
character(len=80) :: fwhat, fval, fpos
|
||||
type(amg_dprec_type), pointer :: precp
|
||||
|
||||
res = -1
|
||||
if (c_associated(ph%item)) then
|
||||
call c_f_pointer(ph%item,precp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
|
||||
call psb_stringc2f(what,fwhat)
|
||||
call psb_stringc2f(val,fval)
|
||||
call psb_stringc2f(pos,fpos)
|
||||
|
||||
call precp%csetc(fwhat,fval,iret,pos=trim(fpos))
|
||||
|
||||
res = AMGC_ERR_FILTER(iret)
|
||||
AMGC_ERR_HANDLE(res)
|
||||
return
|
||||
end function amg_c_dpreccsetc_pos
|
||||
|
||||
function amg_c_dpreccseti_lev(ph,what,val,ilev,ilmax) bind(c) result(res)
|
||||
implicit none
|
||||
|
||||
integer(psb_c_ipk_) :: res
|
||||
type(psb_c_object_type) :: ph
|
||||
character(c_char) :: what(*)
|
||||
integer(psb_c_ipk_), value :: val, ilev, ilmax
|
||||
integer(psb_ipk_) :: iret
|
||||
character(len=80) :: fwhat
|
||||
type(amg_dprec_type), pointer :: precp
|
||||
|
||||
res = -1
|
||||
if (c_associated(ph%item)) then
|
||||
call c_f_pointer(ph%item,precp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
|
||||
call psb_stringc2f(what,fwhat)
|
||||
|
||||
call precp%cseti(fwhat,val,iret,ilev=ilev,ilmax=ilmax)
|
||||
|
||||
res = AMGC_ERR_FILTER(iret)
|
||||
AMGC_ERR_HANDLE(res)
|
||||
return
|
||||
end function amg_c_dpreccseti_lev
|
||||
|
||||
|
||||
function amg_c_dpreccsetr_lev(ph,what,val,ilev,ilmax) bind(c) result(res)
|
||||
implicit none
|
||||
|
||||
integer(psb_c_ipk_) :: res
|
||||
type(psb_c_object_type) :: ph
|
||||
character(c_char) :: what(*)
|
||||
real(c_double), value :: val
|
||||
integer(psb_c_ipk_), value :: ilev, ilmax
|
||||
integer(psb_ipk_) :: iret
|
||||
character(len=80) :: fwhat
|
||||
type(amg_dprec_type), pointer :: precp
|
||||
|
||||
res = -1
|
||||
if (c_associated(ph%item)) then
|
||||
call c_f_pointer(ph%item,precp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
|
||||
call psb_stringc2f(what,fwhat)
|
||||
|
||||
call precp%csetr(fwhat,val,iret,ilev=ilev,ilmax=ilmax)
|
||||
|
||||
res = AMGC_ERR_FILTER(iret)
|
||||
AMGC_ERR_HANDLE(res)
|
||||
return
|
||||
end function amg_c_dpreccsetr_lev
|
||||
|
||||
|
||||
function amg_c_dpreccsetc_lev(ph,what,val,ilev,ilmax) bind(c) result(res)
|
||||
implicit none
|
||||
|
||||
integer(psb_c_ipk_) :: res
|
||||
type(psb_c_object_type) :: ph
|
||||
character(c_char) :: what(*), val(*)
|
||||
integer(psb_c_ipk_), value :: ilev, ilmax
|
||||
integer(psb_ipk_) :: iret
|
||||
character(len=80) :: fwhat, fval
|
||||
type(amg_dprec_type), pointer :: precp
|
||||
|
||||
res = -1
|
||||
if (c_associated(ph%item)) then
|
||||
call c_f_pointer(ph%item,precp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
|
||||
call psb_stringc2f(what,fwhat)
|
||||
call psb_stringc2f(val,fval)
|
||||
|
||||
call precp%csetc(fwhat,fval,iret,ilev=ilev,ilmax=ilmax)
|
||||
|
||||
res = AMGC_ERR_FILTER(iret)
|
||||
AMGC_ERR_HANDLE(res)
|
||||
return
|
||||
end function amg_c_dpreccsetc_lev
|
||||
|
||||
function amg_c_dpreccseti_opt(ph,what,val,ilev,ilmax,pos,idx) bind(c) result(res)
|
||||
implicit none
|
||||
|
||||
integer(psb_c_ipk_) :: res
|
||||
type(psb_c_object_type) :: ph
|
||||
character(c_char) :: what(*), pos(*)
|
||||
integer(psb_c_ipk_), value :: val, ilev, ilmax, idx
|
||||
integer(psb_ipk_) :: iret
|
||||
character(len=80) :: fwhat, fpos
|
||||
type(amg_dprec_type), pointer :: precp
|
||||
|
||||
res = -1
|
||||
if (c_associated(ph%item)) then
|
||||
call c_f_pointer(ph%item,precp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
|
||||
call psb_stringc2f(what,fwhat)
|
||||
call psb_stringc2f(pos,fpos)
|
||||
|
||||
call precp%cseti(fwhat,val,iret,ilev=ilev,ilmax=ilmax,pos=trim(fpos),idx=idx)
|
||||
|
||||
res = AMGC_ERR_FILTER(iret)
|
||||
AMGC_ERR_HANDLE(res)
|
||||
return
|
||||
end function amg_c_dpreccseti_opt
|
||||
|
||||
|
||||
function amg_c_dpreccsetr_opt(ph,what,val,ilev,ilmax,pos,idx) bind(c) result(res)
|
||||
implicit none
|
||||
|
||||
integer(psb_c_ipk_) :: res
|
||||
type(psb_c_object_type) :: ph
|
||||
character(c_char) :: what(*), pos(*)
|
||||
real(c_double), value :: val
|
||||
integer(psb_c_ipk_), value :: ilev, ilmax, idx
|
||||
integer(psb_ipk_) :: iret
|
||||
character(len=80) :: fwhat, fpos
|
||||
type(amg_dprec_type), pointer :: precp
|
||||
|
||||
res = -1
|
||||
if (c_associated(ph%item)) then
|
||||
call c_f_pointer(ph%item,precp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
|
||||
call psb_stringc2f(what,fwhat)
|
||||
call psb_stringc2f(pos,fpos)
|
||||
|
||||
call precp%csetr(fwhat,val,iret,ilev=ilev,ilmax=ilmax,pos=trim(fpos),idx=idx)
|
||||
|
||||
res = AMGC_ERR_FILTER(iret)
|
||||
AMGC_ERR_HANDLE(res)
|
||||
return
|
||||
end function amg_c_dpreccsetr_opt
|
||||
|
||||
|
||||
function amg_c_dpreccsetc_opt(ph,what,val,ilev,ilmax,pos,idx) bind(c) result(res)
|
||||
implicit none
|
||||
|
||||
integer(psb_c_ipk_) :: res
|
||||
type(psb_c_object_type) :: ph
|
||||
character(c_char) :: what(*), val(*), pos(*)
|
||||
integer(psb_c_ipk_), value :: ilev, ilmax, idx
|
||||
integer(psb_ipk_) :: iret
|
||||
character(len=80) :: fwhat, fval, fpos
|
||||
type(amg_dprec_type), pointer :: precp
|
||||
|
||||
res = -1
|
||||
if (c_associated(ph%item)) then
|
||||
call c_f_pointer(ph%item,precp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
|
||||
call psb_stringc2f(what,fwhat)
|
||||
call psb_stringc2f(val,fval)
|
||||
call psb_stringc2f(pos,fpos)
|
||||
|
||||
call precp%csetc(fwhat,fval,iret,ilev=ilev,ilmax=ilmax,pos=trim(fpos),idx=idx)
|
||||
|
||||
res = AMGC_ERR_FILTER(iret)
|
||||
AMGC_ERR_HANDLE(res)
|
||||
return
|
||||
end function amg_c_dpreccsetc_opt
|
||||
|
||||
function amg_c_dprecbld(ah,cdh,ph) bind(c) result(res)
|
||||
implicit none
|
||||
|
||||
|
||||
@@ -221,6 +221,265 @@ contains
|
||||
return
|
||||
end function amg_c_zpreccsetc_idx
|
||||
|
||||
function amg_c_zpreccseti_pos(ph,what,val,pos) bind(c) result(res)
|
||||
implicit none
|
||||
|
||||
integer(psb_c_ipk_) :: res
|
||||
type(psb_c_object_type) :: ph
|
||||
character(c_char) :: what(*), pos(*)
|
||||
integer(psb_c_ipk_), value :: val
|
||||
integer(psb_ipk_) :: iret
|
||||
character(len=80) :: fwhat, fpos
|
||||
type(amg_zprec_type), pointer :: precp
|
||||
|
||||
res = -1
|
||||
if (c_associated(ph%item)) then
|
||||
call c_f_pointer(ph%item,precp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
|
||||
call psb_stringc2f(what,fwhat)
|
||||
call psb_stringc2f(pos,fpos)
|
||||
|
||||
call precp%cseti(fwhat,val,iret,pos=trim(fpos))
|
||||
|
||||
res = AMGC_ERR_FILTER(iret)
|
||||
AMGC_ERR_HANDLE(res)
|
||||
return
|
||||
end function amg_c_zpreccseti_pos
|
||||
|
||||
|
||||
function amg_c_zpreccsetr_pos(ph,what,val,pos) bind(c) result(res)
|
||||
implicit none
|
||||
|
||||
integer(psb_c_ipk_) :: res
|
||||
type(psb_c_object_type) :: ph
|
||||
character(c_char) :: what(*), pos(*)
|
||||
real(c_double), value :: val
|
||||
integer(psb_ipk_) :: iret
|
||||
character(len=80) :: fwhat, fpos
|
||||
type(amg_zprec_type), pointer :: precp
|
||||
|
||||
res = -1
|
||||
if (c_associated(ph%item)) then
|
||||
call c_f_pointer(ph%item,precp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
|
||||
call psb_stringc2f(what,fwhat)
|
||||
call psb_stringc2f(pos,fpos)
|
||||
|
||||
call precp%csetr(fwhat,val,iret,pos=trim(fpos))
|
||||
|
||||
res = AMGC_ERR_FILTER(iret)
|
||||
AMGC_ERR_HANDLE(res)
|
||||
return
|
||||
end function amg_c_zpreccsetr_pos
|
||||
|
||||
|
||||
function amg_c_zpreccsetc_pos(ph,what,val,pos) bind(c) result(res)
|
||||
implicit none
|
||||
|
||||
integer(psb_c_ipk_) :: res
|
||||
type(psb_c_object_type) :: ph
|
||||
character(c_char) :: what(*), val(*), pos(*)
|
||||
integer(psb_ipk_) :: iret
|
||||
character(len=80) :: fwhat, fval, fpos
|
||||
type(amg_zprec_type), pointer :: precp
|
||||
|
||||
res = -1
|
||||
if (c_associated(ph%item)) then
|
||||
call c_f_pointer(ph%item,precp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
|
||||
call psb_stringc2f(what,fwhat)
|
||||
call psb_stringc2f(val,fval)
|
||||
call psb_stringc2f(pos,fpos)
|
||||
|
||||
call precp%csetc(fwhat,fval,iret,pos=trim(fpos))
|
||||
|
||||
res = AMGC_ERR_FILTER(iret)
|
||||
AMGC_ERR_HANDLE(res)
|
||||
return
|
||||
end function amg_c_zpreccsetc_pos
|
||||
|
||||
function amg_c_zpreccseti_lev(ph,what,val,ilev,ilmax) bind(c) result(res)
|
||||
implicit none
|
||||
|
||||
integer(psb_c_ipk_) :: res
|
||||
type(psb_c_object_type) :: ph
|
||||
character(c_char) :: what(*)
|
||||
integer(psb_c_ipk_), value :: val, ilev, ilmax
|
||||
integer(psb_ipk_) :: iret
|
||||
character(len=80) :: fwhat
|
||||
type(amg_zprec_type), pointer :: precp
|
||||
|
||||
res = -1
|
||||
if (c_associated(ph%item)) then
|
||||
call c_f_pointer(ph%item,precp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
|
||||
call psb_stringc2f(what,fwhat)
|
||||
|
||||
call precp%cseti(fwhat,val,iret,ilev=ilev,ilmax=ilmax)
|
||||
|
||||
res = AMGC_ERR_FILTER(iret)
|
||||
AMGC_ERR_HANDLE(res)
|
||||
return
|
||||
end function amg_c_zpreccseti_lev
|
||||
|
||||
|
||||
function amg_c_zpreccsetr_lev(ph,what,val,ilev,ilmax) bind(c) result(res)
|
||||
implicit none
|
||||
|
||||
integer(psb_c_ipk_) :: res
|
||||
type(psb_c_object_type) :: ph
|
||||
character(c_char) :: what(*)
|
||||
real(c_double), value :: val
|
||||
integer(psb_c_ipk_), value :: ilev, ilmax
|
||||
integer(psb_ipk_) :: iret
|
||||
character(len=80) :: fwhat
|
||||
type(amg_zprec_type), pointer :: precp
|
||||
|
||||
res = -1
|
||||
if (c_associated(ph%item)) then
|
||||
call c_f_pointer(ph%item,precp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
|
||||
call psb_stringc2f(what,fwhat)
|
||||
|
||||
call precp%csetr(fwhat,val,iret,ilev=ilev,ilmax=ilmax)
|
||||
|
||||
res = AMGC_ERR_FILTER(iret)
|
||||
AMGC_ERR_HANDLE(res)
|
||||
return
|
||||
end function amg_c_zpreccsetr_lev
|
||||
|
||||
|
||||
function amg_c_zpreccsetc_lev(ph,what,val,ilev,ilmax) bind(c) result(res)
|
||||
implicit none
|
||||
|
||||
integer(psb_c_ipk_) :: res
|
||||
type(psb_c_object_type) :: ph
|
||||
character(c_char) :: what(*), val(*)
|
||||
integer(psb_c_ipk_), value :: ilev, ilmax
|
||||
integer(psb_ipk_) :: iret
|
||||
character(len=80) :: fwhat, fval
|
||||
type(amg_zprec_type), pointer :: precp
|
||||
|
||||
res = -1
|
||||
if (c_associated(ph%item)) then
|
||||
call c_f_pointer(ph%item,precp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
|
||||
call psb_stringc2f(what,fwhat)
|
||||
call psb_stringc2f(val,fval)
|
||||
|
||||
call precp%csetc(fwhat,fval,iret,ilev=ilev,ilmax=ilmax)
|
||||
|
||||
res = AMGC_ERR_FILTER(iret)
|
||||
AMGC_ERR_HANDLE(res)
|
||||
return
|
||||
end function amg_c_zpreccsetc_lev
|
||||
|
||||
function amg_c_zpreccseti_opt(ph,what,val,ilev,ilmax,pos,idx) bind(c) result(res)
|
||||
implicit none
|
||||
|
||||
integer(psb_c_ipk_) :: res
|
||||
type(psb_c_object_type) :: ph
|
||||
character(c_char) :: what(*), pos(*)
|
||||
integer(psb_c_ipk_), value :: val, ilev, ilmax, idx
|
||||
integer(psb_ipk_) :: iret
|
||||
character(len=80) :: fwhat, fpos
|
||||
type(amg_zprec_type), pointer :: precp
|
||||
|
||||
res = -1
|
||||
if (c_associated(ph%item)) then
|
||||
call c_f_pointer(ph%item,precp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
|
||||
call psb_stringc2f(what,fwhat)
|
||||
call psb_stringc2f(pos,fpos)
|
||||
|
||||
call precp%cseti(fwhat,val,iret,ilev=ilev,ilmax=ilmax,pos=trim(fpos),idx=idx)
|
||||
|
||||
res = AMGC_ERR_FILTER(iret)
|
||||
AMGC_ERR_HANDLE(res)
|
||||
return
|
||||
end function amg_c_zpreccseti_opt
|
||||
|
||||
|
||||
function amg_c_zpreccsetr_opt(ph,what,val,ilev,ilmax,pos,idx) bind(c) result(res)
|
||||
implicit none
|
||||
|
||||
integer(psb_c_ipk_) :: res
|
||||
type(psb_c_object_type) :: ph
|
||||
character(c_char) :: what(*), pos(*)
|
||||
real(c_double), value :: val
|
||||
integer(psb_c_ipk_), value :: ilev, ilmax, idx
|
||||
integer(psb_ipk_) :: iret
|
||||
character(len=80) :: fwhat, fpos
|
||||
type(amg_zprec_type), pointer :: precp
|
||||
|
||||
res = -1
|
||||
if (c_associated(ph%item)) then
|
||||
call c_f_pointer(ph%item,precp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
|
||||
call psb_stringc2f(what,fwhat)
|
||||
call psb_stringc2f(pos,fpos)
|
||||
|
||||
call precp%csetr(fwhat,val,iret,ilev=ilev,ilmax=ilmax,pos=trim(fpos),idx=idx)
|
||||
|
||||
res = AMGC_ERR_FILTER(iret)
|
||||
AMGC_ERR_HANDLE(res)
|
||||
return
|
||||
end function amg_c_zpreccsetr_opt
|
||||
|
||||
|
||||
function amg_c_zpreccsetc_opt(ph,what,val,ilev,ilmax,pos,idx) bind(c) result(res)
|
||||
implicit none
|
||||
|
||||
integer(psb_c_ipk_) :: res
|
||||
type(psb_c_object_type) :: ph
|
||||
character(c_char) :: what(*), val(*), pos(*)
|
||||
integer(psb_c_ipk_), value :: ilev, ilmax, idx
|
||||
integer(psb_ipk_) :: iret
|
||||
character(len=80) :: fwhat, fval, fpos
|
||||
type(amg_zprec_type), pointer :: precp
|
||||
|
||||
res = -1
|
||||
if (c_associated(ph%item)) then
|
||||
call c_f_pointer(ph%item,precp)
|
||||
else
|
||||
return
|
||||
end if
|
||||
|
||||
call psb_stringc2f(what,fwhat)
|
||||
call psb_stringc2f(val,fval)
|
||||
call psb_stringc2f(pos,fpos)
|
||||
|
||||
call precp%csetc(fwhat,fval,iret,ilev=ilev,ilmax=ilmax,pos=trim(fpos),idx=idx)
|
||||
|
||||
res = AMGC_ERR_FILTER(iret)
|
||||
AMGC_ERR_HANDLE(res)
|
||||
return
|
||||
end function amg_c_zpreccsetc_opt
|
||||
|
||||
function amg_c_zprecbld(ah,cdh,ph) bind(c) result(res)
|
||||
implicit none
|
||||
|
||||
|
||||
@@ -10231,8 +10231,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
#
|
||||
# 1. Enable even with LPK=8, internally it will check if
|
||||
# the problem size fits into 4 bytes, very likely since we
|
||||
# are mostly using MUMPS at coarse level.
|
||||
# the problem size fits into 4 bytes, very likely since we
|
||||
# are mostly using MUMPS at coarse level.
|
||||
#
|
||||
amg4psblas_cv_mumps_version="unknown"
|
||||
amg4psblas_cv_mumps_version_num=0
|
||||
@@ -10254,19 +10254,27 @@ if test "x$amg4psblas_cv_have_mumps" == "xyes" ; then
|
||||
fi
|
||||
done
|
||||
if test "x$amg_mumps_header" != "x" ; then
|
||||
amg4psblas_cv_mumps_version=`awk '/^#[ \t]*define[ \t]+MUMPS_VERSION[ \t]+/ {v=$0; sub(/^#[ \t]*define[ \t]+MUMPS_VERSION[ \t]+/,"",v); gsub(/"/,"",v); print v; exit}' "$amg_mumps_header"`
|
||||
amg4psblas_cv_mumps_version=`awk '/^#[ \t]*define[ \t]+MUMPS_VERSION[ \t]+/ {v=$0; sub(/^#[ \t]*define[ \t]+MUMPS_VERSION[ \t]+/,"",v); gsub(/"/,"",v); print v; exit}' "$amg_mumps_header" | tr -d '\r'`
|
||||
if test "x$amg4psblas_cv_mumps_version" = "x" ; then
|
||||
amg4psblas_cv_mumps_version=`awk '/part of MUMPS/ {for(i=1;i<=NF;i++) if($i=="MUMPS") {v=$(i+1); sub(/,.*/,"",v); print v; exit}}' "$amg_mumps_header"`
|
||||
amg4psblas_cv_mumps_version=`awk '/part of MUMPS/ {for(i=1;i<=NF;i++) if($i=="MUMPS") {v=$(i+1); sub(/,.*/,"",v); print v; exit}}' "$amg_mumps_header" | tr -d '\r'`
|
||||
fi
|
||||
if test "x$amg4psblas_cv_mumps_version" = "x" ; then
|
||||
amg4psblas_cv_mumps_version="unknown"
|
||||
fi
|
||||
|
||||
# Strip leading "snapshot" (case-insensitive) and any delimiter
|
||||
case "$amg4psblas_cv_mumps_version" in
|
||||
[sS][nN][aA][pP][sS][hH][oO][tT]*)
|
||||
amg4psblas_cv_mumps_version=`echo "$amg4psblas_cv_mumps_version" | sed -e 's/^[sS][nN][aA][pP][sS][hH][oO][tT][-_ ]*//'`
|
||||
;;
|
||||
esac
|
||||
|
||||
amg4psblas_cv_mumps_version_num=`echo "$amg4psblas_cv_mumps_version" | sed -e 's/^0-9//g' -e 's/^0*//'`
|
||||
if test "x$amg4psblas_cv_mumps_version_num" = "x" ; then
|
||||
amg4psblas_cv_mumps_version_num=0
|
||||
fi
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Configuring with MUMPS version $amg4psblas_cv_mumps_version (numeric flag $amg4psblas_cv_mumps_version_num)" >&5
|
||||
printf "%s\n" "$as_me: Configuring with MUMPS version $amg4psblas_cv_mumps_version (numeric flag $amg4psblas_cv_mumps_version_num)" >&6;}
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Configuring with MUMPS version $amg4psblas_cv_mumps_version (numeric flag$amg4psblas_cv_mumps_version_num)" >&5
|
||||
printf "%s\n" "$as_me: Configuring with MUMPS version $amg4psblas_cv_mumps_version (numeric flag$amg4psblas_cv_mumps_version_num)" >&6;}
|
||||
else
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Could not locate dmumps_c.h to extract the MUMPS version." >&5
|
||||
printf "%s\n" "$as_me: Could not locate dmumps_c.h to extract the MUMPS version." >&6;}
|
||||
@@ -10282,14 +10290,14 @@ printf "%s\n" "$as_me: PSBLAS defines PSB_LPK_ as $pac_cv_psblas_lpk. MUMPS inte
|
||||
MUMPS_LIBS="${MUMPS_LIBS} -L$amg4psblas_cv_mumpslibdir"
|
||||
fi
|
||||
if test "x$pac_mumps_fmods_ok" == "xyes" ; then
|
||||
FDEFINES="$amg_cv_define_prepend-DAMG_HAVE_MUMPS $amg_cv_define_prepend-DAMG_HAVE_MUMPS_MODULES $amg_cv_define_prepend-DAMG_MUMPS_VERSION=$amg4psblas_cv_mumps_version_num $MUMPS_MODULES $FDEFINES"
|
||||
MUMPS_FLAGS="-DAMG_HAVE_MUMPS -DAMG_MUMPS_VERSION=$amg4psblas_cv_mumps_version_num $MUMPS_MODULES"
|
||||
FDEFINES="$amg_cv_define_prepend-DAMG_HAVE_MUMPS$amg_cv_define_prepend -DAMG_HAVE_MUMPS_MODULES $amg_cv_define_prepend-DAMG_MUMPS_VERSION=$amg4psblas_cv_mumps_version_num $MUMPS_MODULES $FDEFINES"
|
||||
MUMPS_FLAGS="-DAMG_HAVE_MUMPS -DAMG_MUMPS_VERSION=$amg4psblas_cv_mumps_version_num $MUMPS_MODULES"
|
||||
CHAVEMUMPS="#define AMG_HAVE_MUMPS"
|
||||
CHAVEMUMPSMODULES="#define AMG_HAVE_MUMPS_MODULES"
|
||||
|
||||
elif test "x$pac_mumps_fincs_ok" == "xyes" ; then
|
||||
FDEFINES="$amg_cv_define_prepend-DAMG_HAVE_MUMPS $amg_cv_define_prepend-DAMG_HAVE_MUMPS_INCLUDES $amg_cv_define_prepend-DAMG_MUMPS_VERSION=$amg4psblas_cv_mumps_version_num $MUMPS_FINCLUDES $FDEFINES"
|
||||
MUMPS_FLAGS="-DAMG_HAVE_MUMPS -DAMG_MUMPS_VERSION=$amg4psblas_cv_mumps_version_num $MUMPS_FINCLUDES"
|
||||
FDEFINES="$amg_cv_define_prepend-DAMG_HAVE_MUMPS$amg_cv_define_prepend -DAMG_HAVE_MUMPS_INCLUDES $amg_cv_define_prepend-DAMG_MUMPS_VERSION=$amg4psblas_cv_mumps_version_num $MUMPS_FINCLUDES $FDEFINES"
|
||||
MUMPS_FLAGS="-DAMG_HAVE_MUMPS -DAMG_MUMPS_VERSION=$amg4psblas_cv_mumps_version_num $MUMPS_FINCLUDES "
|
||||
CHAVEMUMPS="#define AMG_HAVE_MUMPS"
|
||||
CHAVEMUMPSINCLUDES="#define AMG_HAVE_MUMPS_INCLUDES"
|
||||
else
|
||||
|
||||
+19
-11
@@ -749,8 +749,8 @@ AC_LANG([C])
|
||||
PAC_CHECK_MUMPS
|
||||
#
|
||||
# 1. Enable even with LPK=8, internally it will check if
|
||||
# the problem size fits into 4 bytes, very likely since we
|
||||
# are mostly using MUMPS at coarse level.
|
||||
# the problem size fits into 4 bytes, very likely since we
|
||||
# are mostly using MUMPS at coarse level.
|
||||
#
|
||||
amg4psblas_cv_mumps_version="unknown"
|
||||
amg4psblas_cv_mumps_version_num=0
|
||||
@@ -780,18 +780,26 @@ if test "x$amg4psblas_cv_have_mumps" == "xyes" ; then
|
||||
fi
|
||||
done
|
||||
if test "x$amg_mumps_header" != "x" ; then
|
||||
amg4psblas_cv_mumps_version=`awk '/^#[ \t]*define[ \t]+MUMPS_VERSION[ \t]+/ {v=$0; sub(/^#[ \t]*define[ \t]+MUMPS_VERSION[ \t]+/,"",v); gsub(/"/,"",v); print v; exit}' "$amg_mumps_header"`
|
||||
amg4psblas_cv_mumps_version=`awk '/^#[ \t]*define[ \t]+MUMPS_VERSION[ \t]+/ {v=$0; sub(/^#[ \t]*define[ \t]+MUMPS_VERSION[ \t]+/,"",v); gsub(/"/,"",v); print v; exit}' "$amg_mumps_header" | tr -d '\r'`
|
||||
if test "x$amg4psblas_cv_mumps_version" = "x" ; then
|
||||
amg4psblas_cv_mumps_version=`awk '/part of MUMPS/ {for(i=1;i<=NF;i++) if($i=="MUMPS") {v=$(i+1); sub(/,.*/,"",v); print v; exit}}' "$amg_mumps_header"`
|
||||
amg4psblas_cv_mumps_version=`awk '/part of MUMPS/ {for(i=1;i<=NF;i++) if($i=="MUMPS") {v=$(i+1); sub(/,.*/,"",v); print v; exit}}' "$amg_mumps_header" | tr -d '\r'`
|
||||
fi
|
||||
if test "x$amg4psblas_cv_mumps_version" = "x" ; then
|
||||
amg4psblas_cv_mumps_version="unknown"
|
||||
fi
|
||||
|
||||
# Strip leading "snapshot" (case-insensitive) and any delimiter
|
||||
case "$amg4psblas_cv_mumps_version" in
|
||||
[[sS]][[nN]][[aA]][[pP]][[sS]][[hH]][[oO]][[tT]]*)
|
||||
amg4psblas_cv_mumps_version=`echo "$amg4psblas_cv_mumps_version" | sed -e 's/^[[sS]][[nN]][[aA]][[pP]][[sS]][[hH]][[oO]][[tT]][[-_ ]]*//'`
|
||||
;;
|
||||
esac
|
||||
|
||||
amg4psblas_cv_mumps_version_num=`echo "$amg4psblas_cv_mumps_version" | sed -e 's/[^0-9]//g' -e 's/^0*//'`
|
||||
if test "x$amg4psblas_cv_mumps_version_num" = "x" ; then
|
||||
amg4psblas_cv_mumps_version_num=0
|
||||
fi
|
||||
AC_MSG_NOTICE([Configuring with MUMPS version $amg4psblas_cv_mumps_version (numeric flag $amg4psblas_cv_mumps_version_num)])
|
||||
AC_MSG_NOTICE([Configuring with MUMPS version $amg4psblas_cv_mumps_version (numeric flag$amg4psblas_cv_mumps_version_num)])
|
||||
else
|
||||
AC_MSG_NOTICE([Could not locate dmumps_c.h to extract the MUMPS version.])
|
||||
fi
|
||||
@@ -803,18 +811,18 @@ if test "x$amg4psblas_cv_have_mumps" == "xyes" ; then
|
||||
MUMPS_LIBS="-lsmumps -ldmumps -lcmumps -lzmumps -lmumps_common -lpord"
|
||||
if test "x$amg4psblas_cv_mumpslibdir" != "x" ; then
|
||||
MUMPS_LIBS="${MUMPS_LIBS} -L$amg4psblas_cv_mumpslibdir"
|
||||
fi
|
||||
fi
|
||||
if test "x$pac_mumps_fmods_ok" == "xyes" ; then
|
||||
FDEFINES="$amg_cv_define_prepend-DAMG_HAVE_MUMPS $amg_cv_define_prepend-DAMG_HAVE_MUMPS_MODULES $amg_cv_define_prepend-DAMG_MUMPS_VERSION=$amg4psblas_cv_mumps_version_num $MUMPS_MODULES $FDEFINES"
|
||||
MUMPS_FLAGS="-DAMG_HAVE_MUMPS -DAMG_MUMPS_VERSION=$amg4psblas_cv_mumps_version_num $MUMPS_MODULES"
|
||||
FDEFINES="$amg_cv_define_prepend-DAMG_HAVE_MUMPS$amg_cv_define_prepend -DAMG_HAVE_MUMPS_MODULES $amg_cv_define_prepend-DAMG_MUMPS_VERSION=$amg4psblas_cv_mumps_version_num $MUMPS_MODULES $FDEFINES"
|
||||
MUMPS_FLAGS="-DAMG_HAVE_MUMPS -DAMG_MUMPS_VERSION=$amg4psblas_cv_mumps_version_num $MUMPS_MODULES"
|
||||
CHAVEMUMPS="#define AMG_HAVE_MUMPS"
|
||||
CHAVEMUMPSMODULES="#define AMG_HAVE_MUMPS_MODULES"
|
||||
|
||||
elif test "x$pac_mumps_fincs_ok" == "xyes" ; then
|
||||
FDEFINES="$amg_cv_define_prepend-DAMG_HAVE_MUMPS $amg_cv_define_prepend-DAMG_HAVE_MUMPS_INCLUDES $amg_cv_define_prepend-DAMG_MUMPS_VERSION=$amg4psblas_cv_mumps_version_num $MUMPS_FINCLUDES $FDEFINES"
|
||||
MUMPS_FLAGS="-DAMG_HAVE_MUMPS -DAMG_MUMPS_VERSION=$amg4psblas_cv_mumps_version_num $MUMPS_FINCLUDES"
|
||||
FDEFINES="$amg_cv_define_prepend-DAMG_HAVE_MUMPS$amg_cv_define_prepend -DAMG_HAVE_MUMPS_INCLUDES $amg_cv_define_prepend-DAMG_MUMPS_VERSION=$amg4psblas_cv_mumps_version_num $MUMPS_FINCLUDES $FDEFINES"
|
||||
MUMPS_FLAGS="-DAMG_HAVE_MUMPS -DAMG_MUMPS_VERSION=$amg4psblas_cv_mumps_version_num $MUMPS_FINCLUDES "
|
||||
CHAVEMUMPS="#define AMG_HAVE_MUMPS"
|
||||
CHAVEMUMPSINCLUDES="#define AMG_HAVE_MUMPS_INCLUDES"
|
||||
CHAVEMUMPSINCLUDES="#define AMG_HAVE_MUMPS_INCLUDES"
|
||||
else
|
||||
# This should not happen
|
||||
MUMPS_FLAGS=""
|
||||
|
||||
Reference in New Issue
Block a user