Changelog
 Make.inc.in
 Makefile
 README
 base/Makefile
 base/modules/Makefile
 base/modules/psb_c_base_mat_mod.f03
 base/modules/psb_c_csc_mat_mod.f03
 base/modules/psb_c_csr_mat_mod.f03
 base/modules/psb_d_base_mat_mod.f03
 base/modules/psb_d_csc_mat_mod.f03
 base/modules/psb_d_csr_mat_mod.f03
 base/modules/psb_s_base_mat_mod.f03
 base/modules/psb_s_csc_mat_mod.f03
 base/modules/psb_s_csr_mat_mod.f03
 base/modules/psb_serial_mod.f90
 base/modules/psb_z_base_mat_mod.f03
 base/modules/psb_z_csc_mat_mod.f03
 base/modules/psb_z_csr_mat_mod.f03
 base/serial/Makefile
 base/serial/f03/psb_c_base_mat_impl.f03
 base/serial/f03/psb_c_coo_impl.f03
 base/serial/f03/psb_c_csc_impl.f03
 base/serial/f03/psb_c_csr_impl.f03
 base/serial/f03/psb_c_mat_impl.F03
 base/serial/f03/psb_d_base_mat_impl.f03
 base/serial/f03/psb_d_coo_impl.f03
 base/serial/f03/psb_d_csc_impl.f03
 base/serial/f03/psb_d_csr_impl.f03
 base/serial/f03/psb_d_mat_impl.F03
 base/serial/f03/psb_s_base_mat_impl.f03
 base/serial/f03/psb_s_coo_impl.f03
 base/serial/f03/psb_s_csc_impl.f03
 base/serial/f03/psb_s_csr_impl.f03
 base/serial/f03/psb_s_mat_impl.F03
 base/serial/f03/psb_z_base_mat_impl.f03
 base/serial/f03/psb_z_coo_impl.f03
 base/serial/f03/psb_z_csc_impl.f03
 base/serial/f03/psb_z_csr_impl.f03
 base/serial/f03/psb_z_mat_impl.F03
 prec/Makefile
 test/pargen/Makefile
 test/pargen/runs/ppde.inp

Merged the psblas3-tmold branch. 
Now uses MOLD= where available, and %MOLD method otherwise. 
Works on GNU 4.6.0 (see README).
psblas3-type-indexed
Salvatore Filippone 15 years ago
parent 07ec7a355d
commit c973412675

@ -1,5 +1,13 @@
Changelog. A lot less detailed than usual, at least for past Changelog. A lot less detailed than usual, at least for past
history. history.
2010/09/02: Fixed inheritance hierarchy of MOLD method. Merged into trunk.
2010/09/01: Changed Makefiles to allow for multiple submakes.
2010/08/31: Defined the MOLD method. Put under IFDEF in opposition to
MOLD= in allocation of CLASS variables.
2010/07/29: Make the aux component of base_mat a static array; works 2010/07/29: Make the aux component of base_mat a static array; works
around a problem with gfortran. The library does not fully around a problem with gfortran. The library does not fully
work yet under gfortran. work yet under gfortran.

@ -44,8 +44,6 @@ PSBFDEFINES=@FDEFINES@
PSBCDEFINES=@CDEFINES@ PSBCDEFINES=@CDEFINES@
AR=@AR@ AR=@AR@
RANLIB=@RANLIB@ RANLIB=@RANLIB@
CFLAGS=@CFLAGS@
FFLAGS=@FFLAGS@
INSTALL=@INSTALL@ INSTALL=@INSTALL@
INSTALL_DATA=@INSTALL_DATA@ INSTALL_DATA=@INSTALL_DATA@

