diff --git a/Make.inc b/Make.inc index 3c9db7cf..08c77dd1 100644 --- a/Make.inc +++ b/Make.inc @@ -44,8 +44,8 @@ RANLIB=ranlib LIBDIR = lib LIBNAME = libpsblas.a -TYPEMODS = psb_spmat_type$(.mod) psb_desc_type$(.mod) psb_prec_type$(.mod) psb_realloc_mod$(.mod) -CONSTMODS = psb_tools_const$(.mod) +TYPEMODS = psb_spmat_type$(.mod) psb_descriptor_type$(.mod) psb_prec_type$(.mod) psb_realloc_mod$(.mod) +CONSTMODS = psb_const_mod$(.mod) BLASMODS = $(TYPEMODS) psb_psblas_mod$(.mod) psb_comm_mod$(.mod) METHDMODS = psb_methd_mod$(.mod) TOOLSMODS = $(CONSTMODS) psi_mod$(.mod) psb_tools_mod$(.mod) psb_serial_mod$(.mod) @@ -53,8 +53,8 @@ PRECMODS = psb_prec_mod$(.mod) ERRORMODS = psb_error_mod$(.mod) F90MODS= $(BLASMODS) $(PRECMODS) $(METHDMODS) $(TOOLSMODS) $(ERRORMODS) string$(.mod) -MODS=$(LIBDIR)/psb_tools_const$(.mod) $(LIBDIR)/psb_spmat_type$(.mod) $(LIBDIR)/psb_realloc_mod$(.mod) \ - $(LIBDIR)/psb_desc_type$(.mod) $(LIBDIR)/psb_prec_type$(.mod) $(LIBDIR)/parts.f90 \ +MODS=$(LIBDIR)/psb_const_mod$(.mod) $(LIBDIR)/psb_spmat_type$(.mod) $(LIBDIR)/psb_realloc_mod$(.mod) \ + $(LIBDIR)/psb_descriptor_type$(.mod) $(LIBDIR)/psb_prec_type$(.mod) $(LIBDIR)/parts.fh \ $(LIBDIR)/psb_serial_mod$(.mod) $(LIBDIR)/psb_comm_mod$(.mod) $(LIBDIR)/psb_error_mod$(.mod) # Under Linux/gmake there is a rule interpreting .mod as Modula source! diff --git a/src/modules/Makefile b/src/modules/Makefile index 229823bb..692db670 100644 --- a/src/modules/Makefile +++ b/src/modules/Makefile @@ -1,13 +1,14 @@ include ../../Make.inc MODULES = psb_realloc_mod.o psb_string_mod.o psb_spmat_type.o \ - psb_desc_type.o psb_spsb_mod.o\ + psb_desc_type.o psb_spsb_mod.o \ psb_blacs_mod.o psb_serial_mod.o psb_tools_mod.o \ psb_prec_type.o psb_error_mod.o psb_prec_mod.o \ psb_methd_mod.o psb_const_mod.o \ - psb_comm_mod.o psb_psblas_mod.o psi_mod.o + psb_comm_mod.o psb_psblas_mod.o psi_mod.o \ + psb_sparse_mod.o -OBJS = error.o parts.o +OBJS = error.o INCDIRS = -I ../../lib LIBDIR = ../../lib @@ -18,7 +19,7 @@ psb_spmat_type.o : psb_realloc_mod.o psb_const_mod.o lib: $(MODULES) $(OBJS) $(AR) $(LIBDIR)/$(LIBNAME) $(MODULES) $(OBJS) $(RANLIB) $(LIBDIR)/$(LIBNAME) - cp *$(.mod) ./psb_const.fh ../../lib + cp *$(.mod) ./psb_const.fh ./parts.fh ../../lib clean: diff --git a/src/modules/psb_methd_mod.f90 b/src/modules/psb_methd_mod.f90 index 96833a4a..bf5861d8 100644 --- a/src/modules/psb_methd_mod.f90 +++ b/src/modules/psb_methd_mod.f90 @@ -38,7 +38,7 @@ Module psb_methd_mod end subroutine psb_dbicg end interface - interface ppsb_bicgstab + interface psb_bicgstab subroutine psb_dcgstab(a,prec,b,x,eps,& & desc_a,info,itmax,iter,err,itrace,istop) use psb_serial_mod diff --git a/src/modules/psb_sparse_mod.f90 b/src/modules/psb_sparse_mod.f90 index c299c20e..39c1e2e9 100644 --- a/src/modules/psb_sparse_mod.f90 +++ b/src/modules/psb_sparse_mod.f90 @@ -1,13 +1,13 @@ module psb_sparse_mod - use psb_typedesc - use psb_typeprec + use psb_descriptor_type + use psb_prec_type use psb_serial_mod use psb_tools_mod use psb_psblas_mod use psb_prec_mod use psb_methd_mod use psb_error_mod - use psb_string + use psb_string_mod end module psb_sparse_mod diff --git a/src/modules/psb_tools_mod.f90 b/src/modules/psb_tools_mod.f90 index 7fff4178..73044454 100644 --- a/src/modules/psb_tools_mod.f90 +++ b/src/modules/psb_tools_mod.f90 @@ -270,7 +270,8 @@ Module psb_tools_mod interface psb_dscall subroutine psb_dscall(m, n, parts, icontxt, desc_a, info) use psb_descriptor_type - Integer, intent(in) :: M,N,ICONTXT + include 'parts.fh' + Integer, intent(in) :: m,n,icontxt Type(psb_desc_type), intent(out) :: desc_a integer, intent(out) :: info end subroutine psb_dscall diff --git a/src/prec/psb_dprecbld.f90 b/src/prec/psb_dprecbld.f90 index 5c68b3b1..93ec8afd 100644 --- a/src/prec/psb_dprecbld.f90 +++ b/src/prec/psb_dprecbld.f90 @@ -470,7 +470,7 @@ subroutine psb_mlprec_bld(a,desc_a,p,info) ! changed in the future. Need to package nlaggr & mlia in a ! private data structure? - call psb_gen_aggrmap(p%iprcparm(aggr_alg_),a,desc_a,p%nlaggr,p%mlia,info) + call psb_genaggrmap(p%iprcparm(aggr_alg_),a,desc_a,p%nlaggr,p%mlia,info) if(info /= 0) then info=4010 ch_err='psb_gen_aggrmap' diff --git a/src/tools/psb_dscall.f90 b/src/tools/psb_dscall.f90 index 9d660825..6c6cdae5 100644 --- a/src/tools/psb_dscall.f90 +++ b/src/tools/psb_dscall.f90 @@ -17,8 +17,8 @@ subroutine psb_dscall(m, n, parts, icontxt, desc_a, info) use psb_realloc_mod use psb_serial_mod use psb_const_mod - use psb_parts_mod implicit None + include 'parts.fh' !....Parameters... Integer, intent(in) :: M,N,ICONTXT Type(psb_desc_type), intent(out) :: desc_a diff --git a/test/pargen/Makefile b/test/pargen/Makefile index 2d6a0a10..30866bd0 100644 --- a/test/pargen/Makefile +++ b/test/pargen/Makefile @@ -2,13 +2,8 @@ include ../../Make.inc # # Libraries used # -LIBDIR=../../LIB/ +LIBDIR=../../lib/ PSBLAS_LIB= -L$(LIBDIR) -lpsblas -SPARKER_LIB= -L$(LIBDIR) -lsparker -ZSPARKER_LIB= -L$(LIBDIR) -BLAS90LIB=-L$(LIBDIR) -lpsblas90 -METHD90LIB=-L$(LIBDIR) -TOOLS90LIB=-L$(LIBDIR) # # Compilers and such @@ -31,10 +26,9 @@ ppde90log: ppde90log.o part_block.o ppde90: ppde90.o part_block.o $(F90LINK) $(LINKOPT) ppde90.o part_block.o -o ppde90\ - $(METHD90LIB) $(TOOLS90LIB) $(BLAS90LIB) \ - $(PSBLAS_LIB) $(SPARKER_LIB) $(BLAS)\ - $(BLACS) + $(PSBLAS_LIB) $(BLACS) /bin/mv ppde90 $(EXEDIR) + ppde90s: ppde90s.o part_block.o $(F90LINK) $(LINKOPT) ppde90s.o part_block.o -o ppde90s\ $(METHD90LIB) $(TOOLS90LIB) $(BLAS90LIB) \ @@ -67,7 +61,7 @@ clean: verycleanlib: (cd ../..; make veryclean) lib: - (cd ../../; make lib) + (cd ../../; make library) diff --git a/test/pargen/ppde90.f90 b/test/pargen/ppde90.f90 index 5a40dcf0..07fe8bc8 100644 --- a/test/pargen/ppde90.f90 +++ b/test/pargen/ppde90.f90 @@ -39,8 +39,8 @@ ! u(x,y) = rhs(x,y) ! program pde90 - use f90sparse - use errormod + use psb_sparse_mod + use psb_error_mod implicit none interface @@ -56,7 +56,6 @@ program pde90 integer :: idim, iret ! miscellaneous - integer, parameter :: izero=0, ione=1 character, parameter :: order='r' integer :: iargc,convert_descr,dim, check_descr real(kind(1.d0)), parameter :: dzero = 0.d0, one = 1.d0 @@ -64,10 +63,10 @@ program pde90 external mpi_wtime ! sparse matrix and preconditioner - type(d_spmat) :: a, l, u, h - type(d_prec) :: pre + type(psb_dspmat_type) :: a, l, u, h + type(psb_dprec_type) :: pre ! descriptor - type(desc_type) :: desc_a, desc_a_out + type(psb_desc_type) :: desc_a, desc_a_out ! dense matrices real(kind(1.d0)), pointer :: b(:), x(:), d(:),ld(:) integer, pointer :: work(:) @@ -190,13 +189,13 @@ program pde90 t1 = mpi_wtime() eps = 1.d-9 if (cmethd.eq.'BICGSTAB') then - call f90_bicgstab(a,pre,b,x,eps,desc_a,info,& + call psb_bicgstab(a,pre,b,x,eps,desc_a,info,& & itmax,iter,err,itrace) else if (cmethd.eq.'CGS') then - call f90_cgs(a,pre,b,x,eps,desc_a,info,& + call psb_cgs(a,pre,b,x,eps,desc_a,info,& & itmax,iter,err,itrace) else if (cmethd.eq.'BICGSTABL') then - call f90_bicgstabl(a,pre,b,x,eps,desc_a,info,& + call psb_bicgstabl(a,pre,b,x,eps,desc_a,info,& & itmax,iter,err,itrace,ml) else write(0,*) 'unknown method ',cmethd @@ -224,10 +223,10 @@ program pde90 ! ! cleanup storage and exit ! - call f90_psdsfree(b,desc_a,info) - call f90_psdsfree(x,desc_a,info) - call f90_psspfree(a,desc_a,info) - call f90_psdscfree(desc_a,info) + call psb_free(b,desc_a,info) + call psb_free(x,desc_a,info) + call psb_spfree(a,desc_a,info) + call psb_dscfree(desc_a,info) if(info.ne.0) then info=4010 ch_err='free routine' @@ -394,17 +393,17 @@ contains ! u(x,y,z)(2b1+2b2+2b3+a1+a2+a3)+u(x-1,y,z)(-b1-a1)+u(x,y-1,z)(-b2-a2)+ ! + u(x,y,z-1)(-b3-a3)-u(x+1,y,z)b1-u(x,y+1,z)b2-u(x,y,z+1)b3 - use typesp - use typedesc - use f90tools - use f90methd + use psb_spmat_type + use psb_descriptor_type + use psb_tools_mod + use psb_methd_mod implicit none integer :: idim integer, parameter :: nbmax=10 real(kind(1.d0)),pointer :: b(:),t(:) - type (desc_type) :: desc_a + type(psb_desc_type) :: desc_a integer :: icontxt, info - character :: afmt*5 + character :: afmt*5 interface ! .....user passed subroutine..... subroutine parts(global_indx,n,np,pv,nv) @@ -414,10 +413,10 @@ contains integer, intent(out) :: pv(*) end subroutine parts end interface ! local variables - type(d_spmat) :: a + type(psb_dspmat_type) :: a real(kind(1.d0)) :: zt(nbmax),glob_x,glob_y,glob_z integer :: m,n,nnz,glob_row,j - type (d_spmat) :: row_mat + type(psb_dspmat_type) :: row_mat integer :: x,y,z,counter,ia,i,indx_owner integer :: nprow,npcol,myprow,mypcol integer :: element @@ -456,12 +455,12 @@ contains write(*,*) 'size: n ',n call psb_dscall(n,n,parts,icontxt,desc_a,info) write(*,*) 'allocating a : nnz',nnz - call f90_psspall(a,desc_a,info,nnz=nnz) + call psb_spalloc(a,desc_a,info,nnz=nnz) ! define rhs from boundary conditions; also build initial guess write(*,*) 'allocating b' - call f90_psdsall(n,b,desc_a,info) + call psb_alloc(n,b,desc_a,info) write(*,*) 'allocating t' - call f90_psdsall(n,t,desc_a,info) + call psb_alloc(n,t,desc_a,info) if(info.ne.0) then info=4010 ch_err='allocation rout.' @@ -633,10 +632,10 @@ contains else zt(1) = 0.d0 endif - call f90_psdsins(1,b,ia,zt(1:1),desc_a,info) + call psb_ins(1,b,ia,zt(1:1),desc_a,info) if(info.ne.0) exit zt(1)=0.d0 - call f90_psdsins(1,t,ia,zt(1:1),desc_a,info) + call psb_ins(1,t,ia,zt(1:1),desc_a,info) if(info.ne.0) exit end if end do @@ -672,8 +671,8 @@ contains end if write(0,*) ' assembly time',(t2-t1),' ',a%fida(1:4) - call f90_psdsasb(b,desc_a,info) - call f90_psdsasb(t,desc_a,info) + call psb_asb(b,desc_a,info) + call psb_asb(t,desc_a,info) if(info.ne.0) then info=4010 ch_err='asb rout.'