mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-16 10:52:08 +00:00
psblas3:
base/modules/Makefile base/modules/psb_base_mat_mod.f03 base/modules/psb_d_base_mat_mod.f03 base/modules/psb_d_csr_mat_mod.f03 base/modules/psb_mat_mod.f03 base/modules/psbn_base_mat_mod.f03 base/modules/psbn_d_base_mat_mod.f03 base/modules/psbn_d_csr_mat_mod.f03 base/modules/psbn_mat_impl.f03 base/modules/psbn_mat_mod.f03 test/pargen/Makefile test/pargen/psb_d_csc_impl.f03 test/pargen/psb_d_csc_mat_mod.f03 test/pargen/psbn_d_csc_impl.f03 test/pargen/psbn_d_csc_mat_mod.f03 test/serial/Makefile test/serial/psb_d_cxx_impl.f03 test/serial/psb_d_cxx_mat_mod.f03 test/serial/psbn_d_cxx_impl.f03 test/serial/psbn_d_cxx_mat_mod.f03 Switchover to psb_completed.
This commit is contained in:
@@ -7,8 +7,8 @@ UTIL_MODS = psb_string_mod.o psb_spmat_type.o \
|
||||
psb_linmap_type_mod.o psb_comm_mod.o psb_psblas_mod.o \
|
||||
psi_serial_mod.o psi_mod.o psb_ip_reord_mod.o\
|
||||
psb_check_mod.o psb_gps_mod.o psb_linmap_mod.o psb_hash_mod.o\
|
||||
psbn_base_mat_mod.o psbn_d_base_mat_mod.o psbn_mat_mod.o\
|
||||
psbn_d_csr_mat_mod.o
|
||||
psb_base_mat_mod.o psb_d_base_mat_mod.o psb_mat_mod.o\
|
||||
psb_d_csr_mat_mod.o
|
||||
|
||||
MODULES=$(BASIC_MODS) $(UTIL_MODS)
|
||||
|
||||
@@ -26,9 +26,9 @@ lib: $(BASIC_MODS) blacsmod $(UTIL_MODS) $(OBJS) $(LIBMOD)
|
||||
/bin/cp -p *$(.mod) $(LIBDIR)
|
||||
|
||||
|
||||
psbn_base_mat_mod.o: psb_string_mod.o psb_sort_mod.o psb_ip_reord_mod.o psb_error_mod.o
|
||||
psbn_d_base_mat_mod.o: psbn_base_mat_mod.o
|
||||
psbn_mat_mod.o: psbn_d_base_mat_mod.o psbn_d_csr_mat_mod.o
|
||||
psb_base_mat_mod.o: psb_string_mod.o psb_sort_mod.o psb_ip_reord_mod.o psb_error_mod.o
|
||||
psb_d_base_mat_mod.o: psb_base_mat_mod.o
|
||||
psb_mat_mod.o: psb_d_base_mat_mod.o psb_d_csr_mat_mod.o
|
||||
psb_realloc_mod.o : psb_error_mod.o
|
||||
psb_spmat_type.o : psb_realloc_mod.o psb_error_mod.o psb_const_mod.o psb_string_mod.o psb_sort_mod.o
|
||||
psb_error_mod.o: psb_const_mod.o
|
||||
@@ -38,13 +38,13 @@ psb_blacs_mod.o: psb_const_mod.o
|
||||
psi_serial_mod.o: psb_const_mod.o psb_realloc_mod.o
|
||||
psi_mod.o: psb_penv_mod.o psb_error_mod.o psb_desc_type.o psb_const_mod.o psi_serial_mod.o psb_serial_mod.o
|
||||
psb_desc_type.o: psb_const_mod.o psb_error_mod.o psb_penv_mod.o psb_realloc_mod.o psb_hash_mod.o
|
||||
psb_linmap_mod.o: psb_linmap_type_mod.o psbn_mat_mod.o
|
||||
psb_linmap_type_mod.o: psb_desc_type.o psb_spmat_type.o psb_error_mod.o psb_serial_mod.o psb_comm_mod.o psbn_mat_mod.o
|
||||
psb_linmap_mod.o: psb_linmap_type_mod.o psb_mat_mod.o
|
||||
psb_linmap_type_mod.o: psb_desc_type.o psb_spmat_type.o psb_error_mod.o psb_serial_mod.o psb_comm_mod.o psb_mat_mod.o
|
||||
psb_check_mod.o: psb_desc_type.o
|
||||
psb_serial_mod.o: psb_spmat_type.o psb_string_mod.o psb_sort_mod.o psi_serial_mod.o
|
||||
psb_sort_mod.o: psb_error_mod.o psb_realloc_mod.o psb_const_mod.o
|
||||
psb_tools_mod.o: psb_spmat_type.o psb_desc_type.o psi_mod.o psb_gps_mod.o psb_linmap_mod.o psbn_mat_mod.o
|
||||
psb_psblas_mod.o: psbn_mat_mod.o psb_spmat_type.o psb_desc_type.o
|
||||
psb_tools_mod.o: psb_spmat_type.o psb_desc_type.o psi_mod.o psb_gps_mod.o psb_linmap_mod.o psb_mat_mod.o
|
||||
psb_psblas_mod.o: psb_mat_mod.o psb_spmat_type.o psb_desc_type.o
|
||||
psb_gps_mod.o: psb_realloc_mod.o
|
||||
psb_hash_mod.o: psb_const_mod.o psb_realloc_mod.o
|
||||
|
||||
|
||||
@@ -1,245 +0,0 @@
|
||||
subroutine psb_d_csall(nr,nc,a,info,nz)
|
||||
use psb_d_base_mat_mod
|
||||
use psb_realloc_mod
|
||||
use psb_sort_mod
|
||||
use psb_d_mat_mod, psb_protect_name => psb_d_csall
|
||||
implicit none
|
||||
type(psb_d_sparse_mat), intent(out) :: a
|
||||
integer, intent(in) :: nr,nc
|
||||
integer, intent(out) :: info
|
||||
integer, intent(in), optional :: nz
|
||||
|
||||
|
||||
info = 0
|
||||
call a%allocate(nr,nc,nz)
|
||||
call a%set_bld()
|
||||
return
|
||||
|
||||
end subroutine psb_d_csall
|
||||
|
||||
|
||||
subroutine psb_d_csput(nz,val,ia,ja,a,imin,imax,jmin,jmax,info,gtl)
|
||||
use psb_d_base_mat_mod
|
||||
use psb_error_mod
|
||||
use psb_d_mat_mod, psb_protect_name => psb_d_csput
|
||||
implicit none
|
||||
type(psb_d_sparse_mat), intent(inout) :: a
|
||||
real(psb_dpk_), intent(in) :: val(:)
|
||||
integer, intent(in) :: nz, ia(:), ja(:), imin,imax,jmin,jmax
|
||||
integer, intent(out) :: info
|
||||
integer, intent(in), optional :: gtl(:)
|
||||
|
||||
Integer :: err_act
|
||||
character(len=20) :: name='psb_csput'
|
||||
logical, parameter :: debug=.false.
|
||||
|
||||
info = 0
|
||||
call psb_erractionsave(err_act)
|
||||
if (.not.a%is_bld()) then
|
||||
info = 1121
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
endif
|
||||
|
||||
|
||||
call a%a%csput(nz,val,ia,ja,imin,imax,jmin,jmax,info,gtl)
|
||||
if (info /= 0) goto 9999
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
9999 continue
|
||||
call psb_erractionrestore(err_act)
|
||||
|
||||
if (err_act == psb_act_abort_) then
|
||||
call psb_error()
|
||||
return
|
||||
end if
|
||||
|
||||
end subroutine psb_d_csput
|
||||
|
||||
|
||||
|
||||
subroutine psb_d_spcnv(a,b,info,type,mold,upd,dupl)
|
||||
use psb_error_mod
|
||||
use psb_string_mod
|
||||
use psb_d_mat_mod, psb_protect_name => psb_d_spcnv
|
||||
implicit none
|
||||
type(psb_d_sparse_mat), intent(in) :: a
|
||||
type(psb_d_sparse_mat), intent(out) :: b
|
||||
integer, intent(out) :: info
|
||||
integer,optional, intent(in) :: dupl, upd
|
||||
character(len=*), optional, intent(in) :: type
|
||||
class(psb_d_base_sparse_mat), intent(in), optional :: mold
|
||||
|
||||
|
||||
class(psb_d_base_sparse_mat), allocatable :: altmp
|
||||
Integer :: err_act
|
||||
character(len=20) :: name='psb_cscnv'
|
||||
logical, parameter :: debug=.false.
|
||||
|
||||
info = 0
|
||||
call psb_erractionsave(err_act)
|
||||
|
||||
if (a%is_null()) then
|
||||
info = 1121
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
endif
|
||||
|
||||
if (present(dupl)) then
|
||||
call b%set_dupl(dupl)
|
||||
else if (a%is_bld()) then
|
||||
! Does this make sense at all?? Who knows..
|
||||
call b%set_dupl(psb_dupl_def_)
|
||||
end if
|
||||
|
||||
if (count( (/present(mold),present(type) /)) > 1) then
|
||||
info = 583
|
||||
call psb_errpush(info,name,a_err='TYPE, MOLD')
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
if (present(mold)) then
|
||||
|
||||
allocate(altmp, source=mold,stat=info)
|
||||
|
||||
else if (present(type)) then
|
||||
|
||||
select case (psb_toupper(type))
|
||||
case ('CSR')
|
||||
allocate(psb_d_csr_sparse_mat :: altmp, stat=info)
|
||||
case ('COO')
|
||||
allocate(psb_d_coo_sparse_mat :: altmp, stat=info)
|
||||
case default
|
||||
info = 136
|
||||
call psb_errpush(info,name,a_err=type)
|
||||
goto 9999
|
||||
end select
|
||||
else
|
||||
allocate(psb_d_csr_sparse_mat :: altmp, stat=info)
|
||||
end if
|
||||
|
||||
if (info /= 0) then
|
||||
info = 4000
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
call altmp%cp_from_fmt(a%a, info)
|
||||
|
||||
if (info /= 0) then
|
||||
info = 4010
|
||||
call psb_errpush(info,name,a_err="mv_from")
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
call move_alloc(altmp,b%a)
|
||||
call b%set_asb()
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
9999 continue
|
||||
call psb_erractionrestore(err_act)
|
||||
|
||||
if (err_act == psb_act_abort_) then
|
||||
call psb_error()
|
||||
return
|
||||
end if
|
||||
|
||||
end subroutine psb_d_spcnv
|
||||
|
||||
subroutine psb_d_spcnv_ip(a,info,type,mold,dupl)
|
||||
use psb_error_mod
|
||||
use psb_string_mod
|
||||
use psb_d_mat_mod, psb_protect_name => psb_d_spcnv_ip
|
||||
implicit none
|
||||
|
||||
type(psb_d_sparse_mat), intent(inout) :: a
|
||||
integer, intent(out) :: info
|
||||
integer,optional, intent(in) :: dupl
|
||||
character(len=*), optional, intent(in) :: type
|
||||
class(psb_d_base_sparse_mat), intent(in), optional :: mold
|
||||
|
||||
|
||||
class(psb_d_base_sparse_mat), allocatable :: altmp
|
||||
Integer :: err_act
|
||||
character(len=20) :: name='psb_cscnv'
|
||||
logical, parameter :: debug=.false.
|
||||
|
||||
info = 0
|
||||
call psb_erractionsave(err_act)
|
||||
|
||||
if (a%is_null()) then
|
||||
info = 1121
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
endif
|
||||
|
||||
if (present(dupl)) then
|
||||
call a%set_dupl(dupl)
|
||||
else if (a%is_bld()) then
|
||||
call a%set_dupl(psb_dupl_def_)
|
||||
end if
|
||||
|
||||
if (count( (/present(mold),present(type) /)) > 1) then
|
||||
info = 583
|
||||
call psb_errpush(info,name,a_err='TYPE, MOLD')
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
if (present(mold)) then
|
||||
|
||||
allocate(altmp, source=mold,stat=info)
|
||||
|
||||
else if (present(type)) then
|
||||
|
||||
select case (psb_toupper(type))
|
||||
case ('CSR')
|
||||
allocate(psb_d_csr_sparse_mat :: altmp, stat=info)
|
||||
case ('COO')
|
||||
allocate(psb_d_coo_sparse_mat :: altmp, stat=info)
|
||||
case default
|
||||
info = 136
|
||||
call psb_errpush(info,name,a_err=type)
|
||||
goto 9999
|
||||
end select
|
||||
else
|
||||
allocate(psb_d_csr_sparse_mat :: altmp, stat=info)
|
||||
end if
|
||||
|
||||
|
||||
if (info /= 0) then
|
||||
info = 4000
|
||||
call psb_errpush(info,name)
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
if (allocated(altmp)) then
|
||||
call altmp%mv_from_fmt(a%a, info)
|
||||
else
|
||||
write(0,*) 'Unallocated altmp??'
|
||||
info = -1
|
||||
end if
|
||||
if (info /= 0) then
|
||||
info = 4010
|
||||
call psb_errpush(info,name,a_err="mv_from")
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
call move_alloc(altmp,a%a)
|
||||
call a%set_asb()
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
9999 continue
|
||||
call psb_erractionrestore(err_act)
|
||||
|
||||
if (err_act == psb_act_abort_) then
|
||||
call psb_error()
|
||||
return
|
||||
end if
|
||||
|
||||
end subroutine psb_d_spcnv_ip
|
||||
@@ -16,11 +16,11 @@ EXEDIR=./runs
|
||||
|
||||
all: ppde spde
|
||||
|
||||
ppde: ppde.o psbn_d_csc_impl.o psbn_d_csc_mat_mod.o
|
||||
$(F90LINK) ppde.o psbn_d_csc_impl.o psbn_d_csc_mat_mod.o -o ppde $(PSBLAS_LIB) $(LDLIBS)
|
||||
ppde: ppde.o psb_d_csc_impl.o psb_d_csc_mat_mod.o
|
||||
$(F90LINK) ppde.o psb_d_csc_impl.o psb_d_csc_mat_mod.o -o ppde $(PSBLAS_LIB) $(LDLIBS)
|
||||
/bin/mv ppde $(EXEDIR)
|
||||
|
||||
psbn_d_csc_impl.o ppde.o: psbn_d_csc_mat_mod.o
|
||||
psb_d_csc_impl.o ppde.o: psb_d_csc_mat_mod.o
|
||||
|
||||
spde: spde.o
|
||||
$(F90LINK) spde.o -o spde $(PSBLAS_LIB) $(LDLIBS)
|
||||
|
||||
@@ -18,10 +18,10 @@ all: d_coo_matgen d_matgen
|
||||
d_coo_matgen: d_coo_matgen.o
|
||||
$(F90LINK) d_coo_matgen.o -o d_coo_matgen $(PSBLAS_LIB) $(LDLIBS)
|
||||
/bin/mv d_coo_matgen $(EXEDIR)
|
||||
d_matgen: d_matgen.o psbn_d_cxx_mat_mod.o psbn_d_cxx_impl.o
|
||||
$(F90LINK) d_matgen.o psbn_d_cxx_mat_mod.o psbn_d_cxx_impl.o -o d_matgen $(PSBLAS_LIB) $(LDLIBS)
|
||||
d_matgen: d_matgen.o psb_d_cxx_mat_mod.o psb_d_cxx_impl.o
|
||||
$(F90LINK) d_matgen.o psb_d_cxx_mat_mod.o psb_d_cxx_impl.o -o d_matgen $(PSBLAS_LIB) $(LDLIBS)
|
||||
/bin/mv d_matgen $(EXEDIR)
|
||||
d_matgen.o: psbn_d_cxx_mat_mod.o
|
||||
d_matgen.o: psb_d_cxx_mat_mod.o
|
||||
|
||||
#ppde spde
|
||||
|
||||
@@ -39,7 +39,7 @@ spde: spde.o
|
||||
|
||||
clean:
|
||||
/bin/rm -f d_coo_matgen.o d_matgen.o tpg.o ppde.o spde.o \
|
||||
psbn_d_cxx_mat_mod.o psbn_d_cxx_impl.o $(EXEDIR)/ppde
|
||||
psb_d_cxx_mat_mod.o psb_d_cxx_impl.o $(EXEDIR)/ppde
|
||||
verycleanlib:
|
||||
(cd ../..; make veryclean)
|
||||
lib:
|
||||
|
||||
Reference in New Issue
Block a user