mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-19 04:12:09 +00:00
Improve temp memory allocation in fix_coo
This commit is contained in:
@@ -4214,7 +4214,7 @@ subroutine psb_c_fix_coo_inner(nr,nc,nzin,dupl,ia,ja,val,nzout,info,idir)
|
||||
#else
|
||||
|
||||
|
||||
allocate(iaux(nzin+2),stat=info)
|
||||
allocate(iaux(MAX((nzin+2),(nc+2),(nr+2)),stat=info)
|
||||
if (info /= psb_success_) then
|
||||
info = psb_err_alloc_dealloc_
|
||||
call psb_errpush(info,name)
|
||||
|
||||
@@ -4214,7 +4214,7 @@ subroutine psb_d_fix_coo_inner(nr,nc,nzin,dupl,ia,ja,val,nzout,info,idir)
|
||||
#else
|
||||
|
||||
|
||||
allocate(iaux(nzin+2),stat=info)
|
||||
allocate(iaux(MAX((nzin+2),(nc+2),(nr+2)),stat=info)
|
||||
if (info /= psb_success_) then
|
||||
info = psb_err_alloc_dealloc_
|
||||
call psb_errpush(info,name)
|
||||
|
||||
@@ -4214,7 +4214,7 @@ subroutine psb_s_fix_coo_inner(nr,nc,nzin,dupl,ia,ja,val,nzout,info,idir)
|
||||
#else
|
||||
|
||||
|
||||
allocate(iaux(nzin+2),stat=info)
|
||||
allocate(iaux(MAX((nzin+2),(nc+2),(nr+2)),stat=info)
|
||||
if (info /= psb_success_) then
|
||||
info = psb_err_alloc_dealloc_
|
||||
call psb_errpush(info,name)
|
||||
|
||||
@@ -4214,7 +4214,7 @@ subroutine psb_z_fix_coo_inner(nr,nc,nzin,dupl,ia,ja,val,nzout,info,idir)
|
||||
#else
|
||||
|
||||
|
||||
allocate(iaux(nzin+2),stat=info)
|
||||
allocate(iaux(MAX((nzin+2),(nc+2),(nr+2)),stat=info)
|
||||
if (info /= psb_success_) then
|
||||
info = psb_err_alloc_dealloc_
|
||||
call psb_errpush(info,name)
|
||||
|
||||
Reference in New Issue
Block a user