@ -1,16 +1,24 @@
include Make.inc include Make.inc
all: library all: libd based precd kryld utild
library:
(if test ! -d lib ; then mkdir lib; fi)
(cd base; make lib)
(cd prec; make lib )
(cd krylov; make lib)
(cd util; make lib )
@echo "=====================================" @echo "====================================="
@echo "PSBLAS libraries Compilation Successful." @echo "PSBLAS libraries Compilation Successful."
based: libd
precd utild: based
kryld: precd based
libd:
(if test ! -d lib ; then mkdir lib; fi)
based:
(cd base; $(MAKE) lib)
precd:
(cd prec; $(MAKE) lib )
kryld:
(cd krylov; $(MAKE) lib)
utild:
(cd util; $(MAKE) lib )
install: install:
(./mkdir.sh $(INSTALL_DIR) &&\ (./mkdir.sh $(INSTALL_DIR) &&\
$(INSTALL_DATA) Make.inc $(INSTALL_DIR)) $(INSTALL_DATA) Make.inc $(INSTALL_DIR))
@ -21,19 +29,19 @@ install:
(./mkdir.sh $(INSTALL_DOCSDIR) && \ (./mkdir.sh $(INSTALL_DOCSDIR) && \
/bin/cp -fr docs/*pdf docs/html $(INSTALL_DOCSDIR)) /bin/cp -fr docs/*pdf docs/html $(INSTALL_DOCSDIR))
clean: clean:
(cd base; make clean) (cd base; $(MAKE) clean)
(cd prec; make clean ) (cd prec; $(MAKE) clean )
(cd krylov; make clean) (cd krylov; $(MAKE) clean)
(cd util; make clean) (cd util; $(MAKE) clean)
cleanlib: cleanlib:
(cd lib; /bin/rm -f *.a *$(.mod) *$(.fh)) (cd lib; /bin/rm -f *.a *$(.mod) *$(.fh))
veryclean: cleanlib veryclean: cleanlib
(cd base; make veryclean) (cd base; $(MAKE) veryclean)
(cd prec; make veryclean ) (cd prec; $(MAKE) veryclean )
(cd krylov; make veryclean) (cd krylov; $(MAKE) veryclean)
(cd util; make veryclean) (cd util; $(MAKE) veryclean)
(cd test/fileread; make clean) (cd test/fileread; $(MAKE) clean)
(cd test/pargen; make clean) (cd test/pargen; $(MAKE) clean)
(cd test/util; make clean) (cd test/util; $(MAKE) clean)

@ -10,10 +10,16 @@ FINAL subroutines), but the features we use were sufficient in
identifying bugs in ALL compilers we tried (all the bugs have been identifying bugs in ALL compilers we tried (all the bugs have been
reported and mostly fixed by the respective vendors). reported and mostly fixed by the respective vendors).
Notes: This code is confirmed to work with NAGware 5.2 and XLF 13.1. Notes: This code is confirmed to work with NAGware 5.2 on an i686 and
XLF 13.1 on a POWER6.
It does NOT work with GNU Fortran 4.5; it is one of the It does NOT work with GNU Fortran 4.5; it is one of the
testbeds for GNU Fortran 4.6, the active development version testbeds for GNU Fortran 4.6.
(as of May 2010), but does not work yet. GNU 4.6.0: as of Sep. 2, 2010 it works; note however that the
configure script will define the HAVE_MOLD compilation flag,
and this does not work properly until the fix for PR45451 is
available. Until then, you'll need to take out HAVE_MOLD by
hand in Make.inc.
If you find it working with other compilers, please let us If you find it working with other compilers, please let us
know. know.
@ -34,7 +40,7 @@ ACM Trans. on Math. Software, 26(4), Dec. 2000, pp. 527-550.
PLATFORMS: PLATFORMS:
obsolete... OBSOLETE!!!!!!!! see above ...
--The compilation process relies on the choice of an appropriate --The compilation process relies on the choice of an appropriate
--Make.inc file; we have tested with AIX XLF, Intel ifort/Linux, Nag --Make.inc file; we have tested with AIX XLF, Intel ifort/Linux, Nag
--f95/Linux, GNU Fortran/Linux, Sun Forte 6.2. If you succeed in --f95/Linux, GNU Fortran/Linux, Sun Forte 6.2. If you succeed in

@ -4,23 +4,32 @@ HERE=.
LIBDIR=../lib LIBDIR=../lib
LIBNAME=$(BASELIBNAME) LIBNAME=$(BASELIBNAME)
LIBMOD=psb_sparse_mod$(.mod) LIBMOD=psb_sparse_mod$(.mod)
lib: lib: mods sr cm in pb tl
(cd modules; make lib LIBNAME=$(BASELIBNAME) F90="$(MPF90)" F90COPT="$(F90COPT) $(MPI_OPT)")
(cd serial; make lib LIBNAME=$(BASELIBNAME))
(cd comm; make lib LIBNAME=$(BASELIBNAME))
(cd internals; make lib LIBNAME=$(BASELIBNAME))
(cd psblas; make lib LIBNAME=$(BASELIBNAME))
(cd tools; make lib LIBNAME=$(BASELIBNAME))
/bin/cp -p $(HERE)/$(LIBNAME) $(LIBDIR) /bin/cp -p $(HERE)/$(LIBNAME) $(LIBDIR)
/bin/cp -p $(LIBMOD) *$(.mod) $(LIBDIR) /bin/cp -p $(LIBMOD) *$(.mod) $(LIBDIR)
sr cm in pb tl: mods
mods:
(cd modules; $(MAKE) lib LIBNAME=$(BASELIBNAME) F90="$(MPF90)" F90COPT="$(F90COPT) $(MPI_OPT)")
sr:
(cd serial; $(MAKE) lib LIBNAME=$(BASELIBNAME))
cm:
(cd comm; $(MAKE) lib LIBNAME=$(BASELIBNAME))
in:
(cd internals; $(MAKE) lib LIBNAME=$(BASELIBNAME))
pb:
(cd psblas; $(MAKE) lib LIBNAME=$(BASELIBNAME))
tl:
(cd tools; $(MAKE) lib LIBNAME=$(BASELIBNAME))
clean: clean:
(cd modules; make clean) (cd modules; $(MAKE) clean)
(cd comm; make clean) (cd comm; $(MAKE) clean)
(cd internals; make clean) (cd internals; $(MAKE) clean)
(cd tools; make clean) (cd tools; $(MAKE) clean)
(cd serial; make clean) (cd serial; $(MAKE) clean)
(cd psblas; make clean) (cd psblas; $(MAKE) clean)
veryclean: clean veryclean: clean
/bin/rm -f $(HERE)/$(LIBNAME) $(LIBMOD) *$(.mod) /bin/rm -f $(HERE)/$(LIBNAME) $(LIBMOD) *$(.mod)

@ -30,19 +30,19 @@ CINCLUDES=-I.
FINCLUDES=$(FMFLAG)$(LIBDIR) $(FMFLAG). $(FIFLAG). FINCLUDES=$(FMFLAG)$(LIBDIR) $(FMFLAG). $(FIFLAG).
lib: $(BASIC_MODS) penvmod $(UTIL_MODS) $(OBJS) $(LIBMOD) lib: penvmod $(UTIL_MODS) $(OBJS)
$(AR) $(LIBDIR)/$(LIBNAME) $(MODULES) $(OBJS) $(MPFOBJS) $(AR) $(LIBDIR)/$(LIBNAME) $(MODULES) $(OBJS) $(MPFOBJS)
$(RANLIB) $(LIBDIR)/$(LIBNAME) $(RANLIB) $(LIBDIR)/$(LIBNAME)
/bin/cp -p $(LIBMOD) $(LIBDIR) /bin/cp -p $(LIBMOD) $(LIBDIR)
/bin/cp -p *$(.mod) $(LIBDIR) /bin/cp -p *$(.mod) $(LIBDIR)
psi_comm_buffers_mod.o: psb_const_mod.o
psi_penv_mod.o: psi_comm_buffers_mod.o psb_const_mod.o psb_realloc_mod.o psi_penv_mod.o: psi_comm_buffers_mod.o psb_const_mod.o psb_realloc_mod.o
psi_bcast_mod.o psi_reduce_mod.o psi_p2p_mod.o: psi_penv_mod.o psi_bcast_mod.o psi_reduce_mod.o psi_p2p_mod.o: psi_penv_mod.o
psb_penv_mod.o: psi_bcast_mod.o psi_reduce_mod.o psi_p2p_mod.o psb_penv_mod.o: psi_bcast_mod.o psi_reduce_mod.o psi_p2p_mod.o
psb_base_mat_mod.o: psb_string_mod.o psb_sort_mod.o psb_ip_reord_mod.o\ psb_base_mat_mod.o: psb_const_mod.o psi_serial_mod.o
psb_error_mod.o psi_serial_mod.o
psb_s_base_mat_mod.o psb_d_base_mat_mod.o psb_c_base_mat_mod.o psb_z_base_mat_mod.o: psb_base_mat_mod.o psb_s_base_mat_mod.o psb_d_base_mat_mod.o psb_c_base_mat_mod.o psb_z_base_mat_mod.o: psb_base_mat_mod.o
psb_s_mat_mod.o: psb_s_base_mat_mod.o psb_s_csr_mat_mod.o psb_s_csc_mat_mod.o psb_s_mat_mod.o: psb_s_base_mat_mod.o psb_s_csr_mat_mod.o psb_s_csc_mat_mod.o
psb_d_mat_mod.o: psb_d_base_mat_mod.o psb_d_csr_mat_mod.o psb_d_csc_mat_mod.o psb_d_mat_mod.o: psb_d_base_mat_mod.o psb_d_csr_mat_mod.o psb_d_csc_mat_mod.o
@ -53,7 +53,8 @@ psb_d_csc_mat_mod.o psb_d_csr_mat_mod.o: psb_d_base_mat_mod.o
psb_c_csc_mat_mod.o psb_c_csr_mat_mod.o: psb_c_base_mat_mod.o psb_c_csc_mat_mod.o psb_c_csr_mat_mod.o: psb_c_base_mat_mod.o
psb_z_csc_mat_mod.o psb_z_csr_mat_mod.o: psb_z_base_mat_mod.o psb_z_csc_mat_mod.o psb_z_csr_mat_mod.o: psb_z_base_mat_mod.o
psb_mat_mod.o: psb_s_mat_mod.o psb_d_mat_mod.o psb_c_mat_mod.o psb_z_mat_mod.o psb_mat_mod.o: psb_s_mat_mod.o psb_d_mat_mod.o psb_c_mat_mod.o psb_z_mat_mod.o
psb_realloc_mod.o : psb_error_mod.o error.o psb_realloc_mod.o : psb_error_mod.o
psb_error_impl.o : psb_error_mod.o psb_penv_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_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 psb_error_mod.o: psb_const_mod.o
psb_ip_reord_mod.o: psb_const_mod.o psb_ip_reord_mod.o: psb_const_mod.o
@ -71,20 +72,17 @@ psb_sort_mod.o: psb_error_mod.o psb_realloc_mod.o psb_const_mod.o
psb_tools_mod.o: psb_base_tools_mod.o psb_s_tools_mod.o psb_d_tools_mod.o\ psb_tools_mod.o: psb_base_tools_mod.o psb_s_tools_mod.o psb_d_tools_mod.o\
psb_c_tools_mod.o psb_z_tools_mod.o psb_c_tools_mod.o psb_z_tools_mod.o
psb_base_tools_mod.o psb_s_tools_mod.o psb_d_tools_mod.o psb_c_tools_mod.o psb_z_tools_mod.o: psb_desc_type.o psi_mod.o psb_gps_mod.o psb_mat_mod.o psb_base_tools_mod.o psb_s_tools_mod.o psb_d_tools_mod.o psb_c_tools_mod.o psb_z_tools_mod.o: psb_desc_type.o psi_mod.o psb_gps_mod.o psb_mat_mod.o
psb_psblas_mod.o: psb_mat_mod.o psb_desc_type.o psb_s_psblas_mod.o psb_c_psblas_mod.o \ psb_psblas_mod.o: psb_s_psblas_mod.o psb_c_psblas_mod.o psb_d_psblas_mod.o psb_z_psblas_mod.o
psb_d_psblas_mod.o psb_z_psblas_mod.o psb_s_psblas_mod.o psb_c_psblas_mod.o psb_d_psblas_mod.o psb_z_psblas_mod.o: psb_mat_mod.o psb_desc_type.o
psb_gps_mod.o: psb_realloc_mod.o psb_gps_mod.o: psb_realloc_mod.o
psb_hash_mod.o: psb_const_mod.o psb_realloc_mod.o psb_hash_mod.o: psb_const_mod.o psb_realloc_mod.o
psb_sparse_mod.o: $(MODULES) psb_sparse_mod.o: $(MODULES)
newmods: $(BASIC_MODS)
(cd ../newserial; make lib LIBNAME=$(LIBNAME))
penvmod: $(BASIC_MODS)
penvmod: ($(MAKE) psb_penv_mod.o F90COPT="$(F90COPT) $(EXTRA_OPT)")
(make psb_penv_mod.o F90COPT="$(F90COPT) $(EXTRA_OPT)")

@ -24,6 +24,7 @@ module psb_c_base_mat_mod
procedure, pass(a) :: c_csgetblk => psb_c_base_csgetblk procedure, pass(a) :: c_csgetblk => psb_c_base_csgetblk
generic, public :: csget => c_csgetrow, c_csgetblk generic, public :: csget => c_csgetrow, c_csgetblk
procedure, pass(a) :: csclip => psb_c_base_csclip procedure, pass(a) :: csclip => psb_c_base_csclip
procedure, pass(a) :: mold => psb_c_base_mold
procedure, pass(a) :: cp_to_coo => psb_c_base_cp_to_coo procedure, pass(a) :: cp_to_coo => psb_c_base_cp_to_coo
procedure, pass(a) :: cp_from_coo => psb_c_base_cp_from_coo procedure, pass(a) :: cp_from_coo => psb_c_base_cp_from_coo
procedure, pass(a) :: cp_to_fmt => psb_c_base_cp_to_fmt procedure, pass(a) :: cp_to_fmt => psb_c_base_cp_to_fmt
@ -87,6 +88,7 @@ module psb_c_base_mat_mod
procedure, pass(a) :: trim => psb_c_coo_trim procedure, pass(a) :: trim => psb_c_coo_trim
procedure, pass(a) :: print => psb_c_coo_print procedure, pass(a) :: print => psb_c_coo_print
procedure, pass(a) :: free => c_coo_free procedure, pass(a) :: free => c_coo_free
procedure, pass(a) :: mold => psb_c_coo_mold
procedure, pass(a) :: psb_c_coo_cp_from procedure, pass(a) :: psb_c_coo_cp_from
generic, public :: cp_from => psb_c_coo_cp_from generic, public :: cp_from => psb_c_coo_cp_from
procedure, pass(a) :: psb_c_coo_mv_from procedure, pass(a) :: psb_c_coo_mv_from
@ -268,6 +270,14 @@ module psb_c_base_mat_mod
end subroutine psb_c_base_csclip end subroutine psb_c_base_csclip
end interface end interface
interface
subroutine psb_c_base_mold(a,b,info)
import psb_c_base_sparse_mat, psb_long_int_k_
class(psb_c_base_sparse_mat), intent(in) :: a
class(psb_c_base_sparse_mat), intent(out), allocatable :: b
integer, intent(out) :: info
end subroutine psb_c_base_mold
end interface
interface interface
subroutine psb_c_base_cp_to_coo(a,b,info) subroutine psb_c_base_cp_to_coo(a,b,info)
@ -411,6 +421,15 @@ module psb_c_base_mat_mod
integer, intent(in), optional :: nz integer, intent(in), optional :: nz
end subroutine psb_c_coo_allocate_mnnz end subroutine psb_c_coo_allocate_mnnz
end interface end interface
interface
subroutine psb_c_coo_mold(a,b,info)
import psb_c_coo_sparse_mat, psb_c_base_sparse_mat, psb_long_int_k_
class(psb_c_coo_sparse_mat), intent(in) :: a
class(psb_c_base_sparse_mat), intent(out), allocatable :: b
integer, intent(out) :: info
end subroutine psb_c_coo_mold
end interface
interface interface
subroutine psb_c_coo_print(iout,a,iv,eirs,eics,head,ivr,ivc) subroutine psb_c_coo_print(iout,a,iv,eirs,eics,head,ivr,ivc)

@ -38,6 +38,7 @@ module psb_c_csc_mat_mod
procedure, pass(a) :: trim => psb_c_csc_trim procedure, pass(a) :: trim => psb_c_csc_trim
procedure, pass(a) :: print => psb_c_csc_print procedure, pass(a) :: print => psb_c_csc_print
procedure, pass(a) :: free => c_csc_free procedure, pass(a) :: free => c_csc_free
procedure, pass(a) :: mold => psb_c_csc_mold
procedure, pass(a) :: psb_c_csc_cp_from procedure, pass(a) :: psb_c_csc_cp_from
generic, public :: cp_from => psb_c_csc_cp_from generic, public :: cp_from => psb_c_csc_cp_from
procedure, pass(a) :: psb_c_csc_mv_from procedure, pass(a) :: psb_c_csc_mv_from
@ -80,6 +81,15 @@ module psb_c_csc_mat_mod
end subroutine psb_c_csc_allocate_mnnz end subroutine psb_c_csc_allocate_mnnz
end interface end interface
interface
subroutine psb_c_csc_mold(a,b,info)
import psb_c_csc_sparse_mat, psb_c_base_sparse_mat, psb_long_int_k_
class(psb_c_csc_sparse_mat), intent(in) :: a
class(psb_c_base_sparse_mat), intent(out), allocatable :: b
integer, intent(out) :: info
end subroutine psb_c_csc_mold
end interface
interface interface
subroutine psb_c_csc_print(iout,a,iv,eirs,eics,head,ivr,ivc) subroutine psb_c_csc_print(iout,a,iv,eirs,eics,head,ivr,ivc)
import psb_c_csc_sparse_mat import psb_c_csc_sparse_mat

@ -38,6 +38,7 @@ module psb_c_csr_mat_mod
procedure, pass(a) :: trim => psb_c_csr_trim procedure, pass(a) :: trim => psb_c_csr_trim
procedure, pass(a) :: print => psb_c_csr_print procedure, pass(a) :: print => psb_c_csr_print
procedure, pass(a) :: free => c_csr_free procedure, pass(a) :: free => c_csr_free
procedure, pass(a) :: mold => psb_c_csr_mold
procedure, pass(a) :: psb_c_csr_cp_from procedure, pass(a) :: psb_c_csr_cp_from
generic, public :: cp_from => psb_c_csr_cp_from generic, public :: cp_from => psb_c_csr_cp_from
procedure, pass(a) :: psb_c_csr_mv_from procedure, pass(a) :: psb_c_csr_mv_from
@ -80,6 +81,15 @@ module psb_c_csr_mat_mod
end subroutine psb_c_csr_allocate_mnnz end subroutine psb_c_csr_allocate_mnnz
end interface end interface
interface
subroutine psb_c_csr_mold(a,b,info)
import psb_c_csr_sparse_mat, psb_c_base_sparse_mat, psb_long_int_k_
class(psb_c_csr_sparse_mat), intent(in) :: a
class(psb_c_base_sparse_mat), intent(out), allocatable :: b
integer, intent(out) :: info
end subroutine psb_c_csr_mold
end interface
interface interface
subroutine psb_c_csr_print(iout,a,iv,eirs,eics,head,ivr,ivc) subroutine psb_c_csr_print(iout,a,iv,eirs,eics,head,ivr,ivc)
import psb_c_csr_sparse_mat import psb_c_csr_sparse_mat

@ -29,6 +29,7 @@ module psb_d_base_mat_mod
procedure, pass(a) :: d_csgetblk => psb_d_base_csgetblk procedure, pass(a) :: d_csgetblk => psb_d_base_csgetblk
generic, public :: csget => d_csgetrow, d_csgetblk generic, public :: csget => d_csgetrow, d_csgetblk
procedure, pass(a) :: csclip => psb_d_base_csclip procedure, pass(a) :: csclip => psb_d_base_csclip
procedure, pass(a) :: mold => psb_d_base_mold
procedure, pass(a) :: cp_to_coo => psb_d_base_cp_to_coo procedure, pass(a) :: cp_to_coo => psb_d_base_cp_to_coo
procedure, pass(a) :: cp_from_coo => psb_d_base_cp_from_coo procedure, pass(a) :: cp_from_coo => psb_d_base_cp_from_coo
procedure, pass(a) :: cp_to_fmt => psb_d_base_cp_to_fmt procedure, pass(a) :: cp_to_fmt => psb_d_base_cp_to_fmt
@ -97,6 +98,7 @@ module psb_d_base_mat_mod
procedure, pass(a) :: trim => psb_d_coo_trim procedure, pass(a) :: trim => psb_d_coo_trim
procedure, pass(a) :: print => psb_d_coo_print procedure, pass(a) :: print => psb_d_coo_print
procedure, pass(a) :: free => d_coo_free procedure, pass(a) :: free => d_coo_free
procedure, pass(a) :: mold => psb_d_coo_mold
procedure, pass(a) :: psb_d_coo_cp_from procedure, pass(a) :: psb_d_coo_cp_from
generic, public :: cp_from => psb_d_coo_cp_from generic, public :: cp_from => psb_d_coo_cp_from
procedure, pass(a) :: psb_d_coo_mv_from procedure, pass(a) :: psb_d_coo_mv_from
@ -318,6 +320,15 @@ module psb_d_base_mat_mod
end subroutine psb_d_base_csclip end subroutine psb_d_base_csclip
end interface end interface
interface
subroutine psb_d_base_mold(a,b,info)
import psb_d_base_sparse_mat, psb_long_int_k_
class(psb_d_base_sparse_mat), intent(in) :: a
class(psb_d_base_sparse_mat), intent(out), allocatable :: b
integer, intent(out) :: info
end subroutine psb_d_base_mold
end interface
interface interface
subroutine psb_d_base_cp_to_coo(a,b,info) subroutine psb_d_base_cp_to_coo(a,b,info)
@ -461,6 +472,16 @@ module psb_d_base_mat_mod
integer, intent(in), optional :: nz integer, intent(in), optional :: nz
end subroutine psb_d_coo_allocate_mnnz end subroutine psb_d_coo_allocate_mnnz
end interface end interface
interface
subroutine psb_d_coo_mold(a,b,info)
import psb_d_coo_sparse_mat, psb_d_base_sparse_mat, psb_long_int_k_
class(psb_d_coo_sparse_mat), intent(in) :: a
class(psb_d_base_sparse_mat), intent(out), allocatable :: b
integer, intent(out) :: info
end subroutine psb_d_coo_mold
end interface
interface interface
subroutine psb_d_coo_print(iout,a,iv,eirs,eics,head,ivr,ivc) subroutine psb_d_coo_print(iout,a,iv,eirs,eics,head,ivr,ivc)
@ -888,8 +909,7 @@ contains
! !
! == ================================== ! == ==================================
subroutine d_coo_free(a) subroutine d_coo_free(a)
implicit none implicit none

@ -43,6 +43,7 @@ module psb_d_csc_mat_mod
procedure, pass(a) :: trim => psb_d_csc_trim procedure, pass(a) :: trim => psb_d_csc_trim
procedure, pass(a) :: print => psb_d_csc_print procedure, pass(a) :: print => psb_d_csc_print
procedure, pass(a) :: free => d_csc_free procedure, pass(a) :: free => d_csc_free
procedure, pass(a) :: mold => psb_d_csc_mold
procedure, pass(a) :: psb_d_csc_cp_from procedure, pass(a) :: psb_d_csc_cp_from
generic, public :: cp_from => psb_d_csc_cp_from generic, public :: cp_from => psb_d_csc_cp_from
procedure, pass(a) :: psb_d_csc_mv_from procedure, pass(a) :: psb_d_csc_mv_from
@ -84,7 +85,16 @@ module psb_d_csc_mat_mod
integer, intent(in), optional :: nz integer, intent(in), optional :: nz
end subroutine psb_d_csc_allocate_mnnz end subroutine psb_d_csc_allocate_mnnz
end interface end interface
interface
subroutine psb_d_csc_mold(a,b,info)
import psb_d_csc_sparse_mat, psb_d_base_sparse_mat, psb_long_int_k_
class(psb_d_csc_sparse_mat), intent(in) :: a
class(psb_d_base_sparse_mat), intent(out), allocatable :: b
integer, intent(out) :: info
end subroutine psb_d_csc_mold
end interface
interface interface
subroutine psb_d_csc_print(iout,a,iv,eirs,eics,head,ivr,ivc) subroutine psb_d_csc_print(iout,a,iv,eirs,eics,head,ivr,ivc)
import psb_d_csc_sparse_mat import psb_d_csc_sparse_mat

@ -43,6 +43,7 @@ module psb_d_csr_mat_mod
procedure, pass(a) :: trim => psb_d_csr_trim procedure, pass(a) :: trim => psb_d_csr_trim
procedure, pass(a) :: print => psb_d_csr_print procedure, pass(a) :: print => psb_d_csr_print
procedure, pass(a) :: free => d_csr_free procedure, pass(a) :: free => d_csr_free
procedure, pass(a) :: mold => psb_d_csr_mold
procedure, pass(a) :: psb_d_csr_cp_from procedure, pass(a) :: psb_d_csr_cp_from
generic, public :: cp_from => psb_d_csr_cp_from generic, public :: cp_from => psb_d_csr_cp_from
procedure, pass(a) :: psb_d_csr_mv_from procedure, pass(a) :: psb_d_csr_mv_from
@ -76,6 +77,15 @@ module psb_d_csr_mat_mod
end subroutine psb_d_csr_trim end subroutine psb_d_csr_trim
end interface end interface
interface
subroutine psb_d_csr_mold(a,b,info)
import psb_d_csr_sparse_mat, psb_d_base_sparse_mat, psb_long_int_k_
class(psb_d_csr_sparse_mat), intent(in) :: a
class(psb_d_base_sparse_mat), intent(out), allocatable :: b
integer, intent(out) :: info
end subroutine psb_d_csr_mold
end interface
interface interface
subroutine psb_d_csr_allocate_mnnz(m,n,a,nz) subroutine psb_d_csr_allocate_mnnz(m,n,a,nz)
import psb_d_csr_sparse_mat import psb_d_csr_sparse_mat

@ -24,6 +24,7 @@ module psb_s_base_mat_mod
procedure, pass(a) :: s_csgetblk => psb_s_base_csgetblk procedure, pass(a) :: s_csgetblk => psb_s_base_csgetblk
generic, public :: csget => s_csgetrow, s_csgetblk generic, public :: csget => s_csgetrow, s_csgetblk
procedure, pass(a) :: csclip => psb_s_base_csclip procedure, pass(a) :: csclip => psb_s_base_csclip
procedure, pass(a) :: mold => psb_s_base_mold
procedure, pass(a) :: cp_to_coo => psb_s_base_cp_to_coo procedure, pass(a) :: cp_to_coo => psb_s_base_cp_to_coo
procedure, pass(a) :: cp_from_coo => psb_s_base_cp_from_coo procedure, pass(a) :: cp_from_coo => psb_s_base_cp_from_coo
procedure, pass(a) :: cp_to_fmt => psb_s_base_cp_to_fmt procedure, pass(a) :: cp_to_fmt => psb_s_base_cp_to_fmt
@ -87,6 +88,7 @@ module psb_s_base_mat_mod
procedure, pass(a) :: trim => psb_s_coo_trim procedure, pass(a) :: trim => psb_s_coo_trim
procedure, pass(a) :: print => psb_s_coo_print procedure, pass(a) :: print => psb_s_coo_print
procedure, pass(a) :: free => s_coo_free procedure, pass(a) :: free => s_coo_free
procedure, pass(a) :: mold => psb_s_coo_mold
procedure, pass(a) :: psb_s_coo_cp_from procedure, pass(a) :: psb_s_coo_cp_from
generic, public :: cp_from => psb_s_coo_cp_from generic, public :: cp_from => psb_s_coo_cp_from
procedure, pass(a) :: psb_s_coo_mv_from procedure, pass(a) :: psb_s_coo_mv_from
@ -268,6 +270,15 @@ module psb_s_base_mat_mod
end subroutine psb_s_base_csclip end subroutine psb_s_base_csclip
end interface end interface
interface
subroutine psb_s_base_mold(a,b,info)
import psb_s_base_sparse_mat, psb_long_int_k_
class(psb_s_base_sparse_mat), intent(in) :: a
class(psb_s_base_sparse_mat), intent(out), allocatable :: b
integer, intent(out) :: info
end subroutine psb_s_base_mold
end interface
interface interface
subroutine psb_s_base_cp_to_coo(a,b,info) subroutine psb_s_base_cp_to_coo(a,b,info)
@ -412,6 +423,15 @@ module psb_s_base_mat_mod
end subroutine psb_s_coo_allocate_mnnz end subroutine psb_s_coo_allocate_mnnz
end interface end interface
interface
subroutine psb_s_coo_mold(a,b,info)
import psb_s_coo_sparse_mat, psb_s_base_sparse_mat, psb_long_int_k_
class(psb_s_coo_sparse_mat), intent(in) :: a
class(psb_s_base_sparse_mat), intent(out), allocatable :: b
integer, intent(out) :: info
end subroutine psb_s_coo_mold
end interface
interface interface
subroutine psb_s_coo_print(iout,a,iv,eirs,eics,head,ivr,ivc) subroutine psb_s_coo_print(iout,a,iv,eirs,eics,head,ivr,ivc)
import psb_s_coo_sparse_mat import psb_s_coo_sparse_mat

@ -38,6 +38,7 @@ module psb_s_csc_mat_mod
procedure, pass(a) :: trim => psb_s_csc_trim procedure, pass(a) :: trim => psb_s_csc_trim
procedure, pass(a) :: print => psb_s_csc_print procedure, pass(a) :: print => psb_s_csc_print
procedure, pass(a) :: free => s_csc_free procedure, pass(a) :: free => s_csc_free
procedure, pass(a) :: mold => psb_s_csc_mold
procedure, pass(a) :: psb_s_csc_cp_from procedure, pass(a) :: psb_s_csc_cp_from
generic, public :: cp_from => psb_s_csc_cp_from generic, public :: cp_from => psb_s_csc_cp_from
procedure, pass(a) :: psb_s_csc_mv_from procedure, pass(a) :: psb_s_csc_mv_from
@ -80,6 +81,15 @@ module psb_s_csc_mat_mod
end subroutine psb_s_csc_allocate_mnnz end subroutine psb_s_csc_allocate_mnnz
end interface end interface
interface
subroutine psb_s_csc_mold(a,b,info)
import psb_s_csc_sparse_mat, psb_s_base_sparse_mat, psb_long_int_k_
class(psb_s_csc_sparse_mat), intent(in) :: a
class(psb_s_base_sparse_mat), intent(out), allocatable :: b
integer, intent(out) :: info
end subroutine psb_s_csc_mold
end interface
interface interface
subroutine psb_s_csc_print(iout,a,iv,eirs,eics,head,ivr,ivc) subroutine psb_s_csc_print(iout,a,iv,eirs,eics,head,ivr,ivc)
import psb_s_csc_sparse_mat import psb_s_csc_sparse_mat

@ -38,6 +38,7 @@ module psb_s_csr_mat_mod
procedure, pass(a) :: trim => psb_s_csr_trim procedure, pass(a) :: trim => psb_s_csr_trim
procedure, pass(a) :: print => psb_s_csr_print procedure, pass(a) :: print => psb_s_csr_print
procedure, pass(a) :: free => s_csr_free procedure, pass(a) :: free => s_csr_free
procedure, pass(a) :: mold => psb_s_csr_mold
procedure, pass(a) :: psb_s_csr_cp_from procedure, pass(a) :: psb_s_csr_cp_from
generic, public :: cp_from => psb_s_csr_cp_from generic, public :: cp_from => psb_s_csr_cp_from
procedure, pass(a) :: psb_s_csr_mv_from procedure, pass(a) :: psb_s_csr_mv_from
@ -79,6 +80,15 @@ module psb_s_csr_mat_mod
integer, intent(in), optional :: nz integer, intent(in), optional :: nz
end subroutine psb_s_csr_allocate_mnnz end subroutine psb_s_csr_allocate_mnnz
end interface end interface
interface
subroutine psb_s_csr_mold(a,b,info)
import psb_s_csr_sparse_mat, psb_s_base_sparse_mat, psb_long_int_k_
class(psb_s_csr_sparse_mat), intent(in) :: a
class(psb_s_base_sparse_mat), intent(out), allocatable :: b
integer, intent(out) :: info
end subroutine psb_s_csr_mold
end interface
interface interface
subroutine psb_s_csr_print(iout,a,iv,eirs,eics,head,ivr,ivc) subroutine psb_s_csr_print(iout,a,iv,eirs,eics,head,ivr,ivc)

@ -40,7 +40,6 @@ module psb_serial_mod
& psb_gth => psi_gth,& & psb_gth => psi_gth,&
& psb_sct => psi_sct & psb_sct => psi_sct
!!$ use psb_mat_mod
interface psb_symbmm interface psb_symbmm
subroutine psb_ssymbmm(a,b,c,info) subroutine psb_ssymbmm(a,b,c,info)

@ -24,6 +24,7 @@ module psb_z_base_mat_mod
procedure, pass(a) :: z_csgetblk => psb_z_base_csgetblk procedure, pass(a) :: z_csgetblk => psb_z_base_csgetblk
generic, public :: csget => z_csgetrow, z_csgetblk generic, public :: csget => z_csgetrow, z_csgetblk
procedure, pass(a) :: csclip => psb_z_base_csclip procedure, pass(a) :: csclip => psb_z_base_csclip
procedure, pass(a) :: mold => psb_z_base_mold
procedure, pass(a) :: cp_to_coo => psb_z_base_cp_to_coo procedure, pass(a) :: cp_to_coo => psb_z_base_cp_to_coo
procedure, pass(a) :: cp_from_coo => psb_z_base_cp_from_coo procedure, pass(a) :: cp_from_coo => psb_z_base_cp_from_coo
procedure, pass(a) :: cp_to_fmt => psb_z_base_cp_to_fmt procedure, pass(a) :: cp_to_fmt => psb_z_base_cp_to_fmt
@ -87,6 +88,7 @@ module psb_z_base_mat_mod
procedure, pass(a) :: trim => psb_z_coo_trim procedure, pass(a) :: trim => psb_z_coo_trim
procedure, pass(a) :: print => psb_z_coo_print procedure, pass(a) :: print => psb_z_coo_print
procedure, pass(a) :: free => z_coo_free procedure, pass(a) :: free => z_coo_free
procedure, pass(a) :: mold => psb_z_coo_mold
procedure, pass(a) :: psb_z_coo_cp_from procedure, pass(a) :: psb_z_coo_cp_from
generic, public :: cp_from => psb_z_coo_cp_from generic, public :: cp_from => psb_z_coo_cp_from
procedure, pass(a) :: psb_z_coo_mv_from procedure, pass(a) :: psb_z_coo_mv_from
@ -268,6 +270,15 @@ module psb_z_base_mat_mod
end subroutine psb_z_base_csclip end subroutine psb_z_base_csclip
end interface end interface
interface
subroutine psb_z_base_mold(a,b,info)
import psb_z_base_sparse_mat, psb_long_int_k_
class(psb_z_base_sparse_mat), intent(in) :: a
class(psb_z_base_sparse_mat), intent(out), allocatable :: b
integer, intent(out) :: info
end subroutine psb_z_base_mold
end interface
interface interface
subroutine psb_z_base_cp_to_coo(a,b,info) subroutine psb_z_base_cp_to_coo(a,b,info)
@ -411,6 +422,15 @@ module psb_z_base_mat_mod
integer, intent(in), optional :: nz integer, intent(in), optional :: nz
end subroutine psb_z_coo_allocate_mnnz end subroutine psb_z_coo_allocate_mnnz
end interface end interface
interface
subroutine psb_z_coo_mold(a,b,info)
import psb_z_coo_sparse_mat, psb_z_base_sparse_mat, psb_long_int_k_
class(psb_z_coo_sparse_mat), intent(in) :: a
class(psb_z_base_sparse_mat), intent(out), allocatable :: b
integer, intent(out) :: info
end subroutine psb_z_coo_mold
end interface
interface interface
subroutine psb_z_coo_print(iout,a,iv,eirs,eics,head,ivr,ivc) subroutine psb_z_coo_print(iout,a,iv,eirs,eics,head,ivr,ivc)

@ -38,6 +38,7 @@ module psb_z_csc_mat_mod
procedure, pass(a) :: trim => psb_z_csc_trim procedure, pass(a) :: trim => psb_z_csc_trim
procedure, pass(a) :: print => psb_z_csc_print procedure, pass(a) :: print => psb_z_csc_print
procedure, pass(a) :: free => z_csc_free procedure, pass(a) :: free => z_csc_free
procedure, pass(a) :: mold => psb_z_csc_mold
procedure, pass(a) :: psb_z_csc_cp_from procedure, pass(a) :: psb_z_csc_cp_from
generic, public :: cp_from => psb_z_csc_cp_from generic, public :: cp_from => psb_z_csc_cp_from
procedure, pass(a) :: psb_z_csc_mv_from procedure, pass(a) :: psb_z_csc_mv_from
@ -79,6 +80,15 @@ module psb_z_csc_mat_mod
integer, intent(in), optional :: nz integer, intent(in), optional :: nz
end subroutine psb_z_csc_allocate_mnnz end subroutine psb_z_csc_allocate_mnnz
end interface end interface
interface
subroutine psb_z_csc_mold(a,b,info)
import psb_z_csc_sparse_mat, psb_z_base_sparse_mat, psb_long_int_k_
class(psb_z_csc_sparse_mat), intent(in) :: a
class(psb_z_base_sparse_mat), intent(out), allocatable :: b
integer, intent(out) :: info
end subroutine psb_z_csc_mold
end interface
interface interface
subroutine psb_z_csc_print(iout,a,iv,eirs,eics,head,ivr,ivc) subroutine psb_z_csc_print(iout,a,iv,eirs,eics,head,ivr,ivc)

@ -38,6 +38,7 @@ module psb_z_csr_mat_mod
procedure, pass(a) :: trim => psb_z_csr_trim procedure, pass(a) :: trim => psb_z_csr_trim
procedure, pass(a) :: print => psb_z_csr_print procedure, pass(a) :: print => psb_z_csr_print
procedure, pass(a) :: free => z_csr_free procedure, pass(a) :: free => z_csr_free
procedure, pass(a) :: mold => psb_z_csr_mold
procedure, pass(a) :: psb_z_csr_cp_from procedure, pass(a) :: psb_z_csr_cp_from
generic, public :: cp_from => psb_z_csr_cp_from generic, public :: cp_from => psb_z_csr_cp_from
procedure, pass(a) :: psb_z_csr_mv_from procedure, pass(a) :: psb_z_csr_mv_from
@ -79,7 +80,16 @@ module psb_z_csr_mat_mod
integer, intent(in), optional :: nz integer, intent(in), optional :: nz
end subroutine psb_z_csr_allocate_mnnz end subroutine psb_z_csr_allocate_mnnz
end interface end interface
interface
subroutine psb_z_csr_mold(a,b,info)
import psb_z_csr_sparse_mat, psb_z_base_sparse_mat, psb_long_int_k_
class(psb_z_csr_sparse_mat), intent(in) :: a
class(psb_z_base_sparse_mat), intent(out), allocatable :: b
integer, intent(out) :: info
end subroutine psb_z_csr_mold
end interface
interface interface
subroutine psb_z_csr_print(iout,a,iv,eirs,eics,head,ivr,ivc) subroutine psb_z_csr_print(iout,a,iv,eirs,eics,head,ivr,ivc)
import psb_z_csr_sparse_mat import psb_z_csr_sparse_mat

@ -20,17 +20,17 @@ lib1: $(FOBJS)
auxd: auxd:
(cd aux; make lib) (cd aux; $(MAKE) lib)
f77d: f77d:
(cd f77; make lib) (cd f77; $(MAKE) lib)
f03d: f03d:
(cd f03; make lib) (cd f03; $(MAKE) lib)
clean: clean:
/bin/rm -f $(FOBJS) *$(.mod) /bin/rm -f $(FOBJS) *$(.mod)
(cd aux; make clean) (cd aux; $(MAKE) clean)
(cd f77; make clean) (cd f77; $(MAKE) clean)
(cd f03; make clean) (cd f03; $(MAKE) clean)
veryclean: clean veryclean: clean

@ -443,6 +443,30 @@ subroutine psb_c_base_csclip(a,b,info,&
end subroutine psb_c_base_csclip end subroutine psb_c_base_csclip
subroutine psb_c_base_mold(a,b,info)
use psb_c_base_mat_mod, psb_protect_name => psb_c_base_mold
use psb_error_mod
implicit none
class(psb_c_base_sparse_mat), intent(in) :: a
class(psb_c_base_sparse_mat), intent(out), allocatable :: b
integer, intent(out) :: info
Integer :: err_act
character(len=20) :: name='reallocate_nz'
logical, parameter :: debug=.false.
call psb_get_erraction(err_act)
! This is the base version. If we get here
! it means the derived class is incomplete,
! so we throw an error.
info = psb_err_missing_override_method_
call psb_errpush(info,name,a_err=a%get_fmt())
if (err_act /= psb_act_ret_) then
call psb_error()
end if
return
end subroutine psb_c_base_mold
subroutine psb_c_base_transp_2mat(a,b) subroutine psb_c_base_transp_2mat(a,b)
use psb_c_base_mat_mod, psb_protect_name => psb_c_base_transp_2mat use psb_c_base_mat_mod, psb_protect_name => psb_c_base_transp_2mat

@ -155,6 +155,34 @@ subroutine psb_c_coo_reallocate_nz(nz,a)
end subroutine psb_c_coo_reallocate_nz end subroutine psb_c_coo_reallocate_nz
subroutine psb_c_coo_mold(a,b,info)
use psb_c_base_mat_mod, psb_protect_name => psb_c_coo_mold
use psb_error_mod
implicit none
class(psb_c_coo_sparse_mat), intent(in) :: a
class(psb_c_base_sparse_mat), intent(out), allocatable :: b
integer, intent(out) :: info
Integer :: err_act
character(len=20) :: name='reallocate_nz'
logical, parameter :: debug=.false.
call psb_get_erraction(err_act)
allocate(psb_c_coo_sparse_mat :: b, stat=info)
if (info /= psb_success_) then
info = psb_err_alloc_dealloc_
call psb_errpush(info, name)
goto 9999
end if
return
9999 continue
if (err_act /= psb_act_ret_) then
call psb_error()
end if
return
end subroutine psb_c_coo_mold
subroutine psb_c_coo_reinit(a,clear) subroutine psb_c_coo_reinit(a,clear)

@ -2599,6 +2599,34 @@ subroutine psb_c_cp_csc_from_fmt(a,b,info)
end select end select
end subroutine psb_c_cp_csc_from_fmt end subroutine psb_c_cp_csc_from_fmt
subroutine psb_c_csc_mold(a,b,info)
use psb_c_csc_mat_mod, psb_protect_name => psb_c_csc_mold
use psb_error_mod
implicit none
class(psb_c_csc_sparse_mat), intent(in) :: a
class(psb_c_base_sparse_mat), intent(out), allocatable :: b
integer, intent(out) :: info
Integer :: err_act
character(len=20) :: name='reallocate_nz'
logical, parameter :: debug=.false.
call psb_get_erraction(err_act)
allocate(psb_c_csc_sparse_mat :: b, stat=info)
if (info /= psb_success_) then
info = psb_err_alloc_dealloc_
call psb_errpush(info, name)
goto 9999
end if
return
9999 continue
if (err_act /= psb_act_ret_) then
call psb_error()
end if
return
end subroutine psb_c_csc_mold
subroutine psb_c_csc_reallocate_nz(nz,a) subroutine psb_c_csc_reallocate_nz(nz,a)
use psb_error_mod use psb_error_mod

@ -1441,6 +1441,34 @@ subroutine psb_c_csr_reallocate_nz(nz,a)
end subroutine psb_c_csr_reallocate_nz end subroutine psb_c_csr_reallocate_nz
subroutine psb_c_csr_mold(a,b,info)
use psb_c_csr_mat_mod, psb_protect_name => psb_c_csr_mold
use psb_error_mod
implicit none
class(psb_c_csr_sparse_mat), intent(in) :: a
class(psb_c_base_sparse_mat), intent(out), allocatable :: b
integer, intent(out) :: info
Integer :: err_act
character(len=20) :: name='reallocate_nz'
logical, parameter :: debug=.false.
call psb_get_erraction(err_act)
allocate(psb_c_csr_sparse_mat :: b, stat=info)
if (info /= psb_success_) then
info = psb_err_alloc_dealloc_
call psb_errpush(info, name)
goto 9999
end if
return
9999 continue
if (err_act /= psb_act_ret_) then
call psb_error()
end if
return
end subroutine psb_c_csr_mold
subroutine psb_c_csr_allocate_mnnz(m,n,a,nz) subroutine psb_c_csr_allocate_mnnz(m,n,a,nz)
use psb_error_mod use psb_error_mod

@ -998,7 +998,7 @@ subroutine psb_c_cscnv(a,b,info,type,mold,upd,dupl)
#if defined(HAVE_MOLD) #if defined(HAVE_MOLD)
allocate(altmp, mold=mold,stat=info) allocate(altmp, mold=mold,stat=info)
#else #else
allocate(altmp, source=mold,stat=info) call mold%mold(altmp,info)
#endif #endif
else if (present(type)) then else if (present(type)) then
@ -1098,7 +1098,7 @@ subroutine psb_c_cscnv_ip(a,info,type,mold,dupl)
#if defined(HAVE_MOLD) #if defined(HAVE_MOLD)
allocate(altmp, mold=mold,stat=info) allocate(altmp, mold=mold,stat=info)
#else #else
allocate(altmp, source=mold,stat=info) call mold%mold(altmp,info)
#endif #endif
else if (present(type)) then else if (present(type)) then
@ -1345,7 +1345,7 @@ subroutine psb_c_mv_from(a,b)
#if defined(HAVE_MOLD) #if defined(HAVE_MOLD)
allocate(a%a,mold=b, stat=info) allocate(a%a,mold=b, stat=info)
#else #else
allocate(a%a,source=b, stat=info) call b%mold(a%a,info)
#endif #endif
call a%a%mv_from_fmt(b,info) call a%a%mv_from_fmt(b,info)
call b%free() call b%free()
@ -1370,8 +1370,9 @@ subroutine psb_c_cp_from(a,b)
#if defined(HAVE_MOLD) #if defined(HAVE_MOLD)
allocate(a%a,mold=b,stat=info) allocate(a%a,mold=b,stat=info)
if (info /= psb_success_) info = psb_err_alloc_dealloc_
#else #else
allocate(a%a,source=b,stat=info) call b%mold(a%a,info)
#endif #endif
if (info /= psb_success_) info = psb_err_alloc_dealloc_ if (info /= psb_success_) info = psb_err_alloc_dealloc_
if (info == psb_success_) call a%a%cp_from_fmt(b, info) if (info == psb_success_) call a%a%cp_from_fmt(b, info)
@ -1459,8 +1460,9 @@ subroutine psb_c_sparse_mat_clone(a,b,info)
#if defined(HAVE_MOLD) #if defined(HAVE_MOLD)
allocate(b%a,mold=a%a,stat=info) allocate(b%a,mold=a%a,stat=info)
if (info /= psb_success_) info = psb_err_alloc_dealloc_
#else #else
allocate(b%a,source=a%a,stat=info) call a%a%mold(b%a,info)
#endif #endif
if (info /= psb_success_) info = psb_err_alloc_dealloc_ if (info /= psb_success_) info = psb_err_alloc_dealloc_
if (info == psb_success_) call b%a%cp_from_fmt(a%a, info) if (info == psb_success_) call b%a%cp_from_fmt(a%a, info)
@ -1540,7 +1542,7 @@ subroutine psb_c_transp_2mat(a,b)
#if defined(HAVE_MOLD) #if defined(HAVE_MOLD)
allocate(a%a,mold=b%a,stat=info) allocate(a%a,mold=b%a,stat=info)
#else #else
allocate(a%a,source=b%a,stat=info) call b%a%mold(a%a,info)
#endif #endif
if (info /= psb_success_) then if (info /= psb_success_) then
info = psb_err_alloc_dealloc_ info = psb_err_alloc_dealloc_
@ -1621,7 +1623,7 @@ subroutine psb_c_transc_2mat(a,b)
#if defined(HAVE_MOLD) #if defined(HAVE_MOLD)
allocate(a%a,mold=b%a,stat=info) allocate(a%a,mold=b%a,stat=info)
#else #else
allocate(a%a,source=b%a,stat=info) call b%a%mold(a%a,info)
#endif #endif
if (info /= psb_success_) then if (info /= psb_success_) then
info = psb_err_alloc_dealloc_ info = psb_err_alloc_dealloc_

@ -443,6 +443,30 @@ subroutine psb_d_base_csclip(a,b,info,&
end subroutine psb_d_base_csclip end subroutine psb_d_base_csclip
subroutine psb_d_base_mold(a,b,info)
use psb_d_base_mat_mod, psb_protect_name => psb_d_base_mold
use psb_error_mod
implicit none
class(psb_d_base_sparse_mat), intent(in) :: a
class(psb_d_base_sparse_mat), intent(out), allocatable :: b
integer, intent(out) :: info
Integer :: err_act
character(len=20) :: name='reallocate_nz'
logical, parameter :: debug=.false.
call psb_get_erraction(err_act)
! This is the base version. If we get here
! it means the derived class is incomplete,
! so we throw an error.
info = psb_err_missing_override_method_
call psb_errpush(info,name,a_err=a%get_fmt())
if (err_act /= psb_act_ret_) then
call psb_error()
end if
return
end subroutine psb_d_base_mold
subroutine psb_d_base_transp_2mat(a,b) subroutine psb_d_base_transp_2mat(a,b)
use psb_d_base_mat_mod, psb_protect_name => psb_d_base_transp_2mat use psb_d_base_mat_mod, psb_protect_name => psb_d_base_transp_2mat

@ -155,6 +155,34 @@ subroutine psb_d_coo_reallocate_nz(nz,a)
end subroutine psb_d_coo_reallocate_nz end subroutine psb_d_coo_reallocate_nz
subroutine psb_d_coo_mold(a,b,info)
use psb_d_base_mat_mod, psb_protect_name => psb_d_coo_mold
use psb_error_mod
implicit none
class(psb_d_coo_sparse_mat), intent(in) :: a
class(psb_d_base_sparse_mat), intent(out), allocatable :: b
integer, intent(out) :: info
Integer :: err_act
character(len=20) :: name='reallocate_nz'
logical, parameter :: debug=.false.
call psb_get_erraction(err_act)
allocate(psb_d_coo_sparse_mat :: b, stat=info)
if (info /= psb_success_) then
info = psb_err_alloc_dealloc_
call psb_errpush(info, name)
goto 9999
end if
return
9999 continue
if (err_act /= psb_act_ret_) then
call psb_error()
end if
return
end subroutine psb_d_coo_mold
subroutine psb_d_coo_reinit(a,clear) subroutine psb_d_coo_reinit(a,clear)

@ -2472,6 +2472,35 @@ subroutine psb_d_cp_csc_from_fmt(a,b,info)
end select end select
end subroutine psb_d_cp_csc_from_fmt end subroutine psb_d_cp_csc_from_fmt
subroutine psb_d_csc_mold(a,b,info)
use psb_d_csc_mat_mod, psb_protect_name => psb_d_csc_mold
use psb_error_mod
implicit none
class(psb_d_csc_sparse_mat), intent(in) :: a
class(psb_d_base_sparse_mat), intent(out), allocatable :: b
integer, intent(out) :: info
Integer :: err_act
character(len=20) :: name='reallocate_nz'
logical, parameter :: debug=.false.
call psb_get_erraction(err_act)
allocate(psb_d_csc_sparse_mat :: b, stat=info)
if (info /= psb_success_) then
info = psb_err_alloc_dealloc_
call psb_errpush(info, name)
goto 9999
end if
return
9999 continue
if (err_act /= psb_act_ret_) then
call psb_error()
end if
return
end subroutine psb_d_csc_mold
subroutine psb_d_csc_reallocate_nz(nz,a) subroutine psb_d_csc_reallocate_nz(nz,a)
use psb_error_mod use psb_error_mod

@ -1491,6 +1491,34 @@ subroutine psb_d_csr_reallocate_nz(nz,a)
end subroutine psb_d_csr_reallocate_nz end subroutine psb_d_csr_reallocate_nz
subroutine psb_d_csr_mold(a,b,info)
use psb_d_csr_mat_mod, psb_protect_name => psb_d_csr_mold
use psb_error_mod
implicit none
class(psb_d_csr_sparse_mat), intent(in) :: a
class(psb_d_base_sparse_mat), intent(out), allocatable :: b
integer, intent(out) :: info
Integer :: err_act
character(len=20) :: name='reallocate_nz'
logical, parameter :: debug=.false.
call psb_get_erraction(err_act)
allocate(psb_d_csr_sparse_mat :: b, stat=info)
if (info /= psb_success_) then
info = psb_err_alloc_dealloc_
call psb_errpush(info, name)
goto 9999
end if
return
9999 continue
if (err_act /= psb_act_ret_) then
call psb_error()
end if
return
end subroutine psb_d_csr_mold
subroutine psb_d_csr_allocate_mnnz(m,n,a,nz) subroutine psb_d_csr_allocate_mnnz(m,n,a,nz)
use psb_error_mod use psb_error_mod

@ -998,7 +998,7 @@ subroutine psb_d_cscnv(a,b,info,type,mold,upd,dupl)
#if defined(HAVE_MOLD) #if defined(HAVE_MOLD)
allocate(altmp, mold=mold,stat=info) allocate(altmp, mold=mold,stat=info)
#else #else
allocate(altmp, source=mold,stat=info) call mold%mold(altmp,info)
#endif #endif
else if (present(type)) then else if (present(type)) then
@ -1098,7 +1098,7 @@ subroutine psb_d_cscnv_ip(a,info,type,mold,dupl)
#if defined(HAVE_MOLD) #if defined(HAVE_MOLD)
allocate(altmp, mold=mold,stat=info) allocate(altmp, mold=mold,stat=info)
#else #else
allocate(altmp, source=mold,stat=info) call mold%mold(altmp,info)
#endif #endif
else if (present(type)) then else if (present(type)) then
@ -1345,7 +1345,7 @@ subroutine psb_d_mv_from(a,b)
#if defined(HAVE_MOLD) #if defined(HAVE_MOLD)
allocate(a%a,mold=b, stat=info) allocate(a%a,mold=b, stat=info)
#else #else
allocate(a%a,source=b, stat=info) call b%mold(a%a,info)
#endif #endif
call a%a%mv_from_fmt(b,info) call a%a%mv_from_fmt(b,info)
call b%free() call b%free()
@ -1370,10 +1370,10 @@ subroutine psb_d_cp_from(a,b)
#if defined(HAVE_MOLD) #if defined(HAVE_MOLD)
allocate(a%a,mold=b,stat=info) allocate(a%a,mold=b,stat=info)
if (info /= psb_success_) info = psb_err_alloc_dealloc_
#else #else
allocate(a%a,source=b,stat=info) call b%mold(a%a,info)
#endif #endif
if (info /= psb_success_) info = psb_err_alloc_dealloc_
if (info == psb_success_) call a%a%cp_from_fmt(b, info) if (info == psb_success_) call a%a%cp_from_fmt(b, info)
if (info /= psb_success_) goto 9999 if (info /= psb_success_) goto 9999
@ -1459,10 +1459,10 @@ subroutine psb_d_sparse_mat_clone(a,b,info)
#if defined(HAVE_MOLD) #if defined(HAVE_MOLD)
allocate(b%a,mold=a%a,stat=info) allocate(b%a,mold=a%a,stat=info)
if (info /= psb_success_) info = psb_err_alloc_dealloc_
#else #else
allocate(b%a,source=a%a,stat=info) call a%a%mold(b%a,info)
#endif #endif
if (info /= psb_success_) info = psb_err_alloc_dealloc_
if (info == psb_success_) call b%a%cp_from_fmt(a%a, info) if (info == psb_success_) call b%a%cp_from_fmt(a%a, info)
if (info /= psb_success_) goto 9999 if (info /= psb_success_) goto 9999
@ -1540,7 +1540,7 @@ subroutine psb_d_transp_2mat(a,b)
#if defined(HAVE_MOLD) #if defined(HAVE_MOLD)
allocate(a%a,mold=b%a,stat=info) allocate(a%a,mold=b%a,stat=info)
#else #else
allocate(a%a,source=b%a,stat=info) call b%a%mold(a%a,info)
#endif #endif
if (info /= psb_success_) then if (info /= psb_success_) then
info = psb_err_alloc_dealloc_ info = psb_err_alloc_dealloc_
@ -1621,7 +1621,7 @@ subroutine psb_d_transc_2mat(a,b)
#if defined(HAVE_MOLD) #if defined(HAVE_MOLD)
allocate(a%a,mold=b%a,stat=info) allocate(a%a,mold=b%a,stat=info)
#else #else
allocate(a%a,source=b%a,stat=info) call b%a%mold(a%a,info)
#endif #endif
if (info /= psb_success_) then if (info /= psb_success_) then
info = psb_err_alloc_dealloc_ info = psb_err_alloc_dealloc_

@ -443,6 +443,30 @@ subroutine psb_s_base_csclip(a,b,info,&
end subroutine psb_s_base_csclip end subroutine psb_s_base_csclip
subroutine psb_s_base_mold(a,b,info)
use psb_s_base_mat_mod, psb_protect_name => psb_s_base_mold
use psb_error_mod
implicit none
class(psb_s_base_sparse_mat), intent(in) :: a
class(psb_s_base_sparse_mat), intent(out), allocatable :: b
integer, intent(out) :: info
Integer :: err_act
character(len=20) :: name='reallocate_nz'
logical, parameter :: debug=.false.
call psb_get_erraction(err_act)
! This is the base version. If we get here
! it means the derived class is incomplete,
! so we throw an error.
info = psb_err_missing_override_method_
call psb_errpush(info,name,a_err=a%get_fmt())
if (err_act /= psb_act_ret_) then
call psb_error()
end if
return
end subroutine psb_s_base_mold
subroutine psb_s_base_transp_2mat(a,b) subroutine psb_s_base_transp_2mat(a,b)
use psb_s_base_mat_mod, psb_protect_name => psb_s_base_transp_2mat use psb_s_base_mat_mod, psb_protect_name => psb_s_base_transp_2mat

@ -155,6 +155,34 @@ subroutine psb_s_coo_reallocate_nz(nz,a)
end subroutine psb_s_coo_reallocate_nz end subroutine psb_s_coo_reallocate_nz
subroutine psb_s_coo_mold(a,b,info)
use psb_s_base_mat_mod, psb_protect_name => psb_s_coo_mold
use psb_error_mod
implicit none
class(psb_s_coo_sparse_mat), intent(in) :: a
class(psb_s_base_sparse_mat), intent(out), allocatable :: b
integer, intent(out) :: info
Integer :: err_act
character(len=20) :: name='reallocate_nz'
logical, parameter :: debug=.false.
call psb_get_erraction(err_act)
allocate(psb_s_coo_sparse_mat :: b, stat=info)
if (info /= psb_success_) then
info = psb_err_alloc_dealloc_
call psb_errpush(info, name)
goto 9999
end if
return
9999 continue
if (err_act /= psb_act_ret_) then
call psb_error()
end if
return
end subroutine psb_s_coo_mold
subroutine psb_s_coo_reinit(a,clear) subroutine psb_s_coo_reinit(a,clear)

@ -2237,6 +2237,34 @@ subroutine psb_s_cp_csc_from_fmt(a,b,info)
end select end select
end subroutine psb_s_cp_csc_from_fmt end subroutine psb_s_cp_csc_from_fmt
subroutine psb_s_csc_mold(a,b,info)
use psb_s_csc_mat_mod, psb_protect_name => psb_s_csc_mold
use psb_error_mod
implicit none
class(psb_s_csc_sparse_mat), intent(in) :: a
class(psb_s_base_sparse_mat), intent(out), allocatable :: b
integer, intent(out) :: info
Integer :: err_act
character(len=20) :: name='reallocate_nz'
logical, parameter :: debug=.false.
call psb_get_erraction(err_act)
allocate(psb_s_csc_sparse_mat :: b, stat=info)
if (info /= psb_success_) then
info = psb_err_alloc_dealloc_
call psb_errpush(info, name)
goto 9999
end if
return
9999 continue
if (err_act /= psb_act_ret_) then
call psb_error()
end if
return
end subroutine psb_s_csc_mold
subroutine psb_s_csc_reallocate_nz(nz,a) subroutine psb_s_csc_reallocate_nz(nz,a)
use psb_error_mod use psb_error_mod

@ -1249,6 +1249,34 @@ subroutine psb_s_csr_reallocate_nz(nz,a)
end subroutine psb_s_csr_reallocate_nz end subroutine psb_s_csr_reallocate_nz
subroutine psb_s_csr_mold(a,b,info)
use psb_s_csr_mat_mod, psb_protect_name => psb_s_csr_mold
use psb_error_mod
implicit none
class(psb_s_csr_sparse_mat), intent(in) :: a
class(psb_s_base_sparse_mat), intent(out), allocatable :: b
integer, intent(out) :: info
Integer :: err_act
character(len=20) :: name='reallocate_nz'
logical, parameter :: debug=.false.
call psb_get_erraction(err_act)
allocate(psb_s_csr_sparse_mat :: b, stat=info)
if (info /= psb_success_) then
info = psb_err_alloc_dealloc_
call psb_errpush(info, name)
goto 9999
end if
return
9999 continue
if (err_act /= psb_act_ret_) then
call psb_error()
end if
return
end subroutine psb_s_csr_mold
subroutine psb_s_csr_allocate_mnnz(m,n,a,nz) subroutine psb_s_csr_allocate_mnnz(m,n,a,nz)
use psb_error_mod use psb_error_mod

@ -992,13 +992,13 @@ subroutine psb_s_cscnv(a,b,info,type,mold,upd,dupl)
call psb_errpush(info,name,a_err='TYPE, MOLD') call psb_errpush(info,name,a_err='TYPE, MOLD')
goto 9999 goto 9999
end if end if
if (present(mold)) then if (present(mold)) then
#if defined(HAVE_MOLD) #if defined(HAVE_MOLD)
allocate(altmp, mold=mold,stat=info) allocate(altmp, mold=mold,stat=info)
#else #else
allocate(altmp, source=mold,stat=info) call mold%mold(altmp,info)
#endif #endif
else if (present(type)) then else if (present(type)) then
@ -1098,7 +1098,7 @@ subroutine psb_s_cscnv_ip(a,info,type,mold,dupl)
#if defined(HAVE_MOLD) #if defined(HAVE_MOLD)
allocate(altmp, mold=mold,stat=info) allocate(altmp, mold=mold,stat=info)
#else #else
allocate(altmp, source=mold,stat=info) call mold%mold(altmp,info)
#endif #endif
else if (present(type)) then else if (present(type)) then
@ -1345,7 +1345,7 @@ subroutine psb_s_mv_from(a,b)
#if defined(HAVE_MOLD) #if defined(HAVE_MOLD)
allocate(a%a,mold=b, stat=info) allocate(a%a,mold=b, stat=info)
#else #else
allocate(a%a,source=b, stat=info) call b%mold(a%a,info)
#endif #endif
call a%a%mv_from_fmt(b,info) call a%a%mv_from_fmt(b,info)
call b%free() call b%free()
@ -1370,10 +1370,10 @@ subroutine psb_s_cp_from(a,b)
#if defined(HAVE_MOLD) #if defined(HAVE_MOLD)
allocate(a%a,mold=b,stat=info) allocate(a%a,mold=b,stat=info)
if (info /= psb_success_) info = psb_err_alloc_dealloc_
#else #else
allocate(a%a,source=b,stat=info) call b%mold(a%a,info)
#endif #endif
if (info /= psb_success_) info = psb_err_alloc_dealloc_
if (info == psb_success_) call a%a%cp_from_fmt(b, info) if (info == psb_success_) call a%a%cp_from_fmt(b, info)
if (info /= psb_success_) goto 9999 if (info /= psb_success_) goto 9999
@ -1459,8 +1459,9 @@ subroutine psb_s_sparse_mat_clone(a,b,info)
#if defined(HAVE_MOLD) #if defined(HAVE_MOLD)
allocate(b%a,mold=a%a,stat=info) allocate(b%a,mold=a%a,stat=info)
if (info /= psb_success_) info = psb_err_alloc_dealloc_
#else #else
allocate(b%a,source=a%a,stat=info) call a%a%mold(b%a,info)
#endif #endif
if (info /= psb_success_) info = psb_err_alloc_dealloc_ if (info /= psb_success_) info = psb_err_alloc_dealloc_
if (info == psb_success_) call b%a%cp_from_fmt(a%a, info) if (info == psb_success_) call b%a%cp_from_fmt(a%a, info)
@ -1540,7 +1541,7 @@ subroutine psb_s_transp_2mat(a,b)
#if defined(HAVE_MOLD) #if defined(HAVE_MOLD)
allocate(a%a,mold=b%a,stat=info) allocate(a%a,mold=b%a,stat=info)
#else #else
allocate(a%a,source=b%a,stat=info) call b%a%mold(a%a,info)
#endif #endif
if (info /= psb_success_) then if (info /= psb_success_) then
info = psb_err_alloc_dealloc_ info = psb_err_alloc_dealloc_
@ -1621,7 +1622,7 @@ subroutine psb_s_transc_2mat(a,b)
#if defined(HAVE_MOLD) #if defined(HAVE_MOLD)
allocate(a%a,mold=b%a,stat=info) allocate(a%a,mold=b%a,stat=info)
#else #else
allocate(a%a,source=b%a,stat=info) call b%a%mold(a%a,info)
#endif #endif
if (info /= psb_success_) then if (info /= psb_success_) then
info = psb_err_alloc_dealloc_ info = psb_err_alloc_dealloc_

@ -443,6 +443,31 @@ subroutine psb_z_base_csclip(a,b,info,&
end subroutine psb_z_base_csclip end subroutine psb_z_base_csclip
subroutine psb_z_base_mold(a,b,info)
use psb_z_base_mat_mod, psb_protect_name => psb_z_base_mold
use psb_error_mod
implicit none
class(psb_z_base_sparse_mat), intent(in) :: a
class(psb_z_base_sparse_mat), intent(out), allocatable :: b
integer, intent(out) :: info
Integer :: err_act
character(len=20) :: name='reallocate_nz'
logical, parameter :: debug=.false.
call psb_get_erraction(err_act)
! This is the base version. If we get here
! it means the derived class is incomplete,
! so we throw an error.
info = psb_err_missing_override_method_
call psb_errpush(info,name,a_err=a%get_fmt())
if (err_act /= psb_act_ret_) then
call psb_error()
end if
return
end subroutine psb_z_base_mold
subroutine psb_z_base_transp_2mat(a,b) subroutine psb_z_base_transp_2mat(a,b)
use psb_z_base_mat_mod, psb_protect_name => psb_z_base_transp_2mat use psb_z_base_mat_mod, psb_protect_name => psb_z_base_transp_2mat

@ -155,6 +155,34 @@ subroutine psb_z_coo_reallocate_nz(nz,a)
end subroutine psb_z_coo_reallocate_nz end subroutine psb_z_coo_reallocate_nz
subroutine psb_z_coo_mold(a,b,info)
use psb_z_base_mat_mod, psb_protect_name => psb_z_coo_mold
use psb_error_mod
implicit none
class(psb_z_coo_sparse_mat), intent(in) :: a
class(psb_z_base_sparse_mat), intent(out), allocatable :: b
integer, intent(out) :: info
Integer :: err_act
character(len=20) :: name='reallocate_nz'
logical, parameter :: debug=.false.
call psb_get_erraction(err_act)
allocate(psb_z_coo_sparse_mat :: b, stat=info)
if (info /= psb_success_) then
info = psb_err_alloc_dealloc_
call psb_errpush(info, name)
goto 9999
end if
return
9999 continue
if (err_act /= psb_act_ret_) then
call psb_error()
end if
return
end subroutine psb_z_coo_mold
subroutine psb_z_coo_reinit(a,clear) subroutine psb_z_coo_reinit(a,clear)

@ -2600,6 +2600,34 @@ subroutine psb_z_cp_csc_from_fmt(a,b,info)
end select end select
end subroutine psb_z_cp_csc_from_fmt end subroutine psb_z_cp_csc_from_fmt
subroutine psb_z_csc_mold(a,b,info)
use psb_z_csc_mat_mod, psb_protect_name => psb_z_csc_mold
use psb_error_mod
implicit none
class(psb_z_csc_sparse_mat), intent(in) :: a
class(psb_z_base_sparse_mat), intent(out), allocatable :: b
integer, intent(out) :: info
Integer :: err_act
character(len=20) :: name='reallocate_nz'
logical, parameter :: debug=.false.
call psb_get_erraction(err_act)
allocate(psb_z_csc_sparse_mat :: b, stat=info)
if (info /= psb_success_) then
info = psb_err_alloc_dealloc_
call psb_errpush(info, name)
goto 9999
end if
return
9999 continue
if (err_act /= psb_act_ret_) then
call psb_error()
end if
return
end subroutine psb_z_csc_mold
subroutine psb_z_csc_reallocate_nz(nz,a) subroutine psb_z_csc_reallocate_nz(nz,a)
use psb_error_mod use psb_error_mod

@ -1441,6 +1441,34 @@ subroutine psb_z_csr_reallocate_nz(nz,a)
end subroutine psb_z_csr_reallocate_nz end subroutine psb_z_csr_reallocate_nz
subroutine psb_z_csr_mold(a,b,info)
use psb_z_csr_mat_mod, psb_protect_name => psb_z_csr_mold
use psb_error_mod
implicit none
class(psb_z_csr_sparse_mat), intent(in) :: a
class(psb_z_base_sparse_mat), intent(out), allocatable :: b
integer, intent(out) :: info
Integer :: err_act
character(len=20) :: name='reallocate_nz'
logical, parameter :: debug=.false.
call psb_get_erraction(err_act)
allocate(psb_z_csr_sparse_mat :: b, stat=info)
if (info /= psb_success_) then
info = psb_err_alloc_dealloc_
call psb_errpush(info, name)
goto 9999
end if
return
9999 continue
if (err_act /= psb_act_ret_) then
call psb_error()
end if
return
end subroutine psb_z_csr_mold
subroutine psb_z_csr_allocate_mnnz(m,n,a,nz) subroutine psb_z_csr_allocate_mnnz(m,n,a,nz)
use psb_error_mod use psb_error_mod

@ -998,7 +998,7 @@ subroutine psb_z_cscnv(a,b,info,type,mold,upd,dupl)
#if defined(HAVE_MOLD) #if defined(HAVE_MOLD)
allocate(altmp, mold=mold,stat=info) allocate(altmp, mold=mold,stat=info)
#else #else
allocate(altmp, source=mold,stat=info) call mold%mold(altmp,info)
#endif #endif
else if (present(type)) then else if (present(type)) then
@ -1098,7 +1098,7 @@ subroutine psb_z_cscnv_ip(a,info,type,mold,dupl)
#if defined(HAVE_MOLD) #if defined(HAVE_MOLD)
allocate(altmp, mold=mold,stat=info) allocate(altmp, mold=mold,stat=info)
#else #else
allocate(altmp, source=mold,stat=info) call mold%mold(altmp,info)
#endif #endif
else if (present(type)) then else if (present(type)) then
@ -1345,7 +1345,7 @@ subroutine psb_z_mv_from(a,b)
#if defined(HAVE_MOLD) #if defined(HAVE_MOLD)
allocate(a%a,mold=b, stat=info) allocate(a%a,mold=b, stat=info)
#else #else
allocate(a%a,source=b, stat=info) call b%mold(a%a,info)
#endif #endif
call a%a%mv_from_fmt(b,info) call a%a%mv_from_fmt(b,info)
call b%free() call b%free()
@ -1370,10 +1370,10 @@ subroutine psb_z_cp_from(a,b)
#if defined(HAVE_MOLD) #if defined(HAVE_MOLD)
allocate(a%a,mold=b,stat=info) allocate(a%a,mold=b,stat=info)
if (info /= psb_success_) info = psb_err_alloc_dealloc_
#else #else
allocate(a%a,source=b,stat=info) call b%mold(a%a,info)
#endif #endif
if (info /= psb_success_) info = psb_err_alloc_dealloc_
if (info == psb_success_) call a%a%cp_from_fmt(b, info) if (info == psb_success_) call a%a%cp_from_fmt(b, info)
if (info /= psb_success_) goto 9999 if (info /= psb_success_) goto 9999
@ -1459,10 +1459,10 @@ subroutine psb_z_sparse_mat_clone(a,b,info)
#if defined(HAVE_MOLD) #if defined(HAVE_MOLD)
allocate(b%a,mold=a%a,stat=info) allocate(b%a,mold=a%a,stat=info)
if (info /= psb_success_) info = psb_err_alloc_dealloc_
#else #else
allocate(b%a,source=a%a,stat=info) call a%a%mold(b%a,info)
#endif #endif
if (info /= psb_success_) info = psb_err_alloc_dealloc_
if (info == psb_success_) call b%a%cp_from_fmt(a%a, info) if (info == psb_success_) call b%a%cp_from_fmt(a%a, info)
if (info /= psb_success_) goto 9999 if (info /= psb_success_) goto 9999
@ -1540,7 +1540,7 @@ subroutine psb_z_transp_2mat(a,b)
#if defined(HAVE_MOLD) #if defined(HAVE_MOLD)
allocate(a%a,mold=b%a,stat=info) allocate(a%a,mold=b%a,stat=info)
#else #else
allocate(a%a,source=b%a,stat=info) call b%a%mold(a%a,info)
#endif #endif
if (info /= psb_success_) then if (info /= psb_success_) then
info = psb_err_alloc_dealloc_ info = psb_err_alloc_dealloc_
@ -1621,7 +1621,7 @@ subroutine psb_z_transc_2mat(a,b)
#if defined(HAVE_MOLD) #if defined(HAVE_MOLD)
allocate(a%a,mold=b%a,stat=info) allocate(a%a,mold=b%a,stat=info)
#else #else
allocate(a%a,source=b%a,stat=info) call b%a%mold(a%a,info)
#endif #endif
if (info /= psb_success_) then if (info /= psb_success_) then
info = psb_err_alloc_dealloc_ info = psb_err_alloc_dealloc_

@ -44,10 +44,10 @@ psb_c_prec_type.o: psb_c_base_prec_mod.o
psb_z_prec_type.o: psb_z_base_prec_mod.o psb_z_prec_type.o: psb_z_base_prec_mod.o
psb_prec_type.o: psb_s_prec_type.o psb_d_prec_type.o psb_c_prec_type.o psb_z_prec_type.o psb_prec_type.o: psb_s_prec_type.o psb_d_prec_type.o psb_c_prec_type.o psb_z_prec_type.o
psb_prec_mod.o: psb_prec_type.o psb_prec_mod.o: psb_prec_type.o
psb_s_bjacprec.o psb_s_diagprec.o psb_s_nullprec.o: psb_s_base_prec_mod.o psb_s_bjacprec.o psb_s_diagprec.o psb_s_nullprec.o: psb_prec_mod.o psb_s_base_prec_mod.o
psb_d_bjacprec.o psb_d_diagprec.o psb_d_nullprec.o: psb_d_base_prec_mod.o psb_d_bjacprec.o psb_d_diagprec.o psb_d_nullprec.o: psb_prec_mod.o psb_d_base_prec_mod.o
psb_c_bjacprec.o psb_c_diagprec.o psb_c_nullprec.o: psb_c_base_prec_mod.o psb_c_bjacprec.o psb_c_diagprec.o psb_c_nullprec.o: psb_prec_mod.o psb_c_base_prec_mod.o
psb_z_bjacprec.o psb_z_diagprec.o psb_z_nullprec.o: psb_z_base_prec_mod.o psb_z_bjacprec.o psb_z_diagprec.o psb_z_nullprec.o: psb_prec_mod.o psb_z_base_prec_mod.o
veryclean: clean veryclean: clean
/bin/rm -f $(LIBNAME) /bin/rm -f $(LIBNAME)

@ -17,7 +17,7 @@ EXEDIR=./runs
all: ppde spde all: ppde spde
ppde: ppde.o ppde: ppde.o
$(F90LINK) -pg ppde.o -o ppde $(PSBLAS_LIB) $(LDLIBS) $(F90LINK) ppde.o -o ppde $(PSBLAS_LIB) $(LDLIBS)
/bin/mv ppde $(EXEDIR) /bin/mv ppde $(EXEDIR)

@ -2,10 +2,10 @@
BICGSTAB Iterative method BICGSTAB CGS BICG BICGSTABL RGMRES BICGSTAB Iterative method BICGSTAB CGS BICG BICGSTABL RGMRES
BJAC Preconditioner NONE DIAG BJAC BJAC Preconditioner NONE DIAG BJAC
CSR Storage format for matrix A: CSR COO JAD CSR Storage format for matrix A: CSR COO JAD
020 Domain size (acutal system is this**3) 060 Domain size (acutal system is this**3)
2 Stopping criterion 2 Stopping criterion
0100 MAXIT 0100 MAXIT
01 ITRACE -1 ITRACE
20 IRST restart for RGMRES and BiCGSTABL 20 IRST restart for RGMRES and BiCGSTABL

Loading…
Cancel
Save