From 23042afd096258d832264eba22a1258eb766bb6b Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Tue, 18 Mar 2008 10:40:32 +0000 Subject: [PATCH] psblas2-dev: base/modules/psb_spmat_type.F90 Fixed check on allocation error. --- base/modules/psb_spmat_type.f90 | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/base/modules/psb_spmat_type.f90 b/base/modules/psb_spmat_type.f90 index e3311559..d53c870c 100644 --- a/base/modules/psb_spmat_type.f90 +++ b/base/modules/psb_spmat_type.f90 @@ -405,7 +405,7 @@ contains if (debug) write(0,*) 'SPALL : NNZ ',nnz,a%m,a%k call psb_nullify_sp(a) call psb_sp_reall(a,nnz,info) - + if (info /= 0) return a%pl(:)=0 a%pr(:)=0 ! set INFOA fields @@ -475,6 +475,7 @@ contains a%k=max(0,k) call psb_sp_reall(a,nnz,info) if (debug) write(0,*) 'Check in ALLOCATE ',info,allocated(a%pl),allocated(a%pr) + if (info /= 0) return a%pl(:)=0 a%pr(:)=0 ! set infoa fields @@ -501,7 +502,7 @@ contains info = 0 call psb_nullify_sp(a) call psb_sp_reall(a, ni1,ni2,nd,info) - + if (info /= 0) return a%pl(:)=0 a%pr(:)=0 ! set INFOA fields @@ -951,7 +952,7 @@ contains call psb_nullify_sp(a) if (debug) write(0,*) 'SPALL : NNZ ',nnz,a%m,a%k call psb_sp_reall(a,nnz,info) - + if (info /= 0) return a%pl(:)=0 a%pr(:)=0 ! set INFOA fields @@ -985,7 +986,7 @@ contains a%m=max(0,m) a%k=max(0,k) call psb_sp_reall(a,nnz,info) - + if (info /= 0) return a%pl(:)=0 a%pr(:)=0 ! set INFOA fields @@ -1019,7 +1020,7 @@ contains a%m=max(0,m) a%k=max(0,k) call psb_sp_reall(a,nnz,info) - + if (info /= 0) return a%pl(:)=0 a%pr(:)=0 ! set infoa fields @@ -1047,7 +1048,7 @@ contains call psb_nullify_sp(a) call psb_sp_reall(a, ni1,ni2,nd,info) - + if (info /= 0) return a%pl(:)=0 a%pr(:)=0 ! set INFOA fields