diff --git a/base/modules/psb_tools_mod.f90 b/base/modules/psb_tools_mod.f90 index 6f073d4e..cc213c4a 100644 --- a/base/modules/psb_tools_mod.f90 +++ b/base/modules/psb_tools_mod.f90 @@ -584,7 +584,7 @@ Module psb_tools_mod integer,optional, intent(in) :: dupl, upd character(len=*), optional, intent(in) :: afmt end subroutine psb_sspasb - subroutine psb_dspasb(a,desc_a, info, afmt, upd, dupl) + subroutine psb_dspasb(a,desc_a, info, afmt, upd, dupl,mold) use psb_descriptor_type use psb_spmat_type use psbn_d_mat_mod @@ -593,6 +593,7 @@ Module psb_tools_mod integer, intent(out) :: info integer,optional, intent(in) :: dupl, upd character(len=*), optional, intent(in) :: afmt + class(psbn_d_base_sparse_mat), intent(in), optional :: mold end subroutine psb_dspasb subroutine psb_cspasb(a,desc_a, info, afmt, upd, dupl) use psb_descriptor_type diff --git a/base/newserial/Makefile b/base/newserial/Makefile index bda4af54..d29bc4c9 100644 --- a/base/newserial/Makefile +++ b/base/newserial/Makefile @@ -1,7 +1,7 @@ include ../../Make.inc -MODULES = psbn_base_mat_mod.o psbn_d_base_mat_mod.o psbn_d_coo_impl.o psbn_mat_mod.o\ - psbn_d_csr_mat_mod.o psbn_d_csr_impl.o +MODULES = psbn_base_mat_mod.o psbn_d_base_mat_mod.o psbn_mat_mod.o\ + psbn_d_csr_mat_mod.o LIBMOD= @@ -19,10 +19,6 @@ lib: $(MODULES) $(OBJS) $(LIBMOD) psbn_mat_mod.o: psbn_base_mat_mod.o psbn_d_csr_mat_mod.o psbn_coo_mat.o psbn_csr_mat.o: psbn_d_base_mat_mod.o -psbn_d_coo_impl.o: psbn_d_base_mat_mod.o -psbn_d_csr_impl.o: psbn_d_csr_mat_mod.o - -psbn_mat_impl.o: psbn_mat_mod.o clean: /bin/rm -f $(MODULES) $(OBJS) $(MPFOBJS) *$(.mod) diff --git a/base/psblas/psb_dspmm.f90 b/base/psblas/psb_dspmm.f90 index cda9d00d..730756bb 100644 --- a/base/psblas/psb_dspmm.f90 +++ b/base/psblas/psb_dspmm.f90 @@ -583,7 +583,7 @@ subroutine psb_dspmv(alpha,a,x,beta,y,desc_a,info,& call psi_swapdata(ior(psb_swap_send_,psb_swap_recv_),& & dzero,x,desc_a,iwork,info,data=psb_comm_halo_) end if - ! Just for fun + call psbn_csmm(alpha,a,x,beta,y,info) if(info /= 0) then diff --git a/base/serial/Makefile b/base/serial/Makefile index 470472c3..accd7084 100644 --- a/base/serial/Makefile +++ b/base/serial/Makefile @@ -33,7 +33,7 @@ LIBDIR=.. MODDIR=../modules FINCLUDES=$(FMFLAG)$(LIBDIR) $(FMFLAG)$(MODDIR) $(FMFLAG). -lib: auxd cood csrd jadd f77d dpd lib1 +lib: auxd cood csrd jadd f77d f03d dpd lib1 $(AR) $(LIBDIR)/$(LIBNAME) $(FOBJS) $(RANLIB) $(LIBDIR)/$(LIBNAME) @@ -45,7 +45,7 @@ psb_sspgetrow.o psb_dspgetrow.o psb_zspgetrow.o: psb_getrow_mod.o psb_sspcnv.o psb_dspcnv.o pzb_zspcnv.o: psb_regen_mod.o #psb_sfixcoo.o psb_dfixcoo.o psb_cfixcoo.o psb_zfixcoo.o: psb_ip_reord_mod.o -auxd: psb_ip_reord_mod.o +auxd: (cd aux; make lib) cood: @@ -57,11 +57,13 @@ csrd: jadd: (cd jad; make lib) -dpd: psb_ip_reord_mod.o +dpd: (cd dp; make lib) f77d: (cd f77; make lib) +f03d: + (cd f03; make lib) clean: /bin/rm -f $(FOBJS) *$(.mod) @@ -71,5 +73,6 @@ clean: (cd jad; make clean) (cd dp; make clean) (cd f77; make clean) + (cd f03; make clean) veryclean: clean diff --git a/base/serial/f03/Makefile b/base/serial/f03/Makefile new file mode 100644 index 00000000..c2797eb2 --- /dev/null +++ b/base/serial/f03/Makefile @@ -0,0 +1,37 @@ +include ../../../Make.inc + +# +# The object files +# +FOBJS = psbn_d_csr_impl.o psbn_d_coo_impl.o + +OBJS=$(FOBJS) + +# +# Where the library should go, and how it is called. +# Note that we are regenerating most of libsparker.a on the fly. +SPARKERDIR=.. +LIBDIR=../.. +MODDIR=../../modules +FINCLUDES=$(FMFLAG)$(LIBDIR) $(FMFLAG)$(MODDIR) $(FMFLAG)$(SPARKERDIR) $(FMFLAG). +#LIBNAME=libsparker.a +LIBFILE=$(LIBDIR)/$(LIBNAME) + +# +# No change should be needed below +# + + +default: lib + +lib: $(OBJS) + $(AR) $(LIBDIR)/$(LIBNAME) $(OBJS) + $(RANLIB) $(LIBDIR)/$(LIBNAME) + +clean: cleanobjs + +veryclean: cleanobjs + +cleanobjs: + /bin/rm -f $(OBJS) + diff --git a/base/newserial/psbn_d_coo_impl.f03 b/base/serial/f03/psbn_d_coo_impl.f03 similarity index 99% rename from base/newserial/psbn_d_coo_impl.f03 rename to base/serial/f03/psbn_d_coo_impl.f03 index be42b64a..f9182899 100644 --- a/base/newserial/psbn_d_coo_impl.f03 +++ b/base/serial/f03/psbn_d_coo_impl.f03 @@ -41,7 +41,7 @@ subroutine d_coo_cssm_impl(alpha,a,x,beta,y,info,trans) else trans_ = 'N' end if - tra = (psb_toupper(trans_)=='T').or.(psb_toupper(trans_)=='C')) + tra = (psb_toupper(trans_)=='T').or.(psb_toupper(trans_)=='C') m = a%get_nrows() nc = min(size(x,2) , size(y,2)) @@ -304,7 +304,7 @@ subroutine d_coo_cssv_impl(alpha,a,x,beta,y,info,trans) goto 9999 endif - tra = (psb_toupper(trans_)=='T').or.(psb_toupper(trans_)=='C')) + tra = (psb_toupper(trans_)=='T').or.(psb_toupper(trans_)=='C') m = a%get_nrows() if (.not. (a%is_triangle())) then diff --git a/base/newserial/psbn_d_csr_impl.f03 b/base/serial/f03/psbn_d_csr_impl.f03 similarity index 100% rename from base/newserial/psbn_d_csr_impl.f03 rename to base/serial/f03/psbn_d_csr_impl.f03 diff --git a/base/tools/psb_dspasb.f90 b/base/tools/psb_dspasb.f90 index 6d1a444c..eb45dbae 100644 --- a/base/tools/psb_dspasb.f90 +++ b/base/tools/psb_dspasb.f90 @@ -48,7 +48,7 @@ ! psb_dupl_err_ raise an error. ! ! -subroutine psb_dspasb(a,desc_a, info, afmt, upd, dupl) +subroutine psb_dspasb(a,desc_a, info, afmt, upd, dupl, mold) use psb_descriptor_type use psb_spmat_type use psb_serial_mod @@ -67,6 +67,7 @@ subroutine psb_dspasb(a,desc_a, info, afmt, upd, dupl) integer, intent(out) :: info integer,optional, intent(in) :: dupl, upd character(len=*), optional, intent(in) :: afmt + class(psbn_d_base_sparse_mat), intent(in), optional :: mold !....Locals.... integer :: int_err(5) integer :: np,me,n_col, err_act @@ -119,7 +120,7 @@ subroutine psb_dspasb(a,desc_a, info, afmt, upd, dupl) call a%set_ncols(n_col) end if - call a%cscnv(info,type=afmt,dupl=dupl) + call a%cscnv(info,type=afmt,dupl=dupl, mold=mold) IF (debug_level >= psb_debug_ext_) then