From 76b01051f32b5b61fbf8b04e0a3d2faed5845494 Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Tue, 1 Apr 2008 08:36:46 +0000 Subject: [PATCH] psblas2-dev: base/internals/psi_dswapdata.F90 Merged fixes from ulbe testing. --- base/internals/psi_dswapdata.F90 | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/base/internals/psi_dswapdata.F90 b/base/internals/psi_dswapdata.F90 index 3f028e63..5f7ba115 100644 --- a/base/internals/psi_dswapdata.F90 +++ b/base/internals/psi_dswapdata.F90 @@ -187,7 +187,6 @@ subroutine psi_dswapidxm(ictxt,icomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,work & albf,do_send,do_recv logical, parameter :: usersend=.false. - real(psb_dpk_), allocatable, target :: buffer(:) real(psb_dpk_), pointer, dimension(:) :: sndbuf, rcvbuf #ifdef HAVE_VOLATILE volatile :: sndbuf, rcvbuf @@ -268,10 +267,7 @@ subroutine psi_dswapidxm(ictxt,icomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,work rcvbuf => work(totsnd_+1:totsnd_+totrcv_) albf=.false. else - allocate(buffer(totsnd_+totrcv_), stat=info) - sndbuf => buffer(1:totsnd_) - rcvbuf => buffer(totsnd_+1:totsnd_+totrcv_) - + allocate(sndbuf(totsnd_),rcvbuf(totrcv_), stat=info) if(info /= 0) then call psb_errpush(4000,name) goto 9999 @@ -507,12 +503,11 @@ subroutine psi_dswapidxm(ictxt,icomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,work call psb_errpush(4000,name) goto 9999 end if - -!!$ if(albf) deallocate(sndbuf,rcvbuf,stat=info) -!!$ if(info /= 0) then -!!$ call psb_errpush(4000,name) -!!$ goto 9999 -!!$ end if + if(albf) deallocate(sndbuf,rcvbuf,stat=info) + if(info /= 0) then + call psb_errpush(4000,name) + goto 9999 + end if call psb_erractionrestore(err_act) return