Moved csrp from tools to serial, taking out desc_a from the interface.

Update the user guide adding whether each routine is a synchronization point.
This commit is contained in:
Salvatore Filippone
2007-09-28 16:46:49 +00:00
parent 285da66426
commit 81ce9e94fd
16 changed files with 167 additions and 125 deletions
+17
View File
@@ -495,6 +495,23 @@ module psb_serial_mod
end interface
interface psb_csrp
subroutine psb_dcsrp(trans,iperm,a, info)
use psb_spmat_type
type(psb_dspmat_type), intent(inout) :: a
integer, intent(inout) :: iperm(:), info
character, intent(in) :: trans
end subroutine psb_dcsrp
subroutine psb_zcsrp(trans,iperm,a, info)
use psb_spmat_type
type(psb_zspmat_type), intent(inout) :: a
integer, intent(inout) :: iperm(:), info
character, intent(in) :: trans
end subroutine psb_zcsrp
end interface
interface psb_gelp
! 2-D version
subroutine psb_dgelp(trans,iperm,x,info)
-12
View File
@@ -159,18 +159,6 @@ Module psb_tools_mod
end interface
interface psb_csrp
subroutine psb_dcsrp(trans,iperm,a, desc_a, info)
use psb_descriptor_type
use psb_spmat_type
type(psb_dspmat_type), intent(inout) :: a
type(psb_desc_type), intent(in) :: desc_a
integer, intent(inout) :: iperm(:), info
character, intent(in) :: trans
end subroutine psb_dcsrp
end interface
interface psb_cdprt
subroutine psb_cdprt(iout,desc_p,glob,short)
use psb_const_mod
+1 -1
View File
@@ -13,7 +13,7 @@ FOBJS = psb_cest.o psb_dcoins.o psb_dcsmm.o psb_dcsmv.o \
psb_zcoins.o psb_zcsprt.o psb_zneigh.o psb_ztransp.o psb_ztransc.o\
psb_zrwextd.o psb_zsymbmm.o psb_znumbmm.o psb_zspscal.o psb_zspclip.o\
psb_getifield.o psb_setifield.o psb_update_mod.o psb_getrow_mod.o\
psb_dgelp.o psb_zgelp.o
psb_dgelp.o psb_zgelp.o psb_dcsrp.o psb_zcsrp.o
LIBDIR=..
MODDIR=../modules
@@ -30,8 +30,6 @@
!!$
! File: psb_dcsrp.f90
!
! WARNING: This routine should be changed and moved to the serial part
! i.e. taking out the descriptor.
!
! Subroutine: psb_dcsrp
! Apply a right permutation to a sparse matrix, i.e. permute the column
@@ -43,13 +41,10 @@
! iperm - integer, dimension(:) A permutation vector; its size
! must be either N_ROW or N_COL
! a - type(<psb_dspmat_type). The matrix to be permuted
! desc_a - type(<psb_desc_type>). The communication descriptor.
! info - integer. Eventually returns an error code
subroutine psb_dcsrp(trans,iperm,a, desc_a, info)
use psb_descriptor_type
use psb_serial_mod
subroutine psb_dcsrp(trans,iperm,a, info)
use psb_serial_mod, psb_protect_name => psb_dcsrp
use psb_const_mod
use psb_penv_mod
! implicit none
interface dcsrp
@@ -77,7 +72,6 @@ subroutine psb_dcsrp(trans,iperm,a, desc_a, info)
!...parameters....
type(psb_dspmat_type), intent(inout) :: a
type(psb_desc_type), intent(in) :: desc_a
integer, intent(inout) :: iperm(:), info
character, intent(in) :: trans
!....locals....
@@ -93,32 +87,14 @@ subroutine psb_dcsrp(trans,iperm,a, desc_a, info)
time(1) = psb_wtime()
ictxt = psb_cd_get_context(desc_a)
dectype = psb_cd_get_dectype(desc_a)
n_row = psb_cd_get_local_rows(desc_a)
n_col = psb_cd_get_local_cols(desc_a)
n_row = psb_get_sp_nrows(a)
n_col = psb_get_sp_ncols(a)
if(psb_get_errstatus() /= 0) return
info=0
call psb_erractionsave(err_act)
name = 'psd_csrp'
! check on blacs grid
call psb_info(ictxt, me, np)
if (np == -1) then
info = 2010
call psb_errpush(info,name)
goto 9999
endif
if (.not.psb_is_asb_desc(desc_a)) then
info = 600
int_err(1) = dectype
call psb_errpush(info,name,int_err)
goto 9999
endif
ipsize = size(iperm)
if (.not.((ipsize == n_col).or.(ipsize == n_row) )) then
info = 35
@@ -162,7 +138,6 @@ subroutine psb_dcsrp(trans,iperm,a, desc_a, info)
! fix glob_to_loc/loc_to_glob mappings, then indices lists
! hmm, maybe we should just move all of this onto a different level,
! have a specialized subroutine, and do it in the solver context????
if (debug) write(0,*) 'spasb: calling dcsrp',size(work_dcsdp)
call dcsrp(trans,n_row,n_col,a%fida,a%descra,a%ia1,a%ia2,a%infoa,&
& ipt,work_dcsdp,size(work_dcsdp),info)
if(info /= psb_no_err_) then
@@ -176,10 +151,6 @@ subroutine psb_dcsrp(trans,iperm,a, desc_a, info)
time(4) = psb_wtime()
time(4) = time(4) - time(3)
if (debug) then
call psb_amx(ictxt, time(4))
write (*, *) ' comm structs assembly: ', time(4)*1.d-3
end if
call psb_erractionrestore(err_act)
return
@@ -30,8 +30,6 @@
!!$
! File: psb_zcsrp.f90
!
! WARNING: This routine should be changed and moved to the serial part
! i.e. taking out the descriptor.
!
! Subroutine: psb_zcsrp
! Apply a right permutation to a sparse matrix, i.e. permute the column
@@ -43,13 +41,10 @@
! iperm - integer, dimension(:) A permutation vector; its size
! must be either N_ROW or N_COL
! a - type(<psb_zspmat_type). The matrix to be permuted
! desc_a - type(<psb_desc_type>). The communication descriptor.
! info - integer. Eventually returns an error code
subroutine psb_zcsrp(trans,iperm,a, desc_a, info)
use psb_descriptor_type
use psb_serial_mod
subroutine psb_zcsrp(trans,iperm,a, info)
use psb_serial_mod, psb_protect_name => psb_zcsrp
use psb_const_mod
use psb_penv_mod
! implicit none
interface
@@ -76,7 +71,6 @@ subroutine psb_zcsrp(trans,iperm,a, desc_a, info)
!...parameters....
type(psb_zspmat_type), intent(inout) :: a
type(psb_desc_type), intent(in) :: desc_a
integer, intent(inout) :: iperm(:), info
character, intent(in) :: trans
!....locals....
@@ -92,32 +86,14 @@ subroutine psb_zcsrp(trans,iperm,a, desc_a, info)
time(1) = psb_wtime()
ictxt = psb_cd_get_context(desc_a)
dectype = psb_cd_get_dectype(desc_a)
n_row = psb_cd_get_local_rows(desc_a)
n_col = psb_cd_get_local_cols(desc_a)
n_row = psb_get_sp_nrows(a)
n_col = psb_get_sp_ncols(a)
if(psb_get_errstatus() /= 0) return
info=0
call psb_erractionsave(err_act)
name = 'psd_csrp'
! check on blacs grid
call psb_info(ictxt, me, np)
if (np == -1) then
info = 2010
call psb_errpush(info,name)
goto 9999
endif
if (.not.psb_is_asb_desc(desc_a)) then
info = 600
int_err(1) = dectype
call psb_errpush(info,name,int_err)
goto 9999
endif
ipsize = size(iperm)
if (.not.((ipsize == n_col).or.(ipsize == n_row) )) then
info = 35
@@ -161,7 +137,6 @@ subroutine psb_zcsrp(trans,iperm,a, desc_a, info)
! fix glob_to_loc/loc_to_glob mappings, then indices lists
! hmm, maybe we should just move all of this onto a different level,
! have a specialized subroutine, and do it in the solver context????
if (debug) write(0,*) 'spasb: calling dcsrp',size(work_dcsdp)
call zcsrp(trans,n_row,n_col,a%fida,a%descra,a%ia1,a%ia2,a%infoa,&
& ipt,work_dcsdp,size(work_dcsdp),info)
if(info /= psb_no_err_) then
@@ -175,11 +150,6 @@ subroutine psb_zcsrp(trans,iperm,a, desc_a, info)
time(4) = psb_wtime()
time(4) = time(4) - time(3)
if (debug) then
call psb_amx(ictxt, time(4))
write (*, *) ' comm structs assembly: ', time(4)*1.d-3
end if
call psb_erractionrestore(err_act)
return
+1 -1
View File
@@ -1,6 +1,6 @@
include ../../Make.inc
FOBJS = psb_dallc.o psb_dasb.o psb_dcsrp.o psb_cdprt.o \
FOBJS = psb_dallc.o psb_dasb.o psb_cdprt.o \
psb_dfree.o psb_dins.o \
psb_cdals.o psb_cdalv.o psb_cd_inloc.o psb_cdcpy.o \
psb_cdfree.o psb_cdins.o